:root {
  --bg: #050505;
  --bg-soft: #15120d;
  --panel: rgba(18, 16, 11, 0.9);
  --panel-strong: rgba(8, 7, 5, 0.97);
  --line: rgba(214, 169, 59, 0.22);
  --line-bright: rgba(246, 214, 91, 0.5);
  --text: #f8f7f2;
  --muted: #c9c2b2;
  --gold: #d6a93b;
  --gold-deep: #8f6a18;
  --sea: #f6d65b;
  --danger: #ef6d62;
  --success: #73d49b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  --room-map-bg: linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(26, 26, 26, 0.9));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Raleway", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background-color: var(--bg);
  background:
    radial-gradient(circle at top left, rgba(214, 169, 59, 0.20), transparent 24%),
    radial-gradient(circle at bottom right, rgba(214, 176, 97, 0.14), transparent 22%),
    linear-gradient(180deg, #050505 0%, #202020 38%, #0a0a0a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 20%, transparent 88%);
}

body.menu-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.modal-open-scroll-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.menu-open .menu-shell,
.menu-shell.menu-open {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  z-index: 1000;
  margin: 0;
  padding: 0;
}

body.menu-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(5, 5, 5, 0.96), rgba(28, 26, 20, 0.86)),
    url("https://bluonthehudson.com/wp-content/uploads/2024/07/Blu-On-The-Hudson-Header.png") center/cover;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -15% -40% auto;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(215, 181, 109, 0.2), transparent 66%);
  filter: blur(18px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.hero-copy .eyebrow,
.hero-copy .hero-text {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow,
.stat-label,
.chip,
.micro-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.hero-logo {
  display: block;
  width: clamp(300px, 48vw, 560px);
  height: auto;
  max-width: 92%;
  margin: 0 auto 18px;
}

.eyebrow {
  color: #f6d65b;
  margin-bottom: 12px;
}

h1,
h2,
h3,
.display {
  font-family: "Montserrat", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 6vw, 5.1rem);
  line-height: 0.95;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-text,
.muted,
.card-copy,
.metric-copy,
.detail-copy,
.inline-note {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions,
.toolbar,
.chips,
.option-row,
.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  font: inherit;
}

.primary-btn,
.ghost-btn,
.nav-link,
.menu-toggle,
.profile-pill-button,
.filter-btn,
.choice-btn,
.quiz-answer,
.tiny-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--gold), #f0d191);
  color: #17130c;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(214, 176, 97, 0.24);
}

.ghost-btn,
.nav-link,
.menu-toggle,
.profile-pill-button,
.filter-btn,
.choice-btn,
.quiz-answer,
.tiny-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-link:hover,
.menu-toggle:hover,
.profile-pill-button:hover,
.filter-btn:hover,
.choice-btn:hover,
.quiz-answer:hover,
.tiny-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
}

.menu-shell {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin: 18px 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: start;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-color: rgba(214, 176, 97, 0.24);
  background: rgba(18, 16, 11, 0.9);
  backdrop-filter: blur(12px);
  color: #fff6dd;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.profile-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: min(54vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 12px 18px;
  border-color: rgba(246, 214, 91, 0.28);
  background: rgba(18, 16, 11, 0.9);
  color: #fff6dd;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.profile-pill-button.logged-in {
  border-color: rgba(214, 176, 97, 0.38);
  color: #fff6dd;
}

.hamburger-lines {
  display: inline-grid;
  gap: 4px;
}

.hamburger-lines span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.top-nav {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: min(760px, 100%);
  max-height: min(72dvh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 7, 5, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-overflow-scrolling: touch;
  z-index: 1001;
  scrollbar-width: none;
}

.top-nav.open {
  display: grid;
  position: relative;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav .nav-link {
  width: 100%;
  justify-content: center;
}

#app input[type="search"],
#app .quick-search-form,
#app .section-head,
.global-search-shell {
  scroll-margin-top: 112px;
}

.global-search-shell {
  margin: -8px 0 22px;
  padding: 10px;
  border: 1px solid rgba(214, 169, 59, 0.18);
  border-radius: 20px;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(12px);
}

.global-quick-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.global-quick-search-form input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border-radius: 999px;
}

.global-quick-search-btn {
  min-width: 54px;
  min-height: 48px;
  font-weight: 900;
}

.marquee-strip {
  display: flex;
  gap: 22px;
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(214, 176, 97, 0.2);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(214, 169, 59, 0.18), rgba(246, 214, 91, 0.10));
  color: #f8deb0;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marquee-strip span::after {
  content: "•";
  margin-left: 22px;
  color: rgba(255, 255, 255, 0.4);
}

.nav-link.active,
.filter-btn.active {
  background: rgba(215, 181, 109, 0.16);
  border-color: rgba(215, 181, 109, 0.42);
  color: #fff6dd;
}

.jari-main-nav {
  order: -1;
  border-color: rgba(246, 214, 91, 0.32);
  color: #fff6dd;
}

.jari-main-nav.logged-in-feature {
  background: linear-gradient(135deg, rgba(246, 214, 91, 0.20), rgba(214, 169, 59, 0.26));
  border-color: rgba(215, 181, 109, 0.62);
  color: #fff8df;
  box-shadow: 0 0 0 1px rgba(255, 246, 221, 0.08), 0 14px 34px rgba(0, 0, 0, 0.36);
  font-weight: 800;
}

.jari-main-nav.logged-in-feature::after {
  content: "Coach";
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8deb0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panels,
.grid,
.three-up,
.two-up,
.dashboard-grid,
.cards-grid,
.pairing-grid,
.memory-grid,
.profile-grid,
.progress-stat-grid {
  display: grid;
  gap: 18px;
}

.hero-panels {
  grid-template-columns: 1fr;
  align-content: start;
}

.dashboard-grid {
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.guide-grid,
.steak-guide-hero {
  display: grid;
  gap: 18px;
}

.guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.steak-guide-hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
  align-items: start;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.three-up {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.two-up {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.pairing-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.profile-grid,
.progress-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.memory-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.stat-card,
.card,
.training-block,
.quiz-shell,
.game-shell,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel,
.card,
.training-block,
.quiz-shell,
.game-shell,
.modal-card {
  padding: 22px;
}

.stat-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(14, 12, 8, 0.92), rgba(42, 34, 19, 0.78));
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  margin: 8px 0 4px;
}

.stat-card.accent {
  background: linear-gradient(135deg, rgba(215, 181, 109, 0.16), rgba(121, 201, 207, 0.12));
}

.about-page {
  display: grid;
  gap: 22px;
}

.about-stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.about-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.clean-home {
  min-height: clamp(260px, 38vh, 520px);
  display: grid;
  place-items: center;
}

.clean-home-card {
  width: min(760px, 100%);
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 12, 8, 0.92), rgba(42, 34, 19, 0.72));
  box-shadow: var(--shadow);
  text-align: center;
}

.tenant-home .clean-home-card {
  background:
    radial-gradient(circle at top left, var(--line-bright), transparent 38%),
    linear-gradient(180deg, rgba(14, 12, 8, 0.92), rgba(42, 34, 19, 0.72));
}

.tenant-entry-home {
  min-height: clamp(320px, 42vh, 560px);
  margin-bottom: 18px;
}

.tenant-entry-card {
  max-width: 760px;
}

.tenant-entry-actions {
  align-items: center;
}

.tenant-room-map {
  background: var(--room-map-bg);
}

.tenant-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  margin-top: 22px;
  text-align: left;
}

.tenant-home-tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 13px 14px;
  cursor: pointer;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tenant-home-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  background: rgba(255, 255, 255, 0.075);
}

.tenant-home-tile strong {
  font-family: "Raleway", sans-serif;
  font-size: 0.96rem;
}

.tenant-home-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tenant-home-tile.is-primary {
  border-color: var(--line-bright);
  background: linear-gradient(145deg, var(--line), rgba(255, 255, 255, 0.055));
}

.tenant-template-note {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 0.9rem;
}

.clean-home-actions,
.account-toolbar {
  justify-content: center;
  margin-top: 18px;
}

.account-modal-shell {
  display: grid;
  gap: 14px;
}

.compact-account-stats {
  justify-content: flex-start;
}


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

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.kicker {
  color: var(--sea);
  margin: 0 0 8px;
}

.card {
  position: relative;
  overflow: hidden;
}

.spotlight-card,
.cabinet-tease,
.arcade-cabinet,
.flight-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 9, 6, 0.96), rgba(34, 27, 15, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spotlight-card {
  position: relative;
}

.spotlight-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.spotlight-copy {
  padding: 18px;
}

.card-media {
  width: calc(100% + 44px);
  height: 220px;
  object-fit: cover;
  display: block;
  margin: -22px -22px 18px;
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
}

.image-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: #f2dba4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background:
    linear-gradient(180deg, rgba(12, 10, 7, 0.98), rgba(30, 24, 14, 0.92)),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 2px, transparent 2px, transparent 4px);
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
}

.image-placeholder span {
  padding: 10px 16px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  border-radius: 999px;
  background: rgba(214, 176, 97, 0.08);
}

.card-media.image-placeholder {
  width: calc(100% + 44px);
  height: 220px;
  margin: -22px -22px 18px;
}

.spotlight-image.image-placeholder {
  width: 100%;
  height: 240px;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -50px -50px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121, 201, 207, 0.16), transparent 68%);
}

.cabinet-tease {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.cabinet-tease-screen {
  min-height: 180px;
  padding: 18px;
  border-radius: 18px;
  border: 2px solid rgba(214, 176, 97, 0.22);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 2px, transparent 2px, transparent 4px),
    radial-gradient(circle at top, rgba(214, 169, 59, 0.18), transparent 44%),
    #15120d;
}

.card h3,
.training-block h3,
.quiz-shell h3,
.game-shell h3 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(214, 176, 97, 0.12);
  color: #f5d38f;
}

.chips {
  margin: 14px 0;
}

.micro-list,
.detail-list,
.plain-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.micro-list li,
.detail-list li,
.plain-list li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.micro-list li:first-child,
.detail-list li:first-child,
.plain-list li:first-child {
  border-top: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
}

.steak-guide-hero-main,
.steak-guide-sidekick,
.steak-playbook {
  background:
    radial-gradient(circle at top left, rgba(215, 181, 109, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(12, 10, 7, 0.95), rgba(8, 7, 5, 0.94));
}

.guide-bullet-grid,
.guide-cut-stack,
.guide-supplier-stack,
.guide-mini-stack,
.guide-quote-stack {
  display: grid;
  gap: 16px;
}

.guide-bullet-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

.guide-bullet-grid strong,
.guide-cut-row strong,
.guide-mini-row strong {
  color: #fff5da;
}

.guide-supplier-row,
.guide-cut-row {
  display: grid;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(214, 176, 97, 0.12);
}

.guide-supplier-row:first-child,
.guide-cut-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.guide-supplier-row {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.guide-cut-row {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.guide-cut-head h3,
.guide-supplier-row h3 {
  margin-top: 10px;
}

.guide-cut-body,
.plain-copy,
.guide-mini-row {
  display: grid;
  gap: 8px;
}

.guide-mini-row {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(214, 176, 97, 0.08);
}

.guide-mini-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-quote-stack blockquote {
  margin: 0;
  padding: 16px 18px;
  border-left: 3px solid rgba(215, 181, 109, 0.65);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: #f0eee7;
}

.source-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-modal-shell .cards-grid {
  margin-top: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input[type="search"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.study-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.study-card-title h3 {
  font-size: 1.55rem;
  line-height: 1.08;
}

.study-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.allergy-card {
  border-color: rgba(214, 176, 97, 0.22);
}

.allergy-stack + .allergy-stack {
  margin-top: 10px;
}

.allergy-group-title {
  margin: 0;
  color: #f0d39a;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inline-note {
  font-size: 0.95rem;
}

.alert {
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

.quiz-stage,
.game-stage {
  min-height: 260px;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.quiz-kicker,
.quiz-subtext,
.wine-choice-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.quiz-kicker,
.wine-choice-kicker {
  color: #f1d28e;
}

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

.quiz-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quiz-answer {
  min-height: 138px;
  border-radius: 24px;
  padding: 20px;
  text-align: left;
  display: flex;
  align-items: end;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    radial-gradient(circle at top right, rgba(214, 176, 97, 0.12), transparent 34%);
}

.quiz-answer::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.quiz-answer-label {
  position: relative;
  z-index: 1;
  font-weight: 700;
  line-height: 1.4;
  max-width: 28ch;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--gold));
}

.danger-fill {
  background: linear-gradient(90deg, var(--gold), var(--danger));
}

.arcade-banner {
  padding: 24px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(20, 16, 9, 0.95), rgba(10, 8, 5, 0.92)),
    radial-gradient(circle at top right, rgba(214, 176, 97, 0.18), transparent 35%);
  box-shadow: var(--shadow);
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.game-jump-bar,
.script-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jump-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #f6dfac;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.jump-chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  background: rgba(214, 176, 97, 0.12);
}

.arcade-cabinet {
  padding: 18px;
  position: relative;
}

.arcade-cabinet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(214, 176, 97, 0.12);
  pointer-events: none;
}

.cabinet-header,
.arcade-hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.arcade-hud {
  flex-wrap: wrap;
  margin-top: 12px;
}

.hud-pill {
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background: rgba(0, 0, 0, 0.18);
}

.hud-pill span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.hud-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.cabinet-screen {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid rgba(214, 176, 97, 0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 2px, transparent 2px, transparent 5px),
    #050505;
}

.wine-screen {
  grid-template-columns: 1fr;
}

.cabinet-art {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
}

.cabinet-copy h3 {
  margin-bottom: 8px;
}

.clue-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.game-clue-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.game-clue-pill {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(214, 176, 97, 0.13);
  border: 1px solid rgba(214, 176, 97, 0.18);
  color: #f8e4b5;
  line-height: 1.42;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.game-clue-pill strong {
  color: #fff3cf;
  font-weight: 600;
}

.question-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.question-detail {
  width: 100%;
  box-sizing: border-box;
  padding: 18px 20px;
  border-radius: 14px;
  height: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line-bright);
  text-align: left;
}

.question-detail-label {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.question-detail-value {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

.kitchen-lane {
  display: grid;
  gap: 16px;
}

.jar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jar {
  min-width: 120px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: var(--text);
  text-align: center;
}

.jar.good {
  border-color: rgba(115, 212, 155, 0.54);
}

.jar.bad {
  border-color: rgba(239, 109, 98, 0.6);
}

.chef-box,
.somm-box {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.meter {
  width: 160px;
}

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

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wine-choice {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
  position: relative;
  overflow: hidden;
}

.wine-choice::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.wine-choice:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
}

.wine-choice.selected {
  border-color: rgba(115, 212, 155, 0.52);
  background: linear-gradient(180deg, rgba(115, 212, 155, 0.16), rgba(255,255,255,0.03));
  box-shadow: 0 0 0 1px rgba(115, 212, 155, 0.14) inset;
}

.wine-choice img {
  width: 100%;
  height: 116px;
  object-fit: contain;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.02));
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(214, 176, 97, 0.12);
}

.wine-choice span {
  color: var(--muted);
  font-size: 0.9rem;
}

.wine-choice strong {
  line-height: 1.35;
}

.game-status-note {
  min-height: 3.2em;
}

.memory-card {
  min-height: 84px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.arcade-memory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.memory-label,
.memory-back {
  display: block;
  line-height: 1.28;
}

.memory-face {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.memory-kicker {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(214, 176, 97, 0.12);
  color: #f3d699;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.memory-back {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f3d699;
  font-size: 0.98rem;
  text-align: center;
}

.memory-label {
  font-size: 0.9rem;
  font-weight: 700;
  flex: 1 1 auto;
}

.memory-card.revealed,
.memory-card.matched {
  background: rgba(121, 201, 207, 0.1);
}

.memory-card.matched {
  border-color: rgba(115, 212, 155, 0.5);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 20px;
  z-index: 1000;
}

.modal-card {
  width: min(880px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--panel-strong);
}

.modal-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-close {
  float: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(215, 181, 109, 0.12);
  color: #f6dfac;
  margin-right: 8px;
  margin-bottom: 8px;
}

.pill-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.allergy-pill.locked {
  background: rgba(239, 109, 98, 0.14);
  color: #ffd4cc;
  border: 1px solid rgba(239, 109, 98, 0.28);
}

.allergy-pill.removable {
  background: rgba(115, 212, 155, 0.14);
  color: #d7f5e4;
  border: 1px solid rgba(115, 212, 155, 0.24);
}

.allergy-pill.soft {
  color: var(--muted);
}

.wine-card-media {
  width: calc(100% + 44px);
  height: 220px;
  object-fit: contain;
  background:
    radial-gradient(circle at top, rgba(214, 176, 97, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  display: block;
  margin: -22px -22px 18px;
  padding: 28px;
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
}

.spirit-logo-media {
  padding: 34px;
  background:
    radial-gradient(circle at top, rgba(214, 176, 97, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
}

.spirit-bottle-media {
  padding: 18px;
  object-fit: contain;
}

.spirit-visual-card {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(214, 176, 97, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(14, 11, 7, 0.98), rgba(8, 7, 5, 0.98));
}

.spirit-visual-inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(214, 176, 97, 0.14);
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 2px, transparent 2px, transparent 5px);
}

.spirit-visual-kicker,
.spirit-visual-origin {
  color: #f2dba4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.spirit-visual-mark {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: 0.12em;
  color: #fff5da;
}

.spirit-visual-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

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

.admin-storage-grid {
  align-items: stretch;
}

.admin-storage-card {
  overflow: hidden;
}

.storage-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.storage-stat-grid span {
  display: grid;
  gap: 2px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(214, 176, 97, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.storage-stat-grid strong {
  color: var(--text);
  font-size: 1.45rem;
}

.file-label {
  cursor: pointer;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(214, 176, 97, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.admin-form textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(214, 176, 97, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-row.compact {
  padding: 10px 12px;
}

.admin-row span,
.admin-row p {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.admin-row.urgent-row,
.admin-alert {
  border-color: rgba(255, 112, 112, 0.45);
  box-shadow: 0 18px 45px rgba(255, 112, 112, 0.08);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.check-row input {
  width: auto;
}

.script-player {
  display: grid;
  gap: 10px;
}

.script-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.script-control-grid > button {
  width: 100%;
  justify-content: center;
}

.now-playing-box {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.now-playing-box strong {
  font-size: 1rem;
  line-height: 1.35;
}

.playlist-list {
  display: grid;
  gap: 12px;
}

.playlist-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.playlist-main {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.playlist-main span {
  color: var(--muted);
  font-size: 0.92rem;
}

.playlist-row .toolbar {
  justify-content: flex-end;
}

.playlist-row .toolbar .tiny-btn {
  min-width: 78px;
}

.script-mini-player {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 85;
  display: none;
  align-items: center;
  gap: 14px;
  max-width: min(520px, calc(100vw - 112px));
  padding: 12px 14px;
  border: 1px solid rgba(214, 176, 97, 0.28);
  border-radius: 22px;
  background: rgba(10, 8, 5, 0.84);
  color: var(--text);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.script-mini-player.visible {
  display: flex;
}

.script-mini-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.script-mini-copy span {
  color: #f2dba4;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.script-mini-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.script-mini-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.mini-control {
  border: 1px solid rgba(214, 176, 97, 0.2);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.jingle-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(214, 176, 97, 0.28);
  border-radius: 50%;
  display: none;
  place-items: center;
  background: rgba(10, 8, 5, 0.58);
  color: #f7e6b7;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  z-index: 80;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
  opacity: 0.84;
}

.jingle-toggle:hover {
  transform: translateY(-2px);
  opacity: 1;
  border-color: rgba(214, 176, 97, 0.48);
}

.jingle-toggle.is-playing {
  background: rgba(214, 176, 97, 0.16);
}

.jingle-toggle.is-blocked {
  border-color: rgba(239, 109, 98, 0.42);
}

.jingle-icon {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.back-to-top {
  position: fixed;
  right: 98px;
  bottom: 22px;
  min-width: 74px;
  height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(246, 214, 91, 0.36);
  border-radius: 999px;
  display: grid;
  grid-template-columns: auto auto;
  place-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(80, 57, 18, 0.70), rgba(10, 8, 5, 0.72));
  color: #fff4d0;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), 0 0 24px rgba(246, 214, 91, 0.16);
  cursor: pointer;
  z-index: 82;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}

.back-to-top.visible {
  opacity: 0.92;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(246, 214, 91, 0.62);
  background: linear-gradient(135deg, rgba(103, 75, 25, 0.82), rgba(10, 8, 5, 0.76));
}

.back-to-top span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(214, 169, 59, 0.18);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  line-height: 1;
}

.back-to-top strong {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-media {
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
}

.small-text {
  font-size: 0.94rem;
}

.pairing-rationale {
  color: #d8c28a;
  line-height: 1.6;
  font-size: 0.94rem;
}

.pairing-media {
  background: #0b0906;
}

.food-media-rotate {
  object-fit: contain;
  transform: rotate(90deg) scale(0.84);
  transform-origin: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.food-media-doc {
  object-fit: contain;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    radial-gradient(circle at top, rgba(214, 176, 97, 0.12), transparent 44%);
  padding: 12px;
}

.profile-gate {
  display: grid;
  place-items: center;
  min-height: 60vh;
}

.profile-shell {
  width: min(1080px, 100%);
  display: grid;
  gap: 22px;
}

.profile-hero {
  padding: 28px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 11, 7, 0.96), rgba(36, 28, 16, 0.88));
  box-shadow: var(--shadow);
}

.profile-form {
  display: grid;
  gap: 14px;
}

.profile-form input,
.profile-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
  font-size: 16px;
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-card {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.profile-card span,
.profile-card small {
  color: var(--muted);
}

.profile-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(214, 176, 97, 0.16);
  border-radius: 18px;
  background: rgba(12, 10, 7, 0.84);
}

.profile-banner strong {
  display: block;
  font-size: 1.1rem;
}

.profile-banner span {
  color: var(--muted);
}

.profile-banner-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-banner-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 280px) auto;
  gap: 10px;
  align-items: center;
}

.quick-search-form input[type="search"] {
  padding: 12px 14px;
  border-radius: 14px;
}

.quick-search-btn {
  min-width: 48px;
  font-weight: 800;
  font-size: 1rem;
}

.search-modal-shell {
  display: grid;
  gap: 14px;
}

.search-preview-card {
  max-width: 520px;
}

.profile-data-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.profile-data-card.full-span {
  grid-column: 1 / -1;
}

.profile-stat-list,
.profile-score-list {
  display: grid;
  gap: 10px;
}

.profile-stat-list span,
.profile-score-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-stat-list strong,
.profile-score-list em {
  color: #fff6dd;
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 800;
}

.profile-stat-list small {
  color: var(--muted);
}

.item-search-form {
  max-width: 860px;
  margin: 0 0 18px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-results-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.search-result-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.search-result-card .tiny-btn {
  justify-self: start;
}

@media (max-width: 980px) {
  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .steak-guide-hero,
  .guide-supplier-row,
  .guide-cut-row {
    grid-template-columns: 1fr;
  }

  .cabinet-screen,
  .quiz-answer-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head,
  .profile-banner {
    align-items: flex-start;
  }

  .section-head {
    flex-direction: column;
  }

  .profile-banner-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .quick-search-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .script-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1320px);
    padding: 16px 0 88px;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 3.7rem);
  }

  .hero-logo {
    width: min(92%, 390px);
    margin-bottom: 14px;
  }

  .menu-shell {
    top: 8px;
    margin-bottom: 20px;
  }

  .menu-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .profile-pill-button {
    width: 100%;
    max-width: none;
  }

  .menu-toggle {
    justify-content: center;
  }

  .top-nav {
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
    width: 100%;
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
  }

  .nav-link {
    white-space: nowrap;
    padding: 12px 14px;
  }

  .hero-actions,
  .profile-banner-tools,
  .toolbar,
  .chips,
  .option-row,
  .nav-row {
    gap: 10px;
  }

  .hero-actions .primary-btn,
  .hero-actions .ghost-btn {
    width: 100%;
    justify-content: center;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 10px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 18px;
    border-radius: 22px;
  }

  .modal-card .toolbar,
  .modal-action-row {
    justify-content: stretch;
  }

  .modal-card .toolbar .primary-btn,
  .modal-card .toolbar .tiny-btn,
  .modal-action-row .tiny-btn {
    flex: 1 1 auto;
    justify-content: center;
  }


  .hero,
  .panel,
  .card,
  .training-block,
  .quiz-shell,
  .game-shell {
    padding: 18px;
    border-radius: 20px;
  }

  .hero {
    gap: 18px;
  }

  .hero-text,
  .card-copy,
  .detail-copy,
  .inline-note,
  .muted {
    line-height: 1.55;
  }

  .hero-panels,
  .cards-grid,
  .spotlight-grid,
  .three-up,
  .two-up,
  .pairing-grid,
  .cabinet-grid,
  .profile-grid,
  .progress-stat-grid,
  .guide-grid,
  .admin-grid,
  .storage-stat-grid,
  .steak-guide-hero {
    grid-template-columns: 1fr;
  }

  .cabinet-grid {
    gap: 16px;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .section-title {
    font-size: clamp(1.6rem, 8vw, 2.3rem);
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: 1fr 1fr;
  }

  .arcade-memory {
    grid-template-columns: 1fr;
  }

  .playlist-row {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .playlist-row .toolbar {
    justify-content: stretch;
  }

  .playlist-row .toolbar .tiny-btn {
    flex: 1 1 calc(33.333% - 8px);
  }

  .quick-search-form {
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .quick-search-form input[type="search"] {
    min-width: 0;
  }

  .profile-banner {
    padding: 16px;
    gap: 12px;
  }

  .profile-banner > div {
    width: 100%;
  }

  .profile-banner-stats {
    gap: 8px;
  }

  .profile-banner .pill {
    margin-right: 0;
  }

  .profile-banner-tools .toolbar {
    width: 100%;
  }

  .profile-banner-tools .toolbar .tiny-btn {
    flex: 1 1 auto;
  }

  .quiz-answer,
  .wine-choice,
  .memory-card,
  .jar {
    border-radius: 18px;
  }

  .quiz-answer {
    min-height: 116px;
    padding: 16px;
  }

  .quiz-answer-label,
  .wine-choice strong {
    font-size: 0.96rem;
  }

  .wine-choice {
    padding: 14px;
    gap: 8px;
  }

  .wine-choice img {
    height: 96px;
    padding: 10px;
  }

  .wine-choice span {
    font-size: 0.84rem;
  }

  .cabinet-screen,
  .chef-box,
  .somm-box {
    padding: 14px;
  }

  .cabinet-screen {
    gap: 14px;
  }

  .cabinet-art,
  .spotlight-image,
  .card-media,
  .wine-card-media {
    height: 200px;
  }

  .jar-row,
  .game-jump-bar,
  .script-meta-row {
    gap: 8px;
  }

  .jar {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .script-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .script-control-grid .primary-btn,
  .script-control-grid .ghost-btn,
  .script-control-grid .tiny-btn {
    min-height: 48px;
  }

  .jump-chip {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .game-jump-shell {
    overflow: hidden;
  }

  .game-jump-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .game-jump-bar::-webkit-scrollbar {
    display: none;
  }

  .memory-card {
    min-height: 78px;
  }

  .memory-label {
    font-size: 0.8rem;
  }

  .memory-face {
    gap: 10px;
  }

  .memory-kicker {
    min-width: 40px;
    font-size: 0.58rem;
  }

  .study-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .script-mini-player {
    left: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
    width: calc(100vw - 24px);
    justify-content: space-between;
    border-radius: 18px;
  }

  .jingle-toggle {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }

  .back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(86px + env(safe-area-inset-bottom));
    min-width: 58px;
    width: 58px;
    height: 58px;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .back-to-top strong {
    display: none;
  }
}


.server-signals-cabinet {
  border-color: rgba(121, 201, 207, 0.22);
}

.signal-screen {
  border-color: rgba(121, 201, 207, 0.24);
}

.signal-mod-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.signal-mod-pill {
  background: rgba(121, 201, 207, 0.1);
  color: #d9fbff;
  border: 1px solid rgba(121, 201, 207, 0.18);
}

.signal-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.signal-button {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 18px 14px;
  border-radius: 24px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.signal-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--line-bright);
}

.signal-button:disabled {
  cursor: not-allowed;
  opacity: 0.74;
}

.signal-button.selected {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 16px 36px rgba(0,0,0,0.18);
}

.signal-emoji {
  font-size: 2rem;
  line-height: 1;
}

.signal-button span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
}

.signal-gf.selected {
  border-color: rgba(115, 212, 155, 0.64);
  background: linear-gradient(180deg, rgba(115, 212, 155, 0.18), rgba(255,255,255,0.03));
}

.signal-vegetarian.selected {
  border-color: rgba(246, 223, 172, 0.68);
  background: linear-gradient(180deg, rgba(246, 223, 172, 0.18), rgba(255,255,255,0.03));
}

.signal-vegan.selected {
  border-color: rgba(239, 109, 98, 0.68);
  background: linear-gradient(180deg, rgba(239, 109, 98, 0.18), rgba(255,255,255,0.03));
}

.signal-dairyFree.selected {
  border-color: rgba(246, 214, 91, 0.62);
  background: linear-gradient(180deg, rgba(246, 214, 91, 0.18), rgba(255,255,255,0.03));
}

.signal-feedback {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(121, 201, 207, 0.18);
  background: rgba(121, 201, 207, 0.08);
}

.signal-feedback p {
  margin: 0;
  color: var(--muted);
}

.server-signals-promo {
  border-color: rgba(121, 201, 207, 0.22);
}

@media (max-width: 760px) {
  .signal-button-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   JARI AI SIMULATOR CHAT & COACH LAYOUT
   ========================================================================== */
.jari-chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

@media (min-width: 900px) {
  .jari-chat-layout {
    grid-template-columns: 1fr 340px;
  }
  .jari-chat-layout.collapsed-layout {
    grid-template-columns: 1fr;
  }
}

.chat-panel {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  background:
    linear-gradient(180deg, rgba(20, 16, 9, 0.95), rgba(10, 8, 5, 0.92)),
    radial-gradient(circle at top right, rgba(214, 176, 97, 0.1), transparent 45%);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 560px;
}

.chat-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
  background: rgba(0,0,0,0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-window {
  flex: 1 1 auto;
  padding: 20px;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 22px;
  line-height: 1.45;
  font-size: 0.96rem;
  position: relative;
}

.chat-bubble.jari {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-left-radius: 4px;
}

.chat-bubble.staff {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(214, 176, 97, 0.22), rgba(214, 176, 97, 0.1));
  color: #fff5da;
  border: 1px solid rgba(214, 176, 97, 0.28);
  border-top-right-radius: 4px;
}

.chat-input-bar {
  padding: 16px 20px;
  border-top: 1px solid rgba(214, 176, 97, 0.14);
  background: rgba(0,0,0,0.18);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-bar input,
.chat-input-bar textarea {
  flex: 1 1 auto;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(214, 176, 97, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  touch-action: manipulation;
  pointer-events: auto;
}

.chat-input-bar input:focus,
.chat-input-bar textarea:focus {
  outline: none;
  border-color: rgba(214, 176, 97, 0.5);
  box-shadow: 0 0 0 1px rgba(214, 176, 97, 0.2);
}

.coach-panel {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(214, 176, 97, 0.14);
  background: rgba(14, 11, 7, 0.98);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 250ms ease;
  min-height: 560px;
}

.coach-panel.collapsed {
  display: none !important;
}

.coach-panel h3 {
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(214, 176, 97, 0.14);
  padding-bottom: 8px;
  margin-bottom: 16px;
  color: #f6dfac;
}

.coach-feed {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
}

.coach-alert {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.coach-alert.danger {
  background: rgba(239, 109, 98, 0.14);
  color: #ffd4cc;
  border-color: rgba(239, 109, 98, 0.28);
}

.coach-alert.success {
  background: rgba(115, 212, 155, 0.14);
  color: #d7f5e4;
  border-color: rgba(115, 212, 155, 0.24);
}

.coach-alert.info {
  background: rgba(121, 201, 207, 0.1);
  color: #d9fbff;
  border-color: rgba(121, 201, 207, 0.18);
}

.coach-alert.warning {
  background: rgba(246, 223, 172, 0.12);
  color: #ffecd1;
  border-color: rgba(246, 223, 172, 0.22);
}

/* SCORECARD LAYOUT */
.scorecard-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 22px;
}

.scorecard-header-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(214, 176, 97, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 16, 9, 0.95), rgba(10, 8, 5, 0.92)),
    radial-gradient(circle at top right, rgba(214, 176, 97, 0.18), transparent 35%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 600px) {
  .scorecard-header-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

.scorecard-gauge {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 6px solid rgba(214, 176, 97, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.22);
}

.scorecard-gauge.failing {
  border-color: rgba(239, 109, 98, 0.64);
}

.scorecard-gauge.passing {
  border-color: rgba(115, 212, 155, 0.64);
}

.scorecard-gauge strong {
  font-size: 2.1rem;
  font-family: "Montserrat", sans-serif;
  line-height: 1;
}

.scorecard-gauge span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.scorecard-summary-box p {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-top: 6px;
}

.scorecard-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.scorecard-category-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.scorecard-category-card.failed-cat {
  border-color: rgba(239, 109, 98, 0.35);
  background: linear-gradient(180deg, rgba(239, 109, 98, 0.04), rgba(255,255,255,0.01));
}

.scorecard-category-card.passed-cat {
  border-color: rgba(115, 212, 155, 0.24);
  background: linear-gradient(180deg, rgba(115, 212, 155, 0.04), rgba(255,255,255,0.01));
}

.scorecard-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.scorecard-cat-header h4 {
  font-size: 0.95rem;
  margin: 0;
}

.scorecard-cat-header strong {
  font-size: 1.25rem;
}

.scorecard-actions-list {
  margin-top: 10px;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--muted);
}

.scorecard-actions-list li {
  margin-bottom: 6px;
}

/* Adam's Tasting Mode Selection styles */
.vertical-modes {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  grid-template-columns: none !important;
}

.somm-mode-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(214, 176, 97, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  box-sizing: border-box;
}

.somm-mode-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

.somm-mode-btn strong {
  display: block;
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 3px;
}

.somm-mode-btn span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.game-page-promo,
.pairing-method-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}

.game-page-promo h3,
.pairing-method-note h3 {
  margin: 4px 0 6px;
}

@media (max-width: 720px) {
  .game-page-promo,
  .pairing-method-note {
    align-items: stretch;
    flex-direction: column;
  }
}
.jari-loading-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(246, 223, 172, 0.35);
  border-top-color: #f6dfac;
  display: inline-block;
  flex: 0 0 auto;
  animation: jari-spin 0.75s linear infinite;
}

.jari-composer {
  align-items: stretch;
  flex-wrap: wrap;
}

.jari-composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  line-height: 1.45;
  font: inherit;
}

.jari-composer-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.jari-composer-actions .primary-btn {
  min-width: 104px;
  padding: 13px 20px;
  border-radius: 14px;
}

.jari-icon-btn,
.jari-stop-btn {
  min-height: 46px;
  border: 1px solid rgba(214, 176, 97, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.jari-icon-btn {
  width: 48px;
  padding: 0;
  font-size: 1.2rem;
}

.jari-stop-btn {
  padding: 0 16px;
  border-color: rgba(239, 105, 105, 0.55);
  background: rgba(170, 36, 36, 0.18);
  color: #ffd8d8;
  animation: jari-recording-pulse 1.25s ease-in-out infinite;
}

.jari-icon-btn:hover,
.jari-stop-btn:hover {
  border-color: var(--line-bright);
  transform: translateY(-1px);
}

.jari-icon-btn:disabled,
.jari-stop-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.jari-voice-status {
  width: 100%;
  min-height: 1.1em;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.jari-continue-btn {
  min-width: 190px;
}

@keyframes jari-recording-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 105, 105, 0.12); }
  50% { box-shadow: 0 0 0 6px rgba(239, 105, 105, 0.08); }
}

.jari-grading-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid rgba(214, 176, 97, 0.38);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(214, 176, 97, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.jari-grading-status strong {
  color: #f6dfac;
}

.jari-grading-status p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.scorecard-cap-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid #e4a85a;
  border-radius: 8px;
  background: rgba(228, 168, 90, 0.1);
}

.scorecard-cap-box ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.scorecard-evidence {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
}

.scorecard-evidence ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.72);
}

@keyframes jari-spin {
  to { transform: rotate(360deg); }
}

.flashcard-hub-grid,
.flash-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.flashcard-category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.flashcard-category-card strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem;
}

.flash-card-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0;
}

.flashcard-set-nav {
  margin: 18px 0;
}

.flash-card {
  min-height: 430px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  perspective: 1200px;
  text-align: left;
}

.flash-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.flash-card-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: 430px;
  transform-style: preserve-3d;
  transition: transform 420ms ease;
}

.flash-card.is-flipped .flash-card-inner {
  transform: rotateY(180deg);
}

.flash-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-dark-bg);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flash-card-front-copy,
.flash-card-back {
  gap: 12px;
  padding: 20px;
}

.flash-card-front-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.flash-card-front-copy strong,
.flash-card-back > strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
}

.flash-card-front-copy .muted,
.flash-card-back > .muted {
  margin-top: auto;
}

.flash-card-back {
  transform: rotateY(180deg);
  overflow-y: auto;
}

.flash-card-image {
  display: block;
  width: 100%;
  height: 245px;
  flex: 0 0 245px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.flash-card-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flash-card-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.flash-card-back p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .flashcard-hub-grid,
  .flash-card-grid {
    grid-template-columns: 1fr;
  }

  .flash-card-shortcut {
    align-items: stretch;
    flex-direction: column;
  }

  .flash-card,
  .flash-card-inner {
    min-height: 400px;
  }

  .flash-card-image {
    height: 220px;
    flex-basis: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-card-inner {
    transition: none;
  }
}

.mastered-btn {
  background: var(--btn-bg) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.mastered-btn.mastered-active {
  background: rgba(14, 11, 7, 0.9) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}\n
.menu-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--gold);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  z-index: 1002;
  transition: transform 180ms ease, color 180ms ease;
}

.menu-close-btn:hover {
  transform: scale(1.15);
  color: var(--text);
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--muted);
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 180ms ease, color 180ms ease;
}

.modal-close-x:hover {
  background: var(--bg-soft);
  color: var(--gold);
}

/* ── In-card script player ────────────────────────────────── */
.modal-script-controls {
  margin-top: 14px;
}

.modal-player-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gold);
  animation: fadeInUp 0.22s ease;
}

.modal-player-status {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 600;
}

.modal-player-title {
  font-size: 0.97rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

.modal-player-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-player-btn {
  min-width: 80px;
}

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

.flash-card-deck { width:min(100%,620px); margin:22px auto 0; }
.flash-card-deck > .flash-card { display:block; width:100%; }
.flashcard-food-categories { display:flex; gap:10px; margin:18px 0 4px; padding:2px 0 8px; overflow-x:auto; scrollbar-width:thin; }
.flashcard-food-categories .filter-btn { flex:0 0 auto; }
.flashcard-food-categories .filter-btn span { margin-left:5px; opacity:.72; }
.flash-card-progress { display:flex; justify-content:space-between; gap:16px; margin-bottom:12px; }
.flash-card-controls { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.flash-card-controls button:disabled { opacity:.45; cursor:not-allowed; }
