@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* 참고: Soniox 앱 스타일 — 어두운 바탕, 두 패널(원문/번역), 하단 언어 선택 + 시작 버튼 */
:root,
:root[data-theme="dark"] {
  --bg: #141417;
  --card: #1d1e22;
  --card-2: #26272c;
  --line: #2a2b31;
  --ink: #eceef2;
  --ink-2: #b9bcc5;
  --muted: #80838c;
  --partial: #6c6f78;
  --accent: #7cc24a;        /* JP3E 연두 */
  --accent-2: #00703c;      /* JP3E 진녹 */
  --accent-ink: #0c1a06;
  --rec: #ff3d6e;
  --spk-bg: #1e3a2a;
  --spk-ink: #6fd69a;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --fs: 26px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f1;
  --card: #ffffff;
  --card-2: #eff1ec;
  --line: #e3e6df;
  --ink: #15181a;
  --ink-2: #4b5157;
  --muted: #8a9096;
  --partial: #a3a8ad;
  --accent: #4f9a1f;
  --accent-2: #00703c;
  --accent-ink: #ffffff;
  --spk-bg: #e3f4e8;
  --spk-ink: #18804a;
  --shadow: 0 10px 40px rgba(20, 30, 20, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { display: block; }

/* ── 머리줄 ── */
.hd { display: flex; align-items: center; gap: 10px; padding: 14px max(16px, env(safe-area-inset-left)) 12px; }
.logo { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 5px 10px; height: 44px; flex: 0 0 auto; }
.logo img { height: 34px; width: auto; display: block; }
.hd .title { flex: 1; min-width: 0; }
.hd .title b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .title small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.live { color: var(--rec); }
.pill.live .dot { background: var(--rec); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.circle {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink-2);
  display: inline-grid; place-items: center; flex: 0 0 auto;
}
.circle:hover { color: var(--ink); background: var(--card-2); }
.circle svg { width: 22px; height: 22px; }

/* ── 본문: 두 패널 ── */
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 1280px; margin: 0 auto; }
.board {
  flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr 1fr; background: var(--card);
  border-radius: 28px; margin: 0 max(0px, env(safe-area-inset-left)); overflow: hidden;
}
/* 번역만 보기: 원문 패널을 접고 번역 패널이 전체를 쓴다 */
.board.solo { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.board.solo .panel.src { display: none; }
.board.solo .panel.dst { border: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; position: relative; }
.panel + .panel { border-top: 8px solid var(--bg); }
.ph {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 24px; min-height: 60px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--muted); text-transform: uppercase;
}
.ph .icon { width: 34px; height: 34px; border: 0; background: transparent; color: var(--accent); border-radius: 10px; display: grid; place-items: center; }
.ph .icon:hover { background: var(--card-2); }
.ph .icon svg { width: 22px; height: 22px; }
.pb { flex: 1; min-height: 0; overflow: auto; padding: 18px 24px 22px; overscroll-behavior: contain; }
.placeholder { color: var(--muted); font-size: var(--fs); line-height: 1.4; margin: 0; }
.para { margin: 0 0 .3em; }
.para p { margin: 0; font-size: var(--fs); line-height: 1.5; word-break: break-word; color: var(--ink); }
/* 지난 문장은 살짝 흐리게, 방금 나온 문장은 또렷하게(굵기는 그대로 — 줄바꿈이 흔들리지 않게) */
.para:not(:last-child) p { color: var(--ink-2); }
.partial { color: var(--partial); }
.spk {
  display: inline-block; margin: 2px 0 8px; padding: 3px 12px; border-radius: 999px;
  background: var(--spk-bg); color: var(--spk-ink); font-size: 14px; font-weight: 600;
}
.para[data-spk="1"] .spk { background: #2a2540; color: #b69cff; }
.para[data-spk="2"] .spk { background: #3a2a1c; color: #ffb36b; }
.para[data-spk="3"] .spk { background: #1c2f3a; color: #6cc6ff; }
.para[data-spk="4"] .spk { background: #3a1f2b; color: #ff8fb4; }
.para[data-spk="5"] .spk { background: #2f3320; color: #d6e26a; }
:root[data-theme="light"] .para[data-spk="1"] .spk { background: #eee8ff; color: #6a4fd1; }
:root[data-theme="light"] .para[data-spk="2"] .spk { background: #fff0e2; color: #c2620c; }
:root[data-theme="light"] .para[data-spk="3"] .spk { background: #e3f3ff; color: #0f7cc2; }
:root[data-theme="light"] .para[data-spk="4"] .spk { background: #ffe8f0; color: #c2185b; }
:root[data-theme="light"] .para[data-spk="5"] .spk { background: #f3f6dc; color: #7c8a12; }

/* ── 하단 조작부 ── */
.controls { padding: 14px max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.langbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.lp {
  height: 58px; border-radius: 999px; border: 0; background: var(--card); color: var(--ink);
  font-size: 19px; font-weight: 500; padding: 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp:hover { background: var(--card-2); }
.lp:disabled { opacity: .55; cursor: default; }
.lp small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .06em; margin-top: -2px; }
.swap { width: 52px; height: 52px; border: 0; background: transparent; color: var(--ink-2); border-radius: 50%; display: grid; place-items: center; }
.swap:hover { background: var(--card); color: var(--ink); }
.swap svg { width: 30px; height: 30px; }
.swap:disabled { opacity: .5; }
.actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.actions:has(.fsz) { grid-template-columns: auto 1fr auto auto; gap: 10px; }
/* 글자 크기: 시작 버튼 옆 위(+)·아래(−) 두 칸 */
.fsz { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; height: 64px; }
.fsz button { width: 48px; border: 1px solid var(--line); background: transparent; color: var(--accent); border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; }
.fsz button:hover { background: var(--card); }
.fsz button:active { background: var(--card-2); }
.actions .circle { width: 64px; height: 64px; background: transparent; border: 1px solid var(--line); color: var(--accent); }
.actions .circle:hover { background: var(--card); }
.actions .circle svg { width: 26px; height: 26px; }
.start {
  height: 72px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 0 26px 0 8px;
  font-size: 22px; font-weight: 600; color: var(--ink);
}
.start:disabled { opacity: .55; cursor: default; }
.start .mic { width: 56px; height: 56px; border-radius: 50%; background: var(--card-2); color: var(--accent); display: grid; place-items: center; transition: background .2s, box-shadow 80ms linear; }
.start .mic svg { width: 26px; height: 26px; }
.start .lbl { text-align: left; white-space: nowrap; }
.start .clock { white-space: nowrap; }
.start .clock { font-variant-numeric: tabular-nums; font-weight: 400; color: var(--muted); }
.start.on .mic { background: var(--rec); color: #fff; box-shadow: 0 0 0 calc(var(--lvl, 0) * 9px) rgba(255, 61, 110, .25); }
.start .ico-stop { display: none; }
.start.on .ico-mic { display: none; }
.start.on .ico-stop { display: block; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); top: 76px; z-index: 5;
  max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 10px 16px; border-radius: 14px;
  background: #3a1620; color: #ff9db5; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); text-align: center;
}
:root[data-theme="light"] .toast { background: #fdecef; color: #c41d48; }
.toast:empty { display: none; }
.toast { cursor: pointer; padding-right: 36px; white-space: pre-line; width: max-content; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5; }
.toast::after { content: "✕"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); opacity: .7; font-size: 13px; }
.toast.ok { background: #16301f; color: #93e3ad; top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 170px); }
:root[data-theme="light"] .toast.ok { background: #e6f6ea; color: #17733e; }
.toast a { color: inherit; font-weight: 700; margin-left: 6px; }
.drive { border-top: 1px solid var(--line); padding: 12px 0 10px; }
.drive-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drive-row b { display: block; font-size: 15px; }
.drive-row small { display: block; font-size: 13px; color: var(--muted); }
.drive-row .btn.on { background: transparent; color: var(--muted); }
.drive .toggle { border-top: 0; padding: 10px 0 4px; }
.drive.off .toggle, .drive.off #saveDrive, .drive.off #driveBtn { opacity: .45; }

/* ── 시트(dialog) ── */
dialog.sheet {
  border: 0; padding: 0; margin: auto; width: min(460px, calc(100vw - 24px)); max-height: min(86dvh, 760px);
  border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-body { padding: 6px 20px 22px; overflow: auto; max-height: calc(min(86dvh, 760px) - 64px); }
.x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card-2); color: var(--ink-2); font-size: 16px; }
#langSearch { margin: 0 0 10px; position: sticky; top: 0; z-index: 1; }
.langlist { display: grid; gap: 4px; }
.langlist button {
  display: flex; justify-content: space-between; align-items: center; width: 100%; height: 52px; padding: 0 16px;
  border: 0; border-radius: 14px; background: transparent; font-size: 17px; text-align: left;
}
.langlist button:hover { background: var(--card-2); }
.langlist button small { color: var(--muted); font-size: 13px; }
.langlist button[aria-selected="true"] { background: var(--card-2); color: var(--accent); font-weight: 700; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.toggle input { width: 46px; height: 28px; appearance: none; border-radius: 999px; background: var(--card-2); position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(18px); }
details.more { border-top: 1px solid var(--line); padding: 12px 0 0; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; }
details.more summary::after { content: "＋"; color: var(--muted); }
details.more[open] summary::after { content: "－"; }
details.more[open] summary { margin-bottom: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; height: 56px; font-size: 17px; border-radius: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.row2 { display: flex; gap: 8px; margin-top: 14px; }
.row2 .btn { flex: 1; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 18px; padding: 14px; margin: 4px 0 14px; }
.qr svg { width: 220px; height: 220px; }
.copyrow { display: flex; gap: 8px; }
.copyrow .input { flex: 1; font-size: 14px; }
.code { text-align: center; font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; margin: 14px 0 0; color: var(--ink-2); }

/* ── 첫 화면 ── */
/* 영상은 화면 위쪽 절반(--vid-h)을 채우고, 소개 글은 영상 아랫부분에 얹는다. '새 회의' 카드는 영상 아래에서 시작한다 */
/* 영상 아래로 어두운 띠를 두지 않는다: 영상(과 그림자)이 아래쪽 --vid-fade 만큼에서 페이지 바탕색으로 녹아들고, 카드는 그 위에 떠 있다 */
.hero3 { --vid-h: max(320px, 56svh); --vid-fade: 140px; --pitch-off: 78px; position: relative; isolation: isolate; overflow: hidden; color: #eef5e9; padding-bottom: 26px; background: transparent; }
.hero3 .bgvid { position: absolute; inset: 0 0 auto; width: 100%; height: var(--vid-h); object-fit: cover; z-index: -2; background: #0b140d; }
.hero3 .shade { position: absolute; inset: 0 0 auto; height: calc(var(--vid-h) + var(--vid-fade)); z-index: -1;
  background: linear-gradient(180deg, rgba(8, 14, 10, .55) 0, rgba(8, 14, 10, .1) 110px, rgba(8, 14, 10, .06) calc(var(--vid-h) * .42), rgba(8, 14, 10, .5) calc(var(--vid-h) * .74), #0b140d var(--vid-h),
    rgba(11, 20, 13, .8) calc(var(--vid-h) + var(--vid-fade) * .25), rgba(11, 20, 13, .45) calc(var(--vid-h) + var(--vid-fade) * .55), rgba(11, 20, 13, .14) calc(var(--vid-h) + var(--vid-fade) * .82), rgba(11, 20, 13, 0) 100%); }
.hero-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; max-width: 1240px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
.hero-top .brand { margin-left: 4px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.hero-top .grow { flex: 1; }
.hero-top .circle { width: 40px; height: 40px; background: rgba(255,255,255,.1); color: #eef5e9; }
.lgrid { max-width: 1240px; margin: 0 auto; padding: 20px 16px 0; display: grid; gap: 18px; }
.pitch { min-width: 0; min-height: calc(var(--vid-h) - var(--pitch-off)); display: flex; flex-direction: column; justify-content: flex-end; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.kicker { margin: 0 0 8px; font-size: 11px; letter-spacing: .22em; font-weight: 700; color: #a6e36f; }
.pitch h1 { margin: 0; font-size: clamp(26px, 7.4vw, 36px); line-height: 1.2; letter-spacing: -.03em; font-weight: 800; }
.pitch h1 em { font-style: normal; color: #8fd45c; }
.pitch .sub { margin: 10px 0 0; max-width: 560px; color: #c9d6c3; font-size: 15px; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips span { padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 12.5px; font-weight: 600; color: #e2eedb; }
.card { background: var(--card); color: var(--ink); border-radius: 24px; padding: 20px; }
.card h2 { font-size: 15px; margin: 0 0 14px; }
.start-card { box-shadow: var(--shadow); }
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.preset, .more-modes { height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; font-weight: 600; white-space: nowrap; }
.preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.more-modes { background: transparent; border-style: dashed; color: var(--muted); }
.join-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.join-box label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.join { display: flex; gap: 8px; }
.join .input { flex: 1; min-width: 0; }
.landing { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sec { margin-top: 22px; }
.sec h2 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rlist, .plans { display: grid; gap: 10px; }
.rcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--card); color: var(--ink); text-decoration: none; }
.rcard:hover { background: var(--card-2); }
.rcard b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard b i { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 61, 110, .16); color: var(--rec); font-style: normal; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.rcard small { grid-column: 1; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .rgo { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); font-size: 13px; font-weight: 700; white-space: nowrap; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.plan.pro { border-color: var(--accent); }
.plan b { display: block; font-size: 16px; }
.plan small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.plan strong { font-size: 22px; font-weight: 800; white-space: nowrap; }
.plan strong i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.err { color: var(--rec); font-size: 14px; margin: 8px 0 0; }
.err:empty { display: none; }
.landing footer { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 20px; }

/* ── 넓은 화면: 패널을 좌우로 ── */
@media (min-width: 1000px) {
  .board { grid-template-rows: none; grid-template-columns: 1fr 1fr; margin: 0 16px; }
  .board.solo { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
  .panel + .panel { border-top: 0; border-left: 8px solid var(--bg); }
  .controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-left: 16px; padding-right: 16px; }
  :root { --fs: 28px; }
}
@media (max-width: 420px) {
  :root { --fs: 22px; }
  .lp { height: 52px; font-size: 17px; }
  .start { height: 64px; font-size: 19px; }
  .fsz button { width: 40px; }
  .actions:has(.fsz) { gap: 8px; }
  .actions:has(.fsz) .start { gap: 8px; padding: 0 14px 0 6px; font-size: 17px; }
  .actions:has(.fsz) .start .mic { width: 50px; height: 50px; }
  .actions:has(.fsz) .circle { width: 52px; height: 52px; }
  .start .mic { width: 48px; height: 48px; }
  .actions .circle { width: 56px; height: 56px; }
  .ph { padding: 14px 18px 10px; }
  .pb { padding: 14px 18px 18px; }
}

/* ── 잠금 화면 ── */
html.locked body > :not(.lock) { visibility: hidden; }
.lock {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(120% 80% at 50% 0%, #1d2a1a 0%, var(--bg) 55%); overflow: auto;
  transition: opacity .3s;
}
:root[data-theme="light"] .lock { background: radial-gradient(120% 80% at 50% 0%, #e7f3dc 0%, var(--bg) 55%); }
.lock.done { opacity: 0; }
.lock-in { width: min(340px, 100%); text-align: center; }
.lock-logo { display: inline-flex; background: #fff; border-radius: 24px; padding: 16px 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.lock-logo img { height: 86px; width: auto; display: block; }
.lock h1 { margin: 22px 0 6px; font-size: 24px; letter-spacing: -.02em; }
.lock-msg { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; line-height: 1.55; min-height: 48px; }
.lock-msg.bad { color: var(--rec); }
.dots { display: flex; justify-content: center; gap: 16px; margin: 0 0 26px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); transition: all .12s; }
.dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; justify-items: center; }
.pad button {
  width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink);
  font-size: 28px; font-weight: 500; display: grid; place-items: center; transition: background .1s, transform .05s;
}
.pad button:active { background: var(--card-2); transform: scale(.95); }
.pad button[data-k="del"] { background: transparent; color: var(--ink-2); }
.pad button svg { width: 28px; height: 28px; }
.lock.busy .pad { opacity: .5; pointer-events: none; }
.lock-foot { margin: 26px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
@media (max-height: 640px) { .lock-logo img { height: 60px; } .pad button { width: 60px; height: 60px; font-size: 24px; } .lock h1 { margin-top: 14px; } }
.linkbtn { background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 4px 6px; }

/* 지난 내용 보기 → 최신으로 돌아가기 */
.jump { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap; animation: jumpIn .18s ease-out; }
@keyframes jumpIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.pb { scroll-behavior: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.toast-act { display: inline-block; margin: 8px 0 0 8px; height: 34px; padding: 0 14px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-weight: 700; font-size: 14px; vertical-align: middle; }

/* ── 화면 언어 버튼 ── */
.uilang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); flex: 0 0 auto; }
.uilang button { min-width: 34px; height: 30px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.uilang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.hero-top .uilang { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.14); }
.hero-top .uilang button { color: #cfe0c6; }
.hero-top .uilang button[aria-pressed="true"] { color: #0c1a06; }
.lock > .uilang { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
@media (max-width: 420px) { .hd .uilang button { min-width: 28px; padding: 0 5px; font-size: 12px; } }
.lock-x { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink-2); font-size: 16px; }

/* ═════════ 기기별 레이아웃 ═════════ */

/* ── 아이폰(세로, ~520px) ── */
@media (max-width: 520px) {
  /* 첫 화면: '회의 시작'이 첫 화면 안에 들어오게 줄인다 */
  .hero-top { gap: 6px; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
  .hero-top .logo { height: 36px; padding: 4px 8px; border-radius: 10px; }
  .hero-top .logo img { height: 27px; }
  .hero-top .brand, .hero-top .tier-up, .hero-top .tier-badge span { display: none; }
  .chips { gap: 6px; margin-top: 12px; }
  .chips span { padding: 4px 10px; font-size: 12px; }
  .hero-top .tier-badge { padding: 0 7px; }
  .hero-top .circle, .login-btn { width: 36px; height: 36px; }
  .login-btn { width: auto; padding: 0 12px; font-size: 13px; }
  .hero3 { --vid-h: max(340px, 52svh); --vid-fade: 120px; --pitch-off: 64px; }
  .lgrid { padding-top: 14px; gap: 14px; }
  .pitch .sub { font-size: 14px; }
  .card { padding: 18px; border-radius: 22px; }
  /* 상단 바: 로고·언어·상태는 한 줄, 회의 제목은 그 아래 줄 */
  .hd { flex-wrap: wrap; row-gap: 6px; padding: 10px 12px 8px; gap: 8px; }
  .hd .logo { height: 36px; padding: 4px 8px; border-radius: 10px; }
  .hd .logo img { height: 27px; }
  .hd .title { order: 9; flex: 1 0 100%; display: flex; align-items: baseline; gap: 8px; }
  .hd .title b { font-size: 15px; min-width: 0; }
  .hd .title small { flex: 0 1 auto; }
  .hd .uilang { margin-left: auto; }
  .uilang button { min-width: 27px; height: 26px; padding: 0 5px; font-size: 12px; }
  .pill { height: 30px; padding: 0 9px; font-size: 12px; }
  .board { border-radius: 22px; margin: 0 8px; }
  .lock { padding-top: 72px; }
  .lock-logo img { height: 64px; }
}

/* ── 가로로 눕힌 휴대폰(높이가 낮은 화면) ── */
@media (max-height: 520px) and (orientation: landscape) {
  .hd { padding-top: 6px; padding-bottom: 6px; }
  .hd .title { order: 0; flex: 1; display: block; }
  .board { grid-template-rows: none; grid-template-columns: 1fr 1fr; border-radius: 18px; }
  .board.solo { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
  .panel + .panel { border-top: 0; border-left: 6px solid var(--bg); }
  .ph { min-height: 40px; padding: 6px 16px; }
  .pb { padding: 10px 16px 12px; }
  :root { --fs: 20px; }
  .controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); gap: 10px; }
  .lp { height: 44px; font-size: 16px; }
  .swap { width: 40px; height: 40px; }
  .start { height: 52px; font-size: 17px; }
  .start .mic { width: 40px; height: 40px; }
  .actions .circle { width: 48px; height: 48px; }
  .lock { padding-top: 16px; }
  .lock-in { width: min(640px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: center; }
  .lock-in > :not(.pad) { grid-column: 1; }
  .lock-in .pad { grid-column: 2; grid-row: 1 / span 5; }
  .pad button { width: 54px; height: 54px; font-size: 22px; }
  .lock > .uilang { top: auto; right: auto; left: 16px; bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* ── 아이패드 세로(~1000px) ── */
@media (min-width: 700px) and (max-width: 999px) {
  .lgrid, .landing, .hero-top { max-width: 720px; }
  .board { margin: 0 16px; }
  .controls { padding-left: 24px; padding-right: 24px; }
  :root { --fs: 27px; }
}

/* ── 아이패드 가로 · 데스크톱(1000px~): 첫 화면 메뉴를 두 칸으로 ── */
@media (min-width: 1000px) {
  .hero3 { padding-bottom: 44px; --vid-h: max(460px, 62svh); --pitch-off: 102px; }
  .hero-top { padding: 18px 32px 0; }
  .lgrid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 520px); gap: 48px; align-items: start; padding: 40px 32px 0; }
  /* 카드는 영상 아래쪽 절반에 걸쳐 시작해서, 영상 위쪽 절반은 그대로 보인다 */
  .start-card { margin-top: calc(var(--vid-h) * .45 - 40px); }
  .kicker { margin-bottom: 14px; font-size: 12px; letter-spacing: .28em; }
  .pitch h1 { font-size: clamp(40px, 4.2vw, 56px); line-height: 1.15; }
  .pitch .sub { margin-top: 18px; font-size: 18px; }
  .chips { margin-top: 22px; }
  .chips span { padding: 6px 12px; font-size: 13px; }
  .card { padding: 28px; }
  .landing { padding: 0 32px; }
  .rlist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── 큰 모니터 · 회의실 TV(1600px~) ── */
@media (min-width: 1600px) {
  .app { max-width: 1680px; }
  :root { --fs: 34px; }
  .ph { font-size: 14px; }
}

/* ═════════ 로그인 · 회원 ═════════ */
.auth .lock-in { width: min(380px, 100%); }
.auth h1 { margin: 22px 0 6px; font-size: 24px; letter-spacing: -.02em; }
.auth-btns { display: grid; gap: 10px; margin: 6px 0 14px; }
.sso { display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border-radius: 14px; border: 0; font-size: 16px; font-weight: 700; transition: transform .05s, filter .15s; }
.sso:active { transform: scale(.98); }
.sso:hover { filter: brightness(.97); }
.sso svg { width: 22px; height: 22px; flex: 0 0 auto; }
.sso.google { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px #dadce0; }
.sso.kakao { background: #FEE500; color: #191919; }
.auth-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-who { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); font-weight: 600; font-size: 14px; max-width: 100%; }
.auth-who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.auth-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth .btn.block { margin-bottom: 4px; }
.auth-link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.auth .dots { margin-top: 4px; }

.acct { position: relative; flex: 0 0 auto; }
.acct-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--card-2); overflow: hidden; display: grid; place-items: center; }
.acct-btn img { width: 100%; height: 100%; object-fit: cover; }
.acct-ini { font-weight: 800; font-size: 15px; color: var(--accent); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; max-width: 280px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-align: left; }
.acct-name { font-weight: 700; font-size: 15px; padding: 4px 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-mail { font-size: 12px; color: var(--muted); padding: 0 8px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.plan-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.acct-badge.pro { background: #1e3a2a; color: #6fd69a; }
.acct-badge { margin: 0 8px 6px; display: inline-block; padding: 2px 10px; border-radius: 999px; background: #3a2a1c; color: #ffb36b; font-size: 12px; font-weight: 700; }
.acct-menu a, .acct-menu button { display: block; width: 100%; padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--card-2); }
.hero-top .acct-btn { border-color: rgba(255,255,255,.25); }
.login-btn { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: #eef5e9; font-weight: 700; font-size: 14px; }

.sub-h { margin: 20px 0 6px; font-size: 14px; }
.viewers { display: flex; flex-wrap: wrap; gap: 6px; }
.viewer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card-2); font-size: 13px; font-weight: 600; }
.viewer img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* 회원 관리 */
.admin { max-width: 860px; margin: 0 auto; padding: 0 0 40px; }
.admin main { padding: 4px 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tabs button { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs button[data-n]:not([data-n=""])::after { content: attr(data-n); margin-left: 6px; opacity: .75; }
.ulist { display: grid; gap: 8px; margin-top: 14px; }
.urow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card); }
.u-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--card-2); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.u-av img { width: 100%; height: 100%; object-fit: cover; }
.u-main b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-main small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.u-act .btn { height: 38px; padding: 0 12px; font-size: 13px; }
@media (max-width: 520px) {
  .urow { grid-template-columns: auto minmax(0, 1fr); }
  .u-act { grid-column: 1 / -1; justify-content: stretch; }
  .u-act .btn { flex: 1; }
  .acct-btn { width: 32px; height: 32px; }
}

/* ═════════ 통역 화면: 상태 · 보기 방식 · 초대 ═════════ */
/* 연결 상태: 연결 중·재연결 중은 주황, 끊겼을 때는 화면 위에 한 줄로 알린다 */
.pill.warn { color: #ffb36b; }
.pill.warn .dot { background: #ffb36b; animation: pulse 1.4s infinite; }
:root[data-theme="light"] .pill.warn { color: #a85a0a; }
:root[data-theme="light"] .pill.warn .dot { background: #d9822b; }
.banner { margin: 0 16px 8px; padding: 10px 14px; border-radius: 14px; background: #3a2a1c; color: #ffb36b; font-size: 14px; font-weight: 600; text-align: center; }
:root[data-theme="light"] .banner { background: #fff0e2; color: #a85a0a; }
/* 참석자 수 = 초대 버튼 */
button.pill { border: 0; font-family: inherit; }
button.pill:hover { background: var(--card-2); color: var(--ink); }
.pill-label { display: none; }
/* 참석자 화면: 번역만 / 원문+번역 */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 64px; padding: 5px; border-radius: 999px; background: var(--card); min-width: 0; }
.seg button { min-width: 0; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-pressed="true"] { background: var(--card-2); color: var(--ink); }
.controls .actions.vact { grid-template-columns: minmax(0, 1fr) auto auto; }
body.page-view .acct-tier { display: none; } /* 참석자에게 요금 배지는 보이지 않는다 */
/* 호스트 빈 화면: 초대 카드(자막이 나오면 사라진다) */
.invite { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; max-width: 460px; margin-top: 18px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); }
.placeholder[hidden] + .invite { display: none; }
.invite .qr-mini { width: 112px; height: 112px; padding: 8px; border-radius: 12px; background: #fff; }
.invite .qr-mini svg { width: 100%; height: 100%; }
.invite b { display: block; font-size: 15px; }
.invite .code { margin: 6px 0 2px; text-align: left; font-size: 19px; }
.invite .hint { margin: 0 0 10px; }
.invite .btn { height: 38px; padding: 0 14px; font-size: 14px; }
@media (min-width: 700px) { .pill-label { display: inline; } }
@media (max-width: 420px) {
  .seg { height: 56px; }
  .seg button { padding: 0 8px; font-size: 14px; }
  .invite { gap: 12px; padding: 12px; margin-top: 12px; }
  .invite .qr-mini { width: 88px; height: 88px; padding: 6px; }
}
/* 조작부가 하나뿐인 화면(참석자)은 넓은 화면에서 가운데로 */
@media (min-width: 1000px), (max-height: 520px) and (orientation: landscape) {
  .controls > :only-child { grid-column: 1 / -1; width: 100%; max-width: 760px; margin: 0 auto; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .seg { height: 52px; }
  .invite { display: none; }
}

/* 아주 좁은 화면(320px 등)에서 '로그인' 글자가 세로로 쪼개지지 않게 */
.login-btn { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 360px) {
  .hero-top { gap: 4px; }
  .hero-top .uilang button { min-width: 24px; padding: 0 4px; }
  .login-btn { padding: 0 10px; }
}
