/* ==========================================================================
   กระดานเขียน — daasee.com
   แนวทาง: จอเป็น "โต๊ะ" กระดาษเป็นพระเอก เครื่องมือวางในถาดปากกาด้านซ้าย
   สีเน้นของหน้าจอ (--ink) คือสีหมึกที่กำลังใช้เขียนจริง ๆ
   ========================================================================== */

:root {
    --ink: #191c22;                     /* สีหมึกปัจจุบัน — JS เปลี่ยนค่านี้ */

    --desk: #e7e5df;
    --panel: #ffffff;
    --panel-2: #f4f4f2;
    --panel-3: #eceae5;
    --line: rgba(20, 22, 27, .12);
    --line-soft: rgba(20, 22, 27, .06);
    --text: #191c22;
    --muted: #6c7280;
    --shadow: 0 1px 2px rgba(16, 18, 23, .06), 0 8px 24px rgba(16, 18, 23, .10);
    --shadow-lg: 0 24px 60px rgba(16, 18, 23, .22);

    --ok: #0f7a5a;
    --warn: #a8601a;
    --danger: #bd3a2c;

    --r-sm: 7px;
    --r-md: 11px;
    --r-lg: 16px;

    --rail: 60px;
    --topbar: 52px;
    --pages: 136px;

    --font: "IBM Plex Sans Thai", "IBM Plex Sans", "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
    --desk: #0d0f13;
    --panel: #191c22;
    --panel-2: #212530;
    --panel-3: #2a2f3a;
    --line: rgba(255, 255, 255, .12);
    --line-soft: rgba(255, 255, 255, .06);
    --text: #e8ebf1;
    --muted: #99a1af;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
    --ok: #37b98b;
    --warn: #d99a4e;
    --danger: #e26a5c;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    background: var(--desk);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    border-radius: 4px;
}

[hidden] { display: none !important; }

.sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ───────────────────────── ปุ่มพื้นฐาน ───────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .35; cursor: default; }
.btn:disabled:hover { background: transparent; }

.btn--icon { width: 34px; padding: 0; font-size: 16px; }
.btn--line { border-color: var(--line); background: var(--panel); }
.btn--line:hover { background: var(--panel-2); }
.btn--ink { background: var(--ink); color: #fff; border-color: transparent; }
.btn--ink:hover { background: var(--ink); filter: brightness(1.12); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn--sm { height: 28px; padding: 0 9px; font-size: 12.5px; }

.icon { width: 19px; height: 19px; display: block; flex: none; }
.only-wide { display: inline; }
@media (max-width: 1080px) { .only-wide { display: none; } }
.icon--sm { width: 16px; height: 16px; }

/* ───────────────────────── โครงหน้า ───────────────────────── */

.app {
    display: grid;
    grid-template-columns: var(--rail) 1fr auto;
    grid-template-rows: var(--topbar) 1fr;
    grid-template-areas: "top top top" "rail stage pages";
    height: 100dvh;
}

/* ───────────────────────── แถบบน ───────────────────────── */

.topbar {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: -.01em;
    padding-inline-end: 4px;
}

.brand__mark {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    flex: none;
}

.brand__text { font-size: 14.5px; }

.name-field {
    min-width: 90px;
    max-width: 300px;
    flex: 1 1 200px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    font-weight: 500;
    text-overflow: ellipsis;
}

.name-field:hover { border-color: var(--line); }
.name-field:focus { border-color: var(--ink); background: var(--panel-2); outline: none; }

.state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.state__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor;
    flex: none;
}

.state[data-state="dirty"] { color: var(--warn); }
.state[data-state="saving"] { color: var(--muted); }
.state[data-state="saved"] { color: var(--ok); }
.state[data-state="offline"] { color: var(--danger); }
.state[data-state="saving"] .state__dot { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: .25; } }

.spacer { flex: 1 1 auto; }

.user {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px 0 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    max-width: 190px;
}

.user:hover { background: var(--panel-2); }
.user__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user > :first-child,
.user .avatar-slot > :first-child {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: none;
}

.avatar-fallback {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* ───────────────────────── เมนูลอย ───────────────────────── */

.menu {
    position: absolute;
    top: calc(var(--topbar) - 4px);
    inset-inline-end: 8px;
    min-width: 232px;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    z-index: 60;
}

.menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    cursor: pointer;
    text-align: start;
}

.menu__item:hover { background: var(--panel-2); }
.menu__item kbd { margin-inline-start: auto; }
.menu__sep { height: 1px; margin: 6px 8px; background: var(--line-soft); }
.menu__label { padding: 8px 10px 4px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

kbd {
    font-family: var(--mono);
    font-size: 11px;
    padding: 1px 5px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--muted);
    background: var(--panel-2);
    white-space: nowrap;
}

/* ───────────────────────── ถาดปากกา (ซ้าย) ───────────────────────── */

.rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    background: var(--panel);
    border-inline-end: 1px solid var(--line);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 30;
}

.tool {
    position: relative;
    width: 46px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: transform .13s ease, background .13s ease, color .13s ease;
}

.tool:hover { background: var(--panel-2); color: var(--text); }

/* หัวปากกาที่เลื่อนออกจากถาดเมื่อถูกเลือก — จุดเด่นของหน้านี้ */
.tool[aria-pressed="true"] {
    background: var(--panel-3);
    color: var(--text);
    transform: translateX(4px);
}

.tool[aria-pressed="true"]::before {
    content: "";
    position: absolute;
    inset-inline-start: -8px;
    top: 50%;
    width: 4px;
    height: 22px;
    margin-top: -11px;
    border-radius: 0 3px 3px 0;
    background: var(--ink);
}

/* ปลายปากกาบอกสีหมึกจริง */
.tool__nib {
    position: absolute;
    bottom: 6px;
    inset-inline-end: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink);
    border: 1.5px solid var(--panel);
}

.rail__sep { width: 26px; height: 1px; margin: 5px 0; background: var(--line-soft); }

/* ───────────────────────── แถบตัวเลือกเครื่องมือ ───────────────────────── */

.opts {
    position: fixed;
    top: calc(var(--topbar) + 10px);
    inset-inline-start: calc(var(--rail) + 12px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    z-index: 25;
    max-width: min(660px, calc(100vw - var(--rail) - 32px));
    flex-wrap: wrap;
}

.opts__group { display: flex; align-items: center; gap: 8px; }
.opts__sep { width: 1px; height: 22px; background: var(--line-soft); }
.opts__label { font-size: 12px; color: var(--muted); }

.swatches { display: flex; align-items: center; gap: 5px; }

.swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--line);
    cursor: pointer;
    padding: 0;
    transition: transform .12s ease, box-shadow .12s ease;
}

.swatch:hover { transform: scale(1.14); }

.swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--text);
}

.color-input {
    width: 26px; height: 26px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 50%; }
.color-input::-moz-color-swatch { border: none; border-radius: 50%; }

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 108px;
    height: 22px;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 3px; border-radius: 3px; background: var(--line);
}
input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--line); }

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px; height: 15px; margin-top: -6px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--panel);
    box-shadow: 0 0 0 1px var(--line);
}
input[type="range"]::-moz-range-thumb {
    width: 15px; height: 15px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--panel);
    box-shadow: 0 0 0 1px var(--line);
}

.num { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 30px; text-align: center; }

.seg {
    display: inline-flex;
    padding: 2px;
    gap: 2px;
    background: var(--panel-2);
    border-radius: 9px;
}

.seg__btn {
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    cursor: pointer;
}

.seg__btn[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

.field {
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--panel);
}

/* ───────────────────────── พื้นที่กระดาษ ───────────────────────── */

.stage {
    grid-area: stage;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--text) 5%, transparent), transparent 60%),
        var(--desk);
    touch-action: none;
}

#canvas { display: block; width: 100%; height: 100%; }

.stage[data-cursor="draw"] { cursor: crosshair; }
.stage[data-cursor="pan"] { cursor: grab; }
.stage[data-cursor="grabbing"] { cursor: grabbing; }
.stage[data-cursor="none"] { cursor: none; }
.stage[data-cursor="text"] { cursor: text; }

.ring {
    position: fixed;
    pointer-events: none;
    z-index: 20;
    border-radius: 50%;
    border: 1.5px solid var(--text);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .55) inset;
    display: none;
}

.text-editor {
    position: absolute;
    z-index: 22;
    min-width: 40px;
    padding: 2px 4px;
    border: 1px dashed var(--ink);
    border-radius: 4px;
    background: color-mix(in srgb, var(--panel) 80%, transparent);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.25;
    resize: none;
    overflow: hidden;
    outline: none;
    display: none;
}

/* แถบย่อ/ขยาย */
.zoombar {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-start: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 20;
}

.zoombar .num { min-width: 46px; }

.pager {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-end: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 20;
}

.pager__label { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 6px; }

/* แถบเตือนสำหรับผู้ที่ยังไม่เข้าสู่ระบบ */
.notice {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    max-width: 300px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--warn);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
    z-index: 21;
}

.notice h4 { margin: 0 0 4px; font-size: 13.5px; }
.notice p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

/* ───────────────────────── แผงหน้ากระดาษ ───────────────────────── */

.pages {
    grid-area: pages;
    width: var(--pages);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-inline-start: 1px solid var(--line);
    z-index: 30;
}

.pages--hidden { display: none; }

.pages__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 6px 12px;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .04em;
}

.pages__list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pages__foot { padding: 8px 10px; border-top: 1px solid var(--line-soft); }
.pages__foot .btn { width: 100%; }

.thumb {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    display: block;
    width: 100%;
    aspect-ratio: 1240 / 1754;
}

.thumb canvas, .thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.thumb[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 35%, transparent); }

.thumb__no {
    position: absolute;
    inset-block-end: 3px;
    inset-inline-start: 4px;
    font-family: var(--mono);
    font-size: 10px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(18, 20, 25, .62);
    color: #fff;
}

.thumb__menu {
    position: absolute;
    inset-block-start: 3px;
    inset-inline-end: 3px;
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 6px;
    background: rgba(18, 20, 25, .55);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .12s ease;
}

.thumb:hover .thumb__menu, .thumb__menu:focus-visible { opacity: 1; }

/* ───────────────────────── กล่องซ้อน ───────────────────────── */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 14, 18, .45);
    backdrop-filter: blur(2px);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 100;
}

.sheet {
    width: 100%;
    max-width: 620px;
    max-height: min(86dvh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.sheet--sm { max-width: 420px; }

.sheet__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.sheet__title { margin: 0; font-size: 15.5px; font-weight: 600; }
.sheet__body { padding: 16px 18px; overflow-y: auto; }
.sheet__foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line-soft);
    background: var(--panel-2);
}

.tabs { display: flex; gap: 4px; padding: 10px 14px 0; }

.tab {
    height: 30px; padding: 0 12px;
    border: 0; border-radius: 8px 8px 0 0;
    background: transparent; color: var(--muted);
    cursor: pointer; font-size: 13px;
}

.tab[aria-selected="true"] { background: var(--panel-2); color: var(--text); font-weight: 500; }

.search {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--panel-2);
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-top: 14px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--panel);
    text-align: start;
    cursor: pointer;
    padding: 0;
    transition: border-color .12s ease, transform .12s ease;
}

.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card__thumb { aspect-ratio: 4 / 3; background: var(--panel-3); display: block; width: 100%; object-fit: cover; }
.card__body { padding: 9px 10px 10px; }
.card__name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.card__row { display: flex; gap: 2px; margin-top: 6px; }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty h4 { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.empty p { margin: 0 0 14px; font-size: 13px; }

.meter { height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin-top: 6px; }
.meter__bar { height: 100%; background: var(--ink); border-radius: 3px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: 0; }
.row__label { font-size: 13.5px; }
.row__hint { font-size: 12px; color: var(--muted); margin-top: 1px; }

.keys { display: grid; grid-template-columns: 1fr auto; gap: 7px 16px; align-items: center; }
.keys__group { grid-column: 1 / -1; margin-top: 12px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.keys span { font-size: 13px; }

.input {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--panel-2);
}

.input:focus { outline: none; border-color: var(--ink); }

/* ───────────────────────── ข้อความแจ้งเตือน ───────────────────────── */

.toasts {
    position: fixed;
    inset-block-end: 16px;
    inset-inline: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 200;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: min(440px, 92vw);
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    pointer-events: auto;
    animation: rise .18s ease-out;
}

.toast[data-kind="error"] { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); color: var(--danger); }
.toast[data-kind="ok"] { color: var(--ok); }
.toast .btn { margin-inline-start: 4px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ───────────────────────── จอเล็ก ───────────────────────── */

@media (max-width: 860px) {
    :root { --rail: 0px; --pages: 0px; --topbar: 50px; }

    .app {
        grid-template-columns: 1fr;
        grid-template-rows: var(--topbar) 1fr auto;
        grid-template-areas: "top" "stage" "rail";
    }

    .rail {
        flex-direction: row;
        justify-content: flex-start;
        gap: 2px;
        padding: 5px 8px;
        border-inline-end: 0;
        border-top: 1px solid var(--line);
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }

    .tool { flex: none; width: 44px; height: 40px; border-radius: 10px; }
    .tool[aria-pressed="true"] { transform: none; }
    .tool[aria-pressed="true"]::before {
        inset-inline-start: 50%; top: auto; bottom: -5px;
        width: 20px; height: 3px; margin: 0 0 0 -10px;
        border-radius: 3px 3px 0 0;
    }

    .rail__sep { width: 1px; height: 24px; margin: 0 6px; }

    .opts {
        inset-inline: 8px;
        inset-block-start: auto;
        inset-block-end: 8px;
        max-width: none;
        justify-content: center;
    }

    .pages { display: none; }
    .pages--open {
        display: flex;
        position: fixed;
        inset-block: var(--topbar) 0;
        inset-inline-end: 0;
        width: 148px;
        box-shadow: var(--shadow-lg);
        z-index: 45;
    }

    .zoombar { inset-block-end: 78px; }
    .pager { inset-block-end: 78px; }
    .notice { inset-inline: 8px; max-width: none; }
    .brand__text { display: none; }
    .user__name { display: none; }
    .cards { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}

@media (max-width: 480px) {
    .state { padding: 0 7px; }
    .state__text { display: none; }
}

@media print {
    .topbar, .rail, .pages, .opts, .zoombar, .pager, .toasts, .notice { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
