/* Interfaz de juego de carreras de PlayStation 2 (Need for Speed Underground): acero oscuro, un solo
   acento verde ácido, todo en itálica técnica, paneles con esquinas cortadas y barras inclinadas.
   Encima, el gesto de moda: mucho negro, tipografía grande y katakana como etiqueta. */
:root {
  --ink: #050607;
  --steel: #11151a;
  --line: rgba(255, 255, 255, .13);
  --text: #f1f3f4;
  --mute: #8b939b;
  --acid: #c8ff2e;
  --acid-d: #6f9010;
  --red: #ff3d2e;
  --f: "Chakra Petch", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cut: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; color: var(--text); font-family: var(--f); font-weight: 500; overflow: hidden; overscroll-behavior: none; }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
a { color: inherit; }
small { font-size: 9px; letter-spacing: .18em; color: var(--mute); font-weight: 600; display: block; }
.jp { font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; font-style: normal; font-weight: 600; font-size: .62em; letter-spacing: .12em; opacity: .55; }

#stage { position: fixed; inset: 0; margin: 0 auto; max-width: calc(100dvh * 0.6); background: var(--ink); overflow: hidden; container-type: inline-size; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#vig { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 42%, transparent 38%, rgba(0, 0, 0, .85) 100%); }
.screen { position: absolute; inset: 0; display: none; }
.screen.on { display: block; }

.eyebrow { font-size: 10px; letter-spacing: .2em; font-weight: 600; color: var(--acid); }
.eyebrow i { font-style: normal; opacity: .5; margin: 0 2px; }
.eyebrow.red { color: var(--red); }
.lead { font-size: 14px; line-height: 1.4; color: #cfd4d8; }
.lead b { color: var(--acid); font-weight: 700; }
.fine { font-size: 12px; line-height: 1.45; color: var(--mute); }
.fine a { color: var(--text); text-underline-offset: 3px; }

/* Botón: barra inclinada. El principal va lleno de verde. */
.btn { position: relative; display: block; flex: 1; padding: 15px 10px 14px; font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .1em; text-align: center; text-decoration: none; color: var(--ink); background: var(--acid); clip-path: var(--cut); transition: transform .08s, filter .08s; }
.btn:active { transform: scale(.97); filter: brightness(1.25); }
.btn.ghost { color: var(--text); background: linear-gradient(180deg, #1c2228, #0d1014); box-shadow: inset 0 0 0 1px var(--line); }
.btn.wide { width: 100%; margin-top: 10px; font-size: 13px; padding: 13px 10px 12px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.acts { display: flex; gap: 10px; }
.acts.col { flex-direction: column; }
.link { font-size: 11px; letter-spacing: .16em; font-weight: 600; color: var(--mute); padding: 10px; }
.chip { font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: .12em; padding: 8px 14px 7px; color: var(--ink); background: var(--acid); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 16px 10px; }
.bar > button:first-child, #sheet-x { font-size: 11px; letter-spacing: .16em; font-weight: 600; color: var(--mute); padding: 8px 0; }
.bar .ttl { font-style: italic; font-weight: 700; font-size: 17px; letter-spacing: .08em; }

/* ---------- Menú principal ---------- */
#title video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#title .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 7, .7) 0%, rgba(5, 6, 7, 0) 18%, rgba(5, 6, 7, 0) 30%, rgba(5, 6, 7, .93) 56%, var(--ink) 100%), repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px); }
.brand { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; }
.brand img { width: 108px; filter: invert(1); }
.brand .jp { font-size: 10px; }
.menu { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 18px max(16px, env(safe-area-inset-bottom)); }
h1 { font-style: italic; font-weight: 700; font-size: clamp(40px, 13.6cqw, 58px); line-height: .9; letter-spacing: -.01em; margin: 8px 0 10px -2px; }
h1 b { color: var(--acid); }
.menu .lead { margin-bottom: 14px; max-width: 30em; }
/* Lista del menú: cada opción es una barra con número, como en el garaje de Underground. */
.item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; margin-top: 6px; padding: 0 14px 0 16px; text-align: left; background: linear-gradient(90deg, rgba(28, 34, 40, .92), rgba(12, 15, 18, .78)); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: transform .08s, filter .08s; }
.item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acid); transform: skewX(-12deg); transform-origin: bottom; }
.item i { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--acid); width: 18px; }
.item span { font-style: italic; font-weight: 700; font-size: 19px; letter-spacing: .06em; flex: 1; }
.item em { font-style: normal; font-size: 10px; letter-spacing: .08em; color: var(--mute); text-transform: uppercase; }
.item:active { transform: translateX(6px); filter: brightness(1.4); }
.item.primary { height: 56px; background: var(--acid); color: var(--ink); }
.item.primary i, .item.primary em { color: var(--ink); opacity: .65; }
.item.primary span { font-size: 26px; }
.item.primary::before { display: none; }
.strip { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 10px; letter-spacing: .14em; font-weight: 600; color: var(--mute); min-height: 20px; }
.strip b { color: var(--acid); font-weight: 700; }
.strip button { border-bottom: 1px solid var(--mute); padding: 3px 0; }

/* ---------- En carrera ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; display: none; text-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
#hud.on { display: block; }
#hud b { display: block; font-style: italic; font-weight: 700; font-variant-numeric: tabular-nums; }
.h-score { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 14px; }
.h-score b { font-size: 30px; line-height: 1; letter-spacing: .02em; }
.h-hi { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; }
.h-hi b { font-size: 15px; color: var(--acid); margin-top: 3px; }
.h-coins { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px; text-align: right; }
.h-coins b { display: flex !important; justify-content: flex-end; align-items: center; gap: 6px; font-size: 20px; margin-top: 2px; }
.coin { width: 13px; height: 13px; border-radius: 50%; background: #f0c545; box-shadow: inset -2px -2px 0 #a67c0c; display: inline-block; flex: none; }
/* Velocímetro: número grande y una fila de segmentos que se va llenando. */
.h-speed { position: absolute; left: 14px; bottom: max(18px, env(safe-area-inset-bottom)); }
.h-speed b { font-size: 34px; line-height: .9; display: inline-block !important; }
.h-speed small { display: inline-block; margin-left: 6px; }
.segs { display: flex; gap: 2px; margin-top: 6px; transform: skewX(-18deg); transform-origin: left; }
.segs i { width: 7px; height: 12px; background: rgba(255, 255, 255, .16); }
.segs i.on { background: var(--acid); }
.segs i.hot.on { background: var(--red); }
/* Medidor de persecución: qué tan cerca viene la bolsa. */
#heat { position: absolute; right: 14px; bottom: max(18px, env(safe-area-inset-bottom)); width: 42%; text-align: right; opacity: .0; transition: opacity .2s; }
#heat.on { opacity: 1; }
#heat small { color: var(--red); }
#heat .meter { height: 10px; margin-top: 6px; background: rgba(255, 255, 255, .14); transform: skewX(-18deg); overflow: hidden; }
#heat .meter i { display: block; height: 100%; width: 0; background: var(--red); margin-left: auto; }
#heat.on small { animation: blink .45s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
#mute { position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 46px); right: 8px; padding: 10px 6px; pointer-events: auto; font-size: 9px; letter-spacing: .16em; font-weight: 600; color: var(--mute); text-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
#garage.photo ~ #mute, #garage.shot ~ #mute { display: none; }
#hint { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font-style: italic; font-weight: 700; font-size: 20px; letter-spacing: .08em; line-height: 1.15; opacity: 0; transition: opacity .18s; color: var(--acid); }
#hint.on { opacity: 1; }
#hint big { display: block; font-style: normal; font-size: 58px; line-height: 1; margin-bottom: 6px; color: var(--text); animation: nudge .7s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(var(--nx, 0), var(--ny, 0)); } }
/* Aviso en carrera: una barra verde que entra de lado. */
#toast { position: absolute; left: 0; top: 104px; max-width: 86%; padding: 9px 26px 8px 16px; background: var(--acid); color: var(--ink); text-shadow: none; font-style: italic; font-weight: 700; font-size: 17px; letter-spacing: .06em; line-height: 1.1; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transform: translateX(-105%); transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
#toast.on { transform: none; }
/* Zona nueva: tarjeta al cruzar la cerradura. Lo que dura el pastel o el frasco: barra sobre el velocímetro. */
#zone { position: absolute; left: 0; right: 0; top: max(212px, 25%); text-align: center; opacity: 0; }
#zone.on { animation: zone 3.2s cubic-bezier(.2, .9, .3, 1) both; }
#zone small { color: var(--acid); font-size: 10px; letter-spacing: .22em; }
#zone small i { font-style: normal; opacity: .6; }
#zone b { font-size: clamp(26px, 8.6cqw, 36px); line-height: 1; letter-spacing: .03em; margin-top: 5px; }
#zone em { display: inline-block; margin-top: 8px; padding: 4px 13px 3px; font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--text); text-shadow: none; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
@keyframes zone { 0% { opacity: 0; transform: translateX(-28px) skewX(-8deg); } 9%, 84% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(28px); } }
#pwr { position: absolute; left: 14px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 64px); width: 44%; opacity: 0; transition: opacity .15s; }
#pwr.on { opacity: 1; }
#pwr small { color: var(--acid); }
#pwr .meter { height: 10px; margin-top: 6px; background: rgba(255, 255, 255, .14); transform: skewX(-18deg); overflow: hidden; }
#pwr .meter i { display: block; height: 100%; width: 0; background: var(--acid); }
#pwr.end small { animation: blink .3s steps(1) infinite; }
#toast small { color: var(--ink); opacity: .7; letter-spacing: .08em; font-size: 10px; margin-top: 3px; font-style: normal; }

/* ---------- Wardrobe ---------- */
#garage { background: linear-gradient(180deg, rgba(5, 6, 7, .55) 0%, rgba(5, 6, 7, 0) 14%, rgba(5, 6, 7, 0) 52%, rgba(5, 6, 7, .9) 66%, var(--ink) 100%); }
#g-drag { position: absolute; inset: 0; touch-action: none; }
.dock { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 14px max(14px, env(safe-area-inset-bottom)); transition: transform .3s ease, opacity .3s; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.tabs button { flex: 1; padding: 9px 4px 8px; font-style: italic; font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--mute); background: rgba(20, 24, 29, .85); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.tabs button.on { color: var(--ink); background: var(--acid); }
.rail { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; touch-action: pan-x; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { display: none; }
.tile { position: relative; flex: none; width: 76px; height: 92px; background: linear-gradient(180deg, #1b2026, #0c0f12) center / cover; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); scroll-snap-align: center; }
.tile u { position: absolute; inset: 5px 5px 12px; background: no-repeat left center / 200% 100%; }
.tile.on { background: linear-gradient(180deg, #2a3310, #12160a); box-shadow: inset 0 0 0 2px var(--acid); }
.tile.on::after { content: "ON"; position: absolute; left: 6px; bottom: 3px; font-size: 8px; font-weight: 700; letter-spacing: .14em; color: var(--acid); }
.tile.sel { box-shadow: inset 0 0 0 2px var(--text); }
.tile.wait u { animation: tile-wait .45s ease-in-out infinite alternate; }
@keyframes tile-wait { from { opacity: .3; } to { opacity: 1; } }
.tile.lock u { filter: brightness(0) blur(1.5px); opacity: .55; }
.tile.lock::before { content: "LOCK"; position: absolute; z-index: 1; left: 0; right: 0; top: 36px; text-align: center; font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: .14em; color: var(--red); }
.tile s { position: absolute; right: 5px; bottom: 3px; font-size: 8px; font-weight: 600; letter-spacing: .06em; text-decoration: none; color: var(--mute); }
.info { min-height: 74px; padding: 8px 12px 9px; margin-bottom: 9px; background: linear-gradient(180deg, rgba(24, 29, 34, .9), rgba(10, 12, 15, .9)); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.info h3 { font-style: italic; font-weight: 700; font-size: 16px; letter-spacing: .04em; line-height: 1.1; }
.info .row2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 5px; font-size: 11px; letter-spacing: .08em; color: var(--mute); }
.info .row2 b { color: var(--acid); font-weight: 700; font-size: 14px; font-style: italic; letter-spacing: .04em; }
.info p { font-size: 11px; line-height: 1.35; color: #c0c6cb; margin-top: 5px; }
.info p.warn { color: var(--red); }
.bar2 { height: 6px; margin-top: 7px; background: rgba(255, 255, 255, .12); transform: skewX(-18deg); }
.bar2 i { display: block; height: 100%; background: var(--acid); }
/* Modo foto */
#photo, #shot { position: absolute; inset: 0; display: none; }
#garage.photo .dock, #garage.photo .bar, #garage.shot .dock, #garage.shot .bar { transform: translateY(30px); opacity: 0; pointer-events: none; }
#garage.photo { background: none; }
#garage.photo #photo { display: block; pointer-events: none; }
#garage.shot #shot { display: flex; flex-direction: column; background: rgba(5, 6, 7, .94); padding: max(18px, env(safe-area-inset-top)) 22px max(16px, env(safe-area-inset-bottom)); gap: 14px; }
#photo .corners i { position: absolute; width: 22px; height: 22px; border: 2px solid var(--acid); }
#photo .corners i:nth-child(1) { top: 9%; left: 7%; border-right: 0; border-bottom: 0; }
#photo .corners i:nth-child(2) { top: 9%; right: 7%; border-left: 0; border-bottom: 0; }
#photo .corners i:nth-child(3) { bottom: 23%; left: 7%; border-right: 0; border-top: 0; }
#photo .corners i:nth-child(4) { bottom: 23%; right: 7%; border-left: 0; border-top: 0; }
#photo .tip { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: .2em; font-weight: 600; color: var(--mute); }
#photo .chips { position: absolute; left: 14px; right: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 60px); display: flex; gap: 5px; pointer-events: auto; }
#photo .chips button { flex: 1; padding: 8px 2px 7px; font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--mute); background: rgba(20, 24, 29, .88); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
#photo .chips button.on { color: var(--ink); background: var(--acid); }
#photo .acts { position: absolute; left: 14px; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); pointer-events: auto; }
#shot img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }

/* ---------- Final ---------- */
#over { background: linear-gradient(180deg, rgba(5, 6, 7, 0) 0%, rgba(5, 6, 7, 0) 24%, rgba(5, 6, 7, .94) 45%, var(--ink) 100%); pointer-events: none; opacity: 0; transition: opacity .35s ease; }
#over.on { pointer-events: auto; opacity: 1; }
#over .panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 18px max(14px, env(safe-area-inset-bottom)); }
.busted { font-style: italic; font-weight: 700; font-size: clamp(52px, 18cqw, 76px); line-height: .88; letter-spacing: -.01em; color: var(--text); margin: 4px 0 4px -3px; }
.cause { font-size: 12px; letter-spacing: .1em; color: var(--mute); text-transform: uppercase; margin-bottom: 12px; }
.reached { font-size: 10px; letter-spacing: .16em; font-weight: 600; color: var(--mute); margin: -6px 0 12px; }
.reached b { color: var(--acid); font-weight: 700; }
.reached i { font-style: normal; opacity: .5; }
.stats { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1px; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); margin-bottom: 10px; }
.stats > div { background: #0b0e11; padding: 9px 9px 8px; }
.stats b { display: block; font-style: italic; font-weight: 700; font-size: 17px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stats .main b { font-size: 27px; color: var(--acid); line-height: 1; }
.won { padding: 9px 14px 8px; margin-bottom: 8px; background: var(--acid); color: var(--ink); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); animation: slide .4s cubic-bezier(.2, .9, .3, 1); }
.won small { color: var(--ink); opacity: .7; }
.won strong { font-style: italic; font-weight: 700; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
@keyframes slide { 0% { transform: translateX(-100%); } }
#o-next { margin-bottom: 12px; font-size: 11px; letter-spacing: .06em; color: var(--mute); text-transform: uppercase; }
#o-next b { color: var(--text); font-weight: 700; }
#over nav { display: flex; justify-content: space-between; margin-top: 12px; }
#over nav button, #over nav a { font-size: 10px; letter-spacing: .14em; font-weight: 600; color: var(--mute); text-decoration: none; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .25); }

/* ---------- Hojas ---------- */
#sheet { background: var(--ink) repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 3px); overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; z-index: 5; }
.sheet-in { min-height: 100%; }
#sheet-body { padding: 4px 18px 44px; }
#sheet h2 { font-style: italic; font-weight: 700; font-size: clamp(30px, 10cqw, 42px); line-height: .92; margin: 10px 0 10px -2px; }
#sheet h2 b { color: var(--acid); }
#sheet .lead { margin-bottom: 16px; }
.count { font-size: 10px; letter-spacing: .2em; font-weight: 600; color: var(--red); margin-bottom: 16px; }
.rows .row { display: flex; align-items: center; gap: 10px; height: 38px; margin-top: 3px; padding: 0 12px 0 14px; background: linear-gradient(90deg, rgba(26, 31, 37, .9), rgba(12, 15, 18, .7)); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); font-variant-numeric: tabular-nums; }
.row .n { width: 30px; font-size: 11px; font-weight: 700; color: var(--mute); }
.row .a { flex: 1; font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-style: italic; font-weight: 700; font-size: 15px; }
.row.head { height: 22px; background: none; font-size: 9px; letter-spacing: .18em; color: var(--mute); font-weight: 600; }
.row.head span { font-size: 9px !important; font-style: normal !important; color: var(--mute); }
.row.first { height: 48px; }
.row.first .a, .row.first .s { font-size: 20px; color: var(--acid); }
.row.first .n { color: var(--acid); }
.row.me { background: var(--acid); color: var(--ink); }
.row.me .n { color: var(--ink); }
/* El primero cuando eres tú: sin esto el nombre y el puntaje quedan verde sobre verde. */
.row.first.me .a, .row.first.me .s { color: var(--ink); }
.row.empty { font-size: 13px; color: var(--mute); }
.rw { position: relative; padding: 11px 13px 12px; margin-top: 6px; background: linear-gradient(180deg, rgba(24, 29, 34, .9), rgba(10, 12, 15, .9)); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.rw .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rw h3 { font-style: italic; font-weight: 700; font-size: 16px; letter-spacing: .03em; line-height: 1.1; text-transform: uppercase; }
.rw .st { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--mute); white-space: nowrap; }
.rw.done { box-shadow: inset 0 0 0 1px var(--acid); }
.rw.done h3, .rw.done .st { color: var(--acid); }
.rw p { font-size: 12px; color: var(--mute); margin-top: 4px; line-height: 1.35; }
.rw .code { display: flex; gap: 8px; margin-top: 10px; }
.rw .code button { flex: 1; padding: 10px 6px 9px; font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: .08em; box-shadow: inset 0 0 0 1px var(--text); }
.rw .code button.go { background: var(--acid); color: var(--ink); box-shadow: none; }
form label { display: block; font-size: 9px; letter-spacing: .18em; font-weight: 600; margin: 16px 0 6px; color: var(--acid); }
form input[type=text], form input[type=email], form input[type=tel] { width: 100%; padding: 13px 12px; background: #0d1013; border: 0; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 17px; font-weight: 600; border-radius: 0; outline: none; user-select: text; -webkit-user-select: text; }
form input:focus { box-shadow: inset 0 0 0 2px var(--acid); }
form input::placeholder { color: #4d545b; }
#f-alias { font-style: italic; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 12px; line-height: 1.45; color: var(--mute); letter-spacing: 0; }
.check a { color: var(--text); text-underline-offset: 3px; }
.check input { width: 20px; height: 20px; accent-color: var(--acid); flex: none; margin-top: 1px; }
.err { color: var(--red); font-size: 12px; font-weight: 600; min-height: 16px; margin-bottom: 10px; }
.how { display: grid; grid-template-columns: 44px 1fr; gap: 16px 8px; margin: 18px 0 22px; font-size: 13px; line-height: 1.35; align-items: center; }
.how big { font-size: 30px; font-weight: 700; color: var(--acid); }
.how b { font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.how span { color: var(--mute); }
.how .coin { width: 24px; height: 24px; box-shadow: inset -3px -3px 0 #a67c0c; }
/* Looks de la comunidad */
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.look { position: relative; background: #0b0e11; clip-path: var(--cut); box-shadow: inset 0 0 0 1px var(--line); }
.look img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #0b0e11; cursor: pointer; }
.look img.wait { animation: tile-wait .6s ease-in-out infinite alternate; background: linear-gradient(180deg, #1b2026, #0c0f12); }
.look .meta { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px 8px; }
.look .meta b { font-style: italic; font-weight: 700; font-size: 13px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.look .meta small { margin-top: 1px; }
.look button { font-size: 12px; font-weight: 700; color: var(--mute); padding: 6px 2px 6px 8px; }
.look button.on { color: var(--acid); }
.look.mine { box-shadow: inset 0 0 0 1px var(--acid); }
/* La foto de un look en grande, sobre todo lo demás. */
#viewer { position: absolute; inset: 0; z-index: 8; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; background: rgba(3, 4, 5, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); touch-action: manipulation; }
#viewer.on { display: flex; animation: viewer-in .16s ease-out; }
#viewer figure { position: relative; width: min(100%, calc((100dvh - 150px) * .8)); margin: 0; background: #0b0e11; clip-path: var(--cut); box-shadow: inset 0 0 0 1px var(--line); animation: viewer-pop .2s cubic-bezier(.2, .9, .3, 1.2); -webkit-user-select: none; user-select: none; }
#viewer img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; -webkit-user-drag: none; }
#viewer figcaption { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 12px; }
#viewer figcaption b { display: block; font-style: italic; font-weight: 700; font-size: 18px; letter-spacing: .04em; }
#viewer figcaption small { font-size: 10px; letter-spacing: .14em; color: var(--mute); }
#v-like { font-size: 18px; font-weight: 700; color: var(--mute); padding: 6px 2px 6px 16px; }
#v-like.on { color: var(--acid); }
#v-heart { position: absolute; left: 50%; top: 42%; font-style: normal; font-size: 120px; line-height: 1; color: var(--acid); opacity: 0; transform: translate(-50%, -50%) scale(.4); pointer-events: none; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); }
#v-heart.beat { animation: heart .7s ease-out; }
#viewer .tip { font-size: 9px; font-weight: 600; letter-spacing: .2em; color: var(--mute); }
#viewer .tip i { color: var(--acid); font-style: normal; }
@keyframes viewer-in { from { opacity: 0; } }
@keyframes viewer-pop { from { transform: scale(.92); opacity: 0; } }
@keyframes heart { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 35% { transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1); } }

#loading { position: absolute; inset: auto 0 0 0; height: 3px; z-index: 9; pointer-events: none; }
#loading span { position: absolute; right: 14px; bottom: 10px; font-size: 9px; letter-spacing: .2em; font-weight: 600; color: var(--mute); }
#loading i { display: block; height: 100%; width: 40%; background: var(--acid); animation: load 1s linear infinite; }
#loading.done { display: none; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
/* La meta que se persigue en carrera: nombre, barra y cuánto falta. */
#goal { position: absolute; left: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 52px); width: 46%; opacity: 0; transition: opacity .2s; }
#goal.on { opacity: 1; }
#goal small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--acid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
#goal .meter { height: 5px; margin-top: 4px; background: rgba(255, 255, 255, .16); transform: skewX(-18deg); overflow: hidden; }
#goal .meter i { display: block; height: 100%; width: 0; background: var(--acid); transition: width .2s linear; }
#goal em { display: block; margin-top: 4px; font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: .12em; color: var(--text); opacity: .75; }
#goal.near small, #goal.near em { animation: blink .5s steps(1) infinite; opacity: 1; }
#goal.secret small { color: var(--red); }
#goal.secret .meter i { background: var(--red); }
#flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 60%, rgba(200, 255, 46, 0) 30%, rgba(200, 255, 46, .55) 100%); }
#flash.on { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
#toast.win { font-size: 20px; padding-top: 12px; padding-bottom: 11px; box-shadow: 0 0 34px rgba(200, 255, 46, .55); }

/* Lo recién ganado, en la pantalla final. */
.loot { position: relative; padding: 10px 14px 10px; margin-bottom: 8px; background: linear-gradient(180deg, rgba(40, 51, 12, .96), rgba(16, 20, 8, .96)); box-shadow: inset 0 0 0 1px var(--acid); clip-path: var(--cut); animation: slide .4s cubic-bezier(.2, .9, .3, 1); overflow: hidden; }
.loot::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-18deg); animation: sheen 2.6s .5s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0% { left: -40%; } 45%, 100% { left: 130%; } }
.loot small { display: block; color: var(--acid); font-size: 9px; letter-spacing: .18em; font-weight: 600; }
.loot strong { display: block; margin-top: 2px; font-style: italic; font-weight: 700; font-size: 19px; line-height: 1.05; letter-spacing: .03em; text-transform: uppercase; }
.loot p { margin-top: 7px; font-size: 11px; line-height: 1.35; color: #cfd4d8; }
.loot.secret { background: linear-gradient(180deg, rgba(58, 14, 10, .96), rgba(18, 8, 7, .96)); box-shadow: inset 0 0 0 1px var(--red); }
.loot.secret small { color: var(--red); }
/* La sorpresa llega tachada y se destacha sola, como la Blacklist. */
.loot.secret.open strong { position: relative; display: inline-block; }
.loot.secret.open strong::after { content: ""; position: absolute; inset: -1px -3px; background: var(--text); transform-origin: right; animation: wipe .7s .55s cubic-bezier(.7, 0, .2, 1) forwards; }
@keyframes wipe { to { transform: scaleX(0); } }
.codeline, .rw .code { display: flex; gap: 8px; margin-top: 9px; align-items: stretch; }
.cd { flex: 1.25; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 6px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-style: normal !important; font-weight: 700; font-size: 15px !important; letter-spacing: .08em !important; color: var(--acid); background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px var(--acid) !important; border: 0; white-space: nowrap; }
.cd.hot { color: var(--text); text-shadow: 0 0 12px var(--acid); }
span.cd { color: var(--mute); box-shadow: inset 0 0 0 1px var(--line) !important; opacity: .8; }
.codeline .go, .rw .code .go { flex: 1; padding: 10px 6px 9px; font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: .08em; background: var(--acid); color: var(--ink); }
.redact { display: inline-flex; gap: 5px; user-select: none; }
.redact i { font-style: normal; color: var(--text); background: var(--text); letter-spacing: 0; line-height: 1; }
#o-next b.cls { color: var(--red); }

/* Hoja de bonus. */
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.keys div { padding: 9px 11px 9px; background: rgba(20, 24, 29, .85); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--cut); }
.keys b { display: flex; align-items: center; gap: 6px; font-style: italic; font-size: 13px; letter-spacing: .08em; color: var(--acid); }
.keys span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--mute); }
#sheet h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 2px; font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--mute); }
#sheet h4 span { color: var(--acid); font-weight: 700; }
.rw.secret { background: repeating-linear-gradient(135deg, rgba(255, 61, 46, .07) 0 10px, transparent 10px 20px), linear-gradient(180deg, rgba(30, 14, 12, .92), rgba(12, 8, 8, .92)); box-shadow: inset 0 0 0 1px rgba(255, 61, 46, .55); }
.rw.secret .st, .rw.secret.done h3, .rw.secret.done .st { color: var(--red); }
.rw.secret .bar2 i { background: var(--red); }
@media (prefers-reduced-motion: reduce) { #hint big, #heat.on small, #pwr.end small, .won, .loot, .loot::after, #goal.near small, #goal.near em, #flash.on, #loading i { animation: none; } }
@media (prefers-reduced-motion: reduce) { .loot.secret.open strong::after { display: none; } }
