:root { --plum: #1a1030; --plum2: #2a1a4a; --ink: #fff6e4; --marigold: #ffb01f; --saffron: #ff7a1a; --red: #e0392b; --line: rgba(255, 216, 150, .24); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--plum); color: var(--ink); font-family: Nunito, system-ui, sans-serif; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
input { -webkit-user-select: text; user-select: text; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.off { display: none !important; }
button { font: inherit; font-weight: 800; color: var(--ink); background: rgba(255, 246, 228, .1); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; touch-action: manipulation; transition: transform .1s, background .15s; }
button:hover { background: rgba(255, 246, 228, .2); }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
button.big { background: linear-gradient(180deg, #ffc338, #ff8a1a); color: #2a1200; border: 0; font-family: 'Titan One', Nunito, sans-serif; font-weight: 400; font-size: 20px; padding: 12px 18px; width: 100%; box-shadow: 0 4px 0 #a84a05; }
button.big:hover { background: linear-gradient(180deg, #ffd25e, #ff9a33); }
input, select { font: inherit; font-weight: 700; color: var(--ink); background: rgba(0, 0, 0, .35); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
select option { color: #111; }
input[type=range] { padding: 0; accent-color: var(--marigold); flex: 1; }
h1, h2 { font-family: 'Titan One', Nunito, sans-serif; font-weight: 400; margin: 0; }

.screen { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: max(10px, var(--safe-t)) max(14px, var(--safe-r)) max(10px, var(--safe-b)) max(14px, var(--safe-l)); overflow-y: auto; }
#title { justify-content: flex-end; background: linear-gradient(90deg, transparent 30%, rgba(26, 16, 48, .85) 62%); }
.t-col { width: min(370px, 100%); display: flex; flex-direction: column; gap: 8px; margin: auto 3vw auto 0; }
h1 { font-size: clamp(30px, 6vh, 46px); line-height: 1; color: #ffd24a; text-shadow: 0 3px 0 #b5430a, 0 0 26px rgba(255, 150, 30, .55); }
.sub { margin: 0; font-weight: 700; font-size: 14px; opacity: .9; }
.field { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14px; }
.field input { flex: 1; }
.lookrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; }
.lookrow button { padding: 2px 16px; font-size: 22px; line-height: 1.2; }
.row { display: flex; gap: 8px; align-items: center; }
.row > button { flex: 1; }
.row.join input { flex: 1; text-transform: uppercase; letter-spacing: .12em; font-size: 15px; }
.row.join button { flex: 0 0 auto; }
.row.small button { padding: 7px 10px; font-size: 13px; }
.panel { width: min(430px, 100%); max-height: 100%; overflow-y: auto; background: linear-gradient(180deg, rgba(42, 26, 74, .97), rgba(26, 16, 48, .97)); border: 2px solid var(--line); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 16px 50px rgba(0, 0, 0, .55); margin: auto; }
.panel.wide { width: min(620px, 100%); }
.panel h2 { font-size: 26px; color: #ffd24a; }
.panel p { margin: 0; font-size: 14.5px; line-height: 1.35; }
.panel label { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 14.5px; }
.panel label select { flex: 1; }
#l-code { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#l-codeval { font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .12em; color: var(--marigold); }
#l-code button { padding: 7px 10px; font-size: 13px; }
#l-players { display: flex; flex-wrap: wrap; gap: 5px; max-height: 110px; overflow-y: auto; }
#l-players span { background: rgba(255, 255, 255, .1); padding: 3px 9px; border-radius: 99px; font-size: 13px; font-weight: 800; }
#l-players span.me { background: var(--marigold); color: #2a1200; }
#l-players span.bot { opacity: .6; font-style: italic; }
#l-players button.kick { margin-left: 6px; padding: 0 7px; min-height: 24px; border-radius: 99px; font-size: 14px; line-height: 1; }
#q-online { font: 700 12px Nunito, sans-serif; opacity: .75; }
#q-online:empty { display: none; }
#l-host { display: flex; flex-direction: column; gap: 8px; }
#o-stats { display: flex; gap: 8px; }
#o-why:empty, #o-rank:empty { display: none; }
#o-rank { margin: 0; font-size: 13px; font-weight: 800; text-align: center; color: var(--marigold); }
#o-rank button { margin-left: 6px; padding: 3px 12px; min-height: 30px; font-size: 13px; }
#l-top { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; }
#l-top b { width: 100%; color: var(--marigold); font-size: 12px; }
#l-top span { background: rgba(0, 0, 0, .28); padding: 2px 8px; border-radius: 99px; }
#l-top span.me { background: var(--marigold); color: #2a1200; }
#l-top p { width: 100%; margin: 0; font-size: 12px; opacity: .9; }
#o-why { margin: 0; font-size: 12.5px; font-weight: 700; opacity: .85; text-align: center; }
#t-score { margin: 0; font-size: 13px; font-weight: 700; }
#t-score b { color: var(--marigold); }
.t-foot { display: flex; flex-direction: column; gap: 8px; }
.safe { margin: 0; font-size: 11.5px; font-weight: 600; opacity: .68; line-height: 1.3; }
#o-stats div { flex: 1; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 7px; text-align: center; font-size: 12.5px; font-weight: 700; }
#o-stats b { display: block; font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 22px; color: var(--marigold); }
#over { background: rgba(10, 5, 25, .28); align-items: flex-end; }
#over .panel { margin: auto 0 0; }
#how-crackers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
#how-crackers div { background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 7px 9px; font-size: 13px; line-height: 1.25; }
#how-crackers b { display: block; color: var(--marigold); font-size: 14.5px; }
.keys .tch { display: none; }
body.touch .keys .tch { display: block; }
body.touch .keys .desk { display: none; }

#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#h-top { position: absolute; top: max(8px, var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: stretch; }
#h-alive, #h-pts, #h-clock { background: rgba(14, 8, 30, .72); border-radius: 10px; padding: 3px 11px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
#h-alive b, #h-pts b, #h-clock b { font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 19px; line-height: 1.1; color: var(--marigold); }
#h-alive span, #h-pts span, #h-clock span { font-size: 11px; font-weight: 800; opacity: .9; white-space: nowrap; }
#h-clock.danger span { color: #ff8a70; opacity: 1; }
#h-pause { pointer-events: auto; padding: 0 12px; background: rgba(14, 8, 30, .72); min-width: 40px; }
#minimap { position: absolute; top: max(8px, var(--safe-t)); right: max(8px, var(--safe-r)); width: 120px; height: 120px; border-radius: 12px; border: 2px solid var(--line); background: #15101f; }
#feed { position: absolute; top: max(8px, var(--safe-t)); left: max(8px, var(--safe-l)); width: min(300px, 34vw); display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 700; }
#feed div { background: rgba(14, 8, 30, .66); padding: 3px 8px; border-radius: 7px; line-height: 1.2; animation: fin .2s; }
@keyframes fin { from { opacity: 0; transform: translateX(-8px); } }
#h-hosh { position: absolute; left: max(12px, var(--safe-l)); bottom: max(12px, var(--safe-b)); width: min(260px, 32vw); display: flex; flex-direction: column; gap: 2px; font-weight: 900; font-size: 12px; letter-spacing: .08em; }
#hoshbar { height: 13px; background: rgba(14, 8, 30, .78); border-radius: 7px; overflow: hidden; border: 1.5px solid var(--line); }
#hosh { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffb01f, #ffe27a); transition: width .18s; }
#hosh.low { background: linear-gradient(90deg, #ff5a30, #ff9a50); }
#cotton { font-style: normal; color: #eaf6ff; letter-spacing: 0; font-size: 11.5px; }
#slots { position: absolute; left: 50%; bottom: max(10px, var(--safe-b)); transform: translateX(-50%); display: flex; gap: 5px; pointer-events: auto; }
#slots button { width: 56px; padding: 4px 2px 3px; background: rgba(14, 8, 30, .76); border-radius: 11px; display: flex; flex-direction: column; align-items: center; font-size: 11px; line-height: 1.1; font-weight: 800; }
#slots button b { font-size: 10.5px; font-weight: 800; }
#slots button em { font-style: normal; font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 15px; color: var(--marigold); }
#slots button.on { border-color: var(--marigold); box-shadow: 0 0 12px rgba(255, 176, 31, .7); transform: translateY(-4px); }
#slots button.none { opacity: .42; }
#prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); background: rgba(14, 8, 30, .82); border: 1.5px solid var(--marigold); padding: 5px 12px; border-radius: 9px; font-weight: 900; font-size: 14px; }
#toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font-family: 'Titan One', sans-serif; font-size: 18px; color: #fff3cf; text-shadow: 0 2px 0 #4a1c00; opacity: 0; transition: opacity .25s; text-align: center; width: 80vw; }
#toast.on { opacity: 1; }
body.chilling #toast { top: 27%; }
#cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55); opacity: .75; }
#hitdir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
#hitdir::after { content: ""; position: absolute; left: -24px; top: -128px; width: 48px; height: 24px; background: #ffb01f; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
#marker { position: absolute; left: 50%; top: 44%; transform: translateX(-50%); font-family: 'Titan One', sans-serif; color: #ffe27a; font-size: 20px; text-shadow: 0 2px 0 #4a1c00; opacity: 0; }
#spec { position: absolute; left: 50%; bottom: max(14px, var(--safe-b)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; pointer-events: auto; background: rgba(14, 8, 30, .78); padding: 6px 10px; border-radius: 12px; font-weight: 800; font-size: 14px; white-space: nowrap; }
#spec button { padding: 5px 11px; font-size: 13px; }
#coach { position: absolute; left: 50%; bottom: calc(max(10px, var(--safe-b)) + 84px); transform: translateX(-50%); width: min(420px, 62vw); background: rgba(14, 8, 30, .84); border: 1.5px solid var(--marigold); border-radius: 12px; padding: 7px 13px 8px; }
#coach-n { float: right; font-size: 11px; font-weight: 800; opacity: .7; }
#coach-t { display: block; font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 16px; color: var(--marigold); }
#coach-p { margin: 1px 0 0; font-size: 14px; line-height: 1.3; font-weight: 700; }
body.touch #coach { bottom: max(8px, var(--safe-b)); top: auto; width: min(300px, 40vw); padding: 4px 9px 5px; border-radius: 10px; background: rgba(14, 8, 30, .72); }
body.touch #coach-t { font-size: 12.5px; }
body.touch #coach-p { font-size: 11.5px; }
body.touch #grace { top: calc(max(8px, var(--safe-t)) + 56px); font-size: 15px; }
body.touch #toast { top: calc(max(8px, var(--safe-t)) + 80px); font-size: 15px; }
body.touch.chilling #toast { top: calc(max(8px, var(--safe-t)) + 112px); }
.coach-on { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 12px; animation: coach-pulse 1.2s ease-in-out infinite; }
@keyframes coach-pulse { 50% { outline-offset: 6px; } }
#lockhint { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(14, 8, 30, .88); border: 2px solid var(--marigold); padding: 14px 26px; border-radius: 14px; text-align: center; pointer-events: none; box-shadow: 0 0 34px rgba(255, 176, 31, .35); }
#lockhint b { display: block; font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 28px; color: var(--marigold); }
#lockhint span { font-size: 13px; font-weight: 700; opacity: .85; }
#chill { position: absolute; left: 50%; top: 15%; transform: translateX(-50%); width: min(560px, 76vw); padding: 8px 14px; text-align: center; background: rgba(24, 16, 58, .72); border: 2px solid #8fe3c0; border-radius: 14px; pointer-events: none; }
#chill b { display: block; font-family: 'Titan One', sans-serif; font-weight: 400; font-size: 24px; color: #8fe3c0; }
#chill span { display: block; font-size: 14px; font-weight: 700; color: #fff; line-height: 1.25; }
#grace { position: absolute; left: 50%; top: 27%; transform: translateX(-50%); text-align: center; font-family: 'Titan One', sans-serif; font-size: 22px; color: #ffe27a; text-shadow: 0 2px 0 #4a1c00; width: 80vw; }
#plates { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.plate { position: absolute; left: 0; top: 0; display: none; text-align: center; will-change: transform; }
.plate b { display: block; font-size: 12px; font-weight: 900; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: nowrap; }
.plate i { display: block; width: 46px; height: 4px; margin: 1px auto 0; background: rgba(0, 0, 0, .6); border-radius: 2px; overflow: hidden; }
.plate u { display: block; height: 100%; background: #ffc338; }
#smogtint { position: fixed; inset: 0; z-index: 4; background: radial-gradient(ellipse at center, rgba(88, 66, 38, .38), rgba(58, 42, 22, .94)); opacity: 0; pointer-events: none; transition: opacity .5s; }
#hitflash { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(255, 250, 225, .1), rgba(255, 190, 80, .85)); }
#smokeveil { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(150, 145, 140, .55), rgba(90, 86, 84, .95)); }
#dizzyveil { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(120, 60, 200, 0) 35%, rgba(70, 25, 130, .9)); }
#t-zone { position: fixed; inset: 0; z-index: 2; display: none; touch-action: none; }
body.touch.playing #t-zone { display: block; }
#touch { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
#t-stick { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); background: rgba(14, 8, 30, .3); display: none; }
#t-stick.on { display: flex; align-items: center; justify-content: center; }
#t-stick i { width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 216, 150, .75); display: block; }
#touch button { position: absolute; pointer-events: auto; touch-action: none; border-radius: 50%; background: rgba(14, 8, 30, .55); border: 2px solid rgba(255, 216, 150, .6); padding: 0; font-size: 12px; font-weight: 900; width: 62px; height: 62px; }
#touch button.down, #touch button.lit { background: rgba(255, 176, 31, .75); color: #2a1200; }
#t-throw { right: max(18px, var(--safe-r)); bottom: max(22px, var(--safe-b)); width: 88px !important; height: 88px !important; font-size: 14px !important; background: rgba(224, 57, 43, .6) !important; }
#t-jump { right: calc(max(18px, var(--safe-r)) + 98px); bottom: max(14px, var(--safe-b)); }
#t-crouch { right: calc(max(18px, var(--safe-r)) + 92px); bottom: calc(max(14px, var(--safe-b)) + 74px); width: 54px !important; height: 54px !important; }
#t-grab { right: calc(max(18px, var(--safe-r)) + 16px); bottom: calc(max(22px, var(--safe-b)) + 98px); background: rgba(255, 176, 31, .85) !important; color: #2a1200; }
body.touch #minimap { width: 88px; height: 88px; }
body.touch #h-hosh { width: 150px; bottom: auto; top: calc(max(8px, var(--safe-t)) + 0px); left: calc(max(8px, var(--safe-l))); }
body.touch #feed { top: calc(max(8px, var(--safe-t)) + 42px); width: 28vw; font-size: 10.5px; }
body.touch #slots { left: calc(max(8px, var(--safe-l))); transform: none; bottom: max(6px, var(--safe-b)); gap: 3px; }
body.touch #slots button.none { display: none; }
body.touch #slots button { width: 46px; padding: 2px 1px; font-size: 0; }
body.touch #slots button b { font-size: 8.5px; }
body.touch #slots button em { font-size: 13px; }
body.touch #cross { opacity: .55; }
#rotate { position: fixed; inset: 0; z-index: 60; background: var(--plum); display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
#rotate b { font-size: 54px; color: var(--marigold); }
#rotate p { font-weight: 800; }
#loading { position: fixed; inset: 0; z-index: 50; background: var(--plum); display: flex; align-items: center; justify-content: center; font-family: 'Titan One', sans-serif; font-size: 22px; color: #ffd24a; }
#loading.off { display: none; }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }
html.sw-on #rotate { display: none !important; }
@media (max-height: 400px) {
  #chill { top: 46px; padding: 3px 10px; } #chill b { font-size: 17px; } #chill span { font-size: 12px; } body.chilling #toast { top: 33%; }
  .t-col { gap: 3px; } .t-foot { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; } .t-more { display: none; } #t-score { white-space: nowrap; } h1 { font-size: 25px; } .sub { display: none; } button.big { font-size: 16px; padding: 7px 12px; }
  .t-col button, .t-col input { padding-top: 5px; padding-bottom: 5px; } .row.small button { padding: 4px 8px; font-size: 12px; } .lookrow button { font-size: 16px; padding: 0 14px; }
  .panel { padding: 9px 14px; gap: 6px; } .panel h2 { font-size: 20px; } .panel p, .panel label { font-size: 13px; } #over .panel { width: min(520px, 100%); }
  #o-stats b { font-size: 16px; } #o-stats div { padding: 3px; font-size: 11px; } #o-why { font-size: 11px; } #t-score { font-size: 11.5px; } .safe, .panel p.safe { font-size: 10px; }
  #how-crackers { grid-template-columns: repeat(3, 1fr); } #how-crackers div { font-size: 11.5px; padding: 4px 6px; } #how-crackers b { font-size: 12.5px; }
}
#o-btns.wait button{opacity:.35;pointer-events:none}
#o-btns button{transition:opacity .25s}
