/* BSA SMP portal: Campfire Night (same family as mailbox.minigakoo.dev). */

@font-face { font-family: 'Fraunces'; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Fraunces'; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/fraunces-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #0b0e14;
  --ink: #f4e9dc;
  --ink-2: #e4d5c1;
  --muted: #cdbda8;
  --muted-2: #bfae99;
  --panel: rgba(27, 23, 19, 0.95);
  --panel-2: #14100d;
  --line: rgba(255, 170, 100, 0.2);
  --line-2: #4a3a2c;
  --ember: #ff8a3d;
  --amber: #ffc078;
  --ok: #8fdca4;
  --warn: #ffc078;
  --bad: #ffa59a;
  --focus: #ffd9a8;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
  --r: 16px;
  color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  overflow-x: hidden;
}
a { color: var(--amber); text-underline-offset: 3px; text-decoration-color: rgba(255, 192, 120, 0.5); }
a:hover { color: #ffe2bd; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; }
.pt-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ scene */
.cf-scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 120% 50% at 50% 108%, rgba(255, 120, 40, 0.2), transparent 70%),
    linear-gradient(180deg, #070a11 0%, #0b0e14 38%, #12100f 78%, #14110f 100%);
}
.cf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cf-moon {
  position: absolute; top: 74px; right: 18px; width: 48px; height: 48px;
  background: url("art/moon.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(243, 232, 210, 0.45)); opacity: 0.9;
}
.cf-pines { position: absolute; bottom: 0; height: 78vh; width: 42vh; background-size: auto 100%; background-repeat: no-repeat; opacity: 0.85; }
.cf-pines-l { left: -10vh; background-image: url("art/pines-left.svg"); background-position: left bottom; }
.cf-pines-r { right: -10vh; background-image: url("art/pines-right.svg"); background-position: right bottom; }

/* page-end hearth (in normal flow, so it never hides behind cards) */
.cf-hearth { position: relative; z-index: 0; height: 230px; margin-top: auto; pointer-events: none; overflow: hidden; }
.cf-ridge, .cf-ridge-near { position: absolute; left: 0; right: 0; bottom: 0; background-repeat: repeat-x; }
.cf-ridge { height: 150px; bottom: 16px; background-image: url("art/ridge.svg"); background-size: auto 100%; background-position: 40% bottom; opacity: 0.95; }
.cf-ridge-near { height: 90px; bottom: 6px; background-image: url("art/ridge-near.svg"); background-size: auto 100%; background-position: 0 bottom; }
.cf-glow {
  position: absolute; left: 50%; bottom: -40px; width: 150vw; max-width: 1400px; height: 360px;
  transform: translateX(-50%); transform-origin: 50% 100%;
  background: radial-gradient(ellipse 50% 56% at 50% 100%, rgba(255, 138, 61, 0.5), rgba(255, 120, 40, 0.18) 42%, transparent 74%);
  animation: cf-glow 3.4s ease-in-out infinite;
}
.cf-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(180deg, #0a0b0e, #060709); border-top: 1px solid #14181f; }
.cf-fire { position: absolute; left: 50%; bottom: 28px; width: 120px; aspect-ratio: 120 / 140; transform: translateX(-50%); }

/* the fire SVG (page hearth + small hearth inside the account card) */
.cf-fire-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cf-flames { transform-origin: 50% 118px; transform-box: view-box; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1), opacity 1s; }
.cf-fl { transform-box: fill-box; transform-origin: 50% 100%; }
.cf-fl-outer { animation: cf-flick-a 1.7s ease-in-out infinite; }
.cf-fl-mid { animation: cf-flick-b 1.3s ease-in-out infinite; }
.cf-fl-inner { animation: cf-flick-a 0.95s ease-in-out infinite reverse; }
.cf-fl-core { animation: cf-flick-b 0.8s ease-in-out infinite; }
.cf-fl-side-l { animation: cf-flick-b 1.15s ease-in-out infinite; }
.cf-fl-side-r { animation: cf-flick-a 1.4s ease-in-out infinite; }
.cf-bed { animation: cf-bed 2.4s ease-in-out infinite; }
[data-fire="embers"] .cf-flames { transform: scale(0.28); opacity: 0.85; }
[data-fire="embers"] .cf-glow { opacity: 0.35; }
.cf-flare .cf-fire, .cf-flare.pt-hearth-mini { animation: cf-flare-fire 1.5s ease-out; }
.cf-flare .cf-glow { animation: cf-flare-glow 1.5s ease-out; }
.cf-still .cf-glow, .cf-still .cf-fl, .cf-still .cf-bed { animation: none; }

@keyframes cf-flick-a { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 25% { transform: scale(0.94, 1.08) skewX(2.5deg); } 55% { transform: scale(1.04, 0.94) skewX(-2deg); } 80% { transform: scale(0.97, 1.05) skewX(1deg); } }
@keyframes cf-flick-b { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 30% { transform: scale(1.06, 0.92) skewX(-3deg); } 60% { transform: scale(0.92, 1.1) skewX(2deg); } 85% { transform: scale(1.02, 0.97) skewX(-1deg); } }
@keyframes cf-bed { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.85; } }
@keyframes cf-glow { 0%, 100% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.04, 1.02); } 70% { transform: translateX(-50%) scale(0.98); } }
@keyframes cf-flare-fire { 0% { filter: brightness(1); } 18% { filter: brightness(1.5) saturate(1.2) drop-shadow(0 0 24px rgba(255, 150, 60, 0.9)); } 100% { filter: brightness(1); } }
@keyframes cf-flare-glow { 0% { opacity: 0.8; } 20% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 0.8; filter: none; } }

/* ------------------------------------------------------------------ top bar */
.pt-top {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px 10px;
}
.pt-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 20px/1 var(--serif); margin-right: auto; min-height: 44px; }
.pt-brand::before {
  content: ""; width: 24px; height: 28px; background: url("art/flame-mark.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.7)); animation: cf-flick-a 1.8s ease-in-out infinite; transform-origin: 50% 100%;
}
.pt-user { display: inline-flex; align-items: center; gap: 10px; }
.pt-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 192, 120, 0.5); background: #2a211a; object-fit: cover; flex: none; }
.pt-user-name { font-weight: 600; color: var(--ink-2); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-nav { order: 3; width: 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pt-nav a {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px;
  background: rgba(20, 16, 13, 0.85); border: 1px solid rgba(255, 170, 100, 0.16); border-radius: 12px;
}
.pt-nav a:hover { border-color: rgba(255, 192, 120, 0.5); color: var(--ink); }
.pt-nav a[aria-current="page"] { color: #1a0e06; background: var(--ember); border-color: #ffa869; box-shadow: 0 0 16px rgba(255, 138, 61, 0.35); }

/* ------------------------------------------------------------------ layout */
.pt-main {
  position: relative; z-index: 1;
  width: 100%; max-width: 620px; margin: 0 auto;
  padding: 10px 16px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
body[data-page="admin"] .pt-main { max-width: 1040px; }
body[data-page="map"] .pt-main { max-width: none; padding: 0 12px 12px; flex: 1; }

.pt-hero { text-align: center; padding: 28px 0 6px; }
.pt-kicker { margin: 0; color: var(--amber); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.pt-title {
  margin: 8px 0 10px; font: 600 clamp(40px, 12vw, 64px)/1.05 var(--serif); color: var(--ink); letter-spacing: -0.01em;
  text-shadow: 0 0 28px rgba(255, 138, 61, 0.35), 0 2px 0 rgba(0, 0, 0, 0.5);
}
.pt-lead { margin: 0 auto; max-width: 36ch; color: var(--ink-2); font-size: 18px; text-shadow: 0 1px 8px #000; }
.pt-h1 { margin: 6px 0 0; font: 600 30px/1.15 var(--serif); color: var(--ink); text-shadow: 0 0 22px rgba(255, 138, 61, 0.3); }
.pt-h2 { margin: 0 0 12px; font: 600 23px/1.25 var(--serif); color: var(--ink); }
.pt-h3 { margin: 18px 0 8px; font: 600 17px/1.3 var(--serif); color: var(--amber); }
.pt-text { margin: 0; color: var(--ink-2); }
.pt-text + .pt-text { margin-top: 10px; }
.pt-muted { color: var(--muted-2); font-size: 15px; }
.pt-small { font-size: 14px; color: var(--muted-2); margin: 10px 0 0; }

/* ------------------------------------------------------------------ cards */
.pt-card {
  position: relative; padding: 22px 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 -14px 46px -22px rgba(255, 138, 61, 0.28), 0 24px 40px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 200, 140, 0.08);
  animation: cf-rise 0.45s ease-out both;
}
@keyframes cf-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pt-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pt-card-head .pt-h2 { margin: 0; }

.pt-hearth-mini { width: 54px; height: 63px; flex: none; position: relative; }
.pt-hearth-mini::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 90px; height: 40px; transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 138, 61, 0.35), transparent 70%); pointer-events: none;
}
.pt-hearth-mini[data-fire="embers"]::after { opacity: 0.35; }

/* ------------------------------------------------------------------ buttons + fields */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 20px; border-radius: 12px;
  font: 700 17px/1.2 var(--font); color: var(--ink); text-decoration: none; text-align: center;
  background: #241d17; border: 1.5px solid #6b533d; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, border-color 0.2s, background-color 0.2s;
}
.pt-btn:hover { border-color: var(--amber); color: var(--ink); }
.pt-btn:active { transform: translateY(1px) scale(0.99); }
.pt-btn:disabled { opacity: 0.7; cursor: progress; }
.pt-btn--primary {
  color: #1a0e06; background-color: #ff8a3d; border-color: #ffa869;
  background-image: linear-gradient(180deg, rgba(255, 220, 170, 0.35), rgba(255, 138, 61, 0) 60%);
  box-shadow: 0 0 22px rgba(255, 138, 61, 0.4), 0 6px 16px -6px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 235, 205, 0.5);
}
.pt-btn--primary:hover { color: #1a0e06; background-color: #ff9a57; border-color: #ffc078; box-shadow: 0 0 30px rgba(255, 138, 61, 0.6), 0 6px 16px -6px rgba(0, 0, 0, 0.8); }
.pt-btn--ghost { background: transparent; color: var(--amber); }
.pt-btn--ok { color: #0c2414; background-color: #8fdca4; border-color: #b6ecc4; box-shadow: 0 0 18px rgba(143, 220, 164, 0.35); }
.pt-btn--ok:hover { color: #0c2414; background-color: #a6e6b7; }
.pt-btn--danger { color: var(--bad); background: transparent; border-color: #7a3a33; }
.pt-btn--danger:hover { color: #ffd0c9; border-color: var(--bad); }
.pt-btn--danger.is-armed { color: #fff; background: #b3261e; border-color: #e0574b; }
.pt-btn--small { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.pt-btn--wide { width: 100%; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pt-actions .pt-btn { flex: 1 1 auto; }

.pt-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.pt-label { color: var(--amber); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.pt-input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 700 19px/1.3 var(--font); color: var(--amber); letter-spacing: 0.02em;
  background: #110d0a; border: 1.5px solid #4f3d2d; border-radius: 12px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}
.pt-input::placeholder { color: #a8957f; font-weight: 400; opacity: 1; }
.pt-input:focus { outline: none; border-color: var(--ember); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 138, 61, 0.28), 0 0 22px rgba(255, 138, 61, 0.25); }
.pt-check { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 16px; color: var(--ink-2); cursor: pointer; min-height: 44px; }
.pt-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: #ff8a3d; flex: none; }
.pt-error {
  margin: 0 0 14px; padding: 10px 12px; color: #ffcbc2; font-weight: 600;
  background: rgba(120, 30, 20, 0.4); border: 1px solid rgba(255, 140, 120, 0.45); border-radius: 10px;
}
.pt-banner {
  padding: 12px 14px; border-radius: 12px; color: #ffe8cc;
  background: rgba(80, 45, 15, 0.92); border: 1px solid rgba(255, 192, 120, 0.45);
}

/* ------------------------------------------------------------------ steps (landing) */
.pt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.pt-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; counter-increment: step; color: var(--ink-2); }
.pt-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font: 600 19px/1 var(--serif); color: #1a0e06; background: var(--amber); box-shadow: 0 0 14px rgba(255, 192, 120, 0.45);
}
.pt-steps b { display: block; color: var(--ink); font-size: 18px; }

/* ------------------------------------------------------------------ link code */
.pt-words { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: w; }
.pt-word {
  counter-increment: w; position: relative; display: flex; align-items: baseline; gap: 8px;
  padding: 12px 12px 12px 14px; border-radius: 12px; min-width: 0;
  background: #120d09; border: 1.5px solid rgba(255, 192, 120, 0.4);
  box-shadow: inset 0 0 20px rgba(255, 138, 61, 0.12), 0 0 16px rgba(255, 138, 61, 0.14);
  font: 400 20px/1.2 var(--mono); color: #d8c4a8; overflow: hidden;
  animation: pt-word-in 0.5s ease-out both;
}
.pt-word::before { content: counter(w); font: 600 13px/1 var(--font); color: var(--muted-2); }
.pt-word b { color: var(--amber); font-weight: 700; text-shadow: 0 0 12px rgba(255, 150, 60, 0.75); }
.pt-word:nth-child(2) { animation-delay: 0.06s; } .pt-word:nth-child(3) { animation-delay: 0.12s; }
.pt-word:nth-child(4) { animation-delay: 0.18s; } .pt-word:nth-child(5) { animation-delay: 0.24s; } .pt-word:nth-child(6) { animation-delay: 0.3s; }
@keyframes pt-word-in { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }

.pt-timer { margin: 14px 0 4px; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.pt-timer-bar { flex: 1; height: 8px; border-radius: 99px; background: #2a1d14; overflow: hidden; }
.pt-timer-fill { height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff6a2a, #ffc078); box-shadow: 0 0 12px rgba(255, 138, 61, 0.8); transition: width 1s linear; }
.pt-timer-text { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--amber); min-width: 4.5ch; text-align: right; }

.pt-howto { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.pt-howto li { color: var(--ink-2); }
.pt-howto li > span { display: block; margin-bottom: 6px; }
.pt-cmd {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px;
  background: #0d0a08; border: 1px dashed rgba(255, 192, 120, 0.45);
}
.pt-cmd code { flex: 1; min-width: 0; font: 600 17px/1.4 var(--mono); color: var(--amber); overflow-wrap: anywhere; }
.pt-wait { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink-2); font-style: italic; font-family: var(--serif); }
.pt-wait::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); flex: none;
  box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.6); animation: pt-ping 1.6s ease-out infinite;
}
@keyframes pt-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(255, 138, 61, 0); } }

/* ------------------------------------------------------------------ account */
.pt-account-name { margin: 0; font: 600 28px/1.15 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.pt-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 99px; font-size: 14px; font-weight: 700; border: 1.5px solid currentColor; background: #1d1712; }
.pt-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pt-pill--online { color: var(--ok); }
.pt-pill--offline { color: var(--muted); }
.pt-pill--limbo { color: var(--warn); }
.pt-pill--locked { color: var(--bad); }
.pt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 0; }
.pt-fact { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid #3a2e24; }
.pt-fact dt { font-size: 13px; color: var(--muted-2); letter-spacing: 0.04em; }
.pt-fact dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); font-size: 17px; }
.pt-code-panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid #3a2e24; }

/* ------------------------------------------------------------------ approvals */
.pt-approval { border-color: rgba(255, 192, 120, 0.7); animation: cf-rise 0.45s ease-out both, pt-coal 2.2s ease-in-out infinite; }
@keyframes pt-coal { 0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 26px rgba(255, 138, 61, 0.25); } 50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 44px rgba(255, 138, 61, 0.55); } }
.pt-approval .pt-h2 { font-size: 21px; }
.pt-approval + .pt-approval { margin-top: -4px; }

/* ------------------------------------------------------------------ server info */
.pt-address { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: #0d0a08; border: 1px solid rgba(255, 192, 120, 0.3); }
.pt-address code { flex: 1; font: 700 19px/1.3 var(--mono); color: var(--amber); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ toast */
.pt-toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 12px;
  color: #1a0e06; background: var(--amber); font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 192, 120, 0.5);
}


/* ------------------------------------------------------------------ map */
.pt-map-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 4px 4px 10px; }
.pt-map-bar .pt-h1 { font-size: 24px; margin: 0; margin-right: auto; }
.pt-map {
  position: relative; flex: 1; min-height: 420px; height: calc(100dvh - 190px);
  border-radius: 14px; overflow: hidden; background: #0e1116;
  border: 1px solid var(--line); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 40px -10px rgba(255, 138, 61, 0.25);
}
.pt-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-map-empty { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; }
.pt-map-empty .pt-card { max-width: 440px; }
.pt-embers-art { width: 72px; height: 45px; margin: 0 auto 10px; background: url("art/embers.svg") center / contain no-repeat; }
body.pt-offline-page { display: grid; place-items: center; padding: 20px; background: #0e1116; }

/* ------------------------------------------------------------------ admin */
.pt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-stat { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.pt-stat dt { color: var(--muted-2); font-size: 14px; }
.pt-stat dd { margin: 4px 0 0; font: 600 30px/1 var(--serif); color: var(--ink); }
.pt-switch { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); min-height: 44px; cursor: pointer; }
.pt-switch input { width: 22px; height: 22px; accent-color: #ff8a3d; }
.pt-search { display: flex; gap: 10px; margin-bottom: 14px; }
.pt-search .pt-input { font-size: 17px; font-weight: 600; min-height: 48px; }
.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th { text-align: left; font-size: 13px; color: var(--muted-2); font-weight: 600; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid #3a2e24; }
.pt-table td { padding: 12px 10px; border-bottom: 1px solid #2a2119; vertical-align: middle; color: var(--ink-2); }
.pt-table td b { color: var(--ink); }
.pt-row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pt-audit { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.pt-audit li { display: grid; grid-template-columns: 12.5em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #2a2119; color: var(--ink-2); }
.pt-audit time { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pt-online { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) {
  .pt-table thead { display: none; }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
  .pt-table tr { padding: 12px 0; border-bottom: 1px solid #3a2e24; }
  .pt-table td { border: 0; padding: 4px 0; }
  .pt-row-actions { justify-content: flex-start; margin-top: 6px; }
  .pt-audit li { grid-template-columns: 1fr; gap: 2px; }
}

/* ------------------------------------------------------------------ footer links */
.pt-foot { position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 6px 16px 0; }
.pt-foot a { display: inline-block; padding: 10px 4px; font-weight: 600; text-shadow: 0 1px 6px #000; }

/* ------------------------------------------------------------------ larger screens */
@media (min-width: 760px) {
  .pt-nav { order: 0; width: auto; }
  .pt-nav a { flex: 0 0 auto; }
  .pt-words { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cf-moon { top: 96px; right: 8vw; width: 84px; height: 84px; }
  .cf-pines { height: 92vh; width: 48vh; opacity: 1; }
  .cf-pines-l { left: -2vw; }
  .cf-pines-r { right: -2vw; }
  .cf-hearth { height: 300px; }
  .cf-fire { width: 190px; bottom: 40px; }
  .cf-ridge { height: 220px; bottom: 26px; }
  .cf-ridge-near { height: 130px; bottom: 14px; }
  .cf-ground { height: 56px; }
  .pt-map { height: calc(100dvh - 150px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* keep each code word whole: bold first 4 letters + the rest, no gap in between */
.pt-word-text { min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ opening countdown */
.pt-countdown-card { text-align: center; border-color: rgba(255, 192, 120, 0.45); }
.pt-cd { display: flex; justify-content: center; gap: 10px; margin: 12px 0 8px; }
.pt-cd-cell {
  min-width: 70px; padding: 12px 8px 9px; border-radius: 14px;
  background: #120d09; border: 1.5px solid rgba(255, 192, 120, 0.4);
  box-shadow: inset 0 0 20px rgba(255, 138, 61, 0.12), 0 0 16px rgba(255, 138, 61, 0.14);
}
.pt-cd-num { display: block; font: 700 clamp(30px, 9vw, 44px)/1 var(--font); color: var(--amber); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 150, 60, 0.7); }
.pt-cd-unit { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.pt-cd-when { margin-top: 6px; }
