/* Dragon Monitor — panel layout & components */

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--inverse-bg); color: var(--inverse-fg); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }

.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---------- sidebar */
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 40px;
  padding: 28px 18px 22px 22px;
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-display); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.35; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm); text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-disabled);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav a .idx { font-size: 10px; color: var(--text-disabled); opacity: 0.7; }
.nav a:hover { color: var(--text-primary); }
.nav a.active { color: var(--text-display); background: var(--surface-raised); }
.nav a.active .idx { color: var(--accent); opacity: 1; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.sys { display: flex; flex-direction: column; gap: 8px; padding: 0 12px; }
.sys-row { display: flex; align-items: center; gap: 10px; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--text-disabled); flex: none; }
.led.ok { background: var(--success); }
.led.stale { background: var(--warning); }
.led.down { background: var(--accent); animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.side-actions { display: flex; gap: 4px; }

/* ---------- main */
.main { min-width: 0; overflow-x: clip; padding: 36px clamp(20px, 3.6vw, 56px) 80px; outline: none; }
.view { animation: viewIn 320ms var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.page-head h1 { margin: 8px 0 0; font-weight: 400; font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; color: var(--text-display); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card.flat { background: transparent; }

/* ---------- overview */
.hero-grid { display: grid; grid-template-columns: minmax(260px, 1.15fr) 2fr; gap: 20px; }
.hero-metric { padding: 26px 24px 22px; display: flex; flex-direction: column; justify-content: space-between; min-height: 280px; position: relative; overflow: hidden; }
.hero-metric .big {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(88px, 10vw, 148px);
  line-height: 0.85; letter-spacing: -0.02em; color: var(--text-display); font-variant-numeric: tabular-nums;
}
.hero-metric .unit { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 10px; }
.hero-metric .dot-grid { position: absolute; inset: 0; opacity: 0.6; pointer-events: none; mask-image: linear-gradient(200deg, #000 0%, transparent 60%); -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 60%); }

.stat-row { display: flex; gap: 28px; flex-wrap: wrap; }
.stat .v { font-family: var(--font-mono); font-size: 22px; color: var(--text-display); font-variant-numeric: tabular-nums; }
.stat .v.bad { color: var(--accent); }
.stat .v.warn { color: var(--warning); }
.stat .v.good { color: var(--success); }

.chart-card { padding: 22px 22px 16px; display: flex; flex-direction: column; }
.chart { position: relative; flex: 1; min-height: 190px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; padding-top: 12px; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; cursor: default; }
.bar .seg { width: 100%; background: var(--text-display); min-height: 0; transition: opacity var(--fast) var(--ease); }
.bar .seg.neutral { opacity: 0.32; }
.bar .seg.positive { opacity: 0.65; }
.bar .seg.negative { background: var(--accent); }
.bar .empty { height: 2px; background: var(--border-visible); }
.bar:hover .seg { opacity: 1; }
.bar .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--inverse-bg); color: var(--inverse-fg); padding: 6px 10px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 11px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity var(--fast) var(--ease); z-index: 3;
}
.bar:hover .tip { opacity: 1; }
.chart-axis { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; margin-top: 8px; }
.chart-axis span { font-family: var(--font-mono); font-size: 10px; color: var(--text-disabled); text-align: center; }
.legend { display: flex; gap: 18px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--text-display); }
.legend i.n { opacity: 0.32; } .legend i.p { opacity: 0.65; } .legend i.r { background: var(--accent); }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }

.rows { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .val { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); text-align: right; }
.inline-bar { height: 4px; background: var(--border); margin-top: 8px; display: flex; gap: 2px; }
.inline-bar b { display: block; height: 100%; background: var(--text-display); }

/* ---------- mention list */
.feed { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.mention {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 20px; align-items: start;
  padding: 16px 12px; margin: 0 -12px; border-bottom: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  background: transparent; border-left: 0; border-right: 0; border-top: 0; width: calc(100% + 24px);
  transition: background var(--fast) var(--ease);
}
.mention:hover { background: var(--surface); }
.mention:focus-visible { outline-offset: -2px; }
.mention .when { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.mention .when b { display: block; color: var(--text-primary); font-weight: 400; }
.mention .src { font-size: 14px; color: var(--text-display); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mention .src .type { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-disabled); }
.mention .text { color: var(--text-secondary); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.mention .text mark, .tg-text mark { background: var(--accent-subtle); color: inherit; border-radius: 2px; padding: 0 1px; }
.mention .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--border-visible); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.chip.negative { color: var(--accent); border-color: var(--accent); }
.chip.positive { color: var(--success); border-color: color-mix(in srgb, var(--success) 60%, transparent); }
.chip.critical { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 60%, transparent); }
.chip.warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 60%, transparent); }
.chip.bad { color: var(--accent); border-color: var(--accent); }
.chip.muted { color: var(--text-disabled); }

/* ---------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.filters .search { flex: 1 1 260px; min-width: 0; }
.filters .select { flex: 0 1 220px; width: auto; }
.filters .dates { display: flex; gap: 6px; align-items: center; }
.filters .dates .input { width: 150px; font-family: var(--font-mono); font-size: 13px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-disabled); }
.search .input { padding-left: 40px; }

.seg-ctl { display: inline-flex; border: 1px solid var(--border-visible); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.seg-ctl button { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.seg-ctl button:hover { color: var(--text-display); }
.seg-ctl button[aria-pressed="true"] { background: var(--inverse-bg); color: var(--inverse-fg); }

.result-meta { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border-visible); }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th { text-align: left; padding: 12px 12px; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); border-bottom: 1px solid var(--border-visible); white-space: nowrap; }
table.data td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: var(--surface); }
table.data .sub { display: block; color: var(--text-disabled); font-family: var(--font-mono); font-size: 11px; margin-top: 3px; }
table.data .err { display: block; color: var(--accent); font-family: var(--font-mono); font-size: 11px; margin-top: 4px; max-width: 360px; }
table.data .row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
table.data a { color: var(--text-display); text-decoration-color: var(--border-visible); text-underline-offset: 3px; }

.toolbar-inline { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-inline .input { max-width: 320px; }

/* ---------- accounts */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.acc { display: flex; flex-direction: column; gap: 14px; }
.acc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.acc h3 { margin: 0; font-weight: 400; font-size: 20px; color: var(--text-display); letter-spacing: -0.01em; }
.acc .who { color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; margin-top: 4px; }
.acc .stats { display: flex; gap: 24px; }
.acc .err { color: var(--accent); font-family: var(--font-mono); font-size: 11px; line-height: 1.45; word-break: break-word; }
.acc .actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border-visible); border-radius: var(--radius-md); margin-bottom: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.banner.bad { border-color: var(--accent); color: var(--accent); }

/* ---------- toggle */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; border: 1px solid var(--border-visible); transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-disabled); transition: transform var(--base) var(--ease-out), background var(--fast) var(--ease); }
.switch input:checked + span { background: var(--inverse-bg); border-color: var(--inverse-bg); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--inverse-fg); }
.switch input:focus-visible + span { outline: 2px solid var(--text-display); outline-offset: 2px; }

/* ---------- keywords */
.kw-add { display: flex; gap: 10px; max-width: 560px; margin-bottom: 24px; }
.kw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; border-top: 1px solid var(--border-visible); }
.kw { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.kw .name { flex: 1; min-width: 0; font-size: 15px; color: var(--text-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw.off .name { color: var(--text-disabled); text-decoration: line-through; }
.kw .count { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

/* ---------- reports */
.report-gen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report-gen .input { width: 170px; font-family: var(--font-mono); }
.sent-bar { display: flex; height: 6px; gap: 2px; width: 120px; }
.sent-bar b { display: block; height: 100%; background: var(--text-display); }
.sent-bar b.n { opacity: 0.32; } .sent-bar b.p { opacity: 0.65; } .sent-bar b.r { background: var(--accent); }

/* ---------- settings */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.settings-grid .card { display: flex; flex-direction: column; gap: 18px; }
.settings-grid h2 { margin: 0; font-weight: 400; font-size: 20px; color: var(--text-display); }
.hint { margin: -8px 0 0; color: var(--text-secondary); font-size: 13px; }
.hint a { color: var(--interactive); }

/* ---------- empty / loading */
.empty { padding: 72px 16px; text-align: center; }
.empty .t { color: var(--text-secondary); font-size: 16px; }
.empty .d { color: var(--text-disabled); font-size: 13px; margin-top: 6px; }
.loading { padding: 64px 0; display: flex; justify-content: center; gap: 10px; align-items: center; color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.seg-loader { display: inline-flex; gap: 3px; }
.seg-loader i { width: 6px; height: 14px; background: var(--text-display); opacity: 0.15; animation: segl 1s steps(1) infinite; }
.seg-loader i:nth-child(2) { animation-delay: 0.15s; } .seg-loader i:nth-child(3) { animation-delay: 0.3s; } .seg-loader i:nth-child(4) { animation-delay: 0.45s; } .seg-loader i:nth-child(5) { animation-delay: 0.6s; }
@keyframes segl { 0% { opacity: 1; } 30% { opacity: 0.15; } }

.offline { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--inverse-bg); color: var(--inverse-fg); font-family: var(--font-mono); font-size: 12px; }

.notice { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 360px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--inverse-bg); color: var(--inverse-fg); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; animation: viewIn var(--base) var(--ease-out); }
.notice.error { background: var(--accent); color: #fff; }

/* ---------- modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 20px; animation: fade var(--base) var(--ease); }
.modal { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--border-visible); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 18px; animation: pop var(--base) var(--ease-out); max-height: calc(100dvh - 40px); overflow: auto; }
.modal h2 { margin: 0; font-weight: 400; font-size: 24px; color: var(--text-display); letter-spacing: -0.01em; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 3px; background: var(--border-visible); }
.steps i.on { background: var(--text-display); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- post sheet (Telegram-style) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: var(--scrim); animation: fade var(--base) var(--ease); }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(620px, 100%);
  background: var(--bg); border-left: 1px solid var(--border-visible);
  display: flex; flex-direction: column; animation: slideIn 360ms var(--ease-out);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.sheet-inner { flex: 1; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
.sheet-head .nav-btns { display: flex; gap: 4px; }

.tg-wall { padding: 26px 20px 30px; background: var(--tg-wall); position: relative; }
.tg-wall::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1.3px); background-size: 14px 14px; pointer-events: none; }
:root[data-theme="light"] .tg-wall::before { background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1.3px); }
.tg-chat { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tg-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-sans); font-weight: 500; font-size: 17px; flex: none; }
.tg-chat .name { color: var(--tg-text); font-weight: 500; font-size: 16px; line-height: 1.25; }
.tg-chat .name a { color: inherit; text-decoration: none; }
.tg-chat .name a:hover { text-decoration: underline; }
.tg-chat .sub { color: var(--tg-meta); font-size: 13px; }

.tg-row { position: relative; display: flex; gap: 8px; align-items: flex-end; }
.tg-row .tg-avatar.small { width: 34px; height: 34px; font-size: 13px; }
.tg-bubble {
  position: relative; max-width: 100%; min-width: 180px; background: var(--tg-bubble); color: var(--tg-text);
  border-radius: 14px 14px 14px 4px; overflow: hidden; font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 1px 1px rgba(0,0,0,0.12);
}
.tg-bubble .tg-author { padding: 9px 12px 0; color: var(--tg-name); font-weight: 600; font-size: 14px; }
.tg-bubble .tg-fwd { padding: 8px 12px 0; color: var(--tg-link); font-size: 13px; }
.tg-media { display: grid; gap: 2px; background: rgba(0,0,0,0.2); }
.tg-media img, .tg-media video { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #000; }
.tg-media .file { display: flex; gap: 10px; align-items: center; padding: 12px; color: var(--tg-link); text-decoration: none; background: var(--tg-bubble); }
.tg-media-missing { padding: 10px 12px 0; color: var(--tg-meta); font-size: 13px; }
.tg-text { padding: 8px 12px 4px; font-size: 15px; line-height: 1.42; white-space: pre-wrap; word-break: break-word; }
.tg-text a { color: var(--tg-link); text-decoration: none; }
.tg-text a:hover { text-decoration: underline; }
.tg-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 0 10px 7px; color: var(--tg-meta); font-size: 12px; }
.tg-open { display: block; margin-top: 10px; text-align: center; padding: 11px; border-radius: 12px; background: color-mix(in srgb, var(--tg-bubble) 80%, transparent); color: var(--tg-link); text-decoration: none; font-size: 14px; font-weight: 500; position: relative; }
.tg-open:hover { background: var(--tg-bubble); }

.post-analysis { padding: 26px 20px 40px; display: flex; flex-direction: column; gap: 28px; }
.verdict { display: flex; align-items: center; gap: 16px; }
.verdict .word { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 0.9; letter-spacing: -0.01em; color: var(--text-display); text-transform: uppercase; }
.verdict .word.negative { color: var(--accent); }
.verdict .word.positive { color: var(--success); }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- live notifications */
.badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; letter-spacing: 0; display: inline-grid; place-items: center; }
#sound-toggle[aria-pressed="false"] { text-decoration: line-through; opacity: 0.6; }
.toasts { position: fixed; top: 20px; right: 20px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-visible); border-left: 3px solid var(--text-display);
  border-radius: var(--radius-md); padding: 14px 40px 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: toastIn 360ms var(--ease-out);
}
.toast.negative { border-left-color: var(--accent); }
.toast.positive { border-left-color: var(--success); }
.toast.leaving { animation: toastOut 260ms var(--ease) forwards; }
.toast:hover { border-color: var(--text-secondary); }
.toast .t-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.toast .t-src { font-size: 14px; color: var(--text-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.toast .t-text { font-size: 13px; color: var(--text-secondary); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.toast .t-text mark { background: var(--accent-subtle); color: inherit; }
.toast .t-close { position: absolute; top: 8px; right: 6px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-disabled); cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.toast .t-close:hover { color: var(--text-display); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--border-visible); animation: toastBar linear forwards; }
.toast-more { pointer-events: auto; align-self: flex-end; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }
.sound-unlock { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 71; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--text-display); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.notif-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-right: 0; border-bottom: 1px solid var(--border);
  }
  .brand span { display: none; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; gap: 0; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { min-height: 40px; padding: 0 12px; white-space: nowrap; }
  .nav a .idx { display: none; }
  .side-foot { margin: 0; flex-direction: row; align-items: center; }
  .sys { flex-direction: row; padding: 0; }
  .sys .label { display: none; }
  .side-actions .btn { padding: 0 8px; }
  #theme-toggle { display: none; }
  .main { padding: 24px 16px 64px; }
  .page-head h1 { font-size: 30px; }
  .mention { grid-template-columns: 1fr; gap: 8px; }
  .mention .when { display: flex; gap: 8px; }
  .mention .when b { display: inline; }
  .mention .tags { justify-content: flex-start; max-width: none; }
  .filters .select, .filters .dates { flex: 1 1 100%; }
  .filters .dates .input { width: auto; flex: 1; min-width: 0; }
  .seg-ctl { width: 100%; } .seg-ctl button { flex: 1; padding: 0 6px; }
  .sheet { width: 100%; top: auto; height: 94dvh; border-left: 0; border-top: 1px solid var(--border-visible); border-radius: 18px 18px 0 0; animation: sheetUp 380ms var(--ease-out); }
  .sheet-head { border-radius: 18px 18px 0 0; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
  .chart { gap: 3px; } .chart-axis { gap: 3px; }
  .chart-axis span:nth-child(odd) { visibility: hidden; }
  .kw-add { flex-direction: column; }
  .toasts { top: auto; bottom: 16px; right: 16px; }
  .badge { margin-left: 6px; }
}
