/* ============================================================
   Fluss — Kanban. Material Expressive+, Palette "Ayato".
   Selbst-gehostete Schriften: Bricolage Grotesque (Display) + Onest (Body).
   ============================================================ */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/assets/fonts/bricolage-800.woff2") format("woff2");
    font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/assets/fonts/bricolage-700.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Onest";
    src: url("/assets/fonts/onest-400.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Onest";
    src: url("/assets/fonts/onest-500.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Onest";
    src: url("/assets/fonts/onest-600.woff2") format("woff2");
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Onest";
    src: url("/assets/fonts/onest-700.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    /* Ayato-Palette */
    --brand:        #3b7e9b;
    --brand-strong: #2c6076;
    --teal:         #5cb2af;
    --mint:         #7dd8c3;
    --amber:        #e7a34e;
    --coral:        #f76e6e;

    /* Neutrals, teal-gebogen */
    --bg:        #eaf1f2;
    --surface:   #ffffff;
    --surface-2: #f4f8f9;
    --text:      #13252c;
    --muted:     #5a7078;
    --border:    #d6e3e6;
    --shadow:    23 55 66;

    --radius:    18px;
    --radius-sm: 12px;
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body:    "Onest", system-ui, -apple-system, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0e1518;
        --surface:   #172227;
        --surface-2: #1e2c32;
        --text:      #e3eef1;
        --muted:     #8ba1a9;
        --border:    #2a3a41;
        --shadow:    0 0 0;
    }
}
:root[data-theme="light"] {
    --bg:#eaf1f2; --surface:#ffffff; --surface-2:#f4f8f9;
    --text:#13252c; --muted:#5a7078; --border:#d6e3e6; --shadow:23 55 66;
}
:root[data-theme="dark"] {
    --bg:#0e1518; --surface:#172227; --surface-2:#1e2c32;
    --text:#e3eef1; --muted:#8ba1a9; --border:#2a3a41; --shadow:0 0 0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    background:
        radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* ---- Topbar ---- */
.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-dot {
    width: 30px; height: 30px; border-radius: 10px;
    background: linear-gradient(140deg, var(--brand), var(--teal));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 45%, transparent);
    position: relative; flex: none;
}
.brand-dot::after {
    content: ""; position: absolute; inset: 9px 9px auto auto;
    width: 8px; height: 8px; border-radius: 50%; background: var(--coral);
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1;
}
.brand-eyebrow {
    font-size: .66rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.header-spacer { flex: 1; }

.search {
    display: flex; align-items: center; gap: .5rem;
    background: var(--surface-2); border: 1px solid var(--border);
    padding: .5rem .8rem; border-radius: 11px; color: var(--muted);
    font-size: .85rem; min-width: 200px;
}
.search:focus-within { border-color: var(--brand); }
.search input {
    border: 0; background: transparent; color: var(--text);
    font: inherit; outline: 0; width: 100%;
}

.btn {
    font: inherit; font-weight: 600; font-size: .88rem;
    border: 0; border-radius: 11px; padding: .58rem .95rem;
    cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
    transition: transform .16s var(--ease-spring), box-shadow .2s, background .2s;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary {
    background: var(--brand); color: #fff;
    box-shadow: 0 5px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 9px 22px color-mix(in srgb, var(--brand) 48%, transparent); }
.btn-ghost {
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); padding: .5rem;
    width: 38px; height: 38px; justify-content: center;
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); }

.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: .8rem;
    color: #fff; background: linear-gradient(140deg, var(--brand-strong), var(--teal));
}

/* ---- Layout: Rail + Board ---- */
.layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* ---- Board-Rail (Material-3 Navigation) ---- */
.rail {
    width: 250px;
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: .9rem .6rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.rail-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .3rem .5rem .4rem .8rem;
}
.rail-title {
    font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--muted);
}
.rail-add {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer;
    transition: transform .16s var(--ease-spring), background .2s, border-color .2s;
}
.rail-add:hover { transform: rotate(90deg); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.rail-add:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.rail-list { display: flex; flex-direction: column; gap: 2px; }

.rail-foot {
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--border);
}
.rail-settings {
    width: 100%;
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .75rem; border: 0; border-radius: 999px;
    background: transparent; color: var(--text);
    font: inherit; font-size: .9rem; font-weight: 550; cursor: pointer;
    transition: background .16s;
}
.rail-settings:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.rail-settings:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rail-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .75rem; border: 0; border-radius: 999px;
    background: transparent; color: var(--text);
    font: inherit; font-size: .9rem; font-weight: 550;
    width: 100%; text-align: left; cursor: pointer;
    transition: background .16s;
}
.rail-item:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.rail-item.is-active {
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: color-mix(in srgb, var(--brand) 78%, var(--text));
    font-weight: 650;
}
.rail-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rail-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rail-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-kebab {
    opacity: 0; border: 0; background: transparent; color: var(--muted);
    cursor: pointer; border-radius: 50%; width: 26px; height: 26px;
    font-size: 1.1rem; line-height: 1; flex: none;
}
.rail-item:hover .rail-kebab,
.rail-item:focus-within .rail-kebab,
.rail-kebab:focus-visible { opacity: 1; }
.rail-kebab:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }

/* Kontextmenü (Umbenennen/Löschen) */
.menu {
    position: fixed; z-index: 50;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 12px 30px rgb(var(--shadow) / .22);
    padding: 5px; min-width: 168px;
    display: flex; flex-direction: column;
}
.menu button {
    text-align: left; border: 0; background: transparent;
    font: inherit; font-size: .88rem; padding: .55rem .65rem;
    border-radius: 8px; cursor: pointer; color: var(--text);
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: color-mix(in srgb, var(--coral) 82%, var(--text)); }

/* ---- Board ---- */
.board {
    flex: 1;
    min-width: 0;
    display: flex; gap: 1.25rem;
    padding: 1.5rem;
    overflow-x: auto;
    align-items: flex-start;
    scrollbar-width: thin;
}

.col {
    --tone: var(--brand);
    flex: 0 0 320px;
    background: color-mix(in srgb, var(--tone) 9%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--border));
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    max-height: calc(100dvh - 140px);
}
.col[data-tone="todo"]  { --tone: var(--brand); }
.col[data-tone="doing"] { --tone: var(--amber); }
.col[data-tone="done"]  { --tone: var(--mint); }

.col-head { padding: 1rem 1.1rem .8rem; }
.col-head-top { display: flex; align-items: baseline; gap: .6rem; }
.col-count {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 800; line-height: .9;
    letter-spacing: -.03em; font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--tone) 72%, var(--text));
}
.col-label {
    font-size: .9rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
}
.col-add {
    margin-left: auto; width: 28px; height: 28px; border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--tone) 30%, var(--border));
    background: transparent; color: color-mix(in srgb, var(--tone) 75%, var(--text));
    font-size: 1.15rem; line-height: 1; cursor: pointer; align-self: center;
    transition: transform .16s var(--ease-spring), background .2s;
}
.col-add:hover { transform: rotate(90deg) scale(1.05); background: color-mix(in srgb, var(--tone) 16%, transparent); }
.col-add:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }

.col-menu-btn {
    width: 28px; height: 28px; border-radius: 8px; align-self: center;
    border: 1px solid color-mix(in srgb, var(--tone) 30%, var(--border));
    background: transparent; color: color-mix(in srgb, var(--tone) 75%, var(--text));
    font-size: 1.05rem; line-height: 1; cursor: pointer;
    transition: background .2s;
}
.col-menu-btn:hover { background: color-mix(in srgb, var(--tone) 16%, transparent); }
.col-menu-btn:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }

.col-head { cursor: grab; }
.board.col-reorder .col-body { pointer-events: none; }

/* Landeslot beim Spalten-Verschieben deutlich markieren */
.col.col-dragging {
    outline: 3px dashed color-mix(in srgb, var(--tone) 75%, transparent);
    outline-offset: -4px;
    background: color-mix(in srgb, var(--tone) 22%, var(--surface));
    box-shadow: 0 16px 38px rgb(var(--shadow) / .22);
}
.col.col-dragging .col-body,
.col.col-dragging .flow,
.col.col-dragging .col-count { opacity: .3; }
.col.col-dragging .col-label { color: color-mix(in srgb, var(--tone) 80%, var(--text)); }

/* „+ Spalte" — Ghost-Spalte am Ende */
.col-add-new {
    flex: 0 0 260px;
    align-self: stretch;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font: inherit; font-weight: 600; font-size: .92rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 96px;
    transition: border-color .2s, color .2s, background .2s;
}
.col-add-new:hover {
    border-color: var(--brand);
    color: color-mix(in srgb, var(--brand) 78%, var(--text));
    background: color-mix(in srgb, var(--brand) 6%, transparent);
}

/* WIP-Flow-Meter — Signatur */
.flow { margin-top: .75rem; }
.flow-track {
    height: 5px; border-radius: 3px;
    background: color-mix(in srgb, var(--tone) 18%, var(--surface));
    overflow: hidden;
}
.flow-fill { height: 100%; border-radius: 3px; background: var(--tone); }
.flow-label {
    font-size: .68rem; font-weight: 600; color: var(--muted);
    margin-top: .35rem; display: flex; justify-content: space-between;
    font-variant-numeric: tabular-nums;
}
.flow-over { color: var(--coral); font-weight: 700; }

.col-body {
    padding: .35rem .7rem .9rem;
    display: flex; flex-direction: column; gap: .7rem;
    overflow-y: auto;
}

/* ---- Card ---- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem .9rem .8rem 1.05rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgb(var(--shadow) / .05);
    transition: transform .18s var(--ease-spring), box-shadow .18s;
}
.card::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 4px; border-radius: 4px;
    background: color-mix(in srgb, var(--prio, var(--teal)) 85%, transparent);
}
.card[data-prio="hoch"]    { --prio: var(--coral); }
.card[data-prio="mittel"]  { --prio: var(--amber); }
.card[data-prio="niedrig"] { --prio: var(--teal); }
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgb(var(--shadow) / .16);
}
.card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card.dragging {
    transform: rotate(-2.5deg) scale(1.04);
    box-shadow: 0 20px 40px rgb(var(--shadow) / .28);
    cursor: grabbing; border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
.card-title {
    font-size: .93rem; font-weight: 600; line-height: 1.3;
    letter-spacing: -.01em; text-wrap: balance; margin-bottom: .6rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .65rem; }
.tag {
    font-size: .68rem; font-weight: 600; padding: .16rem .5rem;
    border-radius: 6px; background: var(--surface-2);
    color: var(--muted); border: 1px solid var(--border);
}
.card-foot { display: flex; align-items: center; gap: .5rem; }
.prio-chip {
    font-size: .68rem; font-weight: 700; padding: .16rem .5rem .16rem .45rem;
    border-radius: 20px; display: inline-flex; align-items: center; gap: .3rem;
    color: color-mix(in srgb, var(--prio) 80%, var(--text));
    background: color-mix(in srgb, var(--prio) 15%, transparent);
}
.prio-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--prio); }
.due {
    font-size: .72rem; font-weight: 500; color: var(--muted);
    display: inline-flex; align-items: center; gap: .3rem;
}
.due-urgent { color: var(--coral); font-weight: 700; }
.card-foot-spacer { flex: 1; }
.mini-avatar {
    width: 24px; height: 24px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: .64rem;
    color: #fff;
}
.a-ar { background: linear-gradient(140deg, var(--brand-strong), var(--teal)); }
.a-nk { background: linear-gradient(140deg, #7f5aa8, var(--coral)); }
.a-mw { background: linear-gradient(140deg, var(--amber), var(--coral)); }

.col-more {
    text-align: center; font-size: .78rem; font-weight: 600;
    color: var(--muted); padding: .5rem; cursor: pointer;
    border-radius: 9px;
}
.col-more:hover { background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--text); }

.board-status {
    color: var(--muted); font-size: .9rem; padding: 1rem .5rem;
}

/* Drop-Ziel-Hervorhebung beim Drag */
.col-body.drop-target {
    outline: 2px dashed color-mix(in srgb, var(--tone) 55%, transparent);
    outline-offset: -4px;
    border-radius: var(--radius-sm);
}
.card.drag-ghost { opacity: .4; }

/* ---- Editor-Dialog ---- */
.editor {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    background: var(--surface);
    color: var(--text);
    width: min(480px, calc(100vw - 2rem));
    box-shadow: 0 24px 60px rgb(var(--shadow) / .28);
}
.editor::backdrop { background: rgb(4 12 15 / .45); backdrop-filter: blur(2px); }
.editor-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; }
.editor-title {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: 0;
}
.editor-row { display: flex; gap: .9rem; }
.editor-row .field { flex: 1; }
.editor textarea, .editor input, .editor select {
    font: inherit; font-size: .95rem;
    padding: .6rem .75rem; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); outline: 0; width: 100%;
    transition: border-color .18s, box-shadow .18s;
}
.editor textarea { resize: vertical; }
.editor textarea:focus, .editor input:focus, .editor select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.editor-error {
    margin: 0; font-size: .82rem; font-weight: 600; color: var(--coral);
    background: color-mix(in srgb, var(--coral) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--coral) 30%, transparent);
    padding: .55rem .7rem; border-radius: 10px;
}
.editor-actions { display: flex; align-items: center; gap: .5rem; }
.editor-actions-spacer { flex: 1; }
.btn-ghost-text { background: transparent; color: var(--muted); }
.btn-ghost-text:hover { color: var(--text); background: var(--surface-2); }
.btn-danger {
    background: color-mix(in srgb, var(--coral) 14%, transparent);
    color: color-mix(in srgb, var(--coral) 82%, var(--text));
}
.btn-danger:hover { background: color-mix(in srgb, var(--coral) 22%, transparent); }

/* ---- Einstellungen ---- */
.setting-group { display: flex; flex-direction: column; gap: .5rem; }
.segmented {
    display: flex; gap: 4px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 4px;
}
.segmented button {
    flex: 1; border: 0; background: transparent;
    font: inherit; font-weight: 600; font-size: .85rem;
    padding: .5rem; border-radius: 9px; color: var(--muted); cursor: pointer;
    transition: background .16s, color .16s;
}
.segmented button.is-active {
    background: var(--surface); color: var(--text);
    box-shadow: 0 2px 6px rgb(var(--shadow) / .1);
}
.segmented button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.setting-account {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: .55rem .55rem .55rem .8rem;
}
#settings-email { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-about { text-align: center; font-size: .72rem; color: var(--muted); margin: 0; }

.setting-head { display: flex; align-items: center; justify-content: space-between; }
.setting-hint { font-size: .82rem; color: var(--muted); margin: 0; }

/* Zwei-Spalten-Einstellungen: Nav links, Panel rechts */
.settings-dialog { width: min(760px, calc(100vw - 2rem)); }
.settings-shell { display: flex; min-height: 440px; max-height: 82vh; }
.settings-nav {
    width: 194px; flex: none;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    padding: 1.1rem .7rem;
    display: flex; flex-direction: column; gap: 3px;
}
.settings-nav-title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em;
    padding: .1rem .6rem .8rem;
}
.settings-nav-item {
    text-align: left; border: 0; background: transparent;
    font: inherit; font-size: .9rem; font-weight: 600;
    padding: .55rem .75rem; border-radius: 999px;
    color: var(--muted); cursor: pointer;
    transition: background .16s, color .16s;
}
.settings-nav-item:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--text); }
.settings-nav-item.is-active {
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: color-mix(in srgb, var(--brand) 78%, var(--text));
}
.settings-nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.settings-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.settings-panels { flex: 1; overflow-y: auto; padding: 1.4rem 1.4rem .6rem; }
.settings-panel { display: flex; flex-direction: column; gap: 1.1rem; }
.settings-panel[hidden] { display: none; }
.settings-foot { padding: .9rem 1.4rem; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
    .settings-shell { flex-direction: column; min-height: 0; }
    .settings-nav {
        width: auto; flex-direction: row; align-items: center; gap: .3rem;
        overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border);
        padding: .7rem .8rem;
    }
    .settings-nav-title { display: none; }
    .settings-nav-item { white-space: nowrap; }
}

.editor select {
    font: inherit; font-size: .95rem; padding: .6rem .75rem; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    outline: 0; width: 100%;
}
.editor select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* Token-Liste */
.token-list { display: flex; flex-direction: column; gap: .5rem; }
.token-empty { font-size: .82rem; color: var(--muted); }
.token-row {
    display: flex; align-items: center; gap: .7rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: .55rem .7rem;
}
.token-info { flex: 1; min-width: 0; }
.token-name { font-size: .88rem; font-weight: 650; }
.token-meta { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-meta code { font-family: ui-monospace, monospace; }

/* Board-Checkboxen im Token-Dialog */
.token-boards {
    display: flex; flex-direction: column; gap: .3rem;
    max-height: 180px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: 11px; padding: .5rem .6rem;
    background: var(--surface-2);
}
.token-board-opt { display: flex; align-items: center; gap: .5rem; font-size: .88rem; cursor: pointer; }
.token-board-opt input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Token-Reveal */
.token-reveal {
    background: color-mix(in srgb, var(--mint) 16%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--teal) 40%, var(--border));
    border-radius: 12px; padding: .75rem .8rem;
    display: flex; flex-direction: column; gap: .5rem;
}
.token-reveal-hint { margin: 0; font-size: .8rem; }
.token-value { display: flex; align-items: center; gap: .5rem; }
.token-value code {
    flex: 1; font-family: ui-monospace, monospace; font-size: .82rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: .45rem .55rem; overflow-x: auto; white-space: nowrap;
}
.col-empty {
    text-align: center; font-size: .8rem; color: var(--muted);
    padding: 1.1rem .5rem; border: 1px dashed var(--border);
    border-radius: var(--radius-sm); margin: .2rem 0;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .rail {
        width: auto; flex-direction: row; align-items: center;
        gap: .4rem; overflow-x: auto; overflow-y: hidden;
        border-right: 0; border-bottom: 1px solid var(--border);
        padding: .6rem .8rem;
    }
    .rail-head { padding: 0 .3rem 0 0; }
    .rail-title { display: none; }
    .rail-list { flex-direction: row; gap: .4rem; }
    .rail-item { width: auto; white-space: nowrap; }
    .rail-kebab { opacity: 1; }
    .rail-foot { margin-top: 0; padding-top: 0; border-top: 0; border-left: 1px solid var(--border); padding-left: .4rem; }
    .rail-settings { width: auto; }
}
@media (max-width: 560px) {
    .search { display: none; }
    .col { flex-basis: 82vw; }
}
