:root {
  --bg: #070a12;
  --bg2: #0b0f19;
  --panel: #0f1523;
  --panel2: #141b2d;
  --line: rgba(148, 163, 184, 0.12);
  --line2: rgba(148, 163, 184, 0.22);
  --text: #e5e9f0;
  --muted: #8b95a7;
  --accent: #38bdf8;
  --accent2: #a855f7;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #f87171;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 14px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: inherit; }
button { font-family: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
kbd {
  font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line2); background: rgba(255,255,255,0.03); color: var(--muted);
}

/* ============ Intro ============ */
.intro {
  position: fixed; inset: 0; display: grid; place-items: center; overflow: auto;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(56,189,248,0.18), transparent 60%),
              radial-gradient(900px 500px at 90% 110%, rgba(168,85,247,0.18), transparent 60%), var(--bg);
  z-index: 50; transition: opacity .6s ease, transform .6s ease;
}
.intro.leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }
.intro-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  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 center, black 30%, transparent 75%);
}
.intro-inner { position: relative; max-width: 920px; padding: 48px 24px; text-align: center; }
.intro-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px;
  color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 14px; margin-bottom: 28px;
  background: rgba(255,255,255,0.02);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.15);} 50% { box-shadow: 0 0 0 7px rgba(34,197,94,.05);} }
.intro-title { font-size: clamp(30px, 5.2vw, 58px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 20px; font-weight: 800; }
.grad { background: linear-gradient(90deg, #38bdf8, #a855f7, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-sub { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 720px; margin: 0 auto 28px; }
.intro-term {
  text-align: left; margin: 0 auto 28px; max-width: 700px; background: rgba(5,8,15,.8); border: 1px solid var(--line2);
  border-radius: 12px; padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; color: #9fb3c8; min-height: 118px;
  box-shadow: var(--shadow);
}
.intro-term pre { margin: 0; white-space: pre-wrap; }
.intro-term .ok { color: var(--green); } .intro-term .warn { color: var(--amber); } .intro-term .key { color: var(--accent); }
.intro-actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line2); background: rgba(255,255,255,0.03); cursor: pointer; text-decoration: none; transition: .2s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #38bdf8, #6366f1); border-color: transparent; color: #04101a; box-shadow: 0 10px 30px -10px rgba(56,189,248,.6); }
.btn.primary:hover { filter: brightness(1.08); }
.lang-switch { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.lang-switch button { background: transparent; border: 0; padding: 9px 12px; font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--muted); }
.lang-switch button.active { background: rgba(56,189,248,.15); color: var(--accent); }
.lang-switch.compact button { padding: 6px 9px; font-size: 11px; }
.intro-stats { display: flex; gap: 32px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.intro-stats div { display: flex; flex-direction: column; align-items: center; }
.intro-stats b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.intro-stats span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }

/* ============ OS shell ============ */
.os { position: fixed; inset: 0; display: flex; flex-direction: column; animation: fadein .5s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.topbar {
  height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
  background: rgba(11,15,25,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); gap: 12px;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; }
.tb-logo { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.tb-name { font-weight: 600; font-size: 13px; }
.tb-clock { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 8px; }
.tb-center { flex: 1; display: flex; justify-content: center; }
.tb-search {
  display: flex; align-items: center; gap: 10px; width: min(460px, 100%); padding: 6px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer;
}
.tb-search:hover { border-color: var(--line2); }
.tb-search span { flex: 1; text-align: left; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; font-size: 14px;
}
.icon-btn:hover, .icon-btn.active { background: var(--panel2); color: var(--text); border-color: var(--line); }

.os-body { flex: 1; display: grid; grid-template-columns: 280px 1fr 0; min-height: 0; transition: grid-template-columns .25s ease; }
.os-body.info-open { grid-template-columns: 280px 1fr 340px; }

/* Sidebar */
.sidebar { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sb-head { display: flex; justify-content: space-between; padding: 14px 16px 8px; font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.sb-count { font-family: var(--mono); }
.sb-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 10px; }
.sb-filters button {
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; padding: 4px 9px; border-radius: 999px; cursor: pointer;
}
.sb-filters button.active { background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.4); color: var(--accent); }
.sb-list { list-style: none; margin: 0; padding: 4px 8px; overflow-y: auto; flex: 1; }
.sb-item {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: .15s;
}
.sb-item:hover { background: var(--panel); }
.sb-item.active { background: var(--panel2); border-color: var(--line2); }
.sb-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; color: #fff; }
.sb-item > span:nth-child(2) { min-width: 0; }
.sb-item b { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item small { font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-tag { font-family: var(--mono); font-size: 9.5px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line2); color: var(--muted); }
.sb-tag.live { color: var(--green); border-color: rgba(34,197,94,.35); }
.sb-tag.mvp { color: var(--amber); border-color: rgba(245,158,11,.35); }
.sb-tag.research { color: var(--accent2); border-color: rgba(168,85,247,.35); }
.sb-tag.archived { color: var(--muted); }
.sb-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; }
.sb-foot a { color: var(--muted); text-decoration: none; }
.sb-foot a:hover { color: var(--accent); }

/* Stage & browser */
.stage { display: flex; flex-direction: column; padding: 14px; gap: 12px; min-width: 0; min-height: 0;
  background: radial-gradient(800px 400px at 50% -10%, rgba(56,189,248,.08), transparent 60%); }
.browser {
  flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.browser.is-fullscreen { position: fixed; inset: 0; z-index: 40; border-radius: 0; }
.br-titlebar { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 0; background: var(--bg2); border-bottom: 1px solid var(--line); }
.traffic { display: flex; gap: 7px; padding: 6px 4px 10px; }
.traffic span { width: 12px; height: 12px; border-radius: 50%; }
.traffic .r { background: #ff5f57; } .traffic .y { background: #febc2e; } .traffic .g { background: #28c840; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; min-width: 120px; max-width: 220px; border-radius: 9px 9px 0 0;
  font-size: 12px; color: var(--muted); cursor: pointer; background: transparent; border: 1px solid transparent; border-bottom: 0; white-space: nowrap; flex-shrink: 0;
}
.tab.active { background: var(--panel); color: var(--text); border-color: var(--line); position: relative; top: 1px; }
.tab .fav { width: 14px; height: 14px; border-radius: 4px; display: grid; place-items: center; font-size: 8px; color: #fff; flex-shrink: 0; }
.tab .t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tab .x { opacity: 0; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 4px; font-size: 10px; }
.tab:hover .x, .tab.active .x { opacity: .7; }
.tab .x:hover { background: rgba(255,255,255,.1); opacity: 1; }
.tab-add { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; margin-bottom: 4px; cursor: pointer; border-radius: 6px; }
.tab-add:hover { background: var(--panel2); color: var(--text); }

.br-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.nav-btns, .tool-btns { display: flex; gap: 2px; }
.nav-btns button, .tool-btns button {
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: 7px; cursor: pointer; font-size: 13px;
}
.nav-btns button:hover, .tool-btns button:hover { background: var(--panel2); color: var(--text); }
.nav-btns button:disabled { opacity: .3; cursor: default; }
.tool-btns button.active { color: var(--accent); background: rgba(56,189,248,.12); }
.omnibox {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; height: 32px; min-width: 0;
}
.omnibox:focus-within { border-color: rgba(56,189,248,.5); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }
.omnibox .lock { color: var(--green); font-size: 11px; }
.omnibox input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-family: var(--mono); font-size: 12.5px; min-width: 0; }
.mode-badge { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.mode-badge.mode-direct { color: var(--green); border-color: rgba(34,197,94,.4); }
.mode-badge.mode-proxy { color: var(--amber); border-color: rgba(245,158,11,.4); }
.mode-badge.mode-home { color: var(--accent); border-color: rgba(56,189,248,.4); }

.progress { height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); width: 0; transition: width .3s ease, opacity .4s; opacity: 0; }
.progress.loading { opacity: 1; width: 70%; transition: width 6s cubic-bezier(.1,.7,.3,1); }
.progress.done { width: 100%; opacity: 0; transition: width .2s, opacity .5s .2s; }

.viewport { flex: 1; position: relative; min-height: 0; background: #fff; overflow: hidden; }
.device-frame { position: absolute; inset: 0; display: flex; justify-content: center; align-items: stretch; background: #fff; transition: background .3s; }
.device-frame.mobile { background: var(--bg2); padding: 16px 0; }
.device-frame.mobile #frame-host { width: 390px; border-radius: 26px; border: 8px solid #1f2937; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.8); }
#frame-host { position: relative; width: 100%; height: 100%; }
#frame-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
#frame-host iframe.hidden { display: none; }
.viewport .blocked {
  position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg2); color: var(--text); text-align: center; padding: 40px;
}
.blocked .box { max-width: 460px; }
.blocked h3 { margin: 12px 0 6px; }
.blocked p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Home dashboard inside browser */
#home.home { position: absolute; inset: 0; overflow-y: auto; background: var(--bg2); padding: 28px 32px; color: var(--text);
  background-image: radial-gradient(700px 300px at 80% -10%, rgba(168,85,247,.12), transparent 60%); }
#home.hidden { display: none; }
.home-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 28px; }
.home-hero h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
.home-hero p { color: var(--muted); margin: 0; max-width: 640px; line-height: 1.55; }
.home-avatar { width: 84px; height: 84px; border-radius: 22px; border: 2px solid var(--line2); }
.home-section { margin-bottom: 28px; }
.home-section h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.home-section h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s; display: flex; flex-direction: column; gap: 10px;
}
.card:hover { transform: translateY(-3px); border-color: var(--card-accent, var(--accent)); box-shadow: 0 20px 40px -20px var(--card-accent, var(--accent)); }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--card-accent, var(--accent)); opacity: .9; }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-top .sb-icon { width: 36px; height: 36px; }
.card-top b { font-size: 14px; }
.card-top small { display: block; color: var(--muted); font-size: 11px; font-family: var(--mono); }
.card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted); }
.card-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 2px; }
.card-foot .open { font-size: 12px; color: var(--accent); font-weight: 600; }
.card.wide { grid-column: span 2; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { font-size: 24px; display: block; letter-spacing: -0.02em; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.langbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 10px 0; }
.langbar i { display: block; height: 100%; }
.langlegend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.langlegend em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.langlegend em::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.arch { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-family: var(--mono); font-size: 12px; color: #9fb3c8; overflow-x: auto; }
.arch pre { margin: 0; }
.arch .k { color: var(--accent); } .arch .v { color: var(--accent2); } .arch .c { color: var(--green); }

.br-status { display: flex; gap: 14px; align-items: center; padding: 5px 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg2); }
.br-status .spacer { flex: 1; }

/* Terminal */
.terminal { height: 240px; background: #05080f; border: 1px solid var(--line2); border-radius: 12px; display: flex; flex-direction: column; font-family: var(--mono); font-size: 12.5px; box-shadow: var(--shadow); }
.term-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.term-head button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.term-body { flex: 1; overflow-y: auto; padding: 10px 12px; color: #9fb3c8; white-space: pre-wrap; line-height: 1.55; }
.term-body .ok { color: var(--green); } .term-body .err { color: var(--red); } .term-body .key { color: var(--accent); } .term-body .cmd { color: #fff; }
.term-input { display: flex; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line); }
.term-input .prompt { color: var(--green); }
.term-input input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-family: inherit; font-size: inherit; }

/* Info panel */
.infopanel { background: var(--bg2); border-left: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; width: 0; }
.os-body.info-open .infopanel { width: auto; }
#info-content { padding: 20px; width: 340px; }
.info-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.info-head small { color: var(--muted); font-size: 12px; }
.info-tag { display: inline-block; margin: 0 0 12px; }
.info p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.info h5 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.info ul { margin: 0; padding: 0 0 0 18px; color: var(--text); font-size: 13px; line-height: 1.6; }
.info .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.info .actions a, .info .actions button { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); text-decoration: none; cursor: pointer; }
.info .actions a:hover, .info .actions button:hover { border-color: var(--accent); }
.probe { margin-top: 16px; background: #05080f; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: 11px; color: #9fb3c8; }
.probe .k { color: var(--accent); }

/* Palette */
.palette { position: fixed; inset: 0; background: rgba(3,6,12,.6); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: start center; padding-top: 12vh; }
.palette-box { width: min(640px, 92vw); background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; animation: pop .15s ease; }
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 15px; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.palette-list li.active, .palette-list li:hover { background: var(--panel2); }
.palette-list li small { color: var(--muted); font-size: 11.5px; display: block; }
.palette-list li .sb-icon { width: 30px; height: 30px; font-size: 12px; }
.palette-foot { display: flex; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 70; box-shadow: var(--shadow); }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Responsive */
@media (max-width: 980px) {
  .os-body, .os-body.info-open { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; inset: 44px 0 0 0; z-index: 30; width: 100%; }
  .infopanel { position: fixed; inset: 44px 0 0 0; z-index: 30; width: 100% !important; display: none; }
  .os-body.info-open .infopanel { display: block; }
  #info-content { width: 100%; }
  .tb-center { display: none; }
  .tb-clock { display: none; }
  .stage { padding: 8px; }
  .home { padding: 18px; }
  .home-hero { grid-template-columns: 1fr; }
  .home-avatar { display: none; }
  .card.wide { grid-column: span 1; }
  .device-frame.mobile #frame-host { width: 100%; border: 0; border-radius: 0; }
  .device-frame.mobile { padding: 0; }
  .tool-btns #device-toggle { display: none; }
  .topbar .tb-name .muted { display: none; }
}
#mobile-menu { display: none; }
@media (max-width: 980px) { #mobile-menu { display: grid; } }

/* README viewer */
#readme.readme { position: absolute; inset: 0; overflow-y: auto; background: var(--bg2); padding: 28px 36px 48px; }
.rm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.rm-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.rm-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.rm-head .btn { margin-left: auto; padding: 9px 14px; font-size: 13px; }
.rm-meta { display: flex; gap: 8px; margin-bottom: 18px; }
.markdown { max-width: 860px; font-size: 14.5px; line-height: 1.7; color: #cbd5e1; }
.markdown h1, .markdown h2, .markdown h3 { color: var(--text); letter-spacing: -0.01em; margin-top: 1.6em; }
.markdown h1 { font-size: 26px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.markdown h2 { font-size: 20px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.markdown a { color: var(--accent); }
.markdown code { font-family: var(--mono); font-size: 12.5px; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 5px; }
.markdown pre { background: #05080f; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.markdown pre code { background: transparent; padding: 0; }
.markdown img { max-width: 100%; border-radius: 8px; }
.markdown table { border-collapse: collapse; width: 100%; font-size: 13px; }
.markdown th, .markdown td { border: 1px solid var(--line2); padding: 6px 10px; }
.markdown blockquote { border-left: 3px solid var(--accent); margin: 0; padding: 4px 14px; color: var(--muted); }
@media (max-width: 980px) { #readme.readme { padding: 18px; } .rm-head .btn { display: none; } }
.info { position: relative; }
.info-close { position: absolute; top: -6px; right: -6px; display: none; }
@media (max-width: 980px) { .info-close { display: grid; } }
