/* game/ - "The Deal": a one-screen mobile game that shows what an agent fleet does. Two fleets negotiate; the player
   is asked to decide whenever a person on either side would be. Layout is a fixed grid (no reflow while playing):
   stats bar, deal gauges, the two fleets with message wires, one narrator line, and a fixed-height decision panel. */
:root {
  --ink: #1d1b2f; --text: #34314a; --muted: #6b6784;
  --bg: #fbf8f3; --bg-2: #f2ece3; --card: #fffefb; --line: #e6ddd0;
  --ac: #5b4bd6; --ac-soft: #ebe8fb; --on-ac: #fff;
  --cu: #0e7490; --cu-soft: #def0f4;
  --red: #c2410c; --amber: #b7791f; --green: #2f7d4f; --off: #b9b3c6;
  --focus: #2f6fed;
  --shadow: 0 1px 2px rgba(29, 27, 47, .06), 0 6px 18px rgba(29, 27, 47, .07);
  --panel-h: 262px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1ff; --text: #dcd8ee; --muted: #a6a1c0;
    --bg: #15141f; --bg-2: #1d1c2a; --card: #232233; --line: #353349;
    --ac: #a99cff; --ac-soft: #2b2747; --on-ac: #15141f;
    --cu: #5ec4d8; --cu-soft: #15323a;
    --red: #f08a6c; --amber: #f0c96a; --green: #8fd3a6; --off: #4d4a62;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg-2); }
body { font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
b, strong { color: var(--ink); }

.g {
  position: relative; max-width: 520px; height: 100vh; height: 100dvh; margin: 0 auto; background: var(--bg);
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto var(--panel-h); gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */
.g-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-brand { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.g-brand b { font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
@media (max-width: 400px) { .g-top { gap: 5px; } .pill { padding: 4px 6px; font-size: 11.5px; } .g-brand b { font-size: 15px; } }
.g-brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill b { font-weight: 700; }
.pill.hot { border-color: var(--red); color: var(--red); }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); padding: 0; font-size: 15px; flex: none; }

/* ---------- gauges ---------- */
.g-gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gauge { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px 5px; text-align: center; transition: border-color .3s, box-shadow .3s, opacity .3s; }
.gauge.on { border-color: var(--ac); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ac) 22%, transparent); }
.gauge svg { display: block; width: 100%; max-width: 86px; height: auto; margin: 0 auto; overflow: visible; }
.gauge .trk { fill: none; stroke: var(--line); stroke-width: 9; stroke-linecap: round; }
.gauge .val { fill: none; stroke: var(--red); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .7s ease, stroke .4s; }
.gauge[data-band="orange"] .val { stroke: var(--amber); }
.gauge[data-band="green"] .val { stroke: var(--green); }
.gauge .ndl { transform-box: view-box; transform-origin: 50px 50px; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.gauge .ndl line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.gauge .hub { fill: var(--ink); }
.gauge .g-n { display: block; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gauge .g-v { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge[data-st="won"] .g-v { color: var(--green); font-weight: 700; }
.gauge[data-st="off"] { opacity: .55; }
.gauge[data-st="off"] .val { stroke: var(--off); }

/* ---------- the two fleets ---------- */
.g-fleets { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); min-height: 0; }
.col { display: flex; flex-direction: column; min-height: 0; }
.col h2 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col.ac h2 { color: var(--ac); text-align: right; }
.col.cu h2 { color: var(--cu); }
.rows { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; gap: 2px; }
.ag { flex: 1 1 0; max-height: 46px; min-height: 0; display: flex; align-items: center; gap: 7px; min-width: 0; }
.col.ac .ag { flex-direction: row-reverse; text-align: right; }
.ag .ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; position: relative; transition: transform .25s, box-shadow .25s, background .25s; }
.col.ac .ag .ic { background: var(--ac-soft); }
.col.cu .ag .ic { background: var(--cu-soft); }
.ag .ic::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--off); border: 2px solid var(--bg); }
.ag .tx { min-width: 0; display: flex; flex-direction: column; }
.ag .nm { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag .st { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s; }
.ag[data-s="live"] .ic::after { background: var(--green); }
.ag[data-s="talk"] .ic, .ag[data-s="work"] .ic { transform: scale(1.12); }
.col.ac .ag[data-s="talk"] .ic { box-shadow: 0 0 0 3px var(--ac); }
.col.cu .ag[data-s="talk"] .ic { box-shadow: 0 0 0 3px var(--cu); }
.ag[data-s="talk"] .ic::after, .ag[data-s="work"] .ic::after { background: var(--focus); animation: pulse 1s ease-in-out infinite; }
.ag[data-s="talk"] .st, .ag[data-s="work"] .st { color: var(--ink); }
.ag[data-s="wait"] .ic::after { background: var(--amber); }
.ag[data-s="wait"] .st { color: var(--amber); font-weight: 600; }
.ag[data-s="block"] .ic { box-shadow: 0 0 0 3px var(--red); transform: scale(1.12); }
.ag[data-s="block"] .ic::after { background: var(--red); }
.ag[data-s="block"] .st { color: var(--red); font-weight: 600; }
.ag[data-s="done"] .ic::after { background: var(--green); }
.ag[data-s="done"] .st { color: var(--green); font-weight: 600; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .55; } }

.lane { position: relative; }
.lane::before { content: ""; position: absolute; left: 50%; top: 18px; bottom: 4px; border-left: 2px dotted var(--line); }
.lane span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); background: var(--bg); padding: 0 6px; white-space: nowrap; font-weight: 700; }

/* message wires (one SVG over the whole game) */
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.wires path { fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: .85; transition: opacity .6s; }
.wires path.ac { stroke: var(--ac); }
.wires path.cu { stroke: var(--cu); }
.wires path.you { stroke: var(--amber); stroke-dasharray: 5 5; }
.wires circle { stroke: var(--bg); stroke-width: 2; }
.wires circle.ac { fill: var(--ac); }
.wires circle.cu { fill: var(--cu); }
.wires circle.you { fill: var(--amber); }
.wires .fade { opacity: 0; }

/* ---------- narrator ---------- */
.g-say { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; height: 60px; box-shadow: var(--shadow); }
.g-say .ic { flex: none; font-size: 20px; width: 26px; text-align: center; }
.g-say p { margin: 0; font-size: 14px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-say.block { border-color: var(--red); }
.g-say.block p { color: var(--red); }
.g-say.flash { animation: flash .5s ease; }
@keyframes flash { from { background: color-mix(in srgb, var(--ac) 14%, var(--card)); } }

/* ---------- decision panel (fixed height; idle and ask layers swap in place) ---------- */
.g-panel { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.p-layer { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: opacity .25s, transform .25s; }
.p-layer[aria-hidden="true"] { opacity: 0; transform: translateY(8px); pointer-events: none; visibility: hidden; }

.p-msg { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); flex: 1; }
.p-msg b { display: block; color: var(--ink); font-size: 15px; }
.bot { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--ac-soft); display: grid; place-items: center; font-size: 22px; }
.p-ctrl { display: grid; grid-template-columns: 1fr 1fr 1.5fr 1fr; gap: 6px; }
.p-ctrl button, .p-mode button { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; font-weight: 700; padding: 0 4px; white-space: nowrap; }
.p-ctrl .main { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.p-mode { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.p-mode span { flex: none; }
.p-mode button { flex: 1; height: 34px; font-weight: 600; font-size: 12.5px; }
.p-mode button[aria-pressed="true"] { background: var(--ac-soft); border-color: var(--ac); color: var(--ink); }

.p-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--ac-soft); box-shadow: 0 0 0 2px var(--ac); }
.p-who.cu .p-av { background: var(--cu-soft); box-shadow: 0 0 0 2px var(--cu); }
.p-who > div { min-width: 0; flex: 1; }
.p-who b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-who small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-who small i { font-style: normal; font-weight: 700; color: var(--ac); }
.p-who.cu small i { color: var(--cu); }
.p-tag { display: inline-block; vertical-align: 2px; margin-right: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.p-tag[hidden] { display: none; }
/* 5-second pie countdown: the slice drains; missed = a random choice */
.p-timer { flex: none; width: 34px; height: 34px; }
.p-timer .bg { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.p-timer .pie { fill: none; stroke: var(--amber); stroke-width: 15; }
.p-timer.low .pie { stroke: var(--red); }
.p-timer text { font-size: 11px; font-weight: 800; fill: var(--ink); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.p-q { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.p-why { margin: -4px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-opts { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.p-opts button { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 6px 12px; text-align: left; font-weight: 700; font-size: 14px; color: var(--ink); transition: border-color .15s, background .15s, transform .1s; }
.p-opts button:active { transform: scale(.98); }
.p-opts button span { flex: 1; }
.p-opts button small { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); }
@media (hover: hover) { .p-opts button:hover { border-color: var(--ac); } }
.p-opts button.blocked { border-color: var(--red); color: var(--red); text-decoration: line-through; opacity: .7; cursor: not-allowed; animation: shake .35s; }
.p-opts button.blocked small { color: var(--red); text-decoration: none; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- overlays: intro, end, log ---------- */
.ov { position: absolute; inset: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; transition: opacity .3s; }
.ov[hidden] { display: none; }
.sheet { width: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: var(--shadow); padding: 20px 18px max(18px, env(safe-area-inset-bottom)); }
.sheet h1 { margin: 0 0 6px; font-size: 26px; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; }
.sheet h2 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sheet p { margin: 0 0 8px; }
.lead { font-size: 16px; color: var(--ink); }
.how { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 8px; }
.how li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.how li span { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; font-size: 17px; }
.big { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 800; font-size: 15.5px; margin-top: 8px; color: var(--ink); }
.big small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.big.main { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.big.main small { color: inherit; opacity: .8; }
.big .stack { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 6px 0; }
.big .stack small { font-size: 12.5px; margin-top: 2px; }
.fine { font-size: 12px; color: var(--muted); margin-top: 14px !important; }
.fine a { color: inherit; }

.end-hero { text-align: center; padding: 4px 0 2px; }
.trophy { font-size: 54px; line-height: 1; display: inline-block; animation: pop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
.stars { font-size: 26px; letter-spacing: 4px; color: var(--amber); margin: 6px 0 2px; }
.stars .dim { color: var(--off); }
.title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi em { display: block; font-style: normal; font-size: 12px; color: var(--green); font-weight: 700; margin-top: 2px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.list li { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13.5px; }
.list li > span:first-child { flex: none; font-size: 18px; width: 24px; text-align: center; }
.list li b { display: block; font-size: 14px; }
.list li small { color: var(--muted); font-size: 12px; }
.list li.off { opacity: .6; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.award { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px; font-size: 12.5px; animation: rise .45s ease-out backwards; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.award .medal { font-size: 22px; }
.award b { display: block; font-size: 13.5px; margin: 2px 0; }
.award.you { grid-column: 1 / -1; border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--bg)); }
.log { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 58px 1fr; gap: 6px; }
.log li time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.log li.you { color: var(--ink); font-weight: 600; }
.log li.block { color: var(--red); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheet-head h1 { margin: 0; font-size: 20px; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(105dvh) rotate(540deg); opacity: .2; } }

/* auth.css pads the body for its account bar; this page uses data-no-bar and a full-height game */
body { padding-top: 0; }

/* ---------- end screen: rate the game + "What's next" ---------- */
.rate { margin-top: 12px; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.rate p { margin: 0; font-size: 14px; }
.rate-stars { display: flex; justify-content: center; gap: 4px; margin: 6px 0 2px; }
.rate-stars button { width: 48px; height: 48px; border: 0; background: none; padding: 0; font-size: 34px; line-height: 1; color: var(--off); transition: transform .12s, color .12s; }
.rate-stars button.on { color: var(--amber); }
.rate-stars button:active { transform: scale(.85); }
@media (hover: hover) { .rate-stars:hover button { color: var(--amber); } .rate-stars button:hover ~ button { color: var(--off); } }
.rate-msg { min-height: 18px; font-size: 12.5px; color: var(--muted); }

/* intro: QR card (as advert/'s .advert-qr-card) and share buttons (as the home page's, driven by ../share.js) */
.qr-wrap { text-align: center; margin: 16px 0 10px; }
.qr-card { display: inline-block; padding: 12px 16px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.qr-card img { display: block; margin: 0 auto; border-radius: 6px; image-rendering: pixelated; }
.qr-caption { margin-top: 8px; line-height: 1.3; text-align: center; }
.qr-title { font-size: 1.15em; font-weight: 700; letter-spacing: .02em; }
.qr-sub { font-size: .95em; color: var(--muted); }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .15s, background .15s; }
.share-btn svg { width: 20px; height: 20px; fill: currentColor; }
@media (hover: hover) { .share-btn:hover { background: var(--ac); border-color: var(--ac); color: var(--on-ac); transform: translateY(-2px); } }
.copy-feedback { min-height: 18px; margin: 8px 0 0 !important; font-size: 12.5px; color: var(--ac); text-align: center; }

/* the join dialog: same fields and flow as advert/'s "Or join our business network" */
.jn { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.jn::backdrop { background: rgba(0, 0, 0, .5); }
.jn h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.jn p { margin: 0 0 8px; font-size: 14px; }
.jn label { display: block; margin: 14px 0 6px; font-weight: 700; color: var(--ink); font-size: 14px; }
.jn input[type="email"] { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; font-size: 16px; }
.jn input[type="email"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.jn label.jn-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); cursor: pointer; }
.jn-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ac); }
.jn-check a { color: var(--ac); }
.jn-status { font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.jn-status[hidden] { display: none; }
.jn-status.error { color: var(--red); }
.jn-status.success { color: var(--green); }
.jn-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 8px; }
.jn-actions .big { margin: 0; }
.big:disabled { opacity: .5; cursor: not-allowed; }

/* rows too short for two lines (set by game.js): one line, "Name · status" */
.g-fleets.compact .ag .ic { width: 24px; height: 24px; font-size: 13px; }
.g-fleets.compact .ag .ic::after { width: 7px; height: 7px; }
.g-fleets.compact .ag .tx { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.g-fleets.compact .ag .nm, .g-fleets.compact .ag .st { display: inline; font-size: 11.5px; }
.g-fleets.compact .ag .st::before { content: " · "; }

.p-tip { margin: 0; font-size: 12.5px; color: var(--text); background: var(--bg); border-radius: 12px; padding: 7px 10px; display: flex; gap: 8px; align-items: flex-start; }
.p-tip::before { content: "💡"; }

/* the site-wide cookie banner floats over the game instead of pushing it off-screen */
#cookie-consent-banner { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; max-width: 496px; margin: 0 auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
#cookie-consent-banner p { margin: 0; flex: 1 1 220px; }
#cookie-consent-banner a { color: var(--ac); }
#cookie-consent-banner .cookie-consent-actions { display: flex; gap: 8px; }
#cookie-consent-banner button { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; color: var(--ink); }
#cookie-consent-banner .cookie-consent-accept { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }

/* ---------- short screens: drop secondary text, keep everything on one screen ---------- */
@media (max-height: 700px) {
  :root { --panel-h: 236px; }
  .g { gap: 6px; }
  .g-say { height: 52px; padding: 6px 10px; }
  .g-say p { font-size: 13.5px; }
  .gauge svg { max-width: 70px; }
  .p-layer { padding: 10px; gap: 6px; }
  .p-opts button { min-height: 38px; }
  .p-q { font-size: 14.5px; }
}
@media (max-height: 620px) {
  :root { --panel-h: 214px; }
  .p-why, .p-tip { display: none; }
  .gauge .g-v { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
