/* Вікно Inquisitor Time. Шапка-місто, нижня панель, кольори й підказки — спільна «рамка» ядра (town/tt-shell.css);
 * тут — лише вміст «Панелі». Акцент той самий, що в усьому Time Town: індиго, латунь. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg, #0F1220); color: var(--text, #ECE7DA); font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; overflow-x: hidden; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
[hidden] { display: none !important; }

.pane-in { animation: panein .24s ease-out; }
@keyframes panein { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .pane-in { animation: none; } }
.section { padding: 14px 16px 24px; }
.label { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; margin: 0 0 10px; }
.label.mt { margin-top: 22px; }
.mt8 { margin-top: 8px; }
.cap { font-size: 13px; color: var(--muted); line-height: 1.45; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.card p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 6px; text-align: center; min-width: 0; }
.stat b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { display: block; font-size: 13px; line-height: 1.25; color: var(--muted); }
.stat.link { cursor: pointer; width: 100%; }
.btn { flex: 1; min-height: 46px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.btn.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn.small { min-height: 40px; font-size: 14px; padding: 6px 10px; }
.btn:active { transform: scale(.98); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btns .btn { flex: 1 1 120px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--soft); }

.gate { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; text-align: center; }
.gate .em { font-size: 44px; line-height: 1; }
.gate h1 { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.gate p { margin: 0; max-width: 320px; color: var(--soft); font-size: 15px; line-height: 1.5; }
.gate .btn { flex: none; min-width: 200px; margin-top: 8px; }

/* чати й розділи панелі */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-top: 10px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--goldbg); color: var(--gold2); border-color: var(--gold); }
.seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-b { min-height: 40px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.seg-b.on { background: var(--chip); color: var(--text); border-color: var(--line); }
.dot { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

.row-card b { display: block; font-size: 15px; line-height: 1.35; }
.row-card .cap { display: block; margin-top: 2px; }
.linkish { background: none; border: 0; padding: 8px 0 0; color: var(--gold2); font-weight: 600; font-size: 14px; cursor: pointer; min-height: 32px; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 15px; }
.line + .line { border-top: 1px solid var(--line2); }
.line b { font-variant-numeric: tabular-nums; }
.rules { white-space: pre-wrap; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.case { padding: 9px 0; }
.case + .case { border-top: 1px solid var(--line2); }
.case b { font-size: 14px; }
textarea { width: 100%; min-height: 96px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); resize: vertical; font-size: 15px; line-height: 1.4; }

/* перемикачі й налаштування */
.switch, .set { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 0; }
.switch { background: none; border: 0; cursor: pointer; text-align: left; font-size: 15px; }
.switch + .switch, .set + .set { border-top: 1px solid var(--line2); }
.set { flex-wrap: wrap; font-size: 14px; line-height: 1.35; }
.set > span:first-child { flex: 1 1 150px; min-width: 0; }
.switch i, .toggle i { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch i::after, .toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ECE7DA; transition: transform .15s; }
.switch i.on, .toggle i.on { background: var(--green); }
.switch i.on::after, .toggle i.on::after { transform: translateX(18px); }
.toggle { background: none; border: 0; padding: 8px 0 8px 8px; cursor: pointer; display: flex; }
.val { min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); font-weight: 600; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
select { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); font-weight: 600; font-size: 14px; }
.edit { display: flex; gap: 6px; align-items: center; }
.edit input { width: 110px; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--gold); background: var(--inset); font-size: 15px; }
.edit .btn { flex: none; }
.set .hint { flex-basis: 100%; text-align: right; }

/* події, тригери, цитати, Трибунал */
.form input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--inset); font-size: 15px; }
.form input + input { margin-top: 8px; }
.form .cap { display: block; margin-top: 8px; }
.case.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.case.row > div { min-width: 0; overflow-wrap: anywhere; }
.btn.del { flex: none; min-width: 44px; }
.quote { font-family: var(--serif); font-size: 16px; white-space: pre-wrap; }
.btn[aria-disabled="true"] { opacity: .55; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--inset); padding: 1px 5px; border-radius: 6px; }
.rank { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank b { font-family: var(--serif); font-size: 20px; color: var(--gold2); }
.set .btn.small { flex: none; white-space: nowrap; }
