:root { color-scheme: dark; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #07151b;
  color: #edf9f6;
  font-family: system-ui, sans-serif;
  line-height: 1.45;
}
a { color: #95f5cf; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select { min-height: 48px; border-radius: 10px; }
button {
  border: 1px solid #42626b;
  background: #203b45;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
input, select, textarea {
  border: 1px solid #42626b;
  background: #0c1d24;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  width: 100%;
}
input[type="radio"], input[type="checkbox"] { width: auto; min-height: 1.1rem; }
fieldset { border: 1px solid #42626b; border-radius: 12px; display: flex; flex-direction: column; gap: 0.35rem; }
fieldset label { display: flex; gap: 0.45rem; align-items: center; }
textarea { min-height: 8rem; resize: vertical; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; display: flex; flex-direction: column; gap: 1rem; }
.wrap.wide { max-width: 68rem; }
.doorbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #0c1d24;
  border-bottom: 1px solid #1d3a44;
  font-size: 0.92rem;
}
.doorbar a { font-weight: 700; text-decoration: none; }
.doorbar span { margin-left: auto; color: #c5ddd6; }
body.kids .doorbar { background: #0b1c2b; }
body.kids .doorbar span { color: #ffe08a; }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem; }
.door {
  background: #0c1d24;
  border: 1px solid #1d3a44;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 12rem;
}
.door p { margin: 0; color: #c5ddd6; }
a.enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: auto;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #42626b;
  background: #203b45;
  color: #95f5cf;
  font-weight: 700;
  text-decoration: none;
}
#portal-note:empty { display: none; }
#portal-note { color: #f6d36b; font-weight: 700; }
.eyebrow { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; color: #95f5cf; margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.35rem; }
.card, .panel {
  background: #0c1d24;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.row > * { flex: 1 1 12rem; }
.meta { margin: 0; color: #c5ddd6; }
.mark {
  display: inline-block;
  border: 1px dashed #f6d36b;
  color: #f6d36b;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.player {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #10242c;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  gap: 0.35rem;
}
.player p { margin: 0; }
.ladder { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.home { color: #95f5cf; }
#status { min-height: 1.3em; color: #f6d36b; margin: 0; }
.result { font-size: 1.35rem; font-weight: 700; margin: 0; }
.fine { color: #c5ddd6; font-size: 0.92rem; margin: 0; }

body.kids { background: #12324a; color: #fff8e8; }
body.kids a { color: #ffe08a; }
body.kids .wrap { max-width: 64rem; }
body.kids h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
body.kids button { min-height: 72px; font-size: 1.15rem; border-radius: 18px; background: #f4b942; color: #1b1408; border-color: #ffe08a; }
body.kids button[aria-pressed="true"] { background: #7d5cff; color: white; border-color: white; }
body.kids .panel { background: #0e2436; border-radius: 22px; }
#games { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.6rem; }
#stage-wrap { background: #081820; border-radius: 22px; overflow: hidden; }
#stage { display: block; width: 100%; height: auto; background: #102c3c; touch-action: manipulation; }
#hud { font-size: 1.25rem; font-weight: 700; margin: 0; }
#garage .choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
#sources summary { font-size: 1.15rem; font-weight: 700; cursor: pointer; }
#sources ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.7rem; }
.review { background: #10242c; border-radius: 14px; padding: 0.8rem; display: flex; flex-direction: column; gap: 0.55rem; }
.review.is-done { outline: 3px solid #95f5cf; }
#countdown {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.04em;
}
.question { font-size: 1.25rem; font-weight: 700; }

.qr-wrap { display: grid; justify-items: center; gap: 0.6rem; background: white; color: #10242c; border-radius: 20px; padding: 1rem; }
#qr { width: min(100%, 22rem); height: auto; image-rendering: pixelated; background: white; }
.blitz { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.blitz button { min-height: 7rem; font-size: 1.4rem; }
.subscribe { display: flex; min-height: 64px; align-items: center; justify-content: center; border-radius: 14px; background: #e23b3b; color: white; font-weight: 800; text-decoration: none; font-size: 1.2rem; }
.clock { font-size: clamp(2.4rem, 8vw, 4.5rem); font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }

.call { text-decoration: none; display: flex; align-items: center; justify-content: center; min-height: 64px; border-radius: 14px; background: #235345; color: white; font-weight: 800; }
.score { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; margin: 0; }
input[type="range"] { padding: 0; }

.ais { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.ai { background: #10242c; border-radius: 12px; padding: 0.75rem; min-height: 6rem; }
.ai h3 { color: #95f5cf; font-size: 1rem; }
.warn { color: #ffaf9a; }

.dual-toggle { display: flex; gap: 0.6rem; align-items: center; font-weight: 750; }
.dual-toggle input { width: 1.4rem; height: 1.4rem; min-height: 1.4rem; }
.tax-note { margin: 0; color: #d5eee6; }
.price-board { display: flex; flex-direction: column; gap: 0.8rem; }
.price-row { display: flex; justify-content: space-between; gap: 0.75rem; border-bottom: 1px solid #1d3a44; padding: 0.4rem 0; }
.price-row .name { font-weight: 700; }
.quote, .price { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; justify-content: flex-end; }
.menu-price { color: #9bb0aa; font-size: 0.85rem; }
.cash-price, .card-price { font-weight: 800; }
.card-price { color: #9fd0ff; }
.copy-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.copy-row button { flex: 1 1 12rem; }
#preview { width: min(100%, 16rem); height: auto; border-radius: 12px; background: #10242c; }
.soon { border: 1px dashed #f6d36b; }
.soon .mark { margin-bottom: 0.2rem; }

body.cards-page .sheet { background: #fff; color: #142028; border-radius: 16px; padding: 1.25rem; }
body.cards-page .sheet h2, body.cards-page .sheet p { color: #142028; margin: 0; }
body.cards-page .brand { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82rem; }
body.cards-page .tent { display: grid; }
body.cards-page .tent-face { display: grid; justify-items: center; text-align: center; gap: 0.35rem; padding: 0.5rem 0; }
body.cards-page .tent-fold { border-top: 2px dashed #142028; margin: 0.85rem 0; text-align: center; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
body.cards-page .stuffer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
body.cards-page .url, body.cards-page .phone { font-weight: 800; font-size: 1.15rem; }
body.cards-page canvas { width: min(100%, 220px); height: auto; image-rendering: pixelated; background: #fff; }

@media (max-width: 640px) {
  body.cards-page .stuffer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media print {
  body.cards-page #pandora-root, body.cards-page .doorbar, body.cards-page .no-print { display: none !important; }
  body.cards-page, body.cards-page .wrap { background: #fff !important; color: #142028; }
  body.cards-page .wrap { max-width: none; padding: 0; gap: 0; }
  body.cards-page .sheet { border-radius: 0; }
  body.cards-page .stuffer { break-before: page; }
  body.cards-page .tent, body.cards-page .stuffer { break-inside: avoid; }
}

body.kio .chart { width: 100%; height: auto; background: #10242c; border-radius: 12px; }
body.kio .log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
body.kio .log li { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
body.kio .log button { flex: 0 0 auto; }
body.kio .prompts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
body.kio .prompts li { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
body.kio .prompts p { margin: 0; flex: 1; }
body.kio .prompts button { flex: 0 0 auto; }
body.kio #memory-text, body.kio #appeal-letter { white-space: pre-wrap; }

@media (max-width: 640px) {
  .ais, .blitz { grid-template-columns: 1fr; }
  .price-row { flex-direction: column; }
}

body.pos {
  background:
    radial-gradient(1100px 640px at 8% -10%, #d7e6ff 0%, transparent 55%),
    radial-gradient(860px 560px at 110% 0%, #f6e7ff 0%, transparent 48%),
    linear-gradient(180deg, #eef2f7 0%, #dfe6ee 100%);
  color: #1d1d1f;
}
body.pos a { color: #0a4f8a; }
body.pos .doorbar {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  color: #1d1d1f;
}
body.pos .doorbar a {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  color: #1d1d1f;
  padding: 0 0.2rem;
}
body.pos .doorbar span { color: #4d5966; }
body.pos .meta, body.pos .tax-note, body.pos .menu-price { color: #4d5966; }
body.pos .glass,
body.pos .customer-screen {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 40px rgba(28, 39, 49, 0.12);
  border-radius: 28px;
  padding: 1rem;
}
body.pos .price-row {
  width: 100%;
  min-height: 64px;
  align-items: center;
  text-align: left;
  padding: 0.75rem 0.9rem;
  margin: 0 0 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  color: #1d1d1f;
  font-size: 1.05rem;
}
body.pos .price-row[aria-pressed="true"] { border-color: #1d1d1f; }
body.pos .price-row .name { font-size: 1.05rem; }
body.pos #flip-customer,
body.pos .tips button,
body.pos #flip-back,
body.pos .enter {
  min-height: 64px;
  font-size: 1.15rem;
}
body.pos #flip-customer,
body.pos #pay-reader {
  width: 100%;
  border-radius: 18px;
}
body.pos #pay-reader {
  min-height: 72px;
  background: #1d1d1f;
  color: #fff;
  border: 0;
  font-size: 1.3rem;
}
body.pos .customer-screen {
  position: fixed;
  inset: 16px;
  z-index: 30;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
body.pos .customer-screen h2 { margin: 0; font-size: 1.6rem; }
body.pos .pay-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
body.pos .pay-pair article {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  padding: 1rem;
  min-height: 140px;
}
body.pos .pay-pair h3 { margin: 0; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: #4d5966; }
body.pos .pay-pair p { margin: 0.3rem 0 0; font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; }
body.pos .tips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
body.pos .tips button[aria-pressed="true"] { background: #1d1d1f; color: #fff; }
body.pos #custom-tip { min-height: 64px; font-size: 1.2rem; color: #1d1d1f; background: rgba(255, 255, 255, 0.8); }
body.pos .hardware-card { font-size: 1.05rem; font-weight: 650; }
body.pos #print-receipt,
body.pos #open-drawer,
body.pos #queue-order,
body.pos #sync-orders { min-height: 64px; width: 100%; font-size: 1.1rem; }
#bridge-status[data-state="off"] { font-weight: 800; }
body.pos #bridge-status[data-state="off"] { color: #8a3b12; }
body.ledger fieldset label { flex-direction: column; align-items: stretch; }
#compute .compute-status, #deal-scout { font-weight: 700; }
@media (max-width: 720px) {
  body.pos .tips, body.pos .pay-pair { grid-template-columns: 1fr 1fr; }
  body.pos .pay-pair { grid-template-columns: 1fr; }
}
