/* Tturi 해외판 웹 — 데스크톱 전체 화면(상단 바 + 왼쪽 메뉴 + 본문), 좁으면 아래 탭 바.
   색은 brand/BRIEF.md 팔레트: 잉크 #12172B · 크림 #F2EDE4 · 앰버 #F0B45C(다크) · 배경 #0E1220 · 경고 #E5484D */
:root {
  --bg: #131314;
  --surface: #1B1B1C;
  --surface-2: #2A2A2B;
  --line: #2E2E30;
  --fg: #E5E2E3;
  --muted: #8E9192;
  --accent: #F8BB63;
  --accent-ink: #2B1B02;
  --danger: #FF6369;
  --ok: #57C78E;
  --radius: 16px;
  --top: 64px;
  --side: 232px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body { font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── 뼈대 ── */
.shell { display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: var(--top) 1fr; min-height: 100vh; }
.top {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
  padding: 0 24px; background: rgba(19, 19, 20, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.01em; width: calc(var(--side) - 44px); }
.mark { display: inline-block; width: 30px; height: 30px; background: var(--accent); -webkit-mask: url(/assets/mark.svg) center / contain no-repeat; mask: url(/assets/mark.svg) center / contain no-repeat; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px; color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--fg); font: inherit; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; text-decoration: none; white-space: nowrap; }
.chip b { color: var(--accent); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; text-decoration: none; }

.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--line); }
.side a[data-nav] { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 600; }
.side a[data-nav]:hover { background: var(--surface); color: var(--fg); }
.side a[data-nav].on { background: var(--surface-2); color: var(--fg); }
.side .ic { width: 20px; text-align: center; }
.side-foot { margin-top: auto; padding: 0 8px; }
.side-foot a { color: var(--muted); }

.main { padding: 28px 32px 64px; min-width: 0; outline: none; }

/* ── 공통 부품 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn[disabled], .btn.off { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.discord { background: #5865F2; color: #fff; }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge.live { background: rgba(87, 199, 142, .14); color: var(--ok); }
.badge.hot { background: var(--accent); color: var(--accent-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
h1, h2, h3 { letter-spacing: -.02em; margin: 0; }
.h-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 14px; }
.h-sec h2 { font-size: 20px; }

/* ── 홈 히어로 ── */
/* 배너: 문구 | 세 단계 안내 | 사진. 좁으면 안내가 문구 아래로 */
.hero { position: relative; overflow: hidden; border-radius: 24px; min-height: 400px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px) minmax(280px, .9fr); background: var(--surface); border: 1px solid var(--line); }
.hero-copy { padding: 44px; display: flex; flex-direction: column; justify-content: center; gap: 16px; z-index: 1; }
.hero-copy h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; }
.hero-copy p { color: var(--muted); max-width: 46ch; margin: 0; font-size: 16px; }
.hero-art { position: relative; }
.howto { align-self: center; margin: 28px 24px 28px 0; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.howto-h { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.howto ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.howto li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.howto li > b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; border: 1.5px solid var(--accent); color: var(--accent); }
.howto li > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.howto strong { font-size: 15px; }
.howto span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.howto em { font-style: normal; font-weight: 700; color: var(--fg); }
.howto .btn { margin-top: 8px; }
.dlogo { vertical-align: -4px; margin-right: 4px; color: #5865F2; }
.btn.discord .dlogo { color: #fff; margin-right: 0; }
.callpick { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); }
  .howto { grid-column: 1; grid-row: 2; margin: 0 44px 36px; }
  .hero-art { grid-column: 2; grid-row: 1 / span 2; }
}
/* 세로 사진을 가로 칸에 채우니 얼굴 높이(--focus, characters.json의 focus)에 맞춰 보여 준다 */
.hero-art .portrait { position: absolute; inset: 0; background-position: var(--focus, 50% 22%); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ring { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.ring i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(248, 187, 99, .6); } 70% { box-shadow: 0 0 0 10px rgba(248, 187, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(248, 187, 99, 0); } }

/* 캐릭터 그림(이미지 없으면 이니셜) */
.portrait { background-size: cover; background-position: center top; display: grid; place-items: center; }
.portrait .ini { font-size: clamp(48px, 6vw, 96px); font-weight: 800; color: rgba(255, 255, 255, .88); text-shadow: 0 4px 30px rgba(0, 0, 0, .35); letter-spacing: -.04em; }

/* ── 캐릭터 그리드 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cc { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; padding: 0; transition: transform .15s ease, border-color .15s ease; }
.cc:hover { transform: translateY(-3px); border-color: #444748; }
.cc .ph { position: relative; }
.cc .portrait { aspect-ratio: 3 / 4; }
.cc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 미리듣기 버튼(한국판 .cplay와 같은 모양) */
.cplay { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; padding: 0; line-height: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .12s ease; }
.cplay:hover { transform: scale(1.08); }
.cplay .i-play { margin-left: 2px; }
.lchip { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .5); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* 이중 언어 표시(상세 패널) */
.bilang { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lchip.static { position: static; background: var(--surface-2); color: var(--accent); }
.cplay.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cc .meta { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.cc .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 16px; }
.cc .line { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc .badge { position: absolute; top: 12px; left: 12px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ── 오른쪽 상세 패널 ── */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 40; transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; }
.drawer.open { transform: none; }
.drawer .portrait { aspect-ratio: 4 / 5; }
.drawer .body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer .x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); cursor: pointer; font-size: 18px; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.steps { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.steps li.done { color: var(--fg); }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.steps li.done .dot { background: var(--ok); color: #08231A; border-color: var(--ok); }

/* ── 모달(로그인) ── */
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .fine { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.gbtn { background: #fff; color: #1f1f1f; }

/* ── 계정·요금 ── */
.page-h { margin-bottom: 22px; }
.page-h h1 { font-size: 28px; }
.page-h p { color: var(--muted); margin: 6px 0 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan.pop { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .price { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.plan .per { color: var(--muted); font-size: 13px; }
.plan .badge { position: absolute; top: 18px; right: 18px; }
.note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.banner { padding: 14px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 18px; }
.banner.ok { border-color: rgba(87, 199, 142, .5); }
.banner.err { border-color: rgba(229, 72, 77, .6); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; z-index: 60; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--danger); }

/* ── 좁은 화면: 아래 탭 바 ── */
@media (max-width: 900px) {
  :root { --side: 0px; }
  .shell { grid-template-columns: 1fr; padding-bottom: 64px; }
  .brand { width: auto; }
  .brand span { display: none; }
  .search { max-width: none; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 64px; flex-direction: row; justify-content: space-around; padding: 6px; border-right: 0; border-top: 1px solid var(--line); background: rgba(19, 19, 20, .95); z-index: 25; }
  .side a[data-nav] { flex-direction: column; gap: 2px; padding: 6px 10px; font-size: 11px; }
  .side-foot { display: none; }
  .main { padding: 18px 16px 40px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 320px; order: -1; grid-column: 1; grid-row: auto; }
  .howto { grid-column: 1; grid-row: auto; margin: 0 16px 20px; }
  .hero-copy { padding: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .chip.min { display: none; }
}

/* ── 통화 화면 ── */
.call { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: var(--bg); overflow: hidden; }
.call-bg { position: absolute; inset: -40px; filter: blur(40px) brightness(.45); }
.call-bg .portrait { position: absolute; inset: 0; }
.call-bg .ini { display: none; }
.call-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px; width: min(420px, 100vw); }
.call-face { position: relative; width: 180px; height: 180px; border-radius: 50%; overflow: visible; margin-bottom: 8px; }
.call-face .portrait { width: 100%; height: 100%; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); }
.call-face .ini { font-size: 72px; }
.call-ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; transition: opacity .15s; }
.call-ring.on { opacity: .9; animation: talk 1.1s ease-in-out infinite; }
@keyframes talk { 50% { transform: scale(1.05); opacity: .45; } }
.call h2 { font-size: 30px; }
.call-status { font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.call-note { min-height: 40px; max-width: 34ch; }
.call-actions { display: flex; gap: 22px; margin: 18px 0 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.round.ghost { background: rgba(255, 255, 255, .12); }
.round.ghost.on { background: var(--fg); color: var(--bg); }
.round.hang { background: var(--danger); color: #fff; transform: rotate(135deg); }
.call-ai { margin-top: 10px; }
.call-dev { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.call-dev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-dev.warn { border-color: var(--accent); }
.devpanel { width: 100%; display: none; flex-direction: column; gap: 10px; text-align: left; padding: 14px; border-radius: 14px; background: rgba(27, 27, 28, .92); border: 1px solid var(--line); }
.devpanel.open { display: flex; }
.devpanel label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.devpanel select { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; font-size: 14px; padding: 0 10px; max-width: 100%; }
.devpanel .hint { font-size: 12px; color: var(--accent); margin: 0; }
