:root {
  --bg: #140b2e;
  --bg2: #1d1043;
  --panel: #261a5a;
  --panel2: #30226e;
  --line: #4a3a96;
  --ink: #fff7e8;
  --muted: #b9a9e8;
  --pink: #ff4f9a;
  --cyan: #2ee6d6;
  --gold: #ffc83d;
  --violet: #8b6bff;
  --green: #5be37d;
  --red: #ff5a5a;
  --radius: 18px;
  --display: 'Bungee', 'Impact', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139,107,255,.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,79,154,.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 17px;
  line-height: 1.45;
}
body::before { /* faint music staff across the page */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .07;
  background-image: repeating-linear-gradient(to bottom, transparent 0 22px, #fff 22px 23px, transparent 23px 34px, #fff 34px 35px, transparent 35px 46px, #fff 46px 47px, transparent 47px 58px, #fff 58px 59px, transparent 59px 70px, #fff 70px 71px, transparent 71px 160px);
}
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--cyan); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn {
  --c: var(--pink); --c2: #c2236c;
  font: 800 17px var(--body); color: #fff; background: var(--c);
  border: 0; border-radius: 14px; padding: 12px 20px; cursor: pointer;
  box-shadow: 0 5px 0 var(--c2), 0 8px 18px rgba(0,0,0,.3);
  transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--c2); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.cyan { --c: #17bfb1; --c2: #0c7d74; }
.btn.gold { --c: var(--gold); --c2: #c58c00; color: #3a2400; }
.btn.violet { --c: var(--violet); --c2: #5636c9; }
.btn.ghost { --c: transparent; --c2: transparent; box-shadow: none; border: 2px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { --c: #d83a4a; --c2: #8d1f2b; }
.btn.small { font-size: 14px; padding: 7px 12px; border-radius: 10px; box-shadow: 0 3px 0 var(--c2); }
.btn.small:active { transform: translateY(2px); }
.btn.big { font-size: 20px; padding: 16px 28px; }
.btn.block { width: 100%; }

label { display: block; font-weight: 800; margin: 0 0 6px; font-size: 15px; color: var(--muted); }
input, textarea, select {
  font: 700 18px var(--body); color: var(--ink); background: var(--bg2);
  border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; outline: none;
}
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(46,230,214,.18); }
input.code { font-family: var(--display); letter-spacing: 4px; text-transform: uppercase; font-size: 22px; }
.field { margin-bottom: 16px; }
.error { color: #ffd0d0; background: rgba(255,90,90,.15); border: 1px solid rgba(255,90,90,.4); padding: 10px 12px; border-radius: 10px; font-weight: 700; margin-bottom: 14px; }

.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- logo & mascot ---------- */
.logo { font-family: var(--display); font-size: 26px; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; letter-spacing: 1px; }
.logo .word { background: linear-gradient(90deg, var(--gold), var(--pink) 55%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .dot { color: var(--muted); font-size: .55em; }
.mascot { image-rendering: pixelated; display: block; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 22px; background: rgba(20,11,46,.75); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a.active { color: var(--ink); background: var(--panel2); box-shadow: inset 0 -3px 0 var(--pink); }
.wallet { display: flex; align-items: center; gap: 10px; }
.notes-pill { font-family: var(--display); background: #2a1a00; color: var(--gold); border: 2px solid var(--gold); border-radius: 999px; padding: 5px 14px; font-size: 17px; display: inline-flex; align-items: center; gap: 6px; }
.notes-pill.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.25); } }
.me-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--ink); font: 800 15px var(--body); }
.me-chip .av { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--bg2); border-radius: 50%; }
.lvl { font-size: 12px; color: var(--muted); display: block; line-height: 1; }
.xpbar { width: 70px; height: 6px; background: var(--bg2); border-radius: 9px; overflow: hidden; margin-top: 3px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 22px 60px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-top: 30px; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); line-height: .95; }
.hero h1 .a { color: var(--gold); text-shadow: 0 0 24px rgba(255,200,61,.5); }
.hero h1 .b { color: var(--pink); text-shadow: 0 0 24px rgba(255,79,154,.55); }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 520px; }
.keys { display: flex; height: 56px; margin: 26px 0; max-width: 420px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.keys span { flex: 1; background: var(--ink); border: 1px solid #c9bfa8; border-radius: 0 0 6px 6px; position: relative; cursor: pointer; transition: background .1s; }
.keys span.blk::after { content: ''; position: absolute; right: -28%; top: 0; width: 56%; height: 60%; background: #1a1230; border-radius: 0 0 4px 4px; z-index: 2; }
.keys span.on { background: var(--gold); }
.login-card h2 { display: flex; align-items: center; gap: 10px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 60px; }
.feature { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.04); border: 2px dashed var(--line); }
.feature .ico { font-size: 34px; }

/* ---------- arcade ---------- */
.section-head { display: flex; align-items: end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin: 0; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.game-card { --gc: var(--pink); position: relative; border-radius: 22px; overflow: hidden; background: var(--panel); border: 2px solid var(--line); display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.game-card:hover { transform: translateY(-4px) rotate(-.4deg); border-color: var(--gc); }
.game-card .art { height: 150px; display: grid; place-items: center; font-size: 76px; background:
  radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--gc) 70%, transparent), transparent 70%),
  repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 26px), var(--bg2); position: relative; }
.game-card .art .em { filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.game-card.locked .art .em { filter: grayscale(1) brightness(.6); }
.game-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h3 { margin: 0; }
.game-card .tag { color: var(--muted); font-size: 15px; flex: 1; }
.badge { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.35); color: var(--ink); }
.badge.mp { background: var(--cyan); color: #003b36; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.lock { position: absolute; top: 10px; right: 10px; font-size: 22px; }
.game-card .row { flex-wrap: nowrap; gap: 6px; }
.game-card .btn.small { padding: 7px 10px; }
.stats { font-size: 13px; color: var(--muted); display: flex; gap: 12px; }

/* ---------- play view ---------- */
.play-wrap { display: flex; flex-direction: column; gap: 12px; }
.play-frame { width: 100%; aspect-ratio: 16 / 10; max-height: calc(100vh - 220px); border: 3px solid var(--line); border-radius: 18px; background: #000; display: block; }
.emotes { display: flex; gap: 6px; }
.emotes button { font-size: 22px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 4px 9px; cursor: pointer; }
.emotes button:hover { border-color: var(--cyan); }
.float-emote { position: fixed; font-size: 46px; pointer-events: none; animation: floatUp 2s ease-out forwards; z-index: 60; }
.float-emote small { display: block; font: 800 13px var(--body); text-align: center; color: var(--ink); text-shadow: 0 1px 3px #000; }
@keyframes floatUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-180px); opacity: 0; } }

/* ---------- lobby ---------- */
.lobby { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.table-list { display: grid; gap: 12px; }
.table-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); }
.table-row .ico { font-size: 34px; }
.players { display: flex; gap: 4px; flex-wrap: wrap; }
.player { background: var(--bg2); border-radius: 999px; padding: 3px 10px 3px 5px; font-weight: 800; font-size: 14px; display: inline-flex; gap: 5px; align-items: center; }
.player.host::after { content: '👑'; font-size: 12px; }
.empty { text-align: center; padding: 34px; border: 2px dashed var(--line); border-radius: 18px; color: var(--muted); }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; box-shadow: 0 0 8px var(--green); }

/* ---------- shop ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { font: 800 15px var(--body); color: var(--muted); background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.tabs button.on { color: #1a0d33; background: var(--gold); border-color: var(--gold); }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.item { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.item .art { font-size: 56px; height: 76px; display: grid; place-items: center; }
.item .swatch { width: 100%; height: 76px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); }
.item .nm { font-weight: 900; }
.item .owned { font-size: 12px; color: var(--cyan); font-weight: 800; min-height: 16px; }
.price { font-family: var(--display); color: var(--gold); }

/* ---------- room ---------- */
.room-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.stage { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; border: 4px solid #0c0620; box-shadow: 0 16px 40px rgba(0,0,0,.45); user-select: none; touch-action: none; }
.stage .wall { position: absolute; left: 0; right: 0; top: 0; height: 60%; }
.stage .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; box-shadow: inset 0 14px 18px -10px rgba(0,0,0,.45); }
.stage .wall::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4%; background: rgba(0,0,0,.25); }
.thing { position: absolute; transform: translate(-50%, -100%); cursor: grab; line-height: 1; font-size: calc(9cqw * var(--s, 1)); filter: drop-shadow(0 .6cqw .4cqw rgba(0,0,0,.35)); }
.thing span { display: inline-block; transform: scaleX(var(--f, 1)); }
.thing.sel { outline: 3px dashed var(--cyan); outline-offset: 4px; border-radius: 8px; }
.thing:active { cursor: grabbing; }
.stage.view .thing { cursor: default; }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 4px; }
.tray button { font-size: 30px; aspect-ratio: 1; background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.tray button:hover { border-color: var(--cyan); }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; }
.surface-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.surface-pick button { width: 46px; height: 46px; border-radius: 10px; border: 3px solid var(--line); cursor: pointer; }
.surface-pick button.on { border-color: var(--gold); }

/* wallpapers */
.wall-cream { background: repeating-linear-gradient(90deg, #f4e7cf 0 40px, #efdfc2 40px 80px); }
.wall-neon { background: linear-gradient(transparent 95%, rgba(46,230,214,.6) 95%) 0 0/40px 40px, linear-gradient(90deg, transparent 95%, rgba(255,79,154,.6) 95%) 0 0/40px 40px, #1a0b3a; }
.wall-stars { background: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent), radial-gradient(2px 2px at 85% 60%, #ffe9a8, transparent), radial-gradient(1.5px 1.5px at 10% 80%, #fff, transparent), radial-gradient(circle at 80% 20%, #3b3a8f, #0d0a2e 70%); background-size: 160px 120px, 160px 120px, 160px 120px, 160px 120px, 160px 120px, 100% 100%; }
.wall-keys { background: repeating-linear-gradient(90deg, #fffdf6 0 36px, #222 36px 38px); position: relative; }
.wall-keys::before { content: ''; position: absolute; inset: 0 0 45% 0; background: repeating-linear-gradient(90deg, transparent 0 24px, #15112a 24px 48px, transparent 48px 74px, #15112a 74px 98px, transparent 98px 152px, #15112a 152px 176px, transparent 176px 200px, #15112a 200px 224px, transparent 224px 248px, #15112a 248px 272px, transparent 272px 304px); }
.wall-staff { background: repeating-linear-gradient(transparent 0 14px, #2b2b55 14px 16px, transparent 16px 28px, #2b2b55 28px 30px, transparent 30px 42px, #2b2b55 42px 44px, transparent 44px 56px, #2b2b55 56px 58px, transparent 58px 70px, #2b2b55 70px 72px, transparent 72px 110px), #fff6e0; }
.wall-sunset { background: linear-gradient(#ff7eb3, #ff9f5a 55%, #ffd36b); }
.wall-mint { background: repeating-linear-gradient(90deg, #b8f2dc 0 30px, #9fe8cd 30px 60px); }
/* floors */
.floor-wood { background: repeating-linear-gradient(90deg, #9b6234 0 60px, #8a552c 60px 62px, #a96d3c 62px 120px, #8a552c 120px 122px); }
.floor-checker { background: conic-gradient(#222 25%, #eee 0 50%, #222 0 75%, #eee 0) 0 0/50px 50px; }
.floor-carpet { background: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.5px) 0 0/8px 8px, #5d2d9a; }
.floor-arcade { background: radial-gradient(circle at 25% 25%, #ff4f9a 3px, transparent 4px) 0 0/40px 40px, radial-gradient(circle at 75% 70%, #2ee6d6 3px, transparent 4px) 0 0/40px 40px, linear-gradient(45deg, transparent 45%, #ffc83d 45% 55%, transparent 55%) 0 0/40px 40px, #120a2a; }
.floor-cloud { background: radial-gradient(circle at 30% 40%, #fff 18%, transparent 19%) 0 0/70px 50px, radial-gradient(circle at 70% 60%, #fff 22%, transparent 23%) 0 0/70px 50px, #cfe8ff; }
.floor-grass { background: repeating-linear-gradient(100deg, #4fbf4a 0 6px, #45ad40 6px 12px); }
.floor-tile { background: linear-gradient(90deg, #2c5aa0 2px, transparent 2px) 0 0/48px 48px, linear-gradient(#2c5aa0 2px, transparent 2px) 0 0/48px 48px, #8fc3ff; }

/* ---------- classmates ---------- */
.mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.mate { text-align: center; padding: 18px; border-radius: 18px; background: var(--panel); border: 2px solid var(--line); }
.mate .av { font-size: 48px; }

/* ---------- teacher ---------- */
.class-code-big { font-family: var(--display); font-size: clamp(34px, 6vw, 56px); letter-spacing: 6px; color: var(--gold); }
table.roster { width: 100%; border-collapse: collapse; }
.roster th, .roster td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.roster th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.roster .scode { font-family: var(--display); letter-spacing: 3px; color: var(--cyan); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; color: var(--ink); margin: 0; }
.switch input { width: 46px; height: 26px; appearance: none; background: var(--line); border-radius: 99px; position: relative; cursor: pointer; padding: 0; border: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 23px; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.class-tile { cursor: pointer; text-decoration: none; color: var(--ink); }
.class-tile:hover { border-color: var(--cyan); }

/* printable login cards */
.print-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.login-slip { border: 2px dashed #999; border-radius: 14px; padding: 16px; background: #fff; color: #111; }
.login-slip .site { font-family: var(--display); font-size: 18px; color: #8b3dff; }
.login-slip .kv { display: flex; justify-content: space-between; font-size: 16px; margin-top: 6px; }
.login-slip .kv b { font-family: var(--display); letter-spacing: 2px; }
@media print {
  body { background: #fff; } body::before { display: none; }
  .topbar, footer, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .login-slip { break-inside: avoid; }
}

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8,4,20,.72); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; }
@keyframes fade { from { opacity: 0; } }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.avatar-grid button { font-size: 34px; aspect-ratio: 1; background: var(--bg2); border: 3px solid var(--line); border-radius: 14px; cursor: pointer; }
.avatar-grid button.on { border-color: var(--gold); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 70; }
.toast { background: var(--panel2); border: 2px solid var(--gold); color: var(--ink); padding: 12px 18px; border-radius: 14px; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: toastIn .25s; text-align: center; }
.toast.bad { border-color: var(--red); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }
.lb { list-style: none; padding: 0; margin: 0; counter-reset: lb; }
.lb li { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-weight: 800; counter-increment: lb; }
.lb li::before { content: counter(lb); width: 26px; color: var(--gold); font-family: var(--display); }
.lb li b { margin-left: auto; color: var(--cyan); }

@media (max-width: 900px) {
  .hero, .lobby, .room-layout { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .print-cards { grid-template-columns: 1fr; }
}

/* ---------- more wallpapers ---------- */
.wall-royal { background: radial-gradient(circle at 50% 50%, #ffd76a 0 3px, transparent 4px) 0 0/34px 34px, radial-gradient(circle at 0 0, #b8860b 0 6px, transparent 7px) 0 0/34px 34px, linear-gradient(#7a1f3d, #5a1230); }
.wall-candy { background: repeating-linear-gradient(135deg, #ffd1e6 0 22px, #fff 22px 44px, #c8f5ff 44px 66px, #fff 66px 88px); }
.wall-ocean { background: radial-gradient(circle at 50% 100%, transparent 18px, #7fd3ff 19px 23px, transparent 24px) 0 0/48px 24px, linear-gradient(#2c8fd6, #155a9a); }
.wall-bricks { background: linear-gradient(#0003 2px, transparent 2px) 0 0/40px 20px, linear-gradient(90deg, #0003 2px, transparent 2px) 0 0/40px 40px, linear-gradient(90deg, #0003 2px, transparent 2px) 20px 20px/40px 40px, #c0553a; }
.wall-chalk { background: radial-gradient(#ffffff10 1px, transparent 1.5px) 0 0/6px 6px, #234434; position: relative; }
.wall-chalk::before { content: '♪ ♫ ♩ ♬ ♪ ♫'; position: absolute; inset: 0; color: #ffffff44; font-size: 30px; letter-spacing: 30px; padding: 16px; line-height: 2.2; word-break: break-all; overflow: hidden; }
.wall-rainbow { background: linear-gradient(#ff5a5a, #ff9f43, #ffd93d, #5be37d, #4fb3ff, #8b6bff); }
.wall-jungle { background: radial-gradient(ellipse 18px 8px at 30% 40%, #2f9e44 70%, transparent 72%) 0 0/60px 50px, radial-gradient(ellipse 14px 6px at 70% 70%, #40c057 70%, transparent 72%) 0 0/60px 50px, #1b5e2c; }
.wall-arcade { background: radial-gradient(circle, #ffc83d 0 2px, transparent 3px) 0 0/22px 22px, radial-gradient(circle, #ff4f9a 0 2px, transparent 3px) 11px 11px/22px 22px, linear-gradient(#1a0b3a, #2a0f5a); }
/* ---------- more floors ---------- */
.floor-marble { background: linear-gradient(135deg, transparent 45%, #0000000d 50%, transparent 55%) 0 0/70px 70px, conic-gradient(#f1f1f4 25%, #dcdce6 0 50%, #f1f1f4 0 75%, #dcdce6 0) 0 0/70px 70px; }
.floor-red { background: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.5px) 0 0/7px 7px, #b3202f; }
.floor-dance { background: conic-gradient(#ff4f9a 25%, #2ee6d6 0 50%, #ffc83d 0 75%, #8b6bff 0) 0 0/56px 56px; animation: dance 1.6s steps(1) infinite; }
@keyframes dance { 50% { filter: hue-rotate(90deg) brightness(1.15); } }
.floor-ice { background: linear-gradient(160deg, #ffffff88 10%, transparent 30%) 0 0/120px 60px, #bfe6ff; }
.floor-sand { background: radial-gradient(#c9a35b 1px, transparent 1.5px) 0 0/9px 9px, #f2d39b; }
.floor-stage { background: repeating-linear-gradient(90deg, #3a2a1a 0 50px, #2e2014 50px 52px); box-shadow: inset 0 18px 30px -10px rgba(255,200,61,.35); }

/* ---------- item art ---------- */
.art-svg, .art-emoji { display: inline-block; line-height: 1; }
.art-svg svg { display: block; }
.item .art .art-svg svg { height: 64px !important; width: auto !important; max-width: 120px; }
.tray button .art-svg svg { height: 34px !important; width: auto !important; max-width: 48px; }
.tray button { display: grid; place-items: center; }
.thing.pet span { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: scaleX(var(--f, 1)) translateY(-6%); } }
.item .meta { font-size: 12px; color: var(--muted); min-height: 15px; }
.shop-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-tools input { max-width: 280px; font-size: 16px; padding: 9px 12px; }
.shop-tools select { width: auto; font-size: 15px; padding: 9px 12px; }
.tray-group { grid-column: 1 / -1; font-weight: 900; font-size: 13px; color: var(--muted); margin-top: 6px; }
.song-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.song-list button { text-align: left; font: 800 14px var(--body); color: var(--ink); background: var(--bg2); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.song-list button.on { border-color: var(--gold); background: #2a1a00; }
.song-list small { display: block; font-weight: 700; color: var(--muted); font-size: 12px; }
.now-playing { display: inline-flex; align-items: center; gap: 6px; font: 800 13px var(--body); color: var(--cyan); background: var(--bg2); border: 2px solid var(--cyan); border-radius: 999px; padding: 4px 6px 4px 12px; max-width: 240px; }
.now-playing span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing button { border: 0; background: var(--cyan); color: #003b36; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 11px; flex: none; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; flex: none; }
.eq i { width: 3px; background: var(--cyan); animation: eq .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
#np-slot { position: fixed; left: 16px; bottom: 16px; z-index: 45; }
#np-slot .now-playing { box-shadow: 0 8px 24px rgba(0,0,0,.45); background: var(--panel2); }
.item .row:last-child { margin-top: auto; }
.item { justify-content: flex-start; }

/* ---------- sFz coin, modes, trophies ---------- */
.sfz-amt { display: inline-flex; align-items: center; gap: .2em; white-space: nowrap; }
.notes-pill small { font-family: var(--body); font-weight: 900; font-size: 12px; opacity: .85; }
.modes { display: flex; gap: 6px; flex-wrap: wrap; }
.mode { font: 800 12px var(--body); border-radius: 999px; padding: 4px 10px; border: 2px solid var(--line); background: var(--bg2); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.mode:hover { border-color: var(--gold); color: var(--ink); }
.mode.on { border-color: var(--gold); color: var(--gold); cursor: default; }
.trophy-pop { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; gap: 12px; align-items: center; background: var(--panel2); border: 3px solid var(--tier); border-radius: 16px; padding: 12px 18px; box-shadow: 0 0 30px color-mix(in srgb, var(--tier) 50%, transparent), 0 14px 40px rgba(0,0,0,.5); animation: dropIn .45s cubic-bezier(.2,1.4,.4,1); }
.trophy-pop.out { transition: transform .5s, opacity .5s; transform: translate(-50%, -140%); opacity: 0; }
.trophy-pop .ti { font-size: 40px; }
.trophy-pop small { display: block; color: var(--tier); font-weight: 900; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }
.trophy-pop b { display: block; font-size: 18px; }
.trophy-pop span:not(.ti) { color: var(--gold); font-weight: 900; }
@keyframes dropIn { from { transform: translate(-50%, -150%); } }
.trophy-game { margin-bottom: 18px; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.trophy { text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--bg2); border: 2px solid var(--line); opacity: .55; filter: grayscale(.9); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.trophy.got { opacity: 1; filter: none; border-color: var(--tier); box-shadow: 0 0 18px color-mix(in srgb, var(--tier) 35%, transparent); }
.trophy .ti { font-size: 38px; }
.trophy small { color: var(--muted); font-size: 12px; }
.trophy .tier { font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--tier); }
.warmup { margin-top: 36px; display: grid; justify-items: center; gap: 4px; }
.warmup .keys { height: 44px; max-width: 320px; width: 100%; margin: 6px 0; }

/* =====================================================================
   1980s ARCADE LOOK: sunset sky, neon grid horizon, glow, scanlines
   ===================================================================== */
:root {
  --bg: #0d0221; --bg2: #160536; --panel: #1f0a4a; --panel2: #2a0f5e; --line: #5a2ea6;
  --pink: #ff2a9d; --cyan: #00f0ff; --gold: #ffd319; --violet: #9d4dff; --lime: #39ff14; --orange: #ff8a3d;
  --glow-pink: 0 0 6px #ff2a9d, 0 0 18px rgba(255,42,157,.6);
  --glow-cyan: 0 0 6px #00f0ff, 0 0 18px rgba(0,240,255,.55);
  --pixel: 'Press Start 2P', monospace;
}
body {
  background:
    radial-gradient(ellipse 120% 60% at 50% 100%, rgba(255,42,157,.35), transparent 60%),
    linear-gradient(180deg, #0d0221 0%, #1b0646 38%, #3d0a5e 62%, #12032c 100%);
  background-attachment: fixed;
}
/* the neon grid floor rolling toward you */
body::before {
  content: ''; position: fixed; left: -50%; right: -50%; bottom: -10vh; height: 55vh; z-index: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(transparent 0 calc(100% - 2px), #ff2a9d calc(100% - 2px)) 0 0 / 100% 60px,
    linear-gradient(90deg, transparent 0 calc(100% - 2px), #00f0ff calc(100% - 2px)) 0 0 / 80px 100%;
  transform: perspective(320px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(transparent, #000 45%);
  -webkit-mask-image: linear-gradient(transparent, #000 45%);
  animation: gridRoll 1.4s linear infinite;
}
@keyframes gridRoll { to { background-position: 0 60px, 0 0; } }
/* striped retro sun on the horizon + CRT scanlines */
#app::before {
  content: ''; position: fixed; left: 50%; bottom: 30vh; width: 46vmin; height: 46vmin; transform: translateX(-50%); border-radius: 50%; z-index: -1; pointer-events: none; opacity: .32;
  background: linear-gradient(#ffd319, #ff8a3d 45%, #ff2a9d 80%);
  mask-image: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
  -webkit-mask-image: linear-gradient(#000 50%, transparent 50%), repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.13) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* neon headings */
h1 { text-shadow: 0 0 10px rgba(255,42,157,.55), 0 3px 0 #3d0a5e; }
h2, h3 { text-shadow: 0 0 8px rgba(0,240,255,.35); }
.logo .word { background: linear-gradient(180deg, #fff 0%, #ffd319 30%, #ff2a9d 70%, #9d4dff 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 6px rgba(255,42,157,.7)); font-family: 'Bungee Shade', var(--display); font-size: 28px; }
.logo .dot { color: var(--cyan); text-shadow: var(--glow-cyan); }
.hero h1 { font-family: 'Bungee Shade', var(--display); }
.hero h1 .a { color: var(--gold); text-shadow: 0 0 8px #ffd319, 0 0 26px rgba(255,138,61,.8), 4px 4px 0 #ff2a9d; }
.hero h1 .b { color: var(--cyan); text-shadow: 0 0 8px #00f0ff, 0 0 26px rgba(0,240,255,.8), 4px 4px 0 #9d4dff; }
.hero .lead { color: #f3e8ff; }

/* top bar: dark glass with a neon stripe */
.topbar { background: rgba(13,2,33,.82); border-bottom: 0; box-shadow: 0 2px 0 #ff2a9d, 0 4px 0 #ffd319, 0 6px 0 #00f0ff, 0 10px 30px rgba(255,42,157,.35); }
.nav a { font-family: var(--body); }
.nav a.active { background: linear-gradient(180deg, #3b1180, #2a0f5e); box-shadow: inset 0 -3px 0 var(--cyan), var(--glow-cyan); color: #fff; }
.notes-pill { background: #241000; border-color: var(--gold); box-shadow: 0 0 10px rgba(255,211,25,.5); font-family: var(--pixel); font-size: 13px; padding: 7px 12px; }
.me-chip { border-color: var(--violet); box-shadow: 0 0 10px rgba(157,77,255,.45); }

/* chunky arcade buttons with glow */
.btn { border: 3px solid #0d0221; text-transform: uppercase; letter-spacing: .5px; box-shadow: 0 5px 0 var(--c2), 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.btn.ghost { border: 2px solid var(--line); text-transform: none; letter-spacing: 0; box-shadow: none; }
.btn.small { box-shadow: 0 3px 0 var(--c2), 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
.btn.ghost.small { box-shadow: none; }
.btn.cyan { --c: #00c8d6; --c2: #006b73; }
.btn.gold { --c: #ffd319; --c2: #b38f00; color: #2a1800; }
.btn.violet { --c: #9d4dff; --c2: #5a1fb3; }
.btn { --c: #ff2a9d; --c2: #a1135f; }

/* cards: neon edges */
.card, .game-card, .item, .mate, .table-row, .feature, .tabs button { border-color: #5a2ea6; }
.card { background: linear-gradient(180deg, rgba(42,15,94,.92), rgba(31,10,74,.92)); box-shadow: 0 0 0 1px rgba(0,240,255,.15), 0 0 22px rgba(157,77,255,.25), 0 10px 30px rgba(0,0,0,.4); }
.game-card { background: rgba(31,10,74,.92); box-shadow: 0 0 18px rgba(157,77,255,.25); }
.game-card:hover { box-shadow: 0 0 24px color-mix(in srgb, var(--gc) 70%, transparent), 0 0 4px var(--gc); }
.game-card .art { background:
  radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--gc) 80%, transparent), transparent 70%),
  linear-gradient(transparent 0 calc(100% - 1px), rgba(0,240,255,.25) calc(100% - 1px)) 0 0 / 100% 18px,
  linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(255,42,157,.25) calc(100% - 1px)) 0 0 / 24px 100%,
  #120330; }
.item, .mate, .table-row { background: rgba(31,10,74,.9); }
.item:hover, .mate:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.feature { background: rgba(22,5,54,.75); border: 2px solid rgba(0,240,255,.35); box-shadow: inset 0 0 18px rgba(0,240,255,.08); }
.feature:nth-child(2) { border-color: rgba(255,42,157,.45); } .feature:nth-child(3) { border-color: rgba(255,211,25,.45); } .feature:nth-child(4) { border-color: rgba(57,255,20,.4); }
.badge.mp { background: var(--cyan); box-shadow: var(--glow-cyan); }
.tabs button.on { background: var(--gold); box-shadow: 0 0 12px rgba(255,211,25,.6); }
input, textarea, select { background: rgba(13,2,33,.85); }
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.price { color: var(--gold); text-shadow: 0 0 8px rgba(255,211,25,.5); }
.keys span.on { background: var(--lime); box-shadow: 0 0 16px var(--lime); }
.keys { filter: drop-shadow(0 0 12px rgba(255,42,157,.45)) drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
footer { color: #c9b3ff; text-shadow: 0 0 6px rgba(157,77,255,.6); }
.toast { border-color: var(--cyan); box-shadow: var(--glow-cyan), 0 10px 30px rgba(0,0,0,.4); }
.class-code-big { text-shadow: 0 0 10px rgba(255,211,25,.7); }
.trophy-pop { background: #1b0646; }
html { background: #0d0221; }
.topbar { gap: 12px; padding: 12px 18px; }
.logo .word { font-size: 24px; }
.nav { gap: 2px; }
.nav a { font-size: 15px; padding: 7px 9px; }
@media (max-width: 1320px) { .nav a { font-size: 14px; padding: 6px 7px; } .logo .word { font-size: 21px; } }
