@font-face { font-family: "Lilita One"; src: url(fonts/lilita-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Parkinsans"; src: url(fonts/parkinsans-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(fonts/jakarta-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(fonts/jakarta-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(fonts/jakarta-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #0f1430; --panel: rgba(13, 18, 44, .82); --line: rgba(255, 255, 255, .16);
  --accent: #ff7a2f; --yellow: #ffc93c; --red: #ff3b4e; --teal: #18c2b0; --green: #3ddc84;
  --display: "Lilita One", "Apple Color Emoji", "Noto Color Emoji", sans-serif; --ui: "Fredoka", system-ui, "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  --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);
}
body.ip { --display: "Parkinsans", "Apple Color Emoji", "Noto Color Emoji", sans-serif; --ui: "Plus Jakarta Sans", system-ui, "Apple Color Emoji", "Noto Color Emoji", sans-serif; --accent: #D8385B; --panel: rgba(22, 0, 63, .84); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d1226; color: #fff; font-family: var(--ui); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
/* only the game itself swallows touches; menus must scroll (iOS applies touch-action from every ancestor) */
canvas#gl, #hud .touch, #hud .stickzone { touch-action: none; }
button, .chip, .sw i { touch-action: manipulation; }
canvas#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }

/* ---------- shared bits ---------- */
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.22), 0 10px 30px rgba(0,0,0,.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.logo { font-family: var(--display); letter-spacing: 1px; color: #fff; text-shadow: 0 4px 0 var(--accent), 0 7px 16px rgba(0,0,0,.35); line-height: 1; }
body.ip .logo { font-weight: 700; }
.lbl { font: 600 11px var(--ui); letter-spacing: 1.4px; text-transform: uppercase; color: #aab3d6; }
.num { font-family: var(--display); }
.bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; transition: width .3s; }
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; background: #fff; color: var(--ink); font: 400 14px var(--display); box-shadow: 0 3px 0 #9aa3c0; }

/* ---------- menus ---------- */
#ui { position: fixed; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
#ui:empty { pointer-events: none; }
#ui > .screen { pointer-events: auto; min-height: 100%; padding: calc(24px + var(--safe-t)) calc(24px + var(--safe-r)) calc(24px + var(--safe-b)) calc(24px + var(--safe-l)); display: flex; flex-direction: column; }
.menu { width: min(520px, 100%); display: flex; flex-direction: column; gap: 14px; }
.menu.title .col-a, .menu.title .col-b, .menu.lobby .col-a, .menu.lobby .col-b { display: flex; flex-direction: column; gap: 14px; }
.menu.lobby { width: min(560px, 100%); }
.stickybar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 12px 0 calc(4px + var(--safe-b)); margin-bottom: calc(-24px - var(--safe-b)); background: linear-gradient(rgba(13,18,38,0), rgba(13,18,38,.75) 30%); }
.stickybar .big { width: 100%; }
.menu .tag { font: 500 18px var(--ui); text-shadow: 0 1px 4px rgba(0,0,0,.45); line-height: 1.35; margin-top: -2px; }
.big { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 20px; border-radius: 18px; font: 400 24px var(--display); letter-spacing: .6px; text-align: left; background: var(--panel); border: 2px solid var(--line); box-shadow: 0 5px 0 rgba(0,0,0,.25); transition: transform .08s; }
.big small { display: block; font: 500 13px var(--ui); letter-spacing: 0; color: #c9d0ea; margin-top: 2px; }
.big:active, .big.down { transform: translateY(3px); }
.big.primary { background: linear-gradient(180deg, #ff9450, #ff6a1f); border-color: #fff; box-shadow: 0 6px 0 #b8460f, 0 14px 30px rgba(255,106,31,.3); }
body.ip .big.primary { background: linear-gradient(180deg, #e8577a, #c42a4c); box-shadow: 0 6px 0 #7d1530; }
.big.teal { background: linear-gradient(180deg, #2fe0cc, #12a796); border-color: #fff; box-shadow: 0 6px 0 #0b7569; }
.big .ico { font-size: 28px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 99px; background: var(--panel); border: 2px solid var(--line); font: 600 14px var(--ui); }
.chip.on { background: var(--yellow); color: #2b1a00; border-color: var(--yellow); }
.small { padding: 9px 14px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); font: 600 14px var(--ui); }
.profile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.profile .av { width: 46px; height: 46px; border-radius: 50%; background: var(--c); border: 3px solid #fff; display: grid; place-items: center; font-size: 22px; flex: none; }
.profile input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; padding: 0 12px; font: 600 17px var(--ui); user-select: text; -webkit-user-select: text; }
.sw { display: flex; gap: 8px; }
.sw i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: block; border: 3px solid rgba(255,255,255,.35); cursor: pointer; }
.sw i.sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.sw i.taken { opacity: .3; pointer-events: none; }
.card { padding: 16px 18px; }
.err { background: var(--red); padding: 10px 14px; border-radius: 12px; font: 600 15px var(--ui); }
.badge { display: inline-block; font: 800 12px var(--ui); letter-spacing: 1px; background: #D8385B; padding: 5px 10px; border-radius: 99px; }
.tip { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.96); color: var(--ink); font: 500 14px var(--ui); line-height: 1.35; }
.tip .ico { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(160deg, #ff9450, #ff6a1f); display: grid; place-items: center; font: 400 21px var(--display); color: #fff; }
.toprt { position: absolute; top: calc(16px + var(--safe-t)); right: calc(16px + var(--safe-r)); display: flex; gap: 8px; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; }
.codebox { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.codebox input { height: 70px; text-align: center; border-radius: 14px; border: 0; background: #fff; color: var(--ink); font: 400 38px var(--display); text-transform: uppercase; box-shadow: 0 4px 0 #9aa3c0; user-select: text; -webkit-user-select: text; }
.lobbygrid { display: grid; grid-template-columns: 1fr 112px; gap: 16px; align-items: center; }
.roomcode { font: 400 54px var(--display); letter-spacing: 10px; line-height: 1; margin: 4px 0 8px; }
.qr { width: 112px; height: 112px; background: #fff; border-radius: 12px; padding: 7px; }
.qr canvas, .qr img { width: 100% !important; height: 100% !important; display: block; image-rendering: pixelated; }
.slots { display: grid; gap: 7px; margin-top: 14px; }
.slot { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 14px; background: rgba(255,255,255,.06); font: 600 17px var(--ui); }
.slot .av { width: 40px; height: 40px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 18px; border: 3px solid rgba(255,255,255,.8); }
.slot small { display: block; font: 500 12px var(--ui); color: #aab3d6; }
.slot.empty { background: transparent; border: 2px dashed rgba(255,255,255,.25); color: #c9d0ea; }
.slot.empty .av { background: transparent; border-style: dashed; border-color: rgba(255,255,255,.4); }
.pill { font: 400 12px var(--display); background: var(--green); color: #06301a; padding: 4px 10px; border-radius: 99px; letter-spacing: .5px; }
.pill.w { background: rgba(255,255,255,.16); color: #fff; }
.pill.host { background: #fff; color: var(--ink); }
.helpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.helpgrid .card { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; font: 500 14px var(--ui); line-height: 1.35; }
.helpgrid .card b { display: block; font: 400 17px var(--display); letter-spacing: .4px; margin-bottom: 2px; }
.helpgrid .card .e { font-size: 30px; line-height: 1; }
.results { width: min(760px, 100%); margin: auto; }
.stars { font-size: 54px; letter-spacing: 6px; text-align: center; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.stars .off { filter: grayscale(1) brightness(.5); opacity: .5; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats .num { font-size: 26px; }
.awards { display: flex; flex-wrap: wrap; gap: 8px; }
.award { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.08); font: 600 14px var(--ui); }
.award .e { font-size: 22px; }
.award i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); display: inline-block; }
table.crew { width: 100%; border-collapse: collapse; font: 500 14px var(--ui); }
table.crew th { font: 600 11px var(--ui); letter-spacing: 1px; text-transform: uppercase; color: #aab3d6; text-align: center; padding: 6px 4px; }
table.crew td { text-align: center; padding: 7px 4px; border-top: 1px solid rgba(255,255,255,.08); }
table.crew td:first-child, table.crew th:first-child { text-align: left; }
.dim { position: fixed; inset: 0; background: rgba(8, 10, 26, .55); }
.center { margin: auto; }
.footer { font: 500 12px var(--ui); color: rgba(255,255,255,.7); margin-top: 6px; }

/* ---------- in-flight HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#hud .anchor { position: absolute; left: 0; top: 0; will-change: transform; }
#hud .anchor > * { transform: translate(-50%, -100%); }
#hud .anchor.edge > * { transform: translate(-50%, -50%) scale(.78); opacity: .92; }
#hud .anchor.edge { filter: drop-shadow(0 0 6px rgba(255,255,255,.7)); }
#hud .anchor.edge .shout { white-space: nowrap; }
.h-tl { position: absolute; left: calc(20px + var(--safe-l)); top: calc(16px + var(--safe-t)); }
.h-status { position: absolute; left: calc(20px + var(--safe-l)); top: calc(102px + var(--safe-t)); width: 232px; padding: 14px 16px; display: grid; gap: 12px; }
.h-status .top { display: flex; justify-content: space-between; align-items: baseline; }
.h-status .num { font-size: 19px; }
.horizon { height: 46px; border-radius: 12px; overflow: hidden; position: relative; }
.horizon i { position: absolute; left: -40%; top: -100%; width: 180%; height: 300%; background: linear-gradient(#4aa3ff 50%, #8a5a2b 50%); transition: transform .15s; }
.horizon::after { content: "✈"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20px; color: #ffc93c; text-shadow: 0 2px 0 #000; }
.h-route { position: absolute; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); width: min(520px, 44vw); padding: 10px 18px 12px; }
.h-route .ends { display: flex; justify-content: space-between; align-items: center; font: 400 19px var(--display); }
.track { position: relative; height: 10px; border-radius: 99px; background: rgba(255,255,255,.15); margin: 8px 0; }
.track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--yellow)); }
.track > b { position: absolute; top: 50%; transform: translate(-50%, -55%); font-size: 24px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.h-route .meta { display: flex; justify-content: space-between; font: 500 14px var(--ui); color: #c9d0ea; }
.h-crew { position: absolute; right: calc(20px + var(--safe-r)); top: calc(14px + var(--safe-t)); width: 270px; padding: 10px 12px; }
.h-crew .m span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-crew .m { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 9px; align-items: center; padding: 5px 4px; font: 600 15px var(--ui); border-top: 1px solid rgba(255,255,255,.08); }
.h-crew .m i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.h-crew .m small { font: 500 12px var(--ui); color: #c9d0ea; background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.h-alerts { position: absolute; right: calc(20px + var(--safe-r)); top: calc(196px + var(--safe-t)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.alert { display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px 6px 11px; border-radius: 99px; font: 400 16px var(--display); letter-spacing: .5px; box-shadow: 0 4px 0 rgba(0,0,0,.25); animation: pulse 1s infinite alternate; white-space: nowrap; }
.alert.red { background: var(--red); } .alert.amber { background: #ffb020; color: #2b1a00; } .alert.blue { background: #3b6cff; }
@keyframes pulse { to { transform: scale(1.04); } }
.h-score { position: absolute; right: calc(20px + var(--safe-r)); bottom: calc(110px + var(--safe-b)); padding: 10px 16px; display: flex; gap: 16px; }
.h-score .num { font-size: 24px; }
.h-item { position: absolute; right: calc(20px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.h-item .slotbox { width: 58px; height: 58px; border-radius: 14px; background: rgba(255,255,255,.1); border: 2px solid var(--accent); display: grid; place-items: center; font-size: 30px; }
.h-keys { position: absolute; left: calc(20px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); display: flex; gap: 14px; padding: 10px 14px; align-items: center; font: 500 13px var(--ui); }
.h-keys span { display: flex; gap: 6px; align-items: center; }
.prompt { display: inline-flex; align-items: center; gap: 8px; background: rgba(13,18,44,.88); border: 2px solid var(--line); padding: 5px 12px 5px 5px; border-radius: 12px; font: 600 15px var(--ui); white-space: nowrap; }
.prompt.hint { padding-left: 12px; color: #ffe08a; }
.prompt .tapi { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-size: 14px; }
.tagp { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--c); color: #fff; font: 600 14px var(--ui); white-space: nowrap; box-shadow: 0 3px 0 rgba(0,0,0,.25); position: relative; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.tagp::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--c); }
.tagp .you { font: 400 11px var(--display); background: #fff; color: var(--ink); border-radius: 6px; padding: 1px 5px; text-shadow: none; }
.bub { --p: 70; --pc: var(--green); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; position: relative; background: conic-gradient(var(--pc) calc(var(--p) * 1%), rgba(255,255,255,.25) 0); padding: 4px; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.bub > span { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.shout { background: #fff; color: var(--red); font: 400 16px var(--display); padding: 7px 12px; border-radius: 14px; white-space: nowrap; box-shadow: 0 4px 0 rgba(0,0,0,.2); transform: rotate(-3deg); }
.ask { background: #fff; color: #16003F; border-radius: 14px; padding: 7px 11px 8px; font: 700 13px var(--ui); white-space: nowrap; box-shadow: 0 4px 0 rgba(0,0,0,.2); position: relative; }
.ask i { display: block; font: 800 9px var(--ui); letter-spacing: 1.2px; text-transform: uppercase; font-style: normal; color: #fff; background: var(--t); padding: 2px 7px; border-radius: 99px; width: max-content; margin-bottom: 3px; }
.ask .pt { position: absolute; right: -8px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--pc) calc(var(--p) * 1%), #e6e0f0 0); border: 3px solid #fff; }
.pop { font: 400 22px var(--display); color: var(--c); text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 10px rgba(0,0,0,.3); white-space: nowrap; animation: rise 1.4s forwards; }
@keyframes rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -70px; } }
.emo { font-size: 40px; animation: rise 2s forwards; }
.ring { width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), rgba(255,255,255,.25) 0); display: grid; place-items: center; }
.ring > span { width: 34px; height: 34px; border-radius: 50%; background: rgba(13,18,44,.9); display: grid; place-items: center; font-size: 18px; }
#toasts { position: fixed; left: 50%; top: calc(120px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 5; }
.toast { background: rgba(13,18,44,.92); border: 2px solid var(--line); padding: 9px 18px; border-radius: 14px; font: 400 19px var(--display); letter-spacing: .5px; animation: toast 3.2s forwards; text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-12px) scale(.9); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.vignette { position: absolute; inset: 0; box-shadow: inset 0 0 120px rgba(255, 40, 40, .55); opacity: 0; transition: opacity .3s; }
.vignette.on { opacity: 1; animation: pulse 0.7s infinite alternate; }

/* touch controls */
.touch { position: absolute; inset: 0; pointer-events: none; }
.touch .stickzone { position: absolute; left: 0; top: 30%; bottom: 0; width: 48%; pointer-events: auto; }
.stick { position: absolute; left: calc(46px + var(--safe-l)); bottom: calc(22px + var(--safe-b)); width: 124px; height: 124px; border-radius: 50%; background: rgba(13,18,44,.4); border: 3px solid rgba(255,255,255,.35); pointer-events: none; }
.stick.live { bottom: auto; }
.stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d7dcef); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.tbtn { position: absolute; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 400 13px var(--display); letter-spacing: .5px; box-shadow: 0 5px 0 rgba(0,0,0,.28); border: 3px solid rgba(255,255,255,.55); text-align: center; line-height: 1.05; pointer-events: auto; touch-action: none; }
.tbtn b { display: block; font-size: 25px; font-weight: 400; }
.tbtn.down { transform: translateY(3px) scale(.96); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
.b-grab { right: calc(104px + var(--safe-r)); bottom: calc(24px + var(--safe-b)); width: 92px; height: 92px; background: var(--teal); }
.b-grab b { font-size: 32px; }
.b-throw { right: calc(26px + var(--safe-r)); bottom: calc(118px + var(--safe-b)); width: 68px; height: 68px; background: var(--accent); }
.b-jump { right: calc(24px + var(--safe-r)); bottom: calc(24px + var(--safe-b)); width: 68px; height: 68px; background: #5b6cff; }
.b-emo { right: calc(120px + var(--safe-r)); bottom: calc(136px + var(--safe-b)); width: 48px; height: 48px; background: rgba(13,18,44,.7); font-size: 22px; }

/* phone layout */
body.phone .h-tl, body.phone .h-keys, body.phone .h-score { display: none; }
body.phone .h-status { left: calc(70px + var(--safe-l)); top: calc(10px + var(--safe-t)); width: 168px; padding: 7px 11px; gap: 4px; border-radius: 14px; }
body.phone .h-status .row2 { display: grid; grid-template-columns: 46px 1fr 34px; gap: 6px; align-items: center; font: 600 10px var(--ui); letter-spacing: 1px; color: #c9d0ea; }
body.phone .h-status .row2 .bar { height: 8px; }
body.phone .h-status .row2 b { font: 400 12px var(--display); color: #fff; text-align: right; }
body.phone .h-status .full { display: none; }
body:not(.phone) .h-status .row2 { display: none; }
body.phone .h-route { top: calc(10px + var(--safe-t)); width: auto; left: calc(250px + var(--safe-l)); right: calc(190px + var(--safe-r)); transform: none; padding: 6px 12px; border-radius: 14px; }
body.phone .h-route .ends { font-size: 13px; }
body.phone .h-route .meta { display: none; }
body.phone .track { height: 7px; margin: 5px 0 2px; } body.phone .track > b { font-size: 16px; }
body.phone .h-crew { width: auto; padding: 5px 7px; display: flex; gap: 4px; top: calc(10px + var(--safe-t)); border-radius: 14px; }
body.phone .h-crew .lbl, body.phone .h-crew .m { display: none; }
body.phone .h-crew .mini { display: flex !important; gap: 4px; }
.h-crew .mini { display: none !important; }
.h-crew .mini span { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 13px; border: 2px solid rgba(255,255,255,.7); }
.h-crew .mini span.me { box-shadow: 0 0 0 2px #fff; }
body.phone .h-alerts { top: calc(62px + var(--safe-t)); right: calc(16px + var(--safe-r)); gap: 5px; }
body.phone .alert { font-size: 13px; padding: 4px 11px 4px 8px; }
body.phone .h-item { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); padding: 5px 10px; gap: 8px; border-radius: 14px; }
body.phone .h-item .slotbox { width: 38px; height: 38px; font-size: 20px; border-radius: 10px; }
body.phone .h-item .lbl { display: none; }
body.phone .h-item .nm { font-size: 13px !important; }
body.phone .h-item .bar { display: none; }
body.phone .tagp { font-size: 11px; padding: 3px 8px 3px 6px; } body.phone .tagp .you { font-size: 9px; }
body.phone .bub { width: 38px; height: 38px; font-size: 19px; padding: 3px; }
body.phone .ask { font-size: 11px; padding: 5px 9px 6px; } body.phone .ask i { font-size: 8px; }
body.phone .shout { font-size: 12px; padding: 5px 9px; }
body.phone .prompt { font-size: 12px; } body.phone .prompt .tapi { width: 22px; height: 22px; font-size: 12px; }
body.phone #toasts { top: calc(56px + var(--safe-t)); } body.phone .toast { font-size: 14px; padding: 6px 12px; }
body.phone .pause-btn { display: grid !important; }
.pause-btn { display: none !important; position: absolute; left: calc(18px + var(--safe-l)); top: calc(10px + var(--safe-t)); width: 42px; height: 42px; border-radius: 12px; place-items: center; font: 400 16px var(--display); pointer-events: auto; }
body.phone #ui > .screen { padding: calc(14px + var(--safe-t)) calc(16px + var(--safe-r)) calc(14px + var(--safe-b)) calc(16px + var(--safe-l)); }

#rotate { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; text-align: center; background: #0d1226; font: 400 26px var(--display); padding: 30px; }
#rotate span { display: block; font-size: 64px; margin-bottom: 12px; animation: spin 2s infinite; }
@keyframes spin { 50% { transform: rotate(90deg); } }
@media (orientation: portrait) and (max-width: 820px) { body.playing #rotate { display: grid; } }
#boot { position: fixed; inset: 0; display: grid; place-items: center; font: 400 34px "Lilita One", sans-serif; background: #0d1226; z-index: 60; transition: opacity .4s; }
#boot.gone { opacity: 0; pointer-events: none; }
@media (max-height: 520px) and (orientation: landscape) {
  .menu { width: min(760px, 100%); gap: 10px; }
  .menu .logo { font-size: 46px !important; }
  .menu .tag { font-size: 14px; }
  .menu.title { flex-direction: row; align-items: flex-start; gap: 16px; width: min(860px, 100%); padding-right: 150px; }
  .menu.title .col-a, .menu.title .col-b { flex: 1; gap: 10px; min-width: 0; }
  .menu.lobby { flex-direction: row; align-items: flex-start; gap: 14px; width: min(900px, 100%); }
  .menu.lobby .col-a, .menu.lobby .col-b { flex: 1; gap: 10px; min-width: 0; }
  .menu.lobby .logo { font-size: 34px !important; }
  .stickybar { margin-bottom: calc(-14px - var(--safe-b)); }
  .big { padding: 10px 16px; font-size: 20px; border-radius: 16px; }
  .big .ico { font-size: 22px; }
  .big small { font-size: 12px; }
  .profile { padding: 8px 10px; } .profile .av { width: 38px; height: 38px; font-size: 18px; } .profile input { height: 36px; }
  .sw i { width: 26px; height: 26px; }
  .card { padding: 12px 14px; }
  .roomcode { font-size: 40px; } .qr { width: 96px; height: 96px; } .lobbygrid { grid-template-columns: 1fr 96px; }
  .slot { padding: 5px 8px; font-size: 15px; } .slot .av { width: 32px; height: 32px; font-size: 15px; }
  .codebox input { height: 54px; font-size: 30px; }
  .stars { font-size: 38px; }
  .stats .num { font-size: 20px; }
}
@media (max-width: 1150px) { .h-tl .badge { display: none; } .h-route { width: min(440px, 38vw); } .h-crew { width: 240px; } }
body.phone .h-item.empty { display: none; }
