:root {
  --j1: #ffe0a3; --j2: #ffae4a; --j3: #ff7d14; --jdark: #241005;
  --jline: rgba(255, 176, 100, .22); --jline-2: rgba(255, 204, 150, .42);
  --jbg: rgba(22, 11, 5, .84); --jbg-2: rgba(30, 15, 7, .94);
  --ink: #fff3e6; --ink-2: rgba(255, 236, 214, .68); --ink-3: rgba(255, 236, 214, .44);
  --hot: #ffb35a; --gold: #f3ca25; --live: #3dff8a;
  --f-display: "Archivo", "Arial Black", Impact, sans-serif;
  --f-ui: "Inter Tight", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120904; color: var(--ink); font-family: var(--f-ui); touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#stage, #stage canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#info { display: none; }
.display { font-family: var(--f-display); font-variation-settings: "wdth" 62; font-weight: 900; text-transform: uppercase; line-height: .84; letter-spacing: -.01em; }
.label { font-family: var(--f-ui); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.k-touch { display: none; }
html.is-touch .k-touch { display: inline; }
html.is-touch .k-desk { display: none; }

.scr { position: fixed; inset: 0; z-index: 20; animation: scrIn .45s var(--ease); }
@keyframes scrIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.scr--lobby {
  display: grid; grid-template-rows: auto 1fr; padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background:
    linear-gradient(90deg, rgba(12, 6, 2, .8), rgba(12, 6, 2, .12) 36%, rgba(12, 6, 2, .12) 64%, rgba(12, 6, 2, .8)),
    linear-gradient(180deg, rgba(12, 6, 2, .55), transparent 20%, transparent 70%, rgba(12, 6, 2, .7));
  pointer-events: none;
}
html:not([data-tab="play"]) .scr--lobby { background: rgba(12, 6, 2, .78); pointer-events: auto; }
html[data-screen="world"] .scr--lobby { display: none; }
.lb-top, .lb-side, .lb-play, .lb-card { pointer-events: auto; }

.lb-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.lb-brand { display: grid; gap: 4px; }
.lb-brand .label { color: var(--ink-3); }
.lb-beta { display: inline-block; margin-left: 10px; padding: 4px 8px; border-radius: 7px; vertical-align: 10px; background: var(--j3); color: var(--jdark); -webkit-text-fill-color: var(--jdark); font: 900 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; filter: none; }
.lb-name { font-size: 40px; background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.lb-tabs { justify-self: center; display: flex; gap: 4px; padding: 5px; border: 1px solid var(--jline); border-radius: 16px; background: rgba(0, 0, 0, .4); backdrop-filter: blur(10px); }
.lb-tabs button { padding: 11px 18px; border-radius: 11px; font: 800 13px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); transition: background .25s, color .25s, box-shadow .25s; white-space: nowrap; }
.lb-tabs button:hover { color: var(--ink); }
.lb-tabs button.is-on { color: var(--jdark); background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3)); box-shadow: 0 0 26px rgba(255, 140, 40, .4); }
.lb-me { display: flex; align-items: center; gap: 10px; }
.lb-live { display: flex; align-items: center; gap: 7px; font: 700 12px var(--f-ui); color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.lb-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); }
.lb-live b { color: var(--ink); }
.lb-player { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--jline-2); background: rgba(0, 0, 0, .35); font: 800 13px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.lb-player:hover { border-color: var(--j2); }
.lb-player.is-on { border-color: color-mix(in srgb, var(--live) 55%, transparent); }
.lb-player.is-on span { font-variant-numeric: tabular-nums; letter-spacing: .02em; text-transform: none; }

.wm-lock, .wm-lock body { overflow: hidden; }
.wm { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; font-family: var(--f-ui); color: var(--ink); }
.wm.open { opacity: 1; visibility: visible; }
.wm-back { position: absolute; inset: 0; background: rgba(10, 5, 2, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wm-card { position: relative; width: min(440px, 100%); max-height: calc(100svh - 32px); overflow: auto; padding: 24px; border-radius: 22px; background: var(--jbg-2); border: 1px solid var(--jline-2); box-shadow: 0 30px 90px rgba(0, 0, 0, .65), 0 0 50px rgba(255, 125, 20, .14); transform: translateY(14px) scale(.98); transition: transform .3s var(--ease); scrollbar-width: thin; scrollbar-color: var(--j3) transparent; }
.wm.open .wm-card { transform: none; }
.wm-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--jline); background: rgba(0, 0, 0, .25); cursor: pointer; }
.wm-x svg { width: 18px; height: 18px; }
.wm-x:hover { color: var(--ink); border-color: var(--jline-2); }
.wm-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; margin-bottom: 16px; }
.wm-head img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 174, 74, .55); }
.wm-head b { display: block; font: 900 24px/1 var(--f-display); font-variation-settings: "wdth" 72; color: var(--j1); }
.wm-head span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; margin-top: 5px; }
.wm-sec { font: 800 11px var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.wm-list { display: grid; gap: 8px; }
.wm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 236, 214, .04); border: 1px solid var(--jline); color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.wm-item:hover { border-color: var(--j2); background: rgba(255, 174, 74, .08); transform: translateX(3px); }
.wm-item img, .wm-ph { width: 36px; height: 36px; border-radius: 9px; flex: none; object-fit: contain; background: rgba(255, 255, 255, .06); }
.wm-ph { display: grid; place-items: center; font: 900 18px var(--f-display); color: var(--j2); }
.wm-name { flex: 1; font-weight: 700; font-size: 15px; }
.wm-tag { font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 4px 8px; border-radius: 99px; border: 1px solid var(--jline); }
.wm-tag.on { color: var(--live); border-color: rgba(61, 255, 138, .35); background: rgba(61, 255, 138, .08); }
.wm-item.busy { opacity: .6; pointer-events: none; }
.wm-item.busy .wm-tag { color: var(--j2); }
.wm-none { font-size: 13.5px; color: var(--ink-2); padding: 12px; border-radius: 12px; border: 1px dashed var(--jline); }
.wm-fine { margin: 16px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.wm-err { margin-top: 8px; font-size: 13px; color: #ff8a7a; min-height: 1em; }

.lb-body { position: relative; min-height: 0; }
.lb-pane { position: absolute; inset: 18px 0 0; animation: paneIn .35s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateX(14px); } }
.lb-pane[data-pane="play"] { display: grid; grid-template-columns: minmax(270px, 360px) 1fr minmax(270px, 350px); gap: 20px; }
.lb-pane[hidden] { display: none !important; }
.lb-side { align-self: start; display: grid; gap: 10px; }
.lb-kicker { color: var(--ink-3); margin: 0 0 2px 4px; }
.lb-modes { display: grid; gap: 10px; }
.lb-mode { position: relative; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 16px 18px; border: 1px solid var(--jline); border-radius: 14px; background: var(--jbg); transition: border-color .2s, background .2s, box-shadow .2s, transform .15s; }
.lb-mode:hover { border-color: var(--jline-2); background: rgba(40, 20, 8, .92); transform: translateX(3px); }
.lb-mode b { font-family: var(--f-display); font-variation-settings: "wdth" 62; font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: .95; }
.lb-mode em { font-style: normal; font: 700 12px var(--f-ui); color: var(--hot); align-self: center; }
.lb-mode span { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.lb-mode.is-on { border-color: var(--j2); background: linear-gradient(180deg, rgba(255, 174, 74, .2), rgba(255, 125, 20, .07)); box-shadow: 0 0 0 1px var(--j2) inset, 0 0 40px rgba(255, 140, 40, .2); }
.lb-mode.is-soon { opacity: .62; }
.lb-mode__tag { position: absolute; top: -9px; right: 12px; padding: 3px 8px; border-radius: 999px; background: var(--j2); color: var(--jdark); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.is-soon .lb-mode__tag { background: rgba(255, 236, 214, .2); color: var(--ink); }

.lb-play { align-self: end; display: grid; gap: 12px; }
.lb-sel { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--jline); border-radius: 16px; background: var(--jbg); }
.lb-sel .label { color: var(--ink-3); }
.lb-sel b { font-size: 34px; }
.lb-sel p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.lb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-stats > div { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--jline); border-radius: 14px; background: var(--jbg); }
.lb-stats b { font-size: 34px; }
.lb-stats .label { color: var(--ink-3); }
.lb-playbtn { display: grid; justify-items: center; gap: 2px; padding: 20px 20px 14px; border-radius: 18px; color: var(--jdark); background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 0 50px rgba(255, 140, 40, .45), 0 18px 40px rgba(0, 0, 0, .4); transform: skewX(-4deg); transition: transform .15s var(--ease), box-shadow .2s, filter .2s; }
.lb-playbtn b { font-size: 60px; line-height: .85; transform: skewX(4deg); }
.lb-playbtn small { color: rgba(36, 16, 5, .7); transform: skewX(4deg); }
.lb-playbtn:hover:not(:disabled) { transform: skewX(-4deg) translateY(-2px) scale(1.02); box-shadow: 0 0 0 1px rgba(255, 255, 255, .55) inset, 0 0 70px rgba(255, 200, 120, .6), 0 18px 40px rgba(0, 0, 0, .4); }
.lb-playbtn:active:not(:disabled) { transform: skewX(-4deg) scale(.98); }
.lb-playbtn:disabled { filter: saturate(.4) brightness(.8); cursor: default; }
.lb-hint { margin: 0; text-align: center; font-size: 12px; color: var(--ink-3); }

.lb-card { position: relative; margin: 0 auto; width: min(620px, 100%); max-height: 100%; overflow: auto; padding: 26px; border: 1px solid var(--jline); border-radius: 22px; background: var(--jbg-2); display: grid; gap: 14px; align-content: start; }
.lb-card--wide { width: min(980px, 100%); }
.lb-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lb-card__head b { font-size: 40px; }
.lb-card__head .label { color: var(--hot); }
.lb-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.lb-chips button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--jline-2); font: 800 13px var(--f-ui); letter-spacing: .06em; }
.lb-chips button.is-on { color: var(--jdark); border-color: transparent; background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3)); }
.fur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.nft { display: grid; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--jline); border-radius: 16px; background: rgba(0, 0, 0, .25); transition: border-color .2s, transform .15s; }
.nft:hover { border-color: var(--jline-2); transform: translateY(-2px); }
.nft__art { position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: #2a160a; }
.nft__art img, .nft__art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nft__art video { opacity: 0; transition: opacity .25s; }
.nft__art.is-video video { opacity: 1; }
.nft__name { width: 100%; padding: 7px 9px; border-radius: 9px; border: 1px solid transparent; background: rgba(255, 255, 255, .06); color: var(--ink); font: 800 14px var(--f-ui); outline: none; user-select: text; transition: border-color .2s, background .2s; }
.nft__name:hover { background: rgba(255, 255, 255, .1); }
.nft__name:focus { border-color: var(--j2); background: rgba(0, 0, 0, .4); }
.nft__meta { padding: 0 4px; font-size: 10.5px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; line-height: 1.4; }
.nft__meta em { font-style: normal; color: var(--hot); }

* { scrollbar-width: thin; scrollbar-color: rgba(255, 174, 74, .55) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3)); border-radius: 999px; border: 2px solid rgba(30, 15, 7, .9); }
::-webkit-scrollbar-thumb:hover { background: var(--j2); }
::-webkit-scrollbar-corner { background: transparent; }

.hud { position: fixed; inset: 0; z-index: 15; pointer-events: none; opacity: 0; transition: opacity .4s; }
html[data-screen="world"] .hud { opacity: 1; }
html[data-screen="world"] .hud > * { pointer-events: auto; }
.hud-btn { position: absolute; top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--jline-2); background: rgba(12, 6, 2, .55); backdrop-filter: blur(10px); font: 800 13px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.hud-btn:hover { border-color: var(--j2); }
.hud-chip { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--jline); background: rgba(12, 6, 2, .55); backdrop-filter: blur(10px); font: 700 12px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.hud-chip > b { font-family: var(--f-display); font-variation-settings: "wdth" 62; font-weight: 900; font-size: 18px; color: var(--j1); }
.hud-chip span { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.hud-chip span i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.hud-hint { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; padding: 9px 16px; border-radius: 12px; background: rgba(12, 6, 2, .55); backdrop-filter: blur(10px); font: 700 12.5px var(--f-ui); color: var(--ink-2); white-space: nowrap; transition: opacity .6s; pointer-events: none !important; }
html[data-hints="0"] .hud-hint, .hud-hint.is-gone { opacity: 0; }

.iris { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: #0c0602; opacity: 0; }
.iris.is-on { opacity: 1; }

@media (max-width: 1180px) {
  .lb-pane[data-pane="play"] { grid-template-columns: minmax(240px, 300px) 1fr minmax(240px, 300px); }
  .lb-tabs button { padding: 10px 13px; font-size: 12px; }
  .lb-name { font-size: 32px; }
}
.lb-beta--top { display: none; margin: 0; vertical-align: 0; }
@media (max-width: 1040px) {
  .lb-brand { display: none; }
  .lb-beta--top { display: inline-block; }
  .lb-top { grid-template-columns: 1fr auto; }
  .lb-tabs { justify-self: start; }
}
@media (max-width: 860px) {
  .lb-top { grid-template-columns: 1fr; gap: 10px; }
  .lb-me { order: -1; justify-content: space-between; }
  .lb-tabs { justify-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .lb-tabs::-webkit-scrollbar { display: none; }
  .lb-tabs button { flex: 1 0 auto; }
  .lb-pane[data-pane="play"] { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 12px; }
  .lb-modes { grid-auto-flow: column; grid-auto-columns: minmax(210px, 74%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-top: 10px; }
  .lb-mode { scroll-snap-align: start; }
  .lb-mode span { display: none; }
  .lb-sel { display: none; }
  .lb-playbtn b { font-size: 46px; }
  .hud-chip { top: auto; bottom: max(64px, env(safe-area-inset-bottom)); }
  .hud-hint { white-space: normal; width: calc(100% - 32px); text-align: center; }
  .lb-card__head b { font-size: 32px; }
}
@media (max-height: 560px) {
  .lb-mode span, .lb-sel p { display: none; }
  .lb-playbtn b { font-size: 40px; }
  .lb-stats b, .lb-sel b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .scr, .lb-pane { animation: none; }
}

.fp { position: fixed; inset: 0; z-index: 14; pointer-events: none; opacity: 0; transition: opacity .4s; }
.fp.is-on { opacity: 1; }
html[data-screen="lobby"] .fp { opacity: 0; }
.fp-dot { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); transition: transform .15s var(--ease), background .15s; }
.fp-dot.is-hot { transform: scale(1.6); background: var(--j2); }
.fp-dot.is-hot::after { content: attr(data-act); position: absolute; left: 50%; top: 14px; transform: translateX(-50%) scale(.625); transform-origin: top center; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--jbg); border: 1px solid var(--jline-2); color: var(--ink); font: 800 19px/1 var(--f-ui); letter-spacing: .02em; }
.fp-tag { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 4px; padding: 6px 12px 7px; border-radius: 12px; background: var(--jbg); border: 1px solid var(--jline); color: var(--ink); white-space: nowrap; }
.fp-tag[hidden] { display: none; }
.fp-tag b { font: 800 14px/1 var(--f-ui); }
.fp-hearts { display: flex; gap: 2px; }
.fp-hearts i { display: block; width: 12px; height: 12px; }
.fp-hearts svg { width: 100%; height: 100%; fill: rgba(255, 236, 214, .22); }
.fp-hearts i.on svg { fill: #ff5c86; }
.fp-say { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 14px; background: var(--jbg); border: 1px solid var(--jline-2); color: var(--ink); font: 700 15px/1.3 var(--f-ui); animation: fpSay .3s var(--ease) both; }
.fp-say[hidden] { display: none; }
.fp-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 28px); pointer-events: auto; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--jline-2); background: var(--jbg); color: var(--ink); font: 800 14px/1 var(--f-ui); cursor: pointer; }
.fp-lock[hidden] { display: none; }
@keyframes fpSay { from { opacity: 0; transform: translate(-50%, 8px); } }
.fp-persona { font: 700 10px/1 var(--f-ui); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--j2); }
