.ch-tabs, .ch-pane {
    --bg-deep: #0b0d18; --bg-base: #131525; --bg-surface: #1b1e30; --bg-raised: #232742; --bg-hover: #2c3050; --bg-input: #1f2235;
    --border: #2d3150; --border-strong: #3f4470; --text-bright: #f0f3ff; --text-primary: #dde2f3; --text-secondary: #9aa1c1; --text-muted: #6b7299;
    --accent-cyan: #4fc6e8; --accent-amber: #e5a23a; --accent-violet: #b066f0;
}
.ch-tabs { display: flex; gap: .3rem; margin: 1.1rem 0 .8rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ch-tab { --tabc: #8FFFD8; background: linear-gradient(180deg, rgba(22,27,58,.55), rgba(14,18,42,.55)); border: 0;
    border-bottom: 2px solid transparent; padding: .8rem 1.5rem; cursor: pointer; color: #aab3dd; display: flex; align-items: baseline;
    gap: .5rem; position: relative; top: 1px; font-size: 1rem; border-radius: 10px 10px 0 0;
    transition: color .18s ease, transform .14s ease, background .2s ease, box-shadow .2s ease; }
.ch-tab-imported { --tabc: #8FFFD8; } .ch-tab-manual { --tabc: #FFDE8A; } .ch-tab-dups { --tabc: #FF8FB8; } .ch-tab-tools { --tabc: #D9A6FF; }
.ch-tab-rels { --tabc: #9BE8FF; }
.ch-tab-g { font-size: 1.15rem; line-height: 1; color: var(--tabc); opacity: .75;
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--tabc) 60%, transparent)); transition: opacity .18s, filter .18s, transform .14s; }
.ch-tab-k { font-size: 1rem; text-transform: uppercase; letter-spacing: .22em; font-weight: 700; }
.ch-tab .ch-tab-k { color: color-mix(in srgb, var(--tabc) 62%, #aab3dd); }
.ch-tab-c { font-size: 1rem; color: var(--text-muted); font-variant-numeric: tabular-nums; opacity: .75; }
.ch-tab:hover { color: #eef2ff; transform: translateY(-1px);
    background: linear-gradient(180deg, color-mix(in srgb, var(--tabc) 10%, rgba(22,27,58,.7)), rgba(14,18,42,.7)); }
.ch-tab:hover .ch-tab-g { opacity: 1; transform: translateY(-1px); }
.ch-tab.is-on { color: #fff; border-bottom-color: var(--tabc);
    background: linear-gradient(180deg, color-mix(in srgb, var(--tabc) 16%, rgba(22,27,58,.8)), color-mix(in srgb, var(--tabc) 4%, rgba(12,16,38,.8)));
    text-shadow: 0 0 10px color-mix(in srgb, var(--tabc) 70%, transparent), 0 0 26px color-mix(in srgb, var(--tabc) 35%, transparent);
    box-shadow: 0 -1px 20px color-mix(in srgb, var(--tabc) 22%, transparent), inset 0 0 22px color-mix(in srgb, var(--tabc) 8%, transparent), 0 2px 0 -1px var(--tabc); }
.ch-tab.is-on .ch-tab-k { color: var(--tabc); }
.ch-tab.is-on .ch-tab-g { opacity: 1; filter: drop-shadow(0 0 10px var(--tabc)) drop-shadow(0 0 24px color-mix(in srgb, var(--tabc) 45%, transparent)); }
.ch-tab.is-on .ch-tab-c { color: #0b0e20; background: var(--tabc); opacity: 1; padding: .05rem .5rem; border-radius: 999px;
    font-weight: 800; box-shadow: 0 0 12px color-mix(in srgb, var(--tabc) 55%, transparent); }
.ch-tab:focus-visible { outline: 2px solid var(--tabc); outline-offset: 2px; }
.ch-pane { font-size: 16px; display: flex; flex-direction: column; }
.ch-bar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.1rem 1.4rem; align-items: flex-start;
    padding: 1.1rem 1.2rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 1rem; }
.ch-bar .ch-zone-source { grid-column: 1; grid-row: 1; } .ch-bar .ch-zone-langs { grid-column: 2; grid-row: 1; }
.ch-bar .ch-zone-narrow { grid-column: 1; grid-row: 2; } .ch-bar .ch-zone-order { grid-column: 2; grid-row: 2; }
.ch-bar .ch-zone-show { grid-column: 1 / -1; grid-row: 3; }
@media (max-width: 1100px) { .ch-bar { grid-template-columns: minmax(0,1fr); } .ch-bar .ch-zone { grid-column: 1; grid-row: auto; } }
.ch-zone-source { --zone: #FFD98A; } .ch-zone-langs { --zone: #9BE8FF; } .ch-zone-narrow { --zone: #4FC6E8; }
.ch-zone-order { --zone: #D9A6FF; } .ch-zone-show { --zone: #7FE0A8; }
.ch-zone { padding: .6rem .9rem .75rem .9rem; border: 1px solid color-mix(in srgb, var(--zone) 30%, transparent); border-left: 0;
    border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--zone) 7%, transparent), color-mix(in srgb, var(--zone) 2%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zone) 16%, transparent); }
.ch-cluster { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.ch-cluster-k { flex: 0 0 100%; margin: 0; font-size: 1rem; text-transform: uppercase; font-weight: 700; }
.ch-zone .ch-cluster-k { color: color-mix(in srgb, var(--zone) 88%, #fff); display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 800; letter-spacing: .28em;
    text-shadow: 0 0 12px color-mix(in srgb, var(--zone) 70%, transparent), 0 0 30px color-mix(in srgb, var(--zone) 32%, transparent); }
.ch-zone .ch-cluster-k::after { content: ""; flex: 1 1 auto; min-width: 1.6rem; height: 1px; margin-left: .25rem;
    background: linear-gradient(90deg, color-mix(in srgb, var(--zone) 70%, transparent), transparent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--zone) 40%, transparent); }
.ch-zone-glyph { font-size: 1.15rem; line-height: 1; color: var(--zone);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--zone) 85%, transparent)) drop-shadow(0 0 20px color-mix(in srgb, var(--zone) 40%, transparent)); }
.ch-seg { display: inline-flex; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; overflow: hidden; flex-wrap: wrap; max-width: 100%; }
.ch-seg-b { background: none; border: none; padding: .5rem 1.05rem; font-size: 16px; font-weight: 600; color: rgba(233,238,250,.62); cursor: pointer; white-space: nowrap; }
.ch-seg-b.is-on { background: rgba(143,255,216,.16); color: #8FFFD8; }
.ch-zone .ch-seg { gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.035); overflow: visible;
    border-color: color-mix(in srgb, var(--zone) 28%, var(--border)); }
.ch-zone .ch-seg-b { border-right: 0; border-radius: 999px; padding: .5rem 1.05rem; transition: background .16s, color .16s, transform .16s, box-shadow .16s; }
.ch-zone .ch-seg-b:hover { background: color-mix(in srgb, var(--zone) 12%, transparent); color: var(--text-bright); transform: translateY(-1px); }
.ch-zone .ch-seg-b.is-on { background: linear-gradient(180deg, color-mix(in srgb, var(--zone) 26%, transparent), color-mix(in srgb, var(--zone) 9%, transparent));
    color: var(--text-bright); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zone) 55%, transparent), 0 2px 14px color-mix(in srgb, var(--zone) 22%, transparent); }
.ch-seg-b:focus-visible { outline: 2px solid var(--zone, #8FFFD8); outline-offset: 1px; }
.ch-input, .ch-select { background: transparent; color: var(--text-bright); border: 1px solid var(--border); border-radius: 10px;
    padding: .6rem .9rem; font-size: 1rem; line-height: 1.2; outline: none; transition: border-color .18s, box-shadow .18s, background-color .18s; }
.ch-select option { background: var(--bg-surface); color: var(--text-bright); }
.ch-input::placeholder { color: var(--text-muted); opacity: 1; }
.ch-search { box-shadow: inset 0 0 0 1px rgba(79,198,232,.15), inset 0 8px 24px rgba(79,198,232,.06); background-color: var(--bg-input); }
.ch-cluster .ch-search { flex: 1 1 24rem; min-width: 18rem; height: auto; }
.ch-zone .ch-input, .ch-zone .ch-select { border-radius: 999px; padding: .62rem 1.15rem; background: rgba(255,255,255,.035);
    border-color: color-mix(in srgb, var(--zone) 22%, var(--border)); }
.ch-zone .ch-input:focus-visible, .ch-zone .ch-select:focus-visible { outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--zone) 20%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--zone) 30%, transparent); }
.ch-zone-langs .ch-langs { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; }
.ch-lang { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; color: #cfd3f2; }
.ch-lang input { width: 1.05rem; height: 1.05rem; accent-color: #9BE8FF; }
.ch-lang-name { font-weight: 600; } .ch-lang-n, .ch-lang-note { color: #8b90b5; font-variant-numeric: tabular-nums; }
.ch-busy { position: relative; flex: 1 1 100%; height: 2px; overflow: hidden; background: rgba(79,198,232,.18); border-radius: 2px; }
.ch-busy-run { position: absolute; top: 0; bottom: 0; background: #4fc6e8; box-shadow: 0 0 12px rgba(79,198,232,.6); animation: ch-busy-run 1.2s infinite; }
@keyframes ch-busy-run { 0% { left: -30%; width: 30%; } 50% { left: 45%; width: 20%; } 100% { left: 110%; width: 30%; } }
@media (prefers-reduced-motion: reduce) { .ch-busy-run { animation: none; left: 0; width: 100%; } }
.ch-grouphead { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0 .7rem; }
.ch-grouphead::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.ch-grouphead-k { font-size: 1.15rem; font-weight: 700; color: var(--text-bright); letter-spacing: .03em; white-space: nowrap; }
.ch-grouphead-n { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.ch-card { background: linear-gradient(180deg, var(--bg-surface), var(--bg-raised)); border: 1px solid var(--border); border-radius: 16px;
    padding: 1rem 1.1rem; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.ch-card:hover, .ch-card:focus-visible { transform: translateY(-3px); border-color: rgba(176,102,240,.55); box-shadow: 0 10px 26px rgba(0,0,0,.35), 0 0 22px rgba(176,102,240,.22); outline: none; }
.ch-card-title { font-size: 1.15rem; font-weight: 650; color: var(--text-bright); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .6rem; }
.ch-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.ch-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .6rem; border-radius: 999px; border: 1px solid var(--border);
    color: var(--text-secondary); background: rgba(19,21,37,.35); font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.ch-chip-date { color: var(--accent-amber); border-color: rgba(229,162,58,.4); }
.ch-chip-msgs { color: #8FFFD8; border-color: rgba(143,255,216,.45); }
.ch-chip-size { color: var(--text-muted); }
.ch-chip-arch { color: #FFD98A; border-color: rgba(255,217,138,.45); }
.ch-listhead, .ch-row2 { display: grid; grid-template-columns: 7.5rem 1fr 5rem 6rem 13rem; gap: 1rem; align-items: center; }
.ch-listhead { padding: .55rem 1rem; font-weight: 700; letter-spacing: .1em; color: rgba(233,238,250,.45); border-bottom: 1px solid rgba(255,255,255,.1); }
.ch-listhead span:nth-child(3), .ch-listhead span:nth-child(4) { text-align: right; }
.ch-list { display: flex; flex: 0 0 auto; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ch-row2 { flex: 0 0 auto; min-height: 3rem; padding: .7rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.ch-list .ch-row2:nth-child(odd) { background: #101226; } .ch-list .ch-row2:nth-child(even) { background: #14172f; }
.ch-list .ch-row2:hover, .ch-list .ch-row2:focus-visible { background: #1b1e42; outline: none; } .ch-row2:last-child { border-bottom: 0; }
.ch-row2-date { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ch-row2-title { font-size: 1.05rem; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row2:hover .ch-row2-title { color: #FFDE8A; }
.ch-row2-msgs, .ch-row2-size { color: var(--text-secondary); font-variant-numeric: tabular-nums; text-align: right; }
.ch-row2-acts { display: inline-flex; gap: .5rem; justify-self: end; align-items: center; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .ch-listhead, .ch-row2 { grid-template-columns: 6rem 1fr 4rem; } .ch-listhead span:nth-child(n+4), .ch-row2-size, .ch-row2-acts { display: none; } }
.ch-timeline { position: relative; padding-left: 1.6rem; display: flex; flex-direction: column; gap: .1rem; }
.ch-timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 1px;
    background: linear-gradient(180deg, transparent, var(--border-strong) 12%, var(--border-strong) 88%, transparent); }
.ch-tl { position: relative; display: grid; grid-template-columns: 1fr 5rem; align-items: center; gap: 1rem; padding: .6rem .8rem; border-radius: 10px; cursor: pointer; }
.ch-timeline .ch-tl:nth-child(even) { background: rgba(255,255,255,.018); } .ch-tl:hover, .ch-tl:focus-visible { background: var(--bg-hover); outline: none; }
.ch-tl-dot { position: absolute; left: -1.15rem; width: .5rem; height: .5rem; border-radius: 50%; background: #D9A6FF; box-shadow: 0 0 0 3px rgba(176,102,240,.15); }
.ch-tl-title { font-size: 1.05rem; color: var(--text-bright); } .ch-tl-meta { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ch-tl-bar { height: .35rem; border-radius: 999px; background: linear-gradient(90deg, #8FFFD8, #D9A6FF); }
.ch-tl-bar.is-1 { width: 18%; } .ch-tl-bar.is-2 { width: 36%; } .ch-tl-bar.is-3 { width: 56%; } .ch-tl-bar.is-4 { width: 78%; } .ch-tl-bar.is-5 { width: 100%; }
.ch-pager { display: flex; justify-content: center; align-items: center; gap: .4rem; margin-top: 1.4rem; flex-wrap: wrap; }
.ch-page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .6rem; border-radius: 10px;
    background: transparent; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all .18s ease; font-size: 16px; }
.ch-page-btn:hover { background: var(--bg-hover); color: var(--text-bright); }
.ch-page-btn.is-current { border-color: var(--accent-violet); color: var(--text-bright); box-shadow: 0 0 0 3px rgba(176,102,240,.28), inset 0 0 0 1px rgba(176,102,240,.42); }
.ch-page-btn:disabled { opacity: .4; cursor: default; }
.ch-page-say { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-left: .6rem; }
.ch-vacancy { padding: 1.2rem; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-secondary); }
.ch-hits-say { color: var(--text-muted); margin: 0 0 .7rem; }
.ch-hit { display: grid; grid-template-columns: minmax(0,1fr) minmax(15rem,21rem); align-items: stretch; overflow: hidden; background: var(--bg-surface);
    border-radius: 12px; margin-bottom: .7rem; border: 1px solid var(--border); transition: background-color .18s, transform .18s, box-shadow .18s; }
.ch-hit:hover { background: var(--bg-hover); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.ch-hit-read { padding: .9rem 1.1rem; cursor: pointer; min-width: 0; }
.ch-hit-read:focus-visible { outline: 2px solid var(--accent-violet); outline-offset: -2px; }
.ch-hit-title { font-size: 1.1rem; color: var(--text-bright); font-weight: 600; margin-bottom: .3rem; }
.ch-hit-where { color: var(--text-muted); text-transform: uppercase; letter-spacing: .16em; margin-bottom: .35rem; }
.ch-hit-snip { font-size: 1.05rem; line-height: 1.6; color: var(--text-primary); overflow-wrap: anywhere; }
.ch-mark { color: #0b0d18; background-image: linear-gradient(90deg, #FFDE8A, #8FFFD8); padding: 0 .22rem; border-radius: 4px; font-weight: 700; }
.ch-hit-doors { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border-left: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.014); }
.ch-hit-doors .ch-door { flex: 1; }
.ch-door { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; cursor: pointer; padding: .55rem .8rem; border-radius: 10px;
    background: rgba(255,255,255,.028); border: 1px solid rgba(255,255,255,.1); transition: background .16s, border-color .16s, transform .16s; box-sizing: border-box; }
.ch-door:hover, .ch-door:focus-visible { background: rgba(255,255,255,.06); transform: translateX(2px); outline: none; }
.ch-door-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-door-k { letter-spacing: .07em; font-weight: 600; }
.ch-door-v { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-door-mark { flex: none; position: relative; }
.ch-door-mark-capsule { width: 30px; height: 15px; border-radius: 999px; border: 1.5px solid var(--accent-violet); background: color-mix(in srgb, var(--accent-violet) 16%, transparent); }
.ch-door-mark-capsule::after { content: ""; position: absolute; top: 1px; bottom: 1px; left: 50%; width: 1.5px; background: var(--accent-violet); opacity: .75; }
.ch-door-capsule { border-color: color-mix(in srgb, var(--accent-violet) 34%, transparent); } .ch-door-capsule .ch-door-k { color: var(--accent-violet); }
.ch-door-capsule:hover { border-color: color-mix(in srgb, var(--accent-violet) 62%, transparent); }
.ch-door-mark-sheet { width: 22px; height: 27px; border-radius: 3px; border: 1.5px solid var(--accent-amber); background: color-mix(in srgb, var(--accent-amber) 13%, transparent); }
.ch-door-mark-sheet::after { content: ""; position: absolute; top: -1.5px; right: -1.5px; border-width: 0 0 8px 8px; border-style: solid;
    border-color: transparent transparent var(--bg-surface) transparent; filter: drop-shadow(-1px 1px 0 var(--accent-amber)); }
.ch-door-source { border-color: color-mix(in srgb, var(--accent-amber) 32%, transparent); } .ch-door-source .ch-door-k { color: var(--accent-amber); }
.ch-door-source:hover { border-color: color-mix(in srgb, var(--accent-amber) 60%, transparent); }
.ch-source-say { margin: .7rem 0 0; padding: .7rem .95rem; border-radius: 10px; max-width: 84ch; font-size: 1.02rem; line-height: 1.55; color: var(--text-bright);
    background: color-mix(in srgb, var(--accent-amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent-amber) 34%, transparent); }
@media (max-width: 1000px) { .ch-hit { grid-template-columns: minmax(0,1fr); } .ch-hit-doors { border-left: none; border-top: 1px solid rgba(255,255,255,.07); flex-direction: row; } }
.ch-back { align-self: flex-start; display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .95rem; border-radius: 999px;
    border: 1px solid rgba(79,198,232,.55); color: var(--accent-cyan); background: rgba(19,21,37,.3); cursor: pointer; font-size: 16px; margin-bottom: .9rem; }
.ch-back:hover, .ch-back:focus-visible { background: rgba(79,198,232,.08); box-shadow: 0 0 14px rgba(79,198,232,.24); outline: none; }
.ch-reading { display: flex; flex-direction: column; gap: .9rem; }
.ch-thread-title { font-size: clamp(1.6rem, 3vw, 2.6rem); font-size: max(16px, clamp(1.6rem, 3vw, 2.6rem)); font-weight: 700; color: var(--text-bright); line-height: 1.15; margin: .2rem 0 0; }
.ch-thread-meta { color: var(--text-secondary); letter-spacing: .02em; margin: 0; }
.ch-thread-origin { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; margin: .5rem 0 .2rem; }
.ch-thread-origin-k { font-weight: 700; letter-spacing: .12em; color: rgba(233,238,250,.4); }
.ch-thread-origin-v { font-weight: 600; color: #FFDE8A; }
.ch-thread-origin-p { flex: 0 0 100%; color: rgba(233,238,250,.42); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.ch-disp-k { letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); } .ch-disp-v { color: #9AB8FF; }
.ch-rel-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: .9rem 0 .2rem; }
.ch-rel-chip { display: inline-flex; align-items: stretch; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(217,166,255,.3); }
.ch-rel-go { display: inline-flex; align-items: baseline; gap: .45rem; border: 0; background: none; padding: .35rem .4rem .35rem .85rem; color: var(--text-secondary); cursor: pointer; font-size: 16px; }
.ch-rel-go:hover, .ch-rel-go:focus-visible { background: rgba(217,166,255,.12); color: var(--text-bright); outline: none; }
.ch-rel-phrase { color: #D9A6FF; font-weight: 650; } .ch-rel-name { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-rel-x { border: 0; background: none; color: var(--text-muted); padding: .35rem .6rem; cursor: pointer; } .ch-rel-x:hover, .ch-rel-x:focus-visible { color: #FF9A9A; outline: none; }
.ch-rel-add { border: 1px dashed rgba(217,166,255,.5); background: none; color: #D9A6FF; border-radius: 999px; padding: .4rem 1rem; transition: background .15s, box-shadow .15s; cursor: pointer; font-size: 16px; }
.ch-rel-add:hover, .ch-rel-add:focus-visible { background: rgba(217,166,255,.1); box-shadow: 0 0 16px rgba(217,166,255,.2); outline: none; }
.ch-rel-form { margin: 1rem 0 .4rem; border-radius: 18px; padding: 1.3rem 1.5rem 1.5rem;
    background: radial-gradient(130% 150% at 50% -10%, rgba(217,166,255,.08), transparent 60%), rgba(255,255,255,.015); box-shadow: inset 0 0 0 1px rgba(217,166,255,.22); }
.ch-rel-form-k { font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: #D9A6FF; text-shadow: 0 0 16px rgba(217,166,255,.4); margin: 0 0 .6rem; }
.ch-rr { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: flex-start; padding: 1rem 1.15rem; margin: .9rem 0 1.6rem;
    border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); }
.ch-rr, .ch-rr * { font-size: 16px; }
.ch-rr-c { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; min-width: 0; }
.ch-rr-k { flex: 0 0 100%; font-weight: 700; letter-spacing: .14em; color: rgba(233,238,250,.42); }
.ch-rr-say { color: rgba(233,238,250,.58); } .ch-rr-note { flex: 0 0 100%; color: #FFDE8A; opacity: .85; }
.ch-copy { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid rgba(143,255,216,.7); color: #8FFFD8; background: transparent; padding: .75rem 1.4rem;
    border-radius: 12px; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.ch-copy:hover, .ch-copy:focus-visible { background: rgba(143,255,216,.12); box-shadow: 0 0 0 3px rgba(143,255,216,.22), 0 0 24px rgba(143,255,216,.18); outline: none; }
.ch-copy.is-done { background: #8FFFD8; color: #0b0d18; border-color: #8FFFD8; box-shadow: 0 0 0 2px rgba(143,255,216,.5); }
.ch-act { font-weight: 620; padding: .6rem 1.15rem; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.13); color: #C9D4EA; }
.ch-act-arch { border-color: rgba(143,255,216,.45); color: #8FFFD8; }
.ch-act:focus-visible, .ch-embed-all:focus-visible, .ch-embed-tab:focus-visible { outline: 2px solid #8FFFD8; outline-offset: 2px; }
.ch-embed-all { border: 1px solid rgba(176,102,240,.6); color: #D9A6FF; border-radius: 12px; padding: .6rem 1.1rem; font-weight: 600; letter-spacing: .05em; background: none; cursor: pointer; }
.ch-msgs { display: flex; flex-direction: column; }
.ch-msg { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: .9rem; }
.ch-msg.is-human { border-left: 3px solid #FFDE8A; } .ch-msg.is-claude { border-left: 3px solid #D9A6FF; } .ch-msg.is-other { border-left: 3px solid #9BE8FF; }
.ch-msg-who { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; display: inline-flex; align-items: baseline; gap: .6rem; }
.ch-msg.is-human .ch-msg-who { color: #FFDE8A; } .ch-msg.is-claude .ch-msg-who { color: #D9A6FF; } .ch-msg.is-other .ch-msg-who { color: #9BE8FF; }
.ch-msg-at { color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.ch-msg-empty { margin-left: .75rem; font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: lowercase; color: #E8FF3A; }
.ch-msg-body { margin-top: .45rem; font-size: 1.05rem; line-height: 1.7; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ch-reading [dir="rtl"] { text-align: right; unicode-bidi: plaintext; }
.ch-msg.is-standing { background: rgba(255,255,255,.035); box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent-violet) 70%, transparent); scroll-margin-block: 38vh; }
.ch-msg.is-standing .ch-msg-who { color: var(--text-bright); }
.ch-msg.is-standing p, .ch-msg.is-standing li { color: var(--text-bright); font-weight: 450; letter-spacing: .004em; }
.ch-think { background: linear-gradient(180deg, rgba(176,102,240,.10), rgba(176,102,240,.04)); border-left: 3px solid rgba(217,166,255,.75);
    border-top: 1px solid rgba(176,102,240,.18); border-right: 1px solid rgba(176,102,240,.18); border-bottom: 1px solid rgba(176,102,240,.18);
    border-radius: 0 12px 12px 0; padding: 1rem 1.2rem; color: var(--text-primary); margin: .5rem 0; }
.ch-think-label { text-transform: uppercase; letter-spacing: .22em; font-weight: 700; color: #D9A6FF; margin-bottom: .55rem; }
.ch-think .ch-msg-body { line-height: 1.75; }
.ch-embed { margin: .8rem 0 .2rem; border-radius: 12px; border: 1px dashed rgba(176,102,240,.45); background: rgba(176,102,240,.05); overflow: hidden; }
.ch-embed-tab { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .6rem .9rem; background: rgba(176,102,240,.10); border: 0;
    border-bottom: 1px solid rgba(176,102,240,.28); cursor: pointer; color: var(--text-secondary); letter-spacing: .16em; text-transform: uppercase; font-size: 16px; }
.ch-embed-tab:hover { background: rgba(176,102,240,.18); color: var(--text-bright); }
.ch-embed-caret { transition: transform .18s ease; transform: rotate(-90deg); } .ch-embed.is-open .ch-embed-caret { transform: rotate(0); }
.ch-embed-label { color: var(--text-muted); } .ch-embed-src { color: #D9A6FF; font-weight: 700; letter-spacing: .10em; }
.ch-embed-body { padding: .9rem 1.1rem; font-size: 1.05rem; line-height: 1.7; display: none; } .ch-embed.is-open .ch-embed-body { display: block; }
.ch-md-h { font-size: 1.15rem; font-weight: 700; color: var(--text-bright); margin: 1rem 0 .5rem; }
.ch-md-c, .ch-reading pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } .ch-md-c { background: rgba(255,255,255,.06); padding: 0 .3rem; border-radius: 4px; }
.ch-md-q { border-left: 2px solid rgba(176,102,240,.5); padding-left: .8rem; color: var(--text-secondary); margin: .5rem 0; }
.ch-md-p { margin: 0 0 .6rem; }
.ch-reading pre { background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; overflow-x: auto; }
.chmd-h1 { font-size: 1.5rem; font-weight: 750; } .chmd-h2 { font-size: 1.3rem; font-weight: 700; } .chmd-h3 { font-size: 1.12rem; font-weight: 700; }
.chmd-code { background: rgba(6,8,18,.6); border-radius: 8px; padding: .7rem .9rem; white-space: pre; }
.ch-below { margin-top: 1.2rem; }
.ch-reading-host { display: flex; flex-direction: column; }
.ch-pane[hidden], .ch-pane [hidden], .ch-tabs [hidden] { display: none !important; }
.ch-maps { --border: #2d3150; --text-bright: #f0f3ff; --text-secondary: #9aa1c1; --text-muted: #6b7299;
    display: flex; flex-direction: column; gap: 1.5rem; margin-top: .4rem; font-size: 16px; }
.ch-map-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .ch-map-row { grid-template-columns: 1fr; } }
.ch-map { --mz: #4FC6E8; border-radius: 18px; padding: 1.35rem 1.6rem 1.6rem; min-width: 0;
    background: radial-gradient(130% 150% at 50% -10%, color-mix(in srgb, var(--mz) 8%, transparent), transparent 60%), rgba(255,255,255,.015);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mz) 18%, var(--border)); }
.ch-map-lex { --mz: #4FC6E8; } .ch-map-time { --mz: #FFD98A; } .ch-map-src { --mz: #D9A6FF; } .ch-map-ret { --mz: #FF97C2; } .ch-map-mass { --mz: #7FE0A8; } .ch-map-px { --mz: #9AB8FF; }
.ch-map-k { display: flex; align-items: baseline; gap: .7rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--mz); margin: 0;
    text-shadow: 0 0 16px color-mix(in srgb, var(--mz) 45%, transparent); }
.ch-map-n { letter-spacing: .06em; color: var(--text-muted); text-shadow: none; } .ch-map-sub { margin: .4rem 0 0; color: var(--text-muted); max-width: 90ch; line-height: 1.5; }
.ch-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .3rem 1.15rem; padding: 1.7rem .6rem 1rem; }
.ch-cloud-w { background: none; border: 0; cursor: pointer; line-height: 1.1; padding: .05rem .2rem; opacity: .92; text-shadow: 0 0 12px color-mix(in srgb, currentColor 28%, transparent); transition: transform .18s, opacity .18s, text-shadow .18s; }
.ch-cloud-w:hover, .ch-cloud-w:focus-visible { transform: translateY(-2px) scale(1.08); opacity: 1; text-shadow: 0 0 26px currentColor; outline: none; }
.ch-cloud-w.is-carved { font-weight: 750; letter-spacing: .07em; text-shadow: 0 0 18px color-mix(in srgb, currentColor 70%, transparent); }
.ch-mrail { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding: 1.1rem .1rem .2rem; }
.ch-mbar { flex: 1 1 0; min-width: 7px; border: 0; cursor: pointer; border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--mz) 90%, transparent), color-mix(in srgb, var(--mz) 18%, transparent));
    box-shadow: 0 0 12px color-mix(in srgb, var(--mz) 22%, transparent); transition: filter .15s, transform .15s; }
.ch-mbar:hover, .ch-mbar:focus-visible { filter: brightness(1.4); transform: translateY(-3px); outline: none; }
.ch-mrail-lab { display: flex; gap: 5px; padding: 0 .1rem; } .ch-mlab { flex: 1 1 0; min-width: 7px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: visible; }
.ch-mland { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.ch-mblock { display: flex; flex-direction: column; gap: .2rem; min-width: 8rem; border: 0; cursor: pointer; border-radius: 12px; padding: 1rem 1.1rem; color: var(--text-bright); text-align: left;
    background: linear-gradient(180deg, color-mix(in srgb, var(--mz) 22%, transparent), color-mix(in srgb, var(--mz) 6%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mz) 32%, transparent); transition: box-shadow .15s, transform .15s; }
.ch-mblock:hover, .ch-mblock:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--mz), 0 4px 22px color-mix(in srgb, var(--mz) 25%, transparent); outline: none; }
.ch-mblock-n { font-size: 1.65rem; font-weight: 750; line-height: 1; } .ch-mblock-k { color: var(--text-secondary); }
.ch-lrow { display: flex; align-items: center; gap: .9rem; width: 100%; border: 0; background: none; cursor: pointer; color: var(--text-secondary); padding: .42rem .2rem; border-radius: 8px; text-align: left; font-size: 16px; }
.ch-lrow:hover, .ch-lrow:focus-visible { background: color-mix(in srgb, var(--mz) 9%, transparent); color: var(--text-bright); outline: none; }
.ch-lbar { height: 11px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--mz) 85%, transparent), color-mix(in srgb, var(--mz) 25%, transparent)); box-shadow: 0 0 10px color-mix(in srgb, var(--mz) 30%, transparent); }
.ch-lcount { font-weight: 750; color: var(--mz); } .ch-lkb { color: var(--text-muted); margin-left: auto; } .ch-lname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-px-svg { width: 100%; height: auto; display: block; border-radius: 12px; background: rgba(6,8,18,.55); margin-top: 1rem; }
.ch-px-node { cursor: pointer; } .ch-px-node text { paint-order: stroke; stroke: rgba(6,8,18,.85); stroke-width: 3px; }
.ch-px-node:hover circle, .ch-px-node:focus circle { fill-opacity: 1; } .ch-px-node:hover text, .ch-px-node:focus text { fill: #fff; opacity: 1; }
.ch-px-node:focus { outline: none; } .ch-px-node:focus circle { stroke: #fff; }
.ch-px-node text.is-small { opacity: .35; transition: opacity .15s; }
.ch-px-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ch-px-gaps { display: flex; flex-direction: column; gap: .35rem; margin-top: .9rem; }
.ch-px-gaps-k { font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #4FC6E8; text-shadow: 0 0 14px rgba(79,198,232,.4); }
.ch-px-gap { color: var(--text-secondary); } .ch-px-gap b { color: var(--text-bright); }
.ch-pot-row-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1rem;margin:.5rem 0 .4rem}
.ch-pot-under{color:var(--text-muted);letter-spacing:.12em;text-transform:uppercase;font-size:.8rem; font-size: max(16px, .8rem);}
.ch-pot-profile{background:rgba(143,134,242,.08);color:#C9C4FF;border:1px solid rgba(143,134,242,.4);border-radius:8px;padding:.3rem .6rem;font:inherit;max-width:100%}
.ch-pot-disc{color:#aab0d8;margin:.1rem 0 .5rem;overflow-wrap:anywhere}
.ch-pot-voices{display:flex;flex-wrap:wrap;gap:.4rem;margin:.2rem 0 .5rem}
.ch-pot-table{overflow-x:auto}
.ch-potentiate{font-size:1.05rem;font-weight:800;letter-spacing:.12em;padding:.55rem 1.9rem;border-radius:10px;border:1px solid #8F86F2;
 background:rgba(143,134,242,.12);color:#C9C4FF;cursor:pointer}
.ch-potentiate:hover:not(:disabled){background:#8F86F2;color:#10122b;box-shadow:0 0 16px rgba(143,134,242,.5)}
.ch-potentiate:disabled{opacity:.6;cursor:wait}
.ch-pot-sealed{font-size:16px;color:#8f99cc;font-family:var(--mono,"Cascadia Mono",Consolas,monospace);letter-spacing:.02em}
.ch-pot-verdict{font-weight:700;padding:.2rem .9rem;border-radius:999px}
.ch-pot-verdict.is-verified{background:rgba(45,140,77,.18);color:#7FE0A8;border:1px solid rgba(76,176,115,.55)}
.ch-pot-verdict.is-noquorum{background:rgba(229,162,58,.15);color:#FFD98A;border:1px solid rgba(229,162,58,.5)}
.ch-pot-verdict[hidden], .ch-pot-panel[hidden]{display:none !important}
.ch-pot-panel{border:1px solid rgba(143,134,242,.4);border-radius:10px;background:rgba(143,134,242,.06);padding:.8rem 1.1rem;margin:.4rem 0 .8rem}
.ch-pot-table{border:1px solid rgba(143,134,242,.35);border-radius:8px;margin:.4rem 0 .7rem}
.ch-pot-row{display:grid;grid-template-columns:12rem 12rem 7rem minmax(12rem,1fr);gap:1rem;align-items:center;padding:.45rem 1rem;border-top:1px solid rgba(143,134,242,.18);min-width:max-content}
.ch-pot-row:nth-child(even){background:rgba(143,134,242,.05)}
.ch-pot-head{background:rgba(143,134,242,.14);font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#C9C4FF;border-top:none}
.ch-pot-name{font-weight:700;color:#E9E4FF}
.ch-pot-bar{display:inline-block;width:7rem;height:.7rem;border-radius:99px;background:#10122b;border:1px solid rgba(143,134,242,.4);overflow:hidden;vertical-align:middle}
.ch-pot-fill{display:block;height:100%;background:linear-gradient(90deg,#8F86F2,#C9C4FF)}
.ch-pot-div{color:#9aa0c0} .ch-pot-div.is-wide{color:#FFD98A;font-weight:700} .ch-pot-ev{color:#aab0d8;font-style:italic}
.ch-pot-voice{padding:.15rem .8rem;border-radius:999px}
.ch-pot-voice.is-ok{background:rgba(45,140,77,.15);color:#7FE0A8;border:1px solid rgba(76,176,115,.45)}
.ch-pot-voice.is-bad{background:rgba(176,48,48,.15);color:#FF9DB0;border:1px solid rgba(207,72,72,.45)}
.ch-pot-record{color:#6b7299;word-break:break-all}
.ch-tabsay {
    margin: 0.55rem 0 1.1rem;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(233, 238, 250, 0.62);
    letter-spacing: 0.005em;
}
.ch-tabsay[hidden] { display: none !important; }
.ch-dragon{font-weight:620;padding:.5rem 1rem;border-radius:10px;background:rgba(255,255,255,.03);border:1px dashed rgba(255,222,138,.4);color:rgba(255,222,138,.55);cursor:not-allowed}
.ch-chand-say{flex:0 0 100%}
.ch-chand-ranks{flex:0 0 100%;margin:.2rem 0 0;padding-left:1.6rem;color:rgba(233,238,250,.58);font-variant-numeric:tabular-nums;max-height:14rem;overflow:auto}
.ch-chand-ranks[hidden]{display:none !important}
