/* ═══════════════════════════════════════════════════════════
   First Take -- shared stylesheet for the server-rendered pages
   (homepage, admin dashboard, developer dashboard).

   Every page's <body> carries a page class (pg-index / pg-admin /
   pg-developer). Everything below that page's section header is scoped
   under that class, because admin.html and developer.html share a near-
   identical dashboard component vocabulary (.btn, .panel, .stat-card,
   .topbar, and so on) -- without scoping, whichever page's rule for a
   given class happens to sit later in this file would silently win on
   BOTH pages, which is exactly the bug that shipped once this file
   stopped being three separate <style> blocks.
   ═══════════════════════════════════════════════════════════ */

/* ── shared reset ──────────────────────────────────────────── */
  * { box-sizing:border-box; margin:0; padding:0; }

/* ── index.html (homepage) ──────────────────────────────────── */
  body.pg-index { background:#0F0D0A; color:#EDE7DA; font-family:Georgia,'Times New Roman',serif; }
  .pg-index .mono { font-family:'Courier New',monospace; font-weight:600; }
  .pg-index a { color:inherit; }

  /* ---- top bar ---- */
  .pg-index header { display:flex; justify-content:space-between; align-items:center; padding:22px 48px; border-bottom:1px solid #2A241A; background:#0F0D0A; position:sticky; top:0; z-index:20; }
  .pg-index .logo { font-size:15px; letter-spacing:.04em; }
  .pg-index .logo b { color:#D8AE4F; font-weight:400; font-style:italic; }
  .pg-index nav { display:flex; gap:32px; font-family:-apple-system,sans-serif; font-size:13px; color:#B8AF9C; }
  .pg-index nav a { text-decoration:none; color:inherit; transition:color .15s ease; }
  .pg-index nav a:hover, .pg-index nav a:focus-visible { color:#D8AE4F; }
  .pg-index .queue-status { font-family:'Courier New',monospace; font-size:12px; font-weight:600; color:#7EBF83; }

  /* ---- mobile nav burger (hidden on desktop, see the 720px block below) ---- */
  .pg-index .nav-burger { display:none; width:26px; height:18px; position:relative; background:none; border:none; cursor:pointer; padding:0; }
  .pg-index .nav-burger span { position:absolute; left:0; right:0; height:1.6px; background:#EDE7DA; transition:transform .2s ease, opacity .2s ease, top .2s ease; }
  .pg-index .nav-burger span:nth-child(1) { top:0; }
  .pg-index .nav-burger span:nth-child(2) { top:8px; }
  .pg-index .nav-burger span:nth-child(3) { top:16px; }
  .pg-index .nav-burger.open span:nth-child(1) { top:8px; transform:rotate(45deg); }
  .pg-index .nav-burger.open span:nth-child(2) { opacity:0; }
  .pg-index .nav-burger.open span:nth-child(3) { top:8px; transform:rotate(-45deg); }

  /* ---- hero (tab switcher, not a two-color split) ---- */
  .pg-index .hero { background:#0F0D0A; padding:84px 48px 92px; position:relative; overflow:hidden; }
  .pg-index .hero-glow {
    position:absolute; top:-220px; right:-160px; width:640px; height:640px; pointer-events:none; z-index:0;
    background:radial-gradient(circle, rgba(216,174,79,.16) 0%, rgba(216,174,79,.06) 42%, rgba(216,174,79,0) 72%);
  }
  .pg-index .hero-tabs, .pg-index .hero-panel { position:relative; z-index:1; }
  .pg-index .hero-tabs { display:inline-flex; gap:2px; border:1px solid #2A241A; border-radius:999px; padding:4px; margin-bottom:40px; }
  .pg-index .hero-tab {
    font-family:'Courier New',monospace; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
    background:none; border:none; color:#8C8474; padding:9px 20px; border-radius:999px; cursor:pointer;
  }
  .pg-index .hero-tab.active { background:#D8AE4F; color:#171205; }
  .pg-index .hero-panel { display:none; max-width:640px; }
  .pg-index .hero-panel.active { display:block; }
  .pg-index .hero-panel h1 { font-size:38px; font-weight:400; line-height:1.15; margin-bottom:18px; color:#EDE7DA; }
  .pg-index .hero-panel h1 em { font-style:italic; color:#D8AE4F; }
  .pg-index .hero-panel p { font-family:-apple-system,sans-serif; font-size:15px; line-height:1.65; color:#B8AF9C; margin-bottom:28px; }
  .pg-index .hero-cta {
    font-family:-apple-system,sans-serif; font-size:14px; font-weight:600; padding:13px 24px; border-radius:3px; cursor:pointer;
    background:linear-gradient(155deg,#E8C066,#D8AE4F 55%,#C89A3C); color:#171205; border:none; text-decoration:none; display:inline-block;
    box-shadow:0 1px 0 rgba(255,235,190,.5) inset, 0 6px 16px rgba(180,130,20,.22);
    transition:background .15s ease, transform .15s ease, box-shadow .15s ease;
  }
  .pg-index .hero-cta:hover { background:linear-gradient(155deg,#F2CD79,#E8C066 55%,#D8AE4F); box-shadow:0 1px 0 rgba(255,235,190,.6) inset, 0 8px 20px rgba(180,130,20,.3); }
  .pg-index .hero-cta:active { transform:translateY(1px); }
  .pg-index .hero-cta-row { display:flex; align-items:center; gap:16px; }
  .pg-index .hero-cta-ghost {
    font-family:-apple-system,sans-serif; font-size:14px; font-weight:600; padding:12px 22px; border-radius:3px; cursor:pointer;
    background:linear-gradient(155deg,rgba(237,231,218,.05),rgba(237,231,218,0)); color:#EDE7DA; border:1px solid #2A241A; text-decoration:none; display:inline-block; transition:border-color .15s ease, background .15s ease;
  }
  .pg-index .hero-cta-ghost:hover { border-color:#D8AE4F; background:linear-gradient(155deg,rgba(216,174,79,.1),rgba(216,174,79,0)); }

  /* ---- flow ---- */
  .pg-index section { padding:70px 48px; scroll-margin-top:84px; }
  .pg-index .section-head { font-family:'Courier New',monospace; font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:#8C6A1D; margin-bottom:10px; }
  .pg-index .section-title { font-size:26px; font-weight:400; max-width:600px; margin-bottom:44px; }

  .pg-index .flow { display:grid; grid-template-columns:repeat(6,1fr); gap:0; position:relative; }
  .pg-index .flow-step { padding:0 14px 0 0; position:relative; }
  .pg-index .flow-step .n {
    display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding:0 6px; margin-bottom:12px;
    border-radius:999px; border:1px solid #2A241A;
    background:linear-gradient(155deg,#1A1610,#0F0D0A);
    box-shadow:0 1px 0 rgba(237,231,218,.05) inset;
  }
  .pg-index .flow-step .n span { font-family:'Courier New',monospace; font-size:11px; font-weight:600; color:#D8AE4F; }
  .pg-index .flow-step .t { font-size:15px; margin-bottom:8px; line-height:1.3; }
  .pg-index .flow-step .d { font-family:-apple-system,sans-serif; font-size:12.5px; color:#93897A; line-height:1.5; }

  .pg-index .flow-section .flow-step .n {
    background:linear-gradient(155deg,#FBF6E7,#E9D9AD); border-color:#C7B37E;
    box-shadow:0 1px 0 rgba(255,255,255,.6) inset, 0 2px 5px rgba(120,90,20,.14);
  }
  .pg-index .flow-section .flow-step .n span { color:#7A5C15; }

  /* ---- economy ---- */
  .pg-index .economy { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1px; background:#2A241A; border:1px solid #2A241A; }
  .pg-index .econ-card {
    background:linear-gradient(165deg,#141009,#0F0D0A 60%); padding:28px 26px;
    transition:background .2s ease, box-shadow .2s ease; position:relative;
  }
  .pg-index .econ-card:hover { background:linear-gradient(165deg,#1C1710,#12100A 60%); box-shadow:0 10px 24px rgba(0,0,0,.35); }
  .pg-index .econ-icon {
    display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; margin-bottom:16px;
    border-radius:9px; color:#D8AE4F;
    background:linear-gradient(155deg,rgba(216,174,79,.16),rgba(216,174,79,.04));
    border:1px solid rgba(216,174,79,.22);
    box-shadow:0 1px 0 rgba(255,235,190,.08) inset;
  }
  .pg-index .econ-icon svg { width:20px; height:20px; }
  .pg-index .econ-card .k { font-family:'Courier New',monospace; font-size:12px; font-weight:600; color:#D8AE4F; margin-bottom:12px; }
  .pg-index .econ-card .v { font-family:-apple-system,sans-serif; font-size:14px; color:#B8AF9C; line-height:1.6; }

  /* ---- tiers ---- */
  .pg-index .tiers { display:grid; grid-template-columns:1fr 1fr 1fr; gap:1px; background:#2A241A; border:1px solid #2A241A; }
  .pg-index .tier { background:linear-gradient(165deg,#141009,#0F0D0A 60%); padding:36px 34px; transition:box-shadow .2s ease; }
  .pg-index .tier:hover { box-shadow:0 10px 28px rgba(0,0,0,.35); }
  .pg-index .tier.highlight { border-top:2px solid #D8AE4F; }
  .pg-index .tier-icon {
    display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; margin-bottom:16px;
    border-radius:9px; color:#D8AE4F;
    background:linear-gradient(155deg,rgba(216,174,79,.16),rgba(216,174,79,.04));
    border:1px solid rgba(216,174,79,.22);
  }
  .pg-index .tier-icon svg { width:19px; height:19px; }
  .pg-index .tier .badge { display:inline-block; font-family:'Courier New',monospace; font-size:11px; font-weight:600; color:#D8AE4F; border:1px solid #4A3A16; padding:3px 10px; border-radius:3px; margin-bottom:16px; }
  .pg-index .tier h3 { font-size:20px; font-weight:400; margin-bottom:10px; }
  .pg-index .tier .price { font-family:'Courier New',monospace; font-size:22px; font-weight:600; color:#D8AE4F; margin-bottom:16px; }
  .pg-index .tier .price span { font-size:12px; color:#93897A; }
  .pg-index .tier p { font-family:-apple-system,sans-serif; font-size:14px; color:#B8AF9C; line-height:1.65; margin-bottom:14px; }
  .pg-index .tier ul { font-family:-apple-system,sans-serif; font-size:13.5px; color:#93897A; line-height:2; list-style:none; }
  .pg-index .tier ul li::before { content:'-  '; color:#4A3A16; }

  /* ---- dev-facing (parchment) section theming ---- */
  /* Torn-edge seam: a full-width band of the PREVIOUS section's color, cut
     into a sawtooth that bites down into this section. ::before is the
     previous section's color with teeth reaching down, ::after is this
     section's own color with teeth reaching up along the identical curve,
     so they interlock instead of leaving gaps. All three sections share the
     same treatment now that the hero above them is a single flat color
     rather than a two-color split. */
  .pg-index .flow-section::before, .pg-index .tester-section::before, .pg-index .dev-section::before,
  .pg-index .flow-section::after, .pg-index .tester-section::after, .pg-index .dev-section::after {
    content:''; position:absolute; top:0; left:0; right:0; height:20px; pointer-events:none;
  }
  .pg-index .flow-section::before, .pg-index .tester-section::before, .pg-index .dev-section::before {
    clip-path:polygon(0% 0%, 2.381% 100%, 4.762% 0%, 7.143% 100%, 9.524% 0%, 11.905% 100%, 14.286% 0%, 16.667% 100%, 19.048% 0%, 21.429% 100%, 23.81% 0%, 26.19% 100%, 28.571% 0%, 30.952% 100%, 33.333% 0%, 35.714% 100%, 38.095% 0%, 40.476% 100%, 42.857% 0%, 45.238% 100%, 47.619% 0%, 50% 100%, 52.381% 0%, 54.762% 100%, 57.143% 0%, 59.524% 100%, 61.905% 0%, 64.286% 100%, 66.667% 0%, 69.048% 100%, 71.429% 0%, 73.81% 100%, 76.19% 0%, 78.571% 100%, 80.952% 0%, 83.333% 100%, 85.714% 0%, 88.095% 100%, 90.476% 0%, 92.857% 100%, 95.238% 0%, 97.619% 100%, 100% 0%);
  }
  .pg-index .flow-section::after, .pg-index .tester-section::after, .pg-index .dev-section::after {
    clip-path:polygon(0% 0%, 2.381% 100%, 4.762% 0%, 7.143% 100%, 9.524% 0%, 11.905% 100%, 14.286% 0%, 16.667% 100%, 19.048% 0%, 21.429% 100%, 23.81% 0%, 26.19% 100%, 28.571% 0%, 30.952% 100%, 33.333% 0%, 35.714% 100%, 38.095% 0%, 40.476% 100%, 42.857% 0%, 45.238% 100%, 47.619% 0%, 50% 100%, 52.381% 0%, 54.762% 100%, 57.143% 0%, 59.524% 100%, 61.905% 0%, 64.286% 100%, 66.667% 0%, 69.048% 100%, 71.429% 0%, 73.81% 100%, 76.19% 0%, 78.571% 100%, 80.952% 0%, 83.333% 100%, 85.714% 0%, 88.095% 100%, 90.476% 0%, 92.857% 100%, 95.238% 0%, 97.619% 100%, 100% 0%, 100% 100%, 0% 100%);
  }

  .pg-index .flow-section { background:#E7DFCC; color:#20190C; border-bottom:none; position:relative; }
  .pg-index .flow-section::before { background:#0F0D0A; }
  .pg-index .flow-section::after { background:#E7DFCC; }
  .pg-index .flow-section .section-head { color:#7A6A3A; }
  .pg-index .flow-section .section-title { color:#20190C; }
  .pg-index .flow-section .flow-step .d { color:#5A5038; }

  .pg-index .tester-section { background:#0F0D0A; border-bottom:none; position:relative; }
  .pg-index .tester-section::before { background:#E7DFCC; }
  .pg-index .tester-section::after { background:#0F0D0A; }

  .pg-index .dev-section { background:#E7DFCC; color:#20190C; border-bottom:none; position:relative; }
  .pg-index .dev-section::before { background:#0F0D0A; }
  .pg-index .dev-section::after { background:#E7DFCC; }
  .pg-index .dev-section .section-head { color:#7A6A3A; }
  .pg-index .dev-section .flow-step .d { color:#5A5038; }
  .pg-index .dev-section .tiers { background:#CBBB92; border-color:#CBBB92; }
  .pg-index .dev-section .tier { background:linear-gradient(165deg,#EDE6D4,#E7DFCC 60%); }
  .pg-index .dev-section .tier:hover { box-shadow:0 10px 24px rgba(90,70,20,.14); }
  .pg-index .dev-section .tier.highlight { border-top-color:#A6791C; }
  .pg-index .dev-section .tier-icon { color:#A6791C; background:linear-gradient(155deg,rgba(166,121,28,.16),rgba(166,121,28,.04)); border-color:rgba(166,121,28,.3); }
  .pg-index .dev-section .tier .badge { color:#A6791C; border-color:#A6791C; }
  .pg-index .dev-section .tier .price { color:#A6791C; }
  .pg-index .dev-section .tier .price span { color:#7A6A3A; }
  .pg-index .dev-section .tier p { color:#4A4025; }
  .pg-index .dev-section .tier ul { color:#5A4E36; }
  .pg-index .dev-section .tier ul li::before { color:#A6791C; }

  /* Bottom sections are gated to whichever audience is active in the hero
     tabs, same idea as the hero panels themselves. */
  .pg-index .audience-hidden { display:none; }

  /* Footer always stays the same dark chip as the header, regardless of
     which audience tab is active -- the torn-seam bottom edge still
     matches whichever section sits directly above it, but the footer bar
     itself no longer flips to a pale background. */
  .pg-index footer { padding:56px 48px 36px; font-family:'Courier New',monospace; font-size:12px; font-weight:600; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; position:relative; background:#0F0D0A; color:#6B6249; }
  .pg-index .footer-tester-theme::before { background:#0F0D0A; }
  .pg-index .footer-tester-theme::after { background:#0F0D0A; }
  .pg-index .footer-dev-theme::before { background:#E7DFCC; }
  .pg-index .footer-dev-theme::after { background:#0F0D0A; }

  /* Brief fade/rise-in as sections enter the viewport. */
  .pg-index .reveal { opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
  .pg-index .reveal.in-view { opacity:1; transform:translateY(0); }

  @media (prefers-reduced-motion: reduce) {
    .pg-index .reveal { transition:none; }
    .pg-index .hero-cta { transition:none; }
  }

  /* ---- "Get the app" platform picker ---- */
  .pg-index .app-modal-overlay { position:fixed; inset:0; background:rgba(15,13,10,0.72); display:none; align-items:center; justify-content:center; z-index:500; padding:24px; }
  .pg-index .app-modal-overlay.on { display:flex; }
  .pg-index .app-modal { background:#171308; border:1px solid #2A241A; border-radius:6px; width:100%; max-width:380px; padding:26px; }
  .pg-index .app-modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
  .pg-index .app-modal-head span { font-size:17px; color:#EDE7DA; }
  .pg-index .app-modal-close { background:none; border:none; color:#8C8474; font-size:22px; line-height:1; cursor:pointer; padding:4px; }
  .pg-index .app-modal-close:hover { color:#EDE7DA; }
  .pg-index .app-modal-options { display:flex; flex-direction:column; gap:10px; }
  .pg-index .app-modal-option { display:flex; flex-direction:column; gap:3px; padding:16px 18px; border:1px solid #2A241A; border-radius:4px; text-decoration:none; transition:border-color .15s ease, background .15s ease; }
  .pg-index .app-modal-option:hover { border-color:#D8AE4F; background:rgba(216,174,79,0.06); }
  .pg-index .app-modal-option-name { font-size:15px; color:#EDE7DA; font-weight:600; }
  .pg-index .app-modal-option-sub { font-family:'Courier New',monospace; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#93897A; }
  .pg-index .app-modal-option-disabled { cursor:default; opacity:0.55; }
  .pg-index .app-modal-option-disabled:hover { border-color:#2A241A; background:none; }

  /* ---- mobile (phones/small tablets) ----
     Header B from the design pass: only the secondary nav links (For
     developers/testers, Pricing, Docs) fold into the burger dropdown. The
     hero's own tester/developer tab pill isn't part of the header at all,
     it already sits in the hero and stays visible either way. */
  @media (max-width: 720px) {
    .pg-index header { padding:16px 20px; flex-wrap:wrap; }
    .pg-index .nav-burger { display:block; }
    .pg-index .queue-status { display:none; }
    .pg-index nav {
      order:3; width:100%; flex-direction:column; gap:0; max-height:0; overflow:hidden;
      transition:max-height .25s ease; margin-top:0;
    }
    .pg-index nav.open { max-height:220px; margin-top:16px; }
    .pg-index nav a { padding:12px 2px; border-top:1px solid #2A241A; }

    .pg-index .hero { padding:52px 20px 56px; }
    .pg-index .hero-glow { width:380px; height:380px; top:-140px; right:-120px; }
    .pg-index .hero-tabs { margin-bottom:28px; }
    .pg-index .hero-tab { padding:8px 14px; font-size:11px; }
    .pg-index .hero-panel h1 { font-size:27px; }
    .pg-index .hero-panel p { font-size:14px; }
    .pg-index .hero-cta-row { flex-direction:column; align-items:stretch; gap:10px; }
    .pg-index .hero-cta, .pg-index .hero-cta-ghost { text-align:center; }

    .pg-index section { padding:44px 20px; }
    .pg-index .section-title { font-size:21px; margin-bottom:30px; }

    .pg-index .flow { grid-template-columns:1fr; gap:22px; }
    .pg-index .flow-step { padding-right:0; }

    .pg-index .economy, .pg-index .tiers { grid-template-columns:1fr; }

    .pg-index footer { padding:36px 20px 28px; flex-direction:column; align-items:flex-start; gap:6px; }
  }

/* ── admin.html ─────────────────────────────────────────────── */
  /*
    Palette is the same CSS variable system already live in
    templates/developer.html (#app / #app[data-mode]), reused verbatim
    rather than reinvented, so admin stops being the one surface on the
    site with an unrelated purple Tailwind theme. Defaults to the dark
    tester-side palette (the "one true theme" everywhere else) with the
    same light/dark toggle developer.html offers, for pattern parity
    between the two internal-facing portals.
  */
  .pg-admin #app {
    --bg: #E7DFCC;
    --ink: #20190C;
    --ink-soft: #4A4025;
    --ink-faint: #7A6A3A;
    --rule: #CBBB92;
    --gold: #A6791C;
    --gold-contrast: #E7DFCC;
    --btn-primary-bg: #20190C;
    --btn-primary-fg: #E7DFCC;
    --success: #3F7D53;
    --success-bg: rgba(63,125,83,0.12);
    --warning: #A66A1C;
    --warning-bg: rgba(166,106,28,0.12);
    --danger: #A6402F;
    --danger-bg: rgba(166,64,47,0.12);
    --info: #3E6E8C;
    --info-bg: rgba(62,110,140,0.12);
  }
  .pg-admin #app[data-mode="dark"] {
    --bg: #0F0D0A;
    --ink: #EDE7DA;
    --ink-soft: #B8AF9C;
    --ink-faint: #8C6A1D;
    --rule: #2A241A;
    --gold: #D8AE4F;
    --gold-contrast: #171205;
    --btn-primary-bg: #D8AE4F;
    --btn-primary-fg: #171205;
    --success: #7EBF83;
    --success-bg: rgba(126,191,131,0.14);
    --warning: #D97706;
    --warning-bg: rgba(217,119,6,0.14);
    --danger: #E5484D;
    --danger-bg: rgba(229,72,77,0.14);
    --info: #5B9BD5;
    --info-bg: rgba(91,155,213,0.14);
  }

  body.pg-admin { background: #0F0D0A; }

  .pg-admin #app {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
  }

  .pg-admin h1, .pg-admin h2, .pg-admin h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
  .pg-admin .mono { font-family: 'Courier New', monospace; }
  .pg-admin em { font-style: italic; }
  .pg-admin .hidden { display: none !important; }

  /* ---- login ---- */
  .pg-admin .login-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
  .pg-admin .login-card { width: 100%; max-width: 360px; }
  .pg-admin .login-card .wordmark { font-size: 24px; margin-bottom: 4px; }
  .pg-admin .login-card .wordmark em { color: var(--gold); }
  .pg-admin .login-card .sub { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 36px; }
  .pg-admin .field { margin-bottom: 16px; }
  .pg-admin .field label { display: block; font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
  .pg-admin .field input, .pg-admin select, .pg-admin textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--rule); color: var(--ink);
    padding: 11px 13px; font-size: 14px; font-family: inherit; border-radius: 3px;
  }
  .pg-admin select { padding: 8px 10px; font-size: 13px; }
  .pg-admin .field input:focus, .pg-admin select:focus, .pg-admin textarea:focus { outline: none; border-color: var(--gold); }
  .pg-admin textarea { resize: vertical; }
  .pg-admin .btn { font-family: -apple-system, sans-serif; font-weight: 600; font-size: 13.5px; padding: 12px 20px; border-radius: 3px; border: none; cursor: pointer; }
  .pg-admin .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .pg-admin .btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
  .pg-admin .btn-success { background: var(--success); color: var(--gold-contrast); }
  .pg-admin .btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
  .pg-admin .btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--rule); }
  .pg-admin .btn-block { width: 100%; }
  .pg-admin .btn-tiny { font-size: 11.5px; padding: 6px 12px; }
  .pg-admin .login-card .btn { margin-top: 8px; }
  .pg-admin .login-foot { margin-top: 22px; font-size: 12px; color: var(--danger); text-align: center; }

  /* ---- shell ---- */
  .pg-admin .topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--bg); z-index: 40; }
  .pg-admin .topbar .brand { display: flex; align-items: center; gap: 12px; }
  .pg-admin .topbar .wordmark { font-size: 16px; }
  .pg-admin .topbar .wordmark em { color: var(--gold); }
  .pg-admin .topbar .tag { font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); border-left: 1px solid var(--rule); padding-left: 12px; }
  .pg-admin .topbar .who { display: flex; align-items: center; gap: 14px; }
  .pg-admin .topbar .who span { font-size: 13px; color: var(--ink-soft); }

  .pg-admin .theme-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
  .pg-admin .theme-toggle button {
    font-family: 'Courier New', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: none; border: none; color: var(--ink-faint); padding: 6px 13px; border-radius: 999px; cursor: pointer;
  }
  .pg-admin .theme-toggle button.on { background: var(--gold); color: var(--gold-contrast); }
  .pg-admin .theme-toggle button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  .pg-admin .wrap { max-width: 1280px; margin: 0 auto; padding: 28px 32px 60px; }

  .pg-admin .stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 28px; }
  .pg-admin .stat-card { background: var(--bg); padding: 20px 22px; }
  .pg-admin .stat-card .k { font-family: 'Courier New', monospace; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
  .pg-admin .stat-card .v { font-family: 'Courier New', monospace; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pg-admin .stat-card .v.warn { color: var(--warning); }
  @media (max-width: 900px) { .pg-admin .stat-row { grid-template-columns: repeat(2, 1fr); } }

  .pg-admin .tabs { display: inline-flex; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px; margin-bottom: 24px; flex-wrap: wrap; }
  .pg-admin .tab-btn {
    font-family: 'Courier New', monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: none; border: none; color: var(--ink-faint); padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  }
  .pg-admin .tab-btn.on { background: var(--gold); color: var(--gold-contrast); }
  .pg-admin .tab-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  .pg-admin .pane { display: none; }
  .pg-admin .pane.on { display: block; }

  .pg-admin .panel { background: var(--bg); border: 1px solid var(--rule); padding: 22px 24px; }
  .pg-admin .panel + .panel { margin-top: 20px; }
  .pg-admin .panel h3 { font-size: 15px; margin-bottom: 4px; }
  .pg-admin .panel .desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }
  .pg-admin .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }

  .pg-admin .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .pg-admin .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  @media (max-width: 860px) { .pg-admin .grid-2 { grid-template-columns: 1fr; } .pg-admin .grid-3 { grid-template-columns: 1fr; } }
  .pg-admin .form-stack { display: flex; flex-direction: column; gap: 12px; }
  .pg-admin .check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }

  /* ---- table ---- */
  .pg-admin .table-wrap { overflow-x: auto; }
  .pg-admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .pg-admin th { font-family: 'Courier New', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); font-weight: 600; }
  .pg-admin td { padding: 12px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
  .pg-admin tr:hover td { background: rgba(166,121,28,0.06); }
  .pg-admin td.name-cell { font-family: Georgia, serif; font-variant-numeric: normal; }
  .pg-admin .row-thumb { width: 56px; height: 30px; border-radius: 3px; object-fit: cover; vertical-align: middle; margin-right: 8px; }

  .pg-admin .pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-family: 'Courier New', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .pg-admin .pill-success { background: var(--success-bg); color: var(--success); }
  .pg-admin .pill-warning { background: var(--warning-bg); color: var(--warning); }
  .pg-admin .pill-danger { background: var(--danger-bg); color: var(--danger); }
  .pg-admin .pill-info { background: var(--info-bg); color: var(--info); }
  .pg-admin .pill-neutral { background: var(--rule); color: var(--ink-soft); }

  .pg-admin .bar { height: 6px; background: var(--rule); border-radius: 999px; overflow: hidden; }
  .pg-admin .bar-fill { height: 100%; background: var(--gold); transition: width .3s ease; }

  /* ---- item lists (feedback, applications, cosmetics, announcements) ---- */
  .pg-admin .item-list { max-height: 520px; overflow-y: auto; }
  .pg-admin .item-list.short { max-height: 340px; }
  .pg-admin .list-item { border: 1px solid var(--rule); border-radius: 3px; padding: 14px 16px; margin-bottom: 10px; }
  .pg-admin .list-item:last-child { margin-bottom: 0; }
  .pg-admin .list-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; gap: 12px; flex-wrap: wrap; }
  .pg-admin .list-item .who { font-weight: 600; font-size: 13px; }
  .pg-admin .list-item .meta { font-size: 11.5px; color: var(--ink-faint); }
  .pg-admin .list-item .stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; flex-shrink: 0; }
  .pg-admin .list-item .stars .off { color: var(--rule); }
  .pg-admin .list-item .comment { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 10px; }
  .pg-admin .list-item .actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
  .pg-admin .list-item .flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
  .pg-admin .list-item .ai-reason { font-size: 11px; color: var(--ink-faint); font-style: italic; margin: 0 0 8px; }

  /* ---- feedback tab: status/flag filters ---- */
  .pg-admin .fb-filters { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
  .pg-admin .fb-filters .theme-toggle button { padding: 6px 14px; font-size: 11.5px; }
  .pg-admin .fb-flag-toggle { display: inline-flex; align-items: center; gap: 7px; font-family: 'Courier New', monospace; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; user-select: none; }
  .pg-admin .fb-flag-toggle input { accent-color: var(--gold); width: 14px; height: 14px; }
  .pg-admin .list-item.with-thumb { display: flex; gap: 12px; }
  .pg-admin .app-thumb { width: 84px; height: 46px; border-radius: 2px; flex-shrink: 0; background: var(--rule); object-fit: cover; }
  .pg-admin .empty-note { font-size: 13px; color: var(--ink-faint); text-align: center; padding: 32px 0; }

  /* ---- developer invites ---- */
  .pg-admin .inv-hint { font-family: 'Courier New', monospace; font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; min-height: 16px; word-break: break-all; }
  .pg-admin .inv-warn { font-size: 12px; color: var(--warning); background: var(--warning-bg); padding: 8px 12px; border-radius: 3px; margin: 10px 0 14px; }
  .pg-admin .inv-out { display: flex; gap: 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .pg-admin .inv-out .k { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); width: 64px; flex-shrink: 0; }
  .pg-admin .inv-out .v { font-size: 13px; word-break: break-all; }
  .pg-admin .inv-code { font-size: 22px !important; font-weight: 700; letter-spacing: .25em; color: var(--gold); }
  .pg-admin .inv-none { color: var(--ink-faint); }
  .pg-admin .inv-label { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
  .pg-admin .inv-media { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
  .pg-admin .inv-capsule { width: 100%; aspect-ratio: 460/215; object-fit: cover; display: block; border: 1px solid var(--rule); border-radius: 3px; }
  .pg-admin .inv-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pg-admin .inv-shots img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border: 1px solid var(--rule); border-radius: 3px; }
  .pg-admin .inv-ph { border: 1px dashed var(--rule); border-radius: 3px; padding: 22px; text-align: center; font-size: 12.5px; color: var(--ink-faint); }
  .pg-admin .inv-dl { margin: 0; }
  .pg-admin .inv-kv { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
  .pg-admin .inv-kv dt { color: var(--ink-faint); flex-shrink: 0; }
  .pg-admin .inv-kv dd { margin: 0; text-align: right; word-break: break-word; min-width: 0; }
  .pg-admin .inv-kv a, .pg-admin #inv-detail a { color: var(--gold); }
  .pg-admin .inv-focus { font-size: 13px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; border-left: 2px solid var(--rule); padding-left: 12px; margin: 0; }
  .pg-admin #inv-d-title { display: flex; align-items: center; gap: 10px; }
  .pg-admin .grid-2 > .panel + .panel { margin-top: 0; }
  @media (max-width: 860px) { .pg-admin .inv-media { grid-template-columns: 1fr; } }

  .pg-admin .cosm-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px; margin-bottom: 8px; }
  .pg-admin .cosm-row:last-child { margin-bottom: 0; }
  .pg-admin .cosm-thumb { width: 40px; height: 40px; border-radius: 6px; background: var(--rule); flex-shrink: 0; object-fit: cover; }
  .pg-admin .cosm-row .name { font-weight: 600; font-size: 13px; }
  .pg-admin .cosm-row .sub { font-size: 11.5px; color: var(--ink-faint); }

  .pg-admin .audit-item { font-family: 'Courier New', monospace; font-size: 11.5px; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px; margin-bottom: 6px; }
  .pg-admin .audit-item .action { color: var(--gold); }
  .pg-admin .audit-item .stamp { display: block; font-size: 10px; color: var(--ink-faint); margin-top: 3px; }

  .pg-admin pre.health { background: rgba(0,0,0,0.15); border: 1px solid var(--rule); border-radius: 3px; padding: 14px; font-size: 11.5px; color: var(--ink-soft); white-space: pre-wrap; }

  /* ---- toast: fixed dark chip regardless of page theme ---- */
  .pg-admin .toast { position: fixed; bottom: 24px; right: 24px; background: #0F0D0A; color: #EDE7DA; padding: 13px 20px; border-radius: 3px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; z-index: 300; max-width: 360px; }
  .pg-admin .toast.on { opacity: 1; transform: translateY(0); }
  .pg-admin .toast .dot { width: 7px; height: 7px; border-radius: 50%; background: #7EBF83; flex-shrink: 0; }
  .pg-admin .toast.err .dot { background: #E5484D; }

  @media (prefers-reduced-motion: reduce) {
    .pg-admin .toast { transition: none; }
  }

/* ── developer.html ─────────────────────────────────────────── */
  /*
    Palette is the literal dev-half/tester-half hex values from the
    marketing homepage (templates/index.html), not a lookalike. Light is
    the dev-side parchment palette, dark is the tester-side palette. Scoped
    to #app rather than :root/[data-theme] so this in-product toggle can't
    collide with anything else that might read [data-theme] on this page.
  */
  .pg-developer #app {
    --bg: #E7DFCC;
    --ink: #20190C;
    --ink-soft: #4A4025;
    --ink-faint: #7A6A3A;
    --rule: #CBBB92;
    --gold: #A6791C;
    --gold-contrast: #E7DFCC;
    --btn-primary-bg: #20190C;
    --btn-primary-fg: #E7DFCC;
    --success: #3F7D53;
    --success-bg: rgba(63,125,83,0.12);
    --warning: #A66A1C;
    --warning-bg: rgba(166,106,28,0.12);
    --danger: #A6402F;
    --danger-bg: rgba(166,64,47,0.12);
    --info: #3E6E8C;
    --info-bg: rgba(62,110,140,0.12);
  }
  .pg-developer #app[data-mode="dark"] {
    --bg: #0F0D0A;
    --ink: #EDE7DA;
    --ink-soft: #B8AF9C;
    --ink-faint: #8C6A1D;
    --rule: #2A241A;
    --gold: #D8AE4F;
    --gold-contrast: #171205;
    --btn-primary-bg: #D8AE4F;
    --btn-primary-fg: #171205;
    --success: #7EBF83;
    --success-bg: rgba(126,191,131,0.14);
    --warning: #D97706;
    --warning-bg: rgba(217,119,6,0.14);
    --danger: #E5484D;
    --danger-bg: rgba(229,72,77,0.14);
    --info: #5B9BD5;
    --info-bg: rgba(91,155,213,0.14);
  }

  body.pg-developer { background: #E7DFCC; }

  .pg-developer #app {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
  }

  .pg-developer h1, .pg-developer h2, .pg-developer h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
  .pg-developer .mono { font-family: 'Courier New', monospace; }
  .pg-developer em { font-style: italic; }
  .pg-developer a { color: inherit; }

  .pg-developer .hidden { display: none !important; }

  /* ---- login ---- */
  .pg-developer .login-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; }
  .pg-developer .login-home-link { position: absolute; top: 28px; left: 32px; font-size: 15px; text-decoration: none; color: var(--ink); }
  .pg-developer .login-home-link em { color: var(--gold); }
  .pg-developer .login-home-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
  .pg-developer .login-card { width: 100%; max-width: 360px; }
  .pg-developer .login-card .wordmark { font-size: 24px; margin-bottom: 4px; }
  .pg-developer .login-card .wordmark em { color: var(--gold); }
  .pg-developer .login-card .sub { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 36px; }
  .pg-developer .field { margin-bottom: 16px; }
  .pg-developer .field label { display: block; font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
  .pg-developer .field input, .pg-developer select, .pg-developer textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--rule); color: var(--ink);
    padding: 11px 13px; font-size: 14px; font-family: inherit; border-radius: 3px;
  }
  .pg-developer select { padding: 8px 10px; font-size: 13px; }
  .pg-developer .field input:focus, .pg-developer select:focus, .pg-developer textarea:focus { outline: none; border-color: var(--gold); }
  .pg-developer .btn { font-family: -apple-system, sans-serif; font-weight: 600; font-size: 13.5px; padding: 12px 20px; border-radius: 3px; border: none; cursor: pointer; }
  .pg-developer .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .pg-developer .btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
  .pg-developer .btn-dark { background: #20190C; color: #E7DFCC; }
  .pg-developer #app[data-mode="dark"] .btn-dark { background: #0F0D0A; color: #EDE7DA; border: 1px solid var(--rule); }
  .pg-developer .btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--rule); }
  .pg-developer .btn-block { width: 100%; }
  .pg-developer .btn-tiny { font-size: 11.5px; padding: 6px 12px; }
  .pg-developer .login-card .btn { margin-top: 8px; }
  .pg-developer .login-foot { margin-top: 22px; font-size: 12px; color: var(--danger); text-align: center; }

  /* ---- shell ---- */
  .pg-developer .topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--bg); z-index: 40; }
  .pg-developer .topbar .brand { display: flex; align-items: center; gap: 12px; }
  .pg-developer .topbar .wordmark { font-size: 16px; }
  .pg-developer .topbar .wordmark em { color: var(--gold); }
  .pg-developer .topbar .tag { font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); border-left: 1px solid var(--rule); padding-left: 12px; }
  .pg-developer .topbar .who { display: flex; align-items: center; gap: 14px; }
  .pg-developer .topbar .who span { font-size: 13px; color: var(--ink-soft); }

  .pg-developer .theme-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
  .pg-developer .theme-toggle button {
    font-family: 'Courier New', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: none; border: none; color: var(--ink-faint); padding: 6px 13px; border-radius: 999px; cursor: pointer;
  }
  .pg-developer .theme-toggle button.on { background: var(--gold); color: var(--gold-contrast); }
  .pg-developer .theme-toggle button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  /* ---- profile menu ---- */
  .pg-developer .profile-menu { position: relative; }
  .pg-developer .profile-avatar {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); padding: 0; cursor: pointer;
    background: var(--gold); color: var(--gold-contrast); font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  }
  .pg-developer .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .pg-developer .profile-avatar:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  .pg-developer .profile-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 220px; z-index: 60;
    background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 14px; box-shadow: 0 8px 24px rgba(32,25,12,0.16);
  }
  .pg-developer .profile-dropdown.on { display: block; }
  .pg-developer .pd-label { font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
  .pg-developer .pd-section { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
  .pg-developer .pd-item {
    display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    font-family: -apple-system, sans-serif; font-size: 13px; color: var(--ink); padding: 9px 6px; border-radius: 3px;
  }
  .pg-developer .pd-item:hover { background: rgba(166,121,28,0.08); }
  .pg-developer .pd-item.pd-danger { color: var(--danger); }

  /* ---- settings modal ---- */
  .pg-developer .settings-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
  .pg-developer .settings-avatar-preview {
    width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--rule); background: var(--gold); color: var(--gold-contrast);
    font-family: 'Courier New', monospace; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
  }
  .pg-developer .settings-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
  .pg-developer .settings-avatar-row .name { font-weight: 600; font-size: 14px; }
  .pg-developer .settings-avatar-row .hint { font-size: 12px; color: var(--ink-faint); }
  .pg-developer .settings-block { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
  .pg-developer .settings-block:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .pg-developer .settings-inline { display: flex; gap: 8px; align-items: flex-start; }
  .pg-developer .settings-inline .field { flex: 1; margin-bottom: 0; }
  .pg-developer .settings-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 10px; }
  .pg-developer input[type="file"] { padding: 8px; font-size: 12.5px; }

  .pg-developer .wrap { max-width: 1280px; margin: 0 auto; padding: 28px 32px 60px; }

  .pg-developer .welcome { font-size: 22px; margin-bottom: 22px; }
  .pg-developer .welcome em { font-style: italic; color: var(--gold); }

  .pg-developer .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 28px; }
  .pg-developer .stat-card { background: var(--bg); padding: 20px 22px; }
  .pg-developer .stat-card .k { font-family: 'Courier New', monospace; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
  .pg-developer .stat-card .v { font-family: 'Courier New', monospace; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pg-developer .stat-card .v small { font-size: 13px; color: var(--success); font-weight: 600; margin-left: 6px; }

  .pg-developer .tabs { display: inline-flex; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px; margin-bottom: 24px; flex-wrap: wrap; }
  .pg-developer .tab-btn {
    font-family: 'Courier New', monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: none; border: none; color: var(--ink-faint); padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  }
  .pg-developer .tab-btn.on { background: var(--gold); color: var(--gold-contrast); }
  .pg-developer .tab-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  .pg-developer .pane { display: none; }
  .pg-developer .pane.on { display: block; }

  .pg-developer .panel { background: var(--bg); border: 1px solid var(--rule); padding: 22px 24px; }
  .pg-developer .panel + .panel { margin-top: 20px; }
  .pg-developer .panel h3 { font-size: 15px; margin-bottom: 4px; }
  .pg-developer .panel .desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }
  .pg-developer .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

  .pg-developer .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  @media (max-width: 860px) { .pg-developer .grid-2 { grid-template-columns: 1fr; } .pg-developer .stat-row { grid-template-columns: 1fr 1fr; } }

  /* ---- charts (no library, plain css primitives, computed from live data) ---- */
  .pg-developer .chart-title { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
  .pg-developer .empty-note { font-size: 12.5px; color: var(--ink-faint); padding: 10px 0; }

  .pg-developer .donut-row { display: flex; align-items: center; gap: 24px; }
  .pg-developer .donut { width: 128px; height: 128px; border-radius: 50%; flex-shrink: 0; position: relative; }
  .pg-developer .donut::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--bg); }
  .pg-developer .donut-legend { display: flex; flex-direction: column; gap: 9px; }
  .pg-developer .donut-legend .row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
  .pg-developer .donut-legend .sw { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
  .pg-developer .donut-legend .num { margin-left: auto; font-family: 'Courier New', monospace; font-variant-numeric: tabular-nums; color: var(--ink-soft); padding-left: 14px; }

  .pg-developer .hbar-list { display: flex; flex-direction: column; gap: 14px; }
  .pg-developer .hbar-row .label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
  .pg-developer .hbar-row .label .n { font-family: 'Courier New', monospace; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .pg-developer .hbar-track { height: 8px; background: var(--rule); border-radius: 2px; overflow: hidden; display: flex; }
  .pg-developer .hbar-seg { height: 100%; }

  .pg-developer .stacked-row { margin-bottom: 16px; }
  .pg-developer .stacked-row:last-child { margin-bottom: 0; }
  .pg-developer .stacked-row .label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
  .pg-developer .stacked-row .label .n { font-family: 'Courier New', monospace; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .pg-developer .stacked-track { height: 14px; background: var(--rule); border-radius: 2px; overflow: hidden; display: flex; }
  .pg-developer .stacked-seg { height: 100%; }

  .pg-developer .chart-legend-inline { display: flex; gap: 16px; margin-top: 12px; font-size: 11.5px; color: var(--ink-soft); }
  .pg-developer .chart-legend-inline .row { display: flex; align-items: center; gap: 6px; }
  .pg-developer .chart-legend-inline .sw { width: 9px; height: 9px; border-radius: 2px; }

  .pg-developer .rate-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
  .pg-developer .rate-row:last-child { margin-bottom: 0; }
  .pg-developer .rate-row .name { width: 110px; font-size: 12.5px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pg-developer .rate-track { flex: 1; height: 10px; background: var(--rule); border-radius: 2px; overflow: hidden; }
  .pg-developer .rate-fill { height: 100%; }
  .pg-developer .rate-row .pct { width: 40px; text-align: right; font-family: 'Courier New', monospace; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

  /* ---- table ---- */
  .pg-developer .table-wrap { overflow-x: auto; }
  .pg-developer table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .pg-developer th { font-family: 'Courier New', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); font-weight: 600; }
  .pg-developer td { padding: 12px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
  .pg-developer tr:hover td { background: rgba(166,121,28,0.06); }
  .pg-developer td.game-name { font-family: Georgia, serif; font-variant-numeric: normal; }

  .pg-developer .pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-family: 'Courier New', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .pg-developer .pill-success { background: var(--success-bg); color: var(--success); }
  .pg-developer .pill-warning { background: var(--warning-bg); color: var(--warning); }
  .pg-developer .pill-danger { background: var(--danger-bg); color: var(--danger); }
  .pg-developer .pill-info { background: var(--info-bg); color: var(--info); }
  .pg-developer .pill-neutral { background: var(--rule); color: var(--ink-soft); }
  .pg-developer .bar { height: 6px; background: var(--rule); border-radius: 999px; overflow: hidden; }
  .pg-developer .bar-fill { height: 100%; background: var(--gold); transition: width .3s ease; }

  /* ---- feedback ---- */
  .pg-developer .fb-list { max-height: 600px; overflow-y: auto; }
  .pg-developer .fb-item { border: 1px solid var(--rule); border-radius: 3px; padding: 14px 16px; margin-bottom: 10px; }
  .pg-developer .fb-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; gap: 12px; }
  .pg-developer .fb-item .who { font-weight: 600; font-size: 13px; }
  .pg-developer .fb-item .stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; flex-shrink: 0; }
  .pg-developer .fb-item .stars .off { color: var(--rule); }
  .pg-developer .fb-item .comment { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }

  /* ---- applications ---- */
  .pg-developer .app-list { max-height: 500px; overflow-y: auto; }
  .pg-developer .app-item { display: flex; gap: 12px; border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; margin-bottom: 10px; }
  .pg-developer .app-thumb { width: 84px; height: 46px; border-radius: 2px; flex-shrink: 0; background: var(--rule); object-fit: cover; }
  .pg-developer .app-info { min-width: 0; }
  .pg-developer .app-info .name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
  .pg-developer .app-info .name { font-weight: 600; font-size: 13px; }
  .pg-developer .app-info .meta { font-size: 11.5px; color: var(--ink-faint); }
  .pg-developer .app-info .note { font-size: 11.5px; color: var(--ink-soft); font-style: italic; margin-top: 4px; }
  .pg-developer .steam-preview { width: 100%; border-radius: 3px; margin-bottom: 14px; }

  /* ---- modal ---- */
  .pg-developer .modal-overlay { position: fixed; inset: 0; background: rgba(15,13,10,0.55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
  .pg-developer .modal-overlay.on { display: flex; }
  .pg-developer .modal-box { background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 26px; width: 100%; max-width: 420px; }
  .pg-developer .modal-box .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
  .pg-developer .modal-box h3 { font-size: 16px; }
  .pg-developer .modal-box .close { background: none; border: none; font-size: 20px; color: var(--ink-faint); cursor: pointer; line-height: 1; }
  .pg-developer .modal-box .row { display: flex; gap: 10px; margin-top: 16px; }
  .pg-developer .modal-box .row .btn { flex: 1; }

  /* ---- toast: fixed dark chip regardless of page theme ---- */
  .pg-developer .toast { position: fixed; bottom: 24px; right: 24px; background: #0F0D0A; color: #EDE7DA; padding: 13px 20px; border-radius: 3px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; z-index: 300; max-width: 360px; }
  .pg-developer .toast.on { opacity: 1; transform: translateY(0); }
  .pg-developer .toast .dot { width: 7px; height: 7px; border-radius: 50%; background: #7EBF83; flex-shrink: 0; }
  .pg-developer .toast.err .dot { background: #E5484D; }

  @media (prefers-reduced-motion: reduce) {
    .pg-developer .toast { transition: none; }
  }
