/* Questions — Glass Blue Ask Desk (violet / indigo grammar) */
:root {
  --qq-night: #020617;
  --qq-glass-2: rgba(91, 33, 182, 0.28);
  --qq-stroke: rgba(196, 181, 253, 0.4);
  --qq-violet: #a78bfa;
  --qq-indigo: #818cf8;
  --qq-ice: #ede9fe;
  --thai: #f9a8d4;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-thai: 'Sarabun', 'Thai', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.qq-page {
  font-family: var(--font-display);
  color: var(--qq-ice);
  background: var(--qq-night);
  position: relative;
  overflow-x: hidden;
  padding: 12px 14px 56px;
}
.qq-ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(167, 139, 250, 0.28), transparent 58%),
    radial-gradient(760px 480px at 95% 8%, rgba(129, 140, 248, 0.2), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(192, 132, 252, 0.12), transparent 60%),
    linear-gradient(180deg, #020617 0%, #1e1b4b 45%, #020617 100%);
}
.wrap { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; }
.qq-glass-card {
  background: linear-gradient(155deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02) 40%, var(--qq-glass-2));
  border: 1px solid var(--qq-stroke);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 18px 50px rgba(2,6,23,0.5), inset 0 1px 0 rgba(255,255,255,0.16);
  border-radius: 22px;
}
.tm-hero-questions {
  margin: 0 0 14px; padding: 16px;
  background: linear-gradient(155deg, rgba(167, 139, 250, 0.22), transparent 42%, rgba(129, 140, 248, 0.14)) !important;
}
.tm-hero-questions .tm-kicker {
  color: var(--qq-violet); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.68rem; margin: 0 0 6px;
}
.tm-hero-questions h1 { margin: 0 0 8px; font-size: clamp(1.55rem, 4.2vw, 2.1rem); font-weight: 800; color: #fff; }
.tm-hero-questions h1 .th {
  display: block; font-family: var(--font-thai); font-size: 0.72em; margin-top: 4px; color: var(--qq-ice);
}
.tm-lead { color: #94a3b8; font-weight: 600; margin: 0 0 6px; }
.qq-streak { margin: 0 0 12px; font-weight: 800; color: var(--qq-violet); font-size: 0.9rem; }
.qq-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qq-daily-cta, .qq-cont-cta {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(167, 139, 250, 0.65);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.55), rgba(67, 56, 202, 0.5));
  color: #fff; border-radius: 16px; padding: 12px 16px;
  font: inherit; font-weight: 800; cursor: pointer; text-align: left;
}
.qq-cont-cta { background: rgba(255,255,255,0.08); border-color: var(--qq-stroke); }
.qq-daily-cta em { display: block; font-style: normal; font-size: 0.8rem; color: #ddd6fe; font-weight: 600; }
.tm-nav a { color: var(--qq-ice); opacity: 0.85; }
.tm-nav a.active { color: var(--qq-violet); opacity: 1; }
.tm-dark-btn {
  border: 1px solid var(--qq-stroke); background: rgba(255,255,255,0.08);
  color: var(--qq-ice); border-radius: 10px; padding: 6px 10px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.qq-audio-unlock {
  width: 100%; margin-bottom: 10px; padding: 10px 12px; border-radius: 14px;
  border: 1px dashed var(--qq-violet); background: rgba(109, 40, 217, 0.2);
  color: #fff; font-weight: 800; font-family: inherit; cursor: pointer;
}
.qq-panel { margin-top: 14px; padding: 14px; }
.qq-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.qq-mode-btn {
  border: 1px solid var(--qq-stroke); background: rgba(255,255,255,0.06);
  color: var(--qq-ice); border-radius: 12px; padding: 8px 10px;
  font-weight: 700; font-size: 0.75rem; cursor: pointer; font-family: inherit;
}
.qq-duo-lab { font-size: 0.78rem; font-weight: 700; color: #94a3b8; display: inline-flex; gap: 6px; align-items: center; }
.qq-sec-title {
  margin: 12px 0 8px; font-size: 0.8rem; font-weight: 800; color: var(--qq-violet);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.qq-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.qq-pack {
  display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px;
  border: 1px solid var(--qq-stroke); background: rgba(15,23,42,0.45);
  cursor: pointer; text-align: left; font-family: inherit; color: inherit;
}
.qq-pack strong { color: #fff; font-size: 0.85rem; }
.qq-pack em { font-style: normal; font-family: var(--font-thai); color: var(--qq-indigo); font-weight: 700; font-size: 0.78rem; }
.qq-stars { font-size: 0.72rem; color: #fbbf24; font-weight: 800; }
.qq-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.qq-chip-label { font-size: 0.7rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; }
.qq-chip, .qq-levels .qq-chip {
  border: 1px solid var(--qq-stroke); background: rgba(255,255,255,0.06); color: var(--qq-ice);
  border-radius: 999px; padding: 5px 10px; font-size: 0.75rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.qq-chip.active {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.55), rgba(67, 56, 202, 0.45));
  border-color: var(--qq-violet); color: #fff;
}
.qq-search {
  width: 100%; margin: 8px 0 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--qq-stroke); background: rgba(15,23,42,0.65); color: var(--qq-ice);
  font: inherit; font-weight: 600;
}
.qq-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.qq-card {
  padding: 12px; border-radius: 16px; border: 1px solid var(--qq-stroke);
  background: rgba(15,23,42,0.45); text-align: left;
}
.qq-card.focused { outline: 2px solid var(--qq-indigo); outline-offset: 1px; }
.qq-card-top { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.qq-pack-tag { font-size: 0.68rem; font-weight: 800; color: var(--qq-violet); text-transform: uppercase; }
.qq-rise { font-size: 0.68rem; font-weight: 700; color: #86efac; }
.qq-en { display: block; color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.qq-th { font-family: var(--font-thai); font-weight: 800; color: var(--thai); font-size: 1.15rem; }
.qq-roman { font-size: 0.8rem; color: #a5b4fc; font-weight: 600; margin-top: 2px; }
.qq-answer { margin-top: 8px; font-family: var(--font-thai); font-weight: 700; color: #c4b5fd; font-size: 0.9rem; }
.qq-isaan { display: block; margin-top: 4px; font-size: 0.78rem; font-weight: 700; color: #5eead4; }
.qq-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qq-card-actions button {
  border: 1px solid var(--qq-stroke); background: rgba(255,255,255,0.08); color: #e2e8f0;
  border-radius: 10px; padding: 6px 8px; font-weight: 700; font-size: 0.72rem; cursor: pointer; font-family: inherit;
}
.qq-meta { margin: 10px 0 0; font-size: 0.78rem; color: #94a3b8; font-weight: 600; }
.qq-bridges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qq-bridges a {
  text-decoration: none; color: var(--qq-ice); font-weight: 700; font-size: 0.82rem;
  border: 1px solid var(--qq-stroke); border-radius: 12px; padding: 8px 12px; background: rgba(255,255,255,0.05);
}
.sc-footer {
  display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; padding: 12px 4px;
  font-size: 0.85rem; color: #94a3b8; border-top: 1px solid rgba(196,181,253,0.2);
}
.sc-footer a { color: var(--qq-violet); font-weight: 700; text-decoration: none; }

.mobile-dock {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, #020617 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 2px solid color-mix(in srgb, #a78bfa 55%, transparent);
}
.mobile-dock button, .mobile-dock a.dock-link {
  min-height: 56px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08); color: #e2e8f0; border-radius: 14px;
  font-weight: 700; font-family: inherit; cursor: pointer; font-size: 0.62rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; text-decoration: none; padding: 4px 2px;
}
.mobile-dock a.dock-link.primary {
  background: color-mix(in srgb, #6d28d9 55%, transparent); border-color: #a78bfa;
}
.dock-ico { font-size: 1.1rem; }
.dock-th { font-family: var(--font-thai); font-size: 0.68rem; }

.sc-menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(2,6,23,0.65); align-items: flex-end; justify-content: center; padding: 12px;
}
.sc-menu-overlay.open { display: flex; }
.sc-menu-sheet {
  width: min(480px, 100%); background: linear-gradient(160deg, #1e1b4b, #020617);
  border: 1px solid var(--qq-stroke); border-radius: 18px; padding: 16px; color: #fff;
}
.sc-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-menu-grid a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--qq-stroke); text-decoration: none; color: inherit; font-weight: 700;
  background: rgba(255,255,255,0.04);
}
.sc-menu-grid a .th { font-family: var(--font-thai); color: #c4b5fd; }
.sc-menu-grid a .en { font-size: 0.75rem; color: #94a3b8; }
.sc-menu-close {
  width: 100%; margin-top: 12px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--qq-stroke); background: rgba(109,40,217,0.35);
  color: #fff; font-weight: 800; cursor: pointer; font-family: inherit;
}

.qq-drill-overlay {
  display: none; position: fixed; inset: 0; z-index: 10060;
  background: rgba(2,6,23,0.72); align-items: center; justify-content: center; padding: 14px;
}
.qq-drill-overlay.open { display: flex; }
.qq-drill-sheet {
  width: min(440px, 100%); max-height: 90vh; overflow: auto;
  background: linear-gradient(160deg, #312e81, #020617);
  border: 1px solid var(--qq-stroke); border-radius: 18px; padding: 14px; color: #f8fafc;
}
.qq-drill-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.qq-drill-x {
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08);
  color: #fff; border-radius: 10px; width: 36px; height: 36px; cursor: pointer;
}
.qq-prog { font-size: 0.8rem; font-weight: 700; color: #c4b5fd; margin-bottom: 8px; }
.qq-prompt { font-size: 1.5rem; text-align: center; margin: 12px 0; font-weight: 800; }
.qq-prompt.th { font-family: var(--font-thai); color: #f9a8d4; font-size: 1.7rem; }
.qq-hint { text-align: center; color: #94a3b8; font-weight: 600; font-size: 0.85rem; }
.qq-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.qq-choice {
  border: 1px solid rgba(196,181,253,0.35); background: rgba(255,255,255,0.06);
  color: #fff; border-radius: 12px; padding: 12px 8px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.qq-choice.correct { background: rgba(34,197,94,0.35); border-color: #4ade80; }
.qq-choice.wrong { background: rgba(239,68,68,0.3); border-color: #f87171; }
.qq-cta {
  display: block; width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px;
  border: 1px solid #a78bfa; background: linear-gradient(135deg, rgba(109,40,217,0.7), rgba(67,56,202,0.5));
  color: #fff; font-weight: 800; cursor: pointer; font-family: inherit; text-align: center; text-decoration: none;
}
.qq-cta.secondary { background: rgba(255,255,255,0.08); }
.qq-input {
  width: 100%; margin-top: 8px; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(196,181,253,0.4); background: rgba(15,23,42,0.7); color: #fff;
  font: inherit; font-weight: 700; text-align: center;
}
.qq-build-out {
  min-height: 2em; margin: 8px 0; padding: 10px; border-radius: 10px;
  border: 1px dashed rgba(196,181,253,0.4); text-align: center;
  font-family: var(--font-thai); font-weight: 800; color: #f9a8d4;
}
.qq-drill-feedback { min-height: 1.2em; margin-top: 8px; font-weight: 700; text-align: center; color: #c4b5fd; }
.qq-flash-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.qq-flash {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px;
  border-radius: 12px; border: 1px solid rgba(196,181,253,0.35); background: rgba(255,255,255,0.06);
  font-family: var(--font-thai); font-weight: 800; font-size: 1.2rem;
}
.qq-flash em { font-style: normal; font-size: 0.72rem; color: #a5b4fc; font-weight: 700; font-family: var(--font-display); }
body.qq-duo .qq-drill-sheet::before {
  content: 'Duo · pass the phone · P1 / P2';
  display: block; text-align: center; font-size: 0.75rem; font-weight: 800; color: #c4b5fd; padding: 4px 0 8px;
}
@media (max-width: 900px) {
  .mobile-dock { display: grid; }
  body.qq-page { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 901px) {
  .mobile-dock { display: none !important; }
}
