:root {
  --ink: #1b1030; --cream: #fff4dc; --pink: #ff4d6d; --yellow: #ffd23f; --mint: #3ddc97; --cyan: #4cc9f0; --violet: #b388ff; --orange: #ff9f45;
  --r: 14px; --R: 24px; --display: "Secular One", Rubik, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--cream); font-family: Rubik, system-ui, "Segoe UI", sans-serif; font-weight: 500; touch-action: none; user-select: none; -webkit-user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#tags, #hud { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#hud > * { pointer-events: auto; }
#hud > .endbox, #hud > .bannerbox, #hud > .chips, #hud > .toasts, #hud > .feed, #hud > .hint, #hud > .touch { pointer-events: none; }   /* full-screen layers must not eat clicks meant for the roll button or the canvas */
#hud[hidden], #ui[hidden], #modal[hidden] { display: none; }
#ui { scrollbar-width: none; } #ui::-webkit-scrollbar { display: none; }
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }

/* ---------- buttons + fields */
.btn { font: 400 18px var(--display); color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); min-height: 48px; padding: 0 20px; cursor: pointer; box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.hot { background: var(--yellow); }
.btn.danger { background: #ffc2cc; }
.btn.big { font-size: 22px; min-height: 56px; padding: 0 24px; }
.btn.sq { width: 48px; padding: 0; font-size: 26px; }
.swatch { width: 20px; height: 20px; background: var(--c); border: 3px solid var(--ink); border-radius: 50%; display: inline-block; }
input[type=text], input:not([type]) { font: 700 17px Rubik, sans-serif; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); min-height: 48px; padding: 0 14px; width: 150px; outline: none; user-select: text; -webkit-user-select: text; }
input:focus { box-shadow: 0 0 0 3px var(--yellow); }
input[type=range] { width: 100%; accent-color: #ff4d6d; height: 28px; }

/* ---------- home */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 18px; }
.menu { width: min(980px, 100%); margin: auto; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.brand { display: flex; flex-direction: column; align-items: center; margin: 10px 0 18px; }
.logo { margin: 0; line-height: .84; font: 400 clamp(54px, min(11.5vw, 15.5vh), 124px) "Rubik Bubbles", var(--display); display: flex; flex-direction: column; align-items: center; transform: rotate(-2deg); }
.logo span { color: var(--cream); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); }
.logo span:first-child { color: var(--yellow); }
.logo span:last-child { color: #7ff0c3; animation: bobtext 3.2s ease-in-out infinite; }
@keyframes bobtext { 50% { transform: translateY(-5px) rotate(1deg); } }
.sub { font: 400 clamp(26px, 5vw, 40px) var(--display); color: var(--yellow); background: var(--ink); margin-top: 16px; padding: 4px 26px 8px; border-radius: 20px; letter-spacing: .05em; box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 0 4px var(--cream); transform: rotate(-1.5deg); }
.tag-line { margin: 12px 0 0; font: 500 16px Rubik; max-width: 500px; line-height: 1.5; background: rgba(27,16,48,.62); padding: 8px 16px; border-radius: 14px; }
.notice { background: var(--pink); color: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); padding: 8px 16px; font-weight: 700; margin: 0 0 14px; }
.profile { display: flex; gap: 12px; justify-content: center; align-items: stretch; flex-wrap: wrap; margin-bottom: 26px; }
.namebox { display: inline-flex; align-items: stretch; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: 0 5px 0 var(--ink); overflow: hidden; min-height: 48px; }
.namebox span { background: var(--ink); color: var(--cream); font: 400 14px var(--display); padding: 0 14px; display: flex; align-items: center; }
.namebox input { border: 0; border-radius: 0; box-shadow: none; min-height: 0; width: 160px; background: transparent; font: 400 20px var(--display); padding: 0 14px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; }
.card { font-family: inherit; text-align: center; color: var(--ink); border: 4px solid var(--ink); border-radius: var(--R); padding: 14px 16px 18px; cursor: pointer; box-shadow: 0 8px 0 var(--ink); transition: transform .14s, box-shadow .14s; display: flex; flex-direction: column; align-items: center; }
.card.c0 { background: #ffb3d3; } .card.c1 { background: #a9ecff; } .card.c2 { background: #ffd08a; }
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 0 var(--ink); }
.card:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.card .art { position: relative; overflow: hidden; background: var(--cream); border: 3px solid var(--ink); border-radius: calc(var(--R) - 6px); width: 100%; height: 176px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card .art svg { height: 112px; width: auto; transition: transform .25s; }
.card:hover .art svg { transform: scale(1.08) rotate(-3deg); }
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .4s; } .thumb.on { opacity: 1; }
.card h3 { margin: 0 0 6px; font: 400 28px var(--display); }
.card p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; flex: 1; max-width: 270px; }
.card small { font: 400 14px var(--display); background: var(--ink); color: var(--cream); padding: 4px 12px; border-radius: 10px; }
.join-inline { margin-top: 28px; display: flex; gap: 14px; align-items: center; justify-content: center; font: 400 20px var(--display); color: var(--ink); background: var(--cream); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink); padding: 10px 16px; flex-wrap: wrap; }
.join-inline input { width: 110px; text-align: center; letter-spacing: .16em; text-transform: uppercase; font-family: var(--display); font-size: 22px; }

/* ---------- cream panels (mode, lobby, maker, modals) */
.menu.small, .panel, .modal { background: var(--cream); color: var(--ink); border: 4px solid var(--ink); border-radius: var(--R); box-shadow: 0 9px 0 var(--ink); }
.menu.small { width: min(480px, 100%); padding: 26px 22px 24px; }
.back { position: absolute; top: 14px; right: 18px; font: 400 15px var(--display); background: none; border: 0; color: var(--ink); cursor: pointer; opacity: .6; padding: 4px; }
.back:hover { opacity: 1; }
.art.lg { width: 172px; height: 120px; margin: 0 auto 4px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.art.lg svg { height: 100px; width: auto; }
.menu.small h2, .modal h2 { margin: 10px 0 6px; font: 400 34px var(--display); }
.blurb { margin: 0 0 16px; line-height: 1.5; max-width: 380px; }
.stepper { font: 400 18px var(--display); margin: 8px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stepper small { font: 500 13px Rubik; opacity: .65; }
.stepper > div { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 10px; }
.stepper b { font: 400 40px var(--display); min-width: 54px; }
.stepper em { font: 500 14px Rubik; font-style: normal; color: #c02b4c; min-height: 20px; margin-top: 6px; }
.col { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.codebox { background: var(--ink); color: var(--cream); border-radius: 18px; padding: 12px 14px 16px; margin: 8px 0 14px; display: grid; gap: 8px; justify-items: center; width: 100%; }
.codebox b { font: 400 58px var(--display); letter-spacing: .2em; line-height: 1; color: var(--yellow); padding-right: .2em; }
.codebox small { opacity: .75; font: 400 14px var(--display); }
.roster { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; width: 100%; }
.roster li { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--ink); border-radius: var(--r); padding: 6px 12px; min-height: 48px; font: 400 18px var(--display); text-align: right; }
.roster i { width: 18px; height: 18px; background: var(--c); border: 3px solid var(--ink); border-radius: 50%; flex: none; }
.roster .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster em { font: 500 12px Rubik; font-style: normal; background: var(--ink); color: var(--cream); padding: 2px 8px; border-radius: 8px; }
.roster .vi { display: none; color: #17a863; } .roster li.vo .vi { display: inline-flex; }
.roster .tm, .roster .kick { font: 400 14px var(--display); border: 3px solid var(--ink); border-radius: 10px; padding: 2px 10px; cursor: pointer; color: var(--ink); background: var(--c, #fff); }
.roster .tm[disabled] { cursor: default; }
.roster .kick { background: #ffc2cc; }
.roster li.talk, .chip.talk, .tag.talk { animation: talk .5s ease-in-out infinite alternate; }
@keyframes talk { to { box-shadow: 0 0 0 4px var(--mint); } }
.voicebox { margin: 0 0 12px; display: flex; justify-content: center; }
.group { margin: 12px 0; width: 100%; text-align: right; } .group > b { display: block; font: 400 17px var(--display); margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { font: 500 14px Rubik; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 12px; min-height: 36px; padding: 0 12px; cursor: pointer; }
.opt.on { background: var(--yellow); font-weight: 700; }
.seg .opts { justify-content: flex-start; }

/* ---------- tool buttons (sound, mic) */
.tools { position: fixed; left: 14px; top: 14px; z-index: 5; display: flex; gap: 8px; pointer-events: auto; }
.tools.top { position: absolute; }
.tool { display: inline-flex; align-items: center; gap: 8px; font: 400 14px var(--display); color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: 0 4px 0 var(--ink); min-height: 44px; padding: 0 12px; cursor: pointer; }
.tool:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tool.mic[data-s="live"] { background: var(--mint); } .tool.mic[data-s="muted"] { background: #ffb3c0; } .tool.mic[data-s="off"] { background: var(--yellow); }
.tools.top .tool span { display: none; } .tools.top .tool { padding: 0 10px; }
.tools.top .tool.mic[data-s="off"] span { display: inline; }

/* ---------- bubble maker */
.maker { justify-content: flex-start; align-items: center; padding: 0; overflow: hidden; }
.panel { width: min(400px, 100%); margin: 0 28px; padding: 18px 20px 20px; position: relative; max-height: calc(100vh - 28px); overflow: hidden; }
.phead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.phead h2 { margin: 0; font: 400 30px var(--display); }
.phead .back { position: static; font: 400 16px var(--display); opacity: .75; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 320px; }
.group > b { font: 700 13px Rubik !important; opacity: .6; letter-spacing: .04em; margin-bottom: 7px !important; }
.segc { display: grid; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.segc.c3 { grid-template-columns: repeat(3, 1fr); } .segc.c4 { grid-template-columns: repeat(4, 1fr); }
.segc button { font: 500 14px Rubik; color: var(--ink); background: transparent; border: 0; border-inline-start: 2px solid rgba(27,16,48,.18); min-height: 40px; padding: 0 4px; cursor: pointer; }
.segc button:first-child { border-inline-start: 0; }
.segc button.on { background: var(--yellow); font-weight: 800; }
.sw { aspect-ratio: 1; background: var(--c); border: 3px solid var(--ink); border-radius: 50%; cursor: pointer; box-shadow: 0 3px 0 var(--ink); max-height: 46px; }
.sw.on { outline: 4px solid var(--ink); outline-offset: 2px; transform: translateY(-2px); }
.panel .row { display: flex; gap: 12px; margin-top: 16px; }
.panel .row .big { flex: 1; }

/* ---------- modal */
#modal { position: fixed; inset: 0; z-index: 30; }
.modal-bg { position: absolute; inset: 0; background: rgba(27,16,48,.62); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; touch-action: auto; }
.modal { width: min(440px, 100%); padding: 22px 22px 24px; text-align: center; max-height: 100%; overflow-y: auto; }
.modal .group, .modal .roster { text-align: right; }

/* ---------- hud */
.chips { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 330px); pointer-events: none; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 14px; padding: 3px 12px; min-height: 36px; font: 400 15px var(--display); box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--cream); flex: none; }
.chip span { color: var(--yellow); min-width: 12px; text-align: center; display: inline-flex; align-items: center; }
.chip .ic { width: 20px; height: 20px; }
.chip.on { background: var(--c); color: var(--ink); transform: translateY(3px) scale(1.06); } .chip.on span { color: var(--ink); } .chip.on i { border-color: var(--ink); background: var(--cream); }
.chip.dead { opacity: .4; text-decoration: line-through; }
.toasts { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--c, var(--cream)); border: 3px solid var(--c, var(--cream)); border-radius: 14px; padding: 5px 14px; font: 400 16px var(--display); animation: toast 3.2s both; }
@keyframes toast { 0% { transform: translateY(-14px) scale(.8); opacity: 0; } 8% { transform: none; opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.bannerbox { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.banner { font: 400 clamp(36px, 8vw, 78px) var(--display); color: var(--cream); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); text-align: center; animation: bpop 1.2s both; padding: 0 12px; }
.banner.count { font-size: clamp(100px, 24vw, 240px); color: var(--yellow); animation-duration: .65s; }
@keyframes bpop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 15% { transform: scale(1.12) rotate(2deg); opacity: 1; } 28% { transform: scale(1); } 80% { opacity: 1; } 100% { transform: scale(1.05); opacity: 0; } }
.hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: 500 15px Rubik; background: var(--ink); color: var(--cream); padding: 6px 14px; border-radius: 12px; opacity: 0; transition: opacity .3s; pointer-events: none; text-align: center; max-width: 92%; }
.action { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); font: 400 28px var(--display); color: var(--ink); background: var(--yellow); border: 4px solid var(--ink); border-radius: 18px; min-height: 64px; padding: 0 32px; box-shadow: 0 7px 0 var(--ink); cursor: pointer; display: flex; align-items: center; gap: 12px; }
.action .ic { width: 34px; height: 34px; }
.action[hidden], .aux[hidden] { display: none; }
.action:active { transform: translateX(-50%) translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.action.popin { animation: apop .5s both; }
@keyframes apop { 0% { transform: translateX(-50%) scale(.4); } 60% { transform: translateX(-50%) scale(1.12); } 100% { transform: translateX(-50%) scale(1); } }
.aux { position: absolute; bottom: 14px; right: 14px; font: 400 15px var(--display); color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: 0 4px 0 var(--ink); min-height: 44px; padding: 0 16px; cursor: pointer; }
.exit { position: absolute; top: 14px; right: 14px; font: 400 15px var(--display); color: var(--cream); background: var(--ink); border: 3px solid var(--cream); border-radius: var(--r); min-height: 44px; padding: 0 16px; cursor: pointer; opacity: .9; }
.micprompt { position: absolute; bottom: 64px; left: 14px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--cream); border: 3px solid var(--yellow); border-radius: var(--r); padding: 6px 8px 6px 14px; font: 400 15px var(--display); }
.micprompt .btn { min-height: 38px; font-size: 15px; padding: 0 14px; box-shadow: 0 3px 0 #000; }
.board { position: absolute; top: 66px; right: 14px; width: 204px; background: rgba(27,16,48,.9); border: 3px solid var(--ink); border-radius: 16px; padding: 6px; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.bhead { width: 100%; display: flex; justify-content: space-between; align-items: center; font: 400 15px var(--display); color: var(--cream); background: none; border: 0; padding: 4px 8px; cursor: pointer; }
.blist { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.brow { position: relative; display: flex; align-items: center; gap: 6px; border-radius: 10px; padding: 4px 8px; min-height: 30px; background: rgba(255,255,255,.08); overflow: hidden; font: 400 13px var(--display); color: var(--cream); }
.brow em { position: absolute; inset: 0 auto 0 auto; right: 0; background: var(--c); opacity: .55; border-radius: 10px; transition: width .6s ease; }
.brow i { position: relative; font-style: normal; width: 16px; text-align: center; opacity: .8; }
.brow b { position: relative; flex: 1; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow span { position: relative; font: 500 12px Rubik; opacity: .95; }
.brow.me { outline: 2px solid var(--yellow); }
.feed { position: absolute; left: 14px; bottom: 90px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; pointer-events: none; max-width: min(360px, 70%); }
.feedline { background: rgba(27,16,48,.86); color: var(--c, var(--cream)); border: 2px solid var(--c, var(--cream)); border-radius: 12px; padding: 5px 12px; font: 400 15px var(--display); animation: feedin .35s both, feedout .5s 6.4s both; }
@keyframes feedin { from { transform: translateX(-24px); opacity: 0; } }
@keyframes feedout { to { opacity: 0; transform: translateY(-8px); } }
.tag.rank { font-size: 18px; padding: 3px 12px; }
.endbox { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.endbox.low { align-items: flex-end; padding-bottom: 16px; } .endbox.low .endcard { padding: 10px 24px 14px; } .endbox.low .endcard h2 { font-size: clamp(26px, 5vw, 40px); } .endbox.low .endcard p { margin: 4px 0 10px; }
.endcard { pointer-events: auto; background: var(--cream); color: var(--ink); border: 4px solid var(--ink); border-radius: var(--R); box-shadow: 0 10px 0 var(--ink); padding: 20px 30px 24px; text-align: center; animation: bpop2 .5s both; max-width: 92%; }
.endcard h2 { margin: 0; font: 400 clamp(32px, 7vw, 56px) var(--display); color: var(--c); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.endcard p { margin: 6px 0 16px; font-weight: 700; }
.endcard .row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.wait { font-weight: 700; opacity: .7; }
@keyframes bpop2 { from { transform: scale(.5) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 3D-anchored labels */
.tag { position: absolute; left: 0; top: 0; will-change: transform; background: rgba(27,16,48,.86); color: var(--c, #fff); border: 2px solid var(--c, #fff); border-radius: 10px; padding: 1px 9px; font: 400 14px var(--display); white-space: nowrap; transition: opacity .15s; }
.tag.me { background: var(--c); color: var(--ink); border-color: var(--ink); font-size: 16px; padding: 1px 11px; }
.pop { position: absolute; transform: translate(-50%, -50%); font: 400 26px var(--display); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); animation: pop 1.1s ease-out both; white-space: nowrap; }
.pop.big { font-size: 40px; }
@keyframes pop { 0% { transform: translate(-50%, -20%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -60%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -190%) scale(1); opacity: 0; } }

/* ---------- touch controls */
.touch { position: absolute; inset: 0; pointer-events: none; }
.touch .zone { position: absolute; left: 0; top: 22%; width: 62%; bottom: 0; pointer-events: auto; touch-action: none; }
.touch .dashbtn { pointer-events: auto; touch-action: none; }
.touch .stick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 4px solid rgba(255,244,220,.7); border-radius: 50%; background: rgba(27,16,48,.35); opacity: 0; transition: opacity .15s; pointer-events: none; }
.touch .stick.on { opacity: 1; }
.touch .stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--cream); border: 4px solid var(--ink); }
.dashbtn { position: absolute; right: 22px; bottom: 28px; width: 96px; height: 96px; border-radius: 26px; font: 400 26px var(--display); color: var(--ink); background: var(--yellow); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.dashbtn.down { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { display: grid; grid-template-columns: 124px 1fr; text-align: right; gap: 0 14px; padding: 12px; box-shadow: 0 6px 0 var(--ink); align-items: center; }
  .card .art { grid-row: 1 / 5; height: 108px; margin: 0; width: auto; } .card .art svg { height: 76px; }
  .card h3 { margin: 0; font-size: 23px; } .card p { margin: 3px 0 6px; font-size: 13px; max-width: none; flex: none; }
  .card small { justify-self: start; }
  .chips { max-width: calc(100% - 120px); top: 58px; } .chip { padding: 2px 9px; font-size: 13px; min-height: 32px; }
  .toasts { top: 134px; } .board { top: 112px; right: 10px; width: 170px; } .brow { font-size: 12px; }
  .maker { justify-content: center; align-items: flex-end; } .panel { margin: 0; width: 100%; border-radius: var(--R) var(--R) 0 0; box-shadow: 0 -6px 0 var(--ink); border-bottom: 0; padding: 12px 14px 14px; max-height: none; overflow: visible; }
  .swatches { grid-template-columns: repeat(12, 1fr); gap: 5px; max-width: none; } .sw { box-shadow: 0 2px 0 var(--ink); border-width: 2px; }
  .panel .opt { min-height: 32px; font-size: 13px; padding: 0 9px; } .panel .opts { gap: 6px; } .panel .segc button { min-height: 34px; } .panel .group > b { margin-bottom: 4px !important; } .phead h2 { font-size: 24px; }
  .panel .group { margin: 7px 0; } .panel .row { margin-top: 8px; } .panel .btn.big { min-height: 48px; font-size: 20px; }
  .tools { flex-wrap: wrap; } .exit { top: 66px; }
}

@media (max-height: 880px) and (min-width: 761px) {
  .tag-line { display: none; } .brand { margin: 4px 0 10px; } .sub { margin-top: 10px; font-size: 28px; }
  .profile { margin-bottom: 16px; } .card .art { height: min(176px, 20vh); margin-bottom: 10px; } .card h3 { font-size: 25px; } .card p { margin-bottom: 10px; font-size: 14px; }
  .join-inline { margin-top: 18px; padding: 6px 14px; } .screen { padding-top: 10px; padding-bottom: 14px; }
}

@media (max-height: 900px) {
  .menu.small .art.lg { display: none; } .menu.small { padding: 16px 18px 18px; } .menu.small h2 { font-size: 28px; margin-top: 4px; }
  .codebox { padding: 8px 12px 10px; margin: 6px 0 10px; } .codebox b { font-size: 44px; } .roster li { min-height: 42px; } .stepper { margin: 4px 0 10px; } .group { margin: 8px 0; }
}

/* same "all games" badge the other SLOP GAMES titles carry */
.slop-badge { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 8px; background: #1a1024; border: 1px solid rgba(155, 60, 255, .4); text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); transition: border-color .2s, transform .2s; direction: rtl; align-self: center; margin-bottom: 6px; z-index: 2; }
.slop-badge:hover { border-color: #d8f244; transform: translateY(-1px); }
.slop-badge .sb-txt { font: 500 14px/1 Rubik, sans-serif; color: #c9bfd6; }
.slop-badge .sb-logo { direction: ltr; display: inline-flex; align-items: baseline; gap: 7px; }
.slop-badge .sb-slop { font: 22px/1 "Rubik Wet Paint", sans-serif; color: #d8f244; }
.slop-badge .sb-games { font: 13px/1 "Rubik Mono One", sans-serif; color: #f6efe3; letter-spacing: .04em; }
@media (max-width: 560px) { .menu > .slop-badge { margin-top: 54px; } }

.tool.zb { width: 44px; justify-content: center; padding: 0; font: 400 26px/1 var(--display); }
.tools.top .tool.zb span { display: none; }
.tag.hot { background: #ff5a2a; color: #fff; border-color: #1b1030; font-size: 17px; padding: 1px 12px; }
.tag { font-size: 15px; }

.voicebox { flex-direction: column; align-items: center; gap: 8px; }
.meter { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.meter .bar { width: 100%; height: 12px; background: #fff; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ddc97, #ffd23f, #ff4d6d); transition: width .08s; }
.meter small { font: 500 12px Rubik; opacity: .7; }

/* clear back / exit buttons everywhere */
.back { position: absolute; top: 14px; right: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; font: 400 16px var(--display); color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); padding: 6px 14px 6px 12px; min-height: 40px; cursor: pointer; opacity: 1; transition: transform .08s, box-shadow .08s; }
.back::before { content: ''; width: 18px; height: 18px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%231b1030' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat; }
.back:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); } .back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.back#leave { background: #ffc2cc; }
.phead .back { position: static; opacity: 1; font-size: 16px; }
.menu.small { padding-top: 62px; }
.exit { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); opacity: 1; }
.exit.quit { right: 104px; background: #ff9fb0; }
@media (max-width: 760px) { .exit.quit { right: 104px; top: 66px; } }

.tool.on { background: #d8f244; }
.mask { -webkit-text-security: disc; text-security: disc; letter-spacing: .3em; }
.codebox .crow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
