/* ── 색 토큰 (라이트 / 다크) ─────────────────────────────────────────── */
:root {
  --bg: #ffffff; --text: #0f0f0f; --muted: #606060; --line: rgba(0,0,0,.1);
  --chip: #f2f2f2; --chip-hover: #e5e5e5; --hover: rgba(0,0,0,.05);
  --field: #ffffff; --field-line: #c6c6c6; --search-btn: #f8f8f8;
  --accent: #e01b24; --accent-soft: #fde8e8; --link: #065fd4;
  --mark: #ffe58a; --star: #c48a00; --danger: #cc0000;
  --sub-bg: #f2f2f2; --inverse-bg: #0f0f0f; --inverse-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0f; --text: #f1f1f1; --muted: #aaaaaa; --line: rgba(255,255,255,.12);
    --chip: #272727; --chip-hover: #3f3f3f; --hover: rgba(255,255,255,.08);
    --field: #121212; --field-line: #303030; --search-btn: #222222;
    --accent: #ff4e45; --accent-soft: #3a1414; --link: #3ea6ff;
    --mark: #6b5300; --star: #f5c518; --danger: #ff6b6b;
    --sub-bg: #1f1f1f; --inverse-bg: #f1f1f1; --inverse-text: #0f0f0f;
    --shadow: 0 1px 2px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0f; --text: #f1f1f1; --muted: #aaaaaa; --line: rgba(255,255,255,.12);
  --chip: #272727; --chip-hover: #3f3f3f; --hover: rgba(255,255,255,.08);
  --field: #121212; --field-line: #303030; --search-btn: #222222;
  --accent: #ff4e45; --accent-soft: #3a1414; --link: #3ea6ff;
  --mark: #6b5300; --star: #f5c518; --danger: #ff6b6b;
  --sub-bg: #1f1f1f; --inverse-bg: #f1f1f1; --inverse-text: #0f0f0f;
  --shadow: 0 1px 2px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 14px/1.5 "Roboto", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
svg.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.ic .fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ── 상단 바 ─────────────────────────────────────────────────────────── */
#masthead { position: sticky; top: 0; z-index: 10; height: 56px; padding: 0 16px; background: var(--bg);
            display: grid; grid-template-columns: 224px minmax(0, 1fr) 224px; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 19px; font-weight: 700;
         letter-spacing: -.4px; width: max-content; padding: 6px 8px; border-radius: 10px; }
.brand:hover { background: var(--hover); }
.brand .logo { font-size: 22px; line-height: 1; }
.mast-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 700px; justify-self: center; }
.searchbox { display: flex; flex: 1; min-width: 0; height: 40px; }
/* type=search 는 macOS/Safari 기본 모양(높이·테두리)이 덮어써서 버튼과 어긋나므로 기본 모양을 끈다 */
.searchbox input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 100%; margin: 0;
                   padding: 0 16px; font: inherit; font-size: 16px; color: var(--text); background: var(--field);
                   border: 1px solid var(--field-line); border-right: 0; border-radius: 20px 0 0 20px; }
.searchbox input::-webkit-search-decoration { -webkit-appearance: none; }
.searchbox input:focus { outline: none; border-color: var(--link); box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.searchbox button { flex: none; width: 64px; height: 100%; margin: 0; display: grid; place-items: center; padding: 0;
                    background: var(--search-btn); border: 1px solid var(--field-line); border-radius: 0 20px 20px 0; }
.searchbox button:hover { background: var(--chip-hover); }
.searchbox button .ic { width: 22px; height: 22px; }

/* ── 좌측 메뉴 ───────────────────────────────────────────────────────── */
#shell { display: flex; }
#nav { width: 240px; flex: none; padding: 12px; display: flex; flex-direction: column; gap: 2px;
       position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
#nav a { display: flex; align-items: center; gap: 22px; height: 40px; padding: 0 12px; border-radius: 10px;
         text-decoration: none; font-size: 14px; }
#nav a:hover { background: var(--hover); }
#nav a.on { background: var(--chip); font-weight: 500; }
#nav a.on .ic { stroke-width: 2.2; }
#nav hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
#nav .nav-title { font-size: 15px; font-weight: 600; padding: 2px 12px 6px; }
#nav .badge { margin-left: auto; font-size: 12px; color: var(--muted); }
#nav .badge.due { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-weight: 500; line-height: 18px; }
#nav .nav-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px; }
#nav .foot { color: var(--muted); font-size: 12px; }

/* 테마 버튼: 작은 동그라미 안에 초승달(라이트) / 해(다크) */
.theme-btn { width: 32px; height: 32px; flex: none; border-radius: 50%; padding: 0; display: grid; place-items: center;
             background: var(--chip); border: 1px solid var(--line); cursor: pointer; transition: background .15s, transform .2s; }
.theme-btn:hover { background: var(--chip-hover); }
.theme-btn:active { transform: rotate(-20deg) scale(.92); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .moon path { fill: currentColor; stroke: none; }
.theme-btn .sun { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-btn .sun circle { fill: currentColor; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }

/* ── 본문 ────────────────────────────────────────────────────────────── */
#app { flex: 1; min-width: 0; height: calc(100vh - 56px); overflow-y: auto; display: flex; flex-direction: column; padding: 0 24px; }
#pagehead { flex: none; }
.bar { max-width: 1100px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0 4px; min-height: 48px; }
.bar h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
label.opt { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; user-select: none;
            background: var(--chip); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
label.opt input { accent-color: var(--text); margin: 0; }
#status { color: var(--muted); font-size: 13px; margin-left: auto; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--link) !important; }

main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px 0 24px; display: flex; flex-direction: column; gap: 12px; }
main.full { max-width: 1100px; }
/* 제목 줄을 본문 폭에 맞춘다 */
#app:has(main:is([data-view="search"], [data-view="saved"], [data-view="review"])) .bar { max-width: 960px; }
.card { background: transparent; }

/* 검색·표현장·복습: 영상 → 자막 → 목록. 목록만 안에서 스크롤해서 영상은 늘 보인다 */
main:is([data-view="search"], [data-view="saved"], [data-view="review"]) { flex: 1; min-height: 0; max-width: 960px; padding-bottom: 12px; }
main:is([data-view="search"], [data-view="saved"], [data-view="review"]) .view { flex: 1; min-height: 160px; display: flex; flex-direction: column; overflow: hidden;
  border-top: 1px solid var(--line); }
main:is([data-view="search"], [data-view="saved"], [data-view="review"]) :is(#results, #savedList) { flex: 1; overflow: auto; }
main[data-view="search"] #results:empty { display: none; }
main[data-view="search"] #hint:not(.hidden) { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
main[data-view="search"] #hint .chips { justify-content: center; }
main[data-view="review"] #review { flex: 1; overflow: auto; }

/* ── 플레이어 ────────────────────────────────────────────────────────── */
#stage { flex: none; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden;
         max-height: 36vh; width: min(100%, calc(36vh * 16 / 9)); margin: 0 auto; }
.video > div, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
#empty { position: absolute; inset: 0; z-index: 2; background: #000; display: grid; place-items: center;
         color: #aaa; font-size: 14px; text-align: center; padding: 16px; }
/* 자막: 지금 문장을 크고 또렷하게, 앞뒤 문장은 흐리게 한 줄씩 */
#sub { margin: 12px 0 6px; padding: 12px 18px; background: var(--sub-bg); border-radius: 12px;
       display: flex; flex-direction: column; gap: 4px; text-align: center; }
#sub .ctx { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 1.5em;
            overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
#line { font-size: 24px; line-height: 1.45; font-weight: 500; min-height: 1.45em;
        max-width: 42em; margin: 0 auto; text-wrap: pretty; }
#line mark { background: transparent; color: inherit; font-weight: 700;
             box-shadow: inset 0 -0.34em 0 var(--mark); padding: 0 .08em; border-radius: 2px; }
#line.hidden-text { filter: blur(9px); cursor: pointer; user-select: none; }
#vtitle { color: var(--muted); font-size: 13px; margin: 0 4px 8px; text-align: center; }

/* 버튼: 둥근 알약 모양 */
.controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
button { font-size: 14px; font-weight: 500; padding: 0 14px; height: 36px; border-radius: 18px; border: 0;
         background: var(--chip); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
button:hover:not(:disabled) { background: var(--chip-hover); }
button:disabled { opacity: .4; cursor: default; }
button.on { background: var(--inverse-bg); color: var(--inverse-text); }
button.on kbd { color: inherit; border-color: currentColor; opacity: .6; }
button.primary { background: var(--inverse-bg); color: var(--inverse-text); }
button.primary:hover:not(:disabled) { background: var(--inverse-bg); opacity: .85; }
button.danger:hover:not(:disabled) { color: var(--danger); }
button.big { font-size: 15px; height: 44px; border-radius: 22px; flex: 1; }
kbd { font: 11px/1 "Roboto Mono", ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; margin-left: 4px; }
button.primary kbd { color: inherit; border-color: currentColor; opacity: .6; }
#star.on { background: var(--chip); color: var(--star); }

/* ── 목록 ────────────────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 4px 0; }
.list > li { padding: 10px 14px; border-radius: 12px; }
#results > li { cursor: pointer; }
#results > li:hover, #savedList > li:hover { background: var(--hover); }
.list > li.active { background: var(--chip); }
.list > li.active::before { content: "▶"; float: left; margin: 2px 10px 0 -2px; font-size: 10px; color: var(--accent); }
.meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.hint { padding: 20px; color: var(--muted); font-size: 14px; }
.hint code { background: var(--chip); padding: 1px 5px; border-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button { font-size: 13px; height: 32px; border-radius: 8px; padding: 0 12px; }
.panel-head { display: flex; gap: 8px; align-items: center; padding: 10px 0; flex-wrap: wrap; }
.panel-head input[type=search] { flex: 1 1 160px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--field-line); background: var(--field); }
.panel-head select { height: 36px; padding: 0 12px; border-radius: 18px; border: 0; background: var(--chip); font-weight: 500; cursor: pointer; }

/* 표현장: 왼쪽에 문장·정보·메모, 오른쪽에 복습 단계·버튼 */
#savedList > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 3px; align-items: center; }
#savedList > li > :not(.row) { grid-column: 1; }
#savedList .sent { cursor: pointer; font-size: 15px; font-weight: 500; }
#savedList textarea { width: 100%; margin-top: 4px; resize: vertical; min-height: 32px; padding: 5px 10px;
                      border-radius: 8px; border: 1px solid var(--line); background: var(--field); font-size: 13px; }
#savedList .row { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
#savedList .row button { font-size: 12px; height: 30px; padding: 0 12px; }
.dots { letter-spacing: 1px; color: var(--accent); font-size: 11px; }
.dots .off { color: var(--chip-hover); }

/* 복습 */
#review { padding: 14px 4px; display: flex; flex-direction: column; gap: 10px; }
#review .progress { color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; }
#review .bar-bg { height: 4px; background: var(--chip-hover); border-radius: 2px; overflow: hidden; }
#review .bar-fg { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
#review .memo { background: var(--chip); border-radius: 12px; padding: 10px 14px; font-size: 14px; white-space: pre-wrap; }
#review .row { display: flex; gap: 8px; flex-wrap: wrap; }
#review h2 { font-size: 18px; margin: 0; }
#review p { margin: 0; color: var(--muted); }

/* 채널 */
/* 검색 기록 */
.hist-list .hist-day { padding: 18px 14px 6px; font-size: 16px; font-weight: 700; border-radius: 0; cursor: default; }
.hist-list .hist-day:hover { background: none; }
.hist-list .hist-day:first-child { padding-top: 6px; }
.hist-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.hist-row .ic { flex: none; width: 20px; height: 20px; color: var(--muted); }
.hist-row .hq { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row .meta { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .hdel { flex: none; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: none; color: var(--muted); opacity: 0; }
.hist-row:hover .hdel, .hist-row .hdel:focus-visible { opacity: 1; }
.hist-row .hdel:hover { background: var(--chip-hover); color: var(--text); }
@media (hover: none) { .hist-row .hdel { opacity: 1; } }

#channels section { padding: 16px 0; border-bottom: 1px solid var(--line); }
#channels section:last-child { border-bottom: 0; }
#channels h2 { font-size: 16px; margin: 0 0 12px; }
#addForm { display: flex; gap: 8px; flex-wrap: wrap; }
#addForm input { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--field-line); background: var(--field); }
#addUrl { flex: 1 1 320px; }
#addLimit { width: 96px; }
#job pre { background: var(--chip); border-radius: 12px; padding: 12px; font-size: 12px; max-height: 200px; overflow: auto; margin: 10px 0 0; white-space: pre-wrap; }
#job .state, #obJob .state { font-size: 13px; margin-top: 10px; }
#job .state.running::before, #obJob .state.running::before { content: "⏳ "; }
#job .state.done::before, #obJob .state.done::before { content: "✅ "; }
#job .state.error::before, #obJob .state.error::before { content: "⚠️ "; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--hover); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.act { text-align: right; white-space: nowrap; }
td.act button { font-size: 12px; height: 30px; padding: 0 12px; margin-left: 4px; }

/* ── 홈 ──────────────────────────────────────────────────────────────── */
#home { display: flex; flex-direction: column; gap: 14px; }
.home-info { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; }
.home-info:empty { display: none; }
.home-info .due-card { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--text);
                       border-radius: 12px; padding: 10px 14px; font-size: 14px; text-decoration: none; }
.home-head { display: flex; align-items: center; gap: 10px; }
/* 오늘의 표현: 유튜브 영상 목록처럼 썸네일 + 아래 정보 */
/* 채널이 없을 때의 첫 화면 */
#homeOnboard:empty { display: none; }
.onboard { grid-column: 1 / -1; max-width: 760px; margin-bottom: 8px; padding: 28px; border-radius: 16px; background: var(--sub-bg); }
.onboard h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.3px; }
.onboard h3 { margin: 26px 0 10px; font-size: 15px; }
.onboard p { margin: 0 0 6px; color: var(--muted); line-height: 1.6; }
.onboard a { color: var(--link); }
.ob-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 0; margin: 18px 0 0; }
.ob-steps li { counter-increment: s; background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ob-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--inverse-bg); color: var(--inverse-text);
                       display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.ob-steps li span { color: var(--muted); }
.ob-chans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ob-chan { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--bg); cursor: pointer;
           border: 1px solid transparent; }
.ob-chan:has(input:checked) { border-color: var(--text); }
.ob-chan input { accent-color: var(--text); margin: 2px 0 0; flex: none; }
.ob-chan > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.ob-chan .meta { font-size: 12.5px; }
.ob-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.ob-row input[type=number] { width: 64px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--field-line); background: var(--field); color: var(--text); }
.ob-row input[type=url] { flex: 1 1 260px; height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--field-line); background: var(--field); color: var(--text); }
.onboard button.primary { height: 40px; padding: 0 18px; border-radius: 20px; background: var(--inverse-bg); color: var(--inverse-text); font-weight: 600; }
.onboard button.primary:disabled { opacity: .45; }
#obJob { margin-top: 16px; }
#obJob pre { margin: 6px 0 0; max-height: 140px; overflow: auto; font-size: 12px; white-space: pre-wrap; color: var(--muted); }
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 16px; }
.today-card { all: unset; display: flex; flex-direction: column; gap: 12px; cursor: pointer; min-width: 0; }
.today-card:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 12px; }
.today-card .thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
                     background: #1f1f1f; transition: border-radius .2s; }
.today-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s, filter .3s; }
.today-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.75)); }
.today-card .cap { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 30px; color: #fff; text-align: center;
                   font-size: 14px; font-weight: 500; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.8);
                   display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.today-card .cap mark { background: transparent; color: #ffe24a; font-weight: 700; padding: 0; }
.today-card .dur { position: absolute; z-index: 1; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff;
                   font-size: 12px; font-weight: 500; line-height: 1; padding: 3px 4px; border-radius: 4px; }
.today-card .play { position: absolute; z-index: 1; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%;
                    background: rgba(0,0,0,.6); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.today-card .play svg { width: 26px; height: 26px; fill: #fff; }
.today-card:hover .thumb { border-radius: 0; }
.today-card:hover .thumb img { transform: scale(1.04); filter: brightness(.85); }
.today-card:hover .play { opacity: 1; }
.today-card .info { display: flex; gap: 12px; align-items: flex-start; }
.avatar { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
          background: hsl(var(--h) 55% 45%); color: #fff; font-weight: 500; font-size: 16px; line-height: 1; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.chan-cell { display: inline-flex; align-items: center; gap: 10px; }
.reroll { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.reroll .ic { width: 20px; height: 20px; }
.today-card .txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.today-card .expr { font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--text);
                    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.today-card .ko { color: var(--text); font-size: 14px; }
.today-card .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 좁은 화면 ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #masthead { grid-template-columns: auto minmax(0, 1fr) auto; }
  #nav { width: 76px; padding: 8px 4px; }
  #nav a { flex-direction: column; justify-content: center; gap: 4px; height: 64px; padding: 0; font-size: 10px; position: relative; }
  #nav a .badge { position: absolute; top: 6px; right: 10px; margin: 0; font-size: 10px; }
  #nav .nav-title, #nav .foot, #nav hr { display: none; }
  #nav .nav-foot { justify-content: center; padding: 8px 0; }
}
@media (max-width: 640px) {
  .brand span:not(.logo) { display: none; }
  #shell { flex-direction: column; }
  #nav { width: auto; height: auto; position: static; flex-direction: row; overflow-x: auto; }
  #nav a { flex: 1; min-width: 56px; }
  #nav .nav-foot { margin: 0; }
  #app { height: auto; overflow: visible; padding: 0 12px; }
  main:is([data-view="search"], [data-view="saved"], [data-view="review"]) .view { overflow: visible; }
  main:is([data-view="search"], [data-view="saved"], [data-view="review"]) :is(#results, #savedList) { max-height: 60vh; }
  #savedList > li { display: block; }
  #savedList .row { margin-top: 6px; }
}

/* ── 검색 필터 ────────────────────────────────────────────────────────── */
.filter-btn { position: relative; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%;
              display: grid; place-items: center; background: var(--search-btn); border: 0; }
.filter-btn:hover { background: var(--chip-hover); }
.filter-btn .ic { width: 22px; height: 22px; }
.filter-btn .badge:empty { display: none; }
.filter-btn .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px;
                     padding: 0 5px; margin: 0; font-size: 11px; background: var(--accent); color: #fff; text-align: center; }
.filter-btn.on, .filter-btn.on:hover { background: var(--inverse-bg); color: var(--inverse-text); }
#filterDlg label.finflect { margin: 0 20px; padding: 2px 0 14px; background: none; border-radius: 0; border-bottom: 1px solid var(--line);
                            flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--text); }
#filterDlg label.finflect .meta { font-size: 12.5px; }
#filterDlg:focus { outline: none; }

.facets { display: flex; gap: 8px; padding: 10px 0 6px; overflow-x: auto; flex: none; scrollbar-width: none;
          -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.facets::-webkit-scrollbar { display: none; }
.fchip { flex: none; height: 32px; border-radius: 8px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fchip b { font-weight: 500; color: var(--muted); }
.fchip.on b { color: inherit; opacity: .7; }
.fchip span { font-size: 11px; opacity: .7; }

#filterDlg { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: 12px;
             background: var(--bg); color: var(--text); box-shadow: var(--shadow), 0 8px 40px rgba(0,0,0,.25); }
#filterDlg::backdrop { background: rgba(0,0,0,.5); }
.dlg-head { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 16px 20px 12px; z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 18px; }
.icon-btn { width: 36px; padding: 0; border-radius: 50%; background: none; }
#filterBody { padding: 0 20px 20px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 20px; }
.fgroup h3 { font-size: 12px; font-weight: 500; text-transform: none; color: var(--muted); margin: 12px 0 6px; padding-bottom: 8px;
             border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.fopt { display: block; width: 100%; text-align: left; height: auto; min-height: 30px; padding: 5px 8px; border-radius: 8px; background: none;
        font-weight: 400; color: var(--muted); }
.fopt:hover:not(:disabled) { background: none; color: var(--text); }
.fopt.on { background: var(--chip); color: var(--text); font-weight: 600; }
.fopt.on::after { content: "  ✕"; font-size: 11px; font-weight: 400; color: var(--muted); }
.fopt[data-v="any"].on::after, .fopt[data-v="mix"].on::after { content: ""; }
.fgroup h3 .fopt { display: inline; width: auto; min-height: 0; padding: 0; margin-left: auto; font-size: 12px; }
.fgroup h3 .fopt::after { content: ""; }
.fgroup .meta { font-size: 12px; margin: 4px 0 0; line-height: 1.5; }
.fchan { margin-top: 8px; }
.ftags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fchans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 16px; font-size: 14px; }
.fchans label { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; min-width: 0; }
.fchans label span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fchans input { accent-color: var(--text); margin: 0; flex: none; }
.fnote { font-size: 12px; margin: 14px 0 0; }

.hint .syntax { margin-top: 10px; font-size: 12.5px; line-height: 2; }

/* 채널 화면: 분류 태그 · 정보 채우기 */
td.tags { white-space: normal; }
.tag { display: inline-block; font-size: 12px; background: var(--chip); border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; }
/* 작은 팝업 (분류 태그) */
.small-dlg { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px;
             background: var(--bg); color: var(--text); box-shadow: var(--shadow), 0 8px 40px rgba(0,0,0,.25); }
.small-dlg::backdrop { background: rgba(0,0,0,.5); }
.small-dlg:focus { outline: none; }
.dlg-body { padding: 0 20px 20px; }
.dlg-body > .meta { margin: 0 0 12px; font-size: 13px; line-height: 1.5; }
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 6px 8px;
           border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); cursor: text; }
.tag-box:focus-within { border-color: var(--link); }
.tag-box .tag { display: inline-flex; align-items: center; gap: 2px; margin: 0; font-size: 13px; padding: 2px 4px 2px 10px; border-radius: 6px; }
.tag-box .tag button { height: 20px; width: 20px; padding: 0; border-radius: 50%; background: none; font-size: 11px; color: var(--muted); }
.tag-box input { flex: 1 1 120px; min-width: 80px; height: 28px; border: 0; padding: 0 4px; background: none; color: var(--text); font-size: 14px; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.tag-suggest .meta { font-size: 12px; margin-right: 2px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.small-dlg button.primary { background: var(--inverse-bg); color: var(--inverse-text); }
.tag-edit { height: 26px; padding: 0 10px; font-size: 12px; background: none; color: var(--muted); }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--accent-soft); border-radius: 12px;
          padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.notice button { margin-left: auto; }

/* ── 따라 말하기 ──────────────────────────────────────────────────────── */
.q-hint { position: absolute; top: 46px; left: 0; z-index: 20; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
          box-shadow: var(--shadow), 0 4px 16px rgba(0,0,0,.12); padding: 10px 16px; font-size: 14px; cursor: pointer; }
.q-hint:hover { background: var(--hover); }
.mast-search { position: relative; }
.prac-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 60%; }
#pkBack { width: 36px; font-size: 18px; }

#practice { display: flex; flex-direction: column; gap: 14px; }
.pk-paste { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border: 1px solid var(--field-line); border-radius: 28px;
            background: var(--field); max-width: 760px; }
.pk-paste:focus-within { border-color: var(--link); }
.pk-paste .ic { color: var(--muted); width: 22px; height: 22px; }
.pk-paste input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; font-size: 16px; color: var(--text); }
.pk-paste button.primary, .pk-resume button.primary, .pk-done button.primary { background: var(--inverse-bg); color: var(--inverse-text); height: 40px; padding: 0 20px; border-radius: 20px; }
.pk-job pre { margin: 4px 0 0; font-size: 12px; color: var(--muted); white-space: pre-wrap; max-height: 80px; overflow: auto; }
.pk-job .state.running::before { content: "⏳ "; }
.pk-job .state.error::before { content: "⚠️ "; }
.pk-h { font-size: 15px; margin: 6px 0 10px; }
.pk-listhead { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.pk-listhead .pk-h { margin: 0; }
.pk-chan { gap: 6px; padding-left: 6px; }
.pk-grid { gap: 24px 16px; }
.pk-card .pk-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; }
.pk-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.pk-prog > span { display: block; height: 100%; background: var(--accent); }
.pk-badge { align-self: flex-start; font-size: 12px; color: var(--muted); background: var(--chip); border-radius: 4px; padding: 1px 6px; margin-top: 4px; }
.pk-badge.done { color: var(--text); }

.pk-resume { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--sub-bg); cursor: pointer; max-width: 760px; }
.pk-resume .thumb { position: relative; flex: none; width: 200px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.pk-resume .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pk-resume-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pk-resume-txt b { font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#homeResume:empty { display: none; }

/* 연습 화면: 검색 화면처럼 영상 → 자막 → 목록(안에서 스크롤) */
main[data-view="practice"].running { flex: 1; min-height: 0; max-width: 960px; padding-bottom: 12px; }
main[data-view="practice"].running #practice { flex: 1; min-height: 160px; overflow: hidden; gap: 8px; }
#pkRun { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
#pkRun.hidden { display: none; }
.pk-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pk-state { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; min-height: 26px; }
.pk-timer { height: 3px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.pk-timer > span { display: block; height: 100%; width: 0; background: var(--text); }
.pk-progress { flex: 0 1 220px; height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.pk-progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.pk-settings { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pk-grp { display: inline-flex; align-items: center; gap: 4px; }
.pk-grp .meta { font-size: 12px; margin-right: 2px; }
.pk-grp .fchip { height: 28px; padding: 0 10px; font-size: 12.5px; }
.pk-list { flex: 1; overflow: auto; border-top: 1px solid var(--line); }
.pk-list > li { display: flex; gap: 10px; align-items: baseline; cursor: pointer; padding: 8px 12px; }
.pk-list > li:hover { background: var(--hover); }
.pk-list > li.active::before { content: none; }
.pk-list > li.active { background: var(--chip); }
.pk-no { flex: none; width: 2.6em; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pk-en { flex: 1; min-width: 0; line-height: 1.5; }
.pk-list > li.done .pk-no::after { content: " ✓"; color: var(--accent); }
.pk-mark { flex: none; color: var(--accent); }
.pk-done { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 16px; border-radius: 12px; background: var(--accent-soft); }
.pk-done b { font-size: 18px; }
.pk-done-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.pk-btn-wrap { position: relative; display: inline-flex; }
.pk-menu { position: absolute; bottom: 42px; right: 0; z-index: 15; min-width: 210px; display: flex; flex-direction: column; padding: 6px;
           background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 6px 24px rgba(0,0,0,.18); }
.pk-menu.hidden { display: none; }
.pk-menu button { justify-content: flex-start; background: none; border-radius: 8px; }
.pk-menu button:hover { background: var(--hover); }

.pk-start-info { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--sub-bg); margin-bottom: 8px; }
.pk-opts { display: flex; flex-direction: column; gap: 6px; }
.pk-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.pk-opt:has(input:checked) { border-color: var(--text); }
.pk-opt input { accent-color: var(--text); margin: 3px 0 0; flex: none; }
.pk-opt > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pk-opt .meta { font-size: 12.5px; }
@media (max-width: 640px) {
  .pk-resume { flex-direction: column; align-items: stretch; }
  .pk-resume .thumb { width: 100%; }
}

/* ── 로그인·계정 ──────────────────────────────────────────────────────── */
.login-screen { display: none; }
body.logged-out .login-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg); }
body.logged-out #masthead, body.logged-out #shell { visibility: hidden; }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
              padding: 36px 28px; border-radius: 20px; background: var(--sub-bg); }
.login-brand { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.login-brand .logo { font-size: 30px; }
.login-card p { margin: 0; line-height: 1.6; color: var(--text); }
.login-card .meta { font-size: 12.5px; color: var(--muted); }
.gsi-btn { min-height: 44px; display: grid; place-items: center; }
.login-err { color: var(--accent); font-size: 13px; }
.mast-side { position: relative; justify-self: end; display: flex; align-items: center; }
.acct-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: none; }
.acct-btn:empty { visibility: hidden; }
.acct-btn .avatar { width: 32px; height: 32px; }
.acct-menu { position: absolute; top: 46px; right: 0; z-index: 30; min-width: 240px; display: flex; flex-direction: column; gap: 6px; padding: 12px;
             background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 6px 24px rgba(0,0,0,.18); }
.acct-menu.hidden { display: none; }
.acct-who { display: flex; flex-direction: column; gap: 2px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); }
.acct-who .meta { font-size: 12.5px; }
.acct-menu button { justify-content: flex-start; background: none; border-radius: 8px; }
.acct-menu button:hover { background: var(--hover); }

/* ── 다듬기 ──────────────────────────────────────────────────────────── */
/* 단축키 표시는 마우스가 있는 넓은 화면에서만 */
@media (hover: none), (max-width: 1100px) { .controls kbd { display: none; } }
/* 따라 말하기에는 자막 설정이 따로 있으니 '자막 가리기'·'이어서'는 숨김 */
main[data-view="practice"] :is(#hide, #cont) { display: none; }
#vtitle a { white-space: nowrap; }

.q-suggest { position: absolute; top: 46px; left: 0; right: 52px; z-index: 20; display: flex; flex-direction: column; padding: 6px;
             background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 6px 24px rgba(0,0,0,.14); }
.q-suggest.hidden { display: none; }
.q-suggest .qs-head { font-size: 12px; padding: 4px 10px; }
.q-suggest button { justify-content: flex-start; gap: 10px; background: none; border-radius: 8px; font-weight: 400; height: 36px; }
.q-suggest button:hover { background: var(--hover); }
.q-suggest button .ic { width: 18px; height: 18px; color: var(--muted); }
.q-suggest button span:first-of-type { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.q-suggest .qs-all { font-size: 13px; color: var(--link); padding: 8px 10px 4px; text-decoration: none; }

.small-filter { max-width: 320px; }
.hist-foot { display: flex; justify-content: center; padding: 16px 0 4px; }
.text-danger { background: none; color: var(--muted); font-weight: 400; font-size: 13px; }
.text-danger:hover:not(:disabled) { background: none; color: var(--danger); text-decoration: underline; }

.ch-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ch-head h2 { margin: 0 !important; }
#addOpen { background: var(--inverse-bg); color: var(--inverse-text); }
#channels table { max-width: 860px; }
.row-wrap { position: relative; display: inline-flex; }
.row-more { width: 36px; padding: 0; background: none; font-size: 18px; letter-spacing: 1px; }
.row-menu { position: absolute; right: 0; top: 38px; z-index: 12; min-width: 190px; display: flex; flex-direction: column; padding: 6px;
            background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 6px 24px rgba(0,0,0,.16); }
.row-menu.hidden { display: none; }
.row-menu button { justify-content: flex-start; background: none; border-radius: 8px; }
.row-menu button:hover:not(:disabled) { background: var(--hover); }
#addForm { display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.fld input { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field); color: var(--text); font-size: 15px; }
#addLimitWrap input { width: 120px; }
#addForm .meta { font-size: 12.5px; line-height: 1.6; margin: 0; }

.pk-setrow { display: flex; align-items: center; gap: 10px; }
.pk-setrow #pkSummary { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pk-setwrap { position: relative; }
.pk-setbtn { height: 32px; font-size: 13px; }
.pk-pop { position: fixed; overflow: auto; z-index: 15; width: min(440px, calc(100vw - 32px)); flex-direction: column; align-items: flex-start;
          gap: 12px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
          box-shadow: var(--shadow), 0 6px 24px rgba(0,0,0,.18); }
.pk-pop:not(.hidden) { display: flex; }
.pk-pop .pk-grp { flex-wrap: wrap; }
.pk-pop .pk-grp > .meta { width: 34px; }
#pkChips { display: flex; flex-direction: column; gap: 6px; -webkit-mask-image: none; mask-image: none; overflow: visible; }
.pk-chiprow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pk-chiprow::-webkit-scrollbar { display: none; }

main[data-view="saved"].full #savedEmpty, #savedEmpty { padding: 40px 16px; text-align: center; }
@media (max-width: 640px) {
  #nav .nav-foot { display: none; }
  main[data-view="practice"] #line { font-size: 19px; }
  .q-suggest { right: 0; }
}

.fld input { flex: none !important; width: 100%; border-radius: 10px !important; }
#addLimitWrap input { width: 120px; }
.small-dlg { margin: 12vh auto auto; }            /* 내용이 바뀌어도 창이 위아래로 튀지 않게 */
.row-menu .danger { color: var(--danger); }
#channels { max-width: 900px; }
#channels table { max-width: none; }
#pkPicker { display: flex; flex-direction: column; gap: 14px; }
#homeResume .pk-resume { max-width: none; }
#savedEmpty { order: -1; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
         max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 10px; background: var(--inverse-bg); color: var(--inverse-text);
         font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 첫 화면: 바로 시작 */
.ob-chan { align-items: center; }
.ob-chan .avatar { flex: none; }
.ob-ready { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.ob-ready.on { color: var(--accent); font-weight: 600; }
.ob-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.ob-own { margin-top: 18px; }
.ob-own summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.preview-note { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px;
                padding: 10px 14px; border-radius: 10px; background: var(--accent-soft, rgba(80,120,255,.08)); font-size: 14px; }
.preview-note button { padding: 6px 12px; }
.ob-try .chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font: inherit; font-size: 14px; }
.ob-try .chip:hover { border-color: var(--accent); color: var(--accent); }

/* 자막 받기 진행 표시 */
.job-box { margin: 12px 0; }
.jp { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 14px; }
.jp.ok { border-color: color-mix(in srgb, #1a7f37 40%, var(--line)); }
.jp.bad { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.jp-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.jp-top span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jp-bar { height: 6px; margin: 10px 0 8px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.jp-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .4s; }
.jp-bar.wait i { width: 35% !important; animation: jp-slide 1.4s ease-in-out infinite; }
@keyframes jp-slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.jp-sub { color: var(--muted); font-size: 13px; line-height: 1.5; }
.jp-sub b { color: var(--text); }
.jp-log { margin-top: 8px; font-size: 12px; }
.jp-log summary { cursor: pointer; color: var(--muted); }
.jp-log pre { background: var(--chip); border-radius: 8px; padding: 10px; max-height: 180px; overflow: auto; white-space: pre-wrap; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .jp-bar.wait i { animation: none; } }
.jp-sub, .jp-top b { word-break: keep-all; overflow-wrap: anywhere; }
#channels th { white-space: nowrap; }

/* 결과 0개 도움말 */
.zero { width: min(640px, 100%); margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.ztitle { font-size: 17px; font-weight: 700; text-align: center; margin: 0 0 4px; word-break: keep-all; }
.zrow { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.zrow p { margin: 0; color: var(--muted); font-size: 14px; word-break: keep-all; }
.zrow p b { color: var(--text); }
.zchips { display: flex; flex-wrap: wrap; gap: 8px; }
.zchip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
         background: var(--bg); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.zchip:hover { border-color: var(--accent); }
.zchip span { color: var(--muted); font-size: 12px; }
.zchip i { font-style: normal; color: var(--muted); font-size: 12px; }
.zchip .avatar { width: 22px; height: 22px; font-size: 11px; }
.zchip .zadd { color: var(--accent); font-weight: 600; }
.zchip:disabled { opacity: .5; cursor: default; }

/* 브랜드: Maltoo */
.brand .logo { width: 28px; height: 28px; font-size: 0; }
.brand span { letter-spacing: -.3px; }
.login-brand { flex-direction: column; gap: 10px; }
.login-brand .logo { width: 56px; height: 56px; }
.login-brand span { display: flex; align-items: baseline; gap: 8px; font-size: 30px; letter-spacing: -.6px; }
.login-brand small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.login-copy { line-height: 1.6; word-break: keep-all; }
.login-copy b { font-size: 17px; }
.zq { margin: -10px 0 4px; text-align: center; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.login-card .meta { word-break: keep-all; }
