:root {
    color-scheme: light;
    --bg: #f7faf8;
    --panel: #ffffff;
    --text: #17211f;
    --muted: #5d6b67;
    --brand: #176b67;
    --brand-2: #d94f30;
    --line: #dce7e3;
    --soft: #edf6f3;
    --danger: #b42318;
    --success: #0f7a45;
    --shadow: 0 16px 45px rgba(23, 33, 31, .08);
}
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111815;
    --panel: #18231f;
    --text: #edf7f3;
    --muted: #a8b7b2;
    --brand: #62c9bd;
    --brand-2: #ff8a65;
    --line: #2d3b36;
    --soft: #17231f;
    --shadow: 0 16px 45px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg), transparent 8%); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; }
.nav-menu { display: flex; align-items: center; gap: 18px; }
.nav-menu a, .link-button { text-decoration: none; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; }
.nav-menu a:hover, .link-button:hover { color: var(--text); }
.nav-toggle { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; cursor: pointer; }
.button-small { min-height: 36px; padding: 0 12px; }
.button-secondary { background: var(--brand-2); border-color: var(--brand-2); }
.button-ghost { background: transparent; color: var(--brand); }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; }
.hero { padding: 72px 0 36px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 44px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-size: 13px; font-weight: 800; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 12px; letter-spacing: 0; }
h1 { font-size: clamp(40px, 8vw, 74px); max-width: 920px; }
h2 { font-size: 30px; }
h3 { font-size: 20px; }
p { margin: 0 0 14px; color: var(--muted); }
.lead { font-size: 20px; max-width: 720px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-panel, .form-panel, .auth-card, .list-panel, .room-card, .category-grid article, .stats-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.hero-panel { padding: 22px; }
.mini-chat { display: grid; gap: 12px; }
.mini-chat p { background: var(--soft); border-radius: 8px; padding: 14px; margin: 0; }
.section { padding: 48px 0; }
.soft { background: var(--soft); }
.section-title, .split { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.feature-grid, .room-grid, .category-grid, .stats-grid, .dashboard-grid { display: grid; gap: 16px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.room-grid { grid-template-columns: repeat(3, 1fr); }
.dashboard-grid { grid-template-columns: 1fr 1fr; }
.category-grid, .stats-grid { grid-template-columns: repeat(4, 1fr); }
.feature-grid article { border-top: 3px solid var(--brand); padding-top: 16px; }
.room-card { padding: 18px; min-height: 210px; display: flex; flex-direction: column; }
.room-card h3 a { text-decoration: none; }
.room-meta, .room-footer { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.room-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.page-head { padding: 46px 0; background: var(--soft); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); }
.filters, .two-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; margin-bottom: 24px; }
.two-cols { grid-template-columns: 1fr 1fr; margin-bottom: 0; }
label { display: grid; gap: 6px; font-weight: 700; color: var(--text); }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 12px; }
textarea { resize: vertical; min-height: 110px; }
.auth-shell { min-height: 70vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-stack { width: min(100%, 920px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.auth-card, .form-panel { width: min(100%, 620px); padding: 24px; display: grid; gap: 14px; }
.narrow { width: min(760px, calc(100% - 32px)); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.checkbox input { width: auto; margin-top: 5px; }
.chips-field { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips-field label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.chips-field input { width: auto; }
.flashes { padding-top: 12px; }
.flashes:empty { display: none; padding: 0; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--soft); border: 1px solid var(--line); }
.alert-error { border-color: color-mix(in srgb, var(--danger), white 50%); color: var(--danger); }
.alert-success { border-color: color-mix(in srgb, var(--success), white 50%); color: var(--success); }
.list-panel { padding: 12px; display: grid; gap: 8px; }
.list-panel a, .admin-links a { display: flex; justify-content: space-between; padding: 12px; border-radius: 8px; background: var(--soft); text-decoration: none; }
.chat-shell { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - 68px); }
.chat-side { border-right: 1px solid var(--line); padding: 22px; background: var(--panel); overflow-y: auto; }
.chat-side h1 { font-size: 28px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; }
.member-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.member-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chat-main { display: grid; grid-template-rows: auto 1fr auto; min-height: calc(100vh - 68px); }
.chat-status { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.messages { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.message { width: min(720px, 90%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.message p { color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.message time { color: var(--muted); font-size: 12px; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--panel); }
.composer textarea { min-height: 48px; }
.locked { display: block; }
.stats-grid article { padding: 18px; }
.stats-grid strong { display: block; font-size: 32px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose { max-width: 820px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; }
.footer-grid a { display: inline-block; margin-left: 16px; color: var(--muted); }
.irc-standalone { width: 100vw; height: 100vh; height: 100dvh; margin: 0; overflow: hidden; background: #030604; }
.irc-client { --irc-bg: #030604; --irc-panel: #050a07; --irc-line: #1a3b25; --irc-text: #d9ffe3; --irc-muted: #80b88e; --irc-green: #63ff88; --irc-blue: #7bd7ff; --irc-amber: #ffd166; position: fixed; inset: 0; z-index: 2; width: 100vw; height: 100vh; height: 100dvh; min-width: 0; min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr) 220px; grid-template-rows: 28px minmax(0, 1fr) 34px; overflow: hidden; background: var(--irc-bg); color: var(--irc-text); font-family: Consolas, "Lucida Console", "Courier New", monospace; }
.irc-titlebar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 8px; border-bottom: 1px solid var(--irc-line); background: #020302; }
.irc-titlebar span, .irc-titlebar a { color: var(--irc-muted); font-size: 12px; }
.irc-titlebar nav { display: flex; gap: 12px; }
.irc-titlebar a { text-decoration: none; }
.irc-titlebar .irc-account-link { color: #020302; background: var(--irc-green); border: 1px solid var(--irc-green); padding: 1px 6px; font-weight: 700; }
.irc-titlebar .irc-account-link:hover { color: #020302; background: #9dffb2; }
.irc-titlebar form { margin: 0; display: inline; }
.irc-nav-button { border: 0; background: transparent; color: var(--irc-muted); padding: 0; cursor: pointer; font: inherit; }
.irc-nav-button:hover { color: #fff; }
.irc-channels, .irc-users { grid-row: 2 / 4; min-height: 0; overflow: hidden; background: var(--irc-panel); border-right: 1px solid var(--irc-line); }
.irc-users { border-right: 0; border-left: 1px solid var(--irc-line); }
.irc-pane-title { padding: 5px 7px; border-bottom: 1px solid var(--irc-line); color: var(--irc-green); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.irc-tree { display: grid; padding: 4px; gap: 0; }
.irc-tree {
    max-height: calc(100vh - 210px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: auto;
    scrollbar-color: #808080 var(--win-face);
}
.irc-tree::-webkit-scrollbar { width: 16px; }
.irc-tree::-webkit-scrollbar-track { background: var(--win-face); }
.irc-tree::-webkit-scrollbar-thumb {
    background: #808080;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}
.irc-tree a { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 8px; min-height: 22px; padding: 2px 4px; color: var(--irc-text); text-decoration: none; border-radius: 0; font-size: 13px; line-height: 1.15; }
.irc-tree a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irc-tree a:hover, .irc-tree a.active { background: #092b15; color: #fff; outline: 1px solid #2c8f47; }
.irc-tree small { color: var(--irc-muted); }
.irc-help { display: grid; gap: 3px; padding: 6px; border-top: 1px solid var(--irc-line); color: var(--irc-muted); font-size: 12px; }
.irc-help strong { color: var(--irc-green); }
.irc-help code { color: var(--irc-blue); background: transparent; }
.irc-channels {
    display: flex;
    flex-direction: column;
}
.irc-channels .irc-tree {
    flex: 0 1 auto;
}
.irc-channels .irc-help {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: auto;
    scrollbar-color: #808080 var(--win-face);
}
.irc-channels .irc-help::-webkit-scrollbar { width: 16px; }
.irc-channels .irc-help::-webkit-scrollbar-track { background: var(--win-face); }
.irc-channels .irc-help::-webkit-scrollbar-thumb {
    background: #808080;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}
.irc-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: block; }
.irc-topic { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; gap: 10px; align-items: center; height: 28px; padding: 4px 8px; border-bottom: 1px solid var(--irc-line); background: #020302; font-size: 13px; }
.irc-topic strong { color: var(--irc-green); }
.irc-topic span { color: var(--irc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irc-log { position: absolute; top: 28px; bottom: 0; left: 0; right: 0; min-height: 0; overflow-y: scroll; overflow-x: hidden; overscroll-behavior: contain; padding: 6px 8px; font-size: 13px; line-height: 1.35; background: var(--irc-chat-bg, #fff); color: var(--irc-chat-text, #000); scrollbar-color: var(--irc-green) #020302; scrollbar-width: thin; }
.irc-topic[hidden],
.irc-log[hidden],
.irc-private-window[hidden] { display: none; }
.irc-private-window { position: absolute; inset: 0; min-height: 0; display: grid; grid-template-rows: 28px minmax(0, 1fr); background: var(--irc-chat-bg, #fff); border: 2px solid var(--irc-chat-border, #800080); }
.irc-private-title { display: grid; grid-template-columns: max-content minmax(0, 1fr) 24px; gap: 8px; align-items: center; min-width: 0; padding: 4px 7px; border-bottom: 1px solid #4b004b; background: #800080; color: #fff; font-size: 13px; }
.irc-private-title strong { color: #fff; }
.irc-private-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8d8d8; }
.irc-private-close { height: 20px; min-width: 20px; border: 2px outset #fff; border-radius: 0; background: #c0c0c0; color: #000; font: 700 12px Arial, sans-serif; line-height: 1; padding: 0; cursor: pointer; }
.irc-private-log { min-height: 0; overflow-y: scroll; overflow-x: hidden; padding: 6px 8px; background: var(--irc-chat-bg, #fff); color: var(--irc-chat-text, #000); font-size: 13px; line-height: 1.35; }
.irc-line { display: grid; grid-template-columns: 50px minmax(90px, max-content) minmax(0, 1fr); gap: 6px; padding: 1px 0; }
.irc-system { display: block; padding: 2px 0; color: var(--irc-green); }
.irc-private-line { color: #800080; font-weight: 700; }
.irc-line time { color: var(--irc-muted); }
.irc-line strong { color: var(--irc-blue); font-weight: 700; }
.irc-line span { color: var(--irc-text); overflow-wrap: anywhere; }
.irc-private-log .irc-line strong { color: var(--irc-chat-nick, #000080); }
.irc-private-log .irc-line time { color: var(--irc-chat-time, #666); }
.irc-private-log .irc-line span { color: var(--irc-chat-text, #000); }
.irc-input { grid-column: 2; grid-row: 3; z-index: 3; min-height: 34px; display: grid; grid-template-columns: max-content minmax(0, 1fr) 74px auto; gap: 6px; align-items: center; padding: 3px 6px; border-top: 1px solid var(--irc-line); background: #020302; }
.irc-input label, .irc-input span { color: var(--irc-green); font-weight: 700; }
.irc-input-link { height: 26px; display: inline-flex; align-items: center; border: 1px solid var(--irc-line); background: #06130a; color: var(--irc-blue); padding: 0 7px; text-decoration: none; font-weight: 700; }
.irc-input-link:hover { border-color: var(--irc-green); color: var(--irc-green); }
.irc-input input { height: 26px; border-radius: 0; border: 1px solid var(--irc-line); background: #000; color: var(--irc-green); padding: 3px 7px; font-family: inherit; }
.irc-emotes { height: 26px; min-width: 0; border-radius: 0; border: 1px solid var(--irc-line); background: #000; color: var(--irc-amber); padding: 2px 4px; font-family: inherit; }
.irc-input button { height: 26px; border: 1px solid var(--irc-green); border-radius: 0; background: #06240e; color: var(--irc-green); cursor: pointer; }
.irc-emote { color: var(--irc-amber); font-weight: 700; text-shadow: 0 0 5px rgba(255, 209, 102, .45); }
.irc-line.action strong,
.irc-line.action span { color: var(--irc-green); }
.irc-locked { grid-template-columns: 1fr auto; }
.irc-users ul { list-style: none; margin: 0; padding: 5px; display: grid; gap: 0; }
.irc-users li { display: flex; gap: 5px; padding: 2px 4px; border-radius: 0; color: var(--irc-text); font-size: 13px; line-height: 1.25; }
.irc-users li { cursor: default; }
.irc-users li span { color: var(--irc-green); }
.irc-nick-menu { position: fixed; z-index: 9999; min-width: 150px; display: grid; gap: 1px; padding: 2px; background: #c0c0c0; border-top: 2px solid #fff; border-left: 2px solid #fff; border-right: 2px solid #404040; border-bottom: 2px solid #404040; color: #000; font: 12px Arial, sans-serif; box-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.irc-nick-menu strong { display: block; margin: -1px -1px 2px; padding: 2px 6px; background: #000080; color: #fff; font-weight: 700; }
.irc-nick-menu button { width: 100%; min-height: 22px; border: 0; background: transparent; color: #000; text-align: left; padding: 3px 18px 3px 8px; font: inherit; cursor: pointer; }
.irc-nick-menu button:hover { background: #000080; color: #fff; }
.irc-nick-menu-separator { display: block; height: 1px; margin: 2px 4px; background: #808080; border-bottom: 1px solid #fff; }
.irc-color-control { min-height: 20px; display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; background: var(--win-face); color: #000; border-top: 2px solid var(--win-light); border-left: 2px solid var(--win-light); border-right: 2px solid var(--win-dark); border-bottom: 2px solid var(--win-dark); font: inherit; }
.irc-color-control input { width: 22px; height: 16px; border: 1px solid var(--win-shadow); border-radius: 0; padding: 0; background: transparent; cursor: pointer; }
@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; min-height: 38px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
    .nav-menu { display: none; position: absolute; left: 16px; right: 16px; top: 68px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); align-items: stretch; flex-direction: column; }
    .nav-menu.open { display: flex; }
    .hero-grid, .feature-grid, .room-grid, .category-grid, .stats-grid, .dashboard-grid, .filters, .two-cols, .chat-shell { grid-template-columns: 1fr; }
    .chat-side { border-right: 0; border-bottom: 1px solid var(--line); }
    .section-title, .split, .footer-grid { align-items: flex-start; flex-direction: column; }
    .action-row { width: 100%; justify-content: flex-start; }
    .action-row .button { width: 100%; }
    .composer { grid-template-columns: 1fr; }
    .irc-client { inset: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 26px minmax(82px, 16dvh) minmax(0, 1fr) minmax(66px, 13dvh) 34px; }
    .irc-titlebar { min-width: 0; gap: 8px; padding: 0 4px; }
    .irc-titlebar > div { min-width: 0; overflow: hidden; white-space: nowrap; }
    .irc-titlebar > div span { display: none; }
    .irc-titlebar nav { min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
    .irc-titlebar nav::-webkit-scrollbar { display: none; }
    .irc-titlebar .irc-account-link { padding: 1px 4px; }
    .irc-titlebar, .irc-channels, .irc-main, .irc-users, .irc-input { grid-column: 1; }
    .irc-channels { grid-row: 2; overflow-y: auto; border-left: 0; border-right: 0; border-bottom: 1px solid var(--irc-line); }
    .irc-users { grid-row: 4; overflow-y: auto; border-left: 0; border-right: 0; border-bottom: 1px solid var(--irc-line); }
    .irc-pane-title { padding: 3px 5px; font-size: 12px; }
    .irc-tree { grid-template-columns: 1fr 1fr; padding: 2px; }
    .irc-tree a { min-height: 20px; font-size: 12px; }
    .irc-help { display: none; }
    .irc-main { grid-row: 3; }
    .irc-input { grid-row: 5; grid-template-columns: max-content 1fr 62px; gap: 4px; }
    .irc-input label { display: none; }
    .irc-emotes { display: none; }
    .irc-line { grid-template-columns: 48px 1fr; }
    .irc-line span { grid-column: 2; }
}

@media (max-width: 520px) {
    .irc-client { grid-template-rows: 26px minmax(72px, 14dvh) minmax(0, 1fr) 28px 34px; }
    .irc-users ul { display: flex; gap: 6px; overflow-x: auto; padding: 4px; }
    .irc-users li { white-space: nowrap; font-size: 12px; }
    .irc-topic span { display: none; }
    .irc-log { font-size: 12px; padding: 4px; }
    .irc-line { grid-template-columns: 44px 1fr; gap: 4px; }
    .irc-input button { min-width: 54px; }
}

.classic-site {
    --bg: #0f1214;
    --panel: #171c20;
    --text: #d7e1e7;
    --muted: #8ea0aa;
    --brand: #75d18a;
    --brand-2: #79b8ff;
    --line: #2a333a;
    --soft: #12181c;
    --danger: #ff7b72;
    --success: #75d18a;
    --shadow: none;
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    background: var(--bg);
}
.classic-site .site-header { background: #020302; border-bottom-color: #1a3b25; backdrop-filter: none; }
.classic-site .site-header .container { width: 100%; padding: 0 8px; }
.classic-site .nav { min-height: 28px; height: 28px; gap: 14px; }
.classic-site.irc-page .site-header { position: fixed; top: 0; left: 0; right: 0; height: 43px; }
.classic-site.irc-page .nav { min-height: 42px; height: 42px; }
.classic-site .terminal-brand { color: var(--brand); gap: 6px; }
.classic-site .terminal-brand strong { color: #d9ffe3; font-size: 13px; }
.classic-site .terminal-brand span { color: var(--brand); font-size: 12px; font-weight: 400; }
.classic-site .brand-mark { width: 28px; height: 28px; border-radius: 4px; background: #1f3d2a; color: var(--brand); border: 1px solid var(--brand); font-size: 12px; }
.classic-site .nav-menu { gap: 10px; }
.classic-site .nav-menu a,
.classic-site .link-button { color: #80b88e; border: 1px solid transparent; padding: 1px 6px; border-radius: 0; font-size: 12px; }
.classic-site .nav-menu .account-link { color: #020302; background: var(--brand); border-color: var(--brand); font-weight: 700; }
.classic-site .nav-menu a:hover,
.classic-site .link-button:hover { color: #fff; border-color: var(--line); background: #11171b; }
.classic-site .nav-menu .account-link:hover { color: #020302; background: #9dffb2; border-color: #9dffb2; }
.classic-site .button { min-height: 34px; border-radius: 4px; background: #1f3d2a; border-color: var(--brand); color: #fff; font-weight: 700; }
.classic-site .button-secondary { background: #17324f; border-color: var(--brand-2); }
.classic-site .button-ghost { background: transparent; color: var(--brand); }
.classic-site .button-danger { background: #800000; border-color: #800000; color: #fff; }
.admin-room-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-room-actions form, .admin-danger-zone form { margin: 0; }
.admin-danger-zone { margin-top: 12px; border-color: #800000; }
.admin-danger-zone h2 { color: #800000; }
.classic-site .page-head { padding: 22px 0; background: #12181c; border-top: 1px solid #0c0f11; border-bottom-color: var(--line); }
.classic-site .page-head h1,
.classic-site h1 { font-size: clamp(24px, 4vw, 40px); color: var(--brand); }
.classic-site h2 { font-size: 22px; color: var(--brand); }
.classic-site h3 { font-size: 17px; color: var(--brand-2); }
.classic-site p { color: var(--muted); }
.classic-site .section { padding: 24px 0; }
.classic-site .hero { padding: 28px 0; }
.classic-site .hero-panel,
.classic-site .form-panel,
.classic-site .auth-card,
.classic-site .list-panel,
.classic-site .room-card,
.classic-site .category-grid article,
.classic-site .stats-grid article,
.classic-site table { border-radius: 4px; background: var(--panel); border-color: var(--line); box-shadow: none; }
.classic-site .room-card { min-height: 160px; }
.classic-site input,
.classic-site textarea,
.classic-site select { border-radius: 4px; border-color: var(--line); background: #11171b; color: var(--text); font-family: inherit; }
.classic-site .auth-shell { min-height: calc(100vh - 110px); align-items: start; padding-top: 28px; }
.classic-site .auth-card,
.classic-site .form-panel { gap: 10px; }
.classic-site .alert { border-radius: 4px; background: #11171b; border-color: var(--line); }
.classic-site .list-panel a,
.classic-site .admin-links a { border-radius: 4px; background: #11171b; border: 1px solid var(--line); color: var(--text); }
.classic-site th { color: var(--brand); background: #11171b; }
.classic-site td { color: var(--text); }
.classic-site .site-footer { background: #0c0f11; border-top-color: var(--line); padding: 16px 0; }
.classic-site .footer-grid a { color: var(--muted); }
.classic-site.terminal-page main { min-height: calc(100dvh - 28px); background: #030604; }
.classic-site.terminal-page .container { width: 100%; padding: 0 8px; }
.classic-site.terminal-page .page-head { padding: 5px 0; background: #020302; border-top: 0; border-bottom-color: #1a3b25; }
.classic-site.terminal-page .page-head h1 { font-size: 20px; margin-bottom: 2px; }
.classic-site.terminal-page .page-head p { margin: 0; font-size: 12px; }
.classic-site.terminal-page .section { padding: 6px 0; }
.classic-site.terminal-page .site-footer { display: none; }
.classic-site.terminal-page .narrow { width: min(620px, calc(100% - 8px)); margin-left: 0; }
.classic-site.terminal-page .form-panel,
.classic-site.terminal-page .auth-card { padding: 10px; gap: 7px; border-radius: 0; }
.classic-site.terminal-page .auth-shell { min-height: 0; place-items: start; padding: 6px 8px; }
.classic-site.terminal-page .auth-stack { width: min(620px, 100%); grid-template-columns: 1fr 1fr; gap: 8px; }
.classic-site.terminal-page .auth-card h1 { font-size: 18px; margin: 0 0 4px; max-width: none; }
.classic-site.terminal-page .form-panel h2,
.classic-site.terminal-page .auth-card h2 { font-size: 16px; margin: 4px 0 2px; }
.classic-site.terminal-page label { gap: 3px; font-size: 12px; }
.classic-site.terminal-page input,
.classic-site.terminal-page textarea,
.classic-site.terminal-page select { min-height: 28px; padding: 5px 8px; border-radius: 0; font-size: 12px; }
.classic-site.terminal-page textarea { min-height: 62px; }
.classic-site.terminal-page .two-cols { gap: 8px; margin-bottom: 0; }
.classic-site.terminal-page .chips-field { padding: 6px; gap: 6px; border-radius: 0; font-size: 12px; }
.classic-site.terminal-page .chips-field label { gap: 4px; }
.classic-site.terminal-page .button { min-height: 28px; padding: 0 10px; border-radius: 0; font-size: 12px; }
.classic-site.terminal-page p { font-size: 12px; margin-bottom: 6px; }
.classic-site.irc-page { width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.classic-site.irc-page main { height: 0; overflow: visible; }
.classic-site.irc-page .irc-client { height: auto; }
.classic-site.irc-page .site-footer { display: none; }
.classic-site .compact-head { padding: 12px 0; }
.classic-site .compact-head h1 { font-size: 24px; margin-bottom: 4px; }
.classic-site .compact-section { padding: 12px 0 20px; }
.irc-directory { border: 1px solid var(--line); background: #030604; font-size: 13px; }
.irc-directory-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 64px 90px; gap: 10px; min-height: 26px; align-items: center; padding: 3px 8px; border-bottom: 1px solid #12301d; color: var(--text); text-decoration: none; }
.irc-directory-row:last-child { border-bottom: 0; }
.irc-directory-head { color: var(--brand); background: #050a07; font-weight: 700; text-transform: uppercase; }
a.irc-directory-row:hover { background: #092b15; outline: 1px solid #2c8f47; }
.irc-directory-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irc-directory-row span:first-child { color: var(--brand); font-weight: 700; }
@media (max-width: 860px) {
    .classic-site .site-header .container { padding: 0 4px; }
    .classic-site .nav { min-height: 28px; height: 28px; }
    .classic-site .terminal-brand span { display: none; }
    .classic-site .nav-toggle { min-height: 22px; padding: 0 6px; border-radius: 0; border-color: #1a3b25; background: #06130a; color: var(--brand); font-size: 12px; }
    .classic-site .nav-menu { top: 28px; left: 4px; right: 4px; padding: 6px; border-radius: 0; border-color: #1a3b25; background: #020302; box-shadow: none; }
    .classic-site .nav-menu a,
    .classic-site .link-button { min-height: 24px; display: flex; align-items: center; }
    .classic-site.terminal-page .narrow { width: 100%; padding: 0 4px; }
    .classic-site.terminal-page .form-panel,
    .classic-site.terminal-page .auth-card { padding: 8px; }
    .classic-site.terminal-page .auth-shell { padding: 4px; }
    .classic-site.terminal-page .auth-stack { grid-template-columns: 1fr; gap: 6px; }
    .irc-directory { font-size: 12px; }
    .irc-directory-row { grid-template-columns: minmax(120px, 1fr) 44px 70px; gap: 6px; }
    .irc-directory-row span:nth-child(2) { display: none; }
}

@media (max-width: 700px) {
    .classic-site.terminal-page .auth-stack { grid-template-columns: 1fr; width: min(360px, 100%); }
}

/* Windows 95 / mIRC skin */
.irc-standalone,
.classic-site {
    --win-bg: #c0c0c0;
    --win-face: #c0c0c0;
    --win-shadow: #808080;
    --win-dark: #404040;
    --win-light: #ffffff;
    --win-blue: #000080;
    --win-blue-2: #1084d0;
    --win-text: #000000;
    --irc-bg: #ffffff;
    --irc-panel: #c0c0c0;
    --irc-line: #808080;
    --irc-text: #000000;
    --irc-muted: #000080;
    --irc-green: #000000;
    --irc-blue: #000080;
    --irc-amber: #800000;
    background: var(--win-bg);
    color: var(--win-text);
    font-family: Tahoma, "MS Sans Serif", "Microsoft Sans Serif", Arial, sans-serif;
}

.irc-client {
    padding: 3px;
    background: var(--win-face);
    color: var(--win-text);
    font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    grid-template-rows: 24px 28px 22px minmax(0, 1fr) 30px;
}

.irc-toolbar,
.irc-statusbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    background: var(--win-face);
    border-top: 1px solid var(--win-light);
    border-left: 1px solid var(--win-light);
    border-right: 1px solid var(--win-shadow);
    border-bottom: 1px solid var(--win-shadow);
    padding: 2px 4px;
    font-size: 12px;
}

.irc-toolbar {
    grid-row: 2;
}

.irc-statusbar {
    grid-row: 3;
    justify-content: space-between;
    color: #000;
}

.irc-statusbar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-top: 1px solid var(--win-shadow);
    border-left: 1px solid var(--win-shadow);
    border-right: 1px solid var(--win-light);
    border-bottom: 1px solid var(--win-light);
    padding: 1px 5px;
}

.irc-toolbar a,
.irc-toolbar button,
.irc-tabs a,
.irc-tab-private {
    flex: 0 0 auto;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    background: var(--win-face);
    color: #000;
    text-decoration: none;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    border-radius: 0;
    cursor: pointer;
    font: inherit;
}

.irc-toolbar a:active,
.irc-toolbar button:active,
.irc-tabs a.active,
.irc-tab-private.active {
    border-top-color: var(--win-dark);
    border-left-color: var(--win-dark);
    border-right-color: var(--win-light);
    border-bottom-color: var(--win-light);
}

.irc-tabs a.muted { font-weight: 400; }
.irc-tab-private.unread { color: #fff; background: #800080; }
.irc-tab-private.active { color: #fff; background: #800080; }

.irc-titlebar {
    grid-row: 1;
    height: 22px;
    margin-bottom: 2px;
    padding: 2px 4px;
    background: linear-gradient(90deg, var(--win-blue), var(--win-blue-2));
    border: 0;
    color: #fff;
}

.irc-titlebar strong,
.irc-titlebar span,
.irc-titlebar a,
.irc-nav-button {
    color: #fff;
    font-size: 12px;
}

.irc-titlebar .irc-account-link,
.classic-site .nav-menu .account-link {
    color: #000;
    background: var(--win-face);
    border-top: 1px solid var(--win-light);
    border-left: 1px solid var(--win-light);
    border-right: 1px solid var(--win-dark);
    border-bottom: 1px solid var(--win-dark);
    padding: 1px 7px;
}

.irc-titlebar .irc-account-link:hover,
.classic-site .nav-menu .account-link:hover {
    color: #000;
    background: #d4d0c8;
}

.irc-channels,
.irc-users,
.irc-main,
.irc-input,
.irc-directory,
.classic-site .form-panel,
.classic-site .auth-card,
.classic-site .list-panel,
.classic-site table {
    background: var(--win-face);
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
}

.irc-channels,
.irc-users {
    grid-row: 4 / 6;
}

.irc-main {
    grid-row: 4;
}

.irc-input {
    grid-row: 5;
}

.irc-tabs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    height: 24px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 3px 0;
    background: var(--win-face);
    border-bottom: 1px solid var(--win-shadow);
    scrollbar-width: none;
}

.irc-tabs::-webkit-scrollbar {
    display: none;
}

.irc-pane-title,
.irc-topic,
.irc-directory-head,
.classic-site .page-head {
    background: var(--win-blue);
    color: #fff;
    border: 0;
}

.irc-pane-title {
    padding: 3px 5px;
    font-size: 12px;
}

.irc-topic {
    top: 24px;
    height: 24px;
    padding: 3px 6px;
    display: grid;
    grid-template-columns: minmax(180px, max-content) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

.irc-topic strong,
.irc-topic span {
    color: #fff;
}

.irc-topic strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.irc-log {
    top: 48px;
    background: var(--irc-chat-bg, #fff);
    color: var(--irc-chat-text, #000);
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
    font-family: "Lucida Console", Consolas, monospace;
}

.irc-line strong,
.irc-line time,
.irc-system,
.irc-help code,
.irc-tree small,
.irc-users li span,
.irc-emote {
    color: #000080;
    text-shadow: none;
}

.irc-tree a,
.irc-users li,
.irc-help,
.irc-help strong {
    color: #000;
}

.irc-tree a:hover,
.irc-tree a.active,
a.irc-directory-row:hover {
    background: var(--win-blue);
    color: #fff;
    outline: 1px dotted #fff;
}

.irc-tree a:hover small,
.irc-tree a.active small,
.irc-tree a:hover span,
.irc-tree a.active span {
    color: #fff;
}

.irc-input {
    min-height: 28px;
    padding: 2px 4px;
    grid-template-columns: max-content minmax(0, 1fr) 68px auto;
}

.irc-emotes {
    width: 68px;
    min-width: 68px;
    max-width: 68px;
}

.irc-input input,
.irc-emotes,
.classic-site input,
.classic-site textarea,
.classic-site select {
    background: #fff;
    color: #000;
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
    border-radius: 0;
}

.irc-input label,
.irc-input span,
.classic-site h1,
.classic-site h2,
.classic-site h3,
.classic-site label,
.classic-site p {
    color: #000;
}

.irc-input-link,
.irc-input button,
.button,
.classic-site .button,
.classic-site .nav-toggle,
.link-button,
.irc-nav-button {
    background: var(--win-face);
    color: #000;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    border-radius: 0;
    min-height: 22px;
}

.irc-input-link:active,
.irc-input button:active,
.button:active,
.classic-site .button:active,
.classic-site .nav-toggle:active,
.link-button:active,
.irc-nav-button:active {
    border-top-color: var(--win-dark);
    border-left-color: var(--win-dark);
    border-right-color: var(--win-light);
    border-bottom-color: var(--win-light);
}

.classic-site .site-header {
    background: var(--win-face);
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}

.classic-site .terminal-brand strong,
.classic-site .terminal-brand span,
.classic-site .nav-menu a,
.classic-site .link-button {
    color: #000;
}

.classic-site.terminal-page main,
.classic-site.terminal-page .page-head,
.classic-site.terminal-page .section {
    background: var(--win-bg);
}

.classic-site.terminal-page main {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 3px;
}

.classic-site.terminal-page .site-header {
    display: none;
}

.win-page-window {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 22px 28px 22px minmax(0, 1fr) 22px;
    background: var(--win-face);
    color: #000;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    overflow: hidden;
}

.win-page-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 5px;
    background: linear-gradient(90deg, var(--win-blue), var(--win-blue-2));
    color: #fff;
    font-size: 12px;
    line-height: 1;
    overflow: hidden;
}

.win-page-titlebar > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    overflow: hidden;
}

.win-page-titlebar nav {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
}

.win-page-titlebar nav::-webkit-scrollbar {
    display: none;
}

.win-page-titlebar a,
.win-nav-button {
    color: #fff;
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.win-page-titlebar form {
    display: inline-flex;
    margin: 0;
}

.win-page-titlebar .win-account-link {
    color: #000;
    background: var(--win-face);
    border-top: 1px solid var(--win-light);
    border-left: 1px solid var(--win-light);
    border-right: 1px solid var(--win-dark);
    border-bottom: 1px solid var(--win-dark);
    padding: 1px 7px;
    font-weight: 700;
}

.irc-log .irc-line span { color: var(--irc-chat-text, #000); }
.irc-log .irc-line strong { color: var(--irc-chat-nick, #000080); }
.irc-log .irc-line time { color: var(--irc-chat-time, #666); }
.irc-log .irc-system { color: var(--irc-chat-system, #006000); }

.win-page-titlebar .win-account-link:hover {
    color: #000;
    background: #d4d0c8;
}

.win-page-titlebar strong,
.win-page-titlebar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.win-page-toolbar,
.win-page-statusline,
.win-page-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    background: var(--win-face);
    border-top: 1px solid var(--win-light);
    border-left: 1px solid var(--win-light);
    border-right: 1px solid var(--win-shadow);
    border-bottom: 1px solid var(--win-shadow);
    padding: 2px 4px;
    font-size: 12px;
}

.win-page-toolbar {
    overflow-x: auto;
    scrollbar-width: none;
}

.win-page-toolbar::-webkit-scrollbar {
    display: none;
}

.win-page-toolbar a,
.win-page-toolbar button {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 1px 7px;
    background: var(--win-face);
    color: #000;
    text-decoration: none;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    border-radius: 0;
    cursor: pointer;
    font: inherit;
}

.win-page-toolbar form {
    display: inline-flex;
    margin: 0;
}

.win-page-toolbar a:active,
.win-page-toolbar button:active {
    border-top-color: var(--win-dark);
    border-left-color: var(--win-dark);
    border-right-color: var(--win-light);
    border-bottom-color: var(--win-light);
}

.win-page-statusline,
.win-page-footer {
    justify-content: space-between;
}

.win-page-statusline span,
.win-page-footer span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
    border-top: 1px solid var(--win-shadow);
    border-left: 1px solid var(--win-shadow);
    border-right: 1px solid var(--win-light);
    border-bottom: 1px solid var(--win-light);
    padding: 1px 5px;
}

.win-page-content {
    min-height: 0;
    overflow: auto;
    background: #fff;
    color: #000;
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
    padding: 4px;
}

.win-page-content .container {
    width: 100%;
    padding: 0;
}

.win-page-content .page-head {
    margin: 0 0 4px;
    padding: 4px 6px;
    background: var(--win-blue);
    color: #fff;
    border: 0;
}

.win-page-content .page-head h1,
.win-page-content .page-head p {
    color: #fff;
    margin: 0;
}

.win-page-content .page-head h1 {
    font-size: 18px;
    line-height: 1.1;
}

.win-page-content .page-head p {
    font-size: 12px;
}

.win-page-content .section {
    padding: 4px 0;
    background: transparent;
}

.win-page-content .prose,
.win-page-content .narrow {
    width: 100%;
    max-width: none;
}

.win-page-content .auth-shell {
    min-height: 0;
    place-items: start;
    padding: 4px;
}

.win-page-content .auth-stack {
    width: min(760px, 100%);
}

.win-page-content .auth-card,
.win-page-content .form-panel,
.win-page-content .list-panel,
.win-page-content .category-grid article,
.win-page-content .room-card,
.win-page-content .stats-grid article,
.win-page-content table,
.win-page-content .irc-directory {
    background: var(--win-face);
    color: #000;
}

.win-page-content .auth-card,
.win-page-content .form-panel {
    width: min(620px, 100%);
    padding: 10px;
}

.win-page-content h1,
.win-page-content h2,
.win-page-content h3 {
    color: #000;
}

.win-page-content h1 {
    font-size: 20px;
}

.win-page-content h2 {
    font-size: 17px;
}

.win-page-content h3 {
    font-size: 14px;
}

.win-page-content p,
.win-page-content label,
.win-page-content td,
.win-page-content th {
    color: #000;
}

.win-page-content .alert {
    background: var(--win-face);
    color: #000;
    border-radius: 0;
}

.ad-slot {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 2px;
    margin-bottom: 6px;
    padding: 6px;
    background: var(--win-face);
    color: #000;
    text-align: center;
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
}

.ad-slot span {
    color: #404040;
    font-size: 10px;
    text-transform: uppercase;
}

.ad-slot strong {
    color: #000;
    font-size: 12px;
}

.ad-slot-bottom {
    margin: 8px 0 0;
}

.ad-slot:has(.bp-ad-banner) {
    min-height: 44px;
    padding: 3px;
}

.bp-ad-banner {
    position: relative;
    display: flex;
    align-items: center;
    width: min(300px, 100%);
    height: 38px;
    overflow: hidden;
    text-decoration: none;
    background:
        repeating-linear-gradient(
            0deg,
            #000 0,
            #000 2px,
            #071507 3px,
            #071507 4px
        );
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    font-family: "Courier New", monospace;
    color: #fff;
}

.bp-ad-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 255, 0, .08), transparent 45%, rgba(0, 120, 255, .14));
    pointer-events: none;
}

.bp-ad-logo {
    position: relative;
    z-index: 1;
    width: 92px;
    padding-left: 6px;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 16px;
    font-style: italic;
    letter-spacing: 0;
    color: #ffff00;
    text-shadow: 1px 1px 0 #ff0000, 2px 2px 0 #000080;
}

.bp-ad-chat {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    font-size: 8px;
    line-height: 1.15;
    color: #00ff00;
    text-align: left;
}

.bp-ad-chat div {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bp-ad-chat strong {
    color: #00ffff;
}

.bp-ad-chat .bp-ad-message {
    color: #fff;
}

.bp-ad-chat .bp-ad-typing {
    color: #ffff00;
    animation: bp-ad-blink .7s steps(1) infinite;
}

.bp-ad-button {
    position: relative;
    z-index: 1;
    margin-right: 4px;
    padding: 4px 5px;
    background: #c0c0c0;
    color: #000;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 1px 1px 0 #000;
}

.bp-ad-button::after {
    content: " >>";
    color: #f00;
}

.bp-ad-banner:hover .bp-ad-button {
    background: #ffff00;
}

@keyframes bp-ad-blink {
    50% { opacity: 0; }
}

@media (max-width: 360px) {
    .bp-ad-logo {
        width: 84px;
        font-size: 14px;
        padding-left: 5px;
    }

    .bp-ad-button {
        padding: 4px 5px;
        font-size: 8px;
    }
}

.settings-console {
    display: grid;
    gap: 8px;
}

.settings-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 10px;
    background: var(--win-face);
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}

.settings-group legend {
    padding: 2px 8px;
    background: var(--win-blue);
    color: #fff;
    font-weight: 700;
}

.settings-group label {
    align-content: start;
    gap: 4px;
}

.settings-group label span {
    font-weight: 700;
    color: #000;
}

.settings-group small {
    color: #404040;
    font-size: 11px;
    line-height: 1.25;
}

.settings-group textarea {
    min-height: 82px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.win-landing-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding: 8px;
    background: var(--win-face);
    color: #000;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}

.win-landing-hero h2,
.win-landing-hero p {
    margin: 0;
    color: #000;
}

.win-landing-hero h2 {
    font-size: 16px;
}

.win-landing-hero p {
    font-size: 12px;
}

.win-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px;
}

.win-page-card {
    min-height: 132px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    background: var(--win-face);
    color: #000;
    text-decoration: none;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}

.win-page-card:active,
.win-page-card-link:active {
    border-top-color: var(--win-dark);
    border-left-color: var(--win-dark);
    border-right-color: var(--win-light);
    border-bottom-color: var(--win-light);
}

.win-page-card-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--win-blue);
    border-top: 2px solid var(--win-shadow);
    border-left: 2px solid var(--win-shadow);
    border-right: 2px solid var(--win-light);
    border-bottom: 2px solid var(--win-light);
    font-weight: 700;
    font-size: 13px;
}

.win-page-card-body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.win-page-card-body h2,
.win-page-card-body strong {
    margin: 0;
    color: #000;
    font-size: 15px;
    line-height: 1.15;
}

.win-page-card-body p,
.win-page-card-body span {
    margin: 0;
    color: #000;
    font-size: 12px;
    line-height: 1.35;
}

.win-page-card-body small {
    color: #000080;
    font-size: 12px;
}

.win-page-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 2px 6px;
    margin: 2px 0 0;
    font-size: 11px;
}

.win-page-card dt {
    color: #404040;
    font-weight: 700;
}

.win-page-card dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
}

.win-page-card-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.win-page-card-link {
    grid-template-rows: auto;
}

.win-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 6px;
    margin-bottom: 6px;
}

.win-home-welcome,
.win-home-panel {
    padding: 10px;
    background: var(--win-face);
    color: #000;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
}

.win-home-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.win-home-logo {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--win-blue);
    color: #fff;
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    border-bottom: 2px solid var(--win-dark);
    font-weight: 700;
}

.win-home-title h2,
.win-home-title p,
.win-home-welcome > p,
.win-home-panel h2 {
    margin: 0;
    color: #000;
}

.win-home-title h2 {
    font-size: 22px;
}

.win-home-title p,
.win-home-welcome > p {
    font-size: 13px;
}

.win-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.win-home-actions form {
    margin: 0;
}

.win-home-panel h2 {
    font-size: 15px;
    margin-bottom: 6px;
}

.win-home-panel dl {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 4px 6px;
    margin: 0;
    font-size: 12px;
}

.win-home-panel dt {
    font-weight: 700;
    color: #404040;
}

.win-home-panel dd {
    margin: 0;
    color: #000;
}

.win-home-shortcuts {
    margin-bottom: 6px;
}

.classic-site.terminal-page .page-head {
    margin: 4px;
    padding: 4px 6px;
}

.classic-site.terminal-page .win-page-content .container {
    width: 100%;
    padding: 0;
}

.classic-site.terminal-page .win-page-content .page-head {
    margin: 0 0 4px;
    padding: 4px 6px;
    background: var(--win-blue);
}

.classic-site.terminal-page .win-page-content .section,
.classic-site.terminal-page .win-page-content .page-head {
    border-bottom: 0;
}

.classic-site.terminal-page .win-page-content .auth-shell {
    min-height: 0;
    padding: 4px;
}

.classic-site.terminal-page .win-page-content .auth-stack {
    width: min(760px, 100%);
}

.classic-site.terminal-page .win-page-content .form-panel,
.classic-site.terminal-page .win-page-content .auth-card {
    padding: 10px;
}

.irc-directory-row {
    color: #000;
    border-bottom: 1px solid var(--win-shadow);
}

.irc-directory-row span:first-child,
.classic-site a {
    color: #000080;
}

.irc-log,
.irc-line span {
    color: #000;
}

.irc-line strong {
    color: #000080;
}

.irc-line time {
    color: #606060;
}

.irc-system {
    color: #006000;
    font-weight: 700;
}

.irc-line.action strong,
.irc-line.action span {
    color: #800080;
}

.irc-emote {
    color: #800000;
    font-weight: 700;
}

@media (max-width: 860px) {
    .classic-site.terminal-page main { height: 100dvh; padding: 2px; }
    .win-page-window { grid-template-rows: 20px 26px 20px minmax(0, 1fr) 20px; }
    .win-page-titlebar { padding: 1px 4px; }
    .win-page-titlebar > div span { display: none; }
    .win-page-titlebar nav { gap: 6px; }
    .win-page-statusline span:nth-child(2),
    .win-page-footer span:first-child { display: none; }
    .win-page-content { padding: 3px; }
    .win-page-content .auth-stack,
    .win-page-content .dashboard-grid,
    .win-page-content .two-cols,
    .win-page-content .filters {
        grid-template-columns: 1fr;
    }
    .win-landing-hero {
        align-items: stretch;
        flex-direction: column;
    }
    .win-page-grid {
        grid-template-columns: 1fr;
    }
    .win-page-card {
        min-height: 0;
    }
    .win-home-layout {
        grid-template-columns: 1fr;
    }
    .win-home-actions .button,
    .win-home-actions form {
        width: 100%;
    }
    .settings-group {
        grid-template-columns: 1fr;
    }
    .irc-client { padding: 2px; grid-template-rows: 22px 26px 20px minmax(42px, 8dvh) minmax(0, 1fr) minmax(28px, 6dvh) 30px; }
    .irc-titlebar { height: 20px; margin-bottom: 1px; }
    .irc-toolbar { grid-row: 2; overflow-x: auto; scrollbar-width: none; }
    .irc-toolbar::-webkit-scrollbar { display: none; }
    .irc-statusbar { grid-row: 3; gap: 2px; }
    .irc-statusbar span:nth-child(2) { display: none; }
    .irc-channels { grid-row: 4; }
    .irc-main { grid-row: 5; }
    .irc-users { grid-row: 6; }
    .irc-input { grid-row: 7; }
    .irc-tabs { display: none; }
    .irc-topic { top: 0; height: 20px; padding: 2px 5px; }
    .irc-log { top: 20px; }
    .irc-input { min-height: 28px; grid-template-columns: max-content 1fr 58px; }
    .irc-tree {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow-y: auto;
        padding: 1px;
    }
    .irc-tree a {
        min-height: 16px;
        padding: 1px 3px;
        font-size: 10px;
        line-height: 1;
    }
    .irc-tree small {
        font-size: 10px;
    }
    .irc-pane-title {
        padding: 2px 4px;
        font-size: 11px;
        line-height: 1;
    }
    .irc-topic strong,
    .irc-topic span {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .irc-client { grid-template-rows: 22px 26px 20px minmax(34px, 7dvh) minmax(0, 1fr) 22px 30px; }
    .irc-statusbar span:nth-child(3) { display: none; }
    .irc-input button { min-width: 50px; }
    .irc-tree a:nth-child(n+7) { display: none; }
    .irc-users .irc-pane-title { display: none; }
}

html[data-theme="dark"] .irc-standalone,
html[data-theme="dark"] .classic-site {
    --win-bg: #8a8a8a;
    --win-face: #a6a6a6;
    --win-shadow: #505050;
    --win-dark: #242424;
    --win-light: #d8d8d8;
    --win-blue: #001f5c;
    --win-blue-2: #003f8f;
    --win-text: #000;
    --irc-bg: #ffffff;
    --irc-panel: #a6a6a6;
    --irc-line: #505050;
    --irc-text: #000;
    --irc-muted: #000080;
    --irc-green: #000;
    --irc-blue: #000080;
    --irc-amber: #800000;
    background: var(--win-bg);
    color: var(--win-text);
}

html[data-theme="dark"] .irc-log {
    background: #f4f4f4;
    color: #000;
}

html[data-theme="dark"] .win-page-content {
    background: #f4f4f4;
    color: #000;
}

html[data-theme="dark"] .win-page-statusline span,
html[data-theme="dark"] .win-page-footer span,
html[data-theme="dark"] .win-landing-hero,
html[data-theme="dark"] .win-page-card,
html[data-theme="dark"] .win-home-welcome,
html[data-theme="dark"] .win-home-panel,
html[data-theme="dark"] .ad-slot,
html[data-theme="dark"] .win-page-content .auth-card,
html[data-theme="dark"] .win-page-content .form-panel,
html[data-theme="dark"] .win-page-content .list-panel,
html[data-theme="dark"] .win-page-content .category-grid article,
html[data-theme="dark"] .win-page-content .room-card,
html[data-theme="dark"] .win-page-content .stats-grid article,
html[data-theme="dark"] .win-page-content table,
html[data-theme="dark"] .win-page-content .irc-directory {
    background: var(--win-face);
    color: #f2f2f2;
}

html[data-theme="dark"] .win-page-toolbar a,
html[data-theme="dark"] .win-page-toolbar button {
    background: var(--win-face);
    color: #f0f0f0;
}

html[data-theme="dark"] .win-page-titlebar a,
html[data-theme="dark"] .win-nav-button {
    color: #fff;
}

html[data-theme="dark"] .win-page-titlebar .win-account-link {
    background: var(--win-face);
    color: #f0f0f0;
}

html[data-theme="dark"] .win-page-titlebar .win-account-link:hover {
    background: #404040;
    color: #fff;
}

html[data-theme="dark"] .win-page-content h1,
html[data-theme="dark"] .win-page-content h2,
html[data-theme="dark"] .win-page-content h3,
html[data-theme="dark"] .win-page-content p,
html[data-theme="dark"] .win-page-content label,
html[data-theme="dark"] .win-page-content td,
html[data-theme="dark"] .win-page-content th,
html[data-theme="dark"] .win-landing-hero h2,
html[data-theme="dark"] .win-landing-hero p,
html[data-theme="dark"] .win-page-card-body h2,
html[data-theme="dark"] .win-page-card-body strong,
html[data-theme="dark"] .win-page-card-body p,
html[data-theme="dark"] .win-page-card-body span,
html[data-theme="dark"] .win-page-card dd,
html[data-theme="dark"] .win-home-title h2,
html[data-theme="dark"] .win-home-title p,
html[data-theme="dark"] .win-home-welcome > p,
html[data-theme="dark"] .win-home-panel h2,
html[data-theme="dark"] .win-home-panel dd,
html[data-theme="dark"] .ad-slot strong,
html[data-theme="dark"] .win-page-statusline span,
html[data-theme="dark"] .win-page-footer span {
    color: #f2f2f2;
}

html[data-theme="dark"] .win-page-card-icon {
    background: #050505;
    color: #8bbcff;
}

html[data-theme="dark"] .win-page-card-body small {
    color: #8bbcff;
}

html[data-theme="dark"] .win-page-card dt {
    color: #bfbfbf;
}

html[data-theme="dark"] .win-home-panel dt {
    color: #bfbfbf;
}

html[data-theme="dark"] .ad-slot span {
    color: #d0d0d0;
}

html[data-theme="dark"] .win-page-content .page-head h1,
html[data-theme="dark"] .win-page-content .page-head p,
html[data-theme="dark"] .win-page-titlebar strong,
html[data-theme="dark"] .win-page-titlebar span {
    color: #fff;
}

html[data-theme="dark"] .irc-line span {
    color: #f2f2f2;
}

html[data-theme="dark"] .irc-line strong,
html[data-theme="dark"] .irc-help code,
html[data-theme="dark"] .irc-tree small,
html[data-theme="dark"] .irc-users li span,
html[data-theme="dark"] .classic-site a {
    color: #8bbcff;
}

html[data-theme="dark"] .irc-line time {
    color: #a0a0a0;
}

html[data-theme="dark"] .irc-system {
    color: #7cff7c;
}

html[data-theme="dark"] .irc-private-line {
    color: #ff88ff;
}

html[data-theme="dark"] .irc-private-window {
    background: var(--irc-chat-bg, #fff);
    border-color: var(--irc-chat-border, #ff88ff);
}

html[data-theme="dark"] .irc-private-title,
html[data-theme="dark"] .irc-tab-private.active,
html[data-theme="dark"] .irc-tab-private.unread {
    background: #800080;
    color: #fff;
}

html[data-theme="dark"] .irc-private-log {
    background: var(--irc-chat-bg, #fff);
    color: var(--irc-chat-text, #000);
}

html[data-theme="dark"] .irc-private-log .irc-line span,
html[data-theme="dark"] .irc-private-log .irc-system {
    color: var(--irc-chat-text, #000);
}

html[data-theme="dark"] .irc-line.action strong,
html[data-theme="dark"] .irc-line.action span,
html[data-theme="dark"] .irc-emote {
    color: #ffd27a;
}

html[data-theme="dark"] .irc-tree a,
html[data-theme="dark"] .irc-users li,
html[data-theme="dark"] .irc-help,
html[data-theme="dark"] .irc-help strong,
html[data-theme="dark"] .classic-site h1,
html[data-theme="dark"] .classic-site h2,
html[data-theme="dark"] .classic-site h3,
html[data-theme="dark"] .classic-site label,
html[data-theme="dark"] .classic-site p,
html[data-theme="dark"] .classic-site .terminal-brand strong,
html[data-theme="dark"] .classic-site .terminal-brand span,
html[data-theme="dark"] .classic-site .nav-menu a,
html[data-theme="dark"] .classic-site .link-button {
    color: #f0f0f0;
}

html[data-theme="dark"] .irc-input input,
html[data-theme="dark"] .irc-emotes,
html[data-theme="dark"] .classic-site input,
html[data-theme="dark"] .classic-site textarea,
html[data-theme="dark"] .classic-site select {
    background: #050505;
    color: #f2f2f2;
}

html[data-theme="dark"] .irc-toolbar a,
html[data-theme="dark"] .irc-toolbar button,
html[data-theme="dark"] .irc-tabs a,
html[data-theme="dark"] .irc-tab-private,
html[data-theme="dark"] .irc-input-link,
html[data-theme="dark"] .irc-input button,
html[data-theme="dark"] .button,
html[data-theme="dark"] .classic-site .button,
html[data-theme="dark"] .classic-site .nav-toggle,
html[data-theme="dark"] .link-button,
html[data-theme="dark"] .irc-nav-button,
html[data-theme="dark"] .irc-titlebar .irc-account-link,
html[data-theme="dark"] .classic-site .nav-menu .account-link {
    background: var(--win-face);
    color: #f0f0f0;
}

html[data-theme="dark"] .irc-titlebar .irc-account-link:hover,
html[data-theme="dark"] .classic-site .nav-menu .account-link:hover {
    color: #fff;
    background: #404040;
}

/* Mobile IRC: make the theme toggle obvious while preserving readability. */
@media (max-width: 860px) {
    html[data-theme="dark"] .irc-client,
    html[data-theme="dark"] .irc-channels,
    html[data-theme="dark"] .irc-users,
    html[data-theme="dark"] .irc-main,
    html[data-theme="dark"] .irc-input,
    html[data-theme="dark"] .irc-toolbar,
    html[data-theme="dark"] .irc-statusbar {
        background: #1b1b1b;
        color: #e8ffe8;
    }

    html[data-theme="dark"] .irc-log {
        background: #000;
        color: #7cff7c;
    }

    html[data-theme="dark"] .irc-line span,
    html[data-theme="dark"] .irc-tree a,
    html[data-theme="dark"] .irc-users li,
    html[data-theme="dark"] .irc-help,
    html[data-theme="dark"] .irc-help strong {
        color: #e8ffe8;
    }

    html[data-theme="dark"] .irc-line strong,
    html[data-theme="dark"] .irc-tree small,
    html[data-theme="dark"] .irc-users li span,
    html[data-theme="dark"] .irc-help code {
        color: #74c7ff;
    }

    html[data-theme="dark"] .irc-line time {
        color: #9a9a9a;
    }

    html[data-theme="dark"] .irc-system {
        color: #7cff7c;
        font-weight: 700;
    }

    html[data-theme="dark"] .irc-toolbar a,
    html[data-theme="dark"] .irc-toolbar button,
    html[data-theme="dark"] .irc-input-link,
    html[data-theme="dark"] .irc-input button,
    html[data-theme="dark"] .irc-emotes {
        background: #2b2b2b;
        color: #e8ffe8;
    }

    html[data-theme="dark"] .irc-pane-title,
    html[data-theme="dark"] .irc-topic {
        background: #001f5c;
        color: #fff;
    }

    html[data-theme="dark"] .irc-topic strong,
    html[data-theme="dark"] .irc-topic span,
    html[data-theme="dark"] .irc-pane-title {
        color: #fff;
    }

    html[data-theme="dark"] .irc-input input {
        background: #050505;
        color: #7cff7c;
    }

    html[data-theme="dark"] .irc-tree a:hover,
    html[data-theme="dark"] .irc-tree a.active {
        background: #000080;
        color: #fff;
    }

    html[data-theme="dark"] .irc-tree a:hover span,
    html[data-theme="dark"] .irc-tree a.active span,
    html[data-theme="dark"] .irc-tree a:hover small,
    html[data-theme="dark"] .irc-tree a.active small {
        color: #fff;
    }
}

/* Keep non-chat windows visually identical to the IRC chrome. */
.classic-site .win-page-titlebar a,
.classic-site .win-page-titlebar .win-nav-button {
    color: #fff;
    background: transparent;
    border: 0;
}

.classic-site .win-page-titlebar .win-account-link {
    color: #000;
    background: var(--win-face);
    border-top: 1px solid var(--win-light);
    border-left: 1px solid var(--win-light);
    border-right: 1px solid var(--win-dark);
    border-bottom: 1px solid var(--win-dark);
}

.classic-site .win-page-toolbar a,
.classic-site .win-page-toolbar button {
    color: #000080;
}

html[data-theme="dark"] .classic-site .win-page-titlebar a,
html[data-theme="dark"] .classic-site .win-page-titlebar .win-nav-button {
    color: #fff;
}

html[data-theme="dark"] .classic-site .win-page-titlebar .win-account-link,
html[data-theme="dark"] .classic-site .win-page-toolbar a,
html[data-theme="dark"] .classic-site .win-page-toolbar button {
    color: #f0f0f0;
}

.irc-mobile-menu {
    display: none;
}

/* Phone-sized IRC window: prioritize chat space over desktop chrome. */
@media (max-width: 520px) {
    .classic-site.terminal-page main {
        padding: 1px;
    }

    .win-page-window {
        grid-template-rows: 18px 24px 18px minmax(0, 1fr) 18px;
    }

    .win-page-titlebar {
        height: 18px;
        padding: 1px 3px;
        gap: 0;
    }

    .win-page-titlebar > div {
        min-width: 0;
        max-width: 100%;
    }

    .win-page-titlebar strong {
        display: block;
        max-width: 100%;
        font-size: 11px;
        line-height: 16px;
    }

    .win-page-titlebar span,
    .win-page-titlebar nav {
        display: none;
    }

    .win-page-toolbar {
        height: 24px;
        padding: 1px 2px;
        gap: 2px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .win-page-toolbar a,
    .win-page-toolbar button {
        min-height: 18px;
        padding: 1px 5px;
        font-size: 11px;
        line-height: 14px;
    }

    .win-page-statusline,
    .win-page-footer {
        height: 18px;
        padding: 1px 2px;
        gap: 2px;
        font-size: 10px;
    }

    .win-page-statusline span,
    .win-page-footer span {
        padding: 0 3px;
        line-height: 14px;
    }

    .win-page-statusline span:nth-child(2),
    .win-page-footer span:first-child {
        display: none;
    }

    .win-page-content {
        padding: 3px;
    }

    .irc-standalone {
        overflow: hidden;
        min-width: 0;
    }

    .irc-client {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        min-width: 0;
        padding: 2px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 20px 24px 18px 54px 30px minmax(0, 1fr) 30px;
        gap: 0;
        font-size: 11px;
    }

    .irc-titlebar,
    .irc-toolbar,
    .irc-statusbar,
    .irc-channels,
    .irc-main,
    .irc-users,
    .irc-input {
        grid-column: 1;
        min-width: 0;
    }

    .irc-titlebar {
        grid-row: 1;
        height: 18px;
        margin: 0;
        padding: 1px 3px;
    }

    .irc-titlebar > div {
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .irc-titlebar strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 11px;
    }

    .irc-titlebar span,
    .irc-titlebar nav {
        display: none;
    }

    .irc-toolbar {
        grid-row: 2;
        height: 24px;
        padding: 1px 2px;
        gap: 2px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .irc-toolbar::-webkit-scrollbar {
        display: none;
    }

    .irc-toolbar a,
    .irc-toolbar button {
        min-height: 18px;
        flex: 0 0 auto;
        padding: 1px 5px;
        font-size: 11px;
    }

    .irc-statusbar {
        grid-row: 3;
        height: 18px;
        padding: 1px 2px;
    }

    .irc-statusbar span {
        padding: 0 3px;
        font-size: 10px;
    }

    .irc-statusbar span:nth-child(2),
    .irc-statusbar span:nth-child(3) {
        display: none;
    }

    .irc-channels {
        grid-row: 4;
        height: 54px;
        overflow: hidden;
    }

    .irc-pane-title {
        height: 14px;
        padding: 1px 4px;
        font-size: 10px;
        line-height: 12px;
    }

    .irc-tree {
        height: 36px;
        max-height: 36px;
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, 17px);
        grid-auto-columns: minmax(132px, 1fr);
        grid-template-columns: none;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1px;
        scrollbar-width: thin;
    }

    .irc-tree a,
    .irc-tree a:nth-child(n+7) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 18px;
        min-height: 17px;
        height: 17px;
        padding: 1px 3px;
        font-size: 10px;
        line-height: 13px;
    }

    .irc-tree small {
        font-size: 10px;
        text-align: right;
    }

    .irc-help {
        display: none;
    }

    .irc-users {
        grid-row: 5;
        display: block;
        height: 30px;
        overflow: hidden;
        border-left: 0;
        border-right: 0;
        border-bottom: 1px solid var(--win-shadow);
    }

    .irc-users .irc-pane-title {
        display: none;
    }

    .irc-users ul {
        height: 28px;
        display: flex;
        gap: 2px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px;
        scrollbar-width: thin;
    }

    .irc-users li {
        flex: 0 0 auto;
        max-width: 128px;
        min-height: 22px;
        align-items: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 2px 5px;
        font-size: 11px;
        border-top: 1px solid var(--win-light);
        border-left: 1px solid var(--win-light);
        border-right: 1px solid var(--win-shadow);
        border-bottom: 1px solid var(--win-shadow);
    }

    .irc-main {
        grid-row: 6;
        min-height: 0;
    }

    .irc-tabs {
        display: flex;
        height: 22px;
        padding: 1px 2px 0;
    }

    .irc-tabs a,
    .irc-tab-private {
        min-height: 19px;
        max-width: 132px;
        padding: 1px 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
    }

    .irc-topic {
        top: 22px;
        height: 20px;
        padding: 1px 4px;
        grid-template-columns: minmax(0, 1fr);
    }

    .irc-topic strong,
    .irc-topic span {
        font-size: 10px;
        line-height: 14px;
    }

    .irc-topic span {
        display: none;
    }

    .irc-log {
        top: 42px;
        padding: 4px 5px;
        font-size: 11px;
        line-height: 1.25;
    }

    .irc-private-window {
        inset: 22px 0 0;
        grid-template-rows: 24px minmax(0, 1fr);
    }

    .irc-private-title {
        min-height: 24px;
        grid-template-columns: minmax(76px, max-content) minmax(0, 1fr) 24px;
        gap: 4px;
        padding: 2px 4px;
        font-size: 11px;
    }

    .irc-private-close {
        height: 20px;
        min-width: 22px;
        font-size: 12px;
    }

    .irc-private-log {
        padding: 4px 5px;
        font-size: 11px;
        line-height: 1.25;
    }

    .irc-line {
        display: block;
        padding: 1px 0;
        white-space: normal;
    }

    .irc-line time,
    .irc-line strong,
    .irc-line span {
        display: inline;
        grid-column: auto;
    }

    .irc-line time {
        margin-right: 2px;
    }

    .irc-line strong {
        margin-right: 4px;
    }

    .irc-system {
        display: block;
        padding: 2px 0;
    }

    .irc-input {
        grid-row: 7;
        height: 30px;
        min-height: 30px;
        padding: 2px;
        gap: 2px;
        grid-template-columns: minmax(0, 1fr) 52px;
    }

    .irc-input label,
    .irc-emotes {
        display: none;
    }

    .irc-input-link {
        height: 24px;
        min-height: 24px;
        padding: 0 4px;
        justify-content: center;
        font-size: 11px;
    }

    .irc-input input {
        min-width: 0;
        height: 24px;
        padding: 2px 4px;
        font-size: 16px;
    }

    .irc-input button {
        width: 52px;
        min-width: 52px;
        height: 24px;
        min-height: 24px;
        padding: 0;
        font-size: 11px;
    }

    .irc-input.irc-locked {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .irc-input.irc-locked span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        line-height: 24px;
    }

    .irc-input.irc-locked .button {
        width: auto;
        min-width: 0;
        height: 24px;
        min-height: 24px;
        padding: 2px 6px;
        text-align: center;
        font-size: 11px;
        line-height: 16px;
    }
}

/* Menu completo e painéis mais úteis no IRC para celular. */
@media (max-width: 860px) {
    .irc-titlebar {
        overflow: visible;
    }

    .irc-mobile-menu {
        position: relative;
        display: block;
        flex: 0 0 auto;
        color: #000;
        font: 12px Arial, sans-serif;
    }

    .irc-mobile-menu summary {
        min-width: 46px;
        padding: 2px 7px;
        list-style: none;
        cursor: pointer;
        color: #000;
        background: var(--win-face);
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
        text-align: center;
    }

    .irc-mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .irc-mobile-menu[open] summary {
        border-top-color: var(--win-dark);
        border-left-color: var(--win-dark);
        border-right-color: var(--win-light);
        border-bottom-color: var(--win-light);
    }

    .irc-mobile-menu-panel {
        position: fixed;
        z-index: 10000;
        top: 25px;
        right: 3px;
        width: min(230px, calc(100vw - 12px));
        display: grid;
        gap: 2px;
        padding: 4px;
        background: var(--win-face);
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
        box-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
    }

    .irc-mobile-menu-panel a,
    .irc-mobile-menu-panel button {
        width: 100%;
        min-height: 30px;
        display: flex;
        align-items: center;
        padding: 4px 10px;
        border: 0;
        background: transparent;
        color: #000;
        text-decoration: none;
        text-align: left;
        font: inherit;
    }

    .irc-mobile-menu-panel a:hover,
    .irc-mobile-menu-panel a:focus,
    .irc-mobile-menu-panel button:hover,
    .irc-mobile-menu-panel button:focus {
        background: #000080;
        color: #fff;
        outline: none;
    }

    .irc-mobile-menu-panel form {
        display: block;
        margin: 0;
        border-top: 1px solid var(--win-shadow);
        padding-top: 2px;
    }
}

@media (max-width: 520px) {
    .irc-client {
        grid-template-rows: 24px 28px 20px minmax(64px, 10dvh) 38px minmax(0, 1fr) 34px;
    }

    .irc-titlebar {
        height: 22px;
        padding: 1px 3px 1px 5px;
    }

    .irc-titlebar strong {
        font-size: 12px;
    }

    .irc-toolbar {
        height: 28px;
    }

    .irc-channels {
        height: auto;
        min-height: 64px;
    }

    .irc-users {
        height: 38px;
    }

    .irc-users ul {
        height: 36px;
        padding: 3px;
    }

    .irc-input {
        height: 34px;
        min-height: 34px;
        grid-template-columns: minmax(0, 1fr) 58px;
    }

    .irc-input input,
    .irc-input button {
        height: 28px;
        min-height: 28px;
    }

    .irc-input button {
        width: 58px;
        min-width: 58px;
    }
}
