/* Curfew 26 skin (see BRAND.md: "After Hours on AH26"): tokens, buttons, start screen, sign in, panels, notices.
   The in-game HUD lives in hud.css. One rule per component; edit rules here rather than adding overrides. */
:root {
  --asphalt: #1d1c19; --tarmac: #2b2925; --tarmac-hi: #34312c; --paint: #e2b52e; --paper: #e6dcc6; --paper-dim: #b9b0a0;
  --ink: #17150f; --rust: #b8492f; --mercury: #49b3c9; --violet: #8f62d8; --route: #1f4fa0; --danger: #e0664f; --ok: #8fbf5a;
  --f-display: "Big Shoulders Stencil Display", "Arial Narrow", Impact, sans-serif;
  --f-text: "Overpass", "Arial Narrow", Arial, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --worn: url("../img/worn-paint.png");
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
.hidden { display: none !important; }
.c26-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#map { height: 100vh; height: 100dvh; background: var(--asphalt); }
body.qr { font-family: var(--f-text); background: var(--asphalt); color: var(--paper); }
/* a game, not a page: no text selection or picture dragging outside fields, no grey flash on a tap, no pull-to-refresh,
   no "save image" sheet on a long press */
body.qr { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.qr input, body.qr textarea, body.qr [contenteditable] { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
body.qr img { -webkit-user-drag: none; }
.qr :focus-visible { outline: 2px solid var(--paint); outline-offset: 2px; }

/* ---------- sign plates (all buttons) ---------- */
.qr .c26-plate, .qr .c26-primary, .qr .c26-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 4px 0;
  padding: 12px 20px; border: 0; border-radius: 6px; font: 800 min(1.0625rem, 24px)/1.15 var(--f-text); text-transform: none; letter-spacing: 0;
  cursor: pointer; transition: transform .12s ease-out, filter .12s ease-out;
}
.qr .c26-primary, .qr .c26-plate { background: var(--paint); color: var(--ink); box-shadow: inset 0 0 0 3px var(--paint), inset 0 0 0 5px var(--ink); }
.qr .c26-secondary { background: var(--tarmac); color: var(--paper); box-shadow: inset 0 0 0 3px var(--tarmac), inset 0 0 0 5px var(--paper-dim); }
.qr .c26-primary:hover, .qr .c26-plate:hover, .qr .c26-secondary:hover { filter: brightness(1.08); background: var(--paint); color: var(--ink); }
.qr .c26-secondary:hover { background: var(--tarmac-hi); color: var(--paper); }
.qr .c26-primary:active, .qr .c26-plate:active, .qr .c26-secondary:active { transform: translateY(1px); }
.qr .c26-primary:disabled, .qr .c26-secondary:disabled { background: #3a3732; color: #8d8577; box-shadow: inset 0 0 0 3px #3a3732, inset 0 0 0 5px #57524a; cursor: not-allowed; filter: none; }
.qr .c26-link { background: none; border: 0; color: var(--paper); font: 400 0.9375rem var(--f-text); text-transform: none; padding: 10px 4px;
  min-height: 44px; text-decoration: underline; text-decoration-color: var(--paint); text-underline-offset: 4px; }
.qr .c26-link:hover { background: none; color: var(--paint); }

/* ---------- start screen ---------- */
.c26-start { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: flex-start; justify-content: center; padding: 24px;
  background: linear-gradient(rgba(29,28,25,.55), rgba(29,28,25,.82) 70%, var(--asphalt)), url("../img/wasteland_bg.png") center / cover no-repeat;
  color: var(--paper); text-align: center; transition: opacity .6s ease-out; }
.c26-start.gone { opacity: 0; }
.c26-start-inner { max-width: 560px; margin: auto 0; }
.c26-wordmark { font: 800 1.625rem/1 var(--f-display); color: var(--paper); letter-spacing: .02em; }
.c26-clock { display: inline-block; font: 900 min(31vw, 25vh, 210px)/.9 var(--f-display); margin: 4px 0 6px; padding: 0 .04em;
  background: var(--worn) 0 0 / 110px 110px, var(--paint); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: c26-paint .9s steps(9, end) .15s both; }
@keyframes c26-paint { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.c26-start-sub { font: 700 1.1875rem/1.4 var(--f-text); margin: 0 0 14px; }
.c26-flicker { display: block; width: 76px; height: auto; margin: 2px auto 10px; opacity: .3; animation: c26-flicker 4.2s linear infinite; }
/* a failing streetlight: steady, two hard drops, steady */
@keyframes c26-flicker { 0%, 8% { opacity: .32; } 9% { opacity: .05; } 11% { opacity: .3; } 12% { opacity: .07; } 14%, 58% { opacity: .34; }
  59% { opacity: .1; } 62%, 92% { opacity: .3; } 93%, 97% { opacity: .02; } 100% { opacity: .32; } }
/* the lore line is a slip from the Node 4 incident log: notice paper, typed, torn off, stamped */
.c26-slip-wrap { max-width: 440px; margin: 0 auto 26px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); }
.c26-slip { position: relative; margin: 0; padding: 12px 18px 52px; text-align: left; color: var(--ink); cursor: pointer;
  background: linear-gradient(rgba(230,220,198,.78), rgba(230,220,198,.78)), var(--grain), var(--paper); transform: rotate(-1deg); transition: transform .2s ease-in, opacity .2s ease-in;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 7px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 7px repeat-x; }
.c26-slip.out { transform: translateX(-40px) rotate(-6deg); opacity: 0; }
.c26-slip:focus-visible { outline: none; }
.c26-slip-wrap:has(.c26-slip:focus-visible) { outline: 2px solid var(--paint); outline-offset: 4px; }
.c26-slip-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; margin-bottom: 9px; border-bottom: 1px solid rgba(23,21,15,.28);
  font: 800 0.8125rem/1.2 var(--f-text); color: #5b5344; font-variant-numeric: tabular-nums; }
.c26-slip-text { margin: 0; font: 400 1.0625rem/1.5 var(--f-text); }
.c26-slip-stamp { position: absolute; right: 16px; bottom: 14px; padding: 4px 9px 2px; border: 3px double var(--violet); border-radius: 4px;
  color: var(--violet); font: 900 1.3125rem/1 var(--f-display); text-transform: uppercase; transform: rotate(-8deg); opacity: .88; mix-blend-mode: multiply; }
.c26-start { overflow-y: auto; }
.qr .c26-start .c26-plate { width: auto; padding: 14px 30px; font-size: 1.125rem; }

/* ---------- sign in ---------- */
.c26-auth { position: fixed; inset: 0; z-index: 99999; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start;
  padding: max(24px, var(--safe-t)) 16px calc(24px + var(--safe-b)); color: var(--paper);
  background: linear-gradient(rgba(29,28,25,.86), rgba(29,28,25,.94)), url("../img/wasteland_bg.png") center / cover fixed; }
.c26-auth-card { width: 100%; max-width: 420px; margin: auto 0; padding: 26px 22px 22px; border-radius: 10px;
  background: var(--grain), var(--tarmac); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.c26-auth-title { font: 900 2.75rem/1 var(--f-display); color: var(--paper); text-align: left; }
.c26-lore { font: italic 400 1rem/1.5 var(--f-text); color: var(--paper-dim); margin: 10px 0 18px; }
/* a label that keeps one line (ui.js mq): centred when it fits; when it doesn't, it rests at its start, slides to its end,
   rests and slides back, its edges fading out. Reduced motion: it rests at its start */
.c26-mq { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-align: center; }
.c26-mq > span { display: inline-block; }
.c26-mq.slide { text-align: left; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6px, #000 calc(100% - 6px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6px, #000 calc(100% - 6px), transparent); }
.c26-mq.slide > span { padding: 0 6px; animation: c26-mq var(--mq-t, 6s) ease-in-out infinite; }
@keyframes c26-mq { 0%, 25% { transform: translateX(0); } 50%, 75% { transform: translateX(var(--mq-dx, 0)); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .c26-mq.slide > span { animation: none; } }
.c26-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 16px; padding: 4px; border-radius: 8px; background: var(--asphalt); }
.qr .c26-tab { background: transparent; color: var(--paper-dim); border: 0; border-radius: 6px; padding: 10px; min-height: 44px;
  font: 700 1rem var(--f-text); text-transform: none; }
.qr .c26-tab:hover { background: var(--tarmac-hi); color: var(--paper); }
.qr .c26-tab.on { background: var(--paint); color: var(--ink); }
.c26-auth input { display: block; width: 100%; margin: 0 0 10px; padding: 13px 12px; border: 2px solid transparent; border-radius: 6px;
  background: var(--paper); color: var(--ink); font: 400 1.0625rem var(--f-text); }
.c26-auth input:focus { outline: none; border-color: var(--paint); }
/* a saved email or password filled in by the browser keeps the notice paper, not the browser's own tint */
.c26-auth input:-webkit-autofill, .c26-auth input:-webkit-autofill:hover, .c26-auth input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); box-shadow: 0 0 0 1000px var(--paper) inset; transition: background-color 99999s; }
.c26-note { font: 400 0.875rem/1.5 var(--f-text); color: var(--paper-dim); margin: 10px 0; }
.c26-note.big { font-size: 1.0625rem; color: var(--paper); }
.c26-err { color: var(--danger); font: 700 0.9375rem/1.4 var(--f-text); min-height: 20px; margin-top: 8px; }
.c26-factions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.qr .c26-faction { position: relative; height: 136px; padding: 0; border-radius: 8px; border: 3px solid var(--tarmac-hi); text-transform: none;
  background: var(--asphalt) center 40% / 78% no-repeat; filter: saturate(.55) brightness(.7); transition: filter .15s ease-out; }
.qr .c26-faction.vultari { background-image: url("../img/vultaricreepfinal.png"); }
.qr .c26-faction.solinar { background-image: url("../img/solinarcreepfinal.png"); }
.qr .c26-faction span { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 6px; border-radius: 4px; font: 800 1.125rem/1 var(--f-display);
  letter-spacing: .03em; color: var(--paper); background: rgba(23,21,15,.82); }
.qr .c26-faction:hover { filter: none; background-color: var(--asphalt); }
.qr .c26-faction.on { filter: none; }
.qr .c26-faction.vultari.on { border-color: var(--rust); } .qr .c26-faction.vultari.on span { background: var(--rust); }
.qr .c26-faction.solinar.on { border-color: var(--mercury); } .qr .c26-faction.solinar.on span { background: var(--mercury); color: var(--ink); }
.c26-factions.shake { animation: c26-shake .45s; }
@keyframes c26-shake { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }

/* ---------- panels (bottom sheets) ---------- */
.c26-sheet-backdrop { position: fixed; inset: 0; z-index: 10050; background: rgba(23,21,15,.45); display: flex; align-items: flex-end; justify-content: center; }
.c26-sheet { position: relative; width: 100%; max-width: 480px; max-height: 80vh; max-height: 80dvh; overflow-y: auto; color: var(--paper);
  background: var(--grain), var(--tarmac); border-radius: 12px 12px 0 0; padding: 20px 18px calc(18px + var(--safe-b));
  box-shadow: 0 -10px 30px rgba(0,0,0,.5); font: 400 1rem/1.45 var(--f-text); animation: c26-up .2s ease-out; }
.c26-sheet.wide { max-width: 660px; }
@keyframes c26-up { from { transform: translateY(24px); opacity: 0; } }
.qr .c26-sheet-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--paper-dim); font: 400 1.75rem/1 var(--f-text); }
.qr .c26-sheet-close:hover { background: var(--tarmac-hi); color: var(--paper); }
/* .qr: a sheet's heading is often an h3, and the Season 1 heading rule in base.css (.qr h3: a font we don't load) outranks a bare class */
.qr .c26-h { font: 900 1.875rem/1 var(--f-display); color: var(--paper); margin: 0 48px 10px 0; letter-spacing: .01em; text-transform: none; }
.qr .c26-h small { font: 400 0.9375rem var(--f-text); color: var(--paper-dim); letter-spacing: 0; }
.c26-card-head { display: flex; gap: 14px; align-items: center; margin-right: 48px; }
.c26-card-head img { width: 56px; height: 56px; object-fit: contain; }
/* pixel sprites show at their own 2x size on cards, never smoothed */
.c26-card-head img[src*="img/turrets/"], .c26-card-head img[src*="glitchnode"] { width: 80px; height: 80px; margin: -8px 0 -6px -6px; image-rendering: pixelated; }
.c26-card-title { font: 900 1.875rem/1 var(--f-display); letter-spacing: .01em; }
.c26-card-sub { font: 400 0.9375rem/1.35 var(--f-text); color: var(--paper-dim); }
.c26-bars { margin: 14px 0 10px; display: grid; gap: 6px; }
.c26-bar { position: relative; height: 1.375rem; background: #141310; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #45413a; }
.c26-bar span { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.c26-bar.shield span { background: var(--mercury); }
.c26-bar label { position: relative; font: 700 0.8125rem/1.692 var(--f-text); padding-left: 8px; color: var(--paper); text-shadow: 0 1px 2px var(--ink); }
.c26-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.c26-stats div { background: var(--asphalt); border-radius: 6px; padding: 8px 10px; }
.c26-stats dt { font: 400 0.8125rem var(--f-text); color: var(--paper-dim); }
.c26-stats dd { margin: 0; font: 800 1.1875rem/1.2 var(--f-text); font-variant-numeric: tabular-nums; }
.c26-blurb { font: 400 1rem/1.5 var(--f-text); color: var(--paper); margin: 12px 0; }
.c26-slots { display: flex; gap: 8px; margin: 10px 0; align-items: center; }
.c26-slots-label { font: 400 0.875rem var(--f-text); color: var(--paper-dim); margin-right: 4px; }
.c26-slot { width: 44px; height: 44px; border: 2px solid var(--tarmac-hi); border-radius: 6px; display: flex; align-items: center; justify-content: center;
  background: var(--asphalt); }
.c26-slot.empty { border-style: dashed; color: var(--paper-dim); }
.c26-actions { display: grid; gap: 6px; margin-top: 12px; }
.c26-list { display: grid; gap: 8px; }
.qr .c26-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; min-height: 52px; padding: 10px 12px; border-radius: 8px;
  border: 2px solid transparent; background: var(--asphalt); color: var(--paper); font: 400 1rem/1.35 var(--f-text); text-transform: none; }
.qr .c26-row:hover { background: var(--tarmac-hi); color: var(--paper); border-color: var(--paint); }
.qr .c26-row:disabled { opacity: .5; cursor: not-allowed; border-color: transparent; }
.qr .c26-row.c26-row-danger { color: var(--danger); }
.qr .c26-primary.c26-danger:not(:disabled) { background: var(--danger); box-shadow: inset 0 0 0 3px var(--danger), inset 0 0 0 5px var(--ink); }
.c26-row img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.c26-row b { font-weight: 800; }
.c26-row small { font-size: 0.875rem; color: var(--paper-dim); }
.c26-row .parts .ok { color: var(--ok); } .c26-row .parts .miss { color: var(--danger); }
.qr .c26-mini { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 10px; border: 0; border-radius: 4px;
  background: var(--paint); color: var(--ink); font: 800 0.875rem/1 var(--f-text); text-transform: none; }
.c26-aura-edit { display: grid; gap: 8px; }
.c26-aura-edit div { display: grid; grid-template-columns: 1fr 3ch auto; gap: 12px; align-items: center; font: 400 1.0625rem var(--f-text); }
.c26-aura-edit b { font-variant-numeric: tabular-nums; text-align: right; }
.c26-lane-line { height: 4px; margin: 14px 0; background: repeating-linear-gradient(90deg, var(--paint) 0 26px, transparent 26px 44px); opacity: .65; }

/* ---------- notices (toasts) and banners ---------- */
#c26-toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(70px + var(--safe-t)); z-index: 100001; display: grid; gap: 6px;
  width: min(92vw, 440px); pointer-events: none; }
.c26-toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; background: var(--tarmac); color: var(--paper);
  border: 2px solid var(--paper-dim); font: 700 1rem/1.35 var(--f-text); box-shadow: 0 8px 22px rgba(0,0,0,.4); transition: opacity .35s; }
.c26-toast::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--paper-dim); }
.c26-toast.ok { border-color: var(--ok); } .c26-toast.ok::before { background: var(--ok); }
.c26-toast.warn { border-color: var(--paint); } .c26-toast.warn::before { background: var(--paint); }
.c26-toast.out { opacity: 0; }
#c26-ride, #c26-offline, #c26-gps { position: fixed; left: 50%; transform: translateX(-50%); z-index: 10040; display: none; max-width: 92vw;
  padding: 10px 14px; border-radius: 8px; background: var(--tarmac); color: var(--paper); font: 700 0.9375rem/1.35 var(--f-text); text-align: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.4); }
#c26-ride { bottom: calc(132px + var(--safe-b)); background: var(--paint); color: var(--ink); }
#c26-offline { top: calc(62px + var(--safe-t)); border: 2px solid var(--danger); }
#c26-gps { bottom: calc(178px + var(--safe-b)); }
body.ride-mode #c26-ride, #c26-offline.show, #c26-gps.show { display: block; }

/* ---------- attack minigame ---------- */
.c26-minigame { position: fixed; inset: 0; z-index: 10060; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 16px; background: rgba(23,21,15,.82); font-family: var(--f-text); }
.c26-mg-result { font: 900 2.75rem/1 var(--f-display); color: var(--paper); opacity: 0; transform: scale(.85); transition: all .25s ease-out; min-height: 44px; }
.c26-mg-result.show { opacity: 1; transform: scale(1); } .c26-mg-result.crit { color: var(--paint); }
.c26-mg-track { position: relative; width: min(92vw, 520px); height: 40px; background: var(--asphalt); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--paper-dim); }
.c26-band { position: absolute; top: 0; bottom: 0; background: rgba(226,181,46,.16); }
.c26-mg-crit { position: absolute; top: 0; bottom: 0; background: var(--paint); opacity: .85; }
.c26-mg-labels span { position: absolute; top: -24px; transform: translateX(-50%); font: 700 0.8125rem var(--f-text); color: var(--paper); }
.c26-mg-bar { position: absolute; top: -4px; bottom: -4px; width: 2%; border-radius: 2px; background: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.qr .c26-fire { max-width: 280px; font-size: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .c26-clock, .c26-sheet, .c26-factions.shake, .c26-flicker { animation: none !important; }
  .c26-slip { transition: none; }
}
