/* Haroo Bridge — 다크 네이비 + 코랄 오렌지 · 모바일 최우선 */
:root {
  --navy: #121826;
  --navy-2: #182235;
  --navy-3: #1f2b42;
  --coral: #fc5c2f;
  --coral-soft: #ff8a63;
  --text: #f5f7fc;
  --muted: #98a3b8;
  --muted-2: #7d8798;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --panel: linear-gradient(180deg, rgba(32, 45, 68, 0.94), rgba(21, 30, 46, 0.96));
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--navy);
}

body {
  color: var(--text);
  font-family: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  background:
    radial-gradient(120% 55% at 50% -10%, rgba(252, 92, 47, 0.16), transparent 62%),
    radial-gradient(90% 40% at 100% 100%, rgba(252, 92, 47, 0.07), transparent 70%),
    #0a0f1a;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h2, h3, p { margin: 0; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(110% 42% at 50% -6%, rgba(252, 92, 47, 0.14), transparent 60%),
    linear-gradient(180deg, #101725 0%, #0c121e 55%, #0a0f19 100%);
}

@media (min-width: 600px) {
  .app { border-left: 1px solid rgba(255, 255, 255, 0.05); border-right: 1px solid rgba(255, 255, 255, 0.05); }
}

/* ── 상단 ─────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 6px;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }
.brand-text span { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.pill {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 7px 11px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04);
}
.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 12px;
  color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn[aria-pressed="true"] {
  color: #fff; border-color: rgba(252, 92, 47, 0.55);
  background: linear-gradient(180deg, rgba(252, 92, 47, 0.9), rgba(214, 68, 26, 0.95));
  box-shadow: 0 6px 18px rgba(252, 92, 47, 0.32);
}

/* ── 언어 바 ──────────────────────────────────── */
.langbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 10px; flex: 0 0 auto;
}
.langpick {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 13px; border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(35, 48, 72, 0.92), rgba(24, 34, 52, 0.92));
  text-align: left;
}
.langpick.right { align-items: flex-end; text-align: right; }
.langpick em {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2);
}
.langpick b {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.langpick .flag {
  font-size: 9px; font-weight: 800; letter-spacing: 0.05em; line-height: 1;
  padding: 3px 5px; border-radius: 5px;
  color: #d6def0; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.langpick:active { filter: brightness(1.12); }
.swap {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  color: var(--coral-soft); border: 1px solid rgba(252, 92, 47, 0.32);
  background: rgba(252, 92, 47, 0.1);
}
.swap svg { width: 20px; height: 20px; }
.swap.spin svg { animation: spin 0.45s ease; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ── 화면 전환 ────────────────────────────────── */
.views { position: relative; flex: 1 1 auto; min-height: 0; }
.view {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  padding: 0 14px;
}
.view.active { display: flex; }

/* ── 음성/마주보기 ────────────────────────────── */
.live { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.panel.other {
  flex: 1.18 1 0; min-height: 0;
  display: flex; flex-direction: column;
  padding: 12px 16px 10px;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), flex 0.35s ease;
  background:
    radial-gradient(120% 90% at 100% 110%, rgba(252, 92, 47, 0.22), transparent 62%),
    linear-gradient(180deg, rgba(38, 52, 78, 0.96), rgba(23, 33, 50, 0.97));
}
.panel.other::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(252, 92, 47, 0.5), transparent);
}
.face .panel.other { transform: rotate(180deg); flex: 1.4 1 0; }
.face .panel.mine { flex: 0.95 1 0; }

.panel-head { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.panel-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #b8c4da;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #5d6a80; flex: 0 0 auto;
  transition: background 0.2s, box-shadow 0.2s;
}
.panel.thinking .live-dot { background: var(--coral); box-shadow: 0 0 0 4px rgba(252, 92, 47, 0.16); animation: blink 1s infinite; }
.panel.listening .live-dot { background: #3ddc97; box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.16); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.live-tag {
  margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: 0.11em;
  padding: 3px 7px; border-radius: 999px; color: var(--coral-soft);
  background: rgba(252, 92, 47, 0.14); border: 1px solid rgba(252, 92, 47, 0.28);
}

.other-text {
  flex: 1 1 auto; min-height: 0;
  display: grid; align-content: center;
  overflow-y: auto; padding: 8px 2px 6px;
  font-size: clamp(21px, 6.4vw, 32px);
  font-weight: 800; line-height: 1.26; letter-spacing: -0.012em;
  color: #fff;
  word-break: break-word;
  scrollbar-width: none;
}
.other-text::-webkit-scrollbar { display: none; }
.other-text.rtl { direction: rtl; text-align: right; }
.other-text .line-new { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.empty-other { text-align: center; opacity: 0.72; }
.empty-other .eo-1 { font-size: 19px; font-weight: 800; color: #dfe6f3; }
.empty-other .eo-2 { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.wave { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 18px; flex: 0 0 auto; opacity: 0.45; }
.wave i { width: 3px; height: 4px; border-radius: 3px; background: var(--coral-soft); transition: height 0.2s; }
.panel.listening .wave { opacity: 1; }
.panel.listening .wave i { animation: wv 1s infinite ease-in-out; }
.panel.listening .wave i:nth-child(1) { animation-delay: 0s; }
.panel.listening .wave i:nth-child(2) { animation-delay: 0.1s; }
.panel.listening .wave i:nth-child(3) { animation-delay: 0.2s; }
.panel.listening .wave i:nth-child(4) { animation-delay: 0.3s; }
.panel.listening .wave i:nth-child(5) { animation-delay: 0.15s; }
.panel.listening .wave i:nth-child(6) { animation-delay: 0.25s; }
.panel.listening .wave i:nth-child(7) { animation-delay: 0.05s; }
.panel.listening .wave i:nth-child(8) { animation-delay: 0.18s; }
.panel.listening .wave i:nth-child(9) { animation-delay: 0.12s; }
@keyframes wv { 0%, 100% { height: 4px; } 50% { height: 16px; } }

.panel.mine {
  flex: 1 1 0; min-height: 0; margin-top: 9px;
  display: flex; flex-direction: column;
  padding: 11px 14px 10px;
  transition: flex 0.35s ease;
}
.state {
  margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--muted-2);
  display: flex; align-items: center; gap: 5px;
}
.state.on { color: #3ddc97; }
.mini-btn {
  display: grid; place-items: center; width: 26px; height: 26px; margin-left: 4px;
  border-radius: 8px; color: var(--muted-2); border: 1px solid var(--line);
}
.mini-btn svg { width: 14px; height: 14px; }
.mini-btn:active { color: #fff; }

.mine-live { flex: 0 0 auto; padding: 5px 0 2px; min-height: 24px; }
.src-line {
  font-size: 14px; line-height: 1.45; color: #aebbd1; min-height: 20px;
  white-space: pre-wrap; word-break: break-word;
}
.src-line.interim { color: #7f8ba1; font-style: italic; }
.dst-line {
  margin-top: 4px; font-size: 14.5px; line-height: 1.45; font-weight: 600;
  color: #ffcdba; word-break: break-word; white-space: pre-wrap;
}
.dst-line:empty { display: none; }

.log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  display: flex; flex-direction: column; gap: 9px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}
.log::-webkit-scrollbar { display: none; }
.log-empty { color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.log-item { display: flex; flex-direction: column; gap: 2px; }
.log-item .li-top { display: flex; align-items: center; gap: 6px; }
.li-src { flex: 1 1 auto; min-width: 0; font-size: 12px; color: #8d99ad; line-height: 1.4; word-break: break-word; }
.li-dst { font-size: 13.5px; color: #e7edf8; line-height: 1.4; word-break: break-word; }
.li-play {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  color: var(--muted-2); background: rgba(255, 255, 255, 0.05); flex: 0 0 auto;
}
.li-play svg { width: 12px; height: 12px; }

/* 알림 바 */
.notice {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px 11px; border-radius: 12px;
  font-size: 11.5px; line-height: 1.4; color: #ffd9cb;
  background: rgba(252, 92, 47, 0.12); border: 1px solid rgba(252, 92, 47, 0.28);
}
.notice-x { margin-left: auto; color: var(--coral-soft); font-size: 12px; padding: 2px 4px; }

/* 빠른 문구 */
.phrases { flex: 0 0 auto; padding: 9px 0 0; }
.chiprow {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chiprow::-webkit-scrollbar { display: none; }
#phraseList {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.chip {
  flex: 0 0 auto; white-space: nowrap;
  font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 999px;
  color: #c6d0e2; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
}
.chip.group { font-size: 11.5px; padding: 6px 10px; color: var(--muted); }
.chip.group.active {
  color: #ffc2ab; background: rgba(252, 92, 47, 0.16); border-color: rgba(252, 92, 47, 0.4);
}
.chip:active { filter: brightness(1.2); }
.chip.quick { color: #dfe7f4; background: rgba(255, 255, 255, 0.06); }

/* 마이크 바 */
.micbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 4px 22px 10px;
}
.side-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 16px;
  color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.045);
}
.side-btn svg { width: 21px; height: 21px; }
.side-btn[aria-pressed="true"] {
  color: #fff; border-color: rgba(252, 92, 47, 0.5); background: rgba(252, 92, 47, 0.18);
}
.mic {
  position: relative;
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff7a52, #ef4c1f);
  box-shadow: 0 14px 34px rgba(252, 92, 47, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s;
}
.mic svg { width: 32px; height: 32px; stroke-width: 1.9; }
.mic:active { transform: scale(0.95); }
.mic.listening {
  background: linear-gradient(180deg, #ff8f6b, #fc5c2f);
  box-shadow: 0 0 0 0 rgba(252, 92, 47, 0.5), 0 14px 34px rgba(252, 92, 47, 0.45);
  animation: ring 1.8s infinite;
}
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(252, 92, 47, 0.45), 0 14px 34px rgba(252, 92, 47, 0.4); }
  70% { box-shadow: 0 0 0 18px rgba(252, 92, 47, 0), 0 14px 34px rgba(252, 92, 47, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(252, 92, 47, 0), 0 14px 34px rgba(252, 92, 47, 0.4); }
}

/* 텍스트 입력 폴백 */
.composer {
  flex: 0 0 auto; display: flex; gap: 8px;
  padding: 0 14px 8px;
  animation: pop 0.2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.composer input {
  flex: 1 1 auto; min-width: 0;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2);
  font-size: 15px; outline: none;
}
.composer input::placeholder { color: var(--muted-2); }
.composer input:focus { border-color: rgba(252, 92, 47, 0.55); }
.composer .send {
  flex: 0 0 auto; padding: 0 16px; border-radius: 14px; font-weight: 800; font-size: 13.5px;
  color: #fff; background: linear-gradient(180deg, #ff7a52, #ef4c1f);
  box-shadow: 0 8px 20px rgba(252, 92, 47, 0.3);
}

/* ── 공통 버튼 ────────────────────────────────── */
.btn {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 700;
  border: 1px solid transparent; transition: filter 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.985); }
.btn.ghost { color: #d5dDEC; background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.btn.primary {
  color: #fff; background: linear-gradient(180deg, #ff7a52, #ef4c1f);
  box-shadow: 0 10px 24px rgba(252, 92, 47, 0.28);
}
.btn:disabled { opacity: 0.42; box-shadow: none; }

/* ── 글씨 번역 ────────────────────────────────── */
.text-head { flex: 0 0 auto; padding: 2px 2px 10px; }
.text-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.text-head p { margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.text-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.textarea {
  flex: 0 0 auto; width: 100%; min-height: 108px; max-height: 32vh;
  padding: 14px; border-radius: 18px; resize: none;
  font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--panel); border: 1px solid var(--line);
  outline: none;
}
.textarea::placeholder { color: var(--muted-2); }
.textarea:focus { border-color: rgba(252, 92, 47, 0.5); box-shadow: 0 0 0 3px rgba(252, 92, 47, 0.12); }
.text-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.result-card {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 16px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line);
  scrollbar-width: none;
}
.result-card::-webkit-scrollbar { display: none; }
.rc-empty {
  height: 100%; min-height: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--muted-2); font-size: 12.5px; line-height: 1.5;
}
.rc-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  color: var(--coral-soft); background: rgba(252, 92, 47, 0.12); border: 1px solid rgba(252, 92, 47, 0.22);
}
.rc-icon svg { width: 22px; height: 22px; }
.rc-block + .rc-block { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.rc-label {
  display: block; margin-bottom: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2);
}
.rc-dst { font-size: 19px; font-weight: 700; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.rc-src { font-size: 13px; line-height: 1.55; color: #98a3b8; white-space: pre-wrap; word-break: break-word; }
.rc-tools { display: flex; gap: 7px; margin-top: 11px; }
.tool {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 10px; font-size: 11.5px; font-weight: 700;
  color: #cfd8e8; background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line);
}
.tool svg { width: 14px; height: 14px; }
.rc-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* ── 카메라 ──────────────────────────────────── */
.cam-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 2px 2px 10px;
}
.cam-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.cam-target {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 10px; border-radius: 999px;
  font-size: 11px; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.cam-target b { color: #ffbda7; font-size: 11.5px; }
.cam-target svg { width: 13px; height: 13px; }
.cam-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.cam-stage {
  position: relative; flex: 1.25 1 0; min-height: 0;
  border-radius: 20px; overflow: hidden;
  background: radial-gradient(90% 90% at 50% 40%, #17203300, #0d1420), #0e1522;
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.cam-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.cam-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-stage.has-shot .cam-placeholder { display: none; }
.cam-stage.on video { display: block; }
.cam-frame { position: absolute; inset: 14px; pointer-events: none; opacity: 0; transition: opacity 0.25s; }
.cam-stage.on .cam-frame { opacity: 0.85; }
.cam-frame i { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 6px; }
.cam-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.cam-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.cam-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.cam-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.cp-sub { font-size: 11px; color: #6f7b90; }
.cam-placeholder {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px; text-align: center; color: var(--muted-2); font-size: 12.5px; line-height: 1.5;
}
.cam-stage.on .cam-placeholder { display: none; }
.cp-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  color: var(--coral-soft); background: rgba(252, 92, 47, 0.12); border: 1px solid rgba(252, 92, 47, 0.22);
}
.cp-icon svg { width: 26px; height: 26px; }
.cam-loading {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(10, 15, 25, 0.7); backdrop-filter: blur(3px);
  font-size: 12.5px; color: #e6ecf7;
}
.spin {
  width: 26px; height: 26px; border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.18); border-top-color: var(--coral);
  animation: spin 0.8s linear infinite;
}
.cam-actions { flex: 0 0 auto; display: flex; gap: 7px; }
.cam-actions .btn { padding: 12px 8px; font-size: 12.5px; }
.cam-result { flex: 0.95 1 0; min-height: 0; font-size: 13px; }
.cam-wrap.has-result .cam-stage { flex: 0 0 30%; }
.cam-wrap.has-result .cam-result { flex: 1 1 auto; }
.cam-result .rc-dst { font-size: 16.5px; }

/* ── 탭바 ────────────────────────────────────── */
.tabbar {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 7px 6px calc(7px + var(--safe-b));
  background: rgba(10, 15, 25, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 0; border-radius: 12px;
  font-size: 10.5px; font-weight: 700; color: var(--muted-2);
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--coral); }
.tab.active svg { stroke-width: 2; }

/* ── 언어 시트 ────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end;
  background: rgba(4, 8, 15, 0.62); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.sheet.open { opacity: 1; visibility: visible; pointer-events: auto; }
.sheet-card {
  width: 100%; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 84dvh;
  padding: 16px 14px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, #16202f, #121a27);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--line-2);
  transform: translateY(14px); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.open .sheet-card { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h3 { font-size: 15.5px; font-weight: 800; }
.lang-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  overflow-y: auto; padding-bottom: 4px; scrollbar-width: none;
}
.lang-grid::-webkit-scrollbar { display: none; }
.lang-cell {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 14px; text-align: left;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.lang-cell .lg-flag {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 9px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.03em;
  color: #cfd8e8; background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.lang-cell .lg-txt { min-width: 0; }
.lang-cell b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-cell small { display: block; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-cell.sel { border-color: rgba(252, 92, 47, 0.6); background: rgba(252, 92, 47, 0.14); }
.lang-cell.sel b { color: #ffd0bf; }

/* ── 토스트 ──────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 90;
  transform: translate(-50%, 8px);
  max-width: min(92vw, 460px);
  padding: 11px 15px; border-radius: 13px;
  font-size: 12.5px; line-height: 1.45; text-align: center;
  color: #f3f6fc; background: #1e2a3e; border: 1px solid var(--line-2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 작은 화면 ───────────────────────────────── */
@media (max-height: 700px) {
  .phrases .chiprow:nth-child(2) { display: none; }
  .panel.other { flex: 1 1 0; }
  .mic { width: 68px; height: 68px; }
  .mic svg { width: 28px; height: 28px; }
  .topbar { padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .brand-text span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
