/* Antsla Peitus: the car hide-and-seek site (peitus.janfredjoab.ee or ?theme=peitus).
   Night road: asphalt, road-paint white, sodium streetlamp amber for time and urgency, brake-light red for
   "you are seen". The one loud thing is the Estonian number plate (game code, team names). */
/* plate colours also for a peitus game on the main site */
:root { --plate: #f4f3ee; --plate-ink: #121519; --plate-blue: #1d4fa0; --pt-paint: #f2f1ea; }
:root[data-theme="peitus"] {
  --bg: #161c22; --panel: #1d242c; --panel2: #252e38; --line: #34414d;
  --ink: #f2f1ea; --dim: #8b97a4;
  --amber: #ffae3d; --amber-d: #9a5c12;
  --danger: #e5372f; --ok: #7fc06a;
  --plate: #f4f3ee; --plate-ink: #121519; --plate-blue: #1d4fa0;
  --pt-paint: #f2f1ea;
}
:root[data-theme="peitus"] html, :root[data-theme="peitus"] body { background: #10151a; }
:root[data-theme="peitus"] #app { background: var(--bg); box-shadow: 0 0 0 1px #222b33; }
:root[data-theme="peitus"] #app::before { opacity: .035; }

/* ---------- number plate ---------- */
.plate { display: inline-flex; align-items: stretch; background: var(--plate); color: var(--plate-ink); border-radius: 7px; border: 2px solid #0c0f12; box-shadow: inset 0 0 0 2px var(--plate), inset 0 0 0 3.5px var(--plate-ink); overflow: hidden; font-family: var(--disp); font-weight: 700; line-height: 1; vertical-align: middle; max-width: 100%; }
.plate > i { display: grid; place-items: end center; background: var(--plate-blue); color: #fff; font-style: normal; font-weight: 700; font-size: .62rem; letter-spacing: .04em; padding: 0 5px 3px; margin: 3.5px 0 3.5px 3.5px; border-radius: 3px 0 0 3px; }
.plate > i.A, .plate > i.B, .plate > i.C, .plate > i.D { background: var(--tc); color: var(--tink); place-items: center; padding: 0 5px; }
.plate > i .tmk { width: .8rem; height: .8rem; }
.plate > b { padding: .16em .45em .12em; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plate.sm > b { font-size: 1.02rem; }
.plate.hero { border-radius: 10px; box-shadow: inset 0 0 0 3px var(--plate), inset 0 0 0 5px var(--plate-ink), 0 10px 30px #0008; }
.plate.hero > i { font-size: .95rem; padding: 0 9px 6px; margin: 5px 0 5px 5px; }
.plate.hero > b { font-size: clamp(3rem, 15vw, 4.6rem); letter-spacing: .09em; padding: .12em .32em .06em; }

/* ---------- home ---------- */
.pt-home { gap: 16px; padding-top: 18px; }
.pt-word { display: grid; justify-items: center; gap: 10px; margin: 6px 0 4px; font: inherit; }
.pt-word > .pt-sub { font-family: var(--disp); font-weight: 600; font-size: 1.25rem; color: var(--dim); }
.pt-home .lead { text-align: center; color: var(--dim); max-width: 34ch; margin: 0 auto; }
.pt-join { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.pt-join .btn { flex: none; }
.plate.input { min-height: 60px; }
.plate.input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--plate-ink); font-family: var(--disp); font-weight: 700; font-size: 2rem; letter-spacing: .14em; text-transform: uppercase; padding: 0 10px; outline: none; }
.plate.input input::placeholder { color: #9aa1a8; letter-spacing: .1em; }
.plate.input:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- lobby ---------- */
.pt-code { display: flex; justify-content: center; padding: 6px 0 4px; }

/* ---------- top bar ---------- */
:root[data-theme="peitus"] #top { background: #12171c; border-bottom: 0; box-shadow: inset 0 -3px 0 #0c1013; }
:root[data-theme="peitus"] #top::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 10px; height: 2px; background: repeating-linear-gradient(90deg, var(--pt-paint) 0 22px, transparent 22px 40px); opacity: .22; }
.pt-top { display: flex; align-items: center; gap: 8px; }
.pt-top .icon-btn { min-width: 48px; min-height: 48px; }
.pt-clock { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pt-clock .cd { font-family: var(--disp); font-weight: 800; font-size: 3rem; line-height: .9; color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.pt-clock small { color: var(--dim); font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.pt-plates.n3, .pt-plates.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-score { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pt-score .plate { flex: 0 1 auto; min-width: 0; }
.pt-score > b { font-family: var(--disp); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pt-score.hiding .plate { box-shadow: inset 0 0 0 2px var(--plate), inset 0 0 0 3.5px var(--plate-ink), 0 0 0 3px var(--amber); }

/* ---------- tabs ---------- */
:root[data-theme="peitus"] #tabs { background: #12171c; border-top: 0; box-shadow: inset 0 3px 0 #0c1013; }
:root[data-theme="peitus"] .tab.on { color: var(--amber); }
:root[data-theme="peitus"] .tab.on::before { background: var(--amber); }

/* ---------- buttons ---------- */
:root[data-theme="peitus"] .btn { border-radius: 9px; }
:root[data-theme="peitus"] .btn:not(.team):not(.primary):not(.ok):not(.no):not(.danger) { background: var(--panel2); border-color: var(--line); }
:root[data-theme="peitus"] .btn.ghost { background: transparent; }
:root[data-theme="peitus"] .btn.primary { background: var(--amber); border-color: #0c0f12; color: #1a1206; box-shadow: 0 4px 0 var(--amber-d); }

/* ---------- the game screen ---------- */
.pt { display: grid; gap: 14px; }
.pt-role { font-family: var(--disp); font-weight: 700; font-size: 1.35rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-gauge { display: grid; gap: 4px; padding: 14px 16px 16px 20px; background: var(--panel); border-radius: 12px; position: relative; overflow: hidden; }
.pt-gauge::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: repeating-linear-gradient(180deg, var(--pt-paint) 0 16px, transparent 16px 28px); opacity: .8; }
.pt-gauge > b { font-family: var(--disp); font-weight: 800; font-size: clamp(3rem, 16vw, 4.4rem); line-height: .95; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pt-gauge > b em { font-style: normal; font-size: .45em; margin-left: .12em; color: var(--dim); }
.pt-gauge > b .cd { font: inherit; color: var(--amber); }
.pt-gauge > small { color: var(--dim); font-size: .98rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-gauge.hot { background: #2a1714; }
.pt-gauge.hot > b { color: #ff7a6b; }
.pt-status { border-radius: 10px; padding: 10px 14px; background: var(--panel2); color: var(--dim); }
.pt-status.on { background: var(--danger); color: #fff; font-weight: 700; }
.pt-due { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: #2a2010; box-shadow: inset 0 0 0 2px var(--amber); }
.pt-due p b { display: block; font-family: var(--disp); font-size: 1.35rem; color: var(--amber); }
.pt-due p b .cd { color: inherit; }
.btn.pt-found { min-height: 84px; font-size: 2.1rem; }
.pt-note { margin-top: -6px; }
.pt-h { font-family: var(--disp); font-weight: 700; font-size: 1.2rem; margin-top: 6px; }

/* hint schedule: a timeline down the left edge, like distance posts along a road */
.pt-line { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; }
.pt-line li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 8px 0 10px 18px; position: relative; color: var(--dim); }
.pt-line li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.pt-line li::after { content: ''; position: absolute; left: -5px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.pt-line .pt-t { font-variant-numeric: tabular-nums; font-weight: 600; padding-top: 1px; }
.pt-line li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pt-line li b { font-weight: 700; color: inherit; }
.pt-line li.done { color: var(--ink); }
.pt-line li.done::after { background: var(--pt-paint); box-shadow: none; }
.pt-line li.now { color: var(--amber); }
.pt-line li.now::after { background: var(--amber); box-shadow: 0 0 0 4px #ffae3d33; }
.pt-line li.miss { color: #ff8b7e; }
.pt-line li.miss::after { background: var(--danger); box-shadow: none; }
.pt-past { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--dim); }

@media (prefers-reduced-motion: no-preference) {
  .pt-line li.now::after { animation: pt-blink 1.2s ease-in-out infinite; }
  @keyframes pt-blink { 50% { box-shadow: 0 0 0 8px #ffae3d00; } }
}

/* map: zone labels as small road-sign tags in the zone's paint colour */
.pt-ztip { background: none; border: 0; }
.pt-ztip b { display: inline-block; white-space: nowrap; transform: translate(-50%, -50%); background: #12171cee; color: var(--zc); border: 2px solid var(--zc); border-radius: 6px; padding: 2px 7px; font: 700 .82rem var(--disp); }
