/* ============================================================
   Accurate Translator — 스웨덴어 · 한국어
   ============================================================ */

:root {
  --bg:          #f7f8fa;
  --bg-elev:     #ffffff;
  --bg-sunken:   #eef1f5;
  --border:      #dfe3ea;
  --border-soft: #e9ecf1;
  --text:        #1a1d23;
  --text-muted:  #676f7d;
  --accent:      #2a5db0;   /* 스웨덴 국기 파랑 계열 */
  --accent-weak: #e8effb;
  --gold:        #b8860b;   /* 스웨덴 국기 노랑 계열 (가독성 보정) */
  --gold-weak:   #fdf6e3;
  --danger:      #b3261e;
  --danger-weak: #fdecea;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(16, 24, 40, .05), 0 4px 12px rgba(16, 24, 40, .05);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
          "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #14161a;
    --bg-elev:     #1c1f25;
    --bg-sunken:   #23272e;
    --border:      #30353d;
    --border-soft: #272b32;
    --text:        #e8eaee;
    --text-muted:  #9aa2b1;
    --accent:      #7aa7f0;
    --accent-weak: #1e2734;
    --gold:        #e0b85c;
    --gold-weak:   #2a2418;
    --danger:      #f2b8b5;
    --danger-weak: #2e1b1a;
    --shadow:      0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg:          #14161a;
  --bg-elev:     #1c1f25;
  --bg-sunken:   #23272e;
  --border:      #30353d;
  --border-soft: #272b32;
  --text:        #e8eaee;
  --text-muted:  #9aa2b1;
  --accent:      #7aa7f0;
  --accent-weak: #1e2734;
  --gold:        #e0b85c;
  --gold-weak:   #2a2418;
  --danger:      #f2b8b5;
  --danger-weak: #2e1b1a;
  --shadow:      0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: 100%; max-width: 840px; margin: 0 auto; padding-inline: 16px; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  line-height: 1.05; letter-spacing: .04em;
}
.brand-mark b { font-weight: 700; }
.brand-mark i { font-style: normal; font-weight: 700; color: #ffd75e; }
.brand-text { min-width: 0; }
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.brand-text p { margin: 0; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; padding-top: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--text-muted); font: inherit; font-size: 14.5px; font-weight: 550;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: background .12s, color .12s;
}
.tab:hover { background: var(--bg-sunken); color: var(--text); }
.tab.is-active { background: var(--accent-weak); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ── Panels ─────────────────────────────────────────────── */
main { padding-block: 20px 56px; }
.panel[hidden] { display: none; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.panel-head p { margin: 2px 0 0; font-size: 13.5px; }
.panel-head-actions { display: flex; gap: 6px; }

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 550;
  padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  transition: background .12s, border-color .12s, opacity .12s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--bg-sunken); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--danger-weak); }
.icon-btn {
  appearance: none; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted);
  width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; line-height: 1;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--text); }

:is(.btn, .tab, .icon-btn, input, textarea, select, a):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

/* ── Banner / status ────────────────────────────────────── */
.banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--gold-weak);
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px;
}
.banner[hidden] { display: none; }
.banner-body { flex: 1 1 320px; min-width: 0; }
.banner-body strong { display: block; font-size: 14.5px; }
.banner-body p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-muted); }

.status {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius); padding: 14px 16px; font-size: 14px;
  border: 1px solid var(--border); background: var(--bg-elev);
}
.status[hidden] { display: none; }
.status.is-error { background: var(--danger-weak); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.status.is-error a { color: inherit; }

.spinner {
  flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ── Form ───────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.field-head > label { font-size: 13.5px; font-weight: 600; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

.direction { display: flex; gap: 12px; flex-wrap: wrap; }
.direction label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.direction input { accent-color: var(--accent); margin: 0; }

textarea, input[type="password"], input[type="text"], select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
select { cursor: pointer; }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

kbd {
  font-family: var(--mono); font-size: 11px;
  border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; background: var(--bg-sunken);
}

/* ── Idiom / result content ─────────────────────────────── */
.headline-ko {
  font-size: clamp(22px, 5vw, 30px); font-weight: 700; letter-spacing: -.02em;
  line-height: 1.35; margin: 0;
}
.headline-sv {
  font-size: clamp(18px, 4vw, 23px); font-weight: 600; color: var(--accent);
  line-height: 1.4; margin: 10px 0 0;
}
.romanization { font-family: var(--mono); font-size: 13px; color: var(--text-muted); margin: 6px 0 0; }

.sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.sec:first-of-type { border-top: 0; padding-top: 0; }
.sec-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 10px;
}
.sec p { margin: 0 0 8px; }
.sec p:last-child { margin-bottom: 0; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.kv dd { margin: 0; }

/* 단어 풀이 */
.words { display: grid; gap: 8px; }
.word {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 4px 16px; align-items: baseline;
  background: var(--bg-sunken); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.word-surface { font-weight: 650; font-size: 15.5px; color: var(--accent); overflow-wrap: anywhere; }
.word-meaning { font-size: 14.5px; overflow-wrap: anywhere; }
.word-gram { grid-column: 1; font-size: 12px; color: var(--text-muted); font-family: var(--mono); overflow-wrap: anywhere; }
.word-note { grid-column: 2; font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 560px) {
  .word { grid-template-columns: 1fr; gap: 2px; }
  .word-gram, .word-note { grid-column: 1; }
}

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-weak); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.tag-gold { background: var(--gold-weak); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }

.example { background: var(--bg-sunken); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 14px; }
.example .ex-sv { font-weight: 550; margin: 0; }
.example .ex-ko { margin: 4px 0 0; color: var(--text-muted); font-size: 14.5px; }

.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 5px; }
.list li:last-child { margin-bottom: 0; }

.card-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ── History ────────────────────────────────────────────── */
.history-list { display: grid; gap: 10px; }
.history-item {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit;
}
.history-item:hover { border-color: var(--accent); }
.history-item .h-date { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.history-item .h-ko { font-weight: 650; margin-top: 2px; }
.history-item .h-sv { font-size: 14px; color: var(--accent); }
.empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 32px 0; }

/* ── Dialog ─────────────────────────────────────────────── */
.dialog {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text);
  padding: 0; width: min(520px, calc(100vw - 32px));
  /* 내용이 길어지면 다이얼로그가 화면을 넘겨 저장 버튼이 닿지 않게 된다.
     본문만 스크롤시키고 버튼줄은 아래에 붙여 둔다. */
  max-height: calc(100dvh - 32px);
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  overflow: hidden;
}
.dialog::backdrop { background: rgba(10, 12, 16, .5); }
.dialog-inner {
  display: flex; flex-direction: column;
  max-height: calc(100dvh - 32px);
  padding: 22px;
}
.dialog h2 { margin: 0 0 16px; font-size: 19px; flex: none; }
.dialog-body { overflow-y: auto; flex: 1 1 auto; margin: 0 -22px; padding: 0 22px; }
.dialog-actions {
  display: flex; align-items: center; gap: 8px; flex: none;
  margin: 0 -22px -22px; padding: 16px 22px 22px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elev);
}
.dialog-actions .spacer { flex: 1; }

.notice {
  background: var(--gold-weak); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
}
.notice strong { font-size: 13px; }
.notice p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { padding-block: 20px 36px; border-top: 1px solid var(--border-soft); }
.site-footer p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-sunken); padding: 1px 5px; border-radius: 4px; }

a { color: var(--accent); }

.btn svg, .icon-btn svg { flex: none; }

/* ── 사용량 표시 ───────────────────────────────────────── */

/* 상태색은 고정값이다. 시리즈 색으로 재사용하지 않는다. */
:root {
  --status-normal:   var(--accent);
  --status-warning:  #c68b00;
  --status-critical: #d03b3b;
  --meter-track:     color-mix(in srgb, var(--accent) 13%, var(--bg-sunken));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --status-warning:  #fab219;
    --status-critical: #f08a8a;
    --meter-track:     color-mix(in srgb, var(--accent) 18%, var(--bg-sunken));
  }
}
:root[data-theme="dark"] {
  --status-warning:  #fab219;
  --status-critical: #f08a8a;
  --meter-track:     color-mix(in srgb, var(--accent) 18%, var(--bg-sunken));
}

.usage {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px;
}
.usage-summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 18px; cursor: pointer; list-style: none; flex-wrap: wrap;
}
.usage-summary::-webkit-details-marker { display: none; }
.usage-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.usage-title { font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 7px; }
/* 폰트에 기대지 않도록 삼각형을 CSS 로 그린다. */
.usage-title::before {
  content: ""; width: 0; height: 0;
  border-left: 5px solid var(--text-muted);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .15s ease;
}
.usage[open] .usage-title::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .usage-title::before { transition: none; } }
.usage-brief { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.usage-body { padding: 0 18px; }
.usage-actions { padding: 12px 18px 16px; display: flex; justify-content: flex-end; }
.usage-foot { margin: 14px 0 0; line-height: 1.55; }

/* KPI 타일 */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px; background: var(--border-soft);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden;
}
.tile { display: flex; flex-direction: column; gap: 1px; padding: 11px 13px; background: var(--bg-elev); }
.tile-label { font-size: 11.5px; color: var(--text-muted); }
.tile-value { font-size: 19px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.tile-sub { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

/* 미터 */
.meters { margin-top: 18px; }
.meters-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.meters-head .sec-title { margin: 0; }

.meter { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; }
.meter:last-child { margin-bottom: 0; }
.meter-label { font-size: 12.5px; color: var(--text-muted); }
.meter-track { height: 8px; border-radius: 4px; background: var(--meter-track); overflow: hidden; }
.meter-fill {
  height: 100%; border-radius: 4px; background: var(--status-normal);
  transition: width .35s ease, background-color .2s;
}
.meter-fill[data-severity="warning"]  { background: var(--status-warning); }
.meter-fill[data-severity="critical"] { background: var(--status-critical); }
.meter-value { font-size: 12px; color: var(--text-muted); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }
@media (max-width: 480px) {
  .meter { grid-template-columns: 64px 1fr; row-gap: 2px; }
  .meter-value { grid-column: 2; justify-self: end; }
}

/* ── 검색 / 거르기 도구 ────────────────────────────────── */

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.toolbar input[type="search"] {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 13px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  appearance: none; font: inherit; font-size: 13px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted);
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.chip:hover { background: var(--bg-sunken); color: var(--text); }
.chip.is-active {
  background: var(--accent-weak); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }

/* ── 단어장 ────────────────────────────────────────────── */

.vocab-list { display: grid; gap: 8px; }
.vocab {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 16px; align-items: baseline;
}
.vocab-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vocab-base { font-size: 16px; font-weight: 650; color: var(--accent); overflow-wrap: anywhere; }
.vocab-pos { font-size: 11.5px; color: var(--text-muted); font-family: var(--mono); overflow-wrap: anywhere; }
.vocab-meaning { font-size: 14.5px; overflow-wrap: anywhere; }
.vocab-sources { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.vocab-source {
  appearance: none; font: inherit; font-size: 12px; text-align: left;
  background: var(--bg-sunken); border: 1px solid var(--border-soft); color: var(--text-muted);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vocab-source:hover { border-color: var(--accent); color: var(--text); }
.vocab-source:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .vocab { grid-template-columns: 1fr; gap: 2px; }
  .vocab-meaning { margin-top: 2px; }
}

#browse-detail:not([hidden]) { margin-bottom: 20px; }

/* ── 집계 줄 ───────────────────────────────────────────── */

.summary {
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
  padding: 12px 18px; margin-bottom: 18px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.summary[hidden] { display: none; }
.summary-unit { display: flex; align-items: baseline; gap: 5px; }
.summary-value { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.summary-label { font-size: 12.5px; color: var(--text-muted); }
.summary-updated { margin-left: auto; font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
@media (max-width: 480px) {
  .summary { gap: 14px; padding: 11px 14px; }
  .summary-updated { margin-left: 0; flex-basis: 100%; }
}

.chip-count {
  display: inline-block; margin-left: 6px;
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.chip.is-active .chip-count { color: inherit; opacity: .75; }

/* ── 발음 ──────────────────────────────────────────────── */

.pron { margin-top: 12px; display: grid; gap: 3px; }
.pron-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pron-tag {
  flex: none; width: 30px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .04em;
  color: var(--text-muted); text-transform: uppercase;
}
.pron-ipa { font-family: var(--mono); font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.pron-ko { font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; }

.word-ipa {
  margin-left: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  color: var(--text-muted); overflow-wrap: anywhere;
}

/* ── 발음 듣기 ─────────────────────────────────────────── */

.speak-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.speak {
  appearance: none; font: inherit; font-size: 12.5px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted);
  transition: background .12s, color .12s, border-color .12s;
}
.speak:hover { background: var(--accent-weak); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.speak:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.speak.is-speaking { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 낱말 옆에 붙는 작은 버튼 — 글자 흐름을 방해하지 않게 테두리를 없앤다 */
.speak-sm {
  margin-left: 6px; padding: 2px; border-radius: 5px;
  border-color: transparent; background: transparent;
  vertical-align: middle;
}
.speak-sm:hover { background: var(--accent-weak); border-color: transparent; }
.speak-sm.is-speaking { background: var(--accent); color: #fff; }

.ex-sv .speak-sm { margin-left: 7px; }

.speak-note {
  margin-top: 10px; font-size: 12.5px; color: var(--text-muted);
  background: var(--bg-sunken); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 9px 12px;
}
.speak-note[hidden] { display: none; }

.dialog-sep { border: 0; border-top: 1px solid var(--border-soft); margin: 18px 0; }
#voice-test { margin-top: 8px; font-size: 13px; }
#voice-test:disabled { opacity: .5; cursor: not-allowed; }
