:root {
  --bg: #0a1a2a; --bg2: #0e2336; --panel: #122d45; --panel2: #183a57; --line: #245173;
  --text: #eef4ff; --muted: #9dbbd4; --yellow: #ffd23f; --pink: #ff4f7b; --cyan: #19e3ff; --green: #4ade80; --red: #ef4444;
  --r: 12px; --orange: #ff8a3d; --glow-p: 0 0 14px rgba(255,79,123,.55); --glow-c: 0 0 14px rgba(25,227,255,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Nunito, system-ui, sans-serif; font-size: 14px; overflow: hidden; }
button { font-family: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { font-family: inherit; }
h2, h3, h4 { margin: 0 0 10px; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.tag { font-size: 10px; background: var(--cyan); color: #000; padding: 1px 6px; border-radius: 6px; font-weight: 900; margin-left: 4px; }
.tag.red { background: var(--red); color: #fff; }

.logo { font-family: Bungee, Nunito, sans-serif; font-size: 24px; letter-spacing: 1px; color: var(--yellow); text-shadow: 3px 3px 0 #000, -1px -1px 0 #000; }
.logo span { color: var(--pink); }
.logo.huge { font-size: 72px; text-shadow: 5px 5px 0 #000; }

/* napit & lomakkeet */
.btn { background: var(--yellow); color: #1a1423; border: 2px solid #000; border-radius: 10px; padding: 8px 14px; font-weight: 800; box-shadow: 2px 2px 0 #000; transition: transform .05s; white-space: nowrap; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.btn.ghost { background: var(--panel2); color: var(--text); }
.btn.hot { background: var(--pink); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn.big { font-size: 17px; padding: 11px 20px; }
.btn.wide { width: 100%; }
.btn small { opacity: .8; font-size: 11px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.btnrow.col { flex-direction: column; }
.btnrow.end { justify-content: flex-end; }
.btnrow.center { justify-content: center; }
.iconbtn { background: var(--panel2); border: 2px solid var(--line); border-radius: 50%; width: 34px; height: 34px; font-size: 15px; }
.iconbtn:hover { border-color: var(--red); }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; margin: 8px 0; }
.fld input:not([type=color]):not([type=range]):not([type=checkbox]), .fld select, .fld textarea, #mixName, #chatInput, .row-in input, #shSort { background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; }
.fld input:focus, .fld textarea:focus, #mixName:focus, #chatInput:focus, .row-in input:focus { outline: none; border-color: var(--yellow); }
.fld input[type=color] { width: 100%; height: 34px; border: 2px solid var(--line); border-radius: 8px; background: var(--bg); padding: 2px; }
.row2 > *, .row3 > * { min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row-in { display: flex; gap: 6px; margin: 8px 0; }
.row-in input { flex: 1; }
.switch { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-weight: 700; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: .2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { left: 21px; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs button { background: var(--panel2); border: 2px solid var(--line); padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.tabs button.active { background: var(--yellow); color: #000; border-color: #000; }

/* ruudut */
.screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 40; overflow: auto;
  background: radial-gradient(circle at 25% 20%, rgba(255,79,123,.35), transparent 40%), radial-gradient(circle at 80% 85%, rgba(61,224,255,.28), transparent 40%), #0a1a2a; }
.screen.show { display: flex; }
.auth-wrap { text-align: center; padding: 16px; width: min(420px, 100%); }
.tagline { font-weight: 800; font-size: 16px; margin: 4px 0 20px; }
.auth-card { background: var(--panel); border: 2px solid #000; box-shadow: 6px 6px 0 #000; border-radius: 16px; padding: 18px; text-align: left; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.auth-tabs button { flex: 1; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 8px; font-weight: 900; }
.auth-tabs button.active { background: var(--yellow); color: #000; border-color: #000; }
.auth-err { color: #ff8a8a; font-weight: 800; min-height: 20px; margin: 4px 0 8px; }
.cr-wrap { padding: 20px; width: min(900px, 100%); text-align: center; }
.cr-box { background: var(--panel); border: 2px solid #000; box-shadow: 6px 6px 0 #000; border-radius: 16px; padding: 16px; text-align: left; }

/* hahmonluonti */
.creator { display: flex; gap: 18px; }
.cr-left { width: 230px; flex: none; }
.cr-stage { height: 270px; border-radius: 14px; background: radial-gradient(ellipse at 50% 85%, #2a5a80, #081826 70%); border: 2px solid var(--line); }
.cr-stage canvas { width: 100%; height: 100%; display: block; }
.cr-name { text-align: center; font-weight: 900; font-size: 18px; margin-top: 8px; }
.cr-right { flex: 1; min-width: 0; max-height: 62vh; overflow: auto; padding-right: 6px; }
.cr-right h4:first-child { margin-top: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(0,0,0,.5); padding: 0; position: relative; }
.sw.on { outline: 3px solid var(--yellow); outline-offset: 1px; }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; cursor: pointer; }
.sw.custom input { opacity: 0; position: absolute; inset: 0; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.chip { background: var(--panel2); border: 2px solid var(--line); border-radius: 999px; padding: 4px 11px; font-weight: 800; font-size: 12px; }
.chip.on { background: var(--cyan); color: #000; border-color: #000; }

/* sovellus */
#app { display: none; flex-direction: column; height: 100%; }
#app.show { display: flex; }
#top { display: flex; align-items: center; gap: 16px; padding: 6px 14px; background: linear-gradient(180deg, #163650, #0f2a42); border-bottom: 2px solid #000; z-index: 5; }
#where { font-weight: 900; background: rgba(0,0,0,.3); padding: 4px 12px; border-radius: 999px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.volume { display: flex; align-items: center; gap: 6px; }
.volume input { width: 80px; accent-color: var(--yellow); }
#dbBox { background: #000; color: var(--yellow); padding: 5px 14px; border-radius: 999px; font-weight: 900; font-size: 15px; border: 2px solid var(--yellow); }
#dbBox.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.18); } }
#userChip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 1px 12px 1px 4px; font-weight: 800; }
#userChip:hover { border-color: var(--yellow); }
#userAv { width: 30px; height: 36px; }
main { flex: 1; position: relative; min-height: 0; }
.view { display: none; position: absolute; inset: 0; overflow: hidden; }
.view.active { display: block; }
#view-studio { overflow: auto; }

/* työkalurivi */
#toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 10px; background: linear-gradient(0deg, #0d2840, #163650); border-top: 2px solid #000; z-index: 6; }
#toolbar button { display: flex; flex-direction: column; align-items: center; background: transparent; border: none; border-radius: 10px; padding: 4px 10px; font-size: 20px; line-height: 1.1; }
#toolbar button span { font-size: 10px; font-weight: 800; color: var(--muted); }
#toolbar button:hover { background: rgba(255,255,255,.07); }
#toolbar button.active { background: rgba(255,225,77,.18); }
#toolbar button.active span { color: var(--yellow); }
#chatBar { flex: 1; max-width: 520px; margin-left: 14px; display: none; }
#chatInput { width: 100%; }

/* ikkunat */
#windows { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: var(--panel); border: 2px solid #000; border-radius: 14px; box-shadow: 6px 6px 0 rgba(0,0,0,.7); max-height: calc(100vh - 130px); max-width: calc(100vw - 16px); }
.win-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 14px; background: linear-gradient(90deg, #1d4565, #183a57); border-radius: 12px 12px 0 0; border-bottom: 2px solid #000; cursor: move; user-select: none; }
.win-title { font-weight: 900; }
.win-x { background: var(--red); border: 2px solid #000; width: 24px; height: 24px; border-radius: 7px; font-size: 11px; font-weight: 900; color: #fff; }
.win-body { padding: 12px; overflow: auto; }

/* hotelli */
.hcard { background: rgba(12,14,40,.86); backdrop-filter: blur(4px); border: 2px solid #000; border-radius: 14px; padding: 14px; box-shadow: 4px 4px 0 rgba(0,0,0,.6); }
.charts { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.charts li { display: flex; gap: 10px; align-items: center; padding: 5px 0; counter-increment: c; }
.charts li::before { content: counter(c); font-weight: 900; color: var(--yellow); width: 16px; }
.charts canvas { width: 34px; height: 34px; border-radius: 6px; flex: none; }
.charts small { display: block; color: var(--muted); }
.hcard.tips ul { margin: 0; padding-left: 18px; color: var(--muted); }
.hcard.tips li { margin: 4px 0; }
.hcard.tips b { color: var(--text); }

/* navigaattori */
.navlist { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.navrow { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: left; }
.navrow:hover { border-color: var(--yellow); }
.navrow.cur { border-color: var(--cyan); }
.nr-main { flex: 1; min-width: 0; }
.nr-main b { display: block; }
.nr-main small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-main .owner { color: #8fb0c9; }
.nr-count { width: 64px; flex: none; text-align: center; font-weight: 900; font-size: 12px; background: #000; border-radius: 8px; padding: 4px; position: relative; overflow: hidden; }
.nr-count span { position: relative; z-index: 1; }
.nr-count i { position: absolute; left: 0; top: 0; bottom: 0; }
.nr-count.empty { color: var(--muted); }
.nr-count.ok i { background: rgba(74,222,128,.45); }
.nr-count.busy i { background: rgba(255,190,11,.55); }
.nr-count.full i { background: rgba(239,68,68,.65); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 6px; display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12px; }
.theme i { width: 14px; height: 20px; border-radius: 3px; border: 1px solid #000; }
.theme.on { border-color: var(--yellow); }

/* huone */
.stage { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, #173a56 0%, #081826 70%); }
#roomCanvas { display: block; touch-action: none; }
#roomInfo { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.55); padding: 8px 12px; border-radius: 12px; max-width: 320px; }
.ri-name { font-weight: 900; font-size: 15px; }
.ri-meta { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.ri-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.zoom { position: absolute; bottom: 14px; left: 12px; display: flex; gap: 4px; }
.zoom button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #000; background: var(--panel2); font-weight: 900; }
#jukebox { position: absolute; top: 112px; left: 12px; width: 280px; background: rgba(8,10,30,.88); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: none; }
.jb-head { font-weight: 900; margin-bottom: 6px; }
.jb-head small { color: var(--muted); font-weight: 600; }
.jb-now { display: flex; gap: 10px; }
#jbCover { width: 64px; height: 64px; border-radius: 50%; flex: none; animation: spin 4s linear infinite; box-shadow: 0 0 0 3px #000; }
@keyframes spin { to { transform: rotate(360deg); } }
.jb-meta { flex: 1; min-width: 0; }
.jb-meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-meta small { display: block; color: var(--muted); font-size: 11px; }
.np-bar { height: 6px; background: var(--line); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
#jbFill { height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.jb-q { margin-top: 8px; font-size: 12px; }
.jb-q small { color: var(--muted); }
.jb-qi { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; }
.jb-qi span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-qi i { color: var(--muted); font-style: normal; }
.jb-qi button { background: none; border: none; color: var(--muted); }
#voteBar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: none; align-items: center; gap: 10px; background: #000; border: 2px solid var(--pink); border-radius: 14px; padding: 8px 14px; box-shadow: 0 6px 30px rgba(255,79,123,.35); }
#voteBar span { color: var(--muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#voteBar button { font-size: 22px; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; width: 48px; height: 40px; }
#voteBar button.up:hover:not(:disabled) { border-color: var(--green); }
#voteBar button.down:hover:not(:disabled) { border-color: var(--red); }
.is-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.is-badges.big .ubadge { font-size: 20px; }
.ubadge { font-size: 16px; cursor: help; }
.chatlog { max-height: 300px; overflow: auto; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.chatlog time { color: var(--muted); }
.profile-card { display: flex; gap: 12px; }
#pfAv { width: 100px; height: 130px; flex: none; background: radial-gradient(ellipse at 50% 85%, #21486a, transparent 70%); border-radius: 12px; }
.badgelist { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.cdpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.cdpick button { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cdpick button:hover { border-color: var(--yellow); }
.cdpick canvas { width: 72px; height: 72px; border-radius: 50%; }
.cdpick small { color: var(--muted); }

/* harvinaisuus */
.rbadge { display: inline-block; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: var(--rc); color: #111; margin-right: 4px; }
.rbadge.ltd { background: #000; color: var(--yellow); border: 1px solid var(--yellow); }
.r-legendary { box-shadow: 0 0 14px rgba(255,212,59,.35); }

/* kauppa */
.shop2 { display: flex; gap: 12px; }
.shop-cats { width: 130px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.shop-cats button { text-align: left; background: var(--panel2); border: 2px solid var(--line); border-radius: 8px; padding: 7px 10px; font-weight: 800; }
.shop-cats button.active { background: var(--yellow); color: #000; border-color: #000; }
.legend { margin-top: 10px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.free { margin-top: 10px; background: var(--pink); border-radius: 8px; padding: 6px; font-size: 11px; font-weight: 800; }
.shop-main { flex: 1; min-width: 0; }
.shop-detail { display: flex; gap: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 22%, var(--panel2)), var(--panel2)); border: 2px solid var(--rc); border-radius: 14px; padding: 12px; }
.sd-img { position: relative; }
#sdCanvas { width: 170px; height: 150px; background: radial-gradient(ellipse at 50% 70%, rgba(255,255,255,.12), transparent 70%); border-radius: 10px; }
#sdRot { position: absolute; bottom: 4px; right: 4px; }
.sd-info { flex: 1; }
.sd-info p { margin: 6px 0; }
.ltdline { color: var(--yellow); font-weight: 900; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 6px; }
#shSort { padding: 3px 6px; font-size: 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; padding: 2px; }
.scard { position: relative; background: var(--panel2); border: 2px solid color-mix(in srgb, var(--rc) 60%, transparent); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.scard:hover, .scard.on { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, var(--panel2)); }
.scard canvas { width: 96px; height: 80px; }
.sc-name { font-size: 11px; font-weight: 800; text-align: center; line-height: 1.15; }
.sc-price { font-size: 12px; font-weight: 900; color: var(--yellow); }
.sc-ltd { position: absolute; top: 4px; left: 4px; font-size: 9px; font-weight: 900; background: #000; color: var(--yellow); padding: 1px 4px; border-radius: 4px; }
.scard.sold { opacity: .5; }

/* reppu & vaihto */
.bp { display: flex; gap: 12px; }
.bp-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; align-content: start; max-height: 52vh; overflow: auto; padding: 2px; }
.bpi { position: relative; aspect-ratio: 1; background: var(--panel2); border: 2px solid color-mix(in srgb, var(--rc, #555) 55%, transparent); border-radius: 10px; padding: 2px; }
.bpi:hover, .bpi.on { border-color: var(--rc, var(--yellow)); }
.bpi.cd { --rc: var(--cyan); }
.bpi canvas { width: 100%; height: 100%; display: block; }
.bpi.cd canvas { border-radius: 50%; }
.bpi i { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 11px; font-weight: 900; color: var(--yellow); }
.bpi em { position: absolute; bottom: 2px; left: 4px; font-style: normal; font-size: 9px; font-weight: 900; color: var(--yellow); }
.bp-detail { width: 180px; flex: none; }
#bpBig { width: 180px; height: 150px; background: radial-gradient(ellipse at 50% 70%, rgba(255,255,255,.1), transparent 70%); border-radius: 10px; }
.bp-detail h3 { margin: 6px 0 4px; }
.trade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tside { background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; padding: 10px; }
.tside.acc { border-color: var(--green); }
.tside h4 { margin-top: 0; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; min-height: 64px; }
.tgrid p { grid-column: 1 / -1; margin: 0; }
.tgrid.inv { max-height: 160px; overflow: auto; background: var(--bg2); padding: 6px; border-radius: 10px; }
.tdb { font-weight: 900; color: var(--yellow); margin-top: 10px; }
.tconfirm { margin-top: 12px; background: rgba(255,225,77,.12); border: 2px solid var(--yellow); border-radius: 10px; padding: 10px; font-weight: 700; }

/* studio */
.studio { display: flex; gap: 14px; padding: 14px; min-height: 100%; }
.lib { width: 230px; flex: none; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 12px; align-self: flex-start; position: sticky; top: 0; }
#libTabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
#libTabs button { border: 2px solid var(--c); background: transparent; color: var(--c); border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 12px; }
#libTabs button.active { background: var(--c); color: #111; }
#libList { display: flex; flex-direction: column; gap: 5px; }
.sample { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-left: 6px solid var(--c); border-radius: 8px; padding: 7px 10px; font-weight: 700; cursor: grab; user-select: none; }
.sample:hover { background: #21486a; }
.sample.sel { background: var(--c); color: #111; }
.sample .sp { font-size: 10px; opacity: .7; }
.editor { flex: 1; min-width: 0; }
.transport { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 10px; }
.btn.play { min-width: 100px; background: var(--green); }
.btn.play.playing { background: var(--red); color: #fff; }
#btnLoop.on { background: var(--cyan); color: #000; }
#mixName { flex: 1; min-width: 150px; }
.hintrow { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin: 10px 2px; flex-wrap: wrap; }
.gridwrap { overflow-x: auto; background: #071522; border: 2px solid var(--line); border-radius: var(--r); padding: 8px; margin-bottom: 18px; }
#grid { position: relative; display: inline-flex; flex-direction: column; gap: 2px; }
.ruler, .trow { display: flex; gap: 2px; }
.th { width: 118px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; font-weight: 800; font-size: 12px; color: var(--muted); }
.mute { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; }
.mute.on { background: var(--red); color: #fff; border-color: var(--red); }
.rc { width: 62px; flex: none; text-align: center; font-size: 11px; color: var(--muted); padding: 3px 0; cursor: pointer; border-radius: 4px; }
.rc:hover { background: var(--panel2); color: var(--yellow); }
.cell { width: 62px; height: 46px; flex: none; background: #0e2336; border-radius: 6px; cursor: pointer; font-size: 10px; font-weight: 800; padding: 4px; overflow: hidden; line-height: 1.15; }
.cell.q { background: #122d45; }
.cell:hover { outline: 2px solid rgba(255,255,255,.35); }
.cell.over { outline: 2px solid var(--yellow); }
.cell.full { background: var(--c); color: #111; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
#playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); pointer-events: none; display: none; }
#myDrafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding-bottom: 20px; }
.mixcard { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 12px; }
.mixcard.cur { border-color: var(--yellow); }
.mc-title { font-weight: 900; font-size: 15px; }
.mc-meta { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.mc-act { display: flex; gap: 6px; }
.burn { display: flex; gap: 14px; }
.burn-prev { flex: none; }
#bCover { width: 160px; height: 160px; border-radius: 8px; box-shadow: 4px 4px 0 #000; }

/* admin */
.adm { max-height: 64vh; overflow: auto; }
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 10px; }
.ulist { display: flex; flex-direction: column; gap: 4px; }
.urow { display: flex; align-items: center; gap: 8px; background: var(--panel2); padding: 6px 8px; border-radius: 8px; flex-wrap: wrap; }
.uact { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.dot.on { background: var(--green); }
.creatorbox { display: flex; gap: 14px; }
#admPrev { width: 180px; height: 170px; flex: none; background: radial-gradient(ellipse at 50% 70%, #21486a, #0a1a2a 75%); border-radius: 12px; border: 2px solid var(--line); }
.creatorbox > div { flex: 1; }
.itable { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 5px; }
.irow { display: grid; grid-template-columns: 46px 1fr 70px auto; align-items: center; gap: 8px; background: var(--panel2); padding: 4px 8px; border-radius: 8px; font-size: 12px; }
.irow canvas { width: 46px; height: 40px; }
.iprice { width: 70px; background: var(--bg); color: var(--yellow); border: 2px solid var(--line); border-radius: 6px; padding: 4px; font-weight: 800; }
.tlog { font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.tlog time { color: var(--muted); }
.givegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; max-height: 55vh; overflow: auto; }
.givegrid button { background: var(--panel2); border: 2px solid color-mix(in srgb, var(--rc) 60%, transparent); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: 10px; font-weight: 700; }
.givegrid canvas { width: 70px; height: 56px; }

/* modaali, toastit */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 60; }
#modal.open { display: flex; }
.modal-box { background: var(--panel); border: 2px solid var(--yellow); border-radius: 16px; padding: 18px; width: min(560px, calc(100% - 32px)); max-height: 90vh; overflow: auto; box-shadow: 6px 6px 0 #000; }
.mtext { font-size: 15px; line-height: 1.45; }
.alert { text-align: center; }
.al-ic { font-size: 40px; }
#toasts { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 70; pointer-events: none; align-items: center; }
.toast { background: #000; border: 2px solid var(--line); padding: 8px 14px; border-radius: 10px; font-weight: 700; animation: tin .25s; transition: opacity .4s, transform .4s; max-width: 90vw; }
.toast.good { border-color: var(--green); }
.toast.warn { border-color: var(--red); }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
#reconnect { position: fixed; inset: 0; display: none; align-items: flex-start; justify-content: center; padding-top: 70px; z-index: 80; background: rgba(0,0,0,.45); }
#reconnect.show { display: flex; }
#reconnect div { background: var(--red); padding: 10px 18px; border-radius: 12px; font-weight: 900; border: 2px solid #000; }

@media (max-width: 900px) {
  #top { gap: 8px; } .volume, #where { display: none; }
  #toolbar button span { display: none; }
  #jukebox { width: 220px; }
  .studio, .creator, .shop2, .bp, .burn, .creatorbox { flex-direction: column; }
  .lib, .cr-left, .shop-cats, .bp-detail { width: 100%; position: static; }
  .shop-cats { flex-direction: row; flex-wrap: wrap; }
  .setgrid, .trade { grid-template-columns: 1fr; }
  .logo.huge { font-size: 48px; }
}

/* ===== v3 ===== */
.ri-desc { font-size: 12px; color: #d3ecff; margin: -2px 0 6px; font-style: italic; max-width: 300px; }
.tag.orange { background: #ff8a3d; color: #000; }
.warnline { background: rgba(239,68,68,.15); border: 1px solid var(--red); border-radius: 8px; padding: 6px 10px; font-weight: 700; }
#jukebox { top: 132px; }
.jb-head { display: flex; align-items: center; gap: 6px; }
.jb-min { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 14px; }
.contest { background: linear-gradient(135deg, rgba(255,225,77,.18), rgba(255,79,123,.18)); border: 2px solid var(--yellow); border-radius: 10px; padding: 8px; margin-bottom: 8px; font-size: 12px; }
.contest .cd, .contest > span { color: var(--yellow); font-weight: 800; margin-left: 6px; }
.c-entries { margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.c-entries i { color: var(--muted); } .c-entries em { color: var(--yellow); font-style: normal; font-weight: 800; }
.c-entries .cur { color: var(--yellow); font-weight: 800; }
.contest-res { text-align: center; }
.podium { list-style: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.podium li { display: flex; gap: 10px; align-items: baseline; background: var(--panel2); padding: 8px 12px; border-radius: 10px; flex-wrap: wrap; }
.podium li.pwinner { background: linear-gradient(90deg, rgba(255,225,77,.35), var(--panel2)); border: 2px solid var(--yellow); }
.podium span { font-size: 20px; } .podium i { color: var(--muted); } .podium em { margin-left: auto; font-style: normal; font-weight: 800; }
#knocks { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.knock { background: #000; border: 2px solid var(--yellow); border-radius: 12px; padding: 10px; animation: tin .3s; }
#knocking { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); background: #000; border: 2px solid var(--yellow); border-radius: 12px; padding: 10px 14px; z-index: 55; display: none; gap: 10px; align-items: center; font-weight: 800; }
#knocking.show { display: flex; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-bottom: 8px; }
.model { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 800; }
.model canvas { width: 90px; height: 60px; }
.model.on { border-color: var(--yellow); background: rgba(255,225,77,.1); }
.radio { display: flex; gap: 8px; align-items: baseline; margin: 6px 0; flex-wrap: wrap; }
.radio small { flex-basis: 100%; padding-left: 22px; }
.frbtn { position: relative; }
#frBadge, .dotn { position: absolute; top: 0; right: 4px; background: var(--pink); color: #fff; font-style: normal; font-size: 10px; font-weight: 900; border-radius: 999px; padding: 0 5px; line-height: 16px; }
.dotn { position: static; margin-left: 4px; }
.frow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; background: var(--panel2); margin-bottom: 4px; }
.frow.req { border: 2px solid var(--yellow); }
.frow canvas { width: 34px; height: 34px; border-radius: 8px; background: var(--bg2); flex: none; }
.fr-main { flex: 1; min-width: 0; } .fr-main b { display: block; } .fr-main small { color: var(--muted); font-size: 11px; }
.fr-act { display: flex; gap: 3px; }
.msgr { display: flex; gap: 10px; height: 340px; }
.ms-list { width: 140px; flex: none; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.ms-list button { text-align: left; background: var(--panel2); border: 2px solid transparent; border-radius: 8px; padding: 6px 8px; font-weight: 700; font-size: 12px; }
.ms-list button.on { border-color: var(--yellow); }
.ms-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ms-head { padding-bottom: 6px; border-bottom: 2px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ms-msgs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.pm { align-self: flex-start; max-width: 80%; background: var(--panel2); padding: 6px 10px; border-radius: 12px 12px 12px 4px; }
.pm.me { align-self: flex-end; background: #1a5d85; border-radius: 12px 12px 4px 12px; }
.pm time { display: block; font-size: 9px; color: var(--muted); }
.fxb { width: 26px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: transparent; color: var(--muted); font-size: 9px; font-weight: 900; margin-right: 3px; }
.fxb.on { background: var(--cyan); color: #000; border-color: var(--cyan); }
.th > span:last-child { display: flex; }
#fxPop { position: fixed; display: none; z-index: 65; background: var(--panel); border: 2px solid var(--cyan); border-radius: 12px; padding: 12px; width: 250px; box-shadow: 4px 4px 0 #000; }
#fxPop label { display: grid; grid-template-columns: 80px 1fr 40px; gap: 6px; align-items: center; font-size: 12px; margin: 6px 0; }
#fxPop input { accent-color: var(--cyan); }
#mixBpm, #mixKey, #libPack { background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: 8px; padding: 6px; font-weight: 800; }
#libPack { margin-top: 4px; width: 100%; font-size: 12px; }
.sample.locked { opacity: .5; }
.sample .pk { margin-left: auto; font-style: normal; font-size: 9px; opacity: .7; }
.chip.prem { border-color: var(--rc); }
.chip.prem.on { background: var(--rc); color: #000; }
.chip.locked { opacity: .45; }
.looplist { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.looplist .chip { border-color: var(--c); font-size: 11px; }
.liverow { display: block; width: 100%; text-align: left; background: var(--panel2); border: 2px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 4px; }
.liverow:hover { border-color: var(--yellow); }
.liverow small { display: block; color: var(--muted); }
.lastweek { margin-top: 8px; font-size: 12px; background: rgba(255,225,77,.08); border-radius: 8px; padding: 6px 8px; }
.lastweek small { color: var(--muted); } .lastweek i { color: var(--muted); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.45) 100%); }
#roomInfo, #jukebox, #infostand, #voteBar, .zoom, #knocks { z-index: 2; }

/* ===== v4: Desibelia – Neon Beach (Vice City) ===== */
body { background: radial-gradient(ellipse at 50% 120%, #0f3b5f 0%, #0a1a2a 60%); }
.logo { font-family: Yellowtail, cursive; font-size: 30px; letter-spacing: 0; color: #fff; text-shadow: 0 0 6px #ff4f7b, 0 0 16px #ff4f7b, 0 0 30px rgba(255,79,123,.6); line-height: 1; }
.logo span { color: var(--cyan); text-shadow: 0 0 6px var(--cyan), 0 0 18px var(--cyan); }
.logo.huge { font-size: 96px; text-shadow: 0 0 8px #ff4f7b, 0 0 24px #ff4f7b, 0 0 60px rgba(255,79,123,.7); animation: neonflick 6s infinite; }
@keyframes neonflick { 0%, 92%, 96%, 100% { opacity: 1; } 93%, 95% { opacity: .55; } }
.tagline { font-family: Monoton, Bungee, sans-serif; letter-spacing: .06em; color: var(--cyan); text-shadow: var(--glow-c); }
.tagline.sub { font-family: Nunito, sans-serif; color: var(--muted); text-shadow: none; letter-spacing: 0; }
#screen-auth, #screen-creator { background: linear-gradient(180deg, #0b2a52 0%, #0f3b5f 45%, #1488c8 72%, #ffb347 100%); }
#screen-auth::before { content: ''; position: absolute; left: 50%; top: 58%; width: 340px; height: 340px; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-linear-gradient(180deg, transparent 0 58%, rgba(154,22,101,.95) 58% 61%, transparent 61% 66%, rgba(154,22,101,.95) 66% 70%, transparent 70% 76%, rgba(154,22,101,.95) 76% 81%, transparent 81% 88%, rgba(154,22,101,.95) 88% 94%), linear-gradient(180deg, #ffd23f, #ff8a3d 50%, #ff4f7b); box-shadow: 0 0 80px rgba(255,79,123,.6); opacity: .55; pointer-events: none; }
#screen-auth::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(transparent, rgba(9,10,28,.9)), repeating-linear-gradient(90deg, rgba(25,227,255,.35) 0 2px, transparent 2px 60px), repeating-linear-gradient(0deg, rgba(25,227,255,.35) 0 2px, transparent 2px 30px); transform: perspective(300px) rotateX(55deg); transform-origin: bottom; pointer-events: none; }
.auth-wrap, .cr-wrap { position: relative; z-index: 1; }
.btn { background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #1a0b25; border: none; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset, 0 4px 14px rgba(255,138,61,.35); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.btn.hot { background: linear-gradient(135deg, #ff4f7b, #ff5f6d 60%, var(--orange)); color: #fff; box-shadow: var(--glow-p); }
.btn.ghost { background: rgba(25,227,255,.06); color: var(--text); box-shadow: 0 0 0 1.5px rgba(25,227,255,.45) inset; }
.btn.ghost:hover:not(:disabled) { box-shadow: 0 0 0 1.5px var(--cyan) inset, var(--glow-c); }
.btn.good { background: linear-gradient(135deg, #4ade80, #19e3ff); color: #04121a; }
.btn.picked { box-shadow: 0 0 0 2px #fff inset, var(--glow-c); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #ff4f7b); box-shadow: none; }
.tabs button { border-color: rgba(25,227,255,.25); }
.tabs button.active { background: linear-gradient(135deg, #ff4f7b, var(--orange)); color: #fff; border-color: transparent; box-shadow: var(--glow-p); }
.auth-tabs button.active { background: linear-gradient(135deg, #ff4f7b, var(--orange)); color: #fff; border-color: transparent; }
.auth-card, .modal-box { border: 1.5px solid rgba(255,79,123,.6); box-shadow: 0 0 40px rgba(255,79,123,.25), 0 20px 50px rgba(0,0,0,.5); background: linear-gradient(180deg, #163a58, #0e2336); }
.modal-box { border-color: rgba(25,227,255,.55); box-shadow: 0 0 40px rgba(25,227,255,.2), 0 20px 50px rgba(0,0,0,.5); }
#top { background: linear-gradient(90deg, #0b2034, #0c2438 40%, #0e2a44); border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, #ff4f7b, #ff8a3d, #19e3ff) 1; }
#toolbar { background: linear-gradient(0deg, #071522, #0b2034); border-top: 2px solid transparent; border-image: linear-gradient(90deg, #19e3ff, #ff4f7b, #ff8a3d) 1; }
#toolbar button.active { background: rgba(255,79,123,.16); box-shadow: 0 0 0 1px rgba(255,79,123,.5) inset; }
#toolbar button.active span { color: #ff9db4; }
#dbBox { background: #071522; color: var(--yellow); border: 1.5px solid var(--yellow); box-shadow: 0 0 10px rgba(255,225,77,.35); }
.win { border: 1.5px solid rgba(25,227,255,.45); box-shadow: 0 0 30px rgba(25,227,255,.15), 0 14px 40px rgba(0,0,0,.6); background: linear-gradient(180deg, #122d45, #0e2336); }
.win-head { background: linear-gradient(90deg, #0f3b5f, #1488c8 70%, #ff5f6d); border-bottom: none; }
.win-x { background: rgba(0,0,0,.35); border: 1.5px solid rgba(255,255,255,.4); }
.hcard { border: 1.5px solid rgba(255,79,123,.35); box-shadow: 0 0 24px rgba(255,79,123,.12); }
.navrow:hover, .liverow:hover { border-color: var(--pink); box-shadow: 0 0 10px rgba(255,79,123,.3); }
.stage { background: radial-gradient(ellipse at 50% 30%, #155177 0%, #0b2a44 55%, #071726 100%); }
#voteBar { border-color: var(--pink); }
.toast { background: #0c1f31; border-color: rgba(25,227,255,.4); }
.model.locked { opacity: .45; }
#userLvl { font-size: 10px; font-weight: 900; color: #04121a; background: var(--cyan); border-radius: 6px; padding: 1px 5px; margin-left: 4px; box-shadow: var(--glow-c); }
.lvl { display: inline-block; font-size: 10px; font-weight: 900; color: #04121a; background: linear-gradient(135deg, var(--cyan), #4ade80); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.lvl.big { font-size: 13px; padding: 2px 8px; }
.lvlbox { margin: 10px 0; }
.xpbar { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 6px 0 2px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff4f7b, var(--orange), var(--yellow)); box-shadow: var(--glow-p); }
h4.sub { margin-top: 12px; }
.achgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.ach { background: var(--panel2); border-radius: 10px; padding: 6px 4px; text-align: center; opacity: .35; filter: grayscale(1); }
.ach.on { opacity: 1; filter: none; box-shadow: 0 0 0 1.5px var(--yellow) inset, 0 0 10px rgba(255,225,77,.25); }
.ach span { font-size: 22px; display: block; } .ach small { font-size: 9px; font-weight: 800; line-height: 1.1; display: block; }
/* pelit */
#gamesBox { position: absolute; top: 12px; right: 12px; width: 270px; display: none; z-index: 2; max-height: calc(100% - 260px); overflow: auto; }
#knocks { top: auto; bottom: 200px; }
.gcard { background: rgba(8,10,30,.9); border: 1.5px solid rgba(255,79,123,.55); border-radius: 14px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 0 18px rgba(255,79,123,.18); animation: tin .25s; }
.gcard small { font-size: 12px; }
.gbtns { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.gstart { display: flex; gap: 6px; justify-content: flex-end; }
.stars { display: flex; gap: 2px; }
.stars button { background: none; border: none; font-size: 26px; color: #5c7a94; padding: 0 2px; transition: transform .1s, color .1s; }
.stars:hover button { color: var(--yellow); text-shadow: 0 0 8px var(--orange); } .stars button:hover ~ button { color: #5c7a94; text-shadow: none; }
.stars button:hover { transform: scale(1.2); }
.balbar { flex: 1; min-width: 70px; height: 10px; border-radius: 99px; position: relative; background: linear-gradient(90deg, #ef4444, #ffd23f 30%, #4ade80 45%, #4ade80 55%, #ffd23f 70%, #ef4444); }
.balbar i { position: absolute; top: -4px; width: 6px; height: 18px; margin-left: -3px; background: #fff; border-radius: 3px; box-shadow: 0 0 8px #fff; left: 50%; transition: left .1s; }
.qq { font-weight: 800; font-size: 14px; }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.qopts .btn { white-space: normal; }
/* tapahtumat */
.evrow { display: flex; gap: 8px; align-items: center; background: var(--panel2); border-radius: 10px; padding: 6px 8px; margin-bottom: 4px; }
.evrow.live { box-shadow: 0 0 0 1.5px var(--pink) inset, var(--glow-p); }
.ev-ic { font-size: 20px; } .evrow > div { flex: 1; min-width: 0; } .evrow small { display: block; color: var(--muted); font-size: 11px; }
.ev-act { display: flex; gap: 3px; }
/* kauppa: värit */
.colpick { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 12px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.colpick label { display: flex; gap: 6px; align-items: center; }
.colpick input[type=color] { width: 34px; height: 26px; border: none; background: none; padding: 0; }
/* mobiili */
@media (max-width: 700px) {
  html, body { font-size: 13px; }
  #top { padding: 4px 8px; gap: 6px; } #top .logo { font-size: 22px; }
  #userName { display: none; }
  #toolbar { flex-wrap: wrap; padding: 2px 4px; justify-content: space-around; }
  #toolbar button { padding: 4px 6px; font-size: 18px; }
  #chatBar { order: -1; flex-basis: 100%; max-width: none; margin: 2px 0 4px; }
  .win { left: 4px !important; right: 4px; width: auto !important; top: 52px !important; max-height: calc(100vh - 150px); }
  #roomInfo { max-width: calc(100% - 24px); padding: 6px 8px; } .ri-desc { display: none; }
  #jukebox { top: auto; bottom: 60px; left: 8px; width: 200px; font-size: 11px; }
  #gamesBox { width: calc(100% - 24px); left: 12px; right: 12px; top: auto; bottom: 64px; max-height: 40%; }
  #voteBar { bottom: 70px; padding: 6px 10px; } #voteBar span { max-width: 120px; }
  .zoom { bottom: auto; top: 90px; left: auto; right: 8px; flex-direction: column; }
  .logo.huge { font-size: 64px; }
  #screen-auth::before { width: 240px; height: 240px; }
  .qopts { grid-template-columns: 1fr; }
  .modal-box { padding: 14px; }
  .btn { padding: 8px 12px; }
}
@media (hover: none) { .btn.small { padding: 7px 12px; } #toolbar button { min-width: 40px; } }
.shop-cats button.active { background: linear-gradient(135deg, #ff4f7b, var(--orange)); color: #fff; border-color: transparent; box-shadow: var(--glow-p); }
.model.on { border-color: var(--pink); background: rgba(255,79,123,.12); }

/* ===== v5: Biitsi – rantabileet (Habbo/CokeMusic-henkinen) ===== */
body { background: linear-gradient(180deg, #0b2a44, #0a1a2a); font-family: Nunito, system-ui, sans-serif; }
h1, h2, h3, .win-title, .ri-name, .gcard b, .hcard h3, .tagline, .btn.big { font-family: 'Lilita One', Nunito, sans-serif; font-weight: 400; letter-spacing: .02em; }
.logo { font-family: 'Lilita One', Nunito, sans-serif; font-size: 30px; color: #ffd23f; -webkit-text-stroke: 1.5px #0a1a2a; paint-order: stroke fill; text-shadow: 0 3px 0 #ff4f7b, 0 5px 0 #0a1a2a, 0 0 18px rgba(255,210,63,.35); letter-spacing: .02em; line-height: 1.1; transform: rotate(-2deg); display: inline-block; }
.logo.huge { font-size: 110px; -webkit-text-stroke: 4px #0a1a2a; text-shadow: 0 6px 0 #ff4f7b, 0 11px 0 #0a1a2a, 0 0 50px rgba(255,210,63,.45); animation: logobounce 3s ease-in-out infinite; }
@keyframes logobounce { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-6px); } }
.tagline { color: #fff; text-shadow: 0 2px 0 #0a1a2a; font-size: 22px; }
.tagline.sub { font-family: Nunito, sans-serif; font-size: 15px; color: #e6f4ff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
#screen-auth, #screen-creator { background: linear-gradient(180deg, #0b2a52 0%, #1d5f9e 40%, #ff8c69 74%, #ffc46b 100%); }
#screen-auth::before { background: radial-gradient(circle, #fff3b0 0%, #ffd23f 40%, #ff9f43 70%, rgba(255,140,80,0) 71%); box-shadow: none; opacity: .9; top: 62%; }
#screen-auth::after { height: 30%; transform: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,.18) 0 2px, transparent 2px 14px), linear-gradient(180deg, #1aa0c9, #0b4f7a); }
.auth-card { background: #f7fbff; color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 6px 0 #0a1a2a, 0 20px 50px rgba(0,0,0,.35); }
.auth-card input, .auth-card .muted, .auth-card label { color: #13304a; }
.auth-card input { background: #fff; border: 2px solid #b9d4e6; }
.auth-card input:focus { border-color: #1aa0c9; outline: none; }
.auth-tabs button { color: #13304a; background: #e3f0fa; border-color: #b9d4e6; }
/* napit: pullea, viistetty Habbo-tyyli */
.btn { background: linear-gradient(180deg, #ffe373, #ffc61a); color: #3a2400; border: 2px solid #0a1a2a; border-bottom-width: 4px; border-radius: 10px; box-shadow: inset 0 2px 0 rgba(255,255,255,.6); font-weight: 900; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; box-shadow: inset 0 2px 4px rgba(0,0,0,.2); }
.btn.hot { background: linear-gradient(180deg, #ff7f9f, #ff3f6c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); box-shadow: inset 0 2px 0 rgba(255,255,255,.45); }
.btn.ghost { background: linear-gradient(180deg, #2a6d99, #1d5279); color: #fff; border-color: #0a1a2a; box-shadow: inset 0 2px 0 rgba(255,255,255,.25); text-shadow: none; }
.btn.ghost:hover:not(:disabled) { box-shadow: inset 0 2px 0 rgba(255,255,255,.25); }
.btn.good { background: linear-gradient(180deg, #7cf0a8, #2fcf75); color: #06301a; }
.btn.danger { background: linear-gradient(180deg, #ff8a80, #e5383b); color: #fff; }
.btn:disabled { filter: grayscale(.5); opacity: .6; }
.tabs button, .auth-tabs button { border-radius: 10px 10px 0 0; border: 2px solid #0a1a2a; border-bottom: none; background: #1d4a6c; color: #cfe6f7; font-weight: 800; }
.tabs button.active, .auth-tabs button.active { background: linear-gradient(180deg, #ffe373, #ffc61a); color: #3a2400; box-shadow: none; }
.shop-cats button { border: 2px solid #0a1a2a; background: #1b4566; }
.shop-cats button.active { background: linear-gradient(180deg, #ff7f9f, #ff3f6c); color: #fff; box-shadow: none; }
/* ikkunat */
.win { background: #eaf4fb; color: #13304a; border: 3px solid #0a1a2a; border-radius: 14px; box-shadow: 0 6px 0 rgba(10,26,42,.9), 0 18px 40px rgba(0,0,0,.45); }
.win-head { background: linear-gradient(180deg, #33c8ee, #1488c8); border-bottom: 3px solid #0a1a2a; border-radius: 10px 10px 0 0; }
.win-title { color: #fff; text-shadow: 0 2px 0 #0a3d5c; font-size: 16px; }
.win-x { background: linear-gradient(180deg, #ff7f9f, #ff3f6c); border: 2px solid #0a1a2a; color: #fff; }
.win .muted, .win small.muted { color: #5b7891; }
.win input, .win select, .win textarea { background: #fff; color: #13304a; border: 2px solid #b9d4e6; }
.win h4 { color: #1488c8; }
.win .navrow, .win .liverow, .win .scard, .win .bpi, .win .ach, .win .evrow, .win .mcard, .win .frow, .win .tside { background: #fff; color: #13304a; border: 2px solid #c7dceb; }
.win .navrow:hover, .win .scard:hover, .win .bpi:hover { border-color: #ff4f7b; box-shadow: 0 3px 0 #ffb3c4; }
.win .scard.sel, .win .bpi.sel { border-color: #1488c8; box-shadow: 0 0 0 2px #33c8ee; }
.win .sd, .win .sd-img { background: linear-gradient(180deg, #d9eefb, #fff); border-color: #c7dceb; }
.win .nr-cnt, .win .cnt { background: #13304a; color: #fff; }
.win .ach.on { box-shadow: 0 0 0 2px #ffc61a inset; }
.modal-box { background: #f7fbff; color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 6px 0 #0a1a2a, 0 20px 50px rgba(0,0,0,.4); }
.modal-box .muted { color: #5b7891; } .modal-box input, .modal-box select { background: #fff; color: #13304a; border: 2px solid #b9d4e6; }
.modal-box .navrow { background: #fff; color: #13304a; border: 2px solid #c7dceb; }
/* yläpalkki ja työkalurivi */
#top { background: linear-gradient(180deg, #13527c, #0c3a5a); border-bottom: 3px solid #0a1a2a; border-image: none; box-shadow: 0 3px 0 rgba(255,255,255,.08) inset; }
#toolbar { background: linear-gradient(180deg, #13527c, #0c3a5a); border-top: 3px solid #0a1a2a; border-image: none; }
#toolbar button { border-radius: 10px; }
#toolbar button:hover { background: rgba(255,255,255,.12); }
#toolbar button.active { background: linear-gradient(180deg, #ffe373, #ffc61a); box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
#toolbar button.active span { color: #3a2400; }
#dbBox { background: linear-gradient(180deg, #ffe373, #ffc61a); color: #3a2400; border: 2px solid #0a1a2a; border-bottom-width: 4px; box-shadow: none; }
#chatBar input, #chat { background: #fff; color: #13304a; border: 2px solid #0a1a2a; border-radius: 12px; }
/* huone */
.stage { background: radial-gradient(ellipse at 50% 35%, #1a6a96 0%, #0d3b5e 50%, #071d30 100%); }
#roomInfo, #jukebox, .gcard { background: rgba(247,251,255,.96); color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 4px 0 rgba(10,26,42,.85); }
#roomInfo .ri-meta, #roomInfo .ri-desc, #jukebox .muted, .gcard .muted { color: #5b7891; }
#roomInfo .ri-name { font-size: 18px; color: #1488c8; }
.gcard b, #jukebox .jb-head { color: #13304a; }
#voteBar { background: rgba(247,251,255,.97); color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 4px 0 rgba(10,26,42,.85); }
.zoom button { background: linear-gradient(180deg, #33c8ee, #1488c8); border: 2px solid #0a1a2a; color: #fff; }
.hcard { background: rgba(247,251,255,.96); color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 5px 0 rgba(10,26,42,.85); }
.hcard h3 { color: #1488c8; } .hcard .muted, .hcard small { color: #5b7891; }
.hcard .evrow, .hcard .liverow { background: #fff; color: #13304a; border: 2px solid #c7dceb; }
.toast { background: #f7fbff; color: #13304a; border: 3px solid #0a1a2a; box-shadow: 0 4px 0 #0a1a2a; }
.toast.good { border-color: #1b9e55; } .toast.warn { border-color: #e5383b; }
#userLvl, .lvl { background: linear-gradient(180deg, #7cf0a8, #2fcf75); color: #06301a; box-shadow: none; border: 1.5px solid #0a1a2a; }
.xpbar { background: #c7dceb; } .xpbar i { background: linear-gradient(90deg, #33c8ee, #2fcf75); box-shadow: none; }
.balbar i { box-shadow: 0 0 0 2px #0a1a2a; }
.stars button { color: #b9c9d6; } .stars:hover button { color: #ffc61a; text-shadow: 0 2px 0 #b07800; }
@media (max-width: 700px) { .logo.huge { font-size: 70px; } }
/* vaaleat paneelit: muuttujat paikallisesti */
.win, .modal-box, .hcard, #infostand, #roomInfo, #jukebox, .gcard, #voteBar, .auth-card, .toast {
  --text: #13304a; --muted: #5b7891; --panel: #ffffff; --panel2: #e6f1f9; --line: #c7dceb; --bg: #eaf4fb; --bg2: #dcebf6; --cyan: #0f8fc0; --yellow: #f2a900; --pink: #ff3f6c;
  color: var(--text);
}
.hcard { background: #f7fbff; } .hcard li, .hcard p, .hcard b, .hcard div { color: inherit; } .hcard b { color: #0f6f9e; }
#roomInfo, #jukebox, .gcard { background: #f7fbff; }
.shop-cats button { background: var(--panel2); color: var(--text); }
.win .sd, .win .shop-detail, .win [class*="detail"] { background: linear-gradient(180deg, #d9eefb, #fff); color: var(--text); }
.win .rbadge { color: #fff; }
#win-studio, .studio-win { --text: #eef6ff; --muted: #9dbbd4; --panel: #122d45; --panel2: #183a57; --line: #245173; --bg: #0a1a2a; --bg2: #0e2336; background: #0e2336; color: var(--text); }
/* ===== v6: ikkunanhallinta, reppu, studio ===== */
.win.pop { animation: winpop .18s cubic-bezier(.2,1.4,.5,1); }
@keyframes winpop { from { transform: scale(.92) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
#toolbar button { position: relative; transition: transform .12s; }
#toolbar button:hover { transform: translateY(-2px); }
#toolbar button.active::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 3px; border-radius: 3px; background: #ff3f6c; }
/* reppu */
.bpwin .win-body { padding: 0; }
.bp-head { background: linear-gradient(180deg, #d4ecfa, #eaf4fb); padding: 10px 12px 0; border-bottom: 2px solid #c7dceb; }
.bp-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-tabs button { display: flex; align-items: center; gap: 6px; padding: 7px 12px 8px; border: 2px solid #0a1a2a; border-bottom: none; border-radius: 12px 12px 0 0; background: #fff; color: #13304a; font-weight: 800; position: relative; top: 2px; }
.bp-tabs button.active { background: linear-gradient(180deg, #ffe373, #ffc61a); color: #3a2400; }
.bp-tabs .bt-ic { font-size: 18px; } .bp-tabs em { font-style: normal; font-size: 11px; background: #13304a; color: #fff; border-radius: 99px; padding: 0 7px; }
.bp-tools { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.bp-tools input { flex: 1; max-width: 280px; border-radius: 99px !important; padding: 6px 12px; }
.bp-stat { font-size: 12px; color: #5b7891; font-weight: 700; margin-left: auto; }
.bpwin .bp { padding: 12px; gap: 14px; }
.bpwin .bp-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 54vh; background: repeating-linear-gradient(45deg, #f4f9fd 0 10px, #eef5fb 10px 20px); border: 2px solid #c7dceb; border-radius: 12px; padding: 8px; }
.bpwin .bpi { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc, #9ab) 22%, #fff) 0%, #fff 70%); border: 2px solid color-mix(in srgb, var(--rc, #9ab) 70%, #fff); border-radius: 14px; box-shadow: 0 3px 0 color-mix(in srgb, var(--rc, #9ab) 45%, #c7dceb); transition: transform .1s; }
.bpwin .bpi:hover { transform: translateY(-3px) rotate(-1deg); }
.bpwin .bpi.on { border-color: #ff3f6c; box-shadow: 0 0 0 3px #ffb3c4, 0 3px 0 #ff3f6c; }
.bpwin .bpi.r-legendary { animation: legglow 2s ease-in-out infinite; }
@keyframes legglow { 50% { box-shadow: 0 0 14px #ffd23f, 0 3px 0 #e0a800; } }
.bpwin .bpi b, .bpwin .bpi .n { position: absolute; top: 4px; right: 4px; background: #ff3f6c; color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; font-style: normal; }
.bpwin .bp-detail { width: 230px; background: #fff; border: 2px solid #c7dceb; border-radius: 14px; padding: 10px; text-align: center; }
.bp-stage { position: relative; border-radius: 12px; background: radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--rc, #9ab) 45%, #fff) 0 30%, transparent 31%), radial-gradient(circle at 50% 0%, #fffbe6, #d9eefb 70%); overflow: hidden; }
.bp-stage::before { content: ''; position: absolute; left: 25%; right: 25%; top: 0; height: 100%; background: linear-gradient(180deg, rgba(255,255,255,.7), transparent); clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%); }
.bpwin #bpBig { width: 100%; height: 170px; position: relative; background: none; }
.bp-rot { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #0a1a2a; background: linear-gradient(180deg, #33c8ee, #1488c8); color: #fff; font-weight: 900; }
.bpwin .bp-detail h3 { margin: 8px 0 4px; color: #13304a; }
.bp-facts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 6px 0; }
.bp-facts span { font-size: 11px; font-weight: 800; background: #e6f1f9; color: #13304a; border-radius: 99px; padding: 2px 8px; }
.bp-empty { grid-column: 1 / -1; text-align: center; padding: 30px 10px; color: #5b7891; }
.bp-empty .be-ic { font-size: 54px; animation: logobounce 2.5s ease-in-out infinite; }
@media (max-width: 700px) { .bpwin .bp { flex-direction: column; } .bpwin .bp-detail { width: auto; } .bp-tabs .bt-n { display: none; } }
/* studio paikkana */
.studio-scene { position: relative; height: 190px; border: 3px solid #0a1a2a; border-radius: 16px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 5px 0 rgba(10,26,42,.85); }
.studio-scene canvas { width: 100%; height: 100%; display: block; }
.st-exit { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.st-label { position: absolute; left: 10px; top: 8px; font-family: 'Lilita One', sans-serif; color: #fff; text-shadow: 0 2px 0 #0a1a2a; background: rgba(10,26,42,.5); padding: 2px 10px; border-radius: 99px; }
@media (max-width: 700px) { .studio-scene { height: 150px; } }
#toasts { top: auto !important; bottom: 76px; left: auto !important; right: 16px; transform: none !important; align-items: flex-end; }
@media (max-width: 700px) { #toasts { right: 8px; left: 8px !important; bottom: 110px; } }
/* ===== v7: työkalurivi, chat, mobiili ===== */
#toolbar { display: grid; grid-template-columns: 1fr minmax(260px, 560px) 1fr; gap: 10px; align-items: center; padding: 5px 12px; }
.tb-group { display: flex; gap: 2px; align-items: center; }
.tb-right { justify-content: flex-end; }
#chatBar { display: block !important; position: relative; max-width: none; margin: 0; }
#chatBar.off { visibility: hidden; }
.chatwrap { display: flex; align-items: center; gap: 4px; background: #fff; border: 2px solid #0a1a2a; border-bottom-width: 4px; border-radius: 99px; padding: 3px; }
.chatwrap #chatInput { flex: 1; border: none !important; background: transparent !important; color: #13304a; padding: 6px 6px; font-size: 14px; min-width: 0; }
#emoBtn, #sendBtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #0a1a2a; background: #e6f1f9; font-size: 17px; line-height: 1; display: grid; place-items: center; padding: 0; }
#sendBtn { background: linear-gradient(180deg, #ff7f9f, #ff3f6c); color: #fff; font-weight: 900; }
#emoBtn.shout { background: #ffd23f; }
#emoPop { position: absolute; bottom: calc(100% + 10px); left: 0; background: #f7fbff; border: 3px solid #0a1a2a; border-radius: 16px; box-shadow: 0 5px 0 #0a1a2a; padding: 8px; display: none; z-index: 30; }
#emoPop.open { display: block; animation: winpop .15s; }
.emo-row { display: flex; gap: 4px; flex-wrap: wrap; }
.emo-row + .emo-row { margin-top: 6px; }
.emo-row button { border: 2px solid #c7dceb; background: #fff; border-radius: 10px; padding: 4px 8px; font-size: 18px; color: #13304a; font-weight: 800; }
.emo-row:last-child button { font-size: 12px; }
.emo-row button:hover { border-color: #ff3f6c; }
.emo-row button.on { background: #ffd23f; border-color: #0a1a2a; }
.admbtn { background: linear-gradient(180deg, #ffe373, #ffc61a) !important; border: 2px solid #0a1a2a !important; }
.shop-cats button { display: flex; align-items: center; gap: 8px; }
.cat-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; font-size: 17px; background: #fff; border-radius: 8px; border: 1.5px solid #c7dceb; }
.cat-ic canvas { width: 26px; height: 26px; }
.shop-cats button.active .cat-ic { border-color: #fff; }
.contest .pot { background: #ffd23f; color: #3a2400; border-radius: 99px; padding: 1px 8px; font-weight: 900; font-size: 12px; border: 1.5px solid #0a1a2a; }
@media (max-width: 700px) {
  #toolbar { grid-template-columns: 1fr 1fr; grid-template-areas: "chat chat" "left right"; gap: 4px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
  #chatBar { grid-area: chat; } #chatBar.off { display: none !important; }
  .tb-left { grid-area: left; } .tb-right { grid-area: right; }
  #toolbar button { padding: 4px 5px; }
  #top .volume, #where { display: none; }
  #roomInfo { top: 8px; left: 8px; right: auto; max-width: 62%; padding: 6px 8px; font-size: 12px; }
  #roomInfo .ri-name { font-size: 15px; } #roomInfo .ri-meta { font-size: 11px; }
  #roomInfo .btn.small { padding: 3px 7px; font-size: 11px; }
  #jukebox { width: 190px; font-size: 11px; top: auto !important; bottom: 10px; left: 8px; }
  #gamesBox { bottom: 10px; top: auto; left: auto; right: 8px; width: 60%; }
  .zoom { top: 8px; right: 8px; bottom: auto; left: auto; }
  .zoom button { width: 36px; height: 36px; }
  .win { max-height: calc(100vh - 170px); }
  .win-body { overflow: auto; }
  .studio-scene { height: 130px; }
}
/* ===== v8: Habbo-tyylinen hahmoeditori ===== */
.crx { display: flex; gap: 16px; color: #13304a; }
.crx-left { width: 240px; flex: none; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.crx-stage { position: relative; height: 300px; border-radius: 18px; border: 3px solid #0a1a2a; overflow: hidden; background: radial-gradient(circle at 50% 30%, #fff8d6 0%, #ffd9a0 35%, #ff9f80 70%, #ff6f91 100%); box-shadow: inset 0 -30px 40px rgba(0,0,0,.12), 0 4px 0 #0a1a2a; }
.crx-stage::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 110%, rgba(255,255,255,.18) 0 6deg, transparent 6deg 14deg); }
.crx-stage canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; }
.crx-podium { position: absolute; z-index: 1; left: 50%; bottom: 14px; width: 150px; height: 36px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #d6ecfa 55%, #8fbad6 100%); border: 3px solid #0a1a2a; box-shadow: 0 6px 0 #0a1a2a; }
.crx-ctrl { display: flex; justify-content: center; gap: 6px; }
.rb { width: 44px; height: 40px; border-radius: 12px; border: 2px solid #0a1a2a; border-bottom-width: 4px; background: linear-gradient(180deg, #ffffff, #d6ecfa); font-size: 18px; color: #13304a; }
.rb.on { background: linear-gradient(180deg, #ffe373, #ffc61a); }
.rb:active { border-bottom-width: 2px; transform: translateY(2px); }
.crx-left .cr-name { text-align: center; font-family: 'Lilita One', sans-serif; font-size: 20px; color: #13304a; }
.crx-motto { display: flex; align-items: center; gap: 6px; background: #fff; border: 2px solid #c7dceb; border-radius: 99px; padding: 2px 10px; }
.crx-motto input { flex: 1; border: none !important; background: none !important; padding: 6px 0 !important; color: #13304a; min-width: 0; }
.crx-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.crx-tabs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.crx-tabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 5px; border: 2px solid #0a1a2a; border-bottom-width: 4px; border-radius: 12px; background: #fff; color: #13304a; }
.crx-tabs button span { font-size: 22px; line-height: 1; }
.crx-tabs button small { font-size: 10px; font-weight: 900; }
.crx-tabs button.on { background: linear-gradient(180deg, #33c8ee, #1488c8); color: #fff; transform: translateY(1px); }
.crx-panel { background: repeating-linear-gradient(45deg, #f4f9fd 0 10px, #eef5fb 10px 20px); border: 2px solid #c7dceb; border-radius: 14px; padding: 10px; height: 340px; overflow: auto; }
.crx-panel h4 { margin: 10px 0 6px; color: #1488c8; }
.crx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.crx-opt { position: relative; aspect-ratio: .9; background: radial-gradient(circle at 50% 40%, #ffffff, #e3f0fa); border: 2px solid #c7dceb; border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 3px 0 #c7dceb; transition: transform .1s; }
.crx-opt:hover { transform: translateY(-2px); border-color: #33c8ee; }
.crx-opt.on { border-color: #ff3f6c; box-shadow: 0 0 0 3px #ffb3c4, 0 3px 0 #ff3f6c; }
.crx-opt canvas { width: 100%; height: calc(100% - 16px); display: block; }
.crx-opt small { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10px; font-weight: 800; color: #13304a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.crx-opt .none { position: absolute; top: 4px; left: 6px; font-style: normal; color: #ff3f6c; font-weight: 900; }
.crx-opt.prem { background: radial-gradient(circle at 50% 40%, #fffbe6, #ffe8a3); border-color: #ffc61a; }
.crx-opt .star { position: absolute; top: 3px; right: 5px; font-style: normal; color: #e0a800; text-shadow: 0 1px 0 #fff; }
.crx-pal { display: flex; flex-wrap: wrap; gap: 7px; }
.pal { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 2px #0a1a2a, 0 3px 0 2px #0a1a2a; padding: 0; position: relative; cursor: pointer; }
.pal.on { transform: scale(1.12); box-shadow: 0 0 0 2px #0a1a2a, 0 0 0 5px #ff3f6c; }
.pal.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; display: inline-block; }
.pal.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.crx-more { margin-top: 10px; }
#screen-creator .cr-box, #screen-creator .crx { background: #f7fbff; border-radius: 18px; }
#screen-creator .cr-box { border: 3px solid #0a1a2a; box-shadow: 0 6px 0 #0a1a2a; padding: 16px; }
@media (max-width: 700px) {
  .crx { flex-direction: column; } .crx-left { width: auto; } .crx-stage { height: 200px; }
  .crx-tabs { grid-template-columns: repeat(4, 1fr); } .crx-panel { height: 260px; }
}
/* soittimen paneeli */
.mpanel { min-width: min(460px, 86vw); }
.mp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.mp-head canvas { width: 64px; height: 64px; background: radial-gradient(circle, #fff, #d9eefb); border-radius: 14px; border: 2px solid #c7dceb; }
.mp-head h3 { margin: 0; color: #13304a; }
.mp-now { display: flex; gap: 10px; align-items: center; background: linear-gradient(90deg, #ffe8a3, #fff); border: 2px solid #ffc61a; border-radius: 14px; padding: 8px; }
.mp-now canvas { width: 54px; height: 54px; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mp-now div { display: flex; flex-direction: column; } .mp-now small { color: #5b7891; }
.mpanel h4 { color: #1488c8; margin: 12px 0 6px; }
.mp-q { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow: auto; }
.mp-q div { display: flex; gap: 8px; align-items: baseline; background: #fff; border: 2px solid #c7dceb; border-radius: 10px; padding: 4px 8px; color: #13304a; }
.mp-q div.me { border-color: #ff3f6c; } .mp-q small { color: #5b7891; margin-left: auto; }
.mpanel .cdpick { max-height: 200px; overflow: auto; }
/* navigaattorin huonekuvat */
.navrow { display: flex; align-items: center; gap: 10px; }
.nr-thumb { width: 84px; height: 57px; flex: none; border-radius: 10px; background: radial-gradient(ellipse at 50% 60%, #d9eefb, #a9cfe6); border: 2px solid #c7dceb; }
.navrow:hover .nr-thumb { border-color: #ff3f6c; }
.nr-main { flex: 1; min-width: 0; }
@media (max-width: 700px) { .nr-thumb { width: 64px; height: 44px; } }
/* tietoruutu */
#roomInfo { animation: winpop .25s; }
details.hcard summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.hcard summary::-webkit-details-marker { display: none; }
details.hcard summary::after { content: '▾'; color: #1488c8; font-weight: 900; transition: transform .2s; }
details.hcard[open] summary::after { transform: rotate(180deg); }
details.hcard summary h3 { margin: 0; }
#authBg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#screen-auth .auth-wrap { z-index: 2; }

/* ---------- v1.9 studio: aikajana ---------- */
.gridwrap { background: linear-gradient(180deg, #0c1f31, #0a1928); border: 2px solid var(--line); border-radius: 14px; padding: 10px 10px 12px; box-shadow: inset 0 2px 0 rgba(255,255,255,.04); }
#grid .ruler .rc { width: 62px; flex: none; text-align: center; font-size: 11px; font-weight: 800; color: #6f93b3; padding: 4px 0 6px; border-radius: 6px 6px 0 0; cursor: pointer; position: relative; }
#grid .ruler .rc.q { color: #b9d6ee; }
#grid .ruler .rc.q::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: #3d6a8e; }
#grid .ruler .rc:hover { color: #fff; background: rgba(255,255,255,.06); }
#grid .ruler .rc.now { color: #111; background: var(--yellow); }
#grid .th { width: 132px; }
#grid .trow .th { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,0)); border-radius: 8px; border-left: 4px solid var(--c); color: #d6e8f7; }
#grid .tn { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#grid .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
#grid .trow.muted .cell.full { filter: grayscale(.85) brightness(.6); }
#grid .trow.muted .th { opacity: .55; }
#grid .cell { background: #0f263b; border: 1px solid rgba(255,255,255,.03); transition: background .12s, transform .12s; position: relative; }
#grid .cell.q { background: #13304a; border-left: 1px solid rgba(120,170,215,.22); }
#grid.has-sel .cell:not(.full):hover { background: color-mix(in srgb, var(--sel) 38%, #0f263b); outline: 2px dashed var(--sel); outline-offset: -3px; }
#grid .cell.full { background: var(--w) left 3px bottom 3px / 60px 22px repeat-x, linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 78%, #000)); color: #10131a; border: 1px solid color-mix(in srgb, var(--c) 60%, #000); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 0 rgba(0,0,0,.35); }
#grid .cell.full span { position: relative; display: block; text-shadow: 0 1px 0 rgba(255,255,255,.35); white-space: nowrap; overflow: visible; }
#grid .cell.full.cl { margin-left: -3px; width: 65px; border-left-color: transparent; border-top-left-radius: 0; border-bottom-left-radius: 0; }
#grid .cell.full.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 1px dashed rgba(0,0,0,.25); }
#grid .cell.full.hot { filter: brightness(1.25) saturate(1.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 14px var(--c); }
#grid .cell.full:hover { transform: translateY(-1px); }
#playhead { width: 2px; background: #ffd23f; box-shadow: 0 0 12px #ffd23f, 0 0 2px #fff; z-index: 3; }
#playhead i { position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 9px solid #ffd23f; }
.dr-empty { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 2px dashed var(--line); border-radius: 14px; padding: 14px 16px; max-width: 560px; }
.dr-empty .dr-ic { font-size: 30px; }
.dr-empty p { margin: 4px 0 0; }
.sample { transition: transform .1s, background .1s; }
.sample:hover { transform: translateX(3px); }
.transport .btn.play.playing { background: #ff3f6c; color: #fff; animation: pulseRec 1.2s infinite; }
@keyframes pulseRec { 50% { box-shadow: 0 0 0 4px rgba(255,63,108,.25); } }
.studio-scene { height: 210px; }
@media (max-width: 700px) {
  .studio .editor { order: -1; min-width: 0; }
  .lib #libList { max-height: 230px; overflow-y: auto; }
  #dbBox { white-space: nowrap; }
  #grid .th { width: 104px; font-size: 10px; padding: 0 3px; }
  #grid .th .fxb, #grid .th .mute { padding: 1px 3px; }
}
