/* 카톡 영어와 영상 영어의 공용 화면 너비, 머리줄, 하단 메뉴. 홈 머리줄 · 홈 하단 메뉴 없이 AI 채팅처럼 홈 단추 하나로 돌아가고, 아래에는 서비스 안 메뉴만 둔다. */
:root { --top: 60px; --tabs: 60px; --shell-width: 60rem; background: var(--paper-white); }
.study-shell { position: relative; max-inline-size: var(--shell-width); margin-inline: auto; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 8px; background: var(--action); color: #fff; }
.skip:focus { top: 8px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--learn); color: #fff; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }

/* 머리줄: 왼쪽 브랜드, 오른쪽 계정 */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); border-bottom: 1px solid var(--rule); background: var(--paper-hi); }
.top > .brand { margin-right: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; text-decoration: none; }
.brand .paper-sticker { --sticker-size: 32px; }
.brand strong { font: 700 20px/1 var(--sans); letter-spacing: -.065em; }
.brand span { margin-left: 3px; padding-left: 10px; border-left: 1px solid var(--rule); color: var(--soft); font-size: 14px; }
.account { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; text-decoration: none; }
.nav-link:hover { background: var(--paper-deep); }

/* 홈 단추: 로고(AI 채팅 .chat-home 과 같은 모양) */
.top-home { display: inline-flex; flex: none; align-items: center; min-height: 44px; margin-inline-start: -8px; padding-inline: 8px; border-radius: 10px; }
.top-home img { display: block; width: auto; height: 21px; }
.top-home:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (hover: hover) { .top-home:hover { background: var(--paper-deep); } }
.top-title { font: 700 17px/1.2 var(--sans); letter-spacing: -.02em; }
/* 머리줄 오른쪽 '시작하기'(12-03, paper/pay.js topPass) — 이용권이 없을 때만, 누르면 결제 팝업 */
.top-pass {
  display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 40px; margin-inline-start: auto; padding: 0 16px;
  border: 1px solid var(--paper-ink); border-radius: 999px; background: var(--paper-ink); color: #fff;
  font: 700 14px/1 var(--sans); letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
}
.top-pass:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (hover: hover) { .top-pass:hover { background: #3a3a37; } }
/* 서비스 안 메뉴는 화면 아래에 붙는다(홈 하단 메뉴와 같은 짜임). 높이는 --tabs */
.tabs {
  position: fixed; inset: auto 0 0; z-index: 10;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 8rem); justify-content: center;
  height: calc(var(--tabs) + env(safe-area-inset-bottom));
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border-top: 1px solid var(--rule); background: var(--paper-hi);
}
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--soft); font: 400 .8125rem/1.2 var(--sans); text-decoration: none; white-space: nowrap;
}
.tabs a[aria-current] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current]::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.tabs :is(.ic, .paper-sticker) { width: 24px; height: 24px; }
.tabs a:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
@media (hover: hover) { .tabs a:hover { color: var(--ink); background: var(--paper-deep); } }
@media (max-width: 480px) {
  .brand .paper-sticker { --sticker-size: 28px; }
  .brand strong { font-size: 18px; }
  .brand span { padding-left: 8px; font-size: 13px; }
  .nav-link { padding-inline: 8px; font-size: 14px; }
}
@media (max-width: 359px) {
  .top { gap: 6px; }
  .brand { gap: 6px; }
  .brand .paper-sticker { --sticker-size: 24px; }
  .brand strong { font-size: 16px; }
  .brand span { font-size: 12px; }
}
@media print {
  :root { background: none; }
  .study-shell { max-inline-size: none; }
  .top, .tabs { display: none !important; }
}
