:root {
    --tt-topnav-h: 64px;
    --bg: #080a10;
    --panel: #10141e;
    --panel-2: #151b28;
    --line: rgba(160, 190, 230, 0.12);
    --line-2: rgba(160, 190, 230, 0.22);
    --ice: #7cc4ff;
    --ice-deep: #2f6fb3;
    --gold: #e8b64c;
    --gold-deep: #a8741c;
    --ok: #3ddc84;
    --danger: #ff6b6b;
    --text: #eef2f8;
    --text-2: rgba(238, 242, 248, 0.72);
    --text-3: rgba(238, 242, 248, 0.48);
    --r: 10px;
    --r-lg: 14px;
    --side-w: 232px;
    --pad: clamp(16px, 2vw, 32px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[aria-busy="true"] { opacity: 0.6; cursor: progress; }
html { overflow-x: clip; scroll-padding-top: calc(var(--tt-topnav-h) + 16px); }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--ice); }

/* App shell: top navbar (shared) + left sidebar + main (Critical Rule 17: full width, responsive) */
.w3-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: calc(100dvh - var(--tt-topnav-h)); }
@media (min-width: 900px) { .w3-shell { grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: 1fr; } }

.w3-side {
    position: sticky; top: var(--tt-topnav-h); z-index: 5;
    background: rgba(10, 13, 20, 0.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.w3-nav { display: flex; gap: 4px; padding: 8px var(--pad); overflow-x: auto; scrollbar-width: none; }
.w3-nav::-webkit-scrollbar { display: none; }
.w3-nav a {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    border-radius: var(--r); color: var(--text-2); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.w3-nav a i { width: 18px; text-align: center; color: var(--text-3); }
.w3-nav a:hover { background: var(--panel-2); color: var(--text); }
.w3-nav a.active { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.w3-nav a.active i { color: var(--gold); }
.w3-side-status { display: none; }
.w3-side-link { display: none; }
@media (max-width: 899px) {
    .w3-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 4px; }
    .w3-nav a { flex-direction: column; gap: 2px; justify-content: center; padding: 6px 2px; min-height: 52px; font-size: 0.72rem; text-align: center; white-space: normal; line-height: 1.15; }
    .w3-nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
    .w3-sec { scroll-margin-top: 80px; }
}

@media (min-width: 900px) {
    .w3-side {
        height: calc(100dvh - var(--tt-topnav-h)); border-bottom: 0; border-right: 1px solid var(--line);
        display: flex; flex-direction: column; padding: 16px 12px; background: #0a0d14;
    }
    .w3-nav { flex-direction: column; padding: 0; overflow: visible; }
    .w3-side-status { display: block; }
    .w3-side-link {
        display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 8px 14px; margin: auto 0 12px;
        border-radius: var(--r); text-decoration: none; text-align: center; font-weight: 700; line-height: 1.25;
        background: linear-gradient(180deg, #f3c763, var(--gold-deep)); color: #1b1203;
        box-shadow: 0 0 0 1px rgba(232, 182, 76, 0.5), 0 6px 22px rgba(232, 182, 76, 0.25);
    }
    .w3-side-link:hover { filter: brightness(1.08); }
    .w3-side-link i { font-size: 1.15rem; }
}

.w3-status { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); padding: 14px; display: grid; gap: 10px; font-size: 0.9rem; color: var(--text); text-decoration: none; cursor: pointer; }
.w3-status:hover { border-color: var(--line-2); background: var(--panel-2); }
.w3-status:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.w3-status-sub { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); }
.w3-status-sub i { font-size: 0.75rem; }
.w3-status li > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.w3-status .w3-dot { width: 8px; height: 8px; }
.w3-status-row { display: flex; align-items: center; gap: 8px; }
.w3-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.w3-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18); }
.w3-status small { color: var(--text-3); display: block; }
.w3-status ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 30vh; overflow: auto; }
.w3-status li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
.w3-status li span { color: var(--text-3); font-variant-numeric: tabular-nums; }

.w3-main { padding: 20px var(--pad) 64px; display: grid; gap: 36px; align-content: start; min-width: 0; }
.w3-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.w3-head h1 {
    font-family: 'Cinzel', serif; font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 0; line-height: 1.1;
    background: linear-gradient(180deg, #fff3cf, var(--gold) 60%, var(--gold-deep));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.w3-sub { color: var(--text-3); font-weight: 500; }

/* Section header: title · ? · action on the right */
.w3-sec { min-width: 0; }
.w3-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 44px; }
.w3-sec-head h2 { margin: 0; font-size: 1.25rem; }
.w3-head-act { margin-left: auto; }
.w3-q {
    width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent;
    color: var(--text-3); font: 700 0.8rem/1 'Inter', sans-serif; cursor: pointer; flex: none; position: relative;
}
.w3-q::after { content: ''; position: absolute; inset: -9px; }
.w3-q:hover, .w3-q[aria-expanded="true"] { color: var(--text); border-color: var(--ice); }
.w3-pill { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line-2); color: var(--text-2); }
.w3-pill.on { color: #04150b; background: var(--ok); border-color: var(--ok); }
.w3-pop {
    position: fixed; z-index: calc(var(--tt-z-modal, 1000) + 20); max-width: min(320px, calc(100vw - 24px));
    background: #1b2333; border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px;
    font-size: 0.88rem; color: var(--text-2); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.w3-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
    font: 600 0.95rem 'Inter', sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.w3-btn:hover { border-color: var(--ice); }
.w3-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.w3-btn-primary { background: linear-gradient(180deg, #f3c763, var(--gold-deep)); color: #1b1203; border-color: transparent; }
.w3-btn-ice { background: linear-gradient(180deg, var(--ice), var(--ice-deep)); color: #04101d; border-color: transparent; }
.w3-btn-ghost { background: transparent; }
.w3-btn-icon { width: 44px; padding: 0; }
.w3-btn-danger { color: var(--danger); background: transparent; }
.w3-btn-big { min-height: 52px; font-size: 1rem; }

/* LAN section: three step tiles */
.w3-steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.w3-step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.w3-step-n { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; }
.w3-dim { opacity: 0.55; }
.w3-step-n b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1b1203; font-size: 0.85rem; }
.w3-step p { margin: 0; color: var(--text-2); font-size: 0.92rem; }
.w3-step .w3-btn { width: 100%; }
.w3-step-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; }
.w3-step-links a, .w3-step-links button { color: var(--text-3); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; min-height: 32px; }
.w3-step-links a:hover, .w3-step-links button:hover { color: var(--text); }
.w3-seg { margin-left: auto; display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r); background: #0a0d14; }
.w3-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font: 600 0.82rem 'Inter', sans-serif; cursor: pointer; position: relative; }
.w3-seg button::after { content: ''; position: absolute; inset: -4px 0; }
.w3-seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.w3-cmd { display: flex; align-items: center; gap: 6px; background: #0a0d14; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 4px 4px 12px; min-width: 0; }
.w3-cmd code { flex: 1; min-width: 0; font: 0.85rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace; color: var(--ice); overflow-wrap: anywhere; padding: 6px 0; }
.w3-copy { width: 40px; height: 40px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: pointer; }
.w3-copy:hover { color: var(--text); background: var(--panel-2); }
.w3-cta .w3-btn-ghost { flex: none; }
.w3-kv { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; color: var(--text-3); }
.w3-kv b { color: var(--text); font-variant-numeric: tabular-nums; }
.w3-cta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.w3-cta p { margin: 0; color: var(--text-2); flex: 1 1 260px; }

/* Card grids */
.w3-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.w3-cards-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.w3-empty { grid-column: 1 / -1; color: var(--text-3); padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); text-align: center; }
.w3-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.w3-card:hover { border-color: var(--line-2); }
.w3-card h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.w3-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.w3-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-3); font-size: 0.85rem; }
.w3-meta i { margin-right: 4px; }
.w3-note { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.w3-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.w3-actions .w3-grow { flex: 1; }
.w3-stars-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; font-size: 0.85rem; cursor: pointer; min-height: 32px; }
.w3-stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.w3-stars .far { color: var(--text-3); }

.w3-members { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.w3-members li { font-size: 0.82rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.w3-members li.on { border-color: rgba(61, 220, 132, 0.45); color: var(--text); }
.w3-members li.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.w3-members li small { color: var(--text-3); }
.w3-crown { color: var(--gold); font-size: 0.75rem; }
.w3-cap { font-size: 0.8rem; font-weight: 700; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.w3-cap.full { color: var(--danger); border-color: rgba(255, 107, 107, 0.4); }

/* Help */
.w3-help-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.w3-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.w3-panel-title { margin: 0 0 10px; font-size: 1rem; color: var(--text); }
.w3-howto { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.w3-howto h3 { margin: 0; font-size: 0.95rem; }
.w3-howto p { margin: 2px 0 0; color: var(--text-2); font-size: 0.9rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.faq-item p { margin: 0 0 12px; color: var(--text-2); font-size: 0.92rem; }
.w3-fine { color: var(--text-3); font-size: 0.8rem; margin: 14px 0 0; }

/* Dialogs (native <dialog>: top layer, above the navbar) */
.w3-dialog {
    width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px; color: var(--text);
    background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.w3-dialog-wide { width: min(640px, calc(100vw - 24px)); }
.w3-dialog::backdrop { background: rgba(3, 5, 9, 0.7); }
.w3-dialog form, .w3-dialog[open] { display: grid; gap: 12px; }
.w3-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.w3-dlg-head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.w3-x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-3); font-size: 1.1rem; cursor: pointer; border-radius: var(--r); }
.w3-x:hover { color: var(--text); background: var(--panel-2); }
.w3-row { display: grid; gap: 10px; grid-template-columns: 1fr 96px; }
input[type="text"], select {
    width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2);
    background: #0a0d14; color: var(--text); font: inherit;
}
input[type="text"]:focus, select:focus, .w3-btn:focus-visible, .w3-nav a:focus-visible, .w3-q:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
select option { background-color: #1a1a24; color: #ffffff; }
.w3-file { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); cursor: pointer; color: var(--text-2); overflow-wrap: anywhere; }
.w3-file i { color: var(--ice); font-size: 1.3rem; }
.w3-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.w3-file:focus-within { outline: 2px solid var(--ice); }

/* Rating: 5 stars, each split into two halves */
.w3-rate-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.w3-rate { display: inline-flex; gap: 2px; }
.w3-star { position: relative; width: 40px; height: 44px; display: grid; place-items: center; font-size: 1.6rem; color: var(--text-3); }
.w3-star.full, .w3-star.half { color: var(--gold); }
.w3-star button { position: absolute; top: 0; bottom: 0; border: 0; padding: 0; background: transparent; cursor: pointer; }
.w3-star .w3-whole { left: 0; right: 0; }
.w3-star .w3-left { left: 0; width: 50%; }
.w3-star .w3-right { right: 0; width: 50%; }
.w3-star button:focus-visible { outline: 2px solid var(--ice); }
.w3-rate-label { color: var(--text-2); font-size: 0.9rem; }
.w3-rate-label button { background: none; border: 0; color: var(--text-3); text-decoration: underline; cursor: pointer; font: inherit; min-height: 32px; }
.w3-count { color: var(--text-3); font-weight: 500; }
.w3-comment-form { display: grid; grid-template-columns: 1fr 44px; gap: 8px; }
.w3-comment-form .w3-btn { padding: 0; }
.w3-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 40vh; overflow: auto; }
.w3-comments li { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 4px; }
.w3-comments .who { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-3); }
.w3-comments .who b { color: var(--text); }
.w3-comments .who button { margin-left: auto; background: none; border: 0; color: var(--text-3); cursor: pointer; width: 32px; height: 32px; }
.w3-comments .who button:hover { color: var(--danger); }
.w3-comments p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

.w3-toast {
    position: fixed; inset: auto; left: 50%; bottom: 20px; margin: 0; transform: translateX(-50%); z-index: calc(var(--tt-z-toast, 1100) + 10); color: var(--text);
    max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--r); background: #1d2536; border: 1px solid var(--line-2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.w3-toast.err { border-color: var(--danger); }

/* Touch: every control at least 44px, bigger half-star targets */
@media (pointer: coarse) {
    .w3-step-links a, .w3-step-links button, .w3-stars-btn, .w3-rate-label button { min-height: 44px; display: inline-flex; align-items: center; }
    .w3-copy, .w3-comments .who button { width: 44px; height: 44px; }
    .w3-seg button { min-height: 44px; }
    .w3-star { width: 56px; height: 56px; font-size: 2.2rem; }
}

/* Players on the LAN (debug overview) */
.w3-players { margin-top: 18px; }
.w3-sub-head { margin-bottom: 8px; }
.w3-sub-head h3 { margin: 0; font-size: 1.05rem; }
.w3-updated { margin-left: auto; color: var(--text-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.w3-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.w3-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.w3-table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.w3-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.w3-table tr:last-child td { border-bottom: 0; }
.w3-table td:first-child { color: var(--text); }
.w3-table .w3-dot { display: inline-block; margin-right: 8px; vertical-align: middle; }
.w3-table td { vertical-align: middle; }
.w3-table code { color: var(--ice); background: none; padding: 0; }
.w3-table .w3-me td { background: rgba(232, 182, 76, 0.06); }
.w3-table .w3-warn { color: var(--gold); }
.w3-table small { color: var(--text-3); margin-left: 6px; }
.w3-tag { font-size: 0.72rem; font-weight: 700; color: var(--gold); border: 1px solid rgba(232, 182, 76, 0.4); border-radius: 999px; padding: 1px 7px; }
@media (max-width: 700px) {
    .w3-table thead { display: none; }
    .w3-table, .w3-table tbody, .w3-table tr, .w3-table td { display: block; width: 100%; }
    .w3-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
    .w3-table tr:last-child { border-bottom: 0; }
    .w3-table td { padding: 0; border: 0; white-space: normal; }
    .w3-table td:first-child { grid-column: 1 / -1; padding-bottom: 4px; }
    .w3-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; color: var(--text-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
}

.w3-sources { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; color: var(--text-3); font-size: 0.85rem; }
.w3-sources a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text); text-decoration: none; font-weight: 600; }
.w3-sources a:hover { border-color: var(--ice); }
.w3-sources .w3-ext { font-size: 0.75rem; color: var(--text-3); }

.w3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w3-table .w3-td-act { text-align: right; width: 1%; }
.w3-dm { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }
@media (pointer: coarse) { .w3-dm { min-height: 44px; } }
@media (max-width: 700px) {
    .w3-table tr { grid-template-columns: 1fr 1fr; align-items: center; }
    .w3-table td:first-child { grid-column: 1; grid-row: 1; }
    .w3-table .w3-td-act { grid-column: 2; grid-row: 1; justify-self: end; width: auto; }
}

.w3-table .w3-off td { color: var(--text-3); }
.w3-table .w3-off td:first-child b { color: var(--text-2); font-weight: 600; }

/* Messages: Public Chat direct messages inside the tool */
.w3-nav a { position: relative; }
.w3-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.72rem; font-weight: 800; display: inline-grid; place-items: center; margin-left: auto; }
@media (max-width: 899px) { .w3-nav .w3-badge { position: absolute; top: 4px; right: calc(50% - 26px); margin: 0; } }
.w3-chatname { flex-wrap: wrap; }
.w3-chatname h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--text); }
.w3-chatname input { flex: 1 1 220px; }
.w3-msg {
    display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    height: 560px; min-height: 360px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.w3-msg-list { border-right: 1px solid var(--line); overflow-y: auto; }
.w3-msg-empty { padding: 18px; margin: 0; }
.w3-conv { display: grid; gap: 4px; width: 100%; text-align: left; padding: 12px 14px; min-height: 64px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text-2); font: inherit; cursor: pointer; }
.w3-conv:hover { background: var(--panel-2); }
.w3-conv.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--gold); }
.w3-conv-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.w3-conv-top b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w3-conv-top .w3-badge { margin-left: 0; }
.w3-conv-top small { margin-left: auto; color: var(--text-3); font-size: 0.75rem; white-space: nowrap; }
.w3-conv-last { font-size: 0.85rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w3-conv.unread .w3-conv-last { color: var(--text); font-weight: 600; }
.w3-conv .w3-dot, .w3-thread-head .w3-dot { display: inline-block; flex: none; }
.w3-msg-thread { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.w3-msg-thread > .w3-msg-empty { align-self: center; justify-self: center; }
.w3-thread-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 60px; }
.w3-thread-name { display: grid; min-width: 0; }
.w3-thread-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w3-thread-name small { color: var(--text-3); font-size: 0.78rem; }
.w3-thread-block { margin-left: auto; font-size: 0.85rem; color: var(--text-3); }
.w3-thread-back { display: none; }
.w3-feed { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.w3-older { align-self: center; font-size: 0.85rem; }
.w3-bubble { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--panel-2); border: 1px solid var(--line); align-self: flex-start; display: grid; gap: 4px; }
.w3-bubble.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(232, 182, 76, 0.14); border-color: rgba(232, 182, 76, 0.3); }
.w3-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.w3-bubble small { color: var(--text-3); font-size: 0.72rem; justify-self: end; }
.w3-bubble img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; }
.w3-file-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ice); overflow-wrap: anywhere; }
.w3-msg-note { padding: 14px; margin: 0; border-top: 1px solid var(--line); }
.w3-composer { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: end; padding: 10px 12px; border-top: 1px solid var(--line); }
.w3-composer textarea { width: 100%; min-height: 44px; max-height: 140px; resize: vertical; padding: 11px 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: #0a0d14; color: var(--text); font: inherit; }
.w3-composer textarea:focus { outline: 2px solid var(--ice); outline-offset: 1px; }
.w3-attach { cursor: pointer; position: relative; }
.w3-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.w3-attach:focus-within { outline: 2px solid var(--ice); }
.w3-attach-name { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-3); }
.w3-attach-name:empty { display: none; }
@media (max-width: 760px) {
    .w3-msg { grid-template-columns: minmax(0, 1fr); }
    .w3-msg-list { border-right: 0; }
    .w3-msg .w3-msg-thread { display: none; }
    .w3-msg.w3-thread-open .w3-msg-list { display: none; }
    .w3-msg.w3-thread-open .w3-msg-thread { display: grid; }
    .w3-thread-back { display: inline-flex; }
}

.w3-table .w3-on { color: var(--ok); font-weight: 600; }
.w3-table .w3-sub-line { display: block; color: var(--text-3); font-size: 0.78rem; margin: 2px 0 0; }
