/* Teacher workspace chrome. Screen-only rules preserve the live worksheet print sheet. */
@media screen {
    body.workspace-ready {
        --bg: #fff;
        --bg-soft: #f7f8fc;
        --card: #fff;
        --tw-control-bg: #f7f8fc;
        --tw-line: #dce0ea;
        --tw-muted: #59647a;
        --tw-accent: #5145cd;
        --tw-accent-bg: #eeecff;
        --tw-success: #17643a;
        --tw-success-bg: #edf8f0;
        --tw-warning: #805514;
        --tw-warning-bg: #fff5df;
        --tw-error: #b42332;
        --tw-error-bg: #fff0f1;
        background: var(--bg);
    }

    [data-dark] body.workspace-ready {
        /* Inherit the app's neutral charcoal system; violet is an action accent. */
        --bg: var(--surface-0);
        --bg-soft: var(--surface-1);
        --card: var(--surface-2);
        --tw-control-bg: var(--surface-3);
        --tw-line: var(--line-strong);
        --tw-muted: var(--text-2);
        --tw-accent: var(--accent-text);
        --tw-accent-bg: var(--indigo-muted);
        --tw-success: #95e2b1;
        --tw-success-bg: #142b23;
        --tw-warning: #f3cc83;
        --tw-warning-bg: #302619;
        --tw-error: #ffb1b8;
        --tw-error-bg: #331f2b;
    }

    body.workspace-ready .wrap {
        width: 100%;
        max-width: 1600px;
        padding: 64px 28px 64px;
    }

    .tw-shell {
        display: grid;
        grid-template-columns: 224px minmax(0, 1fr);
        min-height: calc(100vh - 128px);
        gap: 36px;
        font-size: .9rem;
    }

    .tw-shell [hidden], .tw-dialog [hidden], .tw-drawer [hidden] { display: none !important; }
    .tw-shell :is(a, button, input, select, textarea, summary),
    :is(.tw-dialog, .tw-drawer) :is(a, button, input, select, textarea, summary) {
        scroll-margin-top: 100px;
    }
    .tw-shell :focus-visible, .tw-dialog :focus-visible, .tw-drawer :focus-visible {
        outline: 3px solid var(--tw-accent);
        outline-offset: 3px;
    }
    .tw-shell :is(h1, h2, h3, h4, p, a, button, td, th),
    :is(.tw-dialog, .tw-drawer) :is(h2, h3, p) { overflow-wrap: anywhere; }

    .tw-sidebar {
        position: sticky;
        top: 64px;
        align-self: start;
        height: calc(100dvh - 64px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 32px 20px 80px 0;
        border-right: 1px solid var(--border);
    }
    .tw-kicker, .tw-side-label {
        color: var(--tw-muted);
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .065em;
        text-transform: uppercase;
    }
    .tw-sidebar > .tw-kicker { margin: 0 12px 18px; }
    .tw-side-label { margin: 28px 12px 9px; }
    .tw-nav, .tw-class-nav { display: grid; gap: 4px; }
    .tw-nav a, .tw-class-nav a {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 11px 12px;
        border-radius: 8px;
        color: var(--text-2);
        text-decoration: none;
        font-weight: 600;
        line-height: 1.45;
    }
    .tw-nav a svg, .tw-class-nav a svg { width: 18px; height: 18px; flex: none; }
    .tw-nav a:hover, .tw-class-nav a:hover { background: var(--bg-soft); color: var(--ink); }
    .tw-nav a[aria-current="page"], .tw-class-nav a[aria-current="page"],
    .tw-nav a.active, .tw-class-nav a.active {
        background: var(--tw-accent-bg);
        color: var(--tw-accent);
        box-shadow: inset 3px 0 0 var(--tw-accent);
    }
    .tw-class-nav:empty { display: none; }

    .tw-main { min-width: 0; padding: 34px 0 0; }
    .tw-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
    .tw-header > :first-child { flex: 1 1 300px; min-width: 0; }
    .tw-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--tw-muted); font-size: .78rem; margin-bottom: 10px; }
    .tw-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tw-muted); text-underline-offset: 3px; }
    .tw-breadcrumb a:hover { color: var(--tw-accent); }
    .tw-header h1 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
    #wsSubtitle { color: var(--tw-muted); margin-top: 10px; max-width: 66ch; font-size: .9rem; line-height: 1.65; }
    .tw-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
    .tw-mobile-nav { display: none; }

    .tw-tabs { display: flex; gap: 22px; overflow-x: auto; overscroll-behavior-x: contain; border-bottom: 1px solid var(--tw-line); margin: 0 0 28px; padding: 4px 3px 0; }
    .tw-tabs :is(a, button) { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 2px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--tw-muted); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
    .tw-tabs :is(a, button):hover { color: var(--ink); }
    .tw-tabs [aria-current="page"], .tw-tabs [aria-selected="true"], .tw-tabs .active { border-bottom-color: var(--tw-accent); color: var(--tw-accent); }
    .tw-content, .tw-shell [data-ws-panel] { min-width: 0; }
    .tw-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }
    .tw-section-head h2, .tw-panel h2 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; }
    .tw-section-head p { color: var(--tw-muted); margin-top: 5px; font-size: .84rem; }
    .tw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin-bottom: 28px; }
    .tw-class-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
        min-height: 164px;
        padding: 22px;
        border: 1px solid var(--tw-line);
        border-radius: 12px;
        background: var(--card);
        color: var(--ink);
        text-decoration: none;
    }
    .tw-class-card:hover { border-color: var(--tw-accent); background: var(--bg-soft); }
    .tw-class-name { display: block; font-size: 1.02rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.45; }
    .tw-class-subject { display: block; margin-top: 8px; color: var(--tw-muted); font-size: .82rem; }
    .tw-class-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: auto; padding-top: 24px; color: var(--tw-muted); font-size: .78rem; }
    .tw-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 22px; align-items: start; }
    .tw-split > * { min-width: 0; }
    .tw-panel { padding: 22px; margin-bottom: 24px; border: 1px solid var(--tw-line); border-radius: 12px; background: var(--card); }
    .tw-panel > :last-child { margin-bottom: 0; }
    .tw-empty { display: grid; justify-items: start; gap: 10px; padding: 26px 0; color: var(--tw-muted); line-height: 1.65; }
    .tw-empty h3, .tw-empty strong { color: var(--ink); font-size: .98rem; }
    .tw-empty p { max-width: 58ch; }
    .tw-empty .btn { margin-top: 4px; }
    .tw-feed { display: grid; }
    .tw-feed-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
    .tw-feed-row:first-child { padding-top: 2px; }
    .tw-feed-row:last-child { border-bottom: 0; padding-bottom: 0; }
    .tw-feed-row > :first-child { flex: 1 1 180px; min-width: 0; }
    .tw-feed-row strong { display: block; font-size: .88rem; line-height: 1.5; }
    .tw-feed-row p, .tw-feed-row small { display: block; color: var(--tw-muted); font-size: .78rem; margin-top: 4px; }
    .tw-feed-row a:not(.btn) { color: var(--tw-accent); text-underline-offset: 3px; }

    .tw-status, .tw-count { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; font-size: .73rem; font-weight: 700; line-height: 1.5; vertical-align: middle; }
    .tw-status { background: var(--tw-success-bg); color: var(--tw-success); }
    .tw-status.warning { background: var(--tw-warning-bg); color: var(--tw-warning); }
    .tw-status.neutral, .tw-count { background: var(--bg-soft); color: var(--tw-muted); }
    .tw-status.error { background: var(--tw-error-bg); color: var(--tw-error); }
    .tw-count { font-variant-numeric: tabular-nums; }
    .tw-inline-error { border: 1px solid currentColor; border-radius: 8px; background: var(--tw-error-bg); color: var(--tw-error); padding: 12px 14px; margin: 12px 0; line-height: 1.6; }
    .tw-inline-error:empty { display: none; }
    .tw-note { color: var(--tw-muted); font-size: .82rem; line-height: 1.65; margin: 14px 0; }
    .tw-note a { color: var(--tw-accent); text-underline-offset: 3px; }
    .tw-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
    .tw-chips > span { display: inline-flex; gap: 5px; align-items: center; padding: 7px 10px; border-radius: 7px; background: var(--bg-soft); color: var(--text-2); font-size: .8rem; }

    .tw-table-wrap { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--tw-line); border-radius: 10px; }
    .tw-table { width: 100%; border-collapse: collapse; font-size: .83rem; text-align: left; }
    .tw-table th { color: var(--tw-muted); font-size: .74rem; font-weight: 600; background: var(--bg-soft); }
    .tw-table :is(th, td) { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; line-height: 1.55; }
    .tw-table td { min-width: 90px; }
    .tw-table :is(th, td):first-child { min-width: 170px; max-width: 360px; }
    .tw-table tr:last-child td { border-bottom: 0; }
    .tw-table td small { display: block; margin-top: 3px; color: var(--tw-muted); font-size: .76rem; }
    .tw-table td > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--tw-accent); font-weight: 600; text-underline-offset: 3px; }
    .tw-table .tw-actions { flex-wrap: nowrap; }

    .tw-filter { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
    .tw-filter > * { flex: 1 1 180px; min-width: 0; }
    .tw-filter > :first-child { flex-grow: 2; }
    #main .tw-filter :is(input, select), #main .tw-mobile-nav select { margin-bottom: 0; }
    #main .tw-form { display: grid; gap: 14px; }
    #main .tw-form :is(input, select, textarea) { margin-bottom: 0; font-weight: 500; }
    #main .tw-form label { margin-bottom: 6px; }
    #main .tw-form .row > * { min-width: min(100%, 180px); }
    #main .tw-shell :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not(.sr-only) { border-radius: 8px; }
    #main .tw-shell :is(input, select, textarea):focus-visible { outline-color: var(--tw-accent); }
    #main .tw-check-list { display: grid; gap: 6px; max-height: 290px; overflow-y: auto; overscroll-behavior: contain; }
    #main .tw-check-list label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--tw-line); border-radius: 8px; margin: 0; cursor: pointer; font-weight: 500; }
    #main .tw-check-list label:hover { background: var(--bg-soft); }
    #main .tw-check-list input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--violet); }
    #main .tw-check-list label > span { min-width: 0; overflow-wrap: anywhere; }

    .tw-shell .card { border-color: var(--tw-line); border-radius: 12px; box-shadow: none; padding: 22px; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn { min-height: 44px; padding: 11px 17px; font-size: .84rem; border-radius: 8px; background: var(--violet); box-shadow: none; transition: none; line-height: 1.45; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn:hover { background: var(--violet-shade); box-shadow: none; transform: none; filter: none; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.green { background: #15803d; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.green:hover { background: #166534; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.ghost { background: var(--card); border: 1px solid var(--tw-line); color: var(--text-2); }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.ghost:hover { background: var(--bg-soft); border-color: var(--tw-accent); color: var(--tw-accent); }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn:disabled { transform: none; box-shadow: none; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.sm { min-height: 44px; padding: 9px 13px; font-size: .8rem; }
    :is(.tw-shell, .tw-dialog, .tw-drawer) .btn.lg { font-size: .9rem; padding: 13px 18px; }
    .tw-shell .linkbtn { min-height: 44px; padding: 8px 3px; color: var(--tw-accent); }
    .tw-shell .sub, .tw-shell .hint { color: var(--tw-muted); }
    .tw-shell :is(#preview, #stage) { width: 100%; max-width: 960px; }
    .tw-shell #home > :last-child { margin-bottom: 0; }

    .tw-dialog, .tw-drawer {
        position: fixed;
        inset: 0;
        width: min(580px, calc(100% - 32px));
        max-width: none;
        max-height: calc(100dvh - 48px);
        margin: auto;
        padding: 26px;
        border: 1px solid var(--tw-line);
        border-radius: 14px;
        color: var(--ink);
        background: var(--card);
        font: inherit;
        line-height: 1.6;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 0 18px 60px #0003;
    }
    .tw-dialog::backdrop, .tw-drawer::backdrop { background: rgb(0 0 0 / 55%); }
    .tw-drawer { inset: 0 0 0 auto; width: min(650px, calc(100% - 32px)); max-height: 100dvh; height: 100dvh; margin: 0; padding: 28px; border-radius: 14px 0 0 14px; }
    .tw-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
    .tw-dialog-head h2 { font-size: 1.25rem; letter-spacing: -.025em; line-height: 1.35; }
    .tw-dialog-head p { color: var(--tw-muted); font-size: .84rem; margin-top: 8px; }
    .tw-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--tw-line); border-radius: 8px; background: var(--card); color: var(--text-2); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
    .tw-close:hover { background: var(--bg-soft); color: var(--ink); }
    .tw-close svg { width: 20px; height: 20px; }
    .tw-invite-code { display: block; padding: 18px 14px; margin: 16px 0; border: 1px solid var(--tw-line); border-radius: 10px; background: var(--bg-soft); font-size: clamp(1.25rem, 5vw, 2rem); font-weight: 700; letter-spacing: .12em; text-align: center; overflow-wrap: anywhere; }
    body.workspace-ready footer { margin-left: auto; max-width: 1600px; padding-top: 20px; padding-bottom: 20px; font-size: .78rem; }

    @media (max-width: 1200px) {
        .tw-shell { grid-template-columns: 208px minmax(0, 1fr); gap: 26px; }
        .tw-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
    }
    @media (max-width: 1000px) {
        body.workspace-ready .wrap { padding: 90px 24px 48px; }
        .tw-shell { display: block; min-height: calc(100vh - 190px); }
        .tw-sidebar { display: none; }
        .tw-main { padding-top: 0; }
        .tw-mobile-nav { display: block; margin-bottom: 22px; }
        .tw-header { margin-bottom: 22px; }
        .tw-tabs { gap: 20px; margin-bottom: 22px; }
    }
    @media (max-width: 600px) {
        body.workspace-ready .wrap { padding: 88px 16px 40px; }
        .tw-header { gap: 16px; }
        .tw-header > .tw-actions { width: 100%; }
        .tw-header > .tw-actions .btn { flex: 1 1 auto; }
        .tw-grid { gap: 12px; }
        .tw-class-card { min-height: 144px; padding: 18px; }
        .tw-panel, .tw-shell .card { padding: 18px; }
        .tw-section-head { gap: 10px; }
        .tw-filter { align-items: stretch; }
        .tw-filter > * { flex-basis: 100%; }
        .tw-table :is(th, td) { padding: 12px; }
        .tw-table-wrap { border-radius: 8px; }
        .tw-dialog { padding: 20px; max-height: calc(100dvh - 32px); }
        .tw-drawer { width: 100%; border-radius: 0; padding: 20px; }
        .tw-dialog-head { gap: 10px; }
        .tw-shell .row > * { min-width: min(140px, 100%); }
        .tw-actions { row-gap: 10px; }
    }
}

@media screen {
    .tw-header { display: block; }
    .tw-header .tw-section-head { align-items: flex-start; }
    .tw-brand { display: flex; align-items: center; gap: 9px; margin: 0 8px 24px; color: var(--ink); text-decoration: none; font-weight: 750; line-height: 1.4; }
    .tw-brand img { border-radius: 8px; flex: none; }
    .tw-sidebar > .btn { margin: 14px 10px; }
    .tw-sidebar > .tw-note { padding: 0 12px; }
    .tw-dialog fieldset { border: 0; padding: 0; min-width: 0; }
    .tw-dialog legend { font-weight: 650; margin-bottom: 8px; }
    .tw-text-link { color: var(--tw-accent); text-decoration: none; text-underline-offset: 3px; }
    .tw-text-link:hover { text-decoration: underline; }
    #wsNotice { display: block; margin-bottom: 20px; padding: 14px; border: 1px solid var(--tw-line); border-radius: 8px; }
}

@media screen {
    #main .tw-shell :is(input, select, textarea):not([type=checkbox]):not([type=radio]) { color: var(--ink); background: var(--tw-control-bg); border: 1px solid var(--tw-line); }
    #main .tw-check-list small { display: block; color: var(--tw-muted); line-height: 1.5; }
    .tw-drawer h3 { margin-top: 22px; }
    .tw-drawer .tw-feed-row h3 { margin-top: 0; }
    body.workspace-ready #muteBtn { display: none; }
    body.workspace-ready:has(#stage:not(.hidden)) #muteBtn { display: inline-flex; }
}

@media screen {
    .tw-shell .klass { flex-wrap: wrap; box-shadow: none; border: 1px solid var(--tw-line); background: var(--card); border-radius: 10px; }
    .tw-shell .klass > div:first-child { flex: 1 1 240px; min-width: 0; }
    .tw-shell .klass .acts { flex: 0 1 auto; max-width: 100%; }
    .tw-table tbody th { background: var(--card); }
}
@media screen and (max-width: 600px) {
    .tw-shell .klass .acts { width: 100%; justify-content: flex-start; }
}

@media screen {
    .tw-library-heading { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--tw-line); }
    .tw-material-list { display: grid; }
    .tw-material-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 24px; padding: 22px 0; border-bottom: 1px solid var(--tw-line); }
    .tw-material-row:first-child { padding-top: 10px; }
    .tw-material-row > div:first-child { flex: 1 1 250px; min-width: 0; }
    .tw-material-row h3 { margin: 6px 0; font-size: 1rem; }
    .tw-dialog-wide { width: min(820px, calc(100% - 32px)); }
    #main .tw-question-editor { min-width: 0; margin: 16px 0; padding: 18px; border: 1px solid var(--tw-line); border-radius: 10px; }
    .tw-question-editor > legend { padding: 0 7px; }
    .tw-question-editor label { display: block; }
    .tw-question-editor :is(input, select, textarea) { margin-top: 5px; }
    .tw-question-editor > label, .tw-question-editor > div > label { margin-bottom: 14px; }
    .tw-question-tools { display: grid; grid-template-columns: minmax(0, 1fr) 100px auto; align-items: end; gap: 12px; margin-bottom: 14px; }
    .tw-question-tools label { margin: 0; }
    .tw-question-tools > .btn { margin-bottom: 0; }
    #main .tw-check-inline { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 600; }
    #main .tw-check-inline input { width: 20px; height: 20px; min-height: 20px; margin: 0; flex: none; accent-color: var(--violet); }
    .tw-answer { margin: 12px 0; padding: 12px; border-left: 3px solid var(--tw-line); background: var(--bg-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
    .tw-gradebook-table th { min-width: 170px; }
    .tw-gradebook-table th small { display: block; margin-top: 6px; font-weight: 500; }
    .tw-gradebook-table th a { color: var(--tw-accent); text-underline-offset: 3px; }
    .tw-gradebook-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--card); border-right: 1px solid var(--tw-line); }
    .tw-gradebook-table thead th:first-child { background: var(--bg-soft); }
    #tfLessonFields { gap: 10px; }
    #tfLessonFields textarea { margin-top: 6px; }
    #tfMaterialForm .tw-actions { position: sticky; bottom: -26px; margin-top: 12px; padding: 14px 0; background: var(--card); border-top: 1px solid var(--tw-line); }
    #wsReportPrint { display: none; }
    @media (max-width: 600px) {
        .tw-question-tools { grid-template-columns: minmax(0, 1fr) 85px; }
        .tw-question-tools > .btn { grid-column: 1 / -1; justify-self: start; }
        #main .tw-question-editor { padding: 14px; }
        #tfMaterialForm .tw-actions { bottom: -20px; }
        .tw-gradebook-table :is(th, td):first-child { min-width: 135px; }
    }
}
@media print {
    body.tw-print-report > *, body.tw-print-report > #printRoot { display: none !important; }
    body.tw-print-report > #wsReportPrint { display: block !important; color: #000; background: #fff; font: 11pt/1.5 Arial, sans-serif; }
    #wsReportPrint h1 { font-size: 22pt; margin: 0 0 12pt; }
    #wsReportPrint h2 { font-size: 14pt; margin: 18pt 0 7pt; }
    #wsReportPrint p { margin: 8pt 0; }
    #wsReportPrint table { border-collapse: collapse; width: 100%; font-size: 10pt; }
    #wsReportPrint th, #wsReportPrint td { padding: 7pt; border: 1px solid #bbb; text-align: left; }
    #wsReportPrint tr { break-inside: avoid; }
}

@media screen {
    .tw-row-actions, .tw-feed-row > .acts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; max-width: 100%; }
    .tw-material-row { align-items: center; gap: 16px 28px; }
    .tw-material-row > div:first-child { flex-basis: 260px; }
    .tw-item-title { display: inline; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; line-height: 1.6; }
    .tw-item-title:hover { color: var(--tw-accent); text-decoration: underline; text-underline-offset: 4px; }
    .tw-overflow { position: relative; flex: none; }
    .tw-overflow[open] { z-index: 10; }
    .tw-overflow > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 13px; border: 1px solid var(--tw-line); border-radius: 8px; background: transparent; color: var(--text-2); font: 600 .8rem/1.45 var(--font-ui); list-style: none; cursor: pointer; }
    .tw-overflow > summary::-webkit-details-marker { display: none; }
    .tw-overflow > summary:hover, .tw-overflow[open] > summary { background: var(--bg-soft); color: var(--tw-accent); }
    .tw-action-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 210px; padding: 6px; border: 1px solid var(--tw-line); border-radius: 10px; background: var(--card); box-shadow: 0 12px 30px rgb(0 0 0 / 14%); }
    .tw-action-menu :is(a, button) { display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: 500 .84rem/1.45 var(--font-ui); text-decoration: none; text-align: left; cursor: pointer; }
    .tw-action-menu :is(a, button):hover { background: var(--bg-soft); }
    .tw-action-menu .tw-action-danger { color: var(--tw-error); }
    .tw-action-menu p { padding: 8px 12px; font-size: .78rem; line-height: 1.5; color: var(--tw-muted); }
    .tw-action-menu :disabled { opacity: .5; cursor: wait; }
    #wsActions:empty { display: none; }
}
@media screen and (max-width: 600px) {
    .tw-row-actions { flex-basis: 100%; justify-content: flex-end; }
}
