/* V3 — ปรับต่อจากไฟล์ต้นฉบับของผู้ใช้ตามหน้าตาอ้างอิง my-v2 */

/* เอาโลโก้ซ้ำออกเฉพาะในเมนูด้านข้าง โลโก้บนหัวเว็บยังอยู่เหมือนเดิม */
.drawer > .brand { display: none !important; }
.site-shell { padding-bottom: 0; }
.page { position: relative; padding: 12px 16px 96px; }
.section { margin-top: 12px; padding: 12px; border-radius: 14px; }

/* แถวเลือกหลักสูตรอยู่เหนือสถิติและชิดขวา */
.stat-grid {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 62px;
}

/* V47 — เก็บระยะท้ายหน้า เมนูล่าง และหัวข้อหมวดให้สมดุล */
.page > .section:nth-of-type(5) .section-head h2,
.page > .section:nth-of-type(6) .section-head h2,
.page > .section:nth-of-type(7) .section-head h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.page > .section:nth-of-type(5),
.page > .section:nth-of-type(6),
.page > .section:nth-of-type(7) {
  border-top-width: 1px;
}

@media (max-width: 520px) {
  .site-shell {
    min-height: 0;
  }

  .page {
    min-height: 0;
    flex: 0 0 auto;
    padding-bottom: calc(56px + var(--safe));
  }

  .page > .section:nth-of-type(5) .section-head,
  .page > .section:nth-of-type(6) .section-head,
  .page > .section:nth-of-type(7) .section-head {
    min-height: 28px;
    margin-bottom: 9px;
  }

  .page > .section:nth-of-type(5) .section-head h2,
  .page > .section:nth-of-type(6) .section-head h2,
  .page > .section:nth-of-type(7) .section-head h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
  }

  .page > .section:nth-of-type(5) {
    border-top-color: rgba(211, 170, 36, .58);
  }

  .page > .section:nth-of-type(6) {
    border-top-color: rgba(211, 170, 36, .48);
  }

  .page > .section:nth-of-type(7) {
    margin-bottom: 6px;
    border-top-color: rgba(48, 143, 165, .52);
  }

  .bottom-nav {
    height: calc(50px + var(--safe));
    padding-top: 1px;
  }

  .bottom-nav a {
    gap: 0;
    line-height: 1;
  }
}
.stat-grid .course-select {
  position: absolute;
  top: 0;
  right: 0;
  width: 205px;
  min-height: 38px;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.stat-grid .course-select > span { display: none; }
.stat-grid .course-select select {
  width: 100%;
  height: 38px;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card {
  min-width: 0;
  min-height: 104px;
  padding: 10px 6px;
  flex-direction: column;
  gap: 4px;
}
.stat-card .icon { width: 23px; height: 23px; }
.stat-card strong { font-size: 24px; line-height: 1.05; }
.stat-card span { font-size: 11px; }

/* การ์ดสถิติ 4 ใบในแถวเดียว: ชื่ออยู่บรรทัดเดียวกับไอคอน */
.stat-grid > article.stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: 8px;
  row-gap: 5px;
  min-height: 86px;
  padding: 10px 14px;
  text-align: left;
}
.stat-grid > article.stat-card > div { display: contents; }
.stat-grid > article.stat-card .icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}
.stat-grid > article.stat-card span {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  white-space: nowrap;
}
.stat-grid > article.stat-card strong {
  grid-column: 1 / -1;
  grid-row: 2;
  text-align: center;
}
.stat-grid > article.stat-card::after {
  grid-column: 1 / -1;
  grid-row: 3;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1;
}
.stat-grid > article.stat-card:nth-child(1)::after { content: 'หลักสูตร'; }
.stat-grid > article.stat-card:nth-child(2)::after { content: 'หมวด'; }
.stat-grid > article.stat-card:nth-child(3)::after,
.stat-grid > article.stat-card:nth-child(4)::after { content: 'วิดีโอ'; }
.stat-grid > article.stat-card:nth-child(4) .icon {
  filter: hue-rotate(70deg) saturate(1.5) brightness(1.05);
}

/* การ์ดเรียนต่อและภาพหน้าปกจริง */
.continue-card { position: static; padding: 12px; }
.continue-label {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 16px;
  height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 16px;
}
.continue-label > span { display: none; }
.continue-card::before { content: none; display: none; }
.video-hero {
  min-height: 0;
  aspect-ratio: 16 / 7;
  border-radius: 0;
  background: #050505 url('/images/home-course-hero.png') center / cover no-repeat;
}
.video-hero::after { background: linear-gradient(90deg, #0003, transparent 55%, #0002); }
.video-hero::before {
  content: '16:23 / 24:10';
  position: absolute;
  right: 12px;
  bottom: 8px;
  z-index: 3;
  color: #fff;
  font-size: 10px;
}
.video-hero .candle-field {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.video-hero .candle-field i { display: none; }
.video-hero .candle-field::before,
.video-hero .candle-field::after {
  position: absolute;
  left: 10px;
  max-width: calc(100% - 20px);
  border: 1px solid #ffffff2e;
  border-radius: 7px;
  background: #050505c7;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px #0008;
}
.video-hero .candle-field::before {
  content: "บทที่ 6 / 18";
  top: 10px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
}
.video-hero .candle-field::after {
  content: none;
}
.video-hero .play { z-index: 5; }
.play { width: 72px; height: 72px; }
.play::before { border-left-width: 25px; border-top-width: 15px; border-bottom-width: 15px; }
.lesson-current {
  min-height: 76px;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid #26262b;
  background: #0b0b0e;
}
.lesson-current > div {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  align-content: center;
  align-items: baseline;
  column-gap: 8px;
}
.lesson-current > div > span { display: none; }
.lesson-current b {
  flex: 1 0 100%;
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-description {
  flex: 1 1 0;
  min-width: 0;
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: #9999a2;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.lesson-description.is-expanded {
  display: block;
  overflow: visible;
}
.lesson-more {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}
.lesson-current .icon-button {
  flex: 0 0 auto;
  align-self: flex-end;
}
.lesson-current span {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.lesson-current b { display: block; margin: 0; font-size: 18px; }
.continue-card > .progress-line { display: none; }

/* ปุ่มเอกสาร ภารกิจ แบบทดสอบ */
.action-grid { gap: 8px; }
.action { position: relative; min-width: 0; min-height: 66px; padding: 8px 34px 8px 10px; }
.action::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent url('/images/icon-arrow-yellow-v19.png') center / contain no-repeat;
}
.action .icon { width: 25px; height: 25px; }
.action b { white-space: nowrap; font-size: 13px; }
.action span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ช่องค้นหาและหมวดบทเรียน */
.search-box { height: 44px; }
.filter-button { height: 44px; }
.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
.tabs button { min-width: 0; min-height: 52px; padding: 6px 4px; white-space: normal; font-size: 10px; line-height: 1.15; }
.tabs button::after { display: block; margin-top: 3px; font-size: 8px; font-weight: 500; }
.tabs button:nth-child(1)::after { content: '286 บทเรียน'; }
.tabs button:nth-child(2)::after { content: '8 บทเรียน'; }
.tabs button:nth-child(3)::after { content: '18 บทเรียน'; }
.tabs button:nth-child(4)::after { content: '5 บทเรียน'; }
.tabs button:nth-child(5)::after { content: '10 บทเรียน'; }

/* การ์ดเนื้อหาต้องเห็นครบ 4 ใบในหนึ่งแถว */
.section-head { align-items: center; margin-bottom: 9px; }
.section-head h2 { font-size: 19px; }
.card-row {
  grid-auto-columns: calc((100% - 27px) / 4);
  gap: 9px;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }
.content-card { min-height: 0; }
.market-art { height: 92px; }
.content-card .copy { padding: 8px; }
.content-card h3 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-card p { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-card footer { font-size: 9px; }

.bottom-nav { height: calc(76px + var(--safe)); }

@media (max-width: 520px) {
  .topbar { height: 56px; }
  /* V34: ขยายเฉพาะไอคอนที่ผู้ใช้วงไว้ให้เห็นความแตกต่างชัดเจน */
  .topbar > .icon-button { width: 50px; height: 50px; }
  .topbar > .icon-button > .icon { width: 36px; height: 36px; filter: drop-shadow(0 0 7px rgba(255, 196, 0, .52)); }
  .topbar > .notification > .icon { width: 37px; height: 37px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand b { font-size: 16px; }
  .brand small { margin-top: 3px; font-size: 7px; }
  .icon-button { width: 40px; height: 40px; }
  .page { padding: 7px 7px 72px; }
  .section { margin-top: 7px; padding: 7px; border-radius: 11px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding-top: 38px; }
  .stat-grid .course-select {
    width: 140px;
    min-height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .stat-grid .course-select select { height: 26px; padding: 0 6px; font-size: 10px; }
  .stat-grid > article.stat-card { min-height: 62px; padding: 4px 3px; column-gap: 3px; row-gap: 1px; }
  .stat-grid > article.stat-card .icon { width: 26px; height: 26px; filter: drop-shadow(0 0 6px rgba(255, 196, 0, .42)); }
  /* V38: SVG ทั้งสี่มีวงกลมขนาดเดียวกัน จึงใช้กรอบ 26px เท่ากันทุกใบ */
  .stat-grid > article.stat-card:nth-child(2) .icon,
  .stat-grid > article.stat-card:nth-child(3) .icon {
    width: 26px;
    height: 26px;
    transform: none;
    transform-origin: center;
    margin-inline: 0;
  }
  .stat-grid > article.stat-card strong { font-size: 19px; line-height: 1; }
  /* V43: ลดหัวข้อสถิติทั้งสี่ใบเป็น 9px ให้ข้อความยาวลงตัวในกรอบ */
  .stat-grid > article.stat-card span {
    color: #b8b8c0;
    font-size: 9px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -.025em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .stat-grid > article.stat-card:nth-child(2) span,
  .stat-grid > article.stat-card:nth-child(3) span {
    font-size: 0;
    min-width: 0;
    overflow: hidden;
  }
  .stat-grid > article.stat-card:nth-child(2) span::before {
    content: 'หมวดหมู่การเรียน';
    font-size: 9px;
    line-height: 1.05;
    letter-spacing: -.025em;
  }
  .stat-grid > article.stat-card:nth-child(3) span::before {
    content: 'บทเรียนทั้งหมด';
    font-size: 9px;
    line-height: 1.05;
    letter-spacing: -.025em;
  }
  .stat-grid > article.stat-card::after { font-size: 8px; line-height: 1; }
  .continue-card { position: static; padding: 7px; }
  .continue-label {
    top: 7px;
    left: 10px;
    height: 32px;
    gap: 5px;
    font-size: 15px;
    font-weight: 700;
  }
  /* V40: ไอคอนหัวข้อที่ผู้ใช้ระบุทั้งสี่จุดเป็น 26 × 26px */
  .continue-label .icon { width: 26px; height: 26px; flex: 0 0 26px; }
  .continue-card::before { content: none; display: none; }
  .video-hero { aspect-ratio: 16 / 5.8; }
  .video-hero .candle-field::before {
    top: 6px;
    left: 6px;
    padding: 3px 6px;
    font-size: 8.5px;
  }
  .play { width: 49px; height: 49px; }
  .play::before { border-left-width: 17px; border-top-width: 10px; border-bottom-width: 10px; }
  .lesson-current { min-height: 63px; padding: 6px 8px; }
  .lesson-current b { margin: 0; font-size: 13px; }
  .lesson-description { margin-top: 3px; font-size: 8.5px; line-height: 1.35; }
  .lesson-more { margin-top: 2px; font-size: 9px; }
  .lesson-current span { padding: 4px 7px; font-size: 9px; }
  .lesson-current b { margin: 0; font-size: 13px; }
  .action-grid { gap: 5px; margin-top: 6px; }
  .action { display: flex; min-height: 49px; padding: 6px 24px 6px 7px; text-align: left; gap: 6px; }
  .action > div { min-width: 0; }
  .action::after { right: 5px; width: 17px; height: 17px; font-size: 13px; }
  .action .icon { width: 30px; height: 30px; flex: 0 0 30px; filter: drop-shadow(0 0 6px rgba(255, 196, 0, .42)); }
  .action b { font-size: 11px; line-height: 1.15; }
  .action span { display: -webkit-box; overflow: hidden; color: #a7a7af; font-size: 8px; line-height: 1.2; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .search-box, .filter-button { height: 38px; }
  .search-box { padding: 0 9px; font-size: 11px; }
  .filter-button { font-size: 11px; }
  .tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    grid-template-columns: none;
    gap: 4px;
    margin-top: 6px;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { min-height: 43px; padding: 5px 5px; font-size: 9px; line-height: 1.15; scroll-snap-align: start; }
  .tabs button::after { margin-top: 3px; font-size: 7.5px; }
  .section-head { margin-bottom: 6px; }
  .section-head h2 { font-size: 15px; }
  .section-head h2 .icon { width: 26px; height: 26px; flex: 0 0 26px; }
  .section-head p { color: #9999a2; font-size: 9px; }
  .view-all { font-size: 10px; }
  .card-row {
    grid-auto-columns: calc((100% - 12px) / 3);
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
    overscroll-behavior-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
  }
  .content-card {
    height: 146px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }
  .page > .section:nth-of-type(5) .content-card,
  .page > .section:nth-of-type(7) .content-card {
    height: 132px;
  }
  /* ให้เบราว์เซอร์แยกทิศทางนิ้วเอง: ลากขึ้นลงเพื่อเลื่อนหน้า
     และลากซ้ายขวาเพื่อเลื่อนการ์ด โดยไม่ล็อก gesture ไว้ที่แนวนอน */
  html, body, .site-shell {
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .market-art,
  .market-art i,
  .market-art span,
  .market-art b,
  .market-art em {
    pointer-events: none;
  }
  .market-art { height: 72px; }
  .market-art b {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    border-radius: 50%;
    background: #050505b8;
  }
  .market-art b::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 7px;
    border-left: 9px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
  }
  .market-art em {
    position: absolute;
    right: 4px;
    bottom: 3px;
    z-index: 4;
    color: #fff;
    font-size: 6px;
    font-style: normal;
  }
  .market-art em::after { content: '16:23'; }
  .card-row .content-card:nth-child(2) .market-art em::after { content: '18:40'; }
  .card-row .content-card:nth-child(3) .market-art em::after { content: '14:15'; }
  .card-row .content-card:nth-child(4) .market-art em::after { content: '20:10'; }
  .content-card .copy { padding: 7px; }
  .content-card h3 {
    min-height: 21px;
    font-size: 9.5px;
    line-height: 1.2;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .content-card p { margin: 2px 0; color: #b8b8c0; font-size: 8.2px; }
  .content-card footer { margin-top: 3px; color: #ababB3; font-size: 7.5px; }
  .content-card footer .icon { width: 15px; height: 15px; }
  .content-card .progress-line { height: 3px; }
  .page > .section:nth-of-type(5) .badge {
    top: 6px;
    left: 6px;
    min-height: 16px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0;
    line-height: 1;
    white-space: nowrap;
  }
  .page > .section:nth-of-type(6) .badge {
    top: 4px;
    left: 4px;
    min-height: 0;
    padding: 1px 4px;
    border-radius: 5px;
    font-size: 7px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .page > .section:nth-of-type(5) .content-card .badge::after {
    color: #121212;
    font-size: 7px;
    font-weight: 800;
  }
  .page > .section:nth-of-type(5) .content-card:nth-child(1) .badge::after,
  .page > .section:nth-of-type(5) .content-card:nth-child(4) .badge::after {
    content: 'ใหม่';
  }
  .page > .section:nth-of-type(5) .content-card:nth-child(2) .badge {
    background: #2383d8;
  }
  .page > .section:nth-of-type(5) .content-card:nth-child(2) .badge::after {
    content: 'อัปเดต';
    color: #fff;
  }
  .page > .section:nth-of-type(5) .content-card:nth-child(3) .badge {
    background: #9c7c12;
  }
  .page > .section:nth-of-type(5) .content-card:nth-child(3) .badge::after {
    content: 'แนะนำ';
    color: #fff;
  }
  .page { padding-bottom: calc(68px + var(--safe)); }
  .bottom-nav { height: calc(54px + var(--safe)); }
  .bottom-nav .icon { width: 31px; height: 31px; filter: drop-shadow(0 0 6px rgba(255, 196, 0, .38)); }
  .bottom-nav a.active .icon { filter: drop-shadow(0 0 10px rgba(255, 196, 0, .72)); }
  .bottom-nav a { font-size: 8px; }

  /* จุดบอกตำแหน่งและคำแนะนำการปัดของแถววิดีโอ */
  .page > .section:nth-of-type(5)::after,
  .page > .section:nth-of-type(6)::after,
  .page > .section:nth-of-type(7)::after {
    content: '●  ○  ○';
    display: block;
    width: 44px;
    margin: 7px auto 0;
    color: transparent;
    background: linear-gradient(90deg, var(--yellow) 0 29%, #65656d 29% 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-align: center;
    font-size: 7px;
    letter-spacing: .18em;
  }
  /* สถานะเฉพาะวิดีโอที่บันทึกไว้ */
  .page > .section:nth-of-type(7) .content-card::before {
    position: absolute;
    right: 6px;
    top: 6px;
    z-index: 6;
    min-height: 16px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #16885c;
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }
  .page > .section:nth-of-type(7) .content-card:nth-child(1)::before {
    content: 'กำลังเรียน';
    background: #1688b8;
  }
  .page > .section:nth-of-type(7) .content-card:nth-child(2)::before {
    content: 'ยังไม่เริ่ม';
    background: #6f7078;
  }
  .page > .section:nth-of-type(7) .content-card:nth-child(3)::before,
  .page > .section:nth-of-type(7) .content-card:nth-child(4)::before {
    content: 'เรียนแล้ว';
  }
  .page > .section:nth-of-type(7) { margin-bottom: 4px; }

  /* เวลามีอยู่บนภาพแล้ว จึงซ่อนข้อความเวลาที่ซ้ำในรายละเอียดการ์ดวิดีโอ */
  .page > .section:nth-of-type(5) .content-card footer > span:first-child,
  .page > .section:nth-of-type(7) .content-card footer > span:first-child {
    display: none;
  }

  /* ตรึงปุ่มบันทึกของการ์ดวิดีโอทุกกลุ่มไว้ที่มุมขวาล่างตำแหน่งเดียวกัน */
  .page > .section:nth-of-type(5) .content-card footer .icon,
  .page > .section:nth-of-type(7) .content-card footer .icon {
    display: none;
  }
  .page > .section:nth-of-type(5) .content-card::after,
  .page > .section:nth-of-type(6) .content-card::after,
  .page > .section:nth-of-type(7) .content-card::after {
    content: '';
    position: absolute;
    right: 7px;
    bottom: 7px;
    z-index: 7;
    width: 19px;
    height: 19px;
    background: url('/icons/icon-bookmark.svg') center / contain no-repeat;
    pointer-events: none;
  }
  .page > .section:nth-of-type(6) .content-card footer {
    padding-right: 28px;
  }
  .page > .section:nth-of-type(6) .content-card .progress-line {
    width: calc(100% - 34px);
  }

  /* แยกบุคลิกของวิดีโอแต่ละกลุ่มด้วยเส้นสีบาง ๆ */
  .page > .section:nth-of-type(5) { border-top-color: #8f7625; }
  .page > .section:nth-of-type(6) { border-top-color: #77662d; }
  .page > .section:nth-of-type(7) { border-top-color: #356979; }
}

/* V47 final overrides */
@media (max-width: 520px) {
  .site-shell { min-height: 0; }
  .page {
    min-height: 0;
    flex: 0 0 auto;
    padding-bottom: calc(56px + var(--safe));
  }
  .page > .section:nth-of-type(5) .section-head,
  .page > .section:nth-of-type(6) .section-head,
  .page > .section:nth-of-type(7) .section-head {
    min-height: 28px;
    margin-bottom: 9px;
  }
  .page > .section:nth-of-type(5) .section-head h2,
  .page > .section:nth-of-type(6) .section-head h2,
  .page > .section:nth-of-type(7) .section-head h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
  }
  .page > .section:nth-of-type(5) { border-top: 1px solid rgba(211, 170, 36, .58); }
  .page > .section:nth-of-type(6) { border-top: 1px solid rgba(211, 170, 36, .48); }
  .page > .section:nth-of-type(7) {
    margin-bottom: 6px;
    border-top: 1px solid rgba(48, 143, 165, .52);
  }
  .bottom-nav {
    height: calc(50px + var(--safe));
    padding-top: 1px;
  }
  .bottom-nav a {
    gap: 0;
    line-height: 1;
  }
}
