/* 웍스AI 동시통역 — 공통 디자인 토큰과 부품.
   색 원칙: 바탕은 차분한 남색 잉크와 흰색. 언어마다 고유 색(점·이름표 글자색)을 주어 「누가 어떤 말로 했는지」를 색으로 읽게 한다.
   상자 앞·위 색 줄은 쓰지 않는다. 그림자는 떠 있는 것(시트·토스트)에만. */
@import url("/static/fonts/pretendard.css");

:root {
  --ink: #101426; --ink-2: #3a4159; --ink-3: #6c738a; --ink-4: #9aa0b4;
  --bg: #ffffff; --bg-2: #f4f5f9; --bg-3: #e9ebf2; --line: #dfe2ec; --line-2: #c9cedd;
  --brand: #2b5cff; --brand-ink: #1c44d6; --brand-soft: #e8eeff;
  --live: #f0443a; --live-soft: #ffe9e7; --ok: #0e9f6e; --ok-soft: #e2f6ee; --warn: #b7791f; --warn-soft: #fdf3dc;
  --r-s: 8px; --r-m: 12px; --r-l: 18px; --r-xl: 26px;
  --shadow: 0 12px 40px rgba(16, 20, 38, .16), 0 2px 8px rgba(16, 20, 38, .08);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans Thai",
          "Noto Sans Devanagari", "Noto Sans Khmer", "Noto Sans Myanmar", "Noto Sans Bengali", "Noto Sans Sinhala", "Noto Sans Arabic", "Segoe UI", sans-serif;
  /* 언어 색 */
  --l-ko: #2b5cff; --l-en: #0e9f6e; --l-vi: #e8730c; --l-zh: #e03a3a; --l-ja: #c2389b; --l-th: #7c4dff; --l-id: #0a9bb0; --l-ne: #b4532a;
  --l-uz: #2f8f2f; --l-km: #a05ad6; --l-my: #d19a00; --l-mn: #3c7bd9; --l-fil: #d9486e; --l-bn: #1d8a7a; --l-hi: #d65a16; --l-ur: #4f7f1f;
  --l-si: #9c6b00; --l-ru: #4a5fd1; --l-kk: #1f9ab8; --l-ky: #c7452f; --l-es: #d97706; --l-fr: #3b6fd4; --l-de: #5b6472; --l-pt: #17946b;
  --l-it: #c0446a; --l-ar: #0f8a5f; --l-tr: #d43f3f; --l-pl: #b83268; --l-nl: #e06a1b; --l-ms: #2a7fbf;
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #f2f4fb; --ink-2: #c5cade; --ink-3: #8f96b0; --ink-4: #646b85;
  --bg: #0d1020; --bg-2: #161a2e; --bg-3: #1f243c; --line: #2a3050; --line-2: #3a4168;
  --brand: #6f90ff; --brand-ink: #9db3ff; --brand-soft: #1b2550;
  --live: #ff6258; --live-soft: #3a1a1c; --ok: #37c48f; --ok-soft: #12352b; --warn: #e2b04a; --warn-soft: #3a2e12;
  --shadow: 0 16px 48px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--bg); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-danger { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, var(--line)); }
.btn-danger:hover { background: var(--live-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

/* ── 입력 ── */
.field { display: grid; gap: 6px; }
.field > span, .field > label > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--bg); font-size: 16px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.hint { font-size: 13px; color: var(--ink-3); }

/* 스위치(체크박스 대신) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch b { font-weight: 600; font-size: 15px; }
.switch small { display: block; font-size: 13px; color: var(--ink-3); font-weight: 400; }

/* 고르기 칩(라디오·체크 대신) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg);
  font-size: 15px; font-weight: 500; user-select: none; }
.chip:hover { background: var(--bg-2); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .dot { margin: 0; }

/* 언어 점 */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lc, var(--ink-4)); flex: none; }
[data-l="ko"] { --lc: var(--l-ko); } [data-l="en"] { --lc: var(--l-en); } [data-l="vi"] { --lc: var(--l-vi); } [data-l="zh"] { --lc: var(--l-zh); }
[data-l="ja"] { --lc: var(--l-ja); } [data-l="th"] { --lc: var(--l-th); } [data-l="id"] { --lc: var(--l-id); } [data-l="ne"] { --lc: var(--l-ne); }
[data-l="uz"] { --lc: var(--l-uz); } [data-l="km"] { --lc: var(--l-km); } [data-l="my"] { --lc: var(--l-my); } [data-l="mn"] { --lc: var(--l-mn); }
[data-l="fil"] { --lc: var(--l-fil); } [data-l="bn"] { --lc: var(--l-bn); } [data-l="hi"] { --lc: var(--l-hi); } [data-l="ur"] { --lc: var(--l-ur); }
[data-l="si"] { --lc: var(--l-si); } [data-l="ru"] { --lc: var(--l-ru); } [data-l="kk"] { --lc: var(--l-kk); } [data-l="ky"] { --lc: var(--l-ky); }
[data-l="es"] { --lc: var(--l-es); } [data-l="fr"] { --lc: var(--l-fr); } [data-l="de"] { --lc: var(--l-de); } [data-l="pt"] { --lc: var(--l-pt); }
[data-l="it"] { --lc: var(--l-it); } [data-l="ar"] { --lc: var(--l-ar); } [data-l="tr"] { --lc: var(--l-tr); } [data-l="pl"] { --lc: var(--l-pl); }
[data-l="nl"] { --lc: var(--l-nl); } [data-l="ms"] { --lc: var(--l-ms); }

/* ── 시트·대화상자 ── */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--bg); border-radius: var(--r-xl); box-shadow: var(--shadow); width: min(560px, calc(100vw - 24px));
  max-height: min(86dvh, 820px); overflow: hidden; }
dialog::backdrop { background: rgba(10, 12, 24, .5); }
dialog[open] { display: flex; flex-direction: column; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px 24px; }
.dlg-head h2 { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.dlg-body { padding: 4px 24px 24px; overflow-y: auto; display: grid; gap: 22px; align-content: start; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 90dvh; }
}
.group { display: grid; gap: 10px; }
.group > h3 { font-size: 14px; font-weight: 700; color: var(--ink-3); }

/* 토스트 */
.toasts { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 120px); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow); animation: rise .18s ease-out; }
.toast.err { background: var(--live); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── 사이트 머리·바닥 ── */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.top-nav { display: flex; gap: 4px; margin-right: auto; }
.top-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.top-nav a:hover { background: var(--bg-2); color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.top-end { display: flex; align-items: center; gap: 10px; }
.top-meta { font-size: 14px; color: var(--ink-3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .top-in { padding: 0 16px; gap: 10px; } .top-nav .opt, .top-meta { display: none; } .top-nav a { padding: 8px; } }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 760px) { .wrap { padding: 0 16px; } }
.foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.foot h4 { font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 16px; margin-bottom: 8px; }
.foot-brand svg { width: 24px; height: 24px; }
.foot-base { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 20px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > div:first-child { grid-column: 1 / -1; } }

/* ── 작업실 ── */
/* 🔴 padding 을 통째로 쓰면 .wrap 의 좌우 여백(24px)이 지워져 머리글·바닥글과 폭이 어긋난다 */
.page { padding-top: 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.25; }
.page-head p { color: var(--ink-3); margin-top: 4px; }
.panel { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg); }
.panel-pad { padding: 24px; }
.empty { padding: 56px 24px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.badge.live { background: var(--live-soft); color: var(--live); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* 모드 고르기 */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mode { text-align: left; padding: 18px; border-radius: var(--r-l); border: 1px solid var(--line-2); background: var(--bg); display: grid; gap: 8px; align-content: start; }
.mode:hover { border-color: var(--ink-3); }
.mode svg { width: 30px; height: 30px; color: var(--ink-2); }
.mode b { font-size: 17px; }
.mode span { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.mode[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); background: var(--brand-soft); }
.mode[aria-checked="true"] svg { color: var(--brand); }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr 1fr; } }

.rows { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); text-decoration: none; }
.row:first-child { border-top: 0; }
a.row:hover { background: var(--bg-2); }
.row h3 { font-size: 16px; font-weight: 650; }
.row .meta { font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.row .end { display: flex; align-items: center; gap: 10px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 650; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.off td { color: var(--ink-4); }
.tbl-wrap { overflow-x: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* 안내 화면 */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg-2); }
.card { width: min(440px, 100%); background: var(--bg); border-radius: var(--r-xl); padding: 32px; border: 1px solid var(--line); display: grid; gap: 18px; }
.card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.card p { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* 테마 단추 — 지금 밝으면 달(어둡게), 어두우면 해(밝게) */
.theme-ico .sun { display: none; } [data-theme="dark"] .theme-ico .sun { display: block; } [data-theme="dark"] .theme-ico .moon { display: none; }

/* 암호 칸 — 보기 단추 */
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 38px; border: 0; background: none; border-radius: 10px; color: var(--ink-3); display: grid; place-items: center; }
.pw-eye:hover { background: var(--bg-2); color: var(--ink); }
.pw-eye[aria-pressed="true"] { color: var(--brand); }
.pw-eye svg { width: 20px; height: 20px; }
.form-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--live-soft); color: var(--live); font-weight: 600; font-size: 14.5px; }
