/* aaron — 공용 스타일.
   톤: frac 의 시각 언어(Pretendard · 쿨 그레이 캔버스 · 헤어라인 · 인디고 포인트).
   운영자 화면 = 어두운 사이드바 + 흰 작업 영역, 청중·로그인 = 웹 스타일(각진 모서리, 검은 알약 버튼).
   간격은 4/8px 격자, 모서리는 4 · 6 · 8 · 12 네 단계만 쓴다. */

:root {
  --ink: #131414;
  --ink-2: #3d3f3f;
  --ink-soft: #5f6363;
  --faint: #8f9393;
  --bg: #fafcfc;
  --bg-soft: #eef4f4;
  --card: #ffffff;
  --line: #e1e6e6;
  --chip: #dde4e4;
  --accent: #6266f0;
  --accent-strong: #4f53de;
  --accent-ink: #ffffff;
  --accent-soft: #eceefe;
  --ok: #12805a;
  --ok-soft: #e3f6ee;
  --warn: #d6453d;
  --warn-soft: #fdeceb;
  --amber: #e0902a;
  --amber-soft: #fdf3e2;
  --side: #1f2532;
  --side-hover: #2a3142;
  --side-active: #363e55;
  --side-line: #303850;
  --side-ink: #c4cad8;
  --r-xs: 4px;
  --r-sm: 6px;
  --radius: 8px;
  --r-lg: 12px;
  --shadow-1: 0 1px 2px rgba(19, 20, 20, .04);
  --shadow-2: 0 10px 30px rgba(19, 20, 20, .12), 0 2px 6px rgba(19, 20, 20, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
/* 어두운 테마: 청중 화면(body.aud)은 기기 설정을 따르고, data-theme 으로 고정할 수도 있다.
   view.js 의 테마 버튼이 --bg 가 '#1' 로 시작하는지 보고 다크 여부를 판단하므로 --bg 는 #1xxxxx 로 둔다. */
:root[data-theme='dark'] {
  --ink: #f2f5f5; --ink-2: #d3d8d8; --ink-soft: #a3a8a8; --faint: #7f8484;
  --bg: #131414; --bg-soft: #1d1f1f; --card: #1a1c1c; --line: #2b2f2f; --chip: #2b2f2f;
  --accent: #8b8ef5; --accent-strong: #a3a6f8; --accent-ink: #131414; --accent-soft: #25264a;
  --ok: #4cc79a; --ok-soft: #173126; --warn: #ff7a70; --warn-soft: #3a1d1b; --amber: #f0a64a; --amber-soft: #33270f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']):has(body.aud) {
    --ink: #f2f5f5; --ink-2: #d3d8d8; --ink-soft: #a3a8a8; --faint: #7f8484;
    --bg: #131414; --bg-soft: #1d1f1f; --card: #1a1c1c; --line: #2b2f2f; --chip: #2b2f2f;
    --accent: #8b8ef5; --accent-strong: #a3a6f8; --accent-ink: #131414; --accent-soft: #25264a;
    --ok: #4cc79a; --ok-soft: #173126; --warn: #ff7a70; --warn-soft: #3a1d1b; --amber: #f0a64a; --amber-soft: #33270f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { line-height: 1.55; font-weight: 500; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
small, .muted { color: var(--ink-soft); font-weight: 500; }
.hint { font-size: .8rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.error { color: var(--warn); font-weight: 600; font-size: .85rem; }
.hint.count { margin-top: 6px; font-variant-numeric: tabular-nums; }
.hint.count.over { color: var(--warn); font-weight: 600; }
.error:empty { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* ── 폼 요소 ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
label, .lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: -.005em; }
label small, .lbl small { font-weight: 500; color: var(--faint); }
input[type='text'], input[type='password'], input[type='tel'], select, textarea {
  width: 100%; font: inherit; font-size: .9rem; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; min-height: 38px;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: #c9d1d1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
select {
  appearance: none; padding-right: 32px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238f9393' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select:disabled, input:disabled { background-color: var(--bg-soft); color: var(--faint); cursor: not-allowed; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--accent); }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  font: inherit; font-size: .85rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; white-space: nowrap;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--r-sm); padding: 8px 14px; min-height: 36px; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .06s;
}
button svg, .btn svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button:hover:not(:disabled), .btn:hover { text-decoration: none; background: var(--bg-soft); border-color: #c9d1d1; }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
button.danger { background: var(--warn); border-color: var(--warn); color: #fff; }
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--warn) 88%, #000); border-color: transparent; }
button.ink, .btn.ink { background: var(--ink); border-color: var(--ink); color: var(--bg); border-radius: 999px; padding: 12px 26px; font-size: .95rem; }
button.ink:hover:not(:disabled), .btn.ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--bg-soft); border-color: transparent; color: var(--ink); }
button.sm, .btn.sm { min-height: 30px; padding: 5px 10px; font-size: .78rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 6px 11px; min-height: 34px; cursor: pointer; user-select: none; background: var(--card);
  font-size: .85rem; font-weight: 600; color: var(--ink-2); transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { border-color: #c9d1d1; background: var(--bg-soft); }
.chip input { margin: 0; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; line-height: 1;
  padding: 5px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); white-space: nowrap;
}
.pill.ok::before, .pill.warn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pill.ok::before { background: var(--ok); }
.pill.warn::before { background: var(--amber); }
.pill.ok, .pill.warn { color: var(--ink-2); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* ── 앱 셸: 어두운 사이드바 + 작업 영역 (채널 목록 · 새 채널 · 채널 · 단체 설정 · 운영자) ── */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  background: var(--side); color: var(--side-ink); padding: 20px 12px 14px; scrollbar-width: thin; scrollbar-color: var(--side-line) transparent;
}
.side :focus-visible { outline-color: #a9b0ff; }
.brand { padding: 4px 10px 20px; display: flex; align-items: center; }
.brand img { height: 24px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.nav-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: #7f88a0; padding: 16px 10px 6px; font-variant-numeric: tabular-nums; }
.menus { display: contents; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); min-height: 34px;
  font-size: .83rem; font-weight: 600; color: var(--side-ink); min-width: 0; transition: background .12s, color .12s;
}
.nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav svg, .ico svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* 단체 고르기: 메뉴 맨 위. 누르면 내 단체 목록 + «새 단체» */
.orgsw { margin: 0 0 8px; border: 1px solid var(--side-line); border-radius: var(--radius); background: color-mix(in srgb, var(--side-hover) 55%, transparent); }
.orgsw summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; padding: 8px 10px; cursor: pointer; border-radius: 7px; }
.orgsw summary::-webkit-details-marker { display: none; }
.orgsw summary:hover { background: var(--side-hover); }
.orgsw summary .k { grid-column: 1 / -1; font-size: .66rem; font-weight: 700; letter-spacing: .06em; color: #7f88a0; }
.orgsw summary b { font-size: .86rem; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orgsw summary svg { width: 16px; height: 16px; fill: none; stroke: #8d96ad; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s var(--ease); }
.orgsw[open] summary svg { transform: rotate(180deg); }
.orglist { display: flex; flex-direction: column; gap: 1px; padding: 4px; border-top: 1px solid var(--side-line); }
.orglist a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 5px; font-size: .8rem; font-weight: 600; color: var(--side-ink); min-width: 0; }
.orglist a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orglist a i { font-style: normal; font-size: .66rem; color: #8d96ad; flex: none; }
.orglist a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.orglist a.on { background: var(--side-active); color: #fff; }
.orglist a.add { color: #a9b0ff; }
/* 단계 한도에 닿아 더 만들 수 없을 때: 눌리지 않게 하고 이유를 바로 아래에 */
.orglist .add.off { padding: 7px 8px; font-size: .8rem; font-weight: 600; color: #6f7890; cursor: not-allowed; }
.orglist .add.off small { display: block; margin-top: 4px; font-size: .7rem; font-weight: 500; line-height: 1.45; color: #8d96ad; white-space: normal; }
.btn.off { opacity: .5; cursor: not-allowed; pointer-events: none; }
.limit-note { font-size: .8rem; color: var(--ink-soft); }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; margin-top: 8px; border-top: 1px solid var(--side-line); min-width: 0; }
.me .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--side-active); color: #fff; display: grid; place-items: center; flex: none; }
.me .avatar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.me .who { min-width: 0; flex: 1; line-height: 1.3; }
.me .who b { display: block; font-size: .8rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.me .who a { font-size: .72rem; color: #8d96ad; font-weight: 600; }
.me .who a:hover { color: #fff; }

.main { min-width: 0; padding: 32px 40px 72px; background: var(--bg); }
.main > * { max-width: 1280px; }
.page-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 24px; min-height: 40px; }
.page-head h1 { font-size: 1.6rem; letter-spacing: -.03em; margin: 0; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.page-head .sub { order: 3; flex-basis: 100%; font-size: .82rem; color: var(--ink-soft); margin: 0; font-weight: 500; line-height: 1.6; }
.page-head .sub #updated { color: var(--faint); font-variant-numeric: tabular-nums; }
.page-head .crumb { order: -1; flex-basis: 100%; margin: 0 0 -2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--ink); }
.crumb i { font-style: normal; color: var(--chip); }
.crumb b { font-weight: 600; color: var(--faint); }
.page-head .tools { order: 2; margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h3 { font-size: .9rem; letter-spacing: -.01em; margin: 0 0 .6em; }
h3 .hint { font-weight: 500; margin-left: 4px; }
.main .card > h3:first-child { margin-bottom: 12px; }
.codechip { font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 3px 7px; line-height: 1.2; white-space: nowrap; }

/* ── 새 채널 · 단체 설정 ── */
body.p-new .main > * { max-width: 800px; }
body.p-new form.card { padding: 4px 24px 24px; }
.field { padding: 20px 0 0; }
.field + .field { border-top: 1px solid var(--line); margin-top: 20px; }
.field > label:first-child, .field > .lbl:first-child { font-size: .88rem; color: var(--ink); font-weight: 700; margin-bottom: 8px; }
.field > label:first-child small, .field > .lbl:first-child small { display: block; margin-top: 2px; font-size: .78rem; color: var(--ink-soft); line-height: 1.5; }
.field .hint { margin-top: 8px; }
.field input[type='password'], .field select, .field input[type='text'] { max-width: 520px; }
.field .row > input.grow { max-width: 420px; }
.field .chips + input { margin-top: 10px; }
.field.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field.actions button.primary { min-height: 42px; padding: 10px 20px; font-size: .92rem; }
.addrow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.addrow .grow { min-width: 220px; max-width: 360px; }
.addrow button { min-height: 38px; }
.addrow + .error { display: block; margin-top: 10px; }
.status { order: 4; flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; font-size: .85rem; }

/* ── 채널 목록 · 채널 (index · channel) ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: flex; gap: 14px; align-items: center; padding: 16px 18px; min-width: 0; }
.tile > div { min-width: 0; }
.tile .ico { width: 40px; height: 40px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex: none; }
.tile .ico svg { width: 18px; height: 18px; }
.tile .k { font-size: .75rem; color: var(--ink-soft); font-weight: 600; }
.tile .v { font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.tile .s { font-size: .72rem; color: var(--faint); margin-top: 1px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .s:empty { display: none; }
.tiles:empty { display: none; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); min-height: 52px; }
.card-head h3 { margin: 0; }
.card-head .legend { margin: 0 0 0 auto; padding: 0; }
.tablewrap { overflow-x: auto; }
table.rooms { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
table.rooms th { text-align: left; font-weight: 600; font-size: .72rem; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: .01em; background: color-mix(in srgb, var(--bg-soft) 40%, transparent); }
table.rooms td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.rooms th:first-child, table.rooms td:first-child { padding-left: 20px; }
table.rooms th:last-child, table.rooms td:last-child { padding-right: 20px; }
.card:not(.flush) > .tablewrap table.rooms th:first-child, .card:not(.flush) > .tablewrap table.rooms td:first-child { padding-left: 8px; }
.card:not(.flush) > .tablewrap table.rooms th { background: none; }
table.rooms tbody tr:last-child td { border-bottom: 0; }
table.rooms tbody tr { transition: background .1s; }
table.rooms tbody tr:hover td { background: color-mix(in srgb, var(--bg-soft) 50%, transparent); }
table.rooms tbody tr:has(.empty-row):hover td, table.rooms tbody tr:has(.empty-state):hover td { background: none; }
table.rooms .num { text-align: right; }
table.rooms td.num { color: var(--ink-2); }
table.rooms td.num b { color: var(--ink); font-weight: 700; }
table.rooms td.name { white-space: normal; min-width: 200px; font-weight: 600; }
table.rooms td.name a { color: var(--ink); }
table.rooms td.name a:hover { color: var(--accent-strong); }
table.rooms tr.old td { color: var(--faint); }
.code { font-family: var(--mono); font-size: .7rem; color: var(--faint); font-weight: 500; margin-left: 6px; letter-spacing: .03em; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: var(--r-xs); background: var(--bg-soft); color: var(--ink-soft); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
td > .tag:first-child, #state > .tag { margin-left: 0; }
.tag.live { background: var(--ok-soft); color: var(--ok); }
.tag.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
.split { height: 4px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; display: flex; width: 140px; max-width: 100%; }
.split i { display: block; height: 100%; }
.split .stt { background: var(--accent); }
.split .llm { background: #aab6b6; }
.legend { font-size: .72rem; color: var(--ink-soft); display: flex; gap: 14px; align-items: center; margin-bottom: 4px; padding: 0 2px; }
.legend b { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.legend .stt { background: var(--accent); }
.legend .llm { background: #aab6b6; }
.note { font-size: .78rem; color: var(--ink-soft); margin: 16px 0 0; line-height: 1.7; max-width: 82ch; }
td.go { text-align: right; }
td.go a { margin-left: 14px; font-weight: 600; font-size: .8rem; }
td.go a:first-child { margin-left: 0; }
td.go.files { text-align: left; }
td.go.files a { margin: 0 12px 0 0; }
td.go button { padding: 4px 10px; font-size: .76rem; min-height: 30px; }
table.rooms td select { width: auto; padding: 5px 30px 5px 9px; font-size: .8rem; min-height: 32px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.kv { width: 100%; border-collapse: collapse; font-size: .84rem; margin: 0 0 12px; }
.kv th { text-align: left; font-weight: 500; color: var(--ink-soft); white-space: nowrap; padding: 9px 24px 9px 0; vertical-align: top; width: 1%; }
.kv td { padding: 9px 0; font-weight: 600; }
.kv tr + tr th, .kv tr + tr td { border-top: 1px solid var(--line); }
.empty-row { padding: 48px 20px !important; text-align: center; color: var(--faint); white-space: normal !important; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; white-space: normal; }
.empty-state .ico { width: 44px; height: 44px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; margin-bottom: 8px; }
.empty-state .ico svg { width: 20px; height: 20px; }
.empty-state b { font-size: .95rem; color: var(--ink); font-weight: 700; }
.empty-state p { margin: 0 0 10px; font-size: .84rem; color: var(--ink-soft); max-width: 46ch; line-height: 1.6; font-weight: 500; }
.skel { display: inline-block; height: .8em; width: 100%; max-width: 120px; border-radius: 4px; background: linear-gradient(90deg, var(--bg-soft) 25%, color-mix(in srgb, var(--bg-soft) 40%, var(--card)) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .3; } }

.qr { width: 100%; max-width: 210px; aspect-ratio: 1; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.qr img { width: 100%; height: 100%; display: block; }
.url { font-size: .76rem; word-break: break-all; text-align: center; font-family: var(--mono); letter-spacing: -.01em; }
.copyrow { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: 3px 3px 3px 10px; min-width: 0; }
.copyrow a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .74rem; color: var(--ink-2); }
.copyrow button { flex: none; }

/* 채널 지우기 (되돌릴 수 없는 동작) */
.card.danger { border-color: color-mix(in srgb, var(--warn) 28%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 30%, var(--card)); }
.card.danger h3 { color: #b42318; }
.btn.danger { background: var(--card); color: #b42318; border: 1px solid #e8b4b4; }
.btn.danger:hover:not(:disabled) { background: #b42318; color: #fff; border-color: #b42318; }
.btn.danger.solid:not(:disabled) { background: #b42318; color: #fff; border-color: #b42318; }
.btn.danger:disabled { opacity: .5; cursor: not-allowed; }
.confirm { margin-top: 14px; padding-top: 14px; border-top: 1px dashed color-mix(in srgb, var(--warn) 30%, var(--line)); }
.confirm input { max-width: 320px; }

/* ── 운영자 콘솔 (op) ── */
body.p-op .main { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 14px; }
body.p-op .main > * { max-width: none; }
.op-head { display: flex; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.op-title { min-width: 0; flex: 1 1 240px; }
.op-title .crumb { margin: 0 0 2px; display: flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; color: var(--ink-soft); }
.op-title .line1 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.op-title h1 { font-size: 1.35rem; letter-spacing: -.03em; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 상태 막대: 음성인식 · 회차 · 시청자 · 번역 — 미사 중에 한눈에 */
.statusbar { display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); min-width: 0; }
.statusbar .seg { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 8px 16px; min-width: 0; }
.statusbar .seg + .seg { border-left: 1px solid var(--line); }
.statusbar .k { font-size: .66rem; font-weight: 700; letter-spacing: .05em; color: var(--faint); line-height: 1; white-space: nowrap; }
.statusbar .v { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 700; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 20px; }
.statusbar .v small { font-size: .74rem; color: var(--ink-soft); font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.statusbar .v small:empty { display: none; }
.statusbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip); flex: none; }
.seg.stt { min-width: 168px; }
.seg.stt[data-state='connecting'] .dot { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.seg.stt[data-state='listening'] .dot { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: ring 1.6s ease-out infinite; }
.seg.stt[data-state='listening'] #sttLabel { color: var(--ok); }
.seg.stt[data-state='error'] .dot { background: var(--warn); }
.seg.stt[data-state='error'] #sttLabel { color: var(--warn); }
.seg.stt[data-state='manual'] .dot { background: var(--accent); }
.seg.stt[data-state='reconnecting'] .dot { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.seg.stt[data-state='reconnecting'] #sttLabel { color: var(--amber); }
.seg.stt[data-state='resting'] .dot { background: var(--faint); }
@keyframes ring { 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.meter { height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--ok) 0 70%, var(--amber) 88%, var(--warn)); background-size: 100% 100%; border-radius: 99px; transition: width .08s linear; }
.statusbar .meter { flex: 1; min-width: 56px; height: 5px; }
#sessState.on { color: var(--ink); }
#sessTimer { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
#trHealth[data-state='slow'] { color: var(--amber); }
#trHealth[data-state='err'] { color: var(--warn); }

/* 알림 (오류 · 완료): 눈에 띄고, 닫을 수 있게 */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts:empty { display: none; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); background: var(--warn-soft); color: #8a1f17; font-size: .86rem; font-weight: 600; line-height: 1.5; animation: drop .22s var(--ease); }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alert button { min-height: 26px; width: 26px; padding: 0; background: transparent; border-color: transparent; color: inherit; opacity: .7; }
.alert button:hover:not(:disabled) { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; opacity: 1; }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); color: var(--ok); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.op-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr) 332px; gap: 14px; align-items: start; }
.op-grid > * { min-width: 0; }
.op-grid .card { padding: 16px; }
.op-grid h3 { margin-bottom: 12px; }
.op-grid .card.stack > * + * { margin-top: 12px; }
.big-btn { width: 100%; min-height: 48px; padding: 12px; font-size: 1rem; border-radius: var(--radius); gap: 8px; }
.big-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.sessbox { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px !important; display: grid; gap: 8px; }
.sessbox button { width: 100%; }

/* 실시간 자막: 받아 적는 중 → 번역 중 → 나감 */
.logcard { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 440px; padding: 0 !important; overflow: hidden; }
.loghead { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.loghead h3 { margin: 0; white-space: nowrap; }
.loghead .count { font-size: .74rem; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.langtabs { margin-left: auto; display: flex; gap: 2px; padding: 3px; background: var(--bg-soft); border-radius: var(--radius); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.langtabs::-webkit-scrollbar { display: none; }
.langtabs button { min-height: 28px; padding: 4px 10px; font-size: .78rem; border: 0; background: transparent; color: var(--ink-soft); border-radius: var(--r-sm); flex: none; }
.langtabs button:hover:not(:disabled) { background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--ink); }
.langtabs button[aria-checked='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(19, 20, 20, .1); }
.logwrap { position: relative; flex: 1; min-height: 0; display: flex; }
.log { flex: 1; overflow-y: auto; padding: 4px 0 20px; overscroll-behavior: contain; scrollbar-width: thin; }
.log:focus-visible { outline-offset: -2px; }
.log-empty { display: grid; justify-items: center; align-content: center; gap: 6px; height: 100%; min-height: 260px; padding: 24px; text-align: center; color: var(--ink-soft); }
.log-empty .wave { display: flex; align-items: center; gap: 4px; height: 36px; margin-bottom: 8px; }
.log-empty .wave i { width: 4px; border-radius: 2px; background: var(--chip); }
.log-empty .wave i:nth-child(1) { height: 12px; } .log-empty .wave i:nth-child(2) { height: 30px; } .log-empty .wave i:nth-child(3) { height: 20px; } .log-empty .wave i:nth-child(4) { height: 34px; } .log-empty .wave i:nth-child(5) { height: 14px; }
.log-empty b { font-size: .95rem; color: var(--ink); }
.log-empty p { margin: 0; font-size: .84rem; max-width: 42ch; line-height: 1.6; }

.line { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 0 12px; padding: 14px 16px 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
#lines .line:last-child { border-bottom-color: transparent; }
.line.enter { animation: lineIn .32s var(--ease); }
@keyframes lineIn { from { opacity: 0; transform: translateY(6px); background: var(--accent-soft); } }
.line .gut { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; font-family: var(--mono); font-size: .68rem; color: var(--faint); line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line .gut b { font-weight: 600; color: var(--ink-soft); }
.line .body { min-width: 0; }
.line .src { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.5; letter-spacing: -.015em; word-break: keep-all; overflow-wrap: anywhere; }
.trs { display: grid; gap: 4px; margin-top: 8px; }
.trs:empty { display: none; }
.trrow { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.trrow .lb { font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: var(--accent-strong); background: var(--accent-soft); border-radius: var(--r-xs); padding: 3px 0; text-align: center; line-height: 1; transform: translateY(-1px); }
.trrow .tx { font-size: .95rem; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; animation: fadeIn .28s ease both; }
.trs.one .trrow .tx { font-size: 1.04rem; }
.trrow.miss .tx { color: var(--faint); }
.trrow.err .lb { color: var(--warn); background: var(--warn-soft); }
.trrow.err .tx { color: var(--warn); font-size: .84rem; font-weight: 600; }
.trrow .bar { height: .8em; border-radius: 4px; align-self: center; background: linear-gradient(90deg, var(--bg-soft) 25%, color-mix(in srgb, var(--accent-soft) 70%, var(--card)) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes fadeIn { from { opacity: 0; } }
.line .act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; }
.line .st { font-size: .7rem; font-weight: 600; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.6; display: inline-flex; align-items: center; gap: 5px; }
.line .st::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.line[data-st='translating'] .st { color: var(--accent-strong); }
.line[data-st='translating'] .st::before { animation: pulse 1s ease-in-out infinite; }
.line[data-st='slow'] .st { color: var(--amber); }
.line[data-st='error'] .st { color: var(--warn); }
.line .edit { min-height: 26px; padding: 2px 8px; font-size: .72rem; background: transparent; border-color: transparent; color: var(--faint); opacity: 0; }
.line:hover .edit, .line .edit:focus-visible { opacity: 1; }
.line .edit:hover:not(:disabled) { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
@media (hover: none) { .line .edit { opacity: 1; } }
.log.noedit .edit { display: none; }
.line.editing { background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.line.editing .src, .line.editing .edit { display: none; }
.editor textarea { min-height: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.5; resize: none; overflow: hidden; }
.editor { margin-bottom: 4px; }
.editor .row { margin-top: 8px; }
.line.editing .trs { opacity: .55; }
.editor .row .hint { margin-left: 4px; font-size: .74rem; }
kbd { font-family: var(--mono); font-size: .7rem; font-weight: 600; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--card); color: var(--ink-soft); }
/* 받아 적는 중인 말: 늘 맨 아래 */
.line.live { border-bottom: 0; border-top: 1px dashed var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--bg-soft) 55%, transparent), transparent); }
#lines:empty + .line.live { border-top: 0; }
.line.live .gut { color: var(--ok); font-family: var(--font); font-weight: 700; font-size: .7rem; flex-direction: row; align-items: center; gap: 6px; padding-top: 7px; }
.line.live .gut i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.2s ease-in-out infinite; }
.line.live .src { font-weight: 500; font-style: italic; color: var(--ink-soft); }
.line.live.idle .src { color: var(--faint); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.16em; background: var(--accent); border-radius: 1px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.newpill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); border-radius: 999px; background: var(--ink); border-color: var(--ink); color: var(--bg); padding: 7px 14px; min-height: 34px; font-size: .8rem; box-shadow: var(--shadow-2); animation: drop .2s var(--ease); z-index: 2; }
.newpill:hover:not(:disabled) { background: var(--ink-2); border-color: var(--ink-2); }
.newpill b { font-variant-numeric: tabular-nums; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); background: var(--bg); }
.composer textarea { min-height: 42px; height: 42px; max-height: 140px; resize: none; }
.composer button { min-height: 42px; }

/* 오른쪽 패널: 공유 · 번역 설정 · 회차·비용 */
.panel { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; gap: 2px; flex: none; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 0; padding: 12px 6px 11px; min-height: 44px; font-size: .82rem; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover:not(:disabled) { background: none; color: var(--ink); }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button:active:not(:disabled) { transform: none; }
.tabpane { overflow-y: auto; scrollbar-width: thin; }
.tabpane > section { padding: 16px; display: grid; gap: 10px; }
.tabpane > section + section { border-top: 1px solid var(--line); }
.tabpane h4 { font-size: .82rem; margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tabpane h4 .hint { font-weight: 500; font-size: .74rem; }
.tabpane label { margin-bottom: -4px; }
.tabpane textarea { min-height: 84px; font-size: .84rem; }
.tabpane .qr { max-width: 176px; }
.stats { font-size: .74rem; color: var(--faint); line-height: 1.6; font-variant-numeric: tabular-nums; }
.stats:empty { display: none; }
.cost { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.cost td { padding: 4px 0; vertical-align: top; }
.cost td:first-child { white-space: nowrap; padding-right: 12px; font-weight: 600; }
.cost td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.cost td:only-child { text-align: left; font-weight: 500; }
.cost .sub td { font-size: .72rem; color: var(--faint); font-weight: 500; padding-top: 0; white-space: normal; }
.cost .total td { border-top: 1px solid var(--line); padding-top: 8px; font-size: .95rem; }
.cost .muted { color: var(--ink-soft); font-weight: 500; font-size: .76rem; }
#downloads { gap: 6px; }
#downloads .pill { background: var(--card); border: 1px solid var(--line); color: var(--ink-2); padding: 7px 10px; border-radius: var(--r-sm); }
#downloads .pill::before { content: '↓'; color: var(--faint); font-weight: 700; }
#downloads .pill:hover { background: var(--bg-soft); text-decoration: none; }

/* 넓은 창에서는 콘솔이 창 높이에 꼭 맞고, 자막 칸만 스크롤한다 */
@media (min-width: 901px) and (min-height: 561px) {
  body.p-op .main { height: 100vh; padding-bottom: 20px; overflow: hidden; }
  body.p-op .op-grid { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  body.p-op .inputcol { overflow-y: auto; scrollbar-width: thin; align-self: stretch; }
  body.p-op .logcard { height: auto; min-height: 0; }
  body.p-op .panel { min-height: 0; }
  body.p-op .tabpane { flex: 1; min-height: 0; }
}
@media (min-width: 901px) and (max-width: 1280px) and (min-height: 561px) {
  body.p-op .op-grid { grid-template-columns: 296px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  body.p-op .inputcol { grid-column: 1; grid-row: 1; overflow: visible; }
  body.p-op .panel { grid-column: 1; grid-row: 2; }
  body.p-op .logcard { grid-column: 2; grid-row: 1 / 3; }
  body.p-op .inputcol .hint#sttHint { display: none; }
}

/* ── 로그인 (웹 스타일) ── */
body.p-login { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg); }
.web-top { padding: 24px 32px; }
.web-top .brand { padding: 0; }
.web-top .brand img { height: 28px; }
.web-main { flex: 1; display: grid; align-items: center; justify-items: center; padding: 0 20px 12vh; }
.web-card { width: 100%; max-width: 420px; }
.web-card h1 { font-size: 2.6rem; letter-spacing: -.035em; margin-bottom: 12px; }
.web-card .lede { color: var(--ink-soft); margin: 0 0 24px; font-size: .95rem; line-height: 1.65; }
.web-card .lede q { quotes: none; }
.web-card .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--accent-strong); margin: 0 0 12px; }
.web-card .eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.web-card form, .web-card .authbox { border: 1px solid var(--line); border-radius: 3px; background: var(--card); padding: 24px; box-shadow: var(--shadow-1); }
.web-card input[type='tel'], .web-card input[type='text'] { font-size: 1.1rem; padding: 12px 13px; border-radius: 3px; letter-spacing: .01em; min-height: 48px; }
.web-card form .row { margin-top: 16px; gap: 12px; }
.auth-lead { margin: 0; font-size: .95rem; line-height: 1.65; }
.auth-code { font-family: var(--mono); font-size: 2.6rem; font-weight: 700; letter-spacing: .18em; text-align: center; padding: 14px 0; border-radius: 3px; background: var(--bg-soft); color: var(--ink); font-variant-numeric: tabular-nums; user-select: all; }
.auth-code.off { opacity: .35; text-decoration: line-through; }
.authbox .btn.ink { display: flex; justify-content: center; width: 100%; min-height: 48px; font-size: 1.05rem; }
.auth-qr { text-align: center; }
.auth-qr .hint { margin-top: 8px; }
.auth-bar { height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.auth-bar > div { height: 100%; width: 100%; background: var(--accent); border-radius: 99px; transition: width 1s linear; }

/* ── 청중 화면 (view): 어두운 성당에서도 편하게 ── */
body.aud { height: 100vh; height: 100dvh; overflow: hidden; position: relative; }
.vbar {
  position: absolute; inset: 0 0 auto 0; z-index: 4; display: flex; gap: 6px; align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: transform .32s var(--ease), opacity .32s;
}
body.reading .vbar { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.vhandle { position: absolute; top: calc(6px + env(safe-area-inset-top)); left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--ink); opacity: 0; z-index: 3; transition: opacity .3s; pointer-events: none; }
body.reading .vhandle { opacity: .16; }
.vname { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.vname .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip); flex: none; transition: background .3s; }
body.on-air .vname .dot { background: var(--ok); animation: pulse 1.8s ease-in-out infinite; }
.vbar .name { font-weight: 700; letter-spacing: -.02em; font-size: .98rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.vbar select { width: auto; max-width: 38vw; min-height: 40px; padding: 8px 30px 8px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600; background-color: var(--card); }
.vbtn { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; flex: none; border-radius: 50%; background: transparent; border-color: transparent; color: var(--ink); }
.vbtn svg { width: 20px; height: 20px; }
.vbtn .aa { font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.vbtn .aa span:first-child { font-size: .8rem; } .vbtn .aa span:last-child { font-size: 1.1rem; }
.vbtn[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vbtn[aria-expanded='true'] { background: var(--bg-soft); }
.sheet { position: absolute; z-index: 5; top: calc(60px + env(safe-area-inset-top)); right: 10px; width: min(300px, calc(100vw - 20px)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 6px 16px; animation: drop .2s var(--ease); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: .9rem; font-weight: 600; min-height: 56px; }
.srow + .srow { border-top: 1px solid var(--line); }
.sizes { display: flex; gap: 2px; padding: 3px; background: var(--bg-soft); border-radius: var(--radius); }
.sizes button { width: 40px; height: 34px; min-height: 0; padding: 0; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--ink-soft); font-weight: 700; line-height: 1; }
.sizes button[aria-checked='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.voicepick { display: flex; align-items: center; gap: 4px; min-width: 0; }
.voicepick select { width: 100%; max-width: 160px; min-height: 36px; padding: 6px 28px 6px 10px; background-position: right 9px center; font-size: .84rem; font-weight: 600; }
.voicepick .vbtn { width: 36px; height: 36px; min-height: 36px; }
.voicepick .vbtn svg { width: 16px; height: 16px; fill: currentColor; }
.voicepick .vbtn[data-playing] { background: var(--bg-soft); color: var(--accent); }
.rates button { width: auto; padding: 0 10px; font-size: .8rem; }
.switch { width: 46px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; border: 0; background: var(--chip); position: relative; flex: none; transition: background .18s; }
.switch:hover:not(:disabled) { background: var(--chip); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.switch[aria-checked='true'], .switch[aria-checked='true']:hover:not(:disabled) { background: var(--accent); }
.switch[aria-checked='true']::after { transform: translateX(18px); }

#captions {
  height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: calc(72px + env(safe-area-inset-top)) 22px calc(96px + env(safe-area-inset-bottom));
  font-size: var(--fs, 1.4rem); display: flex; flex-direction: column;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 calc(84px + env(safe-area-inset-top))); mask-image: linear-gradient(180deg, transparent 0, #000 calc(84px + env(safe-area-inset-top)));
}
#captions::-webkit-scrollbar { display: none; }
#caplist { margin-top: auto; max-width: 34em; width: 100%; align-self: center; }
.cap { margin: 0; padding: .42em 0; color: var(--ink-soft); line-height: 1.58; letter-spacing: -.012em; font-weight: 600; overflow-wrap: anywhere; text-wrap: pretty; transition: color .5s ease; max-width: 34em; width: 100%; align-self: center; }
:lang(ko) .cap { word-break: keep-all; }
:lang(ja) .cap, :lang(zh) .cap, :lang(zh-Hant) .cap { line-height: 1.7; letter-spacing: 0; }
.cap.prev { color: var(--ink-2); }
.cap.latest { color: var(--ink); }
.cap.enter { animation: capIn .45s var(--ease) both; }
@keyframes capIn { from { opacity: 0; transform: translateY(.5em); } }
.cap .orig { display: block; font-size: .62em; font-weight: 500; color: var(--faint); margin-top: .25em; letter-spacing: 0; line-height: 1.5; }
.cap.partial { color: var(--faint); }
.cap.partial::after { content: ''; display: inline-block; width: .12em; height: 1em; margin-left: .18em; vertical-align: -.14em; background: var(--accent); border-radius: 1px; animation: blink 1s steps(2, start) infinite; }
.empty { margin: auto; text-align: center; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; padding: 0 12px 6vh; max-width: 22em; }
.empty p { margin: 0; text-wrap: balance; }
.empty .wave { display: flex; justify-content: center; align-items: center; gap: 5px; height: 40px; margin-bottom: 20px; }
.empty .wave i { width: 5px; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: center; animation: wave 1.5s ease-in-out infinite; }
.empty .wave i:nth-child(1) { animation-delay: -.9s; } .empty .wave i:nth-child(2) { animation-delay: -.3s; } .empty .wave i:nth-child(3) { animation-delay: -.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
.empty.gone .wave i { animation: none; transform: scaleY(.3); background: var(--chip); opacity: 1; }
.jump { position: absolute; z-index: 3; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--ink); border-color: var(--ink); color: var(--bg); font-size: .9rem; box-shadow: var(--shadow-2); }
.jump:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.jump.show { display: inline-flex; animation: drop .2s var(--ease); }
.offline { position: absolute; z-index: 6; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -8px); display: inline-flex; align-items: center; gap: 8px; background: var(--card); color: var(--ink-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); border-radius: 999px; font-size: .84rem; font-weight: 600; padding: 8px 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); white-space: nowrap; }
.offline::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.offline.show { opacity: 1; transform: translate(-50%, 0); }
body.reading .offline { top: calc(16px + env(safe-area-inset-top)); }
.offline.hint { top: calc(112px + env(safe-area-inset-top)); white-space: normal; width: max-content; max-width: calc(100% - 32px); border-radius: 14px; line-height: 1.4; }
.offline.hint::before { flex: none; animation: none; }
.offline.hint #hintOff { display: none; }
/* 붉은 경고: 🔊 를 켠 채 같은 기기에서 소리를 받는 중 (되먹임) */
.offline.hint.warn { flex-direction: column; align-items: stretch; gap: 12px; width: calc(100% - 32px); max-width: 460px; padding: 16px; border-radius: 16px; background: var(--warn); border-color: var(--warn); color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.5; text-align: center; }
.offline.hint.warn.show { pointer-events: auto; }
.offline.hint.warn::before { display: none; }
.offline.hint.warn #hintText::before { content: '⚠ '; }
.offline.hint.warn #hintOff { display: block; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 0; background: #fff; color: var(--warn); font-size: 1rem; font-weight: 800; cursor: pointer; }
body.reading .offline.hint { top: calc(64px + env(safe-area-inset-top)); }

/* ── 무대 화면 (stage): 멀리서도 읽히게 크고 대비 높게 ── */
body.stage {
  --u: min(1vh, 1.3vw); /* 가로 16:9 에선 1vh 그대로. 세로로 긴 창에서도 너무 작아지지 않게 폭 1.3% 까지 (넘치면 stage.html 의 fit() 이 줄인다) */
  height: 100vh; overflow: hidden; color: #fff; display: grid; grid-template-rows: minmax(0, 1fr) auto;
  padding: calc(5 * var(--u)) calc(7 * var(--u)) calc(3.4 * var(--u)); gap: calc(3 * var(--u));
  background: radial-gradient(120% 90% at 50% 100%, #14161c 0, #08090a 60%, #050606 100%); cursor: default;
}
#cols { display: grid; gap: calc(7 * var(--u)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); min-height: 0; }
.col { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.col + .col::before { content: ''; position: absolute; left: calc(-3.5 * var(--u)); top: calc(6 * var(--u)); bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, #2a2e36 30%, #2a2e36); }
.col .label { align-self: flex-start; flex: none; display: flex; align-items: center; gap: calc(1.2 * var(--u)); font-size: calc(1.9 * var(--u)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8e95a3; }
.col .label::before { content: ''; width: calc(2.4 * var(--u)); height: calc(.4 * var(--u)); border-radius: 2px; background: #8b8ef5; }
.col .flow { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
.col .flow > * { flex: none; overflow-wrap: anywhere; text-wrap: pretty; }
.col:lang(ko) .flow > * { word-break: keep-all; }
.col .prev { font-size: calc(var(--cur) * .62 * var(--fit, 1) * var(--scale, 1)); font-weight: 500; color: #7d8491; line-height: 1.42; margin-bottom: calc(2.4 * var(--u)); letter-spacing: -.01em; }
.col .prev:empty { display: none; }
.col .cur { font-size: calc(var(--cur) * var(--fit, 1) * var(--scale, 1)); font-weight: 700; line-height: 1.34; letter-spacing: -.022em; color: #fff; }
.col .frag { font-size: .55em; font-weight: 500; color: #7d8491; letter-spacing: -.01em; }
.col .cur.in { animation: stageIn .5s var(--ease) both; }
@keyframes stageIn { from { opacity: 0; transform: translateY(calc(1.6 * var(--u))); } }
.col .partial { font-size: calc(var(--cur) * .62 * var(--fit, 1) * var(--scale, 1)); color: #8e95a3; font-weight: 500; margin-top: calc(1.8 * var(--u)); line-height: 1.42; }
.col .partial:empty { display: none; }
.col .partial::after { content: ''; display: inline-block; width: .1em; height: .95em; margin-left: .2em; vertical-align: -.12em; background: #8b8ef5; animation: blink 1s steps(2, start) infinite; }
.col .dots { display: flex; gap: calc(.9 * var(--u)); margin-top: calc(2.2 * var(--u)); height: calc(1.2 * var(--u)); }
.col .dots i { width: calc(1.2 * var(--u)); height: calc(1.2 * var(--u)); border-radius: 50%; background: #8b8ef5; animation: pulse 1.1s ease-in-out infinite; }
.col .dots i:nth-child(2) { animation-delay: .18s; } .col .dots i:nth-child(3) { animation-delay: .36s; }
body.stage[data-n='1'] { --cur: calc(7.4 * var(--u)); padding-left: calc(12 * var(--u)); padding-right: calc(12 * var(--u)); }
body.stage[data-n='2'] { --cur: calc(5.4 * var(--u)); }
body.stage[data-n='3'] { --cur: calc(4.3 * var(--u)); }
body.stage[data-n='3'] #cols { gap: calc(5.6 * var(--u)); }
body.stage[data-n='3'] .col + .col::before { left: calc(-2.8 * var(--u)); }
.stage-wait { position: absolute; inset: 0 0 calc(22 * var(--u)) 0; display: grid; place-content: center; justify-items: center; gap: calc(1.6 * var(--u)); text-align: center; pointer-events: none; transition: opacity .5s; }
.stage-wait b { font-size: calc(6.4 * var(--u)); letter-spacing: -.03em; line-height: 1.2; }
.stage-wait span { font-size: calc(2.6 * var(--u)); color: #8e95a3; font-weight: 500; }
body.stage.has-lines .stage-wait { opacity: 0; }
body.stage:not(.has-lines) #cols { opacity: 0; }
body.stage footer { display: flex; align-items: center; gap: calc(2.6 * var(--u)); border-top: 1px solid #1f2329; padding-top: calc(2.6 * var(--u)); min-width: 0; }
body.stage footer img { height: calc(12 * var(--u)); width: calc(12 * var(--u)); background: #fff; padding: calc(.8 * var(--u)); border-radius: calc(.8 * var(--u)); flex: none; }
body.stage footer .txt { font-size: calc(2 * var(--u)); color: #8e95a3; line-height: 1.5; min-width: 0; display: grid; gap: calc(.3 * var(--u)); font-weight: 500; }
body.stage footer .txt b { color: #fff; font-size: calc(2.9 * var(--u)); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.stage footer .txt .u { font-family: var(--mono); color: #c7ccd6; font-size: calc(2.1 * var(--u)); letter-spacing: -.01em; }
body.stage footer .logo { height: calc(3.8 * var(--u)); width: auto; margin-left: auto; opacity: .85; background: none; padding: 0; border-radius: 0; }
.stage-msg { margin: 38vh auto 0; text-align: center; font: 600 3vh var(--font); color: #8f9393; }

/* ── 좁은 화면 ── */
@media (max-width: 1100px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .two .qr { margin: 0; }
  .two .url { text-align: left; }
}
/* 좁거나 낮은 창: 왼쪽 메뉴를 위쪽 한 줄로 (낮은 창에서 아래쪽 로그아웃이 화면 밖으로 밀리던 문제) */
@media (max-width: 900px), (max-height: 560px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; overflow: visible; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 10px 14px; }
  .brand { padding: 0 8px 0 0; }
  .orgsw { position: relative; margin: 0; }
  .orgsw summary { padding: 5px 9px; }
  .orgsw summary .k { display: none; }
  .orgsw summary b { max-width: 34vw; }
  .orglist { position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; min-width: 200px; background: var(--side); border: 1px solid var(--side-line); border-radius: 7px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
  .nav-label, .side .spacer { display: none; }
  .menus { display: flex; flex-wrap: nowrap; gap: 4px; order: 3; flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .menus::-webkit-scrollbar { display: none; }
  .nav { flex-direction: row; flex-wrap: nowrap; min-width: 0; flex: none; }
  .nav a { padding: 6px 10px; flex: none; }
  .nav a span { max-width: 38vw; }
  .nav a.sub { padding-left: 10px; }
  .nav-empty { display: none; }
  .me { border-top: 0; margin: 0 0 0 auto; padding: 0; }
  .me .avatar { display: none; }
  .me .who b { display: inline; margin-right: 8px; }
  .me .who { display: flex; align-items: baseline; }
  .main, body.p-op .main { padding: 20px 16px 56px; }
  .page-head h1 { font-size: 1.4rem; }
  body.p-new form.card { padding: 2px 16px 20px; }
  .web-top { padding: 18px 20px; }
  .web-card h1 { font-size: 2.1rem; }
  .op-grid { grid-template-columns: minmax(0, 1fr); }
  .logcard { height: 68vh; }
  .statusbar { flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seg.stt { min-width: 0; }
}
@media (max-width: 640px) {
  .statusbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statusbar .seg:nth-child(3) { border-left: 0; }
  .statusbar .seg:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .line { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .line .gut { grid-column: 1 / -1; flex-direction: row; gap: 8px; padding: 0 0 4px; }
  .langtabs { max-width: 62vw; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 12px; gap: 10px; }
  .tile .ico { display: none; }
  .page-head .tools { margin-left: 0; flex-basis: 100%; order: 5; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .caret, .cap.partial::after, .col .partial::after { animation: none !important; }
}

/* 로그인 화면 성경 구절 (한국어 · 영어 · 라틴어) */
.verse { margin: 4px 0 20px; padding: 2px 0 2px 16px; border-left: 2px solid var(--accent); }
.verse p { margin: 0 0 4px; line-height: 1.5; }
.verse p[lang='ko'] { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.verse p[lang='en'], .verse p[lang='la'] { font-size: .9rem; color: var(--ink-soft); }
.verse p[lang='la'] { font-style: italic; }
.verse cite { display: block; margin-top: 8px; font-size: .75rem; font-style: normal; color: var(--faint); letter-spacing: .01em; }

/* 왼쪽 메뉴의 채널 목록 (단체를 고르면 그 아래에 채널이 쭉) */
.nav.chlist a { font-weight: 500; }
.nav.chlist a.here { background: var(--side-hover); color: #fff; }
.nav a.sub { padding-left: 31px; font-size: .78rem; min-height: 30px; }
.chdot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin: 0 4.5px; background: #5a6377; }
.chdot.live { background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.nav-empty { font-size: .75rem; color: #7f88a0; padding: 6px 10px; line-height: 1.5; }

/* 회차 기록 보기 창 (채널 화면) */
.btn.sm { padding: 5px 10px; font-size: .78rem; }
dialog.hist { width: min(860px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: var(--ink); box-shadow: 0 24px 60px rgba(19, 30, 45, .22); display: none; }
dialog.hist[open] { display: flex; flex-direction: column; }
dialog.hist::backdrop { background: rgba(19, 20, 20, .38); }
.hist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.hist-head h3 { margin: 0 0 2px; font-size: 1.05rem; }
.hist-head .hint { margin: 0; }
.hist-views { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.hist-views button { padding: 5px 11px; font-size: .78rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid transparent; color: var(--ink-soft); }
.hist-views button[aria-selected='true'] { background: var(--ink); color: #fff; }
.hist-body { list-style: none; margin: 0; padding: 6px 20px; overflow-y: auto; flex: 1; min-height: 120px; }
.hist-body li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist-body li:last-child { border-bottom: 0; }
.h-time { font: 500 .72rem/1.9 ui-monospace, Menlo, monospace; color: var(--faint); font-variant-numeric: tabular-nums; }
.h-src { font-weight: 600; line-height: 1.55; margin-bottom: 4px; }
.h-tr { display: flex; gap: 8px; align-items: baseline; color: var(--ink-soft); line-height: 1.55; font-size: .92rem; }
.h-tr .lang-badge { flex: none; font: 700 .62rem/1 ui-monospace, Menlo, monospace; padding: 3px 5px; border-radius: 4px; background: var(--bg-soft); color: var(--ink-soft); }
.h-one { line-height: 1.6; }
.hist-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.hist-foot label { font-size: .8rem; font-weight: 600; }
.hist-foot select { width: auto; min-width: 140px; }

/* 회차 표: 기록 보기 · 지우기 (지우기는 그 자리에서 확인) */
.sess-act { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn.sm.ghost.del { color: var(--faint); border-color: transparent; background: transparent; }
.btn.sm.ghost.del:hover { color: #b42318; background: #fdf1f0; }
.del-ask { font-size: .78rem; color: #b42318; font-weight: 600; }
.card-head #sessErr { margin-left: auto; font-size: .8rem; }

/* 채널 설정 바꾸기 (채널 화면) */
.card-head.plain { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; border: 0; background: none; margin-bottom: 8px; }
.card-head.plain h3 { margin: 0; }
.edit-form { display: flex; flex-direction: column; gap: 6px; }
.edit-form > label { font-size: .82rem; font-weight: 600; margin-top: 10px; }
.edit-form > label small { font-weight: 500; color: var(--faint); margin-left: 6px; }
.edit-form .row { margin-top: 14px; }
#viewPreview { align-self: center; }

/* 회차 표 «번역 토큰» */
.tok { display: inline-flex; flex-direction: column; align-items: flex-end; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: help; }
.tok small { font-size: .72rem; color: var(--faint); }
.tok > span i { font-style: normal; font-size: .68rem; color: var(--faint); margin-right: 5px; }

/* 무대 화면 위아래 배치 (?layout=rows): 언어마다 가로로 넓은 한 줄, 사이에 가로 선 */
body.stage.rows #cols { grid-auto-flow: row; grid-auto-rows: minmax(0, 1fr); grid-auto-columns: auto; gap: calc(5 * var(--u)); }
body.stage.rows .col + .col::before { left: 0; right: 0; top: calc(-2.5 * var(--u)); bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, transparent, #2a2e36 15%, #2a2e36 85%, transparent); }
body.stage.rows[data-n='2'] { --cur: calc(5 * var(--u)); }
body.stage.rows[data-n='3'] { --cur: calc(3.7 * var(--u)); }
body.stage.rows[data-n='3'] #cols { gap: calc(3.6 * var(--u)); }
body.stage.rows[data-n='3'] .col + .col::before { top: calc(-1.8 * var(--u)); }
body.stage.rows .col .prev { margin-bottom: calc(1.2 * var(--u)); }
/* 운영자 화면 무대 설정 */
.switchrow { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; }

/* 무대 창 안의 설정: 마우스를 움직일 때만 ⚙ (body.ctl-awake) */
.stage-gear { position: fixed; top: calc(2.4 * var(--u)); right: calc(2.4 * var(--u)); z-index: 20; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #c9ced8; opacity: 0; pointer-events: none; transition: opacity .3s; }
.stage-gear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stage-gear:hover { background: rgba(255, 255, 255, .16); color: #fff; }
body.ctl-awake .stage-gear { opacity: 1; pointer-events: auto; }
body.ctl-awake { cursor: auto; }
.stage-ctl { position: fixed; top: calc(2.4 * var(--u) + 48px); right: calc(2.4 * var(--u)); z-index: 21; width: 280px; padding: 16px 18px; border-radius: 12px; background: #15181e; border: 1px solid #2a2f38; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: #e6e9ee; font-size: 14px; }
.stage-ctl h4 { margin: 0 0 10px; font-size: 15px; }
.stage-ctl .k { margin: 12px 0 6px; font-size: 12px; color: #8e95a3; font-weight: 600; }
.stage-ctl .sw, .stage-ctl .opts label { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.stage-ctl .opts { display: flex; flex-direction: column; }
.stage-ctl input:disabled + * , .stage-ctl label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.stage-ctl .row { display: flex; gap: 8px; margin-top: 14px; }
.stage-ctl .row button { flex: 1; background: #232833; border: 1px solid #343a46; color: #e6e9ee; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.stage-ctl .row button:hover { background: #2c3240; }
.stage-ctl .note { margin: 10px 0 0; font-size: 11.5px; color: #7d8491; line-height: 1.45; }

/* 무대: 지난 문장 여러 줄 (가까운 것부터 덜 흐리게) */
.col .prev > div + div { margin-top: calc(1.6 * var(--u)); }
.col .prev > div { opacity: .45; }
.col .prev > div:nth-last-child(3) { opacity: .62; }
.col .prev > div:nth-last-child(2) { opacity: .8; }
.col .prev > div:nth-last-child(1) { opacity: 1; }
/* 무대 아래 줄: 글자가 로고 쪽으로 넘치지 않게, 세로 창에선 로고를 뺀다 */
body.stage footer .txt { flex: 1 1 auto; }
body.stage footer .txt .u, body.stage footer .txt span { overflow-wrap: anywhere; }
@media (max-aspect-ratio: 1/1) { body.stage footer .logo { display: none; } }

/* 무대 글자 크기 조절 (⚙ 설정 판 · 키보드 + −) */
.stage-ctl .size { display: flex; align-items: center; gap: 8px; }
.stage-ctl .size button { width: 36px; height: 32px; padding: 0; background: #232833; border: 1px solid #343a46; color: #e6e9ee; border-radius: 8px; font-size: 16px; font-weight: 700; }
.stage-ctl .size button:hover:not(:disabled) { background: #2c3240; }
.stage-ctl .size button:disabled { opacity: .4; }
.stage-ctl .size output { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
