@font-face { font-family: 'Type-cake'; src: url('../fonts/Cake-Regular.woff2') format('woff2'); font-display: swap; ascent-override:92%; descent-override:78%; line-gap-override:0%; }
@font-face { font-family: 'Type-giul'; src: url('../fonts/Giul-Regular.woff2') format('woff2'); font-display: swap; ascent-override:94%; descent-override:22%; line-gap-override:0%; }
/* Normalize browser line metrics across supplied fonts; preserve their outlines. */
@font-face { font-family: 'Type-rooms'; src: url('../fonts/Rooms-Regular.woff2') format('woff2'); font-display: swap; ascent-override:94%; descent-override:22%; line-gap-override:0%; }
@font-face { font-family: 'Type-umm'; src: url('../fonts/umm-Regular.woff2') format('woff2'); font-display: swap; ascent-override:94%; descent-override:22%; line-gap-override:0%; }
@font-face { font-family: 'Type-witz'; src: url('../fonts/Witz.woff2') format('woff2'); font-display: swap; ascent-override:94%; descent-override:22%; line-gap-override:0%; }
/* 각 폰트 실제 잉크 범위(fontTools로 실측)에 맞춰 ascent/descent-override를 개별 지정한다.
   기본 94%/22%로는 cake/rooms/witz의 받침이 깊은 한글 글자가 위아래로 넘친다. */
@font-face { font-family:'Glyph-cake';src:url('../fonts/Cake-Regular.woff2') format('woff2');font-display:swap;ascent-override:92%;descent-override:78%;line-gap-override:0%; }
@font-face { font-family:'Glyph-giul';src:url('../fonts/Giul-Regular.woff2') format('woff2');font-display:swap;ascent-override:94%;descent-override:22%;line-gap-override:0%; }
@font-face { font-family:'Glyph-rooms';src:url('../fonts/Rooms-Regular.woff2') format('woff2');font-display:swap;ascent-override:96%;descent-override:50%;line-gap-override:0%; }
@font-face { font-family:'Glyph-umm';src:url('../fonts/umm-Regular.woff2') format('woff2');font-display:swap;ascent-override:94%;descent-override:22%;line-gap-override:0%; }
@font-face { font-family:'Glyph-witz';src:url('../fonts/Witz.woff2') format('woff2');font-display:swap;ascent-override:94%;descent-override:26%;line-gap-override:0%; }
.glyphs__big,.glyphs__cell { font-family:var(--font-glyph,var(--font-display)); }
html, body { background-color:#fff; }
.hero { background:var(--sub); padding-bottom:28px; }
[hidden] { display: none !important; }

.hero__headline, .info__body, .typing__text, .caption-row { white-space: pre-wrap; }
/* Match the supplied TAP/Type dropdown, anchored to the right gutter. */
/* 상단바는 스크롤해도 화면 위에 붙어 있다(모든 페이지). */
.topbar { position:sticky; top:0; z-index:50; gap:16px; color:var(--on-accent,#fff); }
.topbar__mark { filter:invert(var(--mark-invert,0)); }
.topbar__brand { flex-shrink:0; font-size:14px; }
.topbar__nav { display:flex; align-items:center; gap:0; color:inherit; font-size:14px; line-height:1.3; }
.topbar__home { opacity:.4; }
.type-menu { position:relative; }
.type-menu summary { display:flex; list-style:none; cursor:pointer; }
.type-menu summary::-webkit-details-marker { display:none; }
.type-menu__links { position:absolute; top:calc(100% + 8px); right:0; z-index:20; max-width:calc(100vw - 32px); display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.type-menu__links a { display:block; background:#fff; padding:3px 6px; color:#111; font-size:14px; line-height:1.3; text-decoration:none; white-space:nowrap; }
/* 모든 페이지 공통: 칸마다 검은 테두리, 열릴 때 위에서부터 한 칸씩 도로록 내려온다. 밑줄 색(--item-main)은 타입 페이지만 서체 대표색. */
.type-menu__links a { outline:1px solid #111; outline-offset:-1px; }
/* 열 때 내려오는 움직임은 menu-drop.mjs */
.topbar__nav .type-menu__links a:hover,
.topbar__nav .type-menu__links a:focus-visible { color:#111; }
.topbar__nav .type-menu__links a:hover .type-menu__name,
.topbar__nav .type-menu__links a:focus-visible .type-menu__name { text-decoration-line:underline; text-decoration-color:var(--item-main, #111); text-underline-offset:2px; }
.hero__headline,.typing__text { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.info__heading,.info__body,.info__table th,.info__table td { font-size:16px; line-height:1.6; }
.info__body { text-align:left; width:100%; padding:0; color:inherit; overflow-wrap:anywhere; }
.info__col,.head-row > * { min-width:0; overflow-wrap:anywhere; }
.caption-row > * { min-width:0; word-break:keep-all; overflow-wrap:break-word; }
.info__table { table-layout:fixed; overflow-wrap:anywhere; }
.typing__meta { flex-wrap:wrap; gap:12px 20px; }
.language-toggle { cursor: pointer; transition: opacity 160ms ease; }
.language-toggle.is-changing { opacity: 0; }
.language-toggle:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--main); outline-offset: 5px; }
.topbar a:focus-visible { outline-color: var(--on-accent,#fff); }
.typing__text:focus,.typing__text:focus-visible { outline:none; }
.keyboard-mode .typing__text:focus { outline:1px solid var(--main); outline-offset:8px; }
.video__frame { aspect-ratio:16 / 9; background:#111; }
.video__frame iframe { inset:auto; top:50%; left:50%; transform:translate(-50%,-50%); }
.usage__frame img { max-width: 100%; object-fit: contain; }
.font-notice { font-size: var(--fs-meta); margin-top: 16px; }
@media(max-width:1024px) and (min-width:769px) {
 .typing__row--split,.info__grid { grid-template-columns:1fr; }
 .info__grid { gap:32px; }
 .head-row,.caption-row { column-gap:16px; }
 .col-end { white-space:normal; }
}
@media(prefers-reduced-motion:reduce) { .language-toggle { transition: none; } }

/* Cake has deep descending Korean outlines (up to .78em below baseline). */
body[data-slug="cake"] .hero__headline { line-height:1.75; }

.info__table th,.info__table td { padding:0; line-height:1.6; }
.hero__stage { height:clamp(220px,55svh,680px); display:flex; align-items:center; padding:24px 0; }
.hero__headline { width:100%; padding:0; flex:none; }
.usage__frame,.usage__frame--empty { aspect-ratio:16 / 9; padding:0; background:var(--sub); overflow:hidden; }
.usage__frame img { position:absolute; inset:0; width:100%; height:100%; max-height:none; object-fit:contain; }
.usage__frame .placeholder { background:transparent; position:absolute; inset:0; width:100%; height:100%; min-height:0; padding:16px; gap:clamp(8px,3vw,40px); justify-content:center; }
.usage__frame .placeholder__face { font-size:clamp(28px,6.5vw,96px); }
.usage__frame .placeholder__text { font-size:clamp(13px,1.6vw,24px); }
.usage__nav { z-index:2; background:rgba(255,255,255,.85); }
.usage__status { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); font-size:13px; background:#ffffffdd; padding:2px 8px; }
@media(max-width:380px) { .topbar { gap:8px; } .topbar__brand { gap:4px; } }

/* 상단바 높이·글자 위치는 Info·Archive·Publish(site.css .site .topbar)와 같게: 모바일 50(위 16), 데스크톱 66(위 24) */
.topbar { height:50px; align-items:flex-start; padding-top:16px; line-height:1.32; letter-spacing:-0.015em; }
.topbar__nav { line-height:1.32; }
.glyphs__preview { top:70px; }
@media(min-width:1024px) { .topbar { height:66px; padding-top:24px; } .glyphs__preview { top:86px; } }

/* iOS Safari 기본 모양 지우기: 슬라이더 손잡이 그림자, 검색창 둥근 테두리·그림자 → 데스크톱처럼 밑줄만 */
.typing__control input[type='range'] { -webkit-tap-highlight-color:transparent; }
.typing__control input[type='range']::-webkit-slider-thumb { border:0; box-shadow:none; }
.glyphs__search input { -webkit-appearance:none; appearance:none; border-radius:0; box-shadow:none; }

/* 모바일 글리프: 큰 미리보기를 상단바 바로 아래에 붙여서, 아래 칸을 눌러도 위로 올라가지 않고 바로 확인한다.
   글리프 묶음(.glyphs__layout)을 벗어나면 같이 올라간다(데스크톱과 같은 방식). */
@media(max-width:768px) {
  .glyphs__layout { gap:12px; }
  /* 위 선(1px)은 붙어 있는 동안 상단바 뒤로 들어가 보이지 않게 1px 더 올린다. */
  .glyphs__preview { position:sticky; top:49px; z-index:2; background:var(--white,#fff); }
  .glyphs__preview-body { min-height:132px; padding:12px 0; }
  .glyphs__code { top:12px; }

  /* 모바일 영상·사용 예시: 1줄 [제목칸 이름 … 오른쪽 끝 링크/정보], 2줄 제목·설명 */
  .head-row,.caption-row { grid-template-columns:minmax(0,1fr) auto; column-gap:16px; }
  .col-label { grid-column:1; grid-row:1; }
  .col-a { grid-column:1 / -1; grid-row:2; }
  .head-row .col-b:empty { display:none; }
  .head-row .col-end,.caption-row .col-b { grid-column:2; grid-row:1; text-align:right; white-space:nowrap; }
}

/* 푸터 이스터에그: 춤추는 이모티콘을 누르면 위에 말풍선으로 웹 크레딧(credits.mjs). 피그마 tap-dev '말풍선' 페이지 기준:
   흰 바탕 · 1px 검정 테두리 · 폭 302 · 아래 가운데 꼬리(밑변 40, 높이 20) · 꼬리 끝과 이모티콘 머리 사이 28 */
.credit-anchor { position:relative; display:flex; flex-direction:column; align-items:center; }
.credit-anchor .footer__mark { margin-top:0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.credit-anchor .footer__mark:focus:not(:focus-visible) { outline:none; }
.credit-bubble {
  --shift:0px;
  position:absolute; left:50%; bottom:calc(100% + 28px); z-index:30;
  width:302px; max-width:calc(100vw - 32px);
  padding:14px 16px 16px;
  background:#fff; color:#111; border:1px solid #111;
  font-size:14px; line-height:1.6; letter-spacing:-0.015em; text-align:left; white-space:normal;
  word-break:keep-all; overflow-wrap:break-word;
  transform:translateX(calc(-50% + var(--shift)));
  translate:0 6px; opacity:0;
  transition:opacity 180ms ease, translate 220ms cubic-bezier(.2,.8,.3,1);
}
.credit-bubble.is-shown { opacity:1; translate:0 0; }
.credit-bubble::before,
.credit-bubble::after {
  content:''; position:absolute; top:100%; left:calc(50% - var(--shift) - 20px);
  border:20px solid transparent; border-bottom:0; border-top-color:#111;
}
.credit-bubble::after { top:calc(100% - 1.5px); border-top-color:#fff; }
.credit-bubble__list { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:16px; }
.credit-bubble__note { margin-top:12px; }
.credit-bubble__mail { display:inline-block; margin-top:4px; }
.credit-bubble__source { margin-top:12px; font-size:11px; line-height:1.4; letter-spacing:0; }
.credit-bubble a { text-decoration:underline; text-decoration-thickness:1px; text-decoration-color:rgba(0,0,0,.3); text-underline-offset:4px; transition:text-decoration-color 160ms ease; -webkit-tap-highlight-color:transparent; }
.credit-bubble a:hover,.credit-bubble a:focus-visible { text-decoration-color:currentColor; }
@media(prefers-reduced-motion:reduce) { .credit-bubble { transition:none; } }

/* 타입 페이지 푸터: TAP → 국문 소개 → 영문 소개 → 링크(왼끝 정렬, 14px), 그 아래 마크 + 저작권은
   Info·Archive·Publish의 .site-end(site.css)와 같은 크기·간격. 타입 페이지는 site.css를 읽지 않아 여기 둔다. */
.site-footer { margin-top:40px; padding-top:24px; padding-bottom:20px; font-size:14px; line-height:1.6; letter-spacing:-0.015em; text-align:center; }
.footer__about { display:flex; flex-direction:column; align-items:flex-start; gap:16px; text-align:left; word-break:keep-all; overflow-wrap:break-word; }
.footer__about .footer__en { line-height:1.5; }
.footer__about .footer__links { flex-direction:row; justify-content:flex-start; flex-wrap:wrap; gap:4px 16px; }
.site-footer .site-end { display:flex; flex-direction:column; align-items:center; gap:12px; padding-top:96px; }
.site-footer .footer__mark { margin-top:0; }
.site-footer .footer__mark span { line-height:1.6; }
@media(min-width:1024px) {
  .site-footer { padding-bottom:24px; }
  .site-footer .site-end { padding-top:64px; }
}
