:root,
[data-theme="dark"] {
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --bg-outer: #04070f;
  --bg: #080d1a;
  --bg-elevated: rgba(17, 25, 45, 0.78);
  --bg-card: rgba(20, 29, 52, 0.72);
  --bg-card-hover: rgba(28, 40, 70, 0.85);
  --bg-soft: rgba(30, 43, 74, 0.55);
  --bg-input: rgba(11, 17, 32, 0.85);
  --topbar-bg: rgba(10, 15, 29, 0.82);
  --bottomnav-bg: rgba(12, 18, 34, 0.86);

  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #8b9bb4;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.25);
  --glass-highlight: rgba(255, 255, 255, 0.08);

  --blue: #6366f1;
  --blue-bright: #818cf8;
  --bluefade: rgba(99, 102, 241, 0.16);
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --teal: #10b981;
  --tealfade: rgba(16, 185, 129, 0.16);
  --amber: #f59e0b;
  --amberfade: rgba(245, 158, 11, 0.16);
  --red: #f43f5e;
  --redfade: rgba(244, 63, 94, 0.16);

  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #06b6d4 100%);
  --grad-hero: linear-gradient(135deg, rgba(79, 70, 229, 0.92) 0%, rgba(124, 58, 237, 0.88) 55%, rgba(14, 116, 144, 0.9) 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

  --shadow-card: 0 14px 34px -10px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 10px 28px -6px rgba(99, 102, 241, 0.45);
  --chassis-border: rgba(148, 163, 184, 0.22);
  --chassis-shadow: 0 32px 90px rgba(0, 0, 0, 0.75), 0 0 0 8px rgba(15, 23, 42, 0.85), 0 0 80px rgba(99, 102, 241, 0.16);
}

[data-theme="light"] {
  --bg-outer: #dfe6f4;
  --bg: #f2f5fc;
  --bg-elevated: rgba(255, 255, 255, 0.9);
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-soft: #e8eef9;
  --bg-input: #ffffff;
  --topbar-bg: rgba(244, 247, 253, 0.86);
  --bottomnav-bg: rgba(255, 255, 255, 0.9);

  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.9);

  --blue: #4f46e5;
  --blue-bright: #4338ca;
  --bluefade: rgba(79, 70, 229, 0.11);
  --teal: #059669;
  --tealfade: rgba(16, 185, 129, 0.13);
  --amber: #d97706;
  --amberfade: rgba(245, 158, 11, 0.15);
  --red: #e11d48;
  --redfade: rgba(225, 29, 72, 0.12);

  --shadow-card: 0 10px 26px -8px rgba(15, 23, 42, 0.07), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  --shadow-glow: 0 10px 24px -6px rgba(79, 70, 229, 0.35);
  --chassis-border: rgba(15, 23, 42, 0.14);
  --chassis-shadow: 0 28px 80px rgba(15, 23, 42, 0.18), 0 0 0 8px rgba(255, 255, 255, 0.75);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-outer);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  user-select: none;
}

a {
  color: var(--blue-bright);
  text-decoration: none;
}

/* Ambient Aurora Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.42;
}

[data-theme="light"] .ambient-orb {
  opacity: 0.25;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #6366f1;
  top: -90px;
  left: calc(50% - 260px);
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: #06b6d4;
  bottom: -60px;
  right: calc(50% - 260px);
}

.orb-3 {
  width: 260px;
  height: 260px;
  background: #8b5cf6;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Phone App Chassis on Desktop, Full Native Screen on Mobile */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 468px;
  min-height: calc(100dvh - 32px);
  margin: 16px auto;
  background: var(--bg);
  border-radius: 42px;
  border: 1.5px solid var(--chassis-border);
  box-shadow: var(--chassis-shadow);
  display: flex;
  flex-direction: column;
  overflow: clip;
  transition: max-width 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.35s ease;
}

body.wide-layout .shell {
  max-width: 1100px;
  border-radius: 30px;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Top App Header & Dynamic Island Notch */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px 10px;
}

.topbar-notch {
  width: 112px;
  height: 22px;
  background: #02040a;
  border-radius: 999px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.wide-layout .topbar-notch {
  display: none;
}

.notch-speaker {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.notch-cam {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 0%, #1e3a8a 70%);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-brand-Touch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-menu {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-orb {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transition: transform 0.18s ease;
}

.mobile-menu:active .brand-orb {
  transform: scale(0.92);
}

.breadcrumbs {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-mini-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-bright);
  line-height: 1.1;
}

.breadcrumbs strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.mode-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.ai-mode-tag {
  display: none;
  background: var(--bluefade);
  color: var(--blue-bright);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

body.wide-layout .ai-mode-tag {
  display: inline-block;
}

.icon-pill-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-pill-btn:hover {
  background: var(--bg-card-hover);
}

.icon-pill-btn:active {
  transform: scale(0.92);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.35));
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

/* Horizontal Story / Quick-Switch Pill Bar */
.quick-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 2px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quick-pills::-webkit-scrollbar {
  display: none;
}

.quick-pill {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.quick-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.quick-pill.active {
  background: var(--grad-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Main App Scroll Container */
.main {
  flex: 1;
  width: 100%;
  padding: 18px 16px 112px;
  margin: 0 auto;
}

body.wide-layout .main {
  padding: 28px 32px 120px;
}

/* Native Bottom Navigation Bar */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 35;
  margin-top: auto;
  background: var(--bottomnav-bg);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.18s ease, transform 0.15s ease;
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-svg {
  width: 21px;
  height: 21px;
}

.tab-btn.active {
  color: var(--ink);
}

.tab-btn.active .tab-svg {
  color: var(--blue-bright);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}

.tab-btn-center {
  position: relative;
  margin-top: -18px;
}

.tab-orb {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--grad-primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  border: 2px solid var(--bg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn-center.active .tab-orb {
  transform: translateY(-3px) scale(1.05);
}

.tab-btn-center .tab-svg {
  color: #ffffff !important;
  width: 22px;
  height: 22px;
}

/* Slide-Up App Drawer / Sheet (Sidebar) */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 105%);
  width: min(100%, 468px);
  max-height: 86dvh;
  background: var(--bg-elevated);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  padding: 12px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  overflow-y: auto;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
}

body.wide-layout .sidebar {
  width: min(100%, 560px);
}

.sidebar.open {
  transform: translate(-50%, 0);
}

.sheet-handle {
  display: flex;
  justify-content: center;
  padding: 4px 0 12px;
}

.sheet-handle span {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: var(--line-strong);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: grid;
  place-items: center;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-glow);
}

.brand strong {
  display: block;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
}

.brand-ai {
  color: var(--blue-bright);
  margin-left: 2px;
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
}

.sheet-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 15px;
}

.sidebar-card {
  padding: 16px;
  background: var(--grad-hero);
  border-radius: 20px;
  margin-bottom: 18px;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.sidebar-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.small-overline {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.78);
}

.sidebar-program {
  margin-top: 4px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.program-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.sidebar-card p {
  font-size: 12px;
  margin: 8px 0 12px;
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-progress {
  height: 7px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 99px;
  margin: 0 0 8px;
  overflow: hidden;
}

.sidebar-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #34d399, #38bdf8);
  border-radius: 99px;
}

.sidebar-note {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 4px 10px;
}

.nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nav-item {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  text-align: left;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
}

.nav-item.active {
  background: var(--bluefade);
  border-color: rgba(99, 102, 241, 0.45);
  color: var(--ink);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.settings-link {
  grid-column: 1 / -1;
}

/* Page Intro & Headers */
.header-intro {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 20px;
}

body.wide-layout .header-intro {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--blue-bright);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  color: var(--ink);
}

.subtitle {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Tactile App Buttons */
.btn {
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13.5px;
  min-height: 44px;
  padding: 11px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
}

.btn-soft {
  color: var(--blue-bright);
  background: var(--bluefade);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.btn-danger {
  color: var(--red);
  background: var(--redfade);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.btn-sm {
  min-height: 36px;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 11px;
}

/* Bento Cards & Metrics */
.card {
  background: var(--bg-card);
  background-image: var(--grad-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.pad {
  padding: 18px;
}

body.wide-layout .pad {
  padding: 22px 24px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body.wide-layout .metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.metric {
  padding: 16px;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.metric-icon {
  border-radius: 11px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--bluefade);
  color: var(--blue-bright);
  font-size: 15px;
  flex-shrink: 0;
}

.metric-icon.teal {
  background: var(--tealfade);
  color: var(--teal);
}

.metric-icon.amber {
  background: var(--amberfade);
  color: var(--amber);
}

.metric-icon.gray {
  background: var(--bg-soft);
  color: var(--ink-secondary);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-top: 8px;
}

.metric-foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* Grids & Stacks */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

body.wide-layout .two-col {
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16.5px;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.section-link {
  border: 0;
  background: none;
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 12.5px;
  padding: 4px 0;
}

/* Hero Action Banner */
.daily-banner {
  background: var(--grad-hero);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  color: #ffffff;
  padding: 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

body.wide-layout .daily-banner {
  flex-direction: row;
  align-items: center;
  padding: 24px 26px;
}

.daily-banner::before {
  content: '✳';
  font-size: 150px;
  color: rgba(255, 255, 255, 0.07);
  position: absolute;
  right: -15px;
  top: -45px;
  pointer-events: none;
}

.daily-banner h2 {
  margin: 0 0 6px;
  font: 800 20px/1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.daily-banner p {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.55;
}

.daily-banner .btn {
  background: #ffffff;
  color: #312e81;
  width: 100%;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

body.wide-layout .daily-banner .btn {
  width: auto;
}

/* Tags, Pills & Badges */
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 700;
  background: var(--bluefade);
  color: var(--blue-bright);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag.green {
  background: var(--tealfade);
  color: var(--teal);
  border-color: rgba(16, 185, 129, 0.28);
}

.tag.amber {
  background: var(--amberfade);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.28);
}

.tag.gray {
  background: var(--bg-soft);
  color: var(--muted);
  border-color: var(--line);
}

.pill-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pill {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

/* Lesson List Cards */
.lesson-entry {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-entry:last-child {
  border: 0;
  padding-bottom: 0;
}

.lesson-date {
  width: 48px;
  height: 52px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.lesson-date b {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.1;
}

.lesson-date span {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lesson-content {
  flex: 1;
  min-width: 0;
}

.lesson-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 4px;
  color: var(--ink);
}

.lesson-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Skill Mastery Bars */
.skill-box {
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 13px 15px;
  margin: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skill-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.skill-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 115px;
}

.bar {
  height: 8px;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
}

.bar > span {
  display: block;
  background: var(--grad-primary);
  height: 100%;
  border-radius: 99px;
}

.bar.teal > span {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.skill-right small {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  min-width: 36px;
  text-align: right;
}

/* Notices & Alerts */
.notice {
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--amberfade);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 18px;
  margin-bottom: 16px;
}

.notice.blue {
  background: var(--bluefade);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--ink);
}

.notice.green {
  background: var(--tealfade);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--ink);
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.empty-symbol {
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--blue-bright);
}

.empty strong {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 15px;
  margin: 4px 0;
}

/* Interactive Mobile Calendar */
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.cal-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 6px;
}

.cal-day {
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 7px 6px;
  transition: all 0.15s ease;
  text-align: left;
  overflow: hidden;
}

.cal-day:hover {
  border-color: var(--blue-bright);
}

.cal-day.muted {
  opacity: 0.42;
}

.cal-day.today {
  outline: 2px solid var(--blue-bright);
  background: var(--bluefade);
}

.cal-day.break {
  background: var(--amberfade);
  border-color: rgba(245, 158, 11, 0.3);
}

.cal-day.lesson-on {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
}

.cal-day .dn {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink);
  font-weight: 800;
}

.cal-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.cal-note {
  font-size: 8.5px;
  color: var(--ink-secondary);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Forms & Inputs (16px on mobile prevents iOS auto-zoom) */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-weight: 700;
  color: var(--ink-secondary);
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-input);
  padding: 12px 14px;
  color: var(--ink);
  font-size: 16px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.wide-layout .form-grid {
  grid-template-columns: 1fr 1fr;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

/* Mobile Quiz & Flashcard Options */
.quiz-question {
  font: 800 20px/1.38 var(--font-display);
  margin: 10px 0 18px;
  color: var(--ink);
}

.answer-option {
  display: block;
  text-align: left;
  border: 1.5px solid var(--line-strong);
  width: 100%;
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 15px 16px;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.answer-option:hover:not(:disabled) {
  border-color: var(--blue-bright);
  background: var(--bg-card-hover);
}

.answer-option:active:not(:disabled) {
  transform: scale(0.985);
}

.answer-option.correct {
  border-color: var(--teal);
  background: var(--tealfade);
  color: var(--ink);
}

.answer-option.wrong {
  border-color: var(--red);
  background: var(--redfade);
  color: var(--ink);
}

.explain {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bluefade);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 0;
}

.progress-track {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--grad-primary);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* AI Tutor Chat Experience */
.tutor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

body.wide-layout .tutor-layout {
  grid-template-columns: 1fr 310px;
}

.chat-pane {
  height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
}

.chat-msg.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-bubble {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 5px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}

.chat-msg.user .chat-bubble {
  background: var(--grad-primary);
  border-color: transparent;
  color: #ffffff;
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.msg-face {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--bluefade);
  color: var(--blue-bright);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
}

.chat-msg.user .msg-face {
  background: var(--bg-soft);
  color: var(--ink-secondary);
}

.chat-inputbar {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
}

.chat-inputbar input {
  border: 1px solid var(--line-strong);
  background: var(--bg-input);
  color: var(--ink);
  border-radius: 999px;
  min-width: 0;
  flex: 1;
  padding: 11px 16px;
  font-size: 16px;
}

.chat-inputbar input:focus {
  outline: none;
  border-color: var(--blue-bright);
}

.round-btn {
  height: 44px;
  width: 44px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  background: var(--bluefade);
  color: var(--blue-bright);
  font-size: 18px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.round-btn.recording {
  background: var(--redfade);
  border-color: var(--red);
  color: var(--red);
  animation: pulse 1s infinite;
}

/* Pronunciation Studio */
.phrase {
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 20px;
  margin: 12px 0 18px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(6, 182, 212, 0.08));
  font: 800 21px/1.4 var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.mini-stat {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.assessment-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.wide-layout .assessment-cards {
  grid-template-columns: repeat(4, 1fr);
}

.assessment-card {
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 10px;
}

.assessment-card label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}

.history-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  gap: 12px;
  font-size: 13px;
}

.history-line:last-child {
  border-bottom: 0;
}

.muted {
  color: var(--muted);
}

.text-small {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.text-tiny {
  font-size: 11px;
}

.align-right {
  text-align: right;
}

.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Native Bottom-Sheet Modals */
.modal-root {
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}

.modal {
  background: var(--bg-elevated);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 22px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  width: min(100%, 480px);
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

body.wide-layout .modal-overlay {
  align-items: center;
  padding: 18px;
}

body.wide-layout .modal {
  border-radius: 24px;
  border-bottom: 1px solid var(--line-strong);
  max-width: 620px;
}

@keyframes sheetUp {
  from {
    transform: translateY(36px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
  font: 800 19px/1.25 var(--font-display);
  color: var(--ink);
}

.xbtn {
  background: var(--bg-soft);
  color: var(--ink-secondary);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

/* Floating App Toast */
.toast {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #ffffff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  padding: 12px 20px;
  display: none;
  z-index: 110;
  font-size: 12.5px;
  font-weight: 600;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  backdrop-filter: blur(16px);
}

.toast.show {
  display: block;
}

.list-line {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.list-line:last-child {
  border: 0;
}

.unit-line {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.unit-line:last-child {
  border: 0;
}

.unit-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bluefade);
  color: var(--blue-bright);
  font-family: var(--font-display);
  font-weight: 800;
  flex-shrink: 0;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.big-illustration {
  height: 136px;
  display: grid;
  place-items: center;
  background: var(--grad-hero);
  border-radius: 20px;
  font-size: 56px;
  margin-bottom: 18px;
}

.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 24px;
  line-height: 1.55;
  text-align: center;
}

/* Auth, Book & Source References */
.locked .sidebar,
.locked .topbar,
.locked .bottom-nav,
.locked .sheet-backdrop {
  display: none;
}

.locked .main-wrap {
  width: 100%;
}

.locked .main {
  min-height: 88dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card {
  width: min(100%, 420px);
  padding: 28px 22px;
}

.auth-card .field input {
  width: 100%;
}

.auth-card .page-title {
  font-size: 26px;
}

.auth-card .btn-primary {
  width: 100%;
}

.account-settings {
  margin-bottom: 18px;
}

.account-settings form {
  max-width: 470px;
}

.account-settings summary,
.book-sources summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-bright);
  padding: 4px 0;
}

.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

body.wide-layout .book-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.current-book {
  border: 1.5px solid var(--teal);
  box-shadow: 0 12px 32px -10px rgba(16, 185, 129, 0.28);
}

.book-sources {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.source-excerpt {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-soft);
}

.source-excerpt p {
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0 0;
}

.source-caption {
  font-size: 11.5px;
  color: var(--blue-bright);
  background: var(--bluefade);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 10px 13px;
  border-radius: 13px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.phrase-example {
  display: flex;
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  margin-top: 8px;
  width: 100%;
}

#quiz-response {
  width: 100%;
  min-height: 110px;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

/* Free Style Tutor, Coach Cards, Inline Azure Assessment & Voice Call Mode */
.tutor-mode-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 18px;
  margin-bottom: 14px;
}

.mode-pill {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 13px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all 0.18s ease;
}

.mode-pill:hover {
  color: var(--ink);
}

.mode-pill.active {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.topic-starters {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

.topic-starters::-webkit-scrollbar {
  display: none;
}

.starter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.starter-chip {
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: var(--bluefade);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.14s ease, background 0.16s ease;
}

.starter-chip:hover {
  background: rgba(99, 102, 241, 0.28);
}

.starter-chip:active {
  transform: scale(0.95);
}

.voice-call-card {
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(155deg, rgba(79, 70, 229, 0.22), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.voice-call-prompt {
  font: 700 18px/1.4 var(--font-display);
  color: var(--ink);
  text-align: center;
  margin: 18px auto;
  max-width: 400px;
}

.voice-orb-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 16px;
}

.voice-call-orb {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 14px 38px rgba(99, 102, 241, 0.55), 0 0 0 10px rgba(99, 102, 241, 0.14);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.voice-call-orb:active {
  transform: scale(0.93);
}

.voice-call-orb.recording {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 14px 38px rgba(244, 63, 94, 0.6), 0 0 0 14px rgba(244, 63, 94, 0.2);
  animation: pulse 1.1s infinite;
}

.orb-icon {
  font-size: 32px;
  line-height: 1;
}

.orb-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chat-pane {
  height: 560px;
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.chat-msg.user .chat-bubble-wrap {
  align-items: flex-end;
}

.bubble-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bubble-btn {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-secondary);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.bubble-btn:hover:not(:disabled) {
  border-color: var(--blue-bright);
  color: var(--ink);
}

.bubble-btn.accent {
  background: var(--bluefade);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--blue-bright);
}

.coach-card {
  margin-top: 6px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.13), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.35);
  width: 100%;
}

.coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.coach-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
}

.coach-better {
  font: 800 15px/1.38 var(--font-display);
  color: var(--ink);
  margin-bottom: 4px;
}

.coach-tip {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

.coach-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.chat-pron-result {
  margin-top: 6px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
}

.pron-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.pron-word {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.pron-word small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  opacity: 0.85;
  margin-left: 2px;
}

.pron-word.good {
  color: var(--teal);
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--tealfade);
}

.pron-word.warn {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--amberfade);
}

.pron-word.bad {
  color: var(--red);
  border-color: rgba(244, 63, 94, 0.35);
  background: var(--redfade);
}

.reply-helper-bar {
  border-top: 1px solid var(--line);
  padding: 9px 12px;
  background: var(--bg-soft);
}

.reply-helper-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.reply-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.reply-chips::-webkit-scrollbar {
  display: none;
}

.reply-chip-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  flex-shrink: 0;
  overflow: hidden;
}

.reply-chip {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.reply-chip:hover {
  color: var(--blue-bright);
}

.reply-chip-audio {
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--bluefade);
  color: var(--blue-bright);
  padding: 6px 9px;
  font-size: 11px;
}

/* Native Smartphone Fullscreen Mode */
@media (max-width: 640px) {
  html, body {
    background: var(--bg);
  }

  .shell {
    max-width: 100%;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .topbar {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .topbar-notch,
  .layout-toggle-btn {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .sidebar {
    width: 100%;
  }

  .modal {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
