/* ============================================================
   ONE BUTTON ARCADE — Community Platform
   Early-2000s gaming-portal identity (web 1.0, Windows-style
   window panels, beveled buttons, classic links).
   Thai-first, responsive desktop + mobile.
   ============================================================ */

:root {
  --bg: #0a0d18;
  --panel: #141a2e;
  --panel-2: #1a2138;
  --panel-3: #101527;
  --line: #33406a;
  --line-light: #47588c;
  --text: #e4ecf8;
  --muted: #94a4c8;
  --muted-2: #6a7ba0;

  --cyan: #37c8ff;
  --magenta: #ff4d9e;
  --yellow: #ffd23f;
  --green: #34e08a;
  --red: #ff5c6c;
  --purple: #b69cff;

  --link: #6fb6ff;
  --link-visited: #c59bff;

  --font-display: "Press Start 2P", "Courier New", monospace;
  --font-body: "IBM Plex Sans Thai", Tahoma, "Leelawadee UI", Thonburi, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* classic hyperlinks */
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link-visited); }
a:hover { color: #cfe6ff; }
a.btn { text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- scanline / CRT overlay ---------- */
.scanlines {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.014) 0px, rgba(255,255,255,0.014) 1px,
    transparent 1px, transparent 3px);
}

/* ============================================================
   TOP BAR + NAV (horizontal tabs)
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(#12182c, #0c1120);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; text-decoration: none; }
.brand:hover { color: var(--text); }

.brand-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f43f5e, #be123c 60%, #7f1d1d);
  border: 3px outset #2b0a12;
  display: grid; place-items: center; position: relative; flex-shrink: 0;
}
.btn-dot { width: 10px; height: 10px; border-radius: 50%; background: #fda4af; box-shadow: 0 0 6px #fff; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; }
.brand-name .accent { color: var(--cyan); }
.brand-sub { font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: 0.3px; }

.nav { display: flex; gap: 3px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--text); font-weight: 700; font-size: 13px;
  padding: 7px 11px; border: 2px outset #2e3d5e; background: #1a2138;
  text-decoration: none; border-radius: 0;
}
.nav a:hover { background: #232c4a; color: #fff; }
.nav a.active { background: #2a3b62; border-style: inset; color: var(--cyan); }
.nav-badge {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px;
  padding: 0 4px; font-size: 10px; font-weight: 800;
  background: var(--magenta); color: #fff; border: 1px solid #fff; margin-left: 2px;
}

.hamburger { display: none; background: #1a2138; border: 2px outset #2e3d5e; width: 42px; height: 38px; }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px auto; }

.auth-area { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.auth-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.auth-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-light); background: var(--panel-2); }
.auth-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.auth-role { font-size: 8px; font-weight: 800; letter-spacing: 0.5px; background: var(--magenta); color: #fff; padding: 2px 5px; }

/* ============================================================
   LAYOUT
   ============================================================ */
main { min-height: 70vh; padding: 18px 0 50px; }
.view { display: none; }
.view.active { display: block; }

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 26px 0 12px;
  background: linear-gradient(180deg, #1c2a4a, #121a30);
  border: 2px outset #33406a; padding: 7px 12px;
}
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; color: #fff; text-shadow: 1px 1px 0 #000; }
.section-head .kicker { display: block; font-family: var(--font-display); font-size: 8px; letter-spacing: 2px; color: var(--yellow); margin-bottom: 3px; }
.section-head p { margin: 4px 0 0; font-size: 12.5px; }

.kicker { font-family: var(--font-display); font-size: 9px; letter-spacing: 2px; color: var(--magenta); text-transform: uppercase; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-family: var(--font-display); font-size: clamp(22px, 4vw, 38px); letter-spacing: 1px; color: #fff; text-shadow: 2px 2px 0 var(--magenta); }
h1 .accent { color: var(--cyan); }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; }

/* ============================================================
   WINDOW (Windows-98 style panel)
   ============================================================ */
.window { background: var(--panel); border: 2px outset #3a4a70; border-radius: 0; margin-bottom: 14px; }
.window-title {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, #22407a, #16305e);
  color: #fff; font-weight: 800; font-size: 12px; padding: 4px 8px;
  border-bottom: 2px solid #0b1326;
}
.window-title .win-btns { font-family: var(--font-mono); font-size: 10px; color: #cfe0ff; letter-spacing: 2px; }
.window-body { padding: 12px; }

/* ============================================================
   MARQUEE (news ticker)
   ============================================================ */
.marquee {
  overflow: hidden; white-space: nowrap;
  background: #081020; border: 2px inset #33406a; padding: 5px 0; margin-bottom: 12px;
  color: var(--yellow); font-size: 12.5px; font-family: var(--font-mono);
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 28s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; padding-left: 8px; } }

/* ============================================================
   HERO
   ============================================================ */
.hero { background: var(--panel); border: 2px outset #3a4a70; }
.hero-row { display: flex; gap: 18px; align-items: center; }
.hero-text { flex: 1 1 auto; }
.eyebrow { font-family: var(--font-display); font-size: 9px; letter-spacing: 2px; color: var(--yellow); }
.hero p.lead { color: var(--muted); font-size: 14.5px; margin: 10px 0 16px; max-width: 640px; }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-pixel { flex: 0 0 auto; text-align: center; padding: 0 8px; }
.hero-pixel .coin { font-family: var(--font-display); font-size: 9px; color: var(--yellow); margin-top: 10px; letter-spacing: 1px; }

/* pixel-art space invader (box-shadow) */
.pixel-invader { width: 7px; height: 6px; margin: 12px auto 0; position: relative; }
.pixel-invader::before {
  content: ""; position: absolute; left: 0; top: 0; width: 7px; height: 6px; background: var(--green);
  box-shadow:
    7px 0 0 var(--green), 14px 0 0 var(--green), 28px 0 0 var(--green), 35px 0 0 var(--green),
    0 7px 0 var(--green), 7px 7px 0 var(--green), 14px 7px 0 var(--green), 21px 7px 0 var(--green),
    28px 7px 0 var(--green), 35px 7px 0 var(--green), 42px 7px 0 var(--green),
    0 14px 0 var(--green), 14px 14px 0 var(--green), 21px 14px 0 var(--green),
    28px 14px 0 var(--green), 42px 14px 0 var(--green),
    0 21px 0 var(--green), 7px 21px 0 var(--green), 14px 21px 0 var(--green), 21px 21px 0 var(--green),
    28px 21px 0 var(--green), 35px 21px 0 var(--green), 42px 21px 0 var(--green),
    14px 28px 0 var(--green), 28px 28px 0 var(--green),
    7px 35px 0 var(--green), 35px 35px 0 var(--green);
}
/* pixel-art arcade button (red, round) */
.pixel-button { width: 7px; height: 7px; margin: 26px auto 0; position: relative; }
.pixel-button::before {
  content: ""; position: absolute; left: 0; top: 0; width: 7px; height: 7px; background: var(--red);
  box-shadow:
    14px 0 0 var(--red), 21px 0 0 var(--red), 28px 0 0 var(--red),
    7px 7px 0 var(--red), 14px 7px 0 var(--red), 21px 7px 0 var(--red), 28px 7px 0 var(--red), 35px 7px 0 var(--red),
    0 14px 0 var(--red), 7px 14px 0 var(--red), 14px 14px 0 var(--red), 21px 14px 0 var(--red),
    28px 14px 0 var(--red), 35px 14px 0 var(--red), 42px 14px 0 var(--red),
    0 21px 0 var(--red), 7px 21px 0 var(--red), 14px 21px 0 var(--red), 21px 21px 0 var(--red),
    28px 21px 0 var(--red), 35px 21px 0 var(--red), 42px 21px 0 var(--red),
    0 28px 0 var(--red), 7px 28px 0 var(--red), 14px 28px 0 var(--red), 21px 28px 0 var(--red),
    28px 28px 0 var(--red), 35px 28px 0 var(--red), 42px 28px 0 var(--red),
    7px 35px 0 var(--red), 14px 35px 0 var(--red), 21px 35px 0 var(--red), 28px 35px 0 var(--red), 35px 35px 0 var(--red),
    14px 42px 0 var(--red), 21px 42px 0 var(--red), 28px 42px 0 var(--red);
}

/* ---------- home grid: main + sidebar ---------- */
.home-grid { display: grid; grid-template-columns: 1fr 264px; gap: 16px; align-items: start; }
.sidebar .window { margin-bottom: 12px; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.linklist li:last-child { border-bottom: none; }
.linklist a { font-size: 13.5px; font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats > div { background: var(--panel-3); border: 1px solid var(--line); padding: 6px 8px; }
.st-val { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--cyan); }
.st-lbl { font-size: 11px; color: var(--muted); }
.counter {
  font-family: var(--font-mono); font-size: 16px; letter-spacing: 2px; color: var(--green);
  background: #06090f; border: 2px inset #222; padding: 4px 8px; text-align: center;
}

/* ============================================================
   BUTTONS (classic bevel)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; font-weight: 700; font-size: 13.5px; line-height: 1.2;
  border: 2px outset #3a4a70; background: linear-gradient(#223052, #161d34);
  color: var(--text); border-radius: 0; cursor: pointer; transition: none;
}
.btn:hover { background: #26365c; color: #fff; }
.btn:active { border-style: inset; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(#1fc6ff, #0d8fd6); border-color: #0b5e8a; color: #04212b; }
.btn-primary:hover { background: #4fd4ff; color: #04212b; }
.btn-magenta { background: linear-gradient(#ff5aa8, #d81b60); border-color: #7c1140; color: #fff; }
.btn-outline { background: #0d2540; border-color: var(--cyan); color: var(--cyan); }
.btn-ghost { background: #1a2138; border-color: #33406a; color: var(--text); }
.btn-danger { background: #2a1218; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-demo { background: linear-gradient(#3ce39a, #0ea5e9); border-color: #08637a; color: #04212b; font-weight: 800; }
.btn-demo:hover { background: #6cf0b8; color: #04212b; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 36px; height: 34px; padding: 0 8px;
  background: var(--panel-2); border: 2px outset #33406a; color: var(--muted); font-size: 14px; border-radius: 0;
}
.icon-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.icon-btn:active { border-style: inset; }
.icon-btn.on { color: var(--magenta); border-color: var(--magenta); background: #2a1220; }
.icon-btn.faved { color: var(--yellow); border-color: var(--yellow); background: #2a2312; }
.count { font-weight: 800; font-size: 12px; }

/* ============================================================
   GRIDS / CARDS
   ============================================================ */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.steps { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1080px) { .home-grid { grid-template-columns: 1fr; } .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr 1fr; } .sidebar { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 2px outset #33406a; border-radius: 0;
  padding: 14px;
}
.card:hover { border-color: var(--line-light); }
.card.pad-sm { padding: 10px; }

.feature-card { border-top: 3px solid var(--cyan); }
.feature-card .feature-icon { font-size: 26px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); margin: 4px 0 0; font-size: 13.5px; }

/* ============================================================
   EDITION CARDS
   ============================================================ */
.edition { background: var(--panel); border: 2px outset #33406a; border-radius: 0; padding: 14px; }
.edition .tag { display: inline-block; font-family: var(--font-display); font-size: 8px; letter-spacing: 1px; padding: 4px 8px; margin-bottom: 10px; }
.edition.dev { border-color: var(--cyan); }
.edition.dev .tag { background: #0d2540; color: var(--cyan); }
.edition.consumer .tag { background: #2a2312; color: var(--yellow); }
.edition .chip { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.edition ul { list-style: none; padding: 0; margin: 10px 0 0; }
.edition ul li { position: relative; padding-left: 18px; margin: 6px 0; color: var(--muted); font-size: 13.5px; }
.edition ul li::before { content: "►"; position: absolute; left: 0; color: var(--cyan); font-size: 10px; }
.edition.consumer ul li::before { color: var(--yellow); }
.edition .not-available { color: var(--red); font-weight: 700; }

/* ============================================================
   GAME CARD
   ============================================================ */
.game-card { display: flex; flex-direction: column; }
.game-cover {
  height: 130px; border-radius: 0; position: relative; overflow: hidden;
  display: grid; place-items: center; font-size: 48px; margin-bottom: 10px;
  border: 2px inset #223; cursor: pointer;
}
.game-cover .cov-badge {
  position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 800;
  padding: 3px 6px; letter-spacing: 0.5px; border: 1px solid #000;
}
.badge-official { background: var(--cyan); color: #04212b; }
.badge-community { background: var(--purple); color: #1c1330; }
.game-cover .cov-version { position: absolute; bottom: 8px; right: 8px; font-family: var(--font-mono); font-size: 10px; color: #fff; background: rgba(0,0,0,0.55); padding: 2px 5px; }
.game-card h3 { font-size: 15px; margin: 2px 0; }
.game-card .dev { color: var(--muted); font-size: 12.5px; }
.game-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.pill {
  font-size: 11px; font-weight: 700; padding: 2px 7px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.pill.compat { color: var(--green); border-color: #1d5c40; background: #0a1f16; }
.game-actions { margin-top: auto; display: flex; gap: 6px; align-items: center; }
.game-actions .icon-btn { flex: 1; }
.game-card .btn-demo { width: 100%; margin-top: 8px; font-size: 12px; padding: 7px; }

/* ============================================================
   LIBRARY TOOLBAR / FORM CONTROLS
   ============================================================ */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 2px inset #33406a; padding: 7px 10px;
}
.search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; font-family: var(--font-body); }
.search .icon { color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  background: var(--panel-2); border: 2px outset #33406a; color: var(--muted);
  padding: 5px 12px; font-size: 12.5px; font-weight: 700; border-radius: 0;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.active { background: var(--cyan); border-color: #0b5e8a; color: #04212b; border-style: inset; }
select.field, input.field {
  background: var(--panel); border: 2px inset #33406a; color: var(--text);
  padding: 7px 10px; font-size: 13.5px; font-family: var(--font-body); border-radius: 0;
}
select.field option { background: var(--panel); color: var(--text); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  text-align: center; padding: 44px 16px; border: 2px dashed var(--line);
  color: var(--muted); background: var(--panel);
}
.empty .big { font-size: 40px; }

/* ============================================================
   PACKS
   ============================================================ */
.pack-card { cursor: pointer; }
.pack-card .pack-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.pack-card .pack-device { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); }
.pack-games { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pack-games .chip-game {
  display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2);
  border: 1px solid var(--line); padding: 3px 7px; font-size: 12px;
}
.pack-games .chip-game .ord { color: var(--magenta); font-family: var(--font-mono); font-size: 10px; }
.pack-actions { display: flex; gap: 7px; margin-top: 6px; flex-wrap: wrap; }

/* ============================================================
   BUILDER WIZARD
   ============================================================ */
.wizard { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.wstep {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--panel); border: 2px outset #33406a; color: var(--muted); font-weight: 700; font-size: 12.5px;
}
.wstep .num { font-family: var(--font-mono); font-size: 11px; display: grid; place-items: center; width: 20px; height: 20px; background: var(--panel-2); border: 1px solid var(--line); }
.wstep.active { color: var(--text); border-color: var(--cyan); }
.wstep.active .num { background: var(--cyan); color: #04212b; }
.wstep.done { color: var(--green); border-color: #1d5c40; }
.wstep.done .num { background: var(--green); color: #04212b; }

.progress { height: 14px; background: #06090f; border: 2px inset #222; overflow: hidden; }
.progress > div { height: 100%; background: repeating-linear-gradient(45deg, var(--cyan) 0 8px, #0ea5e9 8px 16px); width: 0%; transition: width 0.2s; }

.manifest { font-family: var(--font-mono); font-size: 12.5px; background: #05080f; border: 2px inset #222; padding: 12px 14px; overflow-x: auto; color: #b8e6ff; white-space: pre-wrap; word-break: break-word; }
.hash { font-family: var(--font-mono); font-size: 12px; color: var(--green); word-break: break-all; }

.notice { border-left: 4px solid var(--yellow); background: #2a2312; padding: 10px 12px; font-size: 13.5px; color: #ffe9a8; margin: 10px 0; }
.notice.error { border-left-color: var(--red); background: #2a1218; color: #ffd7db; }
.notice.ok { border-left-color: var(--green); background: #0a1f16; color: #c9f7ec; }

/* ============================================================
   MODAL (window style)
   ============================================================ */
.modal-root:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500; background: rgba(2, 4, 9, 0.8);
  display: grid; place-items: center; padding: 16px;
}
.modal {
  width: min(680px, 100%); max-height: 90vh; overflow: auto; background: var(--panel);
  border: 3px outset #3a4a70; box-shadow: 0 0 0 2px #000, 0 12px 40px rgba(0,0,0,0.6);
}
.modal.modal-wide { width: min(960px, 100%); }
.modal-head { padding: 12px 14px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-body { padding: 14px; }
.modal-close { background: #2a1218; border: 2px outset var(--red); color: var(--red); width: 32px; height: 30px; font-size: 14px; font-weight: 800; }
.modal-close:hover { background: var(--red); color: #fff; }
.detail-cover { height: 170px; border-radius: 0; display: grid; place-items: center; font-size: 72px; border: 2px inset #223; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); }
.stat-strip { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.stat { text-align: left; }
.stat .val { font-family: var(--font-mono); font-size: 19px; font-weight: 800; color: var(--cyan); }
.stat .lbl { font-size: 11px; color: var(--muted); }

.demo-frame { width: 100%; height: 680px; border: none; display: block; background: #070b14; }
@media (max-width: 640px) { .demo-frame { height: 560px; } }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border: 2px inset #33406a; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
th, td { text-align: left; padding: 9px 11px; border: 1px solid var(--line); vertical-align: top; }
th { background: #1c2a4a; color: #fff; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr:nth-child(even) { background: #11172a; }
tbody tr:hover { background: #182137; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-root { position: fixed; bottom: 16px; right: 16px; z-index: 900; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast {
  background: var(--panel-2); border: 2px outset #3a4a70; padding: 10px 13px;
  font-size: 13.5px; box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  display: flex; gap: 8px; align-items: flex-start;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
.codeblock {
  background: #05080f; border: 2px inset #222; padding: 12px 14px; overflow-x: auto; margin: 8px 0;
}
.codeblock pre { margin: 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: #cfe8ff; white-space: pre; }
.codeblock .c { color: #64748b; }
.codeblock .k { color: #f472b6; }
.codeblock .s { color: #a5f3fc; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 2px solid var(--line); background: var(--panel-3); margin-top: 30px; }
.footer-inner { padding: 22px 14px; display: grid; gap: 14px; grid-template-columns: 1.4fr 1fr; }
.footer-brand { font-family: var(--font-display); font-size: 11px; letter-spacing: 1px; }
.footer-meta { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12.5px; }
.footer-note { grid-column: 1 / -1; color: var(--muted-2); font-size: 11.5px; margin: 0; border-top: 1px dashed var(--line); padding-top: 10px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

/* ============================================================
   RESPONSIVE NAV
   ============================================================ */
@media (max-width: 900px) {
  .hamburger { display: block; }
  .auth-area { margin-left: auto; }
  .nav {
    position: absolute; top: 62px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #0c1120; border-bottom: 2px solid var(--line);
    padding: 8px 12px 12px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 600px) {
  .topbar-inner { gap: 8px; }
  .brand { min-width: 0; flex-shrink: 1; }
  .brand-text { min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hamburger { flex-shrink: 0; }
  .brand-sub { display: none; }
  .hero-row { flex-direction: column; align-items: stretch; }
  .hero-pixel { order: -1; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Public deployment banner */
.public-beta-info{max-width:1080px;margin:12px auto 4px;padding:11px 18px;border:1px solid #235459;border-radius:11px;background:#11232b;color:#d9f4eb;font-size:13px;line-height:1.65}
.public-beta-info strong{color:#83f1ca}

/* Official browser flashing navigation */
.nav .nav-flash-link {border-color: #37bfa4; color: #8fffe2; background: #123c3b;}
.nav .nav-flash-link:hover {background:#15554d;color:#ffffff;}
.public-beta-info a { color:#74ffdc; font-weight:700; }
