:root {
  --bg: #f6f4f1;
  --panel: #ffffff;
  --ink: #1f2328;
  --sub: #5c6470;
  --line: #e4e0da;
  --accent: #b88a5a;
  --accent-ink: #ffffff;
  --video: #2f6f6a;
  --voice: #4b5a8a;
  --shadow: 0 6px 24px rgba(31, 35, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --panel: #1d2024;
    --ink: #eceae6;
    --sub: #a3a9b2;
    --line: #2e3238;
    --accent: #d1a676;
    --accent-ink: #1b1b1b;
    --video: #6fb3ab;
    --voice: #9aa8d8;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.top {
  max-width: 1080px; margin: 0 auto; padding: 18px 16px 10px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.tag { font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.ai-note { font-size: 13px; color: var(--sub); }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; }

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: #e9e5df; box-shadow: var(--shadow);
}
.layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s linear;
}
.layer.show { opacity: 1; }
.layer.talk { z-index: 2; transition: opacity .25s linear; }
.start {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  font: inherit; font-size: 17px; font-weight: 600; color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: 999px; padding: 12px 26px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  display: inline-flex; align-items: center; gap: 10px;
}
.start:hover { filter: brightness(1.05); }
.start:focus-visible, .card:focus-visible, .mute:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.start-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.mute {
  position: absolute; right: 12px; top: 12px; font: inherit; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, .38); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.caption {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); max-width: 86%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; padding: 8px 16px; border-radius: 10px; text-align: center;
}

.pick { margin-top: 22px; }
.pick h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card {
  font: inherit; text-align: left; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 14px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.card .name { font-size: 16px; font-weight: 700; }
.card .desc { font-size: 13px; color: var(--sub); }
.mode { align-self: flex-start; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.mode.video { color: var(--video); border: 1px solid var(--video); }
.mode.voice { color: var(--voice); border: 1px solid var(--voice); }
.chosen {
  margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px;
}
.foot { max-width: 1080px; margin: 0 auto; padding: 4px 16px 28px; font-size: 12px; color: var(--sub); }

@media (max-width: 820px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card.wide { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .brand { font-size: 18px; }
  .start { font-size: 15px; padding: 10px 20px; }
  .card { padding: 12px; }
  .card .name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .layer { transition: none; }
  .start-dot { animation: none; }
  .card { transition: none; }
}

/* 통화 화면 */
.call { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.call-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--line); transition: box-shadow .2s ease; }
.avatar.talk { box-shadow: 0 0 0 4px var(--accent); animation: ring 1.2s ease-in-out infinite; }
.avatar.hear { box-shadow: 0 0 0 4px var(--voice); }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 3px var(--accent); } 50% { box-shadow: 0 0 0 7px var(--accent); } }
.call-meta { flex: 1 1 180px; min-width: 0; }
.call-co { font-size: 18px; font-weight: 700; }
.call-sub { font-size: 13px; color: var(--sub); }
.call-state { font-size: 14px; margin-top: 2px; color: var(--ink); }
.call-btns { display: flex; gap: 8px; }
.micbtn, .hang { font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.micbtn { background: var(--line); color: var(--ink); }
.micbtn.off { background: #8a8f96; color: #fff; }
.hang { background: #c94a43; color: #fff; }
.micbtn:focus-visible, .hang:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lines { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.line { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 15px; }
.line.ara { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.line.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.line.sys { align-self: center; background: none; color: var(--sub); font-size: 13px; padding: 2px 8px; }
.line.src { align-self: flex-start; background: none; color: var(--sub); font-size: 12px; padding: 0 10px; margin-top: -4px; }
.call-stat { margin-top: 10px; font-size: 12px; color: var(--sub); min-height: 1em; }
@media (prefers-reduced-motion: reduce) { .avatar.talk { animation: none; } }

/* 코치 메뉴·연습·카메라·시연 대본·약속 카드 */
.coach-h { margin: 22px 0 10px; font-size: 16px; color: var(--sub); font-weight: 600; }
.cards.coaches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reclink { color: inherit; margin-left: 10px; font-weight: 600; }
@media (max-width: 820px) { .cards.coaches { grid-template-columns: 1fr; } }
.line.src a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.line.stats { align-self: stretch; background: var(--bg); border: 1px dashed var(--line); font-size: 13px; color: var(--sub); }
.line.card { align-self: stretch; background: var(--bg); border: 1px solid var(--accent); }
.line.card b { display: block; margin-bottom: 4px; }
.cam { width: 160px; border-radius: 10px; margin-top: 10px; border: 1px solid var(--line); }
.demo { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.demo button { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: inherit; cursor: pointer; }
.micbtn.rec { background: #c0392b; color: #fff; }

.langsel { font-size: 13px; font-weight: 400; margin-left: 12px; color: var(--sub); }
.langsel select { font: inherit; margin-left: 6px; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: inherit; }

/* 두 사람 대화 — 리안 창(오른쪽 아래) */
.rianpane { position: absolute; right: 12px; bottom: 12px; width: 24%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; z-index: 3; box-shadow: 0 4px 18px rgba(0,0,0,.25); background: #ddd; }
.rianpane img, .rianpane video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rianpane video { opacity: 0; transition: opacity .2s; }
.rianpane video.show { opacity: 1; }
.rianpane .rname { position: absolute; left: 8px; bottom: 6px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.line.rian { align-self: flex-start; background: var(--bg); border: 1px solid #6b7c93; }
.line.rian::before { content: "리안 "; font-weight: 600; font-size: 12px; color: #6b7c93; }

/* 공개 주소: 기억·텔레그램·저장 단추 없음 */
#memBtn,#forgetBtn,#tgBtn,#saveBtn{display:none!important}
