/* 화면별 조각: 만들기 · 고르기 · 책장 · 색인 · 설정 · 대화상자 (토큰은 app.css) */
a { color: inherit; }
.brand { text-decoration: none; color: var(--ink); }
.lead { color: var(--ink-2); margin: 6px 0 0; }
.hint { color: var(--ink-3); font-size: 13.5px; margin: 6px 0 0; }
.hint.small { font-size: 12px; }
.empty { color: var(--ink-3); text-align: center; padding: 40px 0; list-style: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.sp { flex: 1; }
.btn {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 9px 16px;
  font-weight: 650; font-size: 14.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 26px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: default; }
.mini { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.acts { display: flex; gap: 6px; margin: 2px 0 10px; }
.inp { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 11px 13px; font: inherit; color: var(--ink); }
.inp:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.area { min-height: 130px; resize: vertical; font-family: var(--f-en); font-size: 16px; }
.lab { display: block; font-weight: 700; margin-bottom: 8px; }
.x { width: 30px; height: 30px; border-radius: 999px; border: 0; background: none; color: var(--ink-3); font-size: 20px; line-height: 1; }
.x:hover { background: var(--chip); color: var(--ink); }
.say.sm { width: 32px; height: 32px; flex: none; }
.say.sm svg { width: 15px; height: 15px; }
.hw.sm { font-size: 21px; margin-right: 8px; }
.card-head .lvl { margin-left: auto; }

/* ── 만들기 ───────────────────────────── */
.drop {
  display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--paper); padding: 28px 16px; margin-top: 18px;
}
.drop.over { border-color: var(--accent); }
.drop svg { width: 34px; height: 34px; color: var(--accent); }
.drop b { font-size: 17px; }
.drop span { color: var(--ink-3); font-size: 13.5px; }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 8px 7px 10px; font-size: 14px; }
.files li button { margin-left: auto; border: 0; background: none; font-size: 18px; color: var(--ink-3); }
.fk { font-size: 11px; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: 4px; padding: 1px 6px; }
.prog { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.bar { height: 6px; border-radius: 99px; background: var(--chip); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* ── 고르기 ───────────────────────────── */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 13px; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.seg.small { margin-bottom: 14px; }
.seg.small button { padding: 5px 11px; font-size: 13px; }
.sorts { margin-left: auto; display: flex; gap: 2px; letter-spacing: 0; order: 3; }
.sorts button { border: 0; background: none; font-size: 12.5px; color: var(--ink-3); padding: 0 4px; font-weight: 600; }
.sorts button.on { color: var(--accent); }
.plist { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.pk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; min-height: 48px; }
.pk:first-child { border-top: 0; }
.pk.on { background: color-mix(in srgb, var(--accent) 9%, var(--paper)); }
.pk input { width: 19px; height: 19px; accent-color: var(--accent); flex: none; pointer-events: none; }
.pw { font-family: var(--f-en); font-size: 18px; font-weight: 600; }
.pm { color: var(--ink-2); font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn { color: var(--ink-3); font-size: 12px; font-family: var(--f-en); }
.hids { margin-top: 22px; display: grid; gap: 8px; }
.hid summary { cursor: pointer; padding: 10px 14px; background: var(--chip); border-radius: var(--radius); font-size: 14px; list-style: none; }
.hid summary::-webkit-details-marker { display: none; }
.hid summary span { color: var(--ink-3); font-size: 12.5px; margin-left: 4px; }
.hid[open] summary { border-radius: var(--radius) var(--radius) 0 0; }
.hid .plist { border-radius: 0 0 var(--radius) var(--radius); }
.hid .pk { cursor: default; }
.pickbar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 7; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(0,0,0,.3); }
.pickbar .wrap { padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; }
.pickbar .btn { padding: 9px 13px; }

/* ── 책장 · 색인 ──────────────────────── */
.nb { text-decoration: none; }
.nb .cover { color: #fff; }
.shelf + .sec-title { margin-top: 34px; }
.empty-shelf { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 30px 0; color: var(--ink-2); }
.ghost-nb { width: 120px; aspect-ratio: 3/4; border: 2px dashed var(--line); border-radius: 4px 10px 10px 4px; }
.az { position: sticky; top: 52px; z-index: 4; display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 0; background: var(--bg); }
.az a { width: 26px; text-align: center; font-family: var(--f-en); font-weight: 600; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: 4px; }
.az a:hover { background: var(--chip); }
#q { margin-top: 4px; }
.letter { font-family: var(--f-en); font-size: 26px; color: var(--accent); margin: 22px 0 4px; scroll-margin-top: 130px; }
.ix { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ixb { min-width: 0; }
.ixm { font-size: 14.5px; color: var(--ink); margin-top: 2px; }
.ixs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ixs a { font-size: 12px; text-decoration: none; padding: 1px 8px 1px 7px; border-radius: 4px; background: var(--chip); border-left: 4px solid var(--c); color: var(--ink-2); }

/* ── 설정 · 대화상자 · 알림 ───────────── */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; margin-top: 14px; }
.panel:empty { display: none; }
.panel h2 { margin: 0 0 4px; font-size: 17px; }
.panel .row { margin-top: 12px; }
.dlg { border: 0; border-radius: var(--radius-lg); padding: 20px; width: min(92vw, 380px); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); }
.dlg::backdrop { background: rgba(31,27,22,.4); }
.dlg p { margin: 0 0 16px; }
.dlg .inp { margin-bottom: 14px; }
#toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 20;
  background: var(--ink); color: var(--paper); border-radius: 12px; padding: 10px 14px; font-size: 14px; display: flex; gap: 12px; align-items: center;
  width: max-content; max-width: calc(100vw - 32px); transition: .25s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { border: 0; background: none; color: #ffc400; font-weight: 700; white-space: nowrap; }

/* ── 단어 정보 ────────────────────────── */
.info { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 6px; font-size: 13.5px; }
.info-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; }
.info-k { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.info-v { color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.meter { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.meter i { width: 9px; height: 9px; border-radius: 2px; background: var(--line); }
.meter i.on { background: var(--accent); }
.info-row:first-child { grid-template-columns: 76px auto 1fr; }
.muted { color: var(--ink-3); }
.cefr { font-family: var(--f-ipa); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 4px; color: #fff; white-space: nowrap; }
.cefr.c-A { background: #22b8a0; }
.cefr.c-B { background: #5b8def; }
.cefr.c-C { background: #9b6bf2; }
.cefr.sm { font-size: 10.5px; padding: 0 5px; margin-left: 2px; }
.kice { font-size: 12px; padding: 1px 8px; border-radius: 4px; border: 1px solid #ffb020; color: #8a5a00; background: #fff6e0; white-space: nowrap; }
.kice.sm { font-size: 10.5px; padding: 0 5px; margin-left: 3px; }
.bdg { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.bdg.b-talk { background: #ffe9e6; color: #a8321f; }
.bdg.b-core { background: #e3f5f1; color: #11705f; }
.bdg.b-acad { background: #ecebfd; color: #4b3fa8; }
.bdg.b-toeic { background: #e8effd; color: #2d5bb8; }

/* ── 공부: 카드·깜빡이·시험 ─────────────── */
.study-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.study-btns a { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); }
.study-btns a small { font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.study-btns a svg { width: 24px; height: 24px; color: var(--accent); }
.stage { min-height: calc(100dvh - 210px); display: grid; align-content: center; gap: 16px; padding: 10px 0 20px; }
.prog-line { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; }
.prog-line .bar { flex: 1; margin: 0; }
.flip { perspective: 1200px; cursor: pointer; }
.flip-in { position: relative; min-height: 360px; transition: transform .5s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  display: grid; align-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; overflow: auto;
}
.face.back { transform: rotateY(180deg); justify-items: stretch; text-align: left; align-content: start; }
.face .big { font-family: var(--f-en); font-size: clamp(40px, 12vw, 64px); font-weight: 600; line-height: 1.05; }
.face .bigko { font-size: clamp(26px, 7vw, 36px); font-weight: 800; }
.face .tap { color: var(--ink-3); font-size: 12.5px; }
.face.back .senses { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }
.answer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer-btns .btn { justify-content: center; padding: 14px; font-size: 16px; }
.btn.no { background: #fff; border-color: #f0c8bf; color: #a8321f; }
.btn.yes { background: #22b8a0; border-color: #22b8a0; color: #fff; }
.blink { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); min-height: 340px; display: grid; place-items: center; text-align: center; padding: 24px; }
.blink .big { font-family: var(--f-en); font-size: clamp(44px, 13vw, 72px); font-weight: 600; }
.blink .bigko { font-size: clamp(26px, 7.5vw, 38px); font-weight: 800; line-height: 1.35; }
.blink .fade { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.q-prompt { text-align: center; display: grid; gap: 6px; justify-items: center; }
.q-prompt .big { font-family: var(--f-en); font-size: clamp(36px, 10vw, 54px); font-weight: 600; line-height: 1.1; }
.q-prompt .bigko { font-size: clamp(22px, 6vw, 30px); font-weight: 800; }
.q-prompt .kind { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.choices { display: grid; gap: 8px; }
.choice { text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: 14px; padding: 13px 16px; font-size: 16px; font-weight: 600; min-height: 52px; }
.choice.en { font-family: var(--f-en); font-size: 19px; }
.choice.right { border-color: #22b8a0; background: #e3f5f1; }
.choice.wrong { border-color: #ff6b5e; background: #ffe9e6; }
.spell { display: flex; gap: 8px; }
.spell .inp { font-family: var(--f-en); font-size: 22px; text-align: center; }
.result { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 30px 0; }
.result .score { font-family: var(--f-en); font-size: 64px; font-weight: 700; line-height: 1; }
.result .score small { font-size: 24px; color: var(--ink-3); }
.feedback { text-align: center; font-weight: 700; min-height: 24px; }
.feedback.ok { color: #11705f; }
.feedback.ng { color: #a8321f; }

/* 고르기 화면: 아래 저장 바에 목록 끝이 가리지 않게 */
main:has(.pickbar) { padding-bottom: 200px; }

/* 카드 빼기(×)는 오른쪽 위 고정, 공부 화면은 위에서부터 */
.card { position: relative; }
.card-head { padding-right: 34px; }
.card > .card-head > .x { position: absolute; top: 12px; right: 10px; }
.stage { min-height: 0; align-content: start; padding-top: 4px; }
.stage .blink { min-height: 46vh; }
.flip-in { min-height: 52vh; }

/* 계정 */
.lform { display: grid; gap: 8px; margin-top: 10px; }
.sync-dot { font-size: 12px; text-decoration: none; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.sync-dot::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: #22b8a0; }
.sync-dot.s-syncing::before { background: #ffb020; }
.sync-dot.s-offline::before, .sync-dot.s-error::before { background: #ff6b5e; }
.acct-tabs { margin-bottom: 4px; }

/* 알아요/몰라요 · 편집 · 밀어 넘기기 */
.lstate { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.lstate.u { border: 1px solid #ff6b5e; background: #ffe9e6; color: #a8321f; font-weight: 700; }
.lstate.k { border: 1px solid #22b8a0; background: #e3f5f1; color: #11705f; }
.card.unknown { border-left: 4px solid #ff6b5e; }
.cards.editing .card { cursor: pointer; }
.cards.editing .card.picked { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.cards.editing .card.picked::after { content: '✓ 빼기로 고름'; position: absolute; top: 12px; right: 48px; font-size: 12px; font-weight: 700; color: var(--accent); }
.addbar { display: flex; gap: 8px; margin-bottom: 4px; }
.addbar .inp { font-family: var(--f-en); }
.mini.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.sel { outline: 3px solid color-mix(in srgb, currentColor 35%, transparent); }
.flip { touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .25s ease; }
.flip.in-r { animation: inR .28s ease; }
.flip.in-l { animation: inL .28s ease; }
@keyframes inR { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes inL { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flip.in-r, .flip.in-l { animation: none; } }
/* 고르기: 수준 탭 · 끌어서 체크 */
.tabs-lv { margin-top: 14px; }
.tabs-lv button small { font-size: 11px; opacity: .75; margin-left: 2px; }
.lvbar { margin: 12px 0 2px; }
.lvbar .btn { padding: 7px 12px; font-size: 13.5px; }
.pk .ck { display: grid; place-items: center; width: 40px; height: 40px; margin: -10px 0 -10px -10px; touch-action: none; }

/* 단어표 */
.study-btns { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.study-btns a { padding: 11px 2px; font-size: 13.5px; }
.study-btns a small { font-size: 10.5px; }
.tbar { display: grid; gap: 8px; margin-bottom: 10px; }
.tablewrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: clip; box-shadow: var(--shadow); }
.wtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.wtable th { position: sticky; top: 52px; z-index: 1; background: #efe7d8; color: var(--ink-2); font-size: 12px; font-weight: 700; text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.wtable td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wtable tbody tr:nth-child(even) td { background: #fbf8f2; }
.wtable tr.known td { color: var(--ink-3); }
.wtable tr.known .c-w b { text-decoration: line-through; text-decoration-color: #22b8a0; }
.wtable .c-ok { width: 40px; text-align: center; }
.wtable .c-no { width: 26px; color: var(--ink-3); font-size: 12px; text-align: right; padding-left: 0; }
.wtable .c-w { width: 34%; }
.wtable .c-w b { font-family: var(--f-en); font-size: 18px; font-weight: 600; display: block; line-height: 1.2; word-break: break-word; }
.wtable .c-w .ipa { font-size: 12px; display: block; }
.wtable .c-w .say { margin-top: 4px; }
.wtable .tm { line-height: 1.45; }
.wtable .tn { color: var(--accent); font-weight: 700; font-size: 12px; margin-right: 4px; }
.wtable .pos { font-size: 11px; min-width: 18px; padding: 0 3px; margin-right: 4px; }
.wtable .c-e { font-size: 13px; }
.wtable .c-e div[lang] { font-family: var(--f-en); font-style: italic; }
.wtable .c-e .k { color: var(--ink-3); font-size: 12px; }
.ok-box { width: 24px; height: 24px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); color: #fff; font-weight: 800; font-size: 14px; line-height: 1; }
tr.known .ok-box { background: #22b8a0; border-color: #22b8a0; }
/* 가리기: 칸을 누르면 보임 */
.hide-mean .c-m .cover:not(.show), .hide-word .c-w .cover:not(.show) { display: block; min-height: 30px; border-radius: 6px; background: repeating-linear-gradient(-45deg, #eadfcb 0 6px, #f2e9da 6px 12px); cursor: pointer; }
.hide-mean .c-m .cover:not(.show) > *, .hide-word .c-w .cover:not(.show) > * { visibility: hidden; }
.print-only { display: none; }
@media print {
  .top, .tabs, .no-print, .book-head .kicker, .pickbar, #toast { display: none !important; }
  .print-only { display: block; font-size: 16pt; margin: 0 0 8pt; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .book-head { display: none; }
  .tablewrap { border: 0; box-shadow: none; }
  .wtable { font-size: 10.5pt; }
  .wtable th { position: static; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wtable tr { break-inside: avoid; }
}
.skipnote { margin-top: 12px; background: #fff6e0; border: 1px solid #ffd27a; border-radius: var(--radius); padding: 8px 12px; font-size: 14px; }
.skipnote summary { cursor: pointer; list-style: none; }
.skipnote summary::-webkit-details-marker { display: none; }
.skipnote summary span { color: #8a5a00; font-size: 12.5px; margin-left: 4px; text-decoration: underline; }
.skiplist { margin-top: 6px; font-family: var(--f-en); color: var(--ink-2); line-height: 1.7; word-break: break-word; }

/* 책장: 아이콘 크기 노트 (10-15 사용자 요청) */
.shelf { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 18px 10px; }
.nb { display: grid; justify-items: center; gap: 5px; text-align: center; min-width: 0; }
.nb .cover {
  width: 62px; height: 78px; aspect-ratio: auto; padding: 0; border-radius: 3px 9px 9px 3px;
  display: grid; place-items: center; box-shadow: inset 5px 0 0 rgba(0,0,0,.18), 0 6px 12px -6px rgba(0,0,0,.45);
}
.nb .cover::before { left: 8px; }
.nb .cover::after { content: ''; position: absolute; left: 16px; right: 8px; top: 12px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.92); }
.nb .count { font-family: var(--f-en); font-size: 20px; font-weight: 700; color: #fff; margin-top: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.nb-t { font-size: 12.5px; font-weight: 650; line-height: 1.3; color: var(--ink); max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.nb-d { font-size: 11px; color: var(--ink-3); margin-top: -3px; }
.nb .cover { display: flex; flex-direction: row; align-items: center; justify-content: center; }
.nb .count { width: 100%; text-align: center; padding-left: 6px; }
.nb-t { word-break: keep-all; overflow-wrap: anywhere; }
.wcell { display: flex; gap: 4px; align-items: flex-start; justify-content: space-between; }
.wcell .cover { flex: 1; min-width: 0; }
.say.xs { width: 28px; height: 28px; flex: none; margin: 0 !important; }
.say.xs svg { width: 14px; height: 14px; }
.wtable td { padding: 8px 7px; }
.tbar .row .btn { padding: 7px 12px; font-size: 13.5px; }
/* 로그인 전 */
body.gated .tabs, body.gated #acct-top { display: none; }
body.gated main { padding-bottom: 40px; }
.gate-head { text-align: center; display: grid; justify-items: center; padding-top: 40px; }
.gate-icon img { border-radius: 18px; box-shadow: var(--shadow); }
.gate-head .lead { max-width: 30em; }
/* 단어표: 뜻 아래 예문 */
.wtable .tm + .tm { margin-top: 6px; }
.wtable .tex { margin: 2px 0 0 22px; font-size: 13px; line-height: 1.4; }
.wtable .tex [lang] { display: block; font-family: var(--f-en); font-style: italic; color: var(--ink); }
.wtable .tex [lang] b { font-style: normal; color: var(--accent); }
.wtable .tex .tk { display: block; color: var(--ink-3); font-size: 12px; }
.wtable .c-w { width: 30%; }

/* ── 야간 모드(어둡게) · 글자 크기 ───────────────── */
:root[data-theme='dark'] {
  --bg: #1b1915; --paper: #24211c; --ink: #efe9df; --ink-2: #c9c0b2; --ink-3: #8f877b; --line: #3a352d; --chip: #2f2b25;
  --accent: #ff7a52; --hl: rgba(255, 196, 0, 0.32);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 20px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1b1915; --paper: #24211c; --ink: #efe9df; --ink-2: #c9c0b2; --ink-3: #8f877b; --line: #3a352d; --chip: #2f2b25;
    --accent: #ff7a52; --hl: rgba(255, 196, 0, 0.32);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 20px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
/* 고정색 쓰던 곳을 토큰으로 */
.wtable th { background: var(--chip); }
.wtable tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 92%, var(--ink) 4%); }
.chip.lv { background: var(--ink); color: var(--paper); }
.kice { background: color-mix(in srgb, #ffb020 14%, var(--paper)); color: color-mix(in srgb, #8a5a00 70%, var(--ink)); }
.skipnote { background: color-mix(in srgb, #ffb020 12%, var(--paper)); border-color: color-mix(in srgb, #ffb020 45%, var(--paper)); }
.skipnote summary span { color: inherit; }
.bdg.b-talk { background: color-mix(in srgb, #ff6b5e 18%, var(--paper)); color: color-mix(in srgb, #a8321f 60%, var(--ink)); }
.bdg.b-core { background: color-mix(in srgb, #22b8a0 18%, var(--paper)); color: color-mix(in srgb, #11705f 60%, var(--ink)); }
.bdg.b-acad { background: color-mix(in srgb, #9b6bf2 18%, var(--paper)); color: color-mix(in srgb, #4b3fa8 60%, var(--ink)); }
.bdg.b-toeic { background: color-mix(in srgb, #5b8def 18%, var(--paper)); color: color-mix(in srgb, #2d5bb8 60%, var(--ink)); }
.lstate.u { background: color-mix(in srgb, #ff6b5e 16%, var(--paper)); color: color-mix(in srgb, #a8321f 55%, var(--ink)); }
.lstate.k { background: color-mix(in srgb, #22b8a0 16%, var(--paper)); color: color-mix(in srgb, #11705f 55%, var(--ink)); }
.btn.no { background: var(--paper); }
.hide-mean .c-m .cover:not(.show), .hide-word .c-w .cover:not(.show) { background: repeating-linear-gradient(-45deg, var(--chip) 0 6px, var(--line) 6px 12px); }
.nb .cover::after { background: rgba(255,255,255,.88); }
.dlg::backdrop { background: rgba(0,0,0,.5); }
#toast { background: var(--ink); color: var(--bg); }
:root[data-theme='dark'] .gate-icon img, :root[data-theme='dark'] .nb .cover { filter: saturate(.92) brightness(.95); }
/* 글자 크기 */
:root[data-font='s'] main { zoom: .92; }
:root[data-font='l'] main { zoom: 1.12; }
:root[data-font='xl'] main { zoom: 1.25; }
.prow { display: grid; gap: 6px; margin-top: 12px; }
.prow > span { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
/* 사용법 링크: 로그인 전에도 보이게 */
.help-link { text-decoration: none; margin-right: 6px; }
body.gated .help-link { display: inline-flex; }
.gate-head .btn { margin-top: 14px; }
