/* Suck It Up - cozy pastel UI. HUD keeps to the corners; the middle of the screen is for the room. */
:root {
  --teal: #41c3bf; --teal-d: #1f6f73; --cream: #fff8ef; --ink: #23313a; --muted: #6b7a85; --coral: #ff8a6b; --amber: #ffb020; --red: #ff4b4b; --mint: #7de0b0; --gold: #f5c518;
  --panel: rgba(255, 250, 243, 0.96); --shadow: 0 10px 30px rgba(20, 40, 50, 0.22); --r: 20px;
  --sa-l: env(safe-area-inset-left, 0px); --sa-r: env(safe-area-inset-right, 0px); --sa-t: env(safe-area-inset-top, 0px); --sa-b: env(safe-area-inset-bottom, 0px);
  --hud: 1;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe6ff; color: var(--ink); font: 600 16px/1.35 Nunito, system-ui, sans-serif; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
body.big-hud { --hud: 1.25; }
h1, h2, h3, b { font-family: Fredoka, Nunito, sans-serif; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fade { position: fixed; inset: 0; background: #fff8ef; opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 30; }
#fade.on { opacity: 1; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* buttons */
.btn { appearance: none; border: 0; border-radius: 999px; padding: .7rem 1.2rem; font: 700 1rem Fredoka, sans-serif; color: var(--ink); background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.08); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; transition: transform .08s; }
.btn:active { transform: translateY(2px); }
.btn:focus-visible, .ib:focus-visible, .card-btn:focus-visible, .room:focus-visible { outline: 3px solid var(--teal-d); outline-offset: 2px; }
.btn.primary { background: var(--teal); color: #fff; } .btn.gold { background: var(--gold); } .btn.ghost { background: transparent; box-shadow: none; }
.btn.big { font-size: 1.2rem; padding: .9rem 1.6rem; min-height: 54px; } .btn.small { padding: .35rem .8rem; min-height: 34px; font-size: .85rem; }
.btn:disabled { opacity: .5; }
.ib { appearance: none; border: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); box-shadow: var(--shadow); font-size: 1.1rem; color: var(--ink); cursor: pointer; flex: none; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }

/* panels */
.panel { position: fixed; z-index: 20; }
.panel.sheet { inset: max(12px, var(--sa-t)) max(12px, var(--sa-r)) max(12px, var(--sa-b)) max(12px, var(--sa-l)); background: var(--panel); border-radius: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
.panel.sheet.narrow { left: 50%; right: auto; width: min(560px, calc(100vw - 24px)); transform: translateX(-50%); overflow-y: auto; gap: 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .sheet-head h2 { margin: 0; font-size: 1.5rem; } .sheet-head .muted { flex: 1 1 200px; }
.panel.side { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; background: var(--panel); border-radius: 26px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.panel.side h2 { margin: 0; font-size: 1.7rem; }
.gate { z-index: 60; }
.gate .row { display: flex; gap: 8px; justify-content: center; }

/* title */
.panel.title { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: max(16px, var(--sa-t)) 16px max(16px, var(--sa-b)); }
.title-art { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(1.05); }
.title-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,248,239,.15), rgba(255,248,239,.55)); }
.logo { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.logo img { width: min(440px, 70vw); aspect-ratio: 3/2; object-fit: cover; border-radius: 26px; box-shadow: var(--shadow); border: 5px solid #fff; }
.logo h1 { margin: -34px 0 0; font-size: clamp(2.4rem, 7vw, 4rem); color: #fff; text-shadow: 0 4px 0 var(--teal-d), 0 8px 24px rgba(0,0,0,.3); line-height: 1; letter-spacing: .5px; }
.logo h1 small { display: block; font-size: .9rem; letter-spacing: 2px; text-transform: uppercase; color: var(--cream); text-shadow: 0 2px 0 var(--teal-d); }
.logo p { margin: 6px 0 0; font-weight: 800; color: var(--teal-d); background: rgba(255,255,255,.75); padding: 2px 12px; border-radius: 99px; }
.title-btns { position: relative; display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(420px, 100%); }
.title-btns > .btn.big { width: 100%; }
.xp-anchor { position: relative; }
@media (orientation: landscape) and (max-height: 520px) {
  .panel.title { flex-direction: row; gap: 28px; padding-left: max(24px, var(--sa-l)); padding-right: max(24px, var(--sa-r)); }
  .logo img { width: min(360px, 42vw); } .logo h1 { font-size: 2.6rem; }
  .title-btns { width: min(360px, 44vw); gap: 8px; } .btn.big { min-height: 48px; font-size: 1.05rem; padding: .6rem 1rem; }
}

/* room grid */
.room-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 4px 2px 12px; grid-auto-rows: max-content; align-content: start; }
.room { position: relative; border: 0; border-radius: 18px; padding: 10px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.08); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 120px; font: inherit; color: inherit; }
.room canvas { width: 100%; aspect-ratio: 16/10; border-radius: 10px; background: #eee; }
.room b { font-size: .98rem; } .room small { color: var(--muted); font-size: .76rem; line-height: 1.2; }
.room .n { position: absolute; top: 14px; left: 14px; background: var(--teal); color: #fff; border-radius: 99px; font: 700 .8rem Fredoka, Nunito, system-ui, sans-serif; padding: 1px 8px; }
.room .st { position: absolute; top: 14px; right: 14px; font-size: 1rem; background: #fff; border-radius: 99px; padding: 0 6px; }
.room.locked { opacity: .55; cursor: not-allowed; } .room.locked canvas { filter: grayscale(1) blur(1px); }
.room .pb { height: 5px; background: #eee; border-radius: 9px; overflow: hidden; } .room .pb i { display: block; height: 100%; background: var(--teal); }

/* multiplayer */
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 800; }
.field input, .field select, .join-row input { font: 700 1.05rem Nunito; padding: .6rem .8rem; border-radius: 14px; border: 2px solid #e2d8cc; background: #fff; color: var(--ink); }
.mp-cards { display: grid; gap: 10px; } .card-btn { border: 0; border-radius: 18px; background: #fff; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: inherit; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.card-btn b { font-size: 1.15rem; } .card-btn span { color: var(--muted); font-size: .9rem; }
.join-row { display: flex; gap: 8px; } .join-row input { flex: 1; min-width: 0; letter-spacing: 3px; }
.err { color: #c0392b; font-weight: 800; }
.code-box { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 14px; flex-wrap: wrap; } .code-box b { font-size: 1.8rem; letter-spacing: 4px; flex: 1; }
.lobby-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .lobby-list li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 8px 12px; }
.lobby-list .dot { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; font-size: .8rem; border-radius: 6px; }
.seg { display: flex; background: #fff; border-radius: 99px; padding: 4px; gap: 4px; } .seg button { flex: 1; border: 0; background: transparent; border-radius: 99px; padding: .5rem; font: 700 .9rem Fredoka, Nunito, system-ui, sans-serif; color: var(--ink); cursor: pointer; } .seg button.on { background: var(--teal); color: #fff; }
.host-only { display: grid; gap: 10px; }
body:not(.is-host) .host-only { display: none; } body.is-host .guest-only { display: none; }
body:not(.mp-comp) .comp-only { display: none !important; }
.invite h3 { margin: 6px 0; } .invite .fr { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }

/* garage */
.garage { flex: 1; display: flex; gap: 12px; min-height: 0; }
#garageCv { flex: 1 1 50%; min-width: 0; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #fff, #e8f6f5); }
.garage-side { flex: 1 1 50%; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; flex: none; } .tabs button { flex: none; border: 0; border-radius: 99px; padding: .45rem .9rem; font: 700 .88rem Fredoka, Nunito, system-ui, sans-serif; background: #fff; color: var(--ink); cursor: pointer; } .tabs button.on { background: var(--teal); color: #fff; }
.swatches { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; align-content: start; }
.sw { border: 3px solid transparent; border-radius: 16px; background: #fff; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: 700 .8rem Nunito; color: var(--ink); position: relative; }
.sw.on { border-color: var(--teal); } .sw .chip { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: #f3eee8 center/cover; }
.sw .lock { position: absolute; top: 4px; right: 6px; font-size: .8rem; } .sw.locked { opacity: .6; }
@media (orientation: portrait) { .garage { flex-direction: column; } #garageCv { flex: 0 0 38%; } }

/* settings */
.settings { display: grid; gap: 12px; } .slide { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; } .slide input { width: 100%; accent-color: var(--teal); } .tog { display: flex; align-items: center; gap: 10px; } .tog input { width: 22px; height: 22px; accent-color: var(--teal); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-size: calc(15px * var(--hud)); }
#hud button, #hud .btn { pointer-events: auto; }
.hc { position: absolute; display: flex; gap: 8px; }
.hc.tl { top: max(10px, var(--sa-t)); left: max(10px, var(--sa-l)); align-items: flex-start; }
.hc.tc { top: max(10px, var(--sa-t)); left: 50%; transform: translateX(-50%); flex-direction: column; align-items: center; }
.hc.tr { top: max(10px, var(--sa-t)); right: max(10px, var(--sa-r)); flex-direction: column; align-items: flex-end; }
.meters { display: grid; gap: 6px; }
.meter { display: flex; align-items: center; gap: 6px; background: var(--panel); border-radius: 99px; padding: 4px 10px 4px 6px; box-shadow: var(--shadow); min-width: 150px; }
.meter .sym { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef7f7; font-size: .9rem; }
.meter .bar { flex: 1; height: 10px; background: #e7e0d8; border-radius: 9px; overflow: hidden; } .meter .bar i { display: block; height: 100%; width: 100%; background: var(--teal); border-radius: 9px; transition: width .2s, background .3s; }
.meter small { font: 700 .85em Fredoka, Nunito, system-ui, sans-serif; min-width: 40px; text-align: right; }
.meter.warn .bar i { background: repeating-linear-gradient(45deg, var(--amber) 0 6px, #ffcf6a 6px 12px); } .meter.warn .sym { background: #fff1d1; }
.meter.crit .bar i { background: repeating-linear-gradient(45deg, var(--red) 0 4px, #ff8a8a 4px 8px); animation: pulse 0.8s infinite; } .meter.crit .sym { background: #ffdede; }
.meter.full .sym::after { content: '!'; position: absolute; font-size: .7em; }
.meter.charging .bar i { background: linear-gradient(90deg, var(--mint), var(--teal)); animation: shimmer 1s linear infinite; background-size: 200% 100%; }
@keyframes pulse { 50% { opacity: .45; } } @keyframes shimmer { to { background-position: -200% 0; } }
.clean { background: var(--panel); border-radius: 18px; padding: 6px 14px 8px; box-shadow: var(--shadow); text-align: center; min-width: 170px; display: flex; flex-direction: column; align-items: center; }
.clean b { font-size: 1.5em; line-height: 1.1; } .clean small { font-size: .78em; color: var(--muted); } .clean .obj { color: var(--teal-d); font-weight: 800; max-width: 46vw; }
.clean .bar { width: 150px; height: 8px; background: #e7e0d8; border-radius: 9px; overflow: hidden; margin: 2px 0; } .clean .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--mint)); transition: width .3s; }
.clean.near b { color: #b0368c; }
.comp { background: var(--panel); border-radius: 16px; padding: 6px 10px; box-shadow: var(--shadow); margin-top: 6px; text-align: center; min-width: 170px; } .comp b { font-size: 1.3em; }
.board { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: .86em; text-align: left; }
.board li { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; } .board .sh { width: 16px; height: 16px; display: grid; place-items: center; color: #fff; font-size: 10px; } .board .me { font-weight: 900; } .board .pct { color: var(--muted); font-size: .85em; }
#compBox { pointer-events: auto; cursor: pointer; max-height: 46vh; overflow-y: auto; padding: 4px 10px; min-width: 150px; }
#compBox #timer { font-size: 1.1em; } .board li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9em; }
.board li.more { display: block; text-align: center; color: var(--teal-d); font-weight: 800; font-size: .85em; }
body.mode-comp .clean .obj { display: none; }
#mini { width: calc(150px * var(--hud)); height: calc(150px * var(--hud)); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.legend { font-size: .7em; background: var(--panel); border-radius: 10px; padding: 2px 8px; display: flex; gap: 8px; color: var(--muted); }
.edge-arrow { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--teal-d); display: grid; place-items: center; font-size: 1.4rem; box-shadow: var(--shadow); border: 3px solid var(--teal); transform-origin: center; }
.msg { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); background: rgba(35, 49, 58, .85); color: #fff; padding: 8px 18px; border-radius: 99px; font-weight: 800; opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.msg.on { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.dock-msg { position: absolute; left: 50%; bottom: max(20px, var(--sa-b)); transform: translateX(-50%); background: var(--panel); border-radius: 18px; padding: 8px 18px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; border: 3px solid var(--mint); animation: pop .35s; }
.dock-msg b { color: var(--teal-d); font-size: 1.15em; } .dock-msg small { color: var(--muted); }
@keyframes pop { from { transform: translateX(-50%) scale(.8); opacity: 0; } }
.dead-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border-radius: 22px; padding: 16px 20px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; border: 3px solid var(--red); }
.done-box { position: absolute; left: 50%; bottom: max(24px, calc(var(--sa-b) + 24px)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); background: var(--panel); border-radius: 22px; padding: 12px 16px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; border: 3px solid var(--mint); animation: pop .35s; z-index: 12; }
.done-box b { color: var(--teal-d); font-size: 1.2em; } .done-box span { font-size: .92em; } .done-box small { color: var(--muted); font-size: .75em; } .done-box small:empty { display: none; }
#finishBtn { min-height: 52px; font-size: 1.15rem; touch-action: manipulation; }
.spots-left { display: inline-block; margin-top: 3px; font-size: .8em; background: #ff1f8f; color: #fff; font-weight: 800; padding: 4px 14px; border-radius: 99px; box-shadow: var(--shadow); animation: spotpulse 1s ease-in-out infinite; pointer-events: none; }
@keyframes spotpulse { 50% { box-shadow: 0 0 0 6px rgba(255,31,143,.25); } }
@media (pointer: coarse) { .done-box { bottom: auto; top: 50%; transform: translate(-50%, -50%); animation: none; } }
.find { position: absolute; left: 50%; bottom: max(90px, calc(var(--sa-b) + 90px)); transform: translateX(-50%); }
.dockkey { position: fixed; right: max(14px, var(--sa-r)); bottom: max(14px, var(--sa-b)); z-index: 11; border: 0; border-radius: 99px; padding: .6rem 1rem; font: 700 1rem Fredoka, Nunito, system-ui, sans-serif; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; color: var(--ink); }
.dockkey.on, .tb.dockb.on { background: var(--teal); color: #fff; }
.dockkey kbd { background: #eee; border-radius: 6px; padding: 0 6px; font-size: .8rem; color: var(--ink); }

/* touch */
#touch { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
.joy { position: absolute; left: max(18px, var(--sa-l)); bottom: max(18px, var(--sa-b)); width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.35); border: 3px solid rgba(255,255,255,.75); pointer-events: auto; touch-action: none; backdrop-filter: blur(2px); }
.joy i { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
body.left-joy .joy { left: auto; right: max(18px, var(--sa-r)); }
.tbtns { position: absolute; right: max(18px, var(--sa-r)); bottom: max(18px, var(--sa-b)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: auto; }
body.left-joy .tbtns { right: auto; left: max(18px, var(--sa-l)); align-items: flex-start; }
.tb { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--panel); box-shadow: var(--shadow); font-size: 1.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.tb small { font: 700 .7rem Fredoka, Nunito, system-ui, sans-serif; } .tb.small { width: 50px; height: 50px; font-size: 1.3rem; } .rot { display: flex; gap: 8px; }
body:not(.rot-btns) .rot { display: none; }
@media (orientation: portrait) {
  .hc.tc { top: calc(max(10px, var(--sa-t)) + 132px); } #compBox { max-height: 30vh; } .meter { min-width: 120px; } #mini { width: calc(110px * var(--hud)); height: calc(110px * var(--hud)); }
  .joy { width: 130px; height: 130px; } .tb { width: 70px; height: 70px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #hud { font-size: calc(13px * var(--hud)); } .meter { min-width: 128px; padding: 2px 8px 2px 4px; } .meter .sym { width: 22px; height: 22px; }
  #mini { width: calc(118px * var(--hud)); height: calc(118px * var(--hud)); } .clean { min-width: 140px; padding: 4px 10px 6px; } .clean .bar { width: 120px; } .clean b { font-size: 1.3em; }
  .joy { width: 128px; height: 128px; } .tb { width: 66px; height: 66px; } .find { bottom: 14px; } .dock-msg { bottom: 10px; padding: 6px 14px; }
  .legend { display: none; }
}

/* results */
.results { overflow: visible; } .res-board { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; text-align: left; }
.res-board li { display: grid; grid-template-columns: 34px 22px 1fr auto; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 6px 10px; } .res-board .pl { font: 700 1.1rem Fredoka, Nunito, system-ui, sans-serif; }
.res-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; } .res-stats div { background: #fff; border-radius: 14px; padding: 6px 12px; } .res-stats b { display: block; font-size: 1.2rem; }
.gold-line { font-weight: 800; color: #9a6c00; margin: 0; } .reward { background: #fff4c7; border-radius: 14px; padding: 8px; margin: 0; font-weight: 800; }
.confetti { position: absolute; inset: -20px; pointer-events: none; overflow: hidden; border-radius: 26px; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }

.loading { position: fixed; inset: 0; z-index: 70; background: #1f6f73 center/cover; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12vh; transition: opacity .5s; }
.loading div { background: var(--panel); border-radius: 20px; padding: 10px 20px; text-align: center; display: flex; flex-direction: column; } .loading b { font-size: 1.6rem; color: var(--teal-d); }
.loading.off { opacity: 0; pointer-events: none; }
.toast { position: fixed; left: 50%; bottom: max(24px, var(--sa-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 800; z-index: 80; opacity: 0; transition: .3s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%); }
body[data-mode="play"] .panel.title { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* FPV: the minimap matters more, so it grows a little */
body.fpv #mini { width: calc(180px * var(--hud)); height: calc(180px * var(--hud)); }
@media (orientation: landscape) and (max-height: 520px) { body.fpv #mini { width: calc(140px * var(--hud)); height: calc(140px * var(--hud)); } }
@media (orientation: portrait) { body.fpv #mini { width: calc(130px * var(--hud)); height: calc(130px * var(--hud)); } }
body.fpv .ib.cam { background: var(--teal); color: #fff; }
.slide select { font: 700 1rem Nunito; padding: .4rem; border-radius: 10px; border: 2px solid #e2d8cc; }

/* Room Studio rooms, creator rooms, signature vacuums */
.room-head { grid-column: 1 / -1; margin: 10px 2px 0; font-size: 1.1rem; }
.room.custom { border: 2px solid #f5c518; }
.badge-creator { align-self: flex-start; background: #a98bff; color: #fff; border-radius: 99px; font: 700 .68rem Fredoka, Nunito, sans-serif; padding: 1px 8px; }
.redeem { grid-column: 1 / -1; display: flex; gap: 6px; } .redeem input { flex: 1; min-width: 0; font: 700 1rem Nunito; padding: .5rem .7rem; border-radius: 12px; border: 2px solid #e2d8cc; text-transform: uppercase; letter-spacing: 1px; }
.sw small { font-size: .7rem; }
.studio-panel { position: fixed; right: max(10px, var(--sa-r)); bottom: max(110px, calc(var(--sa-b) + 110px)); z-index: 12; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 10px; width: min(330px, 70vw); max-height: 55vh; overflow: auto; display: grid; gap: 6px; font-size: .85rem; }
.studio-panel .sp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid #eee2d4; padding-top: 6px; } .studio-panel label { display: flex; gap: 4px; align-items: center; } .studio-panel input[type=range] { width: 70px; }
/* collections / creators / trade / welcome */
.scroll { overflow-y: auto; flex: 1; min-height: 0; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.col-card { background: #fff; border: 0; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; box-shadow: 0 3px 0 rgba(0,0,0,.06); font: inherit; color: inherit; text-align: left; }
.col-card .col-art, .cr-card img { width: 100%; aspect-ratio: 4/3; border-radius: 12px; background: #e8f4f3 center/cover; display: grid; place-items: center; font-size: 2.2rem; object-fit: cover; }
.cr-card { cursor: pointer; }
.badge-retired { font-size: .72rem; background: #eee; color: #555; border-radius: 99px; padding: 2px 8px; }
.badge-mode { font-size: .72rem; background: #e8f4f3; color: var(--teal-d); border-radius: 99px; padding: 2px 8px; margin-right: 4px; }
.cr-prof { display: flex; gap: 14px; align-items: flex-start; margin: 10px 0; } .cr-prof img, .cr-prof .ph { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #e8f4f3; display: grid; place-items: center; font-size: 2.5rem; flex: none; }
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(20,30,40,.55); display: grid; place-items: center; padding: 16px; }
.overlay[hidden] { display: none; }
.tw-card, .wl-card { background: var(--panel); border-radius: 26px; padding: 18px; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow); }
.tw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 600px) { .tw-cols { grid-template-columns: 1fr; } }
.tw-side { background: #fff; border-radius: 16px; padding: 12px; } .tw-side h3 { margin: 0 0 6px; font-size: 1rem; }
.tr-pick { display: flex; flex-direction: column; gap: 6px; }
.tw-cd { font: 700 1.6rem Fredoka, sans-serif; color: var(--teal-d); } .ok { color: #1a8a5a; } .warn { background: #fff3d6; border-radius: 12px; padding: 8px 10px; }
.tr-row { align-items: center; gap: 8px; }
.wl-card { text-align: center; } .wl-head { display: flex; gap: 12px; align-items: center; justify-content: center; } .wl-head img, .wl-head .ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #e8f4f3; display: grid; place-items: center; font-size: 2rem; }
.wl-head small { color: var(--muted); } .wl-head h2 { margin: 0; font-size: 1.7rem; }
.wl-cv { width: 100%; height: 260px; display: block; }
.wl-items { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .wl-items span { background: #fff; border-radius: 99px; padding: 4px 12px; }
.redeem.big input { font-size: 1.1rem; }
.tw-card .sheet-head h2 { flex: 1; } .tw-card .sheet-head .ib { margin-left: auto; }
/* World Tour (50 big multi-room levels, one 3-egg unlock) */
.tour-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tour-head h3 { margin: 0; font-size: 1.1rem; flex: 1 1 260px; } .tour-head h3 small { display: block; font-weight: 600; font-size: .78rem; }
.tour-badge { background: #e8f7f2; color: #1f6f5b; border-radius: 99px; padding: 3px 10px; font-weight: 700; font-size: .8rem; }
.tour-filters { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.tchip { border: 2px solid #e4ddd3; background: #fff; border-radius: 99px; padding: 5px 12px; font: 700 .85rem Nunito, system-ui, sans-serif; cursor: pointer; color: inherit; min-height: 34px; }
.tchip small { color: var(--muted); font-weight: 600; } .tchip.on { border-color: var(--teal); background: #e6f8f8; }
.room.tour.locked { cursor: pointer; } .room .tier { position: absolute; top: 40px; left: 14px; color: #fff; border-radius: 99px; font: 700 .7rem Nunito, system-ui, sans-serif; padding: 1px 8px; }

.spots-left[hidden] { display: none; }
