/* =============================================================================
   Gunerbob Control - "Graph Pad"
   Flat, simple, squared. Ink on paper with a faint graph grid in the gutters.
   No rounded corners, no shadows, no gradients - just ruled boxes like a
   notepad / engineering chart. Two restrained highlights: a red pen accent and
   a yellow highlighter. Category navigation is pure CSS (:target / :has).
   ============================================================================= */

:root {
    --paper: #f4f3ec;     /* page */
    --card: #fbfbf6;      /* boxes (cover the grid) */
    --grid: #e2e3d8;      /* faint graph lines */

    --ink: #20232a;       /* primary text / borders */
    --ink-soft: #595d66;
    --ink-faint: #989ca4;

    --rule: #c9cabf;      /* thin ruled borders */
    --rule-bold: #20232a; /* header underlines */

    --accent: #d8402b;    /* red pen */
    --marker: #ffe45c;    /* highlighter */
    --marker-soft: #fff4ab;

    --font-title: "Newsreader", Georgia, serif;
    --font-mono: "JetBrains Mono", monospace;
    --font-body: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

::selection { background: var(--marker); color: var(--ink); }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }

/* Graph-paper grid (only shows in gutters; cards paint over it) */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.fx-paper {
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -1px -1px;
}

/* -----------------------------------------------------------------------------
   Top bar
   ----------------------------------------------------------------------------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.7rem 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-bold);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-mark { width: 13px; height: 13px; background: var(--accent); }
.brand-word { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--ink); }
.brand-sub { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.topbar-right { display: inline-flex; align-items: center; gap: 0.9rem; }
.who { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-soft); }
.who-dev { color: var(--accent); }

/* -----------------------------------------------------------------------------
   Strips
   ----------------------------------------------------------------------------- */
.strip {
    position: relative; z-index: 10;
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.5rem 1.5rem; font-size: 0.8rem; font-family: var(--font-mono);
    border-bottom: 1px solid var(--rule);
}
.strip-tag { font-weight: 700; letter-spacing: 0.1em; padding: 0.1rem 0.45rem; font-size: 0.66rem; }
.strip-dev { background: var(--marker-soft); color: #6b5400; }
.strip-dev .strip-tag { background: var(--marker); color: var(--ink); }
.strip-warn { background: #fbe1dc; color: #9a2a1a; }
.strip-warn .strip-tag { background: var(--accent); color: #fff; }

/* -----------------------------------------------------------------------------
   Layout
   ----------------------------------------------------------------------------- */
.content { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.footer {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    padding: 1.5rem; color: var(--ink-faint);
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.footer-dot { width: 7px; height: 7px; background: var(--accent); }

/* No entrance animations - flat and instant, nothing to get stuck. */
.rise { opacity: 1; }

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; cursor: pointer;
    border: 1px solid var(--ink); transition: background 0.12s ease, color 0.12s ease;
}
.btn-primary { color: var(--paper); background: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { color: var(--ink); background: var(--card); }
.btn-ghost:hover { background: var(--marker); }

/* -----------------------------------------------------------------------------
   Console shell: rail + main
   ----------------------------------------------------------------------------- */
.console { display: grid; grid-template-columns: 232px 1fr; gap: 1.4rem; align-items: start; }

.rail { position: sticky; top: 80px; background: var(--card); border: 1px solid var(--rule-bold); padding: 1rem 0.9rem; }
.rail-head { padding: 0.1rem 0.3rem 0.8rem; border-bottom: 1px solid var(--rule); margin-bottom: 0.8rem; }
.rail-server { font-family: var(--font-title); font-weight: 600; font-size: 1.5rem; line-height: 1.05; color: var(--ink); word-break: break-word; }
.rail-guild { font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-faint); margin-top: 0.25rem; word-break: break-all; }

.rail-nav { display: flex; flex-direction: column; }
.navlink {
    --bar: transparent;
    position: relative;
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.6rem 0.5rem 0.8rem;
    text-decoration: none; color: var(--ink-soft);
    font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em;
    border-bottom: 1px solid var(--rule);
    transition: background 0.12s ease, color 0.12s ease;
}
.navlink:first-child { border-top: 1px solid var(--rule); }
.navlink::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; background: var(--bar); }
.navlink .ic { width: 17px; height: 17px; color: var(--ink-faint); flex: none; }
.navlink-label { flex: 1; }
.navlink:hover { background: var(--paper); color: var(--ink); }
.navcount { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.navdot { width: 8px; height: 8px; border: 1px solid var(--ink-faint); }
.navdot.on { background: var(--accent); border-color: var(--accent); }

.rail-back { display: inline-block; margin-top: 0.9rem; padding: 0.3rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); text-decoration: none; }
.rail-back:hover { color: var(--accent); }

/* Active nav (driven by which view is targeted) */
.console:not(:has(.view:target)) .navlink[href="#overview"],
.console:has(#overview:target) .navlink[href="#overview"],
.console:has(#welcome:target) .navlink[href="#welcome"],
.console:has(#twitch:target) .navlink[href="#twitch"],
.console:has(#commands:target) .navlink[href="#commands"],
.console:has(#toggles:target) .navlink[href="#toggles"],
.console:has(#filters:target) .navlink[href="#filters"],
.console:has(#reactions:target) .navlink[href="#reactions"] {
    --bar: var(--accent);
    background: var(--marker);
    color: var(--ink);
}
.console:not(:has(.view:target)) .navlink[href="#overview"] .ic,
.console:has(#overview:target) .navlink[href="#overview"] .ic,
.console:has(#welcome:target) .navlink[href="#welcome"] .ic,
.console:has(#twitch:target) .navlink[href="#twitch"] .ic,
.console:has(#commands:target) .navlink[href="#commands"] .ic,
.console:has(#toggles:target) .navlink[href="#toggles"] .ic,
.console:has(#filters:target) .navlink[href="#filters"] .ic,
.console:has(#reactions:target) .navlink[href="#reactions"] .ic { color: var(--ink); }

/* -----------------------------------------------------------------------------
   Views (pure-CSS section switching)
   ----------------------------------------------------------------------------- */
.view { display: none; scroll-margin-top: 88px; }
.view:target { display: block; }
.stage-main:not(:has(.view:target)) > #overview { display: block; }

/* Overview hero */
.view-hero { margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule-bold); }
.view-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.3rem; }
.view-hero-title { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; color: var(--ink); }
.view-hero-status { margin-top: 0.7rem; }
.view-hero-id { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.grid-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.8rem; }

/* -----------------------------------------------------------------------------
   Category grid (flat ruled boxes)
   ----------------------------------------------------------------------------- */
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: -1px; }
.tilegrid { gap: 0; }
.tile {
    position: relative;
    display: grid; grid-template-rows: auto 1fr auto; gap: 0.6rem;
    min-height: 158px; padding: 1.1rem 1.1rem 1rem;
    text-decoration: none; color: var(--ink);
    background: var(--card); border: 1px solid var(--rule); margin: -0.5px;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.tile::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: transparent; }
.tile:hover { background: var(--paper); border-color: var(--ink); z-index: 1; }
.tile:hover::before { background: var(--accent); }
.tile-ic { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); background: var(--card); }
.tile-ic .ic { width: 21px; height: 21px; }
.tile-name { font-family: var(--font-title); font-weight: 600; font-size: 1.45rem; line-height: 1.02; align-self: end; }
.tile-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }
.tile-meta b { color: var(--ink); font-weight: 700; }
.tile-go { position: absolute; right: 0.9rem; top: 1rem; color: var(--ink-faint); transition: transform 0.12s ease, color 0.12s ease; }
.tile-go .ic { width: 16px; height: 16px; }
.tile:hover .tile-go { transform: translateX(3px); color: var(--accent); }
.dotline { display: inline-flex; align-items: center; gap: 0.4rem; }
.dotline::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; }
.dotline.on { color: var(--ink); }
.dotline.on::before { background: var(--accent); border-color: var(--accent); }
.dotline.off { color: var(--ink-faint); }

/* -----------------------------------------------------------------------------
   Section views: head + panels
   ----------------------------------------------------------------------------- */
.view-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule-bold); }
.view-back { order: -1; flex-basis: 100%; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); text-decoration: none; }
.view-back:hover { color: var(--accent); }
.view-title { margin: 0; display: flex; align-items: baseline; gap: 0.55rem; font-family: var(--font-title); font-weight: 600; font-size: 2rem; line-height: 1; color: var(--ink); }
.view-num { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.view-count { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-soft); }

.panel { background: var(--card); border: 1px solid var(--rule); padding: 1.3rem 1.4rem; }

/* tables - ledger / chart grid */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.82rem; }
table.data th {
    text-align: left; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-soft); font-weight: 700;
    padding: 0.5rem 0.7rem; border: 1px solid var(--rule); border-bottom: 2px solid var(--rule-bold);
    background: var(--paper);
}
table.data td { padding: 0.55rem 0.7rem; border: 1px solid var(--rule); vertical-align: middle; }
table.data tr.is-live td { background: var(--marker-soft); }
table.data tr:hover td { background: var(--paper); }
table.data tr.is-live:hover td { background: var(--marker); }
.cell-name { font-weight: 700; }
.cell-name .tw { color: var(--ink); }

/* chips - small ruled boxes */
.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; padding: 0.12rem 0.45rem; border: 1px solid var(--rule); color: var(--ink-soft); }
.chip.on { color: var(--ink); border-color: var(--ink); }
.chip.off { color: var(--ink-faint); }
.chip-dot { width: 6px; height: 6px; background: currentColor; }
.chip.on .chip-dot { background: var(--accent); }

.pill-id { color: var(--ink); }
.pill-id::before { content: "#"; color: var(--ink-faint); }
.pill-role::before { content: "@"; color: var(--ink-faint); }
.dash { color: var(--ink-faint); }

/* command cards */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 0; }
.cmd { background: var(--card); border: 1px solid var(--rule); margin: -0.5px; padding: 0.9rem 1rem; }
.cmd-name { font-family: var(--font-mono); font-weight: 700; color: var(--ink); margin-bottom: 0.4rem; }
.cmd-name::before { content: "!"; color: var(--accent); }
.cmd-body { font-family: var(--font-body); font-size: 0.98rem; line-height: 1.4; color: var(--ink-soft); word-break: break-word; }

/* filters */
.filter-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.filter-row:last-child { border-bottom: none; }
.filter-action { flex: none; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.16rem 0.5rem; border: 1px solid var(--ink); }
.filter-action.ban { color: #fff; background: var(--accent); border-color: var(--accent); }
.filter-action.block { color: var(--ink); background: var(--marker); border-color: var(--ink); }
.filter-phrase { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); word-break: break-all; }

/* welcome key/value */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.7rem 1.4rem; }
.kv dt { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); padding-top: 0.15rem; }
.kv dd { margin: 0; }
.tmpl { display: block; font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--ink); padding: 0.7rem 0.85rem; word-break: break-word; }
.empty { color: var(--ink-faint); font-style: italic; }

/* -----------------------------------------------------------------------------
   Flash messages
   ----------------------------------------------------------------------------- */
.flashes { position: relative; z-index: 10; max-width: 1140px; margin: 0.8rem auto -0.6rem; padding: 0 1.5rem; }
.flash { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.55rem 0.8rem; border: 1px solid var(--rule); border-left-width: 4px; background: var(--card); }
.flash + .flash { margin-top: 0.4rem; }
.flash-ok { border-left-color: var(--ink); }
.flash-error { border-left-color: var(--accent); background: #fbe1dc; color: #9a2a1a; }

/* -----------------------------------------------------------------------------
   Edit forms
   ----------------------------------------------------------------------------- */
.form-add { margin-bottom: 1rem; }
.form-row { display: flex; gap: 0.9rem; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-name { flex: 0 0 190px; }
.field-resp { flex: 1 1 300px; }
label { font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }

input:not([type=checkbox]), select, textarea {
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink);
    background: var(--paper); border: 1px solid var(--rule); padding: 0.45rem 0.55rem; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
select { appearance: none; cursor: pointer; padding-right: 1.6rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 0.85rem) center, calc(100% - 0.6rem) center;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

/* squared checkbox */
input[type=checkbox] { appearance: none; width: 17px; height: 17px; flex: none; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.check { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-family: var(--font-body); font-size: 1rem; color: var(--ink); }
.check span { padding-top: 1px; }

.file-input { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-soft); margin-top: 0.35rem; width: 100%; }
.file-input::file-selector-button {
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink);
    background: var(--card); border: 1px solid var(--ink); padding: 0.3rem 0.7rem;
    margin-right: 0.6rem; cursor: pointer;
}
.file-input::file-selector-button:hover { background: var(--marker); }

.hint { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); margin: 0.4rem 0 0; }
.hint b { color: var(--ink-soft); font-weight: 700; }

.form-welcome { display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start; }
.form-welcome .field { width: 100%; max-width: 560px; }
.field-state { flex: 0 0 150px; }

/* stacked edit rows (toggles, filters) */
.edit-list { display: flex; flex-direction: column; }
.row-form { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; padding: 0.6rem 0.8rem; border: 1px solid var(--rule); margin-top: -1px; background: var(--card); }
.row-key { font-family: var(--font-mono); font-weight: 700; color: var(--ink); min-width: 110px; }
.row-key::before { content: "!"; color: var(--accent); }
.row-form select { width: auto; min-width: 120px; }
.row-actions { margin-left: auto; display: flex; gap: 0.5rem; }
.phrase-input { width: auto; flex: 1 1 320px; min-width: 200px; }
.uid { font-family: var(--font-mono); font-weight: 700; color: var(--ink); min-width: 190px; }
.muted-note { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-faint); }
.row-actions form { display: inline; }

/* expandable channel editors */
.chan-list { display: flex; flex-direction: column; }
.chan { border: 1px solid var(--rule); margin-top: -1px; background: var(--card); }
.chan-sum { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; cursor: pointer; font-family: var(--font-mono); font-size: 0.84rem; list-style: none; }
.chan-sum::-webkit-details-marker { display: none; }
.chan-sum::before { content: "+"; flex: none; width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); font-weight: 700; line-height: 1; }
.chan[open] > .chan-sum::before { content: "\2212"; }
.chan[open] > .chan-sum { border-bottom: 1px solid var(--rule); background: var(--paper); }
.chan-name { font-weight: 700; color: var(--ink); min-width: 110px; }
.chan-edit { margin-left: auto; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.chan[open] > .chan-sum .chan-edit { color: var(--ink-faint); }
.chan-form { padding: 1rem 0.9rem 0.9rem; }
.chan-grid { display: flex; flex-direction: column; gap: 0.9rem; max-width: 560px; }
.chan-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.name-input { display: flex; align-items: stretch; border: 1px solid var(--rule); background: var(--paper); }
.name-input:focus-within { border-color: var(--ink); }
.name-input .bang { display: flex; align-items: center; padding: 0 0.45rem; color: var(--accent); font-family: var(--font-mono); font-weight: 700; background: var(--card); border-right: 1px solid var(--rule); }
.name-input input { border: none; }

.cmd-form { display: flex; flex-direction: column; gap: 0.5rem; }
.cmd-actions { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.72rem; }
.btn-danger { border-color: var(--accent); color: var(--accent); background: var(--card); }
.btn-danger:hover { background: var(--accent); color: #fff; }

/* -----------------------------------------------------------------------------
   Auth / picker stages
   ----------------------------------------------------------------------------- */
.stage { max-width: 540px; margin: 3.5rem auto; }
.card-frame { border: 1px solid var(--rule-bold); }
.card { background: var(--card); padding: 2.4rem 2.2rem; text-align: center; border: 6px solid var(--paper); }
.stage-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.4rem; }
.stage-title { font-family: var(--font-title); font-weight: 600; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1; color: var(--ink); margin: 0 0 0.9rem; }
.stage-sub { color: var(--ink-soft); margin: 0 auto 1.6rem; line-height: 1.5; max-width: 40ch; }

.guild-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.guild-list li { margin-top: -1px; }
.guild-link { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 0.9rem; text-decoration: none; background: var(--card); border: 1px solid var(--rule); transition: background 0.12s ease, border-color 0.12s ease; }
.guild-link:hover { background: var(--marker); border-color: var(--ink); position: relative; z-index: 1; }
.guild-glyph { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--font-title); font-weight: 600; font-size: 1.4rem; }
.guild-text { display: flex; flex-direction: column; }
.guild-name { font-family: var(--font-title); font-weight: 600; font-size: 1.25rem; line-height: 1.05; color: var(--ink); }
.guild-id { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-faint); }
.guild-arrow { margin-left: auto; color: var(--ink-soft); font-family: var(--font-mono); }
.tag { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--accent); border: 1px solid var(--accent); padding: 0.08rem 0.4rem; }
.tag-ok { color: var(--ink-soft); border-color: var(--rule); }
.tag-add { color: var(--accent); border-color: var(--accent); }

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 840px) {
    .console { grid-template-columns: 1fr; }
    .rail { position: static; }
    .rail-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
}

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