:root {
  --accent: #2f7dff;
  --accent-2: #1d5fe0;
  --accent-soft: color-mix(in srgb, var(--accent) 15%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);
  --bg: #080b11;
  --bg-2: #0c1017;
  --panel: rgba(18, 22, 31, var(--panel-alpha, .82));
  --panel-solid: #12161f;
  --panel-2: rgba(255, 255, 255, .03);
  --line: rgba(255, 255, 255, .065);
  --line-2: rgba(255, 255, 255, .11);
  --text: #eef0f7;
  --muted: #9aa1b8;
  --faint: #636b85;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --info: #60a5fa;
  --radius: var(--user-radius, 18px);
  --radius-sm: calc(var(--radius) * .6);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --pad: 22px;
  --font: var(--user-font, 'Inter'), system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: var(--user-display, 'Outfit'), var(--font);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --blur: 18px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef1f8;
  --bg-2: #e5e9f3;
  --panel: rgba(255, 255, 255, var(--panel-alpha, .86));
  --panel-solid: #ffffff;
  --panel-2: rgba(10, 20, 50, .035);
  --line: rgba(10, 20, 50, .08);
  --line-2: rgba(10, 20, 50, .14);
  --text: #121729;
  --muted: #5a6380;
  --faint: #8a92aa;
  --shadow: 0 16px 40px rgba(20, 30, 60, .1);
  color-scheme: light;
}

:root[data-density="compact"] { --pad: 15px; }
:root[data-glass="off"] { --blur: 0px; --panel-alpha: 1; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { transition: none !important; animation: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:root[data-size="large"] body { font-size: 15.5px; }
:root[data-size="small"] body { font-size: 13px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* background */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop .aurora { position: absolute; inset: -20%; filter: blur(60px); opacity: var(--aurora, .55); }
.backdrop .aurora span { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; mix-blend-mode: screen; animation: drift 26s ease-in-out infinite alternate; }
.backdrop .aurora span:nth-child(1) { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, transparent), transparent 65%); left: -5%; top: -10%; }
.backdrop .aurora span:nth-child(2) { background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 65%); right: -10%; top: 20%; animation-duration: 32s; animation-delay: -8s; }
.backdrop .aurora span:nth-child(3) { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, #2563eb 30%), transparent 65%); left: 25%; bottom: -25%; animation-duration: 38s; animation-delay: -15s; }
:root[data-theme="light"] .backdrop .aurora span { mix-blend-mode: multiply; opacity: .45; }
.backdrop .image { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.backdrop .shade { position: absolute; inset: 0; background: var(--bg); opacity: var(--dim, .55); }
.backdrop .grain { position: absolute; inset: 0; opacity: .035; background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px); background-size: 3px 3px; }
.backdrop .grid { position: absolute; inset: 0; opacity: var(--grid, 0); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0, #000 30%, transparent 75%); }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 6%) scale(1.15); } 100% { transform: translate(-6%, 10%) scale(.95); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 3px 0 var(--accent); } 100% { background: transparent; box-shadow: inset 0 0 transparent; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }

.boot { height: 100vh; display: grid; place-items: center; }
.boot svg { width: 58px; height: 58px; color: var(--accent); animation: spin 1s linear infinite; }

.logo-mark { width: 30px; height: 30px; color: var(--text); flex: none; }
.brand { display: flex; align-items: center; gap: 11px; font: 800 15px var(--display); letter-spacing: .04em; color: var(--text); }
.brand b { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.glass { background: var(--panel); backdrop-filter: blur(var(--blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); border: 1px solid var(--line); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-hero { padding: 54px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.login-hero h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; margin: 0 0 20px; }
.login-hero h1 em { font-style: normal; }
.login-hero p { color: var(--muted); font-size: 16.5px; max-width: 540px; margin: 0; }
.login-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 600px; margin-top: 34px; }
.login-point { display: flex; gap: 13px; padding: 16px; border-radius: var(--radius); animation: rise .5s ease both; }
.login-point .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.login-point svg { width: 19px; height: 19px; }
.login-point b { display: block; font-size: 14px; }
.login-point span { color: var(--muted); font-size: 12.5px; }
.login-side { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(430px, 100%); padding: 46px 36px 30px; border-radius: 26px; box-shadow: var(--shadow); text-align: center; animation: pop .45s ease; position: relative; overflow: hidden; }
.login-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.login-card .logo-mark { width: 78px; height: 78px; margin: 0 auto 18px; color: var(--accent); filter: drop-shadow(0 0 24px var(--accent-line)); animation: float 5s ease-in-out infinite; }
.login-card h2 { margin: 0; font-size: 27px; letter-spacing: .05em; }
.login-card p { color: var(--muted); margin: 6px 0 28px; }
.login-card .fine { margin: 22px 0 0; font-size: 12px; color: var(--faint); }
.btn.btn-discord { width: 100%; justify-content: center; height: 50px; font-size: 15px; border-radius: 999px; background: #5865f2; border-color: #5865f2; color: #fff; box-shadow: 0 10px 30px rgba(88, 101, 242, .35); }
.btn.btn-discord:hover { background: #4752c4; }
.login-error { margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); font-size: 13px; text-align: left; }
.stats-strip { display: flex; gap: 28px; flex-wrap: wrap; }
.stats-strip b { display: block; font: 800 26px var(--display); }
.stats-strip span { color: var(--muted); font-size: 12.5px; }

/* chooser */
.chooser { min-height: 100vh; padding: 36px 24px 60px; display: flex; flex-direction: column; align-items: center; }
.chooser-top { width: min(1120px, 100%); display: flex; justify-content: space-between; align-items: center; margin-bottom: 54px; }
.chooser h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 8px; text-align: center; }
.chooser > p { color: var(--muted); margin: 0 0 36px; text-align: center; max-width: 560px; }
.portal-grid { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.portal-card { position: relative; text-align: left; border-radius: 24px; padding: 28px; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; animation: rise .45s ease both; overflow: hidden; }
.portal-card::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); transition: transform .3s; }
.portal-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 24px 60px color-mix(in srgb, var(--accent) 16%, transparent); }
.portal-card:hover::after { transform: scale(1.3); }
.portal-card .icon-box { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 20px; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.portal-card .icon-box svg { width: 26px; height: 26px; }
.portal-card h3 { margin: 0 0 6px; font-size: 21px; }
.portal-card p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.portal-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.portal-card li { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.portal-card .go { position: absolute; right: 22px; top: 26px; color: var(--faint); transition: transform .2s, color .2s; }
.portal-card:hover .go { transform: translateX(4px); color: var(--accent); }

/* shell */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; gap: 14px; z-index: 30; border-width: 0 1px 0 0; border-radius: 0; }
.sidebar .brand { padding: 4px 8px 4px; text-decoration: none; }
.switcher { display: grid; grid-template-columns: repeat(var(--count, 2), 1fr); gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px; }
.switcher button { border: 0; background: transparent; padding: 8px 4px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.switcher button:hover { color: var(--text); }
.switcher button.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; }
.nav-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 14px 11px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; color: var(--muted); font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); }
.nav a.on::before { content: ''; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav a.on svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 10.5px; font-weight: 800; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.me-card img { width: 38px; height: 38px; border-radius: 50%; }
.me-card .who { min-width: 0; flex: 1; }
.me-card b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; flex: none; position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-width: 0 0 1px; border-radius: 0; }
.topbar .menu { display: none; }
.search { position: relative; flex: 1; max-width: 460px; display: flex; align-items: center; gap: 9px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--faint); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search kbd { font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.topbar .spacer { flex: 1; }
.online-stack { display: flex; align-items: center; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); gap: 8px; }
.online-stack .faces { display: flex; }
.online-stack img, .online-stack .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg-2); margin-left: -8px; }
.online-stack .faces > :first-child { margin-left: 0; }
.online-stack span { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.shift-pill { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: border-color .15s; }
.shift-pill:hover { border-color: var(--accent-line); }
.shift-pill .ring { width: 30px; height: 30px; }
.shift-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.shift-pill.on .dot { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 20%, transparent); }
.shift-pill.break .dot { background: var(--warn); }
.content { padding: 28px; max-width: 1480px; width: 100%; animation: rise .35s ease; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .title { display: flex; gap: 14px; align-items: center; }
.page-head .title .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; flex: none; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 30%, transparent); }
.page-head .title .ic svg { width: 22px; height: 22px; }
.page-head h1 { margin: 0; font-size: 26px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* building blocks */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tri { display: grid; gap: 16px; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr) minmax(300px, 1.1fr); align-items: start; }
.span2 { grid-column: span 2; }
.card { border-radius: var(--radius); padding: var(--pad); min-width: 0; position: relative; }
.card.accent-top::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { width: 17px; height: 17px; color: var(--accent); }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.stat { display: flex; gap: 14px; align-items: center; transition: transform .2s, border-color .2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.stat .icon-box { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.stat .icon-box svg { width: 22px; height: 22px; }
.stat .value { font: 800 25px/1.1 var(--display); letter-spacing: -.01em; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.lg { gap: 16px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.flash { animation: flash 1.8s ease; }

.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 30px 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 16px; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 14%, transparent) 55%, transparent); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 36px); }
.hero p { margin: 0; color: var(--muted); font-size: 15px; max-width: 620px; }
.hero .row { margin-top: 18px; }
.ring-wrap { position: relative; width: 150px; height: 150px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .track { stroke: var(--line-2); }
.ring-wrap .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-wrap .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-wrap .center b { display: block; font: 800 24px var(--display); }
.ring-wrap .center span { font-size: 11.5px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; text-decoration: none; }
.btn:hover { border-color: var(--accent-line); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.danger { background: color-mix(in srgb, var(--bad) 14%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.btn.good { background: color-mix(in srgb, var(--good) 14%, transparent); border-color: color-mix(in srgb, var(--good) 35%, transparent); color: var(--good); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.xl { height: 64px; padding: 0 28px; font-size: 17px; border-radius: 18px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); border-color: color-mix(in srgb, var(--good) 28%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.badge.info { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.badge.accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; animation: pulse 1.6s infinite; flex: none; }

.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field small { color: var(--faint); font-size: 11.5px; }
.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line-2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .sel.open .sel-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--faint); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.check .box::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.check input:checked + .box { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.check input:checked + .box::after { transform: translateX(16px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; padding: 3px; cursor: pointer; }

/* custom select */
.sel { position: relative; }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; }
.sel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn span.placeholder { color: var(--faint); }
.sel-btn svg { width: 16px; height: 16px; color: var(--faint); flex: none; transition: transform .2s; }
.sel.open .sel-btn svg { transform: rotate(180deg); }
.menu-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 80; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .14s ease; }
.menu-pop .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; color: var(--text); font-weight: 600; }
.menu-pop .opt:hover, .menu-pop .opt.active { background: var(--accent-soft); }
.menu-pop .opt.on { color: var(--accent); }
.menu-pop .opt .tick { margin-left: auto; width: 16px; height: 16px; color: var(--accent); }
.menu-pop .opt img, .menu-pop .opt .avatar-fallback { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.menu-pop .opt small { display: block; font-weight: 500; color: var(--faint); font-size: 11.5px; }
.menu-pop .group { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; display: flex; align-items: center; gap: 6px; }
.menu-pop .group svg { width: 13px; height: 13px; color: var(--accent); }
.menu-pop .none { padding: 14px; text-align: center; color: var(--faint); font-size: 12.5px; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 6px 8px; height: auto; cursor: pointer; align-items: center; }
.chips-input .chip { display: inline-flex; align-items: center; gap: 4px; }

.table-wrap { overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--panel-2); }
tr.click { cursor: pointer; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); object-fit: cover; flex: none; }
.avatar-fallback { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.person b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person span { display: block; font-size: 12px; color: var(--muted); }
.av-dot { position: relative; flex: none; }
.av-dot::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--good); border: 2px solid var(--panel-solid); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-item .li-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); flex: none; }
.list-item .li-icon svg { width: 17px; height: 17px; }
.list-item .li-icon.accent { background: var(--accent-soft); color: var(--accent); }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-meta { color: var(--faint); font-size: 12px; white-space: nowrap; }

.feed { display: flex; flex-direction: column; gap: 8px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; }
.feed-item .fi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.feed-item .fi-ic svg { width: 15px; height: 15px; }
.feed-item .fi-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feed-item time { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.feed-item.kill .fi-ic { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.feed-item.join .fi-ic { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.feed-item.leave .fi-ic { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.feed-item.call .fi-ic { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.cmd { font-family: var(--mono); font-size: 12px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

.empty { text-align: center; padding: 38px 16px; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--faint); margin: 0 auto 10px; display: block; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-family: var(--display); font-size: 15px; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.notice svg { width: 19px; height: 19px; flex: none; color: var(--accent); margin-top: 1px; }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.notice.warn svg { color: var(--warn); }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.notice.bad svg { color: var(--bad); }
.notice.good { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 8%, var(--panel)); }
.notice.good svg { color: var(--good); }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--panel-2), var(--line-2), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 14px; }

.record { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--panel-2); display: flex; gap: 14px; transition: border-color .2s; }
.record:hover { border-color: var(--line-2); }
.record .bar { width: 4px; border-radius: 4px; background: var(--faint); flex: none; }
.record.inf .bar { background: var(--bad); }
.record.prm .bar { background: var(--good); }
.record.rst .bar { background: var(--info); }
.record h4 { margin: 0; font-size: 15px; }
.record .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 10px; font-size: 13px; }
.record .kv dt { color: var(--muted); }
.record .kv dd { margin: 0; overflow-wrap: anywhere; }

.punish { border-radius: 16px; padding: 15px; background: var(--panel-2); border: 1px solid var(--line); }
.punish .top { display: flex; align-items: center; gap: 10px; }
.punish h4 { margin: 10px 0 6px; font-size: 17px; }
.punish dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 13px; }
.punish dt { color: var(--muted); font-weight: 600; }
.punish dd { margin: 0; overflow-wrap: anywhere; }
.punish .foot { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 12px; }
.action-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.action-pills button { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.action-pills button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.quick { display: flex; flex-wrap: wrap; gap: 5px; }
.quick button { border: 1px dashed var(--line-2); background: transparent; color: var(--muted); padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.quick button:hover { border-color: var(--accent); color: var(--accent); }

.chart { width: 100%; height: 220px; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10.5px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#chartFill); }
.chart .dot { fill: var(--accent); stroke: var(--panel-solid); stroke-width: 2; }
.bars-v { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bars-v .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars-v .b { width: 100%; max-width: 30px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); min-height: 3px; opacity: .9; transition: height .5s; }
.bars-v .b.zero { background: var(--line-2); }
.bars-v .col span { font-size: 10.5px; color: var(--faint); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .bar-row { display: grid; grid-template-columns: 110px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.bars .track { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 99px; background: var(--accent); }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .4s; }
.progress.good > div { background: var(--good); }

.achievements { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ach { padding: 14px 10px; border-radius: 16px; text-align: center; background: var(--panel-2); border: 1px solid var(--line); }
.ach .medal { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.ach .medal svg { width: 22px; height: 22px; }
.ach.locked { opacity: .45; filter: grayscale(1); }
.ach b { display: block; font-size: 12.5px; }
.ach span { font-size: 11px; color: var(--faint); }
.podium { display: flex; flex-direction: column; gap: 8px; }
.podium .pod { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.podium .place { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--line); }
.podium .pod:nth-child(1) .place { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1206; }
.podium .pod:nth-child(2) .place { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.podium .pod:nth-child(3) .place { background: linear-gradient(135deg, #f97316, #b45309); color: #fff; }

.timer-card { text-align: center; padding: 34px var(--pad); }
.timer { font: 800 60px/1 var(--mono); letter-spacing: -.03em; margin: 10px 0 8px; }
.timer.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.map-wrap { position: relative; overflow: hidden; border-radius: 18px; background: #0b1220; height: 680px; border: 1px solid var(--line); cursor: grab; touch-action: none; }
.map-wrap.dragging { cursor: grabbing; }
.map-wrap.calibrating { cursor: crosshair; }
.map-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.map-layer img { width: 5355px; height: 5355px; max-width: none; user-select: none; -webkit-user-drag: none; }
.map-pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); cursor: pointer; transition: left .9s linear, top .9s linear; }
.map-pin.sel { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent), 0 2px 10px rgba(0, 0, 0, .5); z-index: 3; }
.map-pin.call { border-radius: 6px; background: var(--bad); animation: pulse 1.2s infinite; }
.map-pin.cal { background: var(--accent); border-color: #000; border-radius: 4px; width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.map-pin .tag { position: absolute; left: 50%; bottom: 120%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .75); color: #fff; pointer-events: none; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.map-tools .icon-btn { background: var(--panel-solid); border-color: var(--line); }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 4; background: color-mix(in srgb, var(--panel-solid) 92%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 72%; font-size: 12px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map-banner { position: absolute; left: 12px; right: 70px; top: 12px; z-index: 4; }

.chat { display: grid; grid-template-columns: 1fr 260px; height: calc(100vh - 200px); min-height: 460px; padding: 0; overflow: hidden; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.chat-side { border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; }
.msg { display: flex; gap: 12px; padding: 6px 10px; border-radius: 12px; position: relative; }
.msg:hover { background: var(--panel-2); }
.msg:hover .msg-tools { opacity: 1; }
.msg.mention { background: color-mix(in srgb, var(--warn) 9%, transparent); box-shadow: inset 2px 0 var(--warn); }
.msg img.av, .msg .avatar-fallback { width: 38px; height: 38px; border-radius: 50%; flex: none; margin-top: 2px; }
.msg.cont { padding-top: 1px; }
.msg.cont img.av, .msg.cont .avatar-fallback { visibility: hidden; height: 0; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg .meta b { font-size: 13.5px; }
.msg .meta span { font-size: 11px; color: var(--faint); }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .text .at { color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 5px; padding: 0 3px; }
.msg .reply { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 8px; margin-bottom: 3px; }
.msg-tools { position: absolute; right: 10px; top: -10px; opacity: 0; display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--panel-solid); border: 1px solid var(--line-2); transition: opacity .12s; }
.msg-tools button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.msg-tools button:hover { background: var(--panel-2); color: var(--text); }
.msg-tools svg { width: 15px; height: 15px; }
.chat-input { padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input .replying { font-size: 12px; color: var(--muted); padding: 0 4px 8px; display: flex; justify-content: space-between; }
.chat-input form { display: flex; gap: 10px; position: relative; }
.chat-input textarea { flex: 1; resize: none; height: 44px; min-height: 44px; max-height: 140px; padding: 11px 12px; }
.typing { font-size: 12px; color: var(--faint); height: 18px; padding: 0 20px 4px; }

.classroom { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: radial-gradient(600px 300px at 0 0, var(--accent-soft), transparent 70%), var(--panel-solid); border: 1px solid var(--line); }
.stage .slide-body { position: absolute; inset: 0; padding: 5% 6%; display: flex; flex-direction: column; justify-content: center; }
.stage .slide-body h2 { font-size: clamp(20px, 2.6vw, 34px); margin: 4px 0 14px; }
.stage .slide-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: clamp(13px, 1.3vw, 17px); }
.stage .slide-body .scenario { padding: 14px 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: clamp(13px, 1.2vw, 16px); margin-bottom: 12px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage.drawing canvas { cursor: crosshair; }
.stage .kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.prompt-pop { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(560px, 90%); padding: 14px 16px; border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--accent-line); box-shadow: var(--shadow); animation: pop .2s ease; z-index: 3; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px; border-radius: 16px; }
.toolbar .sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.tool { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.tool:hover { background: var(--panel-2); color: var(--text); }
.tool.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.tool svg { width: 18px; height: 18px; }
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch-dot.on { border-color: var(--text); }
.option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 600; text-align: left; width: 100%; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--accent); }
.option.on { border-color: var(--accent); background: var(--accent-soft); }
.option.right { border-color: var(--good); }
.option .key { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-2); font-weight: 800; font-size: 12px; flex: none; }
.waiting-room { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.waiting-room .orb { width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), transparent 70%); animation: spin 2.2s linear infinite; display: grid; place-items: center; }
.waiting-room .orb::after { content: ''; width: 96px; height: 96px; border-radius: 50%; background: var(--bg); }
.code-box { font: 800 46px var(--mono); letter-spacing: .3em; padding: 10px 18px; border-radius: 16px; background: var(--panel-2); border: 1px dashed var(--accent-line); color: var(--accent); text-align: center; }
.code-input { font: 800 28px var(--mono); letter-spacing: .4em; text-align: center; text-transform: uppercase; height: 64px; }
.big-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.big-choice button { padding: 34px 28px; border-radius: 26px; text-align: left; cursor: pointer; color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.big-choice button:hover:not([disabled]) { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 24px 60px color-mix(in srgb, var(--accent) 18%, transparent); }
.big-choice button[disabled] { opacity: .55; cursor: not-allowed; }
.big-choice .ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 18px; box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 35%, transparent); }
.big-choice .ic svg { width: 30px; height: 30px; }
.big-choice h2 { margin: 0 0 6px; font-size: 24px; }
.big-choice p { margin: 0; color: var(--muted); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg) inset; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice-card { padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 700; text-align: left; color: var(--text); transition: border-color .15s; }
.choice-card:hover { border-color: var(--accent-line); }
.choice-card.on { border-color: var(--accent); background: var(--accent-soft); }
.choice-card small { display: block; font-weight: 500; color: var(--muted); margin-top: 3px; }
.preset-card { padding: 0; overflow: hidden; }
.preset-card .pv { height: 70px; }
.preset-card .pv-body { padding: 10px 12px; }
.bg-tile { height: 74px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.bg-tile.on { border-color: var(--accent); }
.bg-tile span { position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }

.rule { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule h4 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule p { margin: 4px 0; color: var(--muted); }
.rule p b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.chip button { border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 0; margin-left: 2px; }

.profile-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-hero img { width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--accent-line); box-shadow: 0 0 0 6px var(--accent-soft); }
.profile-hero h2 { margin: 0; font-size: 24px; }
.kv-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 13.5px; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.terminal { background: #05070d; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font: 12.5px/1.6 var(--mono); color: #c9d1e8; height: 300px; overflow-y: auto; }
.terminal .ok { color: var(--good); }
.terminal .err { color: var(--bad); }
.terminal .cmd-line { color: #9fb0ff; }

.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table .section td { background: var(--panel-2); font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); text-align: left; }
.tog { width: 34px; height: 20px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; }
.tog::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tog.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.tog.on::after { transform: translateX(14px); }
.tog[disabled] { opacity: .5; cursor: not-allowed; }

.modal-back { position: fixed; inset: 0; background: rgba(3, 5, 12, .66); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: rise .15s ease; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 24px; box-shadow: var(--shadow); padding: 26px; animation: pop .2s ease; background: var(--panel-solid); border: 1px solid var(--line-2); }
.modal.wide { width: min(900px, 100%); }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .modal-sub { color: var(--muted); margin: 0 0 18px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.ann { position: relative; padding: 26px; border-radius: 24px; overflow: hidden; }
.ann::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.ann.success::before { background: var(--good); }
.ann.warning::before { background: var(--warn); }
.ann.danger::before { background: var(--bad); }
.ann .ann-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.ann.success .ann-ic { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.ann.warning .ann-ic { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.ann.danger .ann-ic { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.ann .ann-ic svg { width: 26px; height: 26px; }
.ann h2 { margin: 0 0 8px; font-size: 24px; }
.ann .ann-body { white-space: pre-wrap; color: var(--muted); font-size: 15px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.6s linear forwards; }
@keyframes fall { to { transform: translateY(520px) rotate(540deg); opacity: 0; } }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { min-width: 260px; max-width: 400px; padding: 12px 14px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; gap: 10px; animation: rise .2s ease; font-size: 13.5px; }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.good svg { color: var(--good); }
.toast.bad svg { color: var(--bad); }
.toast.info svg { color: var(--accent); }

.popover { position: fixed; z-index: 90; width: 300px; max-height: 420px; overflow-y: auto; padding: 10px; border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .15s ease; }
.scrim { display: none; }

@media (max-width: 1280px) {
  .tri { grid-template-columns: 1fr 1fr; }
  .tri > :last-child { grid-column: span 2; }
}
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.even { grid-template-columns: 1fr; }
  .classroom { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; }
  .chat-side { display: none; }
}
@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 36px 22px 0; }
  .login-points { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; border-radius: 0; }
  .shell.open .sidebar { transform: none; }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 25; }
  .topbar { padding: 10px 16px; }
  .topbar .menu { display: grid; }
  .online-stack span { display: none; }
  .content { padding: 20px 16px; }
  .g3, .g2, .tri { grid-template-columns: 1fr; }
  .tri > :last-child { grid-column: auto; }
  .span2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .map-wrap { height: 480px; }
  .search kbd { display: none; }
  .hero { grid-template-columns: 1fr; }
  .big-choice { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .shift-pill .label { display: none; }
  .timer { font-size: 42px; }
  .code-box { font-size: 30px; }
}

/* ---------- CAD console layout ---------- */
.backdrop .glow { position: absolute; inset: 0; background: radial-gradient(1400px 520px at 50% 115%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%), radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%); }
.shell.top { display: flex; flex-direction: column; min-height: 100vh; }
.topnav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.topnav .bar { display: flex; align-items: center; gap: 14px; padding: 12px 28px; }
.brand-block { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); flex: none; }
.brand-block:hover { text-decoration: none; }
.brand-block .logo-mark { width: 34px; height: 34px; color: var(--accent); }
.brand-block b { display: block; font: 800 16px var(--display); letter-spacing: -.01em; }
.brand-block small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: -2px; }
.portal-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.portal-tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.portal-tabs button svg { width: 14px; height: 14px; }
.portal-tabs button:hover { color: var(--text); }
.portal-tabs button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.pillnav { display: flex; gap: 6px; padding: 2px 28px 12px; overflow-x: auto; scrollbar-width: none; }
.pillnav::-webkit-scrollbar { display: none; }
.pillnav a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s, border-color .15s; flex: none; position: relative; }
.pillnav a:hover { color: var(--text); border-color: var(--accent-line); text-decoration: none; }
.pillnav a.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.pillnav a.back { background: var(--panel-solid); color: var(--text); }
.pillnav svg { width: 15px; height: 15px; }
.pillnav .gap { width: 1px; background: var(--line-2); margin: 5px 4px; flex: none; }
.pillnav .count { font-size: 10.5px; font-weight: 800; background: var(--bad); color: #fff; padding: 0 6px; border-radius: 999px; min-width: 18px; text-align: center; line-height: 17px; }
.shell.top .content { margin: 0 auto; padding-top: 26px; }
.avatar-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 3px 4px 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.avatar-btn:hover { background: var(--panel-2); }
.avatar-btn img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line-2); }
.footer { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; color: var(--muted); font-size: 12.5px; }
.footer .mid { display: flex; align-items: center; gap: 8px; font: 800 15px var(--display); color: var(--text); }
.footer .mid .logo-mark { width: 22px; height: 22px; color: var(--accent); }
.footer .right { display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }
.footer .pill { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 700; font-size: 11.5px; }
.footer .pill.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.footer .pill.down { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.kicker-label { font-size: 11.5px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.toolbox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbox a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 11px; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; transition: filter .15s, transform .1s; }
.toolbox a:hover { filter: brightness(1.12); text-decoration: none; }
.toolbox a:active { transform: translateY(1px); }
.toolbox a svg { width: 16px; height: 16px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.type-grid button { height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.type-grid button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cad-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.unit { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.unit .cs { font: 800 12.5px var(--mono); }
.status-chip { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.call-row { padding: 12px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.call-row:hover { border-color: var(--line-2); }
.call-row.sel { border-color: var(--accent); background: var(--accent-soft); }
.call-row .pri { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pick button { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.chip-pick button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.hex-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hex-row .swatch { width: 34px; height: 34px; border-radius: 9px; }
@media (max-width: 1280px) { .cad-grid { grid-template-columns: 1fr 1fr; } .cad-grid > :last-child { grid-column: span 2; } }
@media (max-width: 960px) {
  .topnav .bar { padding: 10px 14px; flex-wrap: wrap; }
  .topnav .search { order: 5; flex-basis: 100%; max-width: none; }
  .portal-tabs { order: 4; }
  .brand-block small { display: none; }
  .pillnav { padding: 2px 14px 10px; }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .footer .right { justify-content: center; }
  .cad-grid { grid-template-columns: 1fr; }
  .cad-grid > :last-child { grid-column: auto; }
  .page-head h1 { font-size: 26px; }
}

/* ---------- v3: clean console design ---------- */
:root { --accent: #2f6bff; --accent-2: #2f6bff; --bg: #09090b; --bg-2: #0e0e11; --panel: #141417; --panel-solid: #141417; --panel-2: #1b1b1f; --line: #232328; --line-2: #2e2e34; --text: #f4f4f5; --muted: #a1a1aa; --faint: #6b6b74; --radius: 18px; --display: 'Inter', system-ui, sans-serif; }
:root[data-theme="light"] { --bg: #f6f6f7; --bg-2: #efeff1; --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f3f3f5; --line: #e6e6ea; --line-2: #d9d9df; --text: #111113; --muted: #5b5b66; --faint: #8b8b96; }
body { letter-spacing: -.005em; }
.menu-pop { position: fixed; left: 0; right: auto; top: 0; z-index: 400; }
.backdrop .glow { background: radial-gradient(900px 340px at 50% -60px, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.glass, .card.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card.accent-top::before { display: none; }
.btn { border-radius: 999px; background: var(--panel-2); border-color: var(--line-2); }
.btn.primary, .btn.primary:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.danger { background: color-mix(in srgb, var(--bad) 16%, var(--panel)); }
.btn.white { background: #fff; color: #09090b; border-color: #fff; }
.tabs { background: transparent; border: 0; padding: 0; gap: 6px; }
.tabs button { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; color: var(--text); background: transparent; }
.tabs button.on { background: #fff; color: #09090b; border-color: #fff; box-shadow: none; }
:root[data-theme="light"] .tabs button.on { background: #111113; color: #fff; border-color: #111113; }
.input, textarea.input { background: var(--bg-2); border-color: var(--line-2); border-radius: 12px; }
.page-head { margin-bottom: 26px; align-items: flex-end; }
.kicker-label { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.page-head h1 .tone, .tone { color: var(--accent); }
.page-head p { margin-top: 8px; }
.stat { flex-direction: column; align-items: flex-start; gap: 6px; }
.stat .icon-box { display: none; }
.stat > div { display: flex; flex-direction: column; }
.stat .label { order: -1; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.stat:hover { transform: none; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head h3 svg { color: var(--muted); }
.hero { background: var(--panel); border: 1px solid var(--line); }
.hero::before { background: radial-gradient(600px 220px at 0 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.portal-card .icon-box, .big-choice .ic, .ach .medal, .page-head .title .ic { background: var(--panel-2); color: var(--accent); box-shadow: none; border: 1px solid var(--line-2); }
.ach { background: var(--panel-2); }
.podium .pod, .punish, .record, .feed-item, .unit { background: var(--panel-2); }
.toolbox a { border-radius: 999px; }
.type-grid button { border-radius: 999px; }
.type-grid button.on { background: #fff; color: #09090b; border-color: #fff; }

.centernav a.dense span { display: none; }
.centernav a.dense { padding: 7px 10px; }
.top3 { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; gap: 14px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 14px; height: 14px; }
.crumbs button { border: 0; background: transparent; color: var(--text); font-weight: 700; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.crumbs button:hover { background: var(--panel-2); }
.centernav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; min-width: 0; justify-self: center; }
.centernav::-webkit-scrollbar { display: none; }
.centernav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; position: relative; }
.centernav a svg { width: 15px; height: 15px; }
.centernav a:hover { color: var(--text); text-decoration: none; }
.centernav a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.centernav .count { font-size: 10px; font-weight: 800; background: var(--bad); color: #fff; min-width: 17px; line-height: 17px; text-align: center; border-radius: 999px; padding: 0 5px; }
.rightbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.action-pill { height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 12.5px; border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 14%, transparent); color: #fca5a5; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.action-pill.on { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 13%, transparent); color: #86efac; }
.action-pill.break { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 13%, transparent); color: #fde68a; }
.user-chip { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 3px 4px; border-radius: 999px; text-align: left; }
.user-chip:hover { background: var(--panel-2); }
.user-chip img { width: 34px; height: 34px; border-radius: 50%; }
.user-chip b { display: block; font-size: 13px; line-height: 1.2; }
.user-chip span { display: block; font-size: 11.5px; color: var(--muted); }
.content.v3 { margin: 0 auto; padding: 18px 28px 40px; max-width: 1320px; }
.ann-stack { max-width: 1320px; margin: 0 auto; padding: 10px 28px 0; display: flex; flex-direction: column; gap: 8px; }
.ann-bar { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); animation: rise .25s ease; }
.ann-bar.success { border-left-color: var(--good); } .ann-bar.warning { border-left-color: var(--warn); } .ann-bar.danger { border-left-color: var(--bad); } .ann-bar.celebrate { border-left-color: #f472b6; }
.ann-bar svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.ann-bar .t { flex: 1; min-width: 0; font-size: 13.5px; }
.ann-bar .t b { margin-right: 6px; }
.ann-bar .t span { color: var(--muted); white-space: pre-wrap; }
.ann-bar .t small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.inbox { position: fixed; top: 62px; right: 16px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow-y: auto; z-index: 90; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; animation: rise .15s ease; }
.inbox .row.between { margin-bottom: 10px; }
.note-item { display: flex; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); margin-bottom: 8px; }
.note-item.done { opacity: .55; }
.note-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--accent); }
.note-item.bad .dot, .note-item.priority .dot { background: var(--bad); }
.note-item.warn .dot { background: var(--warn); }
#alerts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column-reverse; gap: 10px; z-index: 90; width: min(380px, calc(100vw - 36px)); }
.alert-toast { background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); animation: rise .2s ease; }
.alert-toast.warn { border-left-color: var(--warn); } .alert-toast.bad { border-left-color: var(--bad); }
.alert-toast.priority { border-left-color: var(--bad); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent), var(--shadow); }
.alert-toast .row { align-items: flex-start; }
.alert-toast b { font-size: 13.5px; }
.alert-toast p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.alert-toast .tools { display: flex; gap: 4px; margin-left: auto; }
.alert-toast .tools button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.alert-toast .tools button:hover { color: var(--text); }
.alert-toast .tools button.ok { color: var(--good); }
.alert-toast svg { width: 15px; height: 15px; }
.app-card { display: flex; flex-direction: column; gap: 10px; }
.app-card .banner { height: 110px; border-radius: 12px; background: var(--panel-2) center/cover; margin: -6px -6px 4px; }
.q-row { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); }
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; }
.settings-nav button { text-align: left; border: 0; background: transparent; color: var(--muted); padding: 10px 14px; border-radius: 12px; font-weight: 600; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.settings-nav button svg { width: 16px; height: 16px; }
.settings-nav button.on { background: var(--accent); color: #fff; }
.setting-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; }
.setting-row span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 1100px) {
  .top3 { grid-template-columns: 1fr auto; }
  .top3 .centernav { grid-column: 1 / -1; grid-row: 2; max-width: none; justify-self: stretch; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
}
@media (max-width: 640px) {
  .top3 { padding: 10px 12px; }
  .user-chip div { display: none; }
  .content.v3, .ann-stack { padding-left: 14px; padding-right: 14px; }
  .action-pill .label { display: none; }
}
