/* PLAYCITY PLAYGROUND / GAMES — 공용 스타일
   콘셉트: 제도(製圖) 도면. 모눈 종이, 치수선, IBM Plex의 기술 문서 감성.
   도구별 액센트는 body[data-tool]로 스위칭. */

:root {
  --paper: #f6f6f3;
  --surface: #ffffff;
  --ink: #1b1d21;
  --ink-2: #50565e;
  --ink-3: #8a9098;
  --line: #dfe0da;
  --line-strong: #b8bbb1;
  --grid: rgba(27, 29, 33, 0.05);
  --accent: #d9480f;
  --accent-soft: rgba(217, 72, 15, 0.08);
  --ok: #197a46;
  --miss: #b23a3a;
  --brand: #727170;
  --font-sans: "IBM Plex Sans KR", "Pretendard Variable", Pretendard, "Noto Sans KR", "Noto Sans CJK KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", "D2Coding", "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
body[data-tool="pyeong"] { --accent: #1f5ed6; --accent-soft: rgba(31, 94, 214, 0.08); }
body[data-tool="blank-map"] { --accent: #197a46; --accent-soft: rgba(25, 122, 70, 0.08); }
body[data-tool="apt-namer"] { --accent: #96731c; --accent-soft: rgba(150, 115, 28, 0.1); }

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; }

.t-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.t-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.t-head .t-wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.t-product { display: flex; align-items: center; min-width: 0; }
.t-playcity-link,
.t-brand,
.t-games-brand,
.t-head-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}
.t-playcity-link { flex: none; color: var(--brand); }
.t-playcity-mark {
  display: block;
  width: 68px;
  aspect-ratio: 4 / 1;
  background: currentColor;
  -webkit-mask: url("/assets/images/logo/2025_playcity.svg") center / contain no-repeat;
  mask: url("/assets/images/logo/2025_playcity.svg") center / contain no-repeat;
}
.t-brand {
  margin-left: 11px;
  padding: 0 7px 0 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--brand);
}
.t-brand b { font-size: 12.5px; font-weight: 700; letter-spacing: 0.055em; }
.t-games-brand { flex: none; color: var(--brand); }
.t-games-mark {
  display: block;
  width: 174px;
  aspect-ratio: 1514.52 / 200;
  background: currentColor;
  -webkit-mask: url("/assets/images/logo/playcity_games.svg") center / contain no-repeat;
  mask: url("/assets/images/logo/playcity_games.svg") center / contain no-repeat;
}
.t-head-nav { display: flex; align-self: stretch; align-items: center; gap: 3px; }
.t-head-nav a { padding: 0 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: 0.025em; }
.t-head-nav a:hover { color: var(--ink); }
.t-head-actions {
  display: flex;
  flex: none;
  align-self: stretch;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.t-head-auth {
  --pc-auth-surface: var(--surface);
  --pc-auth-surface-strong: var(--surface);
  --pc-auth-border: var(--line-strong);
  --pc-auth-hover: #ecece8;
  --pc-auth-muted: var(--ink-2);
  --pc-auth-text: var(--ink);
  --pc-auth-shadow: 0 12px 30px rgba(27, 29, 33, 0.16);
  --pc-auth-font-family: var(--font-sans);
  --pc-auth-control-height: 32px;
  --pc-auth-control-font-size: 12px;
  --pc-auth-control-font-weight: 600;
  --pc-auth-control-line-height: 1;
  --pc-auth-login-padding: 0 9px;
  --pc-auth-compact-control-size: 32px;
  --pc-auth-compact-avatar-size: 24px;
  --pc-auth-compact-control-padding: 4px;
  flex: none;
  justify-content: flex-end;
  min-width: 50px;
}
.t-brand[aria-current],
.t-head-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.t-brand[aria-current]::after,
.t-head-nav a[aria-current="page"]::after {
  position: absolute;
  right: 7px;
  bottom: -8px;
  left: 7px;
  height: 2px;
  background: currentColor;
  content: "";
}
.t-brand[aria-current]::after { left: 12px; }

/* PLAYGROUND와 GAMES는 서로 교차 링크하는 두 개의 제품 헤더다. */
.t-head--games .t-head-nav a { color: var(--brand); }
.t-head--games .t-head-nav a:hover { color: var(--ink); }

/* ---------- 플레이그라운드 ---------- */
.pg-games-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 18px 2px;
  color: var(--ink);
  text-decoration: none;
}
.pg-games-link:hover { color: var(--accent); }
.pg-games-copy { min-width: 0; }
.pg-games-copy b { display: block; font-size: 15px; }
.pg-games-description { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13.5px; }
.pg-games-mark {
  flex: none;
  width: 156px;
  aspect-ratio: 1514.52 / 200;
  background: var(--brand);
  -webkit-mask: url("/assets/images/logo/playcity_games.svg") center / contain no-repeat;
  mask: url("/assets/images/logo/playcity_games.svg") center / contain no-repeat;
}

/* ---------- 새 서비스 공지 ---------- */
.lab-announcement {
  --announcement-accent: #0052a4;
  --announcement-soft: #edf4fb;
  border-bottom: 1px solid var(--line);
  background: var(--announcement-soft);
}
.lab-announcement .t-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}
.lab-announcement-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  color: var(--ink);
  line-height: 1.35;
  text-decoration: none;
}
.lab-announcement-label {
  flex: none;
  border: 1px solid var(--announcement-accent);
  padding: 2px 6px;
  color: var(--announcement-accent);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
}
.lab-announcement-message {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
}
.lab-announcement-message strong { flex: none; font-size: 14px; }
.lab-announcement-detail { overflow: hidden; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.lab-announcement-arrow { flex: none; color: var(--announcement-accent); font-family: var(--font-mono); font-size: 15px; }
.lab-announcement-link:hover .lab-announcement-message strong { color: var(--announcement-accent); }
.lab-announcement-close {
  width: 36px;
  height: 36px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.lab-announcement-close:hover { color: var(--ink); }
@media (max-width: 560px) {
  .lab-announcement-detail { display: none; }
  .lab-announcement-message { gap: 0; }
}
@media (max-width: 350px) {
  .lab-announcement-label { display: none; }
}

/* ---------- 히어로 ---------- */
.t-hero {
  padding: 44px 0 34px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  border-bottom: 1px solid var(--line);
}
.t-hero h1 { font-size: clamp(26px, 5.4vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.22; }
.t-lede { margin-top: 12px; font-size: 15.5px; color: var(--ink-2); max-width: 34em; }
.t-lede strong { color: var(--ink); font-weight: 600; }

.t-hero--compact { padding: 26px 0 22px; }
.t-hero--compact h1 { font-size: clamp(22px, 4.6vw, 30px); }
.t-hero--compact .t-lede { margin-top: 6px; font-size: 14px; }

/* ---------- 치수선 섹션 제목 ---------- */
.t-sec { margin-top: 52px; }
.t-sec-h { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.t-sec-h::before, .t-sec-h::after {
  content: "";
  flex: 1;
  height: 7px;
  transform: translateY(3px);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}
.t-sec-h::before { margin-left: 2px; }
.t-sec-h::after { margin-right: 2px; }

/* ---------- 도면 대장(도구 목록) ---------- */
.t-register { margin-top: 20px; border: 1px solid var(--line-strong); background: var(--surface); }
.t-row { display: flex; align-items: center; gap: 16px; padding: 17px 18px; border-top: 1px solid var(--line); text-decoration: none; }
.t-row:first-child { border-top: 0; }
a.t-row:hover { background: var(--accent-soft); }
.t-row-no { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); width: 52px; flex: none; }
.t-row-body { flex: 1; min-width: 0; }
.t-row-body b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.t-row-body p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.t-row-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); border: 1px solid currentColor; padding: 3px 8px; border-radius: 2px; flex: none; }
.t-new { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 2px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0; vertical-align: 2px; }
.t-row.is-soon { opacity: 0.55; }
.t-row.is-soon .t-row-tag { color: var(--ink-3); }

.games-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 24px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.games-command a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 13px 16px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 13.5px;
  text-decoration: none;
}
.games-command a:hover { background: var(--accent-soft); }
.games-command a:first-child { border-left: 0; }
.games-command-primary { gap: 16px; font-weight: 600; }
.games-command-primary strong { flex: none; color: var(--accent); font-family: var(--font-mono); font-size: 11px; }
.games-command .games-next {
  grid-column: 1 / -1;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  border-left: 0;
  color: var(--ink-2);
}
.games-command .games-next strong { margin-left: 6px; color: var(--ink); }
.games-jumps {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.games-jumps::-webkit-scrollbar { display: none; }
.games-jumps a { flex: none; color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.games-jumps a:hover { color: var(--accent); }
.games-page .t-sec { scroll-margin-top: 52px; }

/* ---------- 본문 문서 ---------- */
.t-doc { margin-top: 18px; }
.t-doc p { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.t-doc p strong { color: var(--ink); }
.t-doc .t-note { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.t-faq { margin-top: 18px; border-top: 1px solid var(--line-strong); }
.t-faq details { border-bottom: 1px solid var(--line); }
.t-faq summary { cursor: pointer; padding: 14px 2px; font-size: 15px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-faq summary::-webkit-details-marker { display: none; }
.t-faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-3); font-size: 16px; }
.t-faq details[open] summary::after { content: "\2212"; }
.t-faq .t-faq-a { padding: 0 2px 16px; font-size: 14.5px; color: var(--ink-2); }
.t-faq .t-faq-a p + p { margin-top: 8px; }

/* ---------- 표 ---------- */
.t-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line-strong); background: var(--surface); }
table.t-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 500; text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--line-strong); }
.t-table th:first-child, .t-table td:first-child { text-align: left; }
.t-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.t-table tr:last-child td { border-bottom: 0; }
.t-table td b { font-weight: 600; }
.t-table .is-hot td { background: var(--accent-soft); }

/* ---------- 버튼 ---------- */
.t-btn {
  appearance: none; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; padding: 12px 22px; cursor: pointer; border-radius: 3px;
  letter-spacing: -0.01em;
}
.t-btn:hover { background: #000; }
.t-btn:active { transform: translateY(1px); }
.t-btn--accent { background: var(--accent); border-color: var(--accent); }
.t-btn--accent:hover { filter: brightness(0.92); background: var(--accent); }
.t-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.t-btn--ghost:hover { background: var(--surface); border-color: var(--ink); }
.t-btn--sm { font-size: 13px; padding: 8px 14px; }

.t-records-action,
.lab-account-save {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 0;
}

.t-records-action .t-btn,
.lab-account-save .t-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  color: var(--ink);
  text-decoration: none;
}

.lab-account-save { padding-inline: 2px; }

/* ---------- 광고 ---------- */
/* 광고는 채워진 것이 확인될 때만 테두리와 "광고" 딱지를 두른다.
   다만 높이를 0으로 두면 IntersectionObserver가 발화하지 않아 광고 요청 자체가
   나가지 않는다(자리는 있는데 영영 안 채워진다). 그래서 요청 전에는 1px만 남겨
   두고, 결과가 나오면 채워졌을 때만 자리를 잡는다. */
.t-ad { margin: 0; border: 0; padding: 0; }
.t-ad .adsbygoogle { min-height: 1px; }
.t-ad.is-filled .adsbygoogle { min-height: 0; }
.t-ad .t-ad-label { display: none; }
.t-ad.is-filled { margin: 44px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0 14px; }
.t-ad.is-filled .t-ad-label { display: block; }
.t-ad-label { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-2); margin-bottom: 8px; }
.t-ad .adsbygoogle { display: block; width: 100%; }
html.t-ads-off .t-ad { display: none; }

/* ---------- 푸터 ---------- */
.t-foot { margin-top: 64px; border-top: 1px solid var(--line-strong); padding: 26px 0 44px; font-size: 13px; color: var(--ink-2); }
.t-foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.t-foot-links a { text-decoration: none; color: var(--ink-2); }
.t-foot-links a:hover { color: var(--ink); text-decoration: underline; }
.t-foot .t-fine { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------- 변환기(평수) ---------- */
.conv { margin-top: 26px; border: 1px solid var(--line-strong); background: var(--surface); }
.conv-grid { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: stretch; }
.conv-cell { padding: 18px 18px 16px; min-width: 0; }
.conv-cell label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 6px; }
.conv-cell input {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: clamp(30px, 8vw, 44px); font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; outline: none; min-width: 0;
}
.conv-cell input::placeholder { color: var(--line-strong); }
.conv-cell .conv-unit { font-size: 13px; color: var(--ink-2); }
.conv-swap { display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--ink-3); font-size: 17px; background: var(--paper); }
.conv-sub { border-top: 1px solid var(--line); padding: 10px 18px; font-size: 13.5px; color: var(--ink-2); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.conv-sub b { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .games-command { grid-template-columns: 1fr 1fr; }
  .games-command-primary { grid-column: 1 / -1; border-left: 0 !important; }
  .games-command a:nth-child(2) { border-left: 0; }
  .games-command a:nth-child(2),
  .games-command a:nth-child(3) { border-top: 1px solid var(--line); }
  .games-command .games-next { grid-column: 1 / -1; }
  .games-jumps { margin-inline: -4px; padding-inline: 4px; }
  .conv-grid { grid-template-columns: 1fr; }
  .conv-swap { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  appearance: none; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 13px; padding: 6px 12px; border-radius: 999px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip small { color: var(--ink-3); font-size: 11.5px; }

/* ---------- 백지도 ---------- */
.bm-bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line-strong); padding: 10px 0; }
.bm-bar-in { display: flex; gap: 10px; align-items: center; }
.bm-input {
  flex: 1; min-width: 0; border: 1.5px solid var(--ink); background: var(--surface); border-radius: 3px;
  font-family: var(--font-sans); font-size: 17px; padding: 10px 13px; outline: none;
}
.bm-input:disabled { background: var(--paper); border-color: var(--line-strong); }
.bm-input.is-wrong { animation: bmShake 0.18s linear 2; border-color: var(--miss); }
@keyframes bmShake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.bm-score { font-family: var(--font-mono); font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bm-time { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bm-progress { height: 3px; background: var(--line); margin-top: 9px; }
.bm-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s; }
.bm-stage { margin-top: 18px; border: 1px solid var(--line-strong); background: var(--surface); position: relative; }
.bm-stage svg { display: block; width: 100%; height: auto; }
.bm-region { fill: #fdfdfc; stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bm-region.is-hit { fill: var(--accent); fill-opacity: 0.82; stroke: #fff; animation: bmPop 0.35s ease-out; }
.bm-region.is-miss { fill: var(--miss); fill-opacity: 0.16; stroke: var(--miss); stroke-width: 0.7; }
@keyframes bmPop { 0% { fill-opacity: 0.35; } 60% { fill-opacity: 0.95; } }
.bm-label { font-family: var(--font-sans); font-weight: 600; fill: #fff; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,0.28); stroke-width: 2px; }
.bm-label.is-miss-l { fill: var(--miss); stroke: #fff; stroke-width: 2.6px; font-weight: 700; }
.bm-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(246, 246, 243, 0.88); backdrop-filter: blur(1.5px); }
.bm-cover p { font-size: 14px; color: var(--ink-2); text-align: center; padding: 0 24px; }
.bm-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bm-giveup { margin-left: auto; }
.bm-answers { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.bm-tag { font-size: 12.5px; border: 1px solid var(--line); background: var(--surface); border-radius: 2px; padding: 3px 8px; color: var(--ink-2); }
.bm-tag.is-new { border-color: var(--accent); color: var(--accent); }
.bm-tag.is-missed { border-color: transparent; background: rgba(178, 58, 58, 0.09); color: var(--miss); }
.bm-result { margin-top: 18px; border: 1px solid var(--ink); background: var(--surface); padding: 22px 20px; }
.bm-result-head { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--ink-3); }
.bm-result-score { font-size: clamp(30px, 7vw, 44px); font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bm-result-score small { font-size: 0.5em; font-weight: 600; color: var(--ink-2); }
.bm-result-sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.bm-best { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-top: 8px; }

/* 퀴즈 목록 */
.bm-index-search { margin-top: 18px; }
.bm-index-search input { width: 100%; border: 1.5px solid var(--ink); border-radius: 3px; font-size: 16px; padding: 11px 14px; background: var(--surface); outline: none; }
.bm-groups { margin-top: 8px; }
.bm-groups details { border-bottom: 1px solid var(--line); }
.bm-groups summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 14px 2px; font-weight: 600; font-size: 15.5px; }
.bm-groups summary::-webkit-details-marker { display: none; }
.bm-groups summary .n { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.bm-groups summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-3); margin-left: auto; }
.bm-groups details[open] summary::after { content: "\2212"; }
.bm-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 16px; }
.bm-links a { font-size: 13.5px; text-decoration: none; border: 1px solid var(--line-strong); background: var(--surface); padding: 6px 11px; border-radius: 2px; color: var(--ink-2); }
.bm-links a:hover { border-color: var(--accent); color: var(--accent); }
.bm-links a small { color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; }
.bm-featured { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.bm-featured a { text-decoration: none; border: 1px solid var(--line-strong); background: var(--surface); padding: 15px 16px; }
.bm-featured a:hover { background: var(--accent-soft); }
.bm-featured b { display: block; font-size: 15.5px; font-weight: 600; }
.bm-featured span { font-size: 12.5px; color: var(--ink-2); }
.bm-featured .n { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); display: block; margin-bottom: 6px; letter-spacing: 0.1em; }

/* ---------- 아파트 이름 ---------- */
.apt-form { margin-top: 24px; border: 1px solid var(--line-strong); background: var(--surface); padding: 20px 18px; }
.apt-field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 6px; }
.apt-field input { width: 100%; border: 1.5px solid var(--line-strong); border-radius: 3px; font-size: 17px; padding: 11px 13px; outline: none; background: var(--surface); font-family: var(--font-sans); }
.apt-field input:focus { border-color: var(--ink); }
.apt-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.apt-opt { appearance: none; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; font-size: 13.5px; padding: 7px 14px; color: var(--ink-2); }
.apt-opt[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.apt-field + .apt-field { margin-top: 16px; }
.apt-submit { margin-top: 20px; width: 100%; }
.apt-card { margin-top: 22px; background: #202949; color: #f3ead2; padding: 34px 26px 24px; position: relative; overflow: hidden; }
.apt-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(243, 234, 210, 0.35); pointer-events: none; }
.apt-card-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.34em; color: #c9b25c; text-align: center; }
.apt-card-name { font-size: clamp(24px, 6vw, 36px); font-weight: 700; text-align: center; margin-top: 12px; line-height: 1.3; letter-spacing: 0.02em; text-wrap: balance; }
.apt-card-sub { text-align: center; font-size: 12.5px; color: rgba(243, 234, 210, 0.75); margin-top: 14px; }
.apt-card-fine { text-align: center; font-family: var(--font-mono); font-size: 10px; color: rgba(243, 234, 210, 0.45); margin-top: 18px; letter-spacing: 0.06em; }
.apt-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.apt-stat { flex: 1; min-width: 140px; border: 1px solid var(--line-strong); background: var(--surface); padding: 12px 14px; }
.apt-stat .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-3); }
.apt-stat .v { font-size: 17px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.apt-stat .v small { font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* ---------- 유틸 ---------- */
.t-hidden { display: none !important; }
.t-center { text-align: center; }

/* ========== v2 (2026-08-17): 모바일 터치·신규 도구 컴포넌트 ========== */
* { -webkit-tap-highlight-color: transparent; }
.t-btn { min-height: 46px; }
.t-btn--block { display: block; width: 100%; }
.chip { padding: 10px 15px; }
.apt-opt { padding: 10px 16px; min-height: 42px; }

/* 계산기 공통: 입력 위, 라이브 결과 카드 아래 */
.calc { margin-top: 24px; border: 1px solid var(--line-strong); background: var(--surface); }
.calc-body { padding: 18px; display: grid; gap: 16px; }
.calc-row { display: grid; gap: 6px; }
.calc-row > label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); }
.calc-row input[type="text"], .calc-row select {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: 3px; background: var(--surface);
  font-family: var(--font-sans); font-size: 17px; padding: 12px 13px; outline: none; color: var(--ink);
  min-height: 48px;
}
.calc-row input:focus, .calc-row select:focus { border-color: var(--ink); }
.calc-row select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.calc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .calc-cols { grid-template-columns: 1fr; } }
.calc-out { border-top: 3px double var(--line-strong); background: var(--accent-soft); padding: 16px 18px 18px; }
.calc-out-head { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-3); margin-bottom: 8px; }
.calc-out-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
.calc-kv .k { font-size: 12.5px; color: var(--ink-2); }
.calc-kv .v { font-size: clamp(21px, 5.2vw, 27px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.calc-kv .v small { font-size: 0.58em; font-weight: 600; color: var(--ink-2); }
.calc-kv .v.is-bad { color: var(--miss); }
.calc-kv .v.is-ok { color: var(--ok); }
.calc-foot { padding: 10px 18px 14px; font-size: 12.5px; color: var(--ink-3); background: var(--accent-soft); }

/* 퀴즈 라운드(버튼형) */
.qz { margin-top: 24px; border: 1px solid var(--line-strong); background: var(--surface); }
.qz-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.qz-top b { color: var(--ink); }
.qz-word { padding: 40px 20px 8px; text-align: center; }
.qz-word .qz-q { font-size: 14px; color: var(--ink-2); }
.qz-word .qz-name { font-size: clamp(23px, 6vw, 33px); font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; line-height: 1.3; text-wrap: balance; }
.qz-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 26px 16px 18px; }
.qz-btns.is-quad { grid-template-columns: 1fr 1fr; }
.qz-btn {
  appearance: none; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 3px; font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--ink);
  min-height: 58px; padding: 10px 12px; line-height: 1.35;
}
.qz-btn--shortcut,
.qz-next .t-btn--shortcut { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.key-hint {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 22px; min-height: 22px; padding: 2px 6px; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 3px; background: var(--paper); color: var(--ink-3);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.t-btn .key-hint { border-color: rgba(255,255,255,0.62); background: rgba(255,255,255,0.12); color: inherit; }
.qz-btn:not(:disabled):hover { border-color: var(--ink); }
.qz-btn:active { transform: translateY(1px); }
.qz-btn:disabled { cursor: default; opacity: 0.55; }
.qz-btn.is-correct { border-color: var(--ok); background: rgba(25, 122, 70, 0.1); color: var(--ok); opacity: 1; }
.qz-btn.is-wrong { border-color: var(--miss); background: rgba(178, 58, 58, 0.08); color: var(--miss); opacity: 1; }
.qz-expl { margin: 0 16px 18px; border: 1px solid var(--line); background: var(--paper); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.qz-expl b { color: var(--ink); }
.qz-next { margin: 0 16px 18px; }
.qz-dots { display: flex; gap: 5px; }
.qz-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.qz-dots i.is-o { background: var(--ok); }
.qz-dots i.is-x { background: var(--miss); }

/* 캔버스 스테이지(그리기·픽셀시티) */
.cv-stage { margin-top: 18px; border: 1px solid var(--line-strong); background: var(--surface); position: relative; }
.cv-stage canvas { display: block; width: 100%; height: auto; touch-action: none; }
.cv-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.cv-tool {
  appearance: none; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 3px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 9px 13px; min-height: 42px;
  display: inline-flex; align-items: center; gap: 7px;
}
.cv-tool i { width: 13px; height: 13px; border-radius: 2px; display: inline-block; border: 1px solid rgba(0,0,0,0.18); }
.cv-tool[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cv-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cv-stats b { color: var(--ink); font-size: 15px; }

/* 사전(지명) */
.dict-hit { display: flex; align-items: baseline; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.dict-hit .where { color: var(--ink-3); font-size: 13px; flex: 1; }
.dict-hit a { color: var(--accent); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.dict-hit a:hover { text-decoration: underline; }
.rank-table td:first-child { font-family: var(--font-mono); color: var(--ink-3); width: 40px; }

/* 모바일 마감 */
@media (max-width: 560px) {
  .t-wrap { padding: 0 16px; }
  .t-playcity-mark { width: 58px; }
  .t-brand { margin-left: 8px; padding-right: 4px; padding-left: 9px; }
  .t-brand b { font-size: 11.5px; letter-spacing: 0.035em; }
  .t-games-mark { width: 146px; }
  .t-head-actions { gap: 2px; }
  .t-head-nav { gap: 0; }
  .t-head-nav a { padding-inline: 5px; }
  .t-head-nav a[aria-current="page"]::after { right: 5px; left: 5px; }
  .pg-games-link { align-items: flex-start; gap: 14px; }
  .pg-games-mark { width: 112px; margin-top: 3px; }
  .bm-bar-in { gap: 8px; }
  .bm-score { font-size: 13.5px; }
  .bm-time { font-size: 11px; }
  .qz-btns { grid-template-columns: 1fr 1fr; }
  .t-foot { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .t-games-mark { width: 132px; }
  .t-head-nav a { padding-inline: 3px; font-size: 11.5px; }
}
@media (max-width: 330px) {
  .t-head-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ========== v3 (2026-08-17): 저장 시트·순위표 ========== */
.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(27, 29, 33, 0.45); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet-panel { background: var(--surface); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; border: 1px solid var(--line-strong); padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.sheet-x { appearance: none; border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px 8px; }
.sheet-hint { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.sheet-img { margin-top: 12px; border: 1px solid var(--line); background: var(--paper); }
.sheet-img img { display: block; width: 100%; height: auto; }
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sheet-actions .t-btn { flex: 1; }

.lb { margin-top: 16px; border: 1px solid var(--line-strong); background: var(--surface); padding: 4px 14px 12px; }
.lb-title { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-3); padding: 10px 2px 6px; }
.lb-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 14.5px; }
.lb-rank { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); width: 20px; }
.lb-row.is-top .lb-rank { color: var(--accent); font-weight: 700; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-variant-numeric: tabular-nums; font-weight: 600; }
.lb-when { font-size: 11.5px; color: var(--ink-3); width: 52px; text-align: right; }
.lb-row.is-me { background: var(--accent-soft); margin: 0 -14px; padding-left: 16px; padding-right: 16px; }
.lb-row.is-me .lb-name { color: var(--accent); font-weight: 700; }
.lb-head { padding-top: 5px; padding-bottom: 5px; color: var(--ink-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
.lb-head .lb-rank { color: var(--ink-3); font-weight: 400; }
.lb-head .lb-score { font-weight: 400; }
.lb-nick-editor { margin-top: 10px; }
.lb-nick { display: flex; gap: 8px; }
.lb-nick input { flex: 1; min-width: 0; border: 1.5px solid var(--line-strong); border-radius: 3px; padding: 8px 10px; font-size: 14px; font-family: var(--font-sans); }
.lb-nick input[aria-invalid="true"] { border-color: var(--miss); }
.lb-nick-error { min-height: 1.4em; margin-top: 5px; color: var(--miss); font-size: 12px; line-height: 1.4; }

.hist { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.hist b { color: var(--ink); }

.t-btn:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ========== v4: 페이지 전환·인터랙션 물성 ========== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.16s; }
::view-transition-new(root) { animation-duration: 0.16s; }

.t-btn, .chip, .apt-opt, .qz-btn, .cv-tool, .ap-key, .t-row {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
  touch-action: manipulation;
}
.t-btn, .chip, .apt-opt, .qz-btn, .cv-tool, .ap-key { user-select: none; -webkit-user-select: none; }
.chip:active, .apt-opt:active, .cv-tool:active { transform: translateY(1px); }

@keyframes riseIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.bm-result:not(.t-hidden), .ap-reveal:not(.t-hidden), .qz-expl:not(.t-hidden), .apt-card, .nt-card, .lb { animation: riseIn 0.22s ease-out; }

.combo { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ========== v5: 게임 한 화면 수납(모바일) ========== */
@media (max-width: 560px) {
  .t-hero--compact { padding: 13px 0 11px; }
  .t-hero--compact .t-lede { display: none; }
  .t-hero--compact h1 { font-size: 20px; }
    .qz-word { padding: 20px 16px 4px; }
  .qz-word .qz-name { font-size: 21px; }
  .qz-btns { padding: 14px 12px 12px; gap: 8px; }
  .qz-btn { min-height: 52px; font-size: 15px; }
  .bm-actions { gap: 8px; }
}

/* ========== v6: 입력 강조·정오답 물성 ========== */
html { scroll-behavior: smooth; }
@keyframes keyFlash { 0% { transform: scale(1); } 40% { transform: scale(0.88); background: var(--ink); color: #fff; } 100% { transform: scale(1); } }
.ap-key.pressed { animation: keyFlash 0.16s ease-out; }
@keyframes cellPop { 0% { transform: scale(0.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.ap-cell.is-filled { animation: cellPop 0.12s ease-out; }
@keyframes cellReveal { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.ap-cell.reveal { animation: cellReveal 0.28s ease-out backwards; }
.ap-cell.reveal:nth-child(2) { animation-delay: 0.1s; }
.ap-cell.reveal:nth-child(3) { animation-delay: 0.2s; }

@keyframes goodFlash { 0% { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(25,122,70,0.25); } 100% { border-color: var(--ink); box-shadow: none; } }
.bm-input.is-good, .sg-good { animation: goodFlash 0.5s ease-out; }

@keyframes qzBounce { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.qz-btn.is-correct { animation: qzBounce 0.3s ease-out; }
@keyframes qzShake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
.qz-btn.is-wrong { animation: qzShake 0.28s ease-out; }

.sg-row.landed { animation: riseIn 0.2s ease-out; }
.t-faq summary::after { transition: transform 0.18s ease; display: inline-block; }
.t-faq details[open] summary::after { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .ap-cell.is-filled, .ap-cell.reveal, .ap-key.pressed, .bm-input.is-good, .sg-good, .qz-btn.is-correct, .qz-btn.is-wrong, .sg-row.landed { animation: none !important; }
}

/* ========== v7: 긴 문자열 응급 줄바꿈·광고 형태 제한 ========== */
/* keep-all 유지하되, 공백 없는 긴 이름(24자 단지명 등)은 넘칠 때만 임의 지점 개행 */
.qz-name, .apt-card-name, .nt-name, .ap-reveal .city, .bm-tag, .dict-hit b,
.calc-kv .v, .lb-name, .st-desc, .sg-row b, .t-row-body b, .qz-expl {
  overflow-wrap: anywhere;
}
.qz-word, .apt-card, .nt-card { min-width: 0; overflow: hidden; }
.qz-name.is-long { font-size: clamp(17px, 4.6vw, 24px); letter-spacing: 0; }
/* 광고는 배너형만: 세로로 화면을 메우지 않도록 상한 */
.lb-foot { font-size: 11.5px; color: var(--ink-3); padding: 8px 2px 0; }

/* ── 백지도 확대·이동 ── */
.bm-stage { touch-action: pan-y; }
.bm-stage.is-zoomed { cursor: grab; }
.bm-stage.is-zoomed:active { cursor: grabbing; }
.bm-stage svg { touch-action: none; }
.bm-resetview {
  position: absolute; right: 10px; top: 10px; z-index: 5;
  appearance: none; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  padding: 7px 11px; border-radius: 3px; cursor: pointer; min-height: 34px;
}
.bm-resetview:hover { border-color: var(--ink); }
.bm-tip { font-size: 12px; color: var(--ink-3); align-self: center; }
@media (max-width: 560px) { .bm-tip { display: none; } }

/* 축하 효과 — 문제은행 완주처럼 드문 순간에만 */
.fx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.fx-confetti i { position: absolute; top: -16px; height: 12px; border-radius: 1px; opacity: 0.92; animation-name: fxFall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes fxFall { to { transform: translateY(106vh) rotate(760deg); } }
@media (prefers-reduced-motion: reduce) { .fx-confetti { display: none; } }
.qz-master { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.24em; color: var(--accent); margin-bottom: 4px; }

/* 공유 알림 — 복사됐다는 사실만 짧게 알린다 */
.lab-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 4px; z-index: 120; max-width: calc(100vw - 32px);
  text-align: center; opacity: 0; transition: opacity 0.22s, transform 0.22s; pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.lab-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .lab-toast { transition: none; } }

/* 클립보드가 막혔을 때 — 직접 복사할 수 있게 펼쳐 준다 */
.lab-copybox {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px)); background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: 4px; padding: 14px; z-index: 130;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.lab-copybox p { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.lab-copybox textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 3px; padding: 8px;
  font-family: var(--font-sans); font-size: 13.5px; resize: none; background: var(--bg);
}
.lab-copybox button { margin-top: 8px; }
