:root {
  --accent: #0036ff; --accent-rgb: 0,54,255; --accent-hi: #2a5bff; --accent-soft: #7d9bff; --accent-pale: #9db3ff;
  --accent-mid: #001a99; --accent-dark: #000d4d; --accent-deep: #0c1640; --on-accent: #ffffff;
  --blue: var(--accent);
  --blue-hi: var(--accent-hi);
  --blue-glow: rgba(var(--accent-rgb),0.55);
  --black: #000000;
  --text: #f5f6f8;
  --muted: rgba(245,246,248,0.58);
  --faint: rgba(245,246,248,0.36);
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --panel: rgba(10,11,16,0.72);
  --panel-solid: #08090d;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --side: 248px;
  --r-sm: 7px;
  --r: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); }
body {
  font-family: var(--font); color: var(--text); background: var(--black);
  font-size: 14px; line-height: 1.5; min-height: 100vh;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.static-bg { background: radial-gradient(ellipse 70% 40% at 75% -5%, rgba(var(--accent-rgb),.28), transparent 70%), #000; }
::selection { background: var(--blue); color: #fff; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
a { color: inherit; }
svg { flex: none; }

/* ================= sidebar ================= */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--side);
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, rgba(6,8,18,0.82), rgba(3,4,10,0.9));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 180px; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 0%, rgba(var(--accent-rgb),0.28), transparent 70%); }
.brand { position: relative; display: flex; align-items: center; gap: 10px; padding: 2px 6px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.035em; }
.brand img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 18px var(--blue-glow); }

.side-search { position: relative; }
.side-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--faint); pointer-events: none; }
.side-search input { width: 100%; height: 36px; padding: 0 34px 0 31px; background: rgba(255,255,255,0.05); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text); font: 500 13px var(--font); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.side-search input::placeholder { color: var(--faint); }
.side-search input:focus { border-color: var(--blue); background: rgba(var(--accent-rgb),0.08); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.2); }
.side-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 500 11px var(--font); color: var(--faint); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }

.side-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.side-nav { display: grid; gap: 2px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: color .15s, background .15s;
}
.side-link svg { width: 17px; height: 17px; }
.side-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.side-link[aria-current="page"] { color: #fff; background: linear-gradient(90deg, rgba(var(--accent-rgb),0.32), rgba(var(--accent-rgb),0.06)); }
.side-link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.side-link .count { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.side-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); margin: 0 4px; }

.side-bottom { margin-top: auto; display: grid; gap: 12px; }
.side-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 6px; font-size: 11.5px; color: var(--faint); }
.side-legal a { color: var(--faint); text-decoration: none; }
.side-legal a:hover, .side-legal a[aria-current="page"] { color: var(--text); }
.side-legal span { width: 100%; }

/* mobile bar */
.mobilebar { display: none; position: sticky; top: 0; z-index: 25; height: 56px; padding: 0 12px 0 16px; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.mobilebar .brand { font-size: 18px; }
.mobilebar .brand img { width: 24px; height: 24px; }
.scrim { display: none; }

/* ================= main ================= */
.main { position: relative; z-index: 1; margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 32px 64px; flex: 1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04); color: var(--text);
  font: 600 13.5px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.26); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--accent-hi), var(--blue)); border-color: rgba(var(--accent-rgb),0.45); box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 8px 24px -8px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn.primary:hover { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 10px 30px -6px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn.block { width: 100%; }
.btn svg { width: 15px; height: 15px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; font-weight: 500; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn.icon { width: 38px; padding: 0; }
.btn.danger:hover { border-color: #ff4d4d; color: #ff8080; background: rgba(255,60,60,0.08); }

/* headings */
.page-head { padding: 12px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -0.04em; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.section { margin-top: 36px; }
.section-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-label h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -0.025em; }
.section-label h2 i { display: none; }
.section-label .tools { display: flex; align-items: center; gap: 6px; }
.section-label a.more { color: var(--muted); font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.section-label a.more:hover { color: var(--text); }
.section-label a.more svg { width: 13px; height: 13px; }
.arrow-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: var(--muted); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.arrow-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.arrow-btn svg { width: 14px; height: 14px; }

/* ================= hero banner ================= */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; min-height: 340px;
  border: 1px solid var(--line-strong); background: #02040c;
  box-shadow: 0 30px 80px -40px rgba(var(--accent-rgb),0.6);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(140%) brightness(0.55); transform: scale(1.1); z-index: -2; transition: background-image .6s; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.65) 42%, rgba(0,0,0,0.05) 75%),
  radial-gradient(80% 120% at 0% 100%, rgba(var(--accent-rgb),0.45), transparent 60%); }
.hero-art { position: absolute; right: 28px; top: 50%; transform: translateY(-50%) rotate(2deg); width: min(44%, 440px); aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; z-index: -1;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.14), 0 0 60px -10px var(--blue-glow); background: #050814; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .letter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 700; letter-spacing: -0.06em; }
.hero-body { position: relative; padding: 44px 44px 40px; max-width: 520px; min-height: 340px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-pale); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

.hero h1 { margin-top: 14px; font-size: clamp(34px, 4.4vw, 54px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.hero p { margin-top: 12px; color: var(--muted); font-size: 15px; }
.hero .actions { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.hero-dots { position: absolute; left: 44px; bottom: 20px; display: flex; gap: 6px; }
.hero-dots button { width: 18px; height: 4px; border-radius: 2px; border: 0; background: rgba(255,255,255,0.22); cursor: pointer; padding: 0; transition: width .25s, background .25s; }
.hero-dots button[aria-current="true"] { width: 30px; background: #fff; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.stat { padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; gap: 12px; }
.stat svg { width: 18px; height: 18px; color: var(--accent-soft); }
.stat b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--faint); font-size: 12px; }

/* ================= cards ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px; margin: -4px -2px 0; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); font-family: var(--font); text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: rgba(var(--accent-rgb),0.75); transform: translateY(-3px); box-shadow: 0 16px 36px -14px var(--blue-glow), 0 0 0 1px rgba(var(--accent-rgb),0.25); }
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #050814; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #050814; transition: transform .45s; }
.art .gen { position: absolute; inset: 0; transition: transform .45s; }
.art .gen::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(to bottom, #000 20%, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 90%); }
.art .letter { position: absolute; left: 14px; bottom: 6px; font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -0.05em; color: rgba(255,255,255,0.92); text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.45)); opacity: 0; transition: opacity .2s; }
.card:hover .art img, .card:hover .art .gen { transform: scale(1.06); }
.card:hover .art::after { opacity: 1; }
.play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.25), 0 8px 24px var(--blue-glow); opacity: 0; transform: translate(-50%, -40%) scale(0.85); transition: opacity .2s, transform .2s; }
.play svg { width: 14px; height: 14px; margin-left: 2px; }
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 11px; }
.cap b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap span { flex: none; color: var(--faint); font-size: 11.5px; }
.empty { padding: 64px 0; color: var(--muted); display: none; text-align: center; }

/* ================= games toolbar ================= */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: rgba(255,255,255,0.03); color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.chip:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.chip[aria-pressed="true"] { color: #fff; background: rgba(var(--accent-rgb),0.22); border-color: rgba(var(--accent-rgb),0.7); }
.chip .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--blue)); }
.count { margin-left: auto; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.input { width: 100%; height: 36px; padding: 0 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text); font: 500 13.5px var(--font); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--blue); background: rgba(var(--accent-rgb),0.06); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.18); }
select.input { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff88' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; }
select.input option { background: #0b0c10; }

/* ================= player ================= */
.player { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; background: var(--black); }
.player.open { display: flex; }
.player-bar { display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(var(--accent-rgb),0.18), transparent 40%), var(--panel-solid); }
.player-bar .name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; margin-right: auto; }
.player-bar .name img { width: 20px; height: 20px; border-radius: 50%; }
.player-msg { flex: 1; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; }
.player-msg[hidden], .player iframe[hidden] { display: none; }
.player-msg b { font-size: 17px; font-weight: 600; }
.player-msg p { color: var(--muted); max-width: 380px; margin: 0 auto; }
.player-msg code { font: 500 12.5px ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.player iframe { flex: 1; width: 100%; border: 0; background: #000; }

/* ================= settings ================= */
.narrow { max-width: 760px; }
.settings { display: grid; gap: 26px; }
.group h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 2px; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; min-height: 60px; }
.row + .row { border-top: 1px solid var(--line); }
.row .lbl { min-width: 0; }
.row .lbl b { display: block; font-size: 13.5px; font-weight: 500; }
.row .lbl span { display: block; color: var(--faint); font-size: 12.5px; margin-top: 1px; }
.row .ctl { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.row .ctl .input { width: 240px; }
.switch { position: relative; flex: none; width: 38px; height: 22px; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 6px; background: rgba(255,255,255,0.12); transition: background .15s, box-shadow .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .18s cubic-bezier(.3,.7,.4,1); }
.switch input:checked + i { background: var(--blue); box-shadow: 0 0 14px -2px var(--blue-glow); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
.keycap { min-width: 88px; }
.keycap.listening { border-color: var(--blue); background: rgba(var(--accent-rgb),0.15); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 12px); opacity: 0; z-index: 70; padding: 9px 14px; border-radius: 9px; background: #121318; border: 1px solid var(--line-strong); font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= responsive ================= */
@media (max-width: 900px) {
  .mobilebar { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.3,.7,.4,1); box-shadow: 20px 0 60px rgba(0,0,0,0.6); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,0.5); }
  .main { margin-left: 0; }
  .content { padding: 20px 16px 48px; }
  .hero-art { display: none; }
  .hero-body { padding: 32px 24px 44px; min-height: 300px; }
  .hero { min-height: 300px; }
  .hero-dots { left: 24px; }
  .hero::after { background: linear-gradient(0deg, rgba(0,0,0,0.85), rgba(0,0,0,0.35)), radial-gradient(80% 120% at 0% 100%, rgba(var(--accent-rgb),0.45), transparent 60%); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 10px; gap: 8px; }
  .stat svg { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rail { grid-auto-columns: 160px; gap: 10px; }
  .art .letter { font-size: 34px; }
  .toolbar .count { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .player-bar .btn span { display: none; }
  .row { flex-wrap: wrap; }
  .row .ctl { width: 100%; }
  .row .ctl .input { width: 100%; }
  .row.compact { flex-wrap: nowrap; }
  .row.compact .ctl { width: auto; }
  .page-head h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ================= Aceternity-style effects ================= */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* sidebar: recently played + animated placeholder */
.side-link.mini { height: 40px; gap: 10px; }
.mini-art { position: relative; width: 30px; height: 22px; border-radius: 5px; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--accent-hi), var(--accent-dark)); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255,255,255,0.1); }
.mini-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-art i { font-style: normal; font-size: 11px; font-weight: 700; }
.mini-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search input::placeholder { color: transparent; }
.side-search .ph { position: absolute; left: 31px; right: 34px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: opacity .3s, transform .3s, filter .3s; }
.side-search .ph.out { opacity: 0; transform: translateY(-110%); filter: blur(3px); }
.side-search.has-text .ph, .side-search input:focus ~ .ph { opacity: 0; }

/* Moving Border button */
.btn-moving { position: relative; border: 1.5px solid transparent !important;
  background: linear-gradient(180deg, var(--accent-deep), #05060c) padding-box,
              conic-gradient(from var(--a), rgba(var(--accent-rgb),0.25) 0deg, rgba(var(--accent-rgb),0.25) 250deg, var(--accent-soft) 300deg, #ffffff 330deg, rgba(var(--accent-rgb),0.25) 360deg) border-box !important;
  box-shadow: 0 8px 28px -10px var(--blue-glow) !important; animation: spin-border 3.2s linear infinite; }
.btn-moving:hover { background: linear-gradient(180deg, var(--accent-deep), #07080f) padding-box,
              conic-gradient(from var(--a), rgba(var(--accent-rgb),0.35) 0deg, rgba(var(--accent-rgb),0.35) 250deg, var(--accent-pale) 300deg, #ffffff 330deg, rgba(var(--accent-rgb),0.35) 360deg) border-box !important; }
@keyframes spin-border { to { --a: 360deg; } }

/* Card Spotlight + 3D tilt */
.card { transform-style: preserve-3d; will-change: transform; transition: border-color .2s, transform .15s ease-out, box-shadow .2s; }
.card::before { content: ""; position: absolute; inset: -1px; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), var(--accent-pale), rgba(var(--accent-rgb),0.6) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s; }
.card .cap { position: relative; }
.card .cap::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(160px circle at var(--mx, 50%) 0%, rgba(var(--accent-rgb),0.22), transparent 70%); }
.card:hover::before, .card:hover .cap::before { opacity: 1; }

/* 3D Marquee hero */
.hero.m3d { min-height: 420px; }
.m3d-wrap { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.m3d-grid { position: absolute; left: 58%; top: 50%; width: 1500px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  transform: translate(-30%, -46%) rotateX(52deg) rotateZ(-42deg); transform-style: preserve-3d; }
.m3d-col { display: flex; flex-direction: column; gap: 18px; animation: m3d-up 38s linear infinite alternate; }
.m3d-col:nth-child(even) { animation-name: m3d-down; animation-duration: 44s; }
.m3d-col img, .m3d-col .m3d-tile { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; display: block; background: #050814;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 20px 40px -12px rgba(0,0,0,0.8); }
@keyframes m3d-up { from { transform: translateY(0); } to { transform: translateY(-35%); } }
@keyframes m3d-down { from { transform: translateY(-35%); } to { transform: translateY(0); } }
.hero.m3d::after { background:
  linear-gradient(90deg, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.82) 34%, rgba(0,0,0,0.25) 70%, rgba(0,0,0,0.5) 100%),
  linear-gradient(0deg, rgba(0,0,0,0.75), transparent 35%),
  radial-gradient(70% 120% at 0% 100%, rgba(var(--accent-rgb),0.5), transparent 60%); }
.hero.m3d .hero-body { min-height: 420px; max-width: 560px; }
.hero h1 .flip { display: inline-block; color: transparent; background: linear-gradient(90deg, #fff, var(--accent-soft) 55%, var(--accent-hi)); -webkit-background-clip: text; background-clip: text; transition: opacity .35s, transform .35s, filter .35s; }
.hero h1 .flip.out { opacity: 0; transform: translateY(-14px); filter: blur(8px); }

/* Meteors */
.meteors { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.meteor { position: absolute; top: -10px; width: 2px; height: 2px; border-radius: 50%; background: var(--accent-pale); box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 8px var(--accent-soft);
  transform: rotate(215deg); animation: meteor linear infinite; }
.meteor::before { content: ""; position: absolute; top: 50%; transform: translateY(-50%); width: 70px; height: 1px; background: linear-gradient(90deg, var(--accent-pale), transparent); }
@keyframes meteor { 0% { transform: rotate(215deg) translateX(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(215deg) translateX(-700px); opacity: 0; } }

/* Infinite Moving Cards */
.infinite { position: relative; overflow: hidden; padding: 6px 0 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.infinite-track { display: flex; gap: 14px; width: max-content; animation: inf-scroll var(--dur, 60s) linear infinite; }
.infinite:hover .infinite-track { animation-play-state: paused; }
.infinite .card { width: 210px; flex: none; }
@keyframes inf-scroll { to { transform: translateX(calc(-50% - 7px)); } }

/* games search bar */
.toolbar .search { position: relative; flex: 1 1 280px; max-width: 420px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.toolbar .search .input { padding-left: 34px; height: 40px; }

.cta { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line-strong);
  background: radial-gradient(120% 160% at 100% 0%, rgba(var(--accent-rgb),0.35), transparent 60%), var(--panel); }
.cta b { display: block; font-size: 20px; letter-spacing: -0.03em; }
.cta span { color: var(--muted); }

@media (max-width: 900px) {
  .hero.m3d, .hero.m3d .hero-body { min-height: 360px; }
  .m3d-grid { left: 50%; width: 1100px; opacity: 0.55; }
  .hero.m3d::after { background: linear-gradient(0deg, rgba(0,0,0,0.9), rgba(0,0,0,0.45)), radial-gradient(70% 120% at 0% 100%, rgba(var(--accent-rgb),0.5), transparent 60%); }
}
@media (max-width: 640px) { .infinite .card { width: 160px; } }
@media (prefers-reduced-motion: reduce) {
  .m3d-col, .infinite-track, .meteor, .btn-moving { animation: none !important; }
  .infinite { overflow-x: auto; }
}

/* ================= sidebar while a game is open ================= */
.sidebar { transition: transform .28s cubic-bezier(.3,.7,.4,1), box-shadow .28s; }
body.playing .sidebar { z-index: 70; transform: translateX(-100%); }
body.playing.nav-open .sidebar { transform: none; box-shadow: 24px 0 60px rgba(0,0,0,0.7); }
body.playing.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.side-toggle { width: 32px; height: 30px; margin-right: 4px; }
.side-toggle svg { width: 15px; height: 15px; transition: transform .25s; }
body.nav-open .side-toggle svg { transform: rotate(180deg); }

/* ================= themes ================= */
[data-theme="amethyst"] { --accent:#7c3aed; --accent-rgb:124,58,237; --accent-hi:#8b5cf6; --accent-soft:#a78bfa; --accent-pale:#c4b5fd; --accent-mid:#3b1a99; --accent-dark:#1e0b4d; --accent-deep:#1a1033; }
[data-theme="ember"]    { --accent:#ff4d00; --accent-rgb:255,77,0;   --accent-hi:#ff6a26; --accent-soft:#ff9a66; --accent-pale:#ffbf99; --accent-mid:#992e00; --accent-dark:#4d1700; --accent-deep:#2a1206; }
[data-theme="emerald"]  { --accent:#00c26b; --accent-rgb:0,194,107;  --accent-hi:#1fd882; --accent-soft:#6ee7b0; --accent-pale:#a7f3d0; --accent-mid:#007a43; --accent-dark:#003d22; --accent-deep:#06281a; --on-accent:#00170c; }
[data-theme="rose"]     { --accent:#ff2e88; --accent-rgb:255,46,136; --accent-hi:#ff4f9c; --accent-soft:#ff8fbf; --accent-pale:#ffb8d6; --accent-mid:#991b52; --accent-dark:#4d0e29; --accent-deep:#2b0a18; }
[data-theme="ocean"]    { --accent:#00a6ff; --accent-rgb:0,166,255;  --accent-hi:#26b8ff; --accent-soft:#7dd6ff; --accent-pale:#b0e6ff; --accent-mid:#006b99; --accent-dark:#00364d; --accent-deep:#062433; }
[data-theme="gold"]     { --accent:#f5b400; --accent-rgb:245,180,0;  --accent-hi:#ffc61a; --accent-soft:#ffd966; --accent-pale:#ffe9a8; --accent-mid:#8a6500; --accent-dark:#3d2d00; --accent-deep:#241b02; --on-accent:#1a1300; }
[data-theme="mono"]     { --accent:#e5e7eb; --accent-rgb:229,231,235; --accent-hi:#ffffff; --accent-soft:#d1d5db; --accent-pale:#f3f4f6; --accent-mid:#4b5563; --accent-dark:#1f2937; --accent-deep:#14161b; --on-accent:#0a0a0a; }
.btn.primary { color: var(--on-accent); }
.play svg { fill: var(--on-accent); }

/* card sizes */
:root { --card-min: 178px; --rail-w: 196px; }
[data-cards="small"] { --card-min: 148px; --rail-w: 160px; }
[data-cards="large"] { --card-min: 224px; --rail-w: 244px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); }
.rail { grid-auto-columns: var(--rail-w); }
.infinite .card { width: calc(var(--rail-w) + 14px); }
[data-cards="small"] .art .letter { font-size: 34px; }

/* effects off */
[data-fx="off"] .m3d-col, [data-fx="off"] .infinite-track, [data-fx="off"] .btn-moving { animation: none !important; }
[data-fx="off"] .meteors { display: none; }
[data-fx="off"] .infinite { overflow-x: auto; scrollbar-width: none; }

/* pinned sidebar while playing (desktop) */
@media (min-width: 901px) {
  [data-side="pinned"] body.playing .sidebar { transform: none; box-shadow: none; }
  [data-side="pinned"] body.playing .player { left: var(--side); }
  [data-side="pinned"] body.playing .side-toggle { display: none; }
  [data-side="pinned"] body.playing.nav-open .scrim { display: none; }
}

/* theme picker */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 16px; }
.theme-opt { display: grid; gap: 8px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; text-align: left; transition: border-color .15s, color .15s, background .15s; }
.theme-opt:hover { color: var(--text); border-color: var(--line-strong); }
.theme-opt[aria-pressed="true"] { color: #fff; border-color: rgba(var(--accent-rgb),0.8); background: rgba(var(--accent-rgb),0.12); box-shadow: 0 0 0 1px rgba(var(--accent-rgb),0.4); }
.swatch { height: 44px; border-radius: 7px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.seg-ctl { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,0.03); }
.seg-ctl button { height: 28px; padding: 0 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; }
.seg-ctl button:hover { color: var(--text); }
.seg-ctl button[aria-pressed="true"] { background: rgba(var(--accent-rgb),0.25); color: #fff; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 16px; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal-box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 16px; border: 1px solid var(--line-strong); background: radial-gradient(120% 80% at 100% 0%, rgba(var(--accent-rgb),0.18), transparent 60%), #0a0b10; box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8); padding: 22px; animation: pop .22s cubic-bezier(.3,.7,.4,1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-box h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.modal-box p.sub { margin-top: 4px; color: var(--muted); }
.modal-box textarea { width: 100%; height: 140px; margin-top: 16px; padding: 12px; resize: vertical; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0,0,0,0.45); color: var(--accent-pale); font: 500 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; outline: none; }
.modal-box textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.18); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.modal-actions .left { margin-right: auto; }
.save-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--faint); font-size: 12.5px; }
.save-meta b { color: var(--text); font-weight: 600; }
.note { margin-top: 12px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted); font-size: 12.5px; }
.note.err { border-color: rgba(255,77,77,0.45); background: rgba(255,60,60,0.08); color: #ffb3b3; }
.note.ok { border-color: rgba(var(--accent-rgb),0.5); background: rgba(var(--accent-rgb),0.1); color: var(--text); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spinr .7s linear infinite; }
@keyframes spinr { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .themes { grid-template-columns: repeat(2, 1fr); } }


/* ---------- learning home ---------- */
.learn-hero { min-height: 360px; }
.learn-hero::after { background: radial-gradient(90% 120% at 100% 0%, rgba(var(--accent-rgb),0.35), transparent 60%), linear-gradient(180deg, rgba(5,6,12,0.2), rgba(5,6,12,0.7)); }
.learn-hero .hero-body { min-height: 360px; max-width: 600px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.learn-card { position: relative; display: grid; align-content: start; gap: 6px; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); text-decoration: none; transition: border-color .18s, transform .18s, background .18s; }
.learn-card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--panel)); transform: translateY(-2px); }
.learn-card .ic { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.learn-card .ic svg { width: 20px; height: 20px; }
.learn-card b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.learn-card > span:not(.ic):not(.go) { color: var(--muted); font-size: 13px; line-height: 1.5; }
.learn-card .go { position: absolute; right: 16px; top: 18px; color: var(--faint); transition: color .18s, transform .18s; }
.learn-card .go svg { width: 16px; height: 16px; }
.learn-card:hover .go { color: var(--c); transform: translateX(2px); }

/* NEW / UPDATED badges on game cards */
.card .art { position: relative; }
.card .badge { position: absolute; top: 8px; left: 8px; z-index: 3; padding: 3px 7px; border-radius: 6px; font: 800 10px/1.2 var(--font); letter-spacing: .07em; color: #fff; pointer-events: none; background: linear-gradient(180deg, #ff5a76, #e11d48); box-shadow: 0 4px 12px -2px rgba(225,29,72,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.card .badge.upd { background: linear-gradient(180deg, #34d399, #059669); box-shadow: 0 4px 12px -2px rgba(5,150,105,.6), inset 0 1px 0 rgba(255,255,255,.3); }
/* genre dropdown on the activities page */
.dd { position: relative; flex: none; }
.dd-btn { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); color: var(--text); font: 500 13.5px var(--font); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .2s; }
.dd-btn:hover { background: rgba(255,255,255,.07); }
.dd-btn[aria-expanded="true"], .dd-btn:focus-visible { outline: 0; border-color: var(--accent-hi); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.22); }
.dd-btn .dd-k { color: var(--faint); }
.dd-btn b { font-weight: 600; color: #fff; }
.dd-btn.set { border-color: rgba(var(--accent-rgb),.6); background: rgba(var(--accent-rgb),.14); }
.dd-btn svg { width: 15px; height: 15px; color: var(--muted); transition: transform .2s; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; max-height: min(380px, 60vh); overflow-y: auto; padding: 6px; border-radius: 12px; background: #0b0d14; border: 1px solid var(--line-strong); box-shadow: 0 20px 44px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--accent-rgb),.12); animation: ddIn .14s ease-out; }
.dd-menu[hidden] { display: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 13.5px var(--font); text-align: left; cursor: pointer; }
.dd-opt > span:first-child { flex: 1; }
.dd-opt .n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.dd-opt .ck { width: 15px; height: 15px; color: var(--accent-soft); opacity: 0; }
.dd-opt:hover, .dd-opt:focus-visible { outline: 0; background: rgba(var(--accent-rgb),.16); }
.dd-opt[aria-selected="true"] { color: #fff; font-weight: 600; }
.dd-opt[aria-selected="true"] .ck { opacity: 1; }
.dd-opt.is-new > span:first-child { color: #ff8fa3; }
.dd-opt:nth-child(2).is-new { margin-bottom: 4px; }
.dd-opt.is-new::after { content: ""; }
@media (max-width: 640px) { .dd { flex: 1; } .dd-btn { width: 100%; } .dd-btn b { flex: 1; text-align: left; } }

/* ================= lunacy browser (homepage proxy with tabs, Chrome style) ================= */
body.browser-page { height: 100vh; overflow: hidden; --tb: color-mix(in srgb, var(--accent) 9%, #15171e); --strip: #05060a; --tab-hover: rgba(255,255,255,0.06); }
body.browser-page .main { height: 100vh; min-height: 0; margin-left: 0; }
.browser { flex: 1; min-height: 0; display: flex; flex-direction: column; font-family: "Segoe UI", system-ui, -apple-system, "Inter", sans-serif; }

/* round toolbar buttons */
.cbtn { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #c7cad1; cursor: pointer; transition: background .12s, color .12s; }
.cbtn svg { width: 20px; height: 20px; }
.cbtn:hover { background: rgba(255,255,255,0.09); color: #fff; }
.cbtn:active { background: rgba(255,255,255,0.14); }
.cbtn:disabled { color: rgba(199,202,209,0.32); background: transparent; cursor: default; }
.cbtn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: -2px; }

/* tab strip */
.tabstrip { display: flex; align-items: flex-end; height: 42px; padding: 0 8px 0 8px; background: var(--strip); user-select: none; }
.tabs { display: flex; align-items: flex-end; min-width: 0; flex: 0 1 auto; height: 100%; padding: 0 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.ctab { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 240px; width: 240px; min-width: 56px; max-width: 240px; height: 34px; padding: 0 6px 0 12px; margin-bottom: 0; border-radius: 9px 9px 0 0; color: #b9bcc4; font-size: 12px; cursor: default; }
.ctab::after { content: ""; position: absolute; right: 0; top: 9px; bottom: 9px; width: 1px; background: rgba(255,255,255,0.14); }
.ctab:last-child::after, .ctab.on::after, .ctab.before-on::after, .ctab:hover::after, .ctab:has(+ .ctab:hover)::after { display: none; }
.ctab:hover:not(.on) { background: var(--tab-hover); color: #e8eaed; }
.ctab:hover:not(.on) { height: 30px; margin-bottom: 4px; border-radius: 8px; }
.ctab.on { background: var(--tb); color: #f1f3f4; z-index: 1; }
/* the curved "flares" where the active tab meets the toolbar */
.ctab.on::before, .ctab-r { content: ""; position: absolute; bottom: 0; width: 10px; height: 10px; pointer-events: none; }
.ctab-r { display: none; right: -10px; background: radial-gradient(circle at 100% 0, transparent 9.5px, var(--tb) 10px); }
.ctab.on .ctab-r { display: block; }
.ctab.on::before { left: -10px; background: radial-gradient(circle at 0 0, transparent 9.5px, var(--tb) 10px); }
.ctab-ic { flex: none; display: grid; place-items: center; width: 16px; height: 16px; }
.ctab-ic img { width: 16px; height: 16px; object-fit: contain; border-radius: 2px; }
.ctab-fallback { display: grid; place-items: center; color: #9aa0a6; }
.ctab-fallback svg { width: 16px; height: 16px; }
.ctab-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb),0.25); border-top-color: var(--accent-soft); animation: ctab-spin .7s linear infinite; }
@keyframes ctab-spin { to { transform: rotate(360deg); } }
.ctab-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
.ctab-x { position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #9aa0a6; cursor: pointer; }
.ctab-x svg { width: 14px; height: 14px; }
.ctab-x:hover { background: rgba(255,255,255,0.13); color: #fff; }
.ctab:not(.on):not(:hover) .ctab-x { opacity: .85; }
.tab-new { align-self: center; width: 28px; height: 28px; margin-left: 2px; margin-top: 4px; }
.tab-new svg { width: 18px; height: 18px; }

/* toolbar */
.navbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 2px; height: 46px; padding: 0 6px; background: var(--tb); border-bottom: 1px solid rgba(0,0,0,0.5); box-shadow: 0 1px 0 rgba(255,255,255,0.04); }
.omni { position: relative; display: flex; align-items: center; flex: 1; height: 34px; margin: 0 6px; border-radius: 17px; background: rgba(0,0,0,0.38); transition: background .12s, box-shadow .12s; }
.omni:hover { background: rgba(0,0,0,0.5); }
.omni.focus { background: #0c0d12; box-shadow: 0 0 0 2px var(--accent-soft); }
.omni input { flex: 1; min-width: 0; height: 100%; padding: 0 16px 0 6px; border: 0; background: transparent; color: #e8eaed; font: 400 14px "Segoe UI", system-ui, -apple-system, sans-serif; outline: none; }
.omni input::placeholder { color: #9aa0a6; }
.omni-chip { display: flex; align-items: center; gap: 6px; height: 26px; margin-left: 4px; padding: 0 7px; border-radius: 13px; color: #c7cad1; font-size: 13px; white-space: nowrap; }
.omni-chip svg { width: 16px; height: 16px; }
.omni-chip[data-kind="secure"], .omni-chip[data-kind="game"], .omni-chip[data-kind="insecure"] { cursor: default; }
.omni-chip[data-kind="secure"]:hover, .omni-chip[data-kind="game"]:hover, .omni-chip[data-kind="insecure"]:hover { background: rgba(255,255,255,0.08); }
.omni-chip[data-kind="insecure"] { color: #f28b82; }
.omni-chip[data-kind="game"] { color: var(--accent-pale); }
.omni-chip span { font-size: 12.5px; }

/* ⋮ menu */
.cmenu-wrap { position: relative; }
.cmenu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 240px; padding: 8px 0; border-radius: 10px; background: #1f2128; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 12px 36px rgba(0,0,0,0.6); }
.cmenu[hidden] { display: none; }
.cmenu button { display: flex; align-items: center; gap: 14px; width: 100%; height: 34px; padding: 0 16px; border: 0; background: none; color: #e3e3e3; font: 400 13px "Segoe UI", system-ui, sans-serif; text-align: left; cursor: pointer; }
.cmenu button svg { width: 18px; height: 18px; color: #c4c7c5; }
.cmenu button span { flex: 1; }
.cmenu button kbd { color: #9aa0a6; font: inherit; font-size: 12px; }
.cmenu button:hover { background: rgba(255,255,255,0.08); }
.cmenu button:disabled { opacity: .4; pointer-events: none; }
.cmenu hr { margin: 7px 0; border: 0; border-top: 1px solid rgba(255,255,255,0.1); }

/* page area */
.views { position: relative; flex: 1; min-height: 0; }
.views .view { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.views .view.game { background: #000; }
.views .view[hidden] { display: none; }
.start { position: absolute; inset: 0; overflow-y: auto; max-width: none; font-family: var(--font); }
.start > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.start[hidden] { display: none; }
.load-bar { position: absolute; left: 0; top: 0; z-index: 3; height: 2px; width: 0; opacity: 0; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); box-shadow: 0 0 10px var(--blue-glow); pointer-events: none; }
.load-bar.on { opacity: 1; width: 85%; transition: width 8s cubic-bezier(.1,.6,.2,1); }
.load-bar.on.done { width: 100%; opacity: 0; transition: width .2s, opacity .3s .15s; }
.start-search { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 22px; height: 50px; padding: 0 7px 0 44px; border: 1px solid var(--line-strong); border-radius: 25px; background: rgba(0,0,0,0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .15s, box-shadow .15s; }
.start-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.2), 0 12px 40px -12px var(--blue-glow); }
.start-search > svg { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); }
.start-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: 500 15px var(--font); outline: none; }
.start-search input::placeholder { color: var(--faint); }
.start-search .btn { height: 36px; padding: 0 18px; border-radius: 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.qk { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 5px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,0.04); color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.qk:hover { color: var(--text); background: rgba(var(--accent-rgb),0.14); border-color: rgba(var(--accent-rgb),0.5); }
.qk i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: radial-gradient(120% 120% at 30% 20%, var(--accent-hi), var(--accent-mid)); }
.proxy-note { margin-top: 14px !important; padding: 10px 12px; border: 1px solid rgba(255,90,90,0.35); border-radius: 10px; background: rgba(255,60,60,0.08); color: #ffb3b3 !important; font-size: 12.5px !important; }
.proxy-note code { font: 500 11.5px ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.08); word-break: break-all; }
.proxy-note a { color: #fff; }
}
@media (max-width: 900px) {
  body.browser-page .main { height: 100dvh; }
  .ctab { min-width: 90px; }
  #nav-home { display: none; }
}

/* lunacy pages (Activities, Settings) opened inside a browser tab */
[data-embed] .sidebar, [data-embed] .mobilebar, [data-embed] .scrim { display: none !important; }
[data-embed] .main { margin-left: 0 !important; }
[data-embed] body.playing .player { left: 0 !important; }
[data-embed] .side-toggle { display: none !important; }

/* bookmarks bar */
.bmbar { display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 8px; background: var(--tb); border-bottom: 1px solid rgba(0,0,0,0.55); overflow-x: auto; scrollbar-width: none; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
.bmbar::-webkit-scrollbar { display: none; }
.navbar { border-bottom: 0; box-shadow: none; }
.bm { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 180px; height: 26px; padding: 0 9px 0 7px; border: 0; border-radius: 13px; background: transparent; color: #dcdee3; font: 400 12.5px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.bm:hover { background: rgba(255,255,255,0.09); }
.bm:active { background: rgba(255,255,255,0.14); }
.bm span:not(.bm-ic) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bm img { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; }
.bm-ic { display: grid; place-items: center; color: #9aa0a6; }
.bm-ic svg { width: 16px; height: 16px; }
.bm-ic.page, .ctab-fallback.page { color: var(--accent-pale); }
.bm-sep { flex: none; width: 1px; height: 16px; margin: 0 4px; background: rgba(255,255,255,0.14); }
.omni-star { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #c7cad1; cursor: pointer; }
.omni-star svg { width: 18px; height: 18px; }
.omni-star:hover { background: rgba(255,255,255,0.09); }
.omni-star.on { color: var(--accent-soft); }
.omni-star[hidden] { display: none; }
.cbtn.on { background: rgba(var(--accent-rgb),0.22); color: #fff; }

/* ================= Inspect (devtools) ================= */
.devtools { --dt-bg: #1e1f22; --dt-bar: #2a2b2f; --dt-line: #3b3c40; --dt-text: #e3e3e3; --dt-dim: #9aa0a6; --dt-sel: #33405a;
  position: relative; flex: none; display: flex; flex-direction: column; min-height: 140px; background: var(--dt-bg); color: var(--dt-text); border-top: 1px solid var(--dt-line); font: 12px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; }
.devtools[hidden] { display: none; }
body.dt-dragging, body.dt-dragging * { cursor: ns-resize !important; user-select: none; }
body.dt-dragging .views .view { pointer-events: none; }
.dt-resize { position: absolute; left: 0; right: 0; top: -4px; height: 8px; z-index: 5; cursor: ns-resize; }
.dt-bar { display: flex; align-items: center; gap: 2px; height: 30px; padding: 0 4px; background: var(--dt-bar); border-bottom: 1px solid var(--dt-line); }
.dt-ib { flex: none; display: grid; place-items: center; width: 26px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--dt-dim); cursor: pointer; }
.dt-ib svg { width: 16px; height: 16px; }
.dt-ib.sm { width: 24px; height: 22px; }
.dt-ib.sm svg { width: 14px; height: 14px; }
.dt-ib:hover { background: rgba(255,255,255,0.08); color: var(--dt-text); }
.dt-ib.on { color: #7cacf8; background: rgba(124,172,248,0.14); }
.dt-div { width: 1px; height: 16px; margin: 0 4px; background: var(--dt-line); }
.dt-tabs { display: flex; height: 100%; }
.dt-tabs button { position: relative; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border: 0; background: transparent; color: var(--dt-dim); font: inherit; cursor: pointer; }
.dt-tabs button:hover { color: var(--dt-text); background: rgba(255,255,255,0.04); }
.dt-tabs button[aria-selected="true"] { color: var(--dt-text); }
.dt-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #7cacf8; }
.dt-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e46962; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.dt-badge[hidden] { display: none; }
.dt-target { flex: 1; min-width: 0; margin: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--dt-dim); text-align: right; }
.dt-body { position: relative; flex: 1; min-height: 0; display: flex; }
.dt-pane { flex: 1; min-width: 0; display: flex; }
.dt-pane[hidden] { display: none; }
.dt-empty { flex: 1; display: grid; place-items: center; color: var(--dt-dim); padding: 20px; text-align: center; }
.dt-empty[hidden] { display: none; }
.dt-tools { flex: none; display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px; border-bottom: 1px solid var(--dt-line); }
.dt-find { flex: 1; min-width: 60px; max-width: 260px; height: 20px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--dt-line); border-radius: 4px; background: #17181b; color: var(--dt-text); font: inherit; outline: none; }
.dt-find:focus { border-color: #7cacf8; }
.dt-find.wide { display: block; width: calc(100% - 16px); max-width: none; margin: 8px; }
.dt-level { height: 20px; margin-left: 6px; border: 1px solid var(--dt-line); border-radius: 4px; background: #17181b; color: var(--dt-text); font: inherit; }
.dt-left { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--dt-line); }
.dt-tree { flex: 1; min-height: 0; overflow: auto; padding: 4px 0; font: 12px/18px Menlo, Consolas, "SF Mono", monospace; outline: none; white-space: nowrap; }
.dt-row { position: relative; padding-right: 10px; color: #c5c5c5; cursor: default; }
.dt-row:hover { background: rgba(255,255,255,0.05); }
.dt-row.sel { background: var(--dt-sel); }
.dt-tree:focus .dt-row.sel { background: #2b4a7a; }
.dt-row.sel::before { content: "== $0"; position: absolute; right: 8px; color: var(--dt-dim); font-size: 11px; }
.dt-row .tg { color: #5db0d7; }
.dt-row .an { color: #9bbbdc; }
.dt-row .av { color: #f29766; }
.dt-row .tx { color: #e3e3e3; white-space: pre-wrap; }
.dt-row .cm { color: #898989; }
.dt-row .dots { color: var(--dt-dim); margin: 0 2px; padding: 0 3px; border-radius: 3px; background: rgba(255,255,255,0.08); }
.dt-row.more { color: var(--dt-dim); font-style: italic; }
.dt-row.hidden-el { opacity: .5; }
.dt-row .ar { position: absolute; width: 14px; height: 18px; margin-left: -14px; cursor: pointer; }
.dt-row .ar::before { content: ""; position: absolute; left: 4px; top: 5px; border: 4px solid transparent; border-left: 6px solid #9aa0a6; border-right: 0; transition: transform .1s; }
.dt-row .ar.open::before { transform: rotate(90deg); transform-origin: 3px 4px; }
.dt-editor { display: block; width: calc(100% - 24px); min-height: 60px; margin: 2px 8px 2px 0; padding: 4px 6px; border: 1px solid #7cacf8; border-radius: 3px; background: #121315; color: var(--dt-text); font: 12px/18px Menlo, Consolas, monospace; outline: none; resize: vertical; white-space: pre; }
.dt-crumbs { flex: none; display: flex; gap: 0; height: 24px; padding: 0 4px; overflow-x: auto; border-top: 1px solid var(--dt-line); scrollbar-width: none; }
.dt-crumbs::-webkit-scrollbar { display: none; }
.dt-crumbs button { flex: none; padding: 0 6px; border: 0; background: transparent; color: var(--dt-dim); font: 11.5px Menlo, Consolas, monospace; cursor: pointer; }
.dt-crumbs button:hover { color: var(--dt-text); background: rgba(255,255,255,0.06); }
.dt-crumbs button.on { color: #5db0d7; }
.dt-side { flex: none; width: 36%; min-width: 220px; max-width: 460px; display: flex; flex-direction: column; }
.dt-subtabs { flex: none; display: flex; height: 28px; border-bottom: 1px solid var(--dt-line); }
.dt-subtabs button { position: relative; padding: 0 12px; border: 0; background: transparent; color: var(--dt-dim); font: inherit; cursor: pointer; }
.dt-subtabs button:hover { color: var(--dt-text); }
.dt-subtabs button[aria-selected="true"] { color: var(--dt-text); }
.dt-subtabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #7cacf8; }
.dt-sub { flex: 1; min-height: 0; overflow: auto; font: 12px/18px Menlo, Consolas, monospace; }
.dt-sub[hidden] { display: none; }
.dt-note { padding: 10px; color: var(--dt-dim); font-family: "Segoe UI", system-ui, sans-serif; }
.dt-rule { padding: 6px 10px; border-bottom: 1px solid var(--dt-line); }
.dt-rule .sel { color: #e3e3e3; }
.dt-rule .src { float: right; color: var(--dt-dim); font-size: 11px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decl { padding-left: 16px; overflow-wrap: anywhere; }
.decl[hidden] { display: none; }
.decl .pn { color: #5db0d7; }
.decl .pv { color: #e3e3e3; outline: none; border-radius: 2px; }
.decl .pv:not(.ro):hover { box-shadow: 0 0 0 1px var(--dt-line); }
.decl .pv:focus { box-shadow: 0 0 0 1px #7cacf8; background: #121315; }
.dt-inline { display: block; width: 100%; min-height: 22px; margin: 2px 0; padding: 2px 6px 2px 16px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #e3e3e3; font: inherit; outline: none; resize: vertical; }
.dt-inline:hover { border-color: var(--dt-line); }
.dt-inline:focus { border-color: #7cacf8; background: #121315; }
.dt-props { padding: 0 0 8px; }
.dt-props .decl { padding-left: 10px; }
.dt-box { margin: 10px auto 4px; width: max-content; font-size: 11px; text-align: center; color: #1e1f22; font-family: "Segoe UI", system-ui, sans-serif; }
.dt-box > div, .dt-box div div { position: relative; padding: 18px 26px; border: 1px dashed rgba(0,0,0,0.5); }
.dt-box .bm-m { background: #f9cc9d; }
.dt-box .bm-b { background: #fddd9b; border-style: solid; border-color: #000; }
.dt-box .bm-p { background: #c3d08b; }
.dt-box .bm-c { padding: 4px 10px; background: #8cb6c0; border: 1px solid #555; min-width: 90px; }
.dt-box .lb { position: absolute; left: 4px; top: 1px; font-size: 10px; }
.dt-box .t, .dt-box .b { position: absolute; left: 0; right: 0; }
.dt-box .t { top: 2px; } .dt-box .b { bottom: 2px; }
.dt-box .l, .dt-box .r { position: absolute; top: 50%; transform: translateY(-50%); }
.dt-box .l { left: 6px; } .dt-box .r { right: 6px; }
.dt-console { flex-direction: column; }
.dt-log { flex: 1; min-height: 0; overflow: auto; font: 12px/18px Menlo, Consolas, monospace; }
.dt-entry { display: flex; gap: 6px; padding: 2px 10px 2px 22px; border-bottom: 1px solid #2c2d31; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.dt-entry .gut { position: absolute; left: 8px; color: var(--dt-dim); }
.dt-entry.lv-input .code { color: #a8c7fa; }
.dt-entry.lv-warn { background: #413c26; border-color: #66572a; color: #f2c94c; }
.dt-entry.lv-error { background: #4e3534; border-color: #6b3b3a; color: #f28b82; }
.dt-entry.lv-info { color: #a8c7fa; }
.dt-entry .msg { flex: 1; min-width: 0; }
.v-null { color: #8e8e8e; } .v-str { color: #f29766; } .v-str.raw { color: inherit; } .v-num, .v-bool { color: #9980ff; } .v-sym { color: #f29766; }
.v-fn { color: #c792ea; font-style: italic; } .v-err { color: #f28b82; } .v-node { color: #5db0d7; }
.v-el { color: #5db0d7; cursor: pointer; border-radius: 2px; } .v-el:hover { background: rgba(93,176,215,0.15); }
.v-obj { display: inline; }
.v-head { cursor: pointer; } .v-head i { font-style: italic; color: #e3e3e3; }
.v-head .ar { display: inline-block; width: 0; height: 0; margin-right: 5px; border: 4px solid transparent; border-left: 6px solid #9aa0a6; border-right: 0; vertical-align: 1px; transition: transform .1s; }
.v-head.open .ar { transform: rotate(90deg); }
.v-body { padding-left: 16px; }
.v-kv { white-space: pre-wrap; } .v-key { color: #c792ea; } .v-key.dim { color: var(--dt-dim); }
.dt-prompt { flex: none; position: relative; display: flex; align-items: flex-start; border-top: 1px solid var(--dt-line); }
.dt-prompt span { position: absolute; left: 9px; top: 4px; color: #7cacf8; font: 14px Menlo, monospace; }
.dt-prompt textarea { flex: 1; min-height: 26px; padding: 5px 10px 5px 22px; border: 0; background: transparent; color: var(--dt-text); font: 12px/16px Menlo, Consolas, monospace; outline: none; resize: none; }

/* element highlighter over the page */
.ins-hl { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.ins-hl[hidden] { display: none; }
.ins-hl i { position: absolute; }
.ins-hl .m { background: rgba(246,178,107,0.6); }
.ins-hl .b { background: rgba(255,229,153,0.6); }
.ins-hl .p { background: rgba(147,196,125,0.55); }
.ins-hl .c { background: rgba(111,168,220,0.66); }
.ins-tip { position: absolute; padding: 3px 8px; border-radius: 4px; background: #fff; color: #333; font: 11.5px/1.5 "Segoe UI", system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,0.4); white-space: nowrap; }
.ins-tip b { color: #881280; font-weight: 600; }
.ins-tip span { color: #777; margin-left: 6px; }

.cta.support { margin-top: 12px; }
.cta.support .btn svg { width: 15px; height: 15px; color: #ff6b8a; }

/* ================= minimal black browser (homepage) =================
   Pure black and white: no accent colours, glows or animation. */
body.browser-page.minimal { --tb: #0b0b0b; --strip: #000; --tab-hover: rgba(255,255,255,0.06); background: #000; color: #fff; }
body.browser-page.minimal .bg, body.browser-page.minimal canvas.bg { display: none !important; }
body.browser-page.minimal .views > #bg { background: #000; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body.browser-page.minimal .views:has(> .start[hidden]) > #bg { display: none; }
body.browser-page.minimal .main { background: #000; }
body.browser-page.minimal .browser, body.browser-page.minimal .cmenu button, body.browser-page.minimal .omni input, body.browser-page.minimal .bm { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
body.browser-page.minimal .cbtn { color: #bbb; }
body.browser-page.minimal .cbtn:hover { color: #fff; background: rgba(255,255,255,0.08); }
body.browser-page.minimal .cbtn.on { color: #000; background: #fff; }
body.browser-page.minimal .tabstrip { background: #000; }
body.browser-page.minimal .ctab { color: #888; }
body.browser-page.minimal .ctab:hover:not(.on) { color: #fff; }
body.browser-page.minimal .ctab.on { color: #fff; }
body.browser-page.minimal .ctab::after { background: rgba(255,255,255,0.12); }
body.browser-page.minimal .ctab-fallback, body.browser-page.minimal .ctab-fallback.page { color: #fff; }
body.browser-page.minimal .ctab-spin { border-color: rgba(255,255,255,0.18); border-top-color: #fff; }
body.browser-page.minimal .navbar { background: var(--tb); border-bottom: 0; }
body.browser-page.minimal .omni { background: #161616; border: 1px solid #222; }
body.browser-page.minimal .omni:hover { background: #1a1a1a; }
body.browser-page.minimal .omni.focus { background: #000; border-color: #fff; box-shadow: none; }
body.browser-page.minimal .omni input { color: #fff; }
body.browser-page.minimal .omni input::placeholder { color: #666; }
body.browser-page.minimal .omni-chip, body.browser-page.minimal .omni-chip[data-kind="game"] { color: #aaa; }
body.browser-page.minimal .omni-chip[data-kind="insecure"] { color: #aaa; }
body.browser-page.minimal .omni-star { color: #888; }
body.browser-page.minimal .omni-star.on { color: #fff; }
body.browser-page.minimal .bmbar { background: var(--tb); border-bottom: 1px solid #1c1c1c; }
body.browser-page.minimal .bm { color: #ccc; }
body.browser-page.minimal .bm:hover { background: rgba(255,255,255,0.08); color: #fff; }
body.browser-page.minimal .bm-ic, body.browser-page.minimal .bm-ic.page { color: #fff; }
body.browser-page.minimal .cmenu { background: #0e0e0e; border: 1px solid #262626; box-shadow: 0 12px 36px rgba(0,0,0,0.8); }
body.browser-page.minimal .cmenu button { color: #eee; }
body.browser-page.minimal .cmenu button svg { color: #aaa; }
body.browser-page.minimal .load-bar { background: #fff; box-shadow: none; }
body.browser-page.minimal .views .view.page { background: #000; }

/* new tab page: just the name, a search box and shortcuts */
body.browser-page.minimal .start { background: transparent; display: grid; place-items: center; overflow-y: auto; }
body.browser-page.minimal .start[hidden] { display: none; }
.mstart { width: min(640px, 92%); display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 40px 0 60px; transform: translateY(-6vh); }
.mword { margin: 0; color: #fff; font: 600 clamp(40px, 8vw, 72px)/1 "Inter", system-ui, sans-serif; letter-spacing: -0.04em; }
.msearch { position: relative; width: 100%; display: flex; align-items: center; height: 50px; border: 1px solid #2a2a2a; border-radius: 25px; background: #0d0d0d; transition: border-color .15s; }
.msearch:focus-within { border-color: #fff; }
.msearch svg { position: absolute; left: 18px; width: 18px; height: 18px; color: #777; }
.msearch input { flex: 1; height: 100%; padding: 0 20px 0 48px; border: 0; background: transparent; color: #fff; font: 400 15px "Inter", system-ui, sans-serif; outline: none; }
.msearch input::placeholder { color: #666; }
.mquick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mquick button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; border: 1px solid #262626; border-radius: 16px; background: transparent; color: #bbb; font: 500 13px "Inter", system-ui, sans-serif; cursor: pointer; transition: color .15s, border-color .15s; }
.mquick button:hover { color: #fff; border-color: #fff; }
.msupport { color: #555; font: 400 12px "Inter", system-ui, sans-serif; text-decoration: none; }
.msupport:hover { color: #fff; text-decoration: underline; }
body.browser-page.minimal .proxy-note { width: 100%; margin: 0 !important; border-color: #333; background: #0d0d0d; color: #bbb !important; }
.mquick button svg { width: 16px; height: 16px; flex: none; }
.mquick button img.fav { width: 16px; height: 16px; flex: none; object-fit: contain; }

/* ad spots */
.ad-slot { display: flex; justify-content: center; width: 100%; min-height: 50px; }
.ad-slot:empty { display: none; }
.ad-top { margin: 4px 0 18px; }
.ad-native { width: 100%; }
.mstart .ad-slot { width: 728px; max-width: 96vw; flex: none; }
.ad-tall { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 160px; height: 300px; }
.ad-tall-left { right: auto; left: 24px; }
.ad-bottom { margin: 22px 0 8px; }
.content > .ad-native { margin: 6px 0 18px; }
.player-ad { position: relative; display: flex; justify-content: center; align-items: center; padding: 6px 34px; border-top: 1px solid var(--line); background: var(--panel-solid); }
.player-ad[hidden] { display: none; }
.player-ad .ad-slot { width: auto; min-height: 50px; }
.player-ad-x { position: absolute; right: 8px; top: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.08); color: #aaa; font-size: 16px; line-height: 22px; cursor: pointer; }
.player-ad-x:hover { background: rgba(255,255,255,0.18); color: #fff; }
@media (max-width: 1099px) { .ad-tall { display: none; } }

/* galaxy search bar: white on black, soft light that turns slowly around the edge */
.gsearch { position: relative; width: 100%; height: 54px; isolation: isolate; }
.gsearch > div { position: absolute; overflow: hidden; border-radius: 15px; pointer-events: none; z-index: 0; }
.gsearch > div::before { content: ""; position: absolute; top: 50%; left: 50%; width: 1400px; height: 1400px; background-repeat: no-repeat; transition: transform 2s ease; }
.g-nebula { inset: -22px -16px; filter: blur(28px); opacity: .18; }
.g-nebula::before { transform: translate(-50%,-50%) rotate(60deg); background-image: conic-gradient(#000, #fff 5%, #000 38%, #000 50%, #fff 60%, #000 87%); }
.g-starfield { inset: -4px; filter: blur(3px); opacity: .35; }
.g-starfield::before { transform: translate(-50%,-50%) rotate(82deg); background-image: conic-gradient(transparent, #555, transparent 10%, transparent 50%, #777, transparent 60%); }
.g-dust { inset: -2px; filter: blur(2px); opacity: .45; }
.g-dust::before { transform: translate(-50%,-50%) rotate(83deg); background-image: conic-gradient(transparent 0%, #fff, transparent 8%, transparent 50%, #ddd, transparent 58%); }
.g-ring { inset: -1px; filter: blur(.4px); }
.g-ring::before { transform: translate(-50%,-50%) rotate(70deg); background-image: conic-gradient(#1a1a1a, #bbb 5%, #1a1a1a 14%, #1a1a1a 50%, #999 60%, #1a1a1a 64%); }
/* hover: the light shifts a little; focus: one slow lap */
.gsearch:hover .g-nebula::before { transform: translate(-50%,-50%) rotate(-120deg); }
.gsearch:hover .g-starfield::before { transform: translate(-50%,-50%) rotate(-98deg); }
.gsearch:hover .g-dust::before { transform: translate(-50%,-50%) rotate(-97deg); }
.gsearch:hover .g-ring::before { transform: translate(-50%,-50%) rotate(-110deg); }
.gsearch:focus-within .g-nebula::before { transform: translate(-50%,-50%) rotate(420deg); transition-duration: 4s; }
.gsearch:focus-within .g-starfield::before { transform: translate(-50%,-50%) rotate(442deg); transition-duration: 4s; }
.gsearch:focus-within .g-dust::before { transform: translate(-50%,-50%) rotate(443deg); transition-duration: 4s; }
.gsearch:focus-within .g-ring::before { transform: translate(-50%,-50%) rotate(430deg); transition-duration: 4s; }

.gsearch .msearch { position: absolute; inset: 1px; z-index: 1; width: auto; height: auto; border: 0; border-radius: 14px; background: #050505; }
.gsearch .msearch:focus-within { border: 0; }
.gsearch .msearch > svg { left: 18px; color: #888; }
.gsearch .msearch input { padding: 0 60px 0 50px; font-size: 16px; color: #fff; }
.gsearch .msearch input::placeholder { color: #6a6a6a; }
.g-glow { position: absolute; left: 8px; top: 12px; width: 30px; height: 20px; background: #fff; filter: blur(20px); opacity: .25; pointer-events: none; transition: opacity 2s; }
.gsearch:hover .g-glow { opacity: 0; }
.g-go { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #ddd; cursor: pointer; isolation: isolate; overflow: hidden; }
.g-go::after { content: ""; position: absolute; inset: 1px; border-radius: 9px; background: linear-gradient(180deg, #1c1c1c, #050505, #2a2a2a); z-index: -1; }
.g-go-ring { position: absolute; inset: 0; z-index: -2; overflow: hidden; border-radius: 10px; }
.g-go-ring::before { content: ""; position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; transform: translate(-50%,-50%) rotate(90deg);
  background-image: conic-gradient(transparent, rgba(255,255,255,.55), transparent 50%, transparent 50%, rgba(255,255,255,.4), transparent 100%); animation: g-spin 9s linear infinite; }
.g-go svg { position: relative; width: 17px !important; height: 17px !important; left: auto !important; color: inherit !important; }
.g-go:hover { color: #fff; }
@keyframes g-spin { to { transform: translate(-50%,-50%) rotate(450deg); } }
@media (prefers-reduced-motion: reduce) { .g-go-ring::before { animation: none; } .gsearch > div::before { transition: none; } }

/* "lunacy" title: smooth white-to-grey gradient */
.mword {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f4 28%, #d2d2d2 55%, #a8a8a8 80%, #8c8c8c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: 0.08em; /* keeps the "y" tail inside the gradient */
  filter: drop-shadow(0 2px 18px rgba(255,255,255,0.06));
}

/* starfield background, white on black */
#bg.starbg { overflow: hidden; background: radial-gradient(ellipse at bottom, #141414 0%, #000 70%); }
#bg.starbg .stars { position: absolute; top: 0; left: 0; background: transparent; border-radius: 50%; animation: animStar calc(var(--dur) * var(--speed, 1)) linear infinite; will-change: transform; }
#bg.starbg .stars-copy { position: absolute; top: 2000px; left: 0; background: transparent; border-radius: 50%; }
#bg.starbg.paused .stars { animation-play-state: paused; }
@keyframes animStar { from { transform: translateY(0); } to { transform: translateY(-2000px); } }
@media (prefers-reduced-motion: reduce) { #bg.starbg .stars { animation: none; } }
body.browser-page.minimal .views > #bg.starbg { background: radial-gradient(ellipse at bottom, #141414 0%, #000 70%); }

/* ================= monochrome sidebar + settings (white on black) ================= */
body:not(.browser-page) .sidebar {
  background: linear-gradient(180deg, rgba(10,10,10,0.72), rgba(0,0,0,0.82));
  border-right: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 20px 14px 16px; gap: 20px;
}
body:not(.browser-page) .sidebar::before { background: radial-gradient(90% 60% at 30% 0%, rgba(255,255,255,0.07), transparent 70%); }
body:not(.browser-page) .brand { font-weight: 650; letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 0%, #e6e6e6 45%, #9a9a9a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body:not(.browser-page) .brand img { box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 0 16px rgba(255,255,255,0.08); }

body:not(.browser-page) .side-search input { height: 38px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; transition: border-color .2s, background .2s, box-shadow .2s; }
body:not(.browser-page) .side-search input:hover { border-color: rgba(255,255,255,0.16); }
body:not(.browser-page) .side-search input:focus { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.05); box-shadow: 0 0 0 3px rgba(255,255,255,0.06), 0 0 24px -6px rgba(255,255,255,0.18); }
body:not(.browser-page) .side-search kbd { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); }

body:not(.browser-page) .side-nav { gap: 3px; }
body:not(.browser-page) .side-link { height: 38px; padding: 0 12px; border-radius: 10px; color: #8d8d8d; transition: color .18s, background .18s, transform .18s; }
body:not(.browser-page) .side-link svg { opacity: .85; transition: opacity .18s; }
body:not(.browser-page) .side-link:hover { color: #fff; background: rgba(255,255,255,0.045); }
body:not(.browser-page) .side-link:hover svg { opacity: 1; }
body:not(.browser-page) .side-link[aria-current="page"] { color: #fff; background: linear-gradient(90deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
body:not(.browser-page) .side-link[aria-current="page"]::before { left: -14px; top: 10px; bottom: 10px; width: 3px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.6); }
body:not(.browser-page) .side-link[aria-current="page"] svg { opacity: 1; }

body:not(.browser-page) .side-bottom { gap: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); }
body:not(.browser-page) .sidebar .btn-moving { height: 40px; border-radius: 11px; color: #fff;
  background: linear-gradient(180deg, #141414, #050505) padding-box,
              conic-gradient(from var(--a), rgba(255,255,255,0.10) 0deg, rgba(255,255,255,0.10) 260deg, rgba(255,255,255,0.55) 315deg, #fff 335deg, rgba(255,255,255,0.10) 360deg) border-box !important;
  box-shadow: 0 8px 24px -12px rgba(255,255,255,0.25) !important; animation-duration: 6s; }
body:not(.browser-page) .sidebar .btn-moving:hover { background: linear-gradient(180deg, #1c1c1c, #080808) padding-box,
              conic-gradient(from var(--a), rgba(255,255,255,0.16) 0deg, rgba(255,255,255,0.16) 260deg, rgba(255,255,255,0.7) 315deg, #fff 335deg, rgba(255,255,255,0.16) 360deg) border-box !important; }
body:not(.browser-page) .side-legal, body:not(.browser-page) .side-legal a { color: #5c5c5c; }
body:not(.browser-page) .side-legal a { transition: color .15s; }
body:not(.browser-page) .side-legal a:hover { color: #fff; }

/* settings page */
.settings-page .page-head h1 { background: linear-gradient(180deg, #fff 0%, #ededed 40%, #9c9c9c 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
.settings-page .page-head p { color: #8a8a8a; }
.settings-page .settings { gap: 30px; }
.settings-page .group h2 { color: #6b6b6b; font-size: 11.5px; letter-spacing: 0.09em; margin: 0 0 10px 4px; }
.settings-page .panel { background: linear-gradient(180deg, rgba(14,14,14,0.78), rgba(6,6,6,0.82)); border: 1px solid rgba(255,255,255,0.075); border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -30px rgba(0,0,0,0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.settings-page .row { padding: 15px 18px; transition: background .15s; }
.settings-page .row:hover { background: rgba(255,255,255,0.018); }
.settings-page .row + .row { border-top-color: rgba(255,255,255,0.055); }
.settings-page .row .lbl b { color: #f2f2f2; font-weight: 550; }
.settings-page .row .lbl span { color: #6f6f6f; }

.settings-page .switch { width: 40px; height: 24px; }
.settings-page .switch i { border-radius: 999px; background: rgba(255,255,255,0.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.settings-page .switch i::after { top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9a9a9a; box-shadow: 0 1px 3px rgba(0,0,0,.5); transition: transform .22s cubic-bezier(.3,.7,.4,1), background .2s; }
.settings-page .switch input:checked + i { background: #fff; box-shadow: 0 0 16px -4px rgba(255,255,255,0.55); }
.settings-page .switch input:checked + i::after { transform: translateX(16px); background: #000; }

.settings-page .btn { border-radius: 10px; border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); color: #e8e8e8; }
.settings-page .btn:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.07); color: #fff; }
.settings-page .btn.primary { background: linear-gradient(180deg, #fff, #d9d9d9); color: #000; border-color: #fff; box-shadow: 0 8px 22px -10px rgba(255,255,255,0.45), inset 0 1px 0 #fff; }
.settings-page .btn.primary:hover { background: #fff; box-shadow: 0 10px 28px -8px rgba(255,255,255,0.55); }
.settings-page .btn.ghost { background: transparent; border-color: transparent; color: #8a8a8a; }

.settings-page .seg-ctl { border-color: rgba(255,255,255,0.1); border-radius: 10px; background: rgba(255,255,255,0.025); }
.settings-page .seg-ctl button { border-radius: 7px; color: #8a8a8a; transition: color .15s, background .15s; }
.settings-page .seg-ctl button[aria-pressed="true"] { background: #fff; color: #000; box-shadow: 0 4px 14px -6px rgba(255,255,255,0.5); }

.settings-page .input { border-radius: 10px; border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.settings-page .input:focus { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.05); box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }
.settings-page select.input option { background: #0a0a0a; color: #fff; }

.settings-page .themes { gap: 10px; padding: 16px 18px; }
.settings-page .theme-opt { border-radius: 12px; border-color: rgba(255,255,255,0.07); background: rgba(255,255,255,0.02); color: #8a8a8a; transition: border-color .15s, color .15s, transform .15s; }
.settings-page .theme-opt:hover { color: #fff; border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.settings-page .theme-opt[aria-pressed="true"] { color: #fff; border-color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.05); box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 8px 24px -14px rgba(255,255,255,0.4); }
.settings-page .swatch { border-radius: 8px; }
.settings-page .note { border-radius: 10px; border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.025); color: #9a9a9a; }
.settings-page .note.ok { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.05); color: #fff; }
.settings-page .modal-box { background: linear-gradient(180deg, #111, #060606); border-color: rgba(255,255,255,0.1); }
.settings-page .row[hidden] { display: none; }
.settings-page .group[hidden] { display: none; }

/* ================= new settings ================= */
/* favorite star on game cards */
.fav-star { position: absolute; top: 8px; right: 8px; z-index: 6; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.85); transition: opacity .18s, transform .18s, background .18s; cursor: pointer; }
.fav-star svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.card:hover .fav-star, .card:focus-visible .fav-star, .fav-star.on { opacity: 1; transform: scale(1); }
.fav-star:hover { background: rgba(0,0,0,0.8); transform: scale(1.08); }
.fav-star.on svg { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,0.6)); }
@media (hover: none) { .fav-star { opacity: .9; transform: none; } }

/* recently played row on Activities */
.recent-row { margin: 0 0 22px; }
.recent-row[hidden] { display: none; }
.recent-head h2 { margin: 0 0 10px 2px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; }
.recent-row .rail { grid-auto-columns: 178px; }

/* settings: stacked rows, shortcuts editor, ranges */
.settings-page .row.stack { flex-direction: column; align-items: stretch; gap: 12px; }
.settings-page .ctl.wrap { flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.sc-list { display: grid; gap: 8px; }
.sc-row { display: grid; grid-template-columns: 20px minmax(90px, 1fr) minmax(140px, 2fr) 32px; gap: 8px; align-items: center; }
.sc-row img { width: 18px; height: 18px; border-radius: 4px; }
.sc-row .input { width: 100% !important; height: 34px; }
.sc-row [data-rm] { width: 32px; height: 32px; color: #777; }
.sc-row [data-rm]:hover { color: #fff; }
.sc-empty { color: #6f6f6f; font-size: 12.5px; padding: 4px 2px; }
.sc-actions { display: flex; gap: 8px; }
.settings-page .range { -webkit-appearance: none; appearance: none; width: 170px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.14); outline: none; cursor: pointer; }
.settings-page .range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.45); }
.settings-page .range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.range-val { min-width: 18px; text-align: right; color: #aaa; font: 500 12.5px var(--font); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .sc-row { grid-template-columns: 20px 1fr 32px; } .sc-row [data-k="url"] { grid-column: 2 / 3; } .settings-page .ctl.wrap { max-width: none; } }

/* shortcut buttons built from settings */
.mquick button span { white-space: nowrap; }
.mquick[hidden] { display: none; }

/* particles background canvas */
#bg.starbg canvas.particles { position: absolute; inset: 0; display: block; }

/* text size (Activities and Settings) */
html[data-text="small"] body:not(.browser-page) { zoom: 0.9; }
html[data-text="large"] body:not(.browser-page) { zoom: 1.12; }

/* reduce motion: everything still */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
