/* VocaReels 지면 색 · 글꼴(WEB-Voca site/palette.css 와 같은 값). */
@font-face { font-family: "Paperlogy"; font-weight: 400; font-display: swap; src: url("fonts/paperlogy-400.woff2") format("woff2"); }
@font-face { font-family: "Paperlogy"; font-weight: 700; font-display: swap; src: url("fonts/paperlogy-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #faf9f5;
  --paper-deep: #ebe5db;
  --paper-hi: #fffdf8;
  --ink: #191919;
  --soft: #605c55;
  --rule: #d9d4cb;
  --edge: #8d877c;
  --action: #131313;
  --learn: #b04a30;
  --mark: #f3ddd0;
  --ok: #1e6b44;
  --ok-bg: #e6f2ea;
  --bad: #a32d1c;
  --bad-bg: #fbeae5;
  --focus: #1d5fd1;
  --sans: "Paperlogy", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 40px);
  --youtube-column: 36rem;
  --bar: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-padding: calc(var(--top) + 16px) 0 calc(var(--bar) + var(--tabs) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
h1, h2, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* 길게 읽는 글은 라벨처럼 나누지 않는다(공용 paper-label) */
.why, details > p { text-wrap: pretty; }
h1:focus, main:focus { outline: none; }
h1 { font-size: clamp(26px, 4.5vw, 38px); line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.35; letter-spacing: -.01em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }



/* 공용 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; transition: background-color .16s, border-color .16s, transform .12s var(--ease); }
.btn:hover:not(:disabled) { border-color: var(--edge); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { border-color: var(--action); background: var(--action); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #333; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.square { width: 48px; padding: 0; }
.btn[aria-pressed="true"] { border-color: var(--learn); color: var(--learn); background: var(--mark); }
.link { min-height: 44px; padding: 0 4px; color: var(--soft); font-size: 15px; text-decoration: underline; text-underline-offset: .2em; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hint { color: var(--soft); font-size: 15px; }
.lead { font-size: 17px; }
.error { margin-top: 8px; color: var(--bad); }
.note { margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: var(--paper-deep); font-size: 15px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--ink); font-size: 13px; line-height: 1.5; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.card { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-hi); }
.card > * + * { margin-top: 14px; }
.loading { padding: 64px var(--gutter); color: var(--soft); text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bar) + var(--tabs) + 16px + env(safe-area-inset-bottom)); z-index: 20; translate: -50% 0; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--action); color: #fff; font-size: 15px; }
.en { font-family: var(--serif); word-break: normal; }
.ko { color: var(--soft); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-hi); }
.seg button { min-height: 42px; padding: 0 14px; border-radius: 999px; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--action); color: #fff; }

/* 첫 화면 */
.home { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--gutter) 80px; }
.home section + section { margin-top: clamp(40px, 6vw, 64px); }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.cells li { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 10px; color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.cells .done { border-color: var(--mark); background: var(--mark); color: var(--learn); font-weight: 700; }
.cells .now { border: 2px solid var(--action); color: var(--ink); font-weight: 700; }
.cells .later { border-style: dashed; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 20px; margin-top: 16px; }
.v > a { display: block; text-decoration: none; border-radius: 12px; }
.v > a > span { display: block; }
.thumb { display: grid !important; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--paper-deep); color: var(--edge); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .3s var(--ease); }
.v > a:hover .thumb img { scale: 1.03; }
.thumb .ic { width: 40px; height: 40px; }
.v-name { margin-top: 10px; font-weight: 700; line-height: 1.4; }
.v-meta { color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.del { margin-top: 8px; border-color: transparent; background: none; color: var(--soft); padding: 0 6px; font-weight: 400; }
.credit { margin-top: 24px; color: var(--soft); font-size: 14px; }
.lost { max-width: 560px; margin: 64px auto; }

/* 학습: 휴대폰은 영상이 위에 붙고 조작은 아래 고정 */
.study { padding-bottom: calc(var(--bar) + var(--tabs) + 32px + env(safe-area-inset-bottom)); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--gutter); color: var(--soft); font-size: 15px; text-decoration: none; }
.back:hover { color: var(--ink); }
.stage-col { display: contents; }
.sticky { position: sticky; top: calc(var(--top) + env(safe-area-inset-top)); z-index: 5; background: var(--paper); padding-bottom: 8px; }
/* 유튜브 정책: 모서리를 자르지 않고 200×200 이상 */
.frame { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; max-height: 42dvh; background: #000; }
.frame iframe, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.sticky .note { margin-inline: var(--gutter); }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: calc(var(--bar) + var(--tabs)); padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + var(--tabs) + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid var(--rule); background: var(--paper); }
.bar .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar .side:first-child { justify-content: flex-end; }
/* 재생 · 멈춤은 어느 폭에서나 줄의 한가운데. 글은 화면 읽기에만 남긴다 */
.bar .play { width: 56px; height: 56px; min-height: 56px; padding: 0; border-radius: 50%; }
.bar .play .ic { width: 28px; height: 28px; }
.bar .play > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bar .rate { min-width: 64px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.panel-col { padding: 8px var(--gutter) 0; }
.panel { margin-top: 18px; scroll-margin-top: calc(var(--top) + 16px); }
.panel > * + * { margin-top: 14px; }

/* 만드는 중 */
.steps li { display: flex; align-items: center; gap: 12px; min-height: 40px; color: var(--soft); }
.steps .past { color: var(--ok); }
.steps .now { color: var(--ink); font-weight: 700; }
.dot { width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: var(--rule); }
.now .dot { background: var(--learn); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ① 듣기 */
.line { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; padding: 8px 8px 8px 0; border-radius: 12px; scroll-margin: calc(var(--top) + 45dvh) 0 calc(var(--bar) + 24px); }
.line.cur { background: var(--paper-hi); box-shadow: inset 3px 0 0 var(--learn); }
.at { min-height: 44px; border-radius: 10px; color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.at:hover { background: var(--paper-deep); color: var(--ink); }
.line .text { min-width: 0; padding-top: 8px; }
.line .en { font-size: 18px; line-height: 1.55; }
.line .ko { margin-top: 2px; font-size: 15px; }
.w { border-radius: 5px; cursor: pointer; transition: background-color .12s; }
.w:hover { background: var(--mark); }
.lines[data-veil="hide"] .ko, .lines[data-veil="en"] .ko { display: none; }
.lines .line.open .ko { display: block; }
.lines[data-veil="hide"] .line:not(.open) .w { color: transparent; background: var(--rule); user-select: none; -webkit-user-select: none; }
.lines[data-veil="hide"] .line.cur:not(.open) .w { background: #cbb9ab; }
.gloss { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--mark); }
.gloss .row { margin-top: 8px; }
.gloss b { font-family: var(--serif); }

/* ② 한 문장씩 */
.big { font-size: clamp(21px, 3vw, 27px); line-height: 1.55; }
.slot { display: inline-block; min-width: 4ch; padding: 0 4px; border-bottom: 2px solid var(--edge); text-align: center; line-height: 1.3; }
.slot[data-len="5"], .slot[data-len="6"] { min-width: 5ch; }
.slot[data-len="7"], .slot[data-len="8"], .slot[data-len="9"] { min-width: 7ch; }
.slot[data-len="10"], .slot[data-len="11"], .slot[data-len="12"] { min-width: 9ch; }
.slot.next { border-color: var(--learn); background: var(--mark); border-radius: 6px 6px 0 0; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.verdict { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.verdict.ok { color: var(--ok); }
mark { padding: 0 3px; border-radius: 5px; background: var(--mark); color: inherit; }
.expr { padding: 14px 16px; border-radius: 12px; background: var(--paper); }
.expr b { font: 700 18px/1.4 var(--serif); }
.expr .why { margin-top: 6px; }
.expr .ex { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.expr .ex span { display: block; }
.expr .ex [lang] { font-family: var(--serif); }
.speak .hint { margin-top: 6px; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--soft); font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--action); }

/* 말 없는 곳 건너뛰기. 글 어디를 눌러도 켜진다(이름표를 칸 전체로 편다) */
.switch { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; min-height: 64px; padding: 10px 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper-hi); }
.switch label { font-weight: 700; cursor: pointer; }
.switch label::after { content: ""; position: absolute; inset: 0; }
.switch input { position: relative; grid-area: 1 / 2 / 3 / 3; width: 48px; height: 28px; margin: 0; border-radius: 14px; background: var(--edge); appearance: none; cursor: pointer; transition: background-color .16s; }
.switch input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: translate .16s var(--ease); }
.switch input:checked { background: var(--learn); }
.switch input:checked::before { translate: 20px; }
.switch:has(:disabled) label { cursor: default; }
.switch input:disabled { opacity: .45; cursor: default; }

/* ③ 써 보기 */
.write > * + * { margin-top: 10px; }
.write label { display: block; font-weight: 700; }
.write textarea { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; background: var(--paper-hi); font: 400 19px/1.5 var(--serif); color: inherit; resize: vertical; }



@media (max-width: 480px) {
  .bar { gap: 8px; }
  .bar .side { gap: 6px; }
  .bar .side .btn:not(.square) { padding: 0 8px; font-size: 15px; }
  .bar .square { width: 44px; }
  .bar .rate { min-width: 48px; }
  .line { grid-template-columns: 48px minmax(0, 1fr); }
}

@media (min-width: 960px) {
  .toast { bottom: 32px; }
}


/* 영상 학습관 */
.home { max-width: calc(1120px + 2 * var(--gutter)); padding-top: clamp(26px, 4.5vw, 52px); }
.library-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.share-url { width: 100%; padding: 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--paper-hi); }
.library-head { flex-wrap: wrap; }
.library-head h2 { font-size: clamp(23px, 2.8vw, 32px); letter-spacing: -.045em; }
.library-search { min-height: 44px; max-width: 100%; width: 245px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-hi); }
.thumb { position: relative; border-radius: 12px; }
.duration { position: absolute; right: 7px; bottom: 7px; padding: 1px 6px; border-radius: 4px; color: white; background: #252525e8; font-size: 12px; font-variant-numeric: tabular-nums; }
.v-meta { margin-top: 3px; }
.empty { margin-top: 18px; padding: 24px; border: 1px dashed var(--rule); border-radius: 12px; text-align: center; color: var(--soft); }
@media (max-width: 600px) {
  .library-search { width: min(50%, 220px); font-size: 14px; }
  .v-name { font-size: 15px; }
  .v-meta { font-size: 13px; }
  .home section + section { margin-top: 32px; }
}

select { min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-hi); }
.check select { color: var(--ink); }
.w.saved { box-shadow: inset 0 -2px 0 var(--learn); }
.lines[data-veil="hide"] .line:not(.open) .w.saved { box-shadow: none; }


/* 넷 중 하나 */
.options { display: grid; gap: 8px; }
.option { min-height: 52px; padding: 10px 16px; border: 1px solid var(--edge); border-radius: 12px; background: var(--paper); text-align: left; }
.option:hover:not(:disabled) { border-color: var(--ink); }
.option:disabled { opacity: .6; }
.option.right { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); opacity: 1; font-weight: 700; }


/* 표현장 */
.words { margin-top: 8px; }
.words li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.words li > .row { flex: none; flex-wrap: nowrap; }
.words b { font: 700 18px/1.4 var(--serif); }
.words .del { margin: 0; }

@media (max-width: 480px) {
  .words li { align-items: flex-start; }
  .words li > .row { flex-direction: column; }
}

/* 라운드 · 세로 영상 · 설명 · 리포트 */
.frame.tall { width: max(200px, min(100%, calc(56dvh * 9 / 16))); aspect-ratio: 9 / 16; max-height: none; margin-inline: auto; }
.lines[data-veil="terms"] .ko { display: none; }
.lines[data-veil="terms"] .line.open .ko { display: block; }
.lines[data-veil="terms"] .line:not(.open) .w.term { color: transparent; background: var(--rule); box-shadow: none; user-select: none; -webkit-user-select: none; }
.write .card { margin-top: 14px; }
@media (max-width: 480px) {
  .seg button { padding: 0 10px; font-size: 14px; }
}

/* 추천 채널 · 구간 연습 */
.library > .btn { margin-top: 20px; }
input[type="file"] { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 10px 0; }


/* 공통 손그림 템플릿을 영상 바깥의 학습 도구에 적용한다. */
:root {
  --paper: #fff; --paper-hi: var(--paper-white); --paper-deep: var(--paper-pale); --ink: var(--paper-ink);
  --soft: var(--paper-muted); --rule: var(--paper-line); --edge: #8d9384;
  --learn: var(--paper-accent); --mark: var(--paper-pale); --serif: var(--sans);
}
.btn.primary { background: var(--paper-lime); border-color: var(--paper-ink); color: var(--paper-ink); }
.btn.primary:hover:not(:disabled) { background: var(--paper-lime-hover); }
.btn, .seg button { transition-duration: .12s; }
.card.paper-frame { border-color: transparent; }
.view-heading { display: flex; align-items: center; gap: .24em; font-size: clamp(27px, 4.6vw, 50px); }
.view-heading .ic { width: 1.02em; height: 1.02em; }
.thumb .paper-sticker { position: static; width: 42px; height: 42px; }
.library-head h2 { font-size: clamp(24px, 3vw, 34px); }
.search-field { position: relative; width: min(240px, 48%); }
.search-field .ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; pointer-events: none; }
.search-field .library-search { width: 100%; padding-left: 38px; border-radius: 9px; }
.v > a { height: 100%; }
.thumb { border-radius: 8px; }
.save-notice:empty { display: none; }
.save-notice { color: var(--bad); }
@media (max-width: 660px) {
  .words + .empty { overflow-x: auto; }
}

@media (min-width: 960px) { .panel-col { min-width: 0; } }

.btn.quiet { border-color: transparent; background: none; }
.lesson-page .bar .btn:not(.play) { border-color: transparent; background: none; }
.lesson-page .bar .rate { margin-left: auto; color: var(--soft); font-weight: 400; }
.btn.wide { width: 100%; min-height: 54px; }
.more > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--soft); font-size: 15px; cursor: pointer; }
.more > * + * { margin-top: 10px; }
.more .ex span { display: block; }
.speak > .hint { text-align: center; }

.home { padding-bottom: calc(var(--tabs) + 64px + env(safe-area-inset-bottom)); }

/* 설정: 영상 영어 이용권 */
.youtube-settings { max-inline-size: var(--youtube-column); --settings-pad: 1rem; --settings-gap: .875rem; }
.youtube-settings .paper-settings-grid { grid-template-columns: minmax(0, 1fr); }
.youtube-settings .paper-pay-status .paper-action { width: 100%; }
.youtube-settings .pass-purchase .video-pass-daily { font-size: .8125rem; font-weight: 400; letter-spacing: 0; }
.youtube-settings .video-pass-daily-amount { font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 700; letter-spacing: -.045em; white-space: nowrap; }
.request-settings { margin-top: 1.25rem; }
.request-preview, .requests-page, .request-panel { display: grid; gap: .75rem; }
.request-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.request-head :is(h1, h2) { margin: 0; }
.request-title-group { display: flex; align-items: center; gap: .75rem; }
.request-head > .btn { margin-inline-start: auto; }
.request-panel > .paper-action, .request-back { justify-self: start; }
.request-head .link, .request-back { display: inline-flex; align-items: center; gap: .375rem; min-height: 44px; }
.request-empty {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .875rem;
  padding: clamp(1rem, 4vw, 1.75rem); border: 1px solid var(--rule); border-radius: 1.125rem; background: var(--paper-pale);
}
.request-empty-icon { display: grid; place-items: center; width: 3.25rem; aspect-ratio: 1; border-radius: .875rem; background: var(--paper-white); }
.request-empty-icon .ic { width: 1.875rem; height: 1.875rem; }
.request-empty-copy h2 { margin: 0; font-size: clamp(1.125rem, 3vw, 1.5rem); letter-spacing: -.035em; }
.request-empty-copy p { margin-top: .25rem; color: var(--soft); font-size: .875rem; word-break: keep-all; }
@media (max-width: 600px) {
  .request-empty { grid-template-columns: auto minmax(0, 1fr); }
  .request-empty > .paper-action { grid-column: 1 / -1; }
}
.request-back .ic { width: 1.125rem; height: 1.125rem; }
.requests-page { max-width: 45rem; }
.request-panel { padding: clamp(1rem, 4vw, 1.5rem); border: 1px solid var(--rule); border-radius: 1rem; background: var(--paper-white); }
.request-quota { font-weight: 700; }
.request-form { display: grid; gap: .5rem; }
.request-form label { font-weight: 700; }
.request-form input { min-width: 0; min-height: 44px; padding: .625rem .75rem; border: 1px solid var(--edge); border-radius: .625rem; background: var(--paper-hi); color: var(--ink); font: inherit; }
.request-message:empty { display: none; }
.request-row-copy small { white-space: normal; overflow-wrap: anywhere; }
.request-status { color: var(--soft); font-size: .8125rem; white-space: nowrap; }
.request-status[data-status="ready"] { color: var(--ink); font-weight: 700; }

/* 학습 재생 막대: 진행 바와 설정 · 이전 · 재생 · 다음 · 속도. */
.lesson-page .bar .side:has(.lesson-settings-btn) { justify-content: flex-end; }
.lesson-page .bar .lesson-settings-btn { margin-right: auto; }
.lesson-page .bar .lesson-settings-btn[aria-expanded="true"] { border-color: var(--paper-line); background: var(--paper-pale); }
.track { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 32px; margin: 0; background: none; cursor: pointer; touch-action: none; }
.seek::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--ink) var(--at, 0%), var(--paper-tint) var(--at, 0%)); }
.seek::-moz-range-track { height: 6px; border-radius: 6px; background: var(--paper-tint); }
.seek::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--ink); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 3px solid var(--paper-white); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid var(--paper-white); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* 속도 팝업. 자리는 player.js 가 정한다(플레이어를 덮지 않게) */
.pop { position: fixed; inset: auto; width: min(340px, calc(100vw - 24px)); margin: 0; padding: 16px; overflow: auto; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-white); color: var(--ink); box-shadow: 0 10px 32px #1717152e; }
.pop:popover-open { display: grid; gap: 6px; }
.pop-title { font-weight: 700; }
.rates { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-deep); }
.rates button { min-height: 44px; padding: 0; border-radius: 11px; font-size: 15px; font-variant-numeric: tabular-nums; }
.rates button[aria-pressed="true"] { background: var(--paper-lime); font-weight: 700; }
.pop .switch { min-height: 52px; padding: 6px 2px; border: 0; background: none; }
.pop .switch .hint { font-size: 14px; }
.pop .switch:has(:disabled) { opacity: .45; }

@media (max-height: 540px) and (max-width: 959px) { .sticky { position: static; } }

/* 화면 폭에 관계없이 영상, 학습 내용, 재생 막대를 세로로 쌓는다. */
body.focus { --bar: 100px; --tabs: 0px; --head: calc(var(--top) + env(safe-area-inset-top)); }
body.focus > .tabs { display: none; } /* 레슨 화면은 아래 메뉴 없이 꽉 채운다 */
body.focus .toast { bottom: calc(var(--bar) + var(--tabs) + 16px + env(safe-area-inset-bottom)); }
html:has(body.focus), body.focus { overflow: hidden; overscroll-behavior: none; }
.lesson-page { --pad: clamp(1rem, 4vw, 1.25rem); position: fixed; inset: var(--head) 0 calc(var(--tabs) + env(safe-area-inset-bottom)); max-inline-size: var(--youtube-column); margin-inline: auto; display: flex; flex-direction: column; overflow: hidden; }
.study-top { flex: none; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 4px; width: 100%; min-height: 52px; margin: 0 auto; padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); }
body.focus .study-top { padding-top: 0; }
.study-head { min-width: 0; display: flex; justify-content: center; }
.study-sub { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--soft); font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.study-sub .count-of { margin-left: auto; }
.study-title { min-width: 0; overflow: hidden; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.study-sub b { color: var(--ink); }
.lesson-page .study { flex: 1; display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0 auto; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.lesson-page .study .stage-col { display: block; flex: none; min-width: 0; }
.lesson-page .sticky { position: static; padding: 0; }
.lesson-page .frame { max-height: min(42dvh, 420px); }
.lesson-page .panel-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 11rem; padding: 0; }
.lesson-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-block-size: 3.5rem; padding: .375rem var(--pad); border-bottom: 1px solid var(--rule); }
.lesson-tools .seg { padding: 0; }
.lesson-tools .seg button { min-block-size: 2.75rem; padding-inline: .75rem; font-size: .875rem; white-space: nowrap; }
.lesson-tools .study-sub:has(.count-of:empty) { display: none; }
.lesson-transcript-tools { margin-inline-start: auto; }
.lesson-page .save-notice:not(:empty) { flex: none; padding: 8px var(--pad); }
.lesson-page .panel { flex: 1; min-height: 0; margin: 0; padding: 22px var(--pad) 36px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lesson-page .panel:has(> .lines) { padding: 6px max(0px, var(--pad) - 12px) 28px; }
.shadow-guide { margin: .25rem var(--pad) .5rem; padding: .625rem .75rem; border-inline-start: 3px solid var(--paper-lime); border-radius: .375rem; background: var(--paper-pale); color: var(--ink); font-size: .875rem; text-align: start; }
.lesson-page .line { position: relative; gap: 4px; padding: 8px 54px 10px 6px; cursor: pointer; }
.lesson-page .line.cur { background: var(--paper-pale); box-shadow: inset 4px 0 0 var(--paper-lime); }
.lesson-page .line .at { align-self: start; padding: 0; }
.line-text { display: block; inline-size: 100%; padding: 0; text-align: start; }
.line-text > :is(.en, .ko) { display: block; }
.lines .line.open .line-text .ko { display: none; }
.line-details { display: grid; gap: .5rem; margin-block-start: .375rem; padding: .625rem .75rem; border: 1px solid var(--paper-line); border-radius: .75rem; background: var(--paper-white); cursor: auto; }
.line-meaning { color: var(--ink); font-size: .9375rem; }
.line-details .line-meaning + .term-item { padding-block-start: .5rem; border-block-start: 1px solid var(--paper-line); }
.lesson-page .bar { position: static; flex: none; gap: 4px 8px; min-height: 0; margin: 0; padding: 4px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); border-top: 1px solid var(--rule); background: var(--paper); }

/* 홈 아래 영상 목록: 어느 폭에서나 두 줄 */
.library .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px) clamp(12px, 2.4vw, 28px); }
.library-head h2 { margin-right: auto; }
.library .mine { margin-top: 36px; }

.study-top > a:first-child { justify-self: start; }
.study-actions { display: flex; justify-content: flex-end; }
.btn.quiet[aria-pressed="true"] { background: var(--paper-lime); border-color: var(--paper-ink); }

/* 장면(릴스): 한 장면이 화면을 채우고 위아래로 넘긴다. 영상 위에는 아무것도 겹치지 않고 자막 · 번역 · 단추는 영상 아래에 둔다 */
@keyframes reel-in { from { opacity: 0; transform: translateY(var(--from, 28px)); } }


/* 지금 재생 중인 줄의 오른쪽 위에만 문장 저장 아이콘 */
.line-save { position: absolute; top: 8px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.line-save .ic { width: 22px; height: 22px; opacity: .4; }
.line:not(.cur) .line-save { display: none; }
.line-save:hover .ic, .line.cur .line-save .ic { opacity: .75; }
.line-save[aria-pressed="true"] { background: var(--paper-lime); }
.line-save[aria-pressed="true"] .ic { opacity: 1; }
.lesson-page .panel > .btn.wide { margin-top: 8px; }

/* 표현: 이 영상에서 배울 표현을 모두 펼쳐 보인다 */
.exprs { display: grid; gap: 14px; }
.expr-card { position: relative; padding: 18px 18px 20px; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper-white); }
.expr-card.cur { border-color: var(--paper-ink); background: var(--paper-pale); }
.expr-card > * + * { margin-top: 14px; }
.expr-head { display: grid; gap: 4px; width: 100%; padding-inline-end: 42px; text-align: left; }
.expr-head b { font: 700 clamp(22px, 5.4vw, 26px)/1.3 var(--serif); letter-spacing: -.02em; }
.expr-head span { color: var(--soft); font-size: 17px; }
.expr-card .why { color: var(--soft); font-size: 15px; }
.expr-sentence { display: grid; gap: .5rem; }
.expr-line { padding: .375rem .75rem; }
.expr-line-main { padding-block: .625rem; border-radius: .625rem; background: var(--paper-white); box-shadow: inset 0 0 0 1px var(--paper-line); }
.expr-sentence .en { font-size: 1rem; line-height: 1.65; }
.expr-line-main .en { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
.expr-sentence .ko { margin-top: .125rem; color: var(--soft); font-size: .9375rem; }
.expr-sentence mark { padding: .08em .12em; background: var(--paper-lime); color: var(--paper-ink); font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.expr-word.spoken { border-radius: .16em; background: var(--paper-ink); color: var(--paper-white); box-shadow: 0 0 0 .08em var(--paper-ink); }
.expr-sentence mark .spoken { color: var(--paper-lime); }
.expr-card:not(.cur) .expr-context { display: none; }
.expr-card .ex { padding-top: 14px; border-top: 1px solid var(--rule); color: var(--soft); font-size: 15px; }
.expr-card .ex .en { color: var(--ink); }
.expr-card .line-save { top: 10px; right: 8px; }

/* 학습 도구와 수업 설정 */
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-white); font-size: 14px; white-space: nowrap; transition: background-color .12s; }
.chip-btn:hover { border-color: var(--edge); }
.chip-btn[popovertarget]::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.chip-btn small { padding: 1px 8px; border-radius: 999px; background: var(--paper-tint); color: var(--paper-ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lesson-tools .chip-btn { justify-content: center; min-block-size: 2.75rem; padding-inline: .6875rem; line-height: 1.2; }
.chip-btn[aria-pressed="true"] { border-color: var(--paper-ink); background: var(--paper-lime); font-weight: 700; }
.chip-btn[aria-pressed="true"]::before { content: ""; inline-size: .3125rem; block-size: .5625rem; margin-block-start: -.1875rem; border: solid currentColor; border-width: 0 .125rem .125rem 0; rotate: 45deg; }
@media (max-width: 479px) {
  .lesson-tools { column-gap: .375rem; }
  .lesson-tools .seg button { padding-inline: .4375rem; }
  .lesson-transcript-tools .chip-btn { min-inline-size: 2.75rem; padding-inline: .4375rem; font-size: .8125rem; }
  .lesson-transcript-tools .chip-btn[aria-pressed="true"]::before { display: none; }
}
.lesson-settings { padding: .75rem; background: var(--paper-pale); overscroll-behavior: contain; scrollbar-width: none; }
.lesson-settings::-webkit-scrollbar { display: none; }
.lesson-settings-content, .lesson-setting-groups { display: grid; gap: .625rem; }
.lesson-settings-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.lesson-settings-header h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.04em; }
.lesson-settings-header .btn { min-block-size: 2.75rem; background: var(--paper-white); }
.lesson-settings-group { display: grid; gap: .5rem; padding: .75rem .875rem; border: 1px solid var(--paper-line); border-radius: .875rem; background: var(--paper-white); }
.lesson-settings-group h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.caption-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .1875rem; padding: .1875rem; border-radius: .75rem; background: var(--paper-pale); }
.caption-modes label { display: grid; place-items: center; min-block-size: 2.75rem; padding: .375rem; border: 1px solid transparent; border-radius: .625rem; font-size: .875rem; line-height: 1.2; text-align: center; cursor: pointer; }
.caption-modes label:hover { border-color: var(--edge); }
.caption-modes label:has(input:checked) { border-color: var(--paper-ink); background: var(--paper-lime); font-weight: 700; }
.caption-modes label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.caption-preview { display: grid; place-content: center start; gap: .125rem; min-block-size: 4rem; padding: .625rem .75rem; border: 1px dashed var(--paper-line); border-radius: .625rem; }
.caption-preview-en { font: 400 1.125rem/1.35 var(--serif); }
.caption-preview-ko { color: var(--soft); font-size: .875rem; }
.lesson-settings[data-compact] { padding: .375rem .5rem; }
.lesson-settings[data-compact] :is(.lesson-settings-content, .lesson-setting-groups) { gap: .25rem; }
.lesson-settings[data-compact] .lesson-settings-group { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .25rem .375rem; padding: .375rem .625rem; }
.lesson-settings[data-compact] :is(.caption-modes ~ .switch, .switch + .switch) { grid-column: 1 / -1; }
.lesson-settings[data-compact] .caption-preview { display: none; }
.caption-preview[data-mode="hide"] .caption-preview-en,
.caption-preview[data-mode="terms"] .caption-preview-term { border-radius: .25rem; background: var(--rule); color: transparent; user-select: none; }
.lesson-settings .switch { min-block-size: 2.75rem; padding: .25rem 0; border: 0; background: none; }
.lesson-settings .switch + .switch { border-block-start: 1px solid var(--paper-line); border-radius: 0; padding-block-start: .625rem; }
.lesson-settings[data-compact] .switch + .switch { padding-block-start: .375rem; }
.lesson-settings .switch label { font-size: .9375rem; }
.lesson-settings .switch .hint { color: var(--soft); font-size: .8125rem; }
.lesson-settings[data-compact] .switch .hint { line-height: 1.35; }
.lesson-settings .switch input:checked { background: var(--paper-ink); }
.lesson-settings .switch:has(:disabled) { opacity: 1; }
.lesson-info h2 { font-size: 1.125rem; }
.lesson-credit { display: grid; gap: .125rem; color: var(--soft); font-size: .875rem; overflow-wrap: anywhere; }
.lesson-credit strong { color: var(--ink); }
.lesson-info-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lesson-info-actions .btn { flex: 1 1 8rem; min-block-size: 2.75rem; }

/* 대본의 주요 표현: 형광펜 밑줄. 문장을 펼치면 표현 설명이 나온다. */
.lesson-page .lines .w.term { background-image: linear-gradient(transparent 58%, var(--paper-lime) 58%); }
.term-item { padding: 2px 0 4px; }
.term-item + .term-item { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--rule); }
.term-head { display: grid; gap: 2px; }
.term-head b { font: 700 19px/1.35 var(--serif); }
.term-head span { color: var(--soft); }
.term-item .why { margin-top: 6px; color: var(--soft); font-size: 15px; }
.term-item .ex { margin-top: 8px; font-size: 15px; }
.term-item .ex span { display: block; }
.term-item .ex .ko { color: var(--soft); }
.toast a { margin-left: 14px; color: var(--paper-lime); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }

/* 저장: 영상 / 문장을 따로 */
.saved { max-width: calc(900px + 2 * var(--gutter)); }
.saved .search-field { display: block; width: 100%; margin-top: 20px; }
.saved .search-field[hidden] { display: none; }
.saved-body { margin-top: 28px; }
.saved .v { position: relative; }
.v-drop { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--paper-ink); border-radius: 50%; background: var(--paper-lime); }
.v-drop .ic { width: 22px; height: 22px; }
.saved-group { border: 1px solid var(--rule); border-radius: 14px; }
.saved-group + .saved-group { margin-top: 24px; }
.saved-source { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--rule); border-radius: 13px 13px 0 0; background: var(--paper-pale); text-decoration: none; }
.mini-thumb { flex: none; width: 96px; height: 54px; border-radius: 8px; background: var(--paper-deep); object-fit: cover; }
.saved-source span { display: grid; gap: 2px; min-width: 0; }
.saved-source b { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.saved-source small { color: var(--soft); font-size: 14px; }
.saved-list { display: grid; }
.saved-sentence { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.saved-sentence + .saved-sentence { border-top: 1px solid var(--rule); }
.saved-sentence:last-child { border-radius: 0 0 13px 13px; }
.saved-sentence:focus-within, .saved-sentence:hover { background: var(--paper-pale); }
.saved-sentence > a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 15px 0 15px 14px; text-decoration: none; }
.saved-sentence time { color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; line-height: 27px; }
.saved-text { display: grid; gap: 3px; text-wrap: pretty; overflow-wrap: anywhere; }
.saved-text b { font-size: 18px; line-height: 1.5; }
.saved-text span { color: var(--soft); font-size: 15px; }
.saved-sentence > .btn { margin: 8px 8px 0 0; }
.saved-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper-pale); }
.saved-empty > .ic { width: 34px; height: 34px; }
.saved-empty p { flex: 1 1 8rem; color: var(--soft); }
.saved-empty .paper-action { min-height: 44px; padding-inline: 15px; font-size: 14px; }
.toast button { margin-left: 14px; color: var(--paper-lime); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }

/* 홈: 처음 오면 소개 → 지금 할 수업 한 장 → 영상 목록 → 이용권 → 바닥 링크 */
.welcome { margin-bottom: clamp(24px, 4vw, 36px); }
.welcome > * + * { margin-top: 14px; }
.welcome h1 { font-size: clamp(32px, 5vw, 52px); overflow-wrap: anywhere; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.eyebrow b { font-size: 22px; letter-spacing: -.04em; }
.eyebrow span { color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.resume-card { --paper-surface: var(--paper-pale); display: grid; gap: 18px; padding: 12px 12px 22px; background: var(--paper-surface); text-decoration: none; }
.resume-art .thumb { border-radius: 10px; }
.resume-body { display: grid; gap: 10px; padding: 0 8px; }
.resume-title { font-size: clamp(21px, 3vw, 28px); line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.resume-body .paper-action { width: 100%; margin-top: 8px; }
.resume > .link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; }
.upsell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-pale); }
.upsell b { display: block; font-size: 20px; letter-spacing: -.03em; }
.upsell .paper-action { flex: 1 1 200px; }
@media (min-width: 720px) {
  .resume-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 20px; }
  .resume-body .paper-action { width: auto; justify-self: start; min-width: 220px; }
  .upsell .paper-action { flex: none; min-width: 200px; }
}

/* 히스토리의 달력, 학습 기록, 저장 목록 */
.calendar-page { max-width: calc(760px + 2 * var(--gutter)); }
.calendar-page > section + section { margin-top: clamp(1.75rem, 5vw, 2.5rem); }
.calendar-page > h1 + section { margin-top: clamp(1.25rem, 4vw, 1.75rem); }
.calendar-page h2 { margin-bottom: 12px; font-size: clamp(1.25rem, 4vw, 1.5rem); letter-spacing: -.04em; }
.log-list { display: grid; gap: 10px; }
.log-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper-white); text-decoration: none; }
.log-item:hover { border-color: var(--edge); }
.log-item span { display: grid; gap: 2px; min-width: 0; }
.log-item .log-thumb { place-items: center; width: clamp(64px, 18vw, 96px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--paper-pale); }
.log-thumb .mini-thumb { width: 100%; height: 100%; }
.log-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-item > .ic:last-child { width: 16px; height: 16px; opacity: .55; }
.thumb-status { position: absolute; top: 7px; left: 7px; padding: 2px 9px; border-radius: 999px; background: var(--paper-lime); color: var(--paper-ink); font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.thumb-status.done { background: var(--paper-ink); color: #fff; }

/* 영상 목록 필터: 난이도 · 장르 · 길이. 버튼으로 접어 두고 누르면 창이 열린다 */
.library-filter { min-height: 44px; }
.chip-btn[data-on] { border-color: var(--paper-ink); background: var(--paper-lime); font-weight: 700; }
.chip-btn[data-on] small { background: var(--paper-ink); color: #fff; }
.pop .filter-row { display: grid; gap: 8px; margin-top: 10px; }
.pop .filter-row > span { color: var(--soft); font-size: 14px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-reset { justify-self: start; margin-top: 8px; }

/* 최근 학습: 맨 위에서 옆으로 미는 목록 */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.rail-head h2 { margin: 0; }
.rail-arrows { display: flex; align-items: center; gap: 2px; }
.rail-arrows[hidden] { display: none; }
.rail-arrows button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.rail-arrows .ic { width: 19px; height: 19px; }
.rail-arrows button:enabled:hover { background: var(--paper-pale); }
.rail-arrows button:disabled { opacity: .3; }
.recent-rail { display: flex; gap: clamp(12px, 2vw, 18px); margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.recent-rail::-webkit-scrollbar { display: none; }
.recent-rail:focus-visible { outline-offset: -3px; }
.recent-rail > li { flex: none; width: clamp(154px, 41vw, 232px); scroll-snap-align: start; }
.rail-card { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; height: 100%; padding: 5px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-white); box-shadow: 0 2px 0 var(--paper-pale); text-decoration: none; }
.rail-card:hover { border-color: var(--edge); }
.rail-art { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--paper-deep); }
.rail-art img { width: 100%; height: 100%; object-fit: cover; }
.rail-art .ic { width: 30px; height: 30px; object-fit: contain; }
.rail-card b, .rail-card time { margin-inline: 5px; }
.rail-card b { display: -webkit-box; overflow: hidden; margin-top: 2px; font-size: clamp(15px, 2vw, 17px); line-height: 1.4; text-wrap: wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rail-card time { display: flex; align-items: center; gap: 5px; padding-block: 3px 4px; color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.rail-card time .ic { width: 14px; height: 14px; }

/* 가로 달력: 오늘은 글자로, 선택한 날은 먹색으로 표시한다. */
.slim-cal { --calendar-pad: clamp(12px, 3vw, 22px); padding: 0 var(--calendar-pad); border: 1px solid var(--rule); border-radius: 16px; background: var(--paper-white); }
.slim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -1px calc(-1 * var(--calendar-pad) - 1px) 0; padding: 12px var(--calendar-pad); border-radius: 16px 16px 0 0; background: var(--paper-ink); color: var(--paper-white); }
.slim-head h2 { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.slim-head h2 small { font-size: 15px; font-weight: 400; color: var(--paper-tint); }
.slim-note { margin-top: 4px; color: var(--paper-tint); font-size: 13px; text-wrap: pretty; }
.slim-streak { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--paper-lime); color: var(--paper-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.slim-streak .ic { width: 18px; height: 18px; }
.strip { display: flex; align-items: center; gap: 4px; margin-inline: calc(var(--calendar-pad) * -1); padding: 10px var(--calendar-pad); overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip:focus-visible { outline-offset: -3px; }
.strip > li { flex: none; }
.slim-month { padding: 0 6px; border-inline-start: 1px solid var(--rule); color: var(--soft); font-size: 12px; }
.slim-day { width: 44px; text-align: center; }
.slim-day > * { display: grid; justify-items: center; gap: 3px; width: 100%; padding: 5px 0; border-radius: 11px; }
.slim-day small { font-size: 12px; color: var(--soft); }
.slim-day b { display: grid; place-items: center; min-width: 30px; height: 27px; border-radius: 8px; line-height: 1; font-size: 17px; font-variant-numeric: tabular-nums; }
.slim-day.on b { background: var(--paper-lime); }
.slim-day.now small { color: var(--ink); font-weight: 700; }
.slim-day.later { color: var(--soft); }
.slim-day button:hover { background: var(--paper-pale); }
.slim-day button[aria-pressed="true"] { background: var(--paper-ink); }
.slim-day button[aria-pressed="true"] small { color: var(--paper-white); }
.slim-day button[aria-pressed="true"] b { color: var(--paper-lime); background: transparent; }
.slim-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 10px 0; border-top: 1px solid var(--rule); }
.slim-sum div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 1px 6px; text-align: center; }
.slim-sum div + div { border-left: 1px solid var(--rule); }
.slim-sum dt { color: var(--soft); font-size: 13px; }
.slim-sum dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.slim-detail { padding: 10px 0 12px; border-top: 1px solid var(--rule); }
.slim-detail h3 { margin: 0 0 6px; color: var(--soft); font-size: 13px; }
.calendar-page .saved-body { margin-top: 12px; }
.calendar-page .saved h2 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.calendar-page .saved h2 small { color: var(--soft); font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; }
.calendar-page .saved .saved-videos { margin-top: clamp(32px, 5vw, 48px); }
@media (max-width: 420px) {
  .saved-empty { display: grid; grid-template-columns: 34px minmax(0, 1fr); }
  .saved-empty .paper-action { grid-column: 2; justify-self: start; }
  .slim-sum div { flex-direction: column; align-items: center; }
}
