/* d.light Tanzania — Go the Extra Mile */
:root {
  /* d.light brand (from dlight.com): logo #EF4822, web accent #FF4612, ink #101828, slate #394B59 */
  --brand: #ef4822;
  --brand-web: #ff4612;
  --brand-hi: #ff7b52;   /* brand on dark backgrounds */
  --brand-deep: #b8330f;
  --brand-tint: #fff1eb;
  --dl-yellow: #ffc20e;  /* sunlight accent only */
  --dl-orange: #ff8a3d;
  --dl-charcoal: #101828;
  --dl-slate: #394b59;
  --dl-ink: #101828;
  --night: #1a1433;
  --night-2: #241c45;
  --paper: #fbf8f1;
  --card: #ffffff;
  --line: #ece6d8;
  --muted: #6d6878;
  --tz-green: #1eb53a;
  --tz-blue: #00a3dd;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(28, 20, 50, .12);
  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--dl-ink);
  font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: 700 15px/1 var(--font-head);
  padding: 12px 18px; border-radius: 999px; background: #fff; color: var(--dl-ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
  background: linear-gradient(180deg, #ff6433, var(--brand-web));
  color: #fff; box-shadow: 0 6px 0 var(--brand-deep), 0 12px 24px rgba(255, 70, 18, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--brand-deep), 0 16px 30px rgba(255, 70, 18, .45); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-sm { padding: 9px 14px; font-size: 13px; box-shadow: 0 4px 0 var(--brand-deep); }
.btn-lg { padding: 16px 26px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); color: var(--dl-ink);
  border-bottom: 3px solid var(--brand-web);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-sub { font: 700 12px/1 var(--font-head); letter-spacing: 2.5px; text-transform: uppercase; color: var(--dl-slate); padding-left: 12px; border-left: 2px solid var(--brand); }
.brand-logo { height: 50px; width: auto; display: block; margin-block: -4px; }
.foot-logo { height: 34px; width: auto; }
.topbar-mid { font: 600 14px var(--font-head); color: var(--dl-slate); }
.topbar-mid b { color: var(--brand); }

/* ---------- hero scene ---------- */
.hero { position: relative; background: var(--night); }
.scene-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 110px); min-height: 520px; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.sun-flare circle { animation: flare 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes flare { from { transform: scale(.9); opacity: .35; } to { transform: scale(1.15); opacity: .6; } }
.clouds-belt { animation: drift 40s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
.star { animation: twinkle 3s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }

.sv-title { font: 800 17px var(--font-head); fill: var(--brand-hi); letter-spacing: 2px; }
.sv-sub { font: 600 11px var(--font-body); fill: #fff; letter-spacing: .5px; }
.camp-label { font: 700 14px var(--font-head); fill: #fff; paint-order: stroke; stroke: rgba(20, 14, 40, .85); stroke-width: 5px; stroke-linejoin: round; }
.camp-alt { font: 600 10px var(--font-body); fill: #ffc9b3; paint-order: stroke; stroke: rgba(20, 14, 40, .75); stroke-width: 3px; }
.camp.reached .camp-tent { fill: var(--brand-web); }
.camp .camp-tent { fill: #b9aed6; transition: fill .6s; }

/* flag wave */
.flag-wave { animation: wave 1.1s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: left center; }
@keyframes wave { from { transform: skewY(-5deg) scaleX(.94); } to { transform: skewY(5deg) scaleX(1); } }
.summit-flag { transition: opacity 1s; }

/* climber */
.shirt-logo { font: 800 7.5px var(--font-head); fill: var(--dl-charcoal); letter-spacing: -.2px; }
.climber .leg, .climber .arm { transform-box: fill-box; transform-origin: 50% 0; }
.climber-bob { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-1.2px); } }
.climber.walking .climber-bob { animation: bob .42s ease-in-out infinite; }
.climber.walking .leg-f { animation: swing .42s ease-in-out infinite alternate; }
.climber.walking .leg-b { animation: swing .42s ease-in-out infinite alternate-reverse; }
.climber.walking .arm-b { animation: swing .42s ease-in-out infinite alternate; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes swing { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.climber.cheer .climber-bob { animation: jump .6s ease-in-out 4; }
@keyframes jump { 50% { transform: translateY(-16px); } }
#climberPos { filter: drop-shadow(0 0 10px rgba(255, 210, 60, .55)); }

/* markers */
.marker { cursor: pointer; }
.marker .pin { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .2s ease; }
.marker:hover .pin, .marker:focus .pin, .marker.active .pin { transform: scale(1.6); }
.marker.pop .pin { animation: pop .8s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.marker .ring { fill: none; stroke: #fff; stroke-width: 2; }
.marker text { font: 800 9px var(--font-head); pointer-events: none; }
.marker:focus { outline: none; }
.marker.dim { opacity: .18; }

/* official "The Extra Mile" CSW 2026 badge */
.hud-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hud-badge { width: 104px; height: auto; flex: none; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)); transform: rotate(4deg); animation: badgeIn .9s cubic-bezier(.2, 1.4, .4, 1) .3s both; }
@keyframes badgeIn { from { transform: rotate(-20deg) scale(.4); opacity: 0; } }
.trail-sign image { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.form-logo { float: right; width: 78px; height: auto; margin: 0 34px 0 12px; transform: rotate(4deg); }
.sb-badge { width: 110px; height: auto; display: block; margin: -70px auto 8px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4)); }
.foot-badge { height: 44px; width: auto; }
body.tv .hud-badge { width: 130px; }

/* HUD */
.hud {
  position: absolute; left: clamp(16px, 3vw, 44px); top: clamp(16px, 4vh, 44px); z-index: 4;
  width: min(410px, calc(100% - 32px)); padding: 22px 24px 24px; color: #fff;
  background: linear-gradient(160deg, rgba(26, 20, 51, .78), rgba(26, 20, 51, .5));
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.hud-kicker { font: 600 10.5px var(--font-head); letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-hi); }
.hud-kicker .sw { color: #ffd2c2; }
.hud-title { font: 900 clamp(32px, 4vw, 48px)/1.02 var(--font-head); margin: 8px 0 8px; letter-spacing: -1px; }
.hud-title .hl {
  background: linear-gradient(90deg, var(--brand-web), #ff9a5c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hud-lede { margin: 0 0 16px; opacity: .88; font-size: 14px; }
.hud-stats { display: flex; gap: 26px; margin-bottom: 12px; }
.stat-num { font: 800 34px/1 var(--font-head); color: var(--brand-hi); font-variant-numeric: tabular-nums; }
.stat-of { font-size: 16px; color: #fff; opacity: .7; margin-left: 2px; }
.stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; margin-top: 4px; }
.progress { position: relative; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.progress-bar {
  height: 100%; width: 0; border-radius: 99px; transition: width 1.4s cubic-bezier(.3, .8, .3, 1);
  background: linear-gradient(90deg, var(--brand-deep), var(--brand-web) 60%, #ff9a5c);
}
.progress-glow { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); width: 30%; animation: shine 2.6s linear infinite; }
@keyframes shine { from { transform: translateX(-120%); } to { transform: translateX(400%); } }
.hud-stretch { font-size: 12.5px; margin: -2px 0 10px; color: #ffd2c2; }
.hud-stretch b { color: #fff; }
.hud-stretch.unlocked { color: #9ff0b4; }
#goal { display: inline-block; }
#goal.flip { animation: goalFlip .9s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes goalFlip { 0% { transform: rotateX(90deg); color: #fff; } 100% { transform: none; } }
.stage-target-text { font: 800 10.5px var(--font-head); fill: #fff; letter-spacing: .6px; }
.stage-flag { opacity: 0; transition: opacity 1s; }
.stage-camp.stage-done .stage-flag { opacity: 1; }
.stage-camp.stage-done .stage-target { display: none; }
.stage-target { animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes pulse { 50% { opacity: .65; } }
.hud-next { font-size: 13px; margin: 10px 0 18px; opacity: .9; min-height: 1.5em; }
.hud-next b { color: var(--brand-hi); }

.summit-banner {
  position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 6; text-align: center;
  padding: 22px 34px; border-radius: 24px; color: #fff;
  background: linear-gradient(180deg, #ff6433, var(--brand-deep)); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: bannerIn 1s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none;
}
@keyframes bannerIn { from { transform: translate(-50%, -30%) scale(.6); opacity: 0; } }
.sb-kicker { font: 700 14px var(--font-head); letter-spacing: 2px; text-transform: uppercase; color: #ffe0d4; }
.sb-title { font: 900 clamp(24px, 3.4vw, 42px)/1.1 var(--font-head); }
.sb-sub { font-size: 14px; margin-top: 4px; }

/* tooltip over markers */
.tooltip {
  position: absolute; z-index: 8; pointer-events: none; max-width: 260px;
  background: #fff; color: var(--dl-ink); border-radius: 14px; padding: 10px 12px; font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35); transform: translate(-50%, calc(-100% - 14px));
}
.tooltip::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.tooltip .tt-name { font: 700 13px var(--font-head); }
.tooltip .tt-msg { color: #444; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* TV spotlight card */
.spotlight {
  position: absolute; right: clamp(16px, 3vw, 44px); bottom: 70px; z-index: 6; width: min(460px, calc(100% - 32px));
  background: rgba(255, 255, 255, .96); border-radius: 22px; padding: 20px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  animation: spotIn .7s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes spotIn { from { transform: translateY(30px); opacity: 0; } }
.spotlight .sp-msg { font: 600 20px/1.35 var(--font-head); margin: 10px 0 12px; }
.spotlight .sp-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-top: 6px; }

/* ticker */
.ticker { display: flex; align-items: center; background: var(--dl-charcoal); color: #fff; height: 44px; overflow: hidden; border-top: 3px solid var(--brand-web); }
.ticker-label {
  flex: none; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--brand-web); color: #fff;
  font: 800 13px var(--font-head); letter-spacing: 2px;
}
.ticker-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-inner { display: inline-block; padding-left: 100%; animation: tick var(--tick-dur, 60s) linear infinite; }
.ticker-inner span { margin-right: 48px; font-size: 14px; }
.ticker-inner b { color: var(--brand-hi); font-family: var(--font-head); }
@keyframes tick { to { transform: translateX(-100%); } }

/* ---------- wall ---------- */
.wall { max-width: 1280px; margin: 0 auto; padding: 48px clamp(16px, 3vw, 32px) 64px; }
.wall-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.wall-head h2 { font: 900 clamp(28px, 3vw, 40px)/1.1 var(--font-head); margin: 0 0 4px; letter-spacing: -.5px; }
.wall-head p { margin: 0; }
#search {
  width: min(340px, 100%); padding: 12px 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font: 500 15px var(--font-body); outline: none;
}
#search:focus { border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font: 600 13px var(--font-head); display: inline-flex; gap: 6px; align-items: center; transition: all .15s;
}
.chip .n { background: #f1ede3; border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.chip.on { background: var(--c, var(--dl-charcoal)); border-color: var(--c, var(--dl-charcoal)); color: var(--fg, #fff); }
.chip.on .n { background: rgba(255, 255, 255, .3); }
.teams { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 22px; font-size: 13px; }
.teams .t { background: #f1ede3; border-radius: 99px; padding: 4px 10px; }
.teams .t b { color: var(--brand); }

.grid { columns: 4 270px; column-gap: 18px; }
.card {
  break-inside: avoid; margin: 0 0 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative; border-top: 6px solid var(--c); animation: cardIn .5s ease both; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(28, 20, 50, .18); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.card .photo { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.card-body { padding: 16px 18px 14px; }
.tag {
  display: inline-flex; gap: 6px; align-items: center; font: 700 11px var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  color: var(--fg, #fff); background: var(--c); padding: 4px 10px; border-radius: 99px;
}
.tag .sw { opacity: .75; text-transform: none; letter-spacing: 0; font-weight: 600; }
.card .msg { font: 500 16px/1.45 var(--font-head); margin: 12px 0 14px; color: #222; word-wrap: break-word; }
.card .msg::before { content: "“"; color: var(--c); font-size: 1.6em; line-height: 0; vertical-align: -.35em; margin-right: 2px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--c); color: var(--fg, #fff); font: 800 13px var(--font-head);
}
.who .nm { font: 700 14px var(--font-head); line-height: 1.2; }
.who .meta { font-size: 12px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.step-no { font: 700 12px var(--font-head); color: var(--muted); }
.cheer {
  border: 0; background: var(--brand-tint); color: var(--brand-deep); border-radius: 99px; padding: 6px 12px; cursor: pointer; font: 700 13px var(--font-head);
  transition: transform .15s;
}
.cheer:hover { background: var(--brand-web); color: #fff; }
.cheer.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.25); } }
.del { position: absolute; top: 10px; right: 10px; border: 0; background: #b42318; color: #fff; border-radius: 99px; padding: 5px 10px; font-weight: 700; cursor: pointer; z-index: 2; }
.card.fresh { box-shadow: 0 0 0 4px var(--brand-web), var(--shadow); }

.empty { text-align: center; padding: 40px 16px; }
.empty-emoji { font-size: 54px; }

.foot {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: center; padding: 26px 16px 36px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 10, 30, .65); backdrop-filter: blur(4px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 26px;
  padding: 28px clamp(18px, 4vw, 34px); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); animation: modalIn .35s cubic-bezier(.2, 1.2, .4, 1) both;
}
@keyframes modalIn { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.modal-x { position: absolute; top: 12px; right: 14px; border: 0; background: #f3efe6; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; line-height: 1; }
.form-head h3 { font: 800 26px/1.15 var(--font-head); margin: 8px 0 4px; }
.form-head p { margin: 0 0 18px; }
.form-badge { display: inline-block; background: var(--brand-web); color: #fff; font: 800 12px var(--font-head); border-radius: 99px; padding: 5px 12px; letter-spacing: 1px; text-transform: uppercase; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin: 0 0 16px; border: 0; padding: 0; position: relative; }
.field > span, .field > legend { display: block; font: 700 13px var(--font-head); margin-bottom: 6px; padding: 0; }
.field input:not([type=file]), .field textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font: 500 15px var(--font-body); outline: none; background: #fffdf8;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.field textarea { resize: vertical; min-height: 96px; }
.counter { position: absolute; right: 12px; bottom: 10px; color: var(--muted); font-size: 11px; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat {
  position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; cursor: pointer; background: #fff;
  transition: all .15s;
}
.cat input { position: absolute; opacity: 0; pointer-events: none; }
.cat .e { font-size: 22px; display: block; }
.cat .l { font: 700 13px var(--font-head); display: block; }
.cat .s { font-size: 11px; color: var(--muted); }
.cat:hover { border-color: var(--c); }
.cat.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.drop {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 90px; border: 2px dashed #d8cfbd; border-radius: 16px;
  background: #fffdf8; cursor: pointer; overflow: hidden; transition: border-color .15s;
}
.drop:hover, .drop.drag { border-color: var(--brand); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-size: 13px; color: var(--muted); pointer-events: none; }
.drop-ico { font-size: 28px; }
.drop-preview { display: block; max-height: 240px; width: 100%; object-fit: cover; }
.drop-clear { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; background: rgba(0, 0, 0, .65); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.form-err { background: #fdecec; color: #a11; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }

.view-card { border-top: 10px solid var(--c); }
.view-card .v-photo { width: 100%; border-radius: 16px; margin: 14px 0 4px; max-height: 60vh; object-fit: contain; background: #f4f0e6; }
.view-card .v-msg { font: 600 22px/1.4 var(--font-head); margin: 16px 0 18px; }
.view-card .v-step { font: 700 12px var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-top: 16px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  background: var(--dl-charcoal); color: #fff; padding: 14px 20px; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  font-weight: 600; max-width: calc(100% - 32px); border-left: 6px solid var(--brand-web); pointer-events: none; animation: toastIn .4s cubic-bezier(.2, 1.3, .4, 1) both;
}
.toast b { color: var(--brand-hi); }
@keyframes toastIn { from { transform: translate(-50%, 30px); opacity: 0; } }

.admin-bar {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; gap: 8px; align-items: center;
  background: #fff; padding: 10px 12px; border-radius: 14px; box-shadow: var(--shadow); font-size: 13px; flex-wrap: wrap;
}
.admin-bar input { border: 2px solid var(--line); border-radius: 10px; padding: 7px 10px; }

/* ---------- TV mode ---------- */
body.tv .wall, body.tv .foot, body.tv .topbar .btn { display: none; }
body.tv .scene-wrap { aspect-ratio: auto; height: calc(100vh - 62px - 44px); max-height: none; }
body.tv .hud { transform-origin: top left; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .topbar-mid { display: none; }
  .scene-wrap { aspect-ratio: 5 / 4; min-height: 0; max-height: none; }
  .hud {
    position: relative; left: auto; top: auto; width: auto; margin: 0; border-radius: 0; border: 0;
    background: linear-gradient(180deg, #0e1030, #2a2058); backdrop-filter: none; box-shadow: none; padding: 22px 16px 20px;
  }
  .spotlight { bottom: 16px; }
}
@media (max-width: 560px) {
  .brand-logo { height: 40px; }
  .brand-sub { display: none; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .grid { columns: 1; }
  .hud-title { font-size: 34px; }
  .hud-badge { width: 84px; }
  .form-logo { width: 60px; margin-right: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
