/* Вікно 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; }

/* Панель — сторінка сайту у вбудованому кадрі (dashboard?app=1); висоту ставить fitFrame() */
.dash-frame { display: block; width: 100%; min-height: 320px; border: 0; border-radius: 14px; background: #10131A; color-scheme: dark; }

/* Головна панелі (04.12): група, «чекає рішення», швидкий доступ плитками; розділ — з кнопкою «Назад» і поясненням */
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; }
.chat-head b { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.chat-head .cap { display: block; margin-top: 3px; }
.role { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); color: var(--soft); }
.role.admin { color: var(--gold2); border-color: var(--gold); background: var(--goldbg); }
.attn { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(232, 96, 96, .55); background: rgba(232, 96, 96, .12); color: var(--text); font-size: 20px; }
.attn b { display: block; font-size: 15px; line-height: 1.3; }
.attn .cap { display: block; }
.attn > span:nth-child(2) { flex: 1; min-width: 0; }
.go { flex: none; font-size: 24px; line-height: 1; color: var(--muted); }
.qgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qtile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 96px; padding: 12px 12px 11px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line2); border-radius: 16px; color: var(--text); }
.qtile .qi { font-size: 24px; line-height: 1; margin-bottom: 5px; }
.qtile b { font-size: 15px; line-height: 1.25; }
.qs { font-size: 13px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.qtile.hot { border-color: rgba(232, 96, 96, .6); }
.qtile.hot .qs { color: #F0A0A0; font-weight: 600; }
.qtile:active, .qwide:active, .attn:active { transform: scale(.98); }
.qwide { width: 100%; margin-top: 14px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 14px; cursor: pointer;
  background: var(--goldbg); border: 1px solid var(--gold); border-radius: 16px; color: var(--text); }
.qwide .qi { font-size: 24px; line-height: 1; }
.qwide > span:nth-child(2) { flex: 1; min-width: 0; }
.qwide b { display: block; font-size: 15px; color: var(--gold2); }
.qwide .qs { display: block; margin-top: 2px; }
.sec-head { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; }
.sec-head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.sec-head .cap { margin: 4px 0 0; }
.back { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.section.full { padding-bottom: 0; }
.tts-light .qtile.hot .qs { color: var(--red); }
.tts-light .attn { background: rgba(179, 58, 48, .08); border-color: rgba(179, 58, 48, .45); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line2); }
.side { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; }
.side.on { background: var(--card); color: var(--text); box-shadow: 0 1px 0 var(--line); }
