:root {
  --cream: #FAF5EE;
  --cream-soft: #F3ECE1;
  --cream-border: #E5DCCB;
  --charcoal: #1F1D22;
  --muted: #6E675F;
  --coral: #E05A38;
  --coral-soft: #FDECE7;
  --teal: #0D9488;
  --teal-soft: #E6F7F5;
  --indigo: #4F46E5;
  --amber-bg: #FFF9E6;
  --amber-text: #5C2804;
  --emerald-bg: #EAFBF3;
  --emerald-text: #064E3B;
  --plum-text: #9D174D;
  --shadow-soft: 0 12px 32px rgba(24, 22, 26, 0.13);
  --shadow-pill: 0 6px 20px rgba(24, 22, 26, 0.12);
  --drawer-w: 332px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  color: var(--charcoal);
  background: #4FA3A5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
}

/* Main 3D Viewport */
.viewport {
  position: relative;
  flex: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.canvas-host {
  position: absolute;
  inset: 0;
}

.canvas-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.label-host {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Responsive Top HUD Bar (Prevents overlap across desktop & iPad widths) */
.top-hud {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 35;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  pointer-events: none;
}

.top-hud > * {
  pointer-events: auto;
}

/* Top-Left Brand Pill */
.brand-pill {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 20px;
  box-shadow: var(--shadow-pill);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brand-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(24, 22, 26, 0.17);
}

.brand-en {
  font-weight: 900;
  font-size: 17px;
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--coral);
}

.brand-zh {
  display: flex;
  flex-direction: column;
  border-left: 1.5px solid var(--cream-border);
  padding-left: 11px;
}

.brand-zh strong {
  font-size: 14px;
  color: var(--charcoal);
}

.brand-zh small {
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  margin-top: 1px;
}

/* Top-Center Stacked Pill Toolbars */
.top-center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.pill-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(250, 245, 238, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--cream-border);
  border-radius: 999px;
  padding: 5px 8px;
  box-shadow: var(--shadow-pill);
}

.light-btn {
  width: 36px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.light-btn:hover {
  color: var(--charcoal);
  background: rgba(31, 29, 34, 0.06);
}

.light-btn.active {
  background: var(--charcoal);
  color: var(--cream);
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 46px;
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.mode-btn:hover {
  color: var(--charcoal);
  background: rgba(31, 29, 34, 0.06);
}

.mode-btn.active {
  background: var(--charcoal);
  color: var(--cream);
}

.mode-icon {
  font-size: 13px;
  line-height: 1;
}

.mode-txt {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
}

/* Top-Right Action Pills */
.top-right-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--cream-border);
  background: rgba(250, 245, 238, 0.95);
  backdrop-filter: blur(8px);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.action-pill:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.action-pill.active {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

.circle-pill {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.pill-count {
  background: var(--coral);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
}

/* CSS2D Projected Floating Clubhouse & Character Labels */
.zone-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--charcoal);
  border: 1.5px solid rgba(31, 29, 34, 0.08);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.zone-pill .zone-num {
  color: var(--coral);
  font-weight: 800;
  font-size: 12.5px;
}

.zone-pill:hover {
  transform: scale(1.06) translateY(-2px);
  background: #fff;
}

.zone-pill.selected {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

.zone-pill.selected .zone-num {
  color: #FF8E72;
}

.sub-pin-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--coral);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(224, 90, 56, 0.38);
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.sub-pin-badge:hover {
  transform: scale(1.1);
}

.npc-tag {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(250, 245, 238, 0.95);
  border: 1px solid var(--cream-border);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.npc-tag .npc-role-dot {
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
}

.npc-tag:hover, .npc-tag.selected {
  background: var(--charcoal);
  color: var(--cream);
  transform: translateY(-2px) scale(1.05);
}

body.hide-nameplates .npc-tag {
  display: none !important;
}

/* Left Floating Detail & Character Card */
.detail-card {
  position: absolute;
  top: 124px;
  left: 24px;
  bottom: 24px;
  width: 386px;
  max-width: calc(100vw - 48px);
  z-index: 25;
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 22px 20px;
  overflow-y: auto;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
}

.card-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(31, 29, 34, 0.07);
  color: var(--charcoal);
  font-size: 14px;
  cursor: pointer;
}

.card-close:hover {
  background: rgba(31, 29, 34, 0.15);
}

.card-eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-title {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
  padding-right: 28px;
}

.card-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.section-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  margin: 16px 0 8px;
  letter-spacing: 0.03em;
}

/* Semantic Color Blocks inside Detail Card */
.sem-box {
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  border-left: 4px solid transparent;
}

.sem-context {
  background: var(--teal-soft);
  border-left-color: var(--teal);
  color: #0F4C50;
  font-size: 13px;
  line-height: 1.55;
}

.sem-passage {
  background: var(--amber-bg);
  border-left-color: #D97706;
  color: var(--amber-text);
  font-size: 14px;
  line-height: 1.55;
}

.sem-explanation {
  background: var(--emerald-bg);
  border-left-color: #059669;
  color: var(--emerald-text);
  font-size: 13px;
  line-height: 1.55;
}

.zh-hint-line {
  color: var(--plum-text);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
}

.audio-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 29, 34, 0.15);
  background: #fff;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.audio-btn:hover {
  background: var(--charcoal);
  color: #fff;
}

.item-row-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 7px;
  background: #fff;
  border: 1px solid var(--cream-border);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.item-row-btn:hover {
  border-color: var(--coral);
  transform: translateX(2px);
}

.row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.row-main {
  flex: 1;
}

.row-main strong {
  display: block;
  font-size: 13.5px;
  color: var(--charcoal);
}

.row-main small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.back-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--coral);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.phase-cta-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: var(--charcoal);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease;
}

.phase-cta-btn:hover {
  background: var(--coral);
}

/* Bottom Hint */
.bottom-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(250, 245, 238, 0.9);
  border: 1px solid var(--cream-border);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

body.card-open .bottom-hint {
  opacity: 0;
}

/* Right Collapsible Index Drawer */
.index-drawer {
  width: var(--drawer-w);
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
  border-left: 1px solid var(--cream-border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  z-index: 45;
  overflow-y: auto;
  transition: margin-right 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

body:not(.sidebar-open) .index-drawer {
  margin-right: calc(-1 * var(--drawer-w));
}

.drawer-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--coral);
}

.drawer-title {
  font-size: 22px;
  line-height: 1.3;
  margin-top: 6px;
  font-weight: 800;
}

.drawer-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.Passport-banner {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--coral-soft);
  border: 1px solid #F6C8BA;
  border-radius: 14px;
}

.passport-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--charcoal);
}

.passport-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.search-wrap {
  margin-top: 14px;
}

.search-wrap input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--cream-border);
  background: #fff;
  font-size: 13px;
  color: var(--charcoal);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--coral);
}

.club-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.club-index-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.club-index-item:hover {
  background: #fff;
  border-color: var(--cream-border);
}

.club-index-item.active {
  background: var(--coral-soft);
  border-left: 4px solid var(--coral);
}

.club-idx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.club-idx-code {
  font-style: italic;
  font-weight: 800;
  color: var(--coral);
  margin-right: 8px;
}

.club-idx-name {
  font-weight: 800;
  font-size: 14.5px;
}

.club-idx-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 19, 24, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: 540px;
  max-width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}

/* Phase 2-1: Interactive Vocabulary Lesson & SRS Backpack Styles */
.sem-question {
  background: #EEF2FF;
  border-left-color: var(--indigo);
  color: #312E81;
  font-size: 13px;
  line-height: 1.55;
}

.step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.step-dots {
  display: flex;
  gap: 6px;
}

.step-dot {
  width: 24px;
  height: 7px;
  border-radius: 999px;
  background: var(--cream-border);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.16s ease;
}

.step-dot.active {
  background: var(--coral);
}

.step-dot.saved {
  background: var(--teal);
}

.term-highlight {
  background: rgba(224, 90, 56, 0.14);
  color: #B93815;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 800;
}

.pitfall-callout {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(157, 23, 77, 0.08);
  color: var(--plum-text);
  font-size: 12.2px;
  line-height: 1.5;
  font-weight: 600;
}

.choice-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-top: 7px;
  border-radius: 12px;
  border: 1.5px solid #C7D2FE;
  background: #fff;
  color: var(--charcoal);
  font-size: 12.8px;
  line-height: 1.45;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--indigo);
  background: #F5F7FF;
}

.choice-btn.correct {
  border-color: #059669;
  background: #D1FAE5;
  color: #064E3B;
}

.choice-btn.wrong {
  border-color: #DC2626;
  background: #FEE2E2;
  color: #7F1D1D;
}

.choice-btn:disabled {
  cursor: default;
}

.save-deck-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--teal);
  background: #fff;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.save-deck-btn:hover:not(:disabled) {
  background: var(--teal);
  color: #fff;
}

.save-deck-btn.saved {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.done-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #D1FAE5;
  color: #065F46;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 6px;
}

.backpack-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
}

.bp-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--cream-border);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.bp-tab.active {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

.srs-grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.srs-btn {
  padding: 9px 6px;
  border-radius: 11px;
  border: 1px solid var(--cream-border);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.srs-btn.again { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.srs-btn.hard  { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.srs-btn.good  { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; }
.srs-btn.easy  { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }

/* Phase 2-2: Conversation Role-Play Styles */
.convo-history-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cream-border);
  border-radius: 12px;
  padding: 9px 11px;
  margin-top: 7px;
  font-size: 12.2px;
  line-height: 1.48;
  color: var(--muted);
}

.convo-history-item strong {
  color: var(--charcoal);
}

.quality-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.quality-best { background: #D1FAE5; color: #065F46; }
.quality-acceptable { background: #FEF3C7; color: #92400E; }
.quality-awkward { background: #FEE2E2; color: #991B1B; }

.coach-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.secondary-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--cream-border);
  background: #fff;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* Phase 2-3: Interactive Reading Club Styles */
.detail-card.reading-wide {
  width: 440px;
}

.inline-expr-btn {
  display: inline;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 6px;
  border: 1px dashed #D97706;
  background: rgba(217, 119, 6, 0.14);
  color: #9A3412;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.inline-expr-btn:hover, .inline-expr-btn.active {
  background: #E05A38;
  border-color: #E05A38;
  color: #fff;
}

.inline-expr-btn.saved {
  border-color: #0D9488;
  background: rgba(13, 148, 136, 0.15);
  color: #0F766E;
}

.reading-para-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #92400E;
}

/* Phase 2-4: Interactive Grammar Clinic Styles */
.formula-pill {
  display: block;
  padding: 8px 11px;
  border-radius: 10px;
  background: #1F1D22;
  color: #FAF5EE;
  font-family: "Consolas", "Segoe UI", monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 6px;
}

.wrong-trap-line {
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(220, 38, 38, 0.09);
  color: #991B1B;
  font-size: 12.2px;
  font-weight: 600;
}

.wrong-trap-line s {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .bottom-hint { display: none; }

  .top-hud {
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    gap: 6px;
  }

  .brand-pill {
    padding: 7px 11px;
    gap: 8px;
    border-radius: 15px;
  }
  .brand-en { font-size: 13px; }
  .brand-zh { padding-left: 8px; }
  .brand-zh strong { font-size: 12.5px; }
  .brand-zh small { display: none; }

  .pill-bar { padding: 3px 5px; gap: 2px; }
  .light-btn { width: 30px; height: 28px; }
  .mode-btn { min-width: 40px; height: 36px; padding: 2px 6px; }
  .mode-icon { font-size: 11px; }
  .mode-txt { font-size: 10px; margin-top: 1px; }

  .action-pill {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
  .circle-pill { width: 32px; }

  /* Mobile slide-over drawer so the 3D canvas never gets squished on iPhone */
  .index-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 332px);
    margin-right: 0 !important;
    transform: translateX(100%);
    box-shadow: -10px 0 32px rgba(24, 22, 26, 0.22);
  }
  body.sidebar-open .index-drawer {
    transform: translateX(0);
  }

  /* Mobile bottom-sheet Lesson Card */
  .detail-card,
  .detail-card.reading-wide {
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    max-height: 56dvh;
    border-radius: 22px;
    padding: 18px 16px;
  }

  .zone-pill {
    padding: 6px 11px;
    font-size: 12px;
  }

  .srs-grade-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
