/* ============================================================
   웹툰 스토리 퍼즐 — 뼈대 배치만 (1차)

   ★ 겉면을 짓지 않는다. 색 · 모서리 · 그림자 · 움직임은 ../v4.css §12 「놀이 둘레」의
     --yj-game-* 토큰과 .yj-game__* 클래스가 맡는다. 이 파일은 자리(배치 · 크기)만 잡는다.
     값(HEX · px 색 · 새 그림자 · 새 움직임)을 여기에 새로 적지 않는다.
   ★ 공통 스킨 키트가 나오면 놀이 총괄이 이 위에 입힌다 — 아래 클래스 이름이 결합점이다.
       .tc-stage  .tc-board  .tc-card(.is-pick .is-over .is-drag .is-locked .is-live)
       .tc-blank  .tc-hit  .tc-dock  .tc-opts  .tc-opt(.is-right .is-wrong)
   ============================================================ */

/* ── 판 화면 뿌리 ─────────────────────────────────────────── */
html.tc-page, .tc-page body { height: 100%; }
.tc-page body {
  margin: 0;
  background: var(--yj-game-bg);
  color: var(--yj-game-text);
  font-family: var(--yj-font);
  overscroll-behavior: none;
}
.tc-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}

/* ── 컷 놓는 자리 ─────────────────────────────────────────── */
.tc-board {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding: var(--yj-game-s2) var(--yj-game-s4) 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--yj-game-s2);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tc-card {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--yj-game-s1);
  padding: var(--yj-game-s1) var(--yj-game-s2) var(--yj-game-s1);
  background: var(--yj-game-card);
  border: 1px solid var(--yj-game-line);
  border-radius: var(--yj-game-r-sm);
  box-shadow: var(--yj-game-sh-1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.tc-card:focus-visible { outline: 2px solid var(--yj-game-ink); outline-offset: 2px; }
/* 놓는 동안에는 카드가 손가락을 따라가야 한다 — 화면이 같이 밀리지 않게 */
.tc-board[data-phase="order"] .tc-card { touch-action: none; cursor: grab; }
.tc-board[data-phase="order"] .tc-card.is-locked { cursor: default; }

/* 고른 것 — 유자 200 면 + 유자 600 테두리(규격) */
.tc-card.is-pick, .tc-card.is-over { background: var(--yj-game-tint-press); border-color: var(--yj-game-tint-line); }
.tc-card.is-drag { z-index: 3; box-shadow: var(--yj-game-sh-3); cursor: grabbing; }
/* 제자리에 굳은 컷 — 이룬 것은 잎 */
.tc-card.is-locked { border-color: var(--yj-game-ok); }
.tc-card.is-locked .tc-card__no { background: var(--yj-game-ok-tint); color: var(--yj-game-ok-ink); }

/* 자리 번호 */
.tc-card__no {
  position: absolute; z-index: 1;
  top: var(--yj-game-s2); left: var(--yj-game-s3);
  min-width: 24px; height: 24px; box-sizing: border-box; padding: 0 var(--yj-game-s1);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yj-game-card); color: var(--yj-game-sub);
  border-radius: var(--yj-game-r-full);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* 컷 그림 — 띠 그림에서 한 컷만 보이게 자른다. 크기는 js/render/board.js fit() 이 넣는다 */
.tc-card__pic {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: var(--yj-game-r-sm);
  background: var(--yj-game-day);
}
.tc-card__pic img {
  position: absolute; left: 0; width: 100%;
  display: block; max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 대사 */
.tc-card__say {
  align-self: stretch;
  margin: 0;
  padding: 0 var(--yj-game-s1);
  font-size: 17px; line-height: 1.4;
  color: var(--yj-game-text);
  word-break: keep-all; overflow-wrap: anywhere;
}
.tc-card__who {
  margin-right: var(--yj-game-s1);
  font-size: 13px; font-weight: 800;
  color: var(--yj-game-tint-ink);
}
/* 대사가 살아난 컷 */
.tc-card.is-live .tc-card__say { color: var(--yj-game-ink); font-weight: 700; }
.tc-board[data-phase="reveal"] .tc-card:not(.is-live) .tc-card__say { color: var(--yj-game-sub); }

/* 가린 낱말 — 글자 수만큼의 빈칸. 기호를 쓰지 않고 면으로 가린다 */
.tc-blank {
  display: inline-block;
  height: 1.1em; vertical-align: -0.15em;
  margin: 0 2px;
  background: var(--yj-game-tint-press);
  border-bottom: 2px solid var(--yj-game-tint-line);
  border-radius: 4px;
}
/* 드러난 낱말 */
.tc-hit { font-weight: 800; color: var(--yj-game-ink); background: var(--yj-game-tint); border-radius: 4px; padding: 0 2px; }

/* ── 아래 조작 줄 ─────────────────────────────────────────── */
.tc-dock {
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: var(--yj-game-s3) var(--yj-game-s4) calc(var(--yj-game-s3) + var(--yj-game-safe-b));
  display: flex; flex-direction: column; gap: var(--yj-game-s2);
}
.tc-dock__msg {
  margin: 0; min-height: 21px;
  font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center;
  color: var(--yj-game-sub);
}
.tc-dock__msg b { color: var(--yj-game-ink); }
.tc-dock__msg--ok { color: var(--yj-game-ok-ink); }
.tc-dock__msg--no { color: var(--yj-game-no-ink); }
.tc-dock__def { margin: 0; font-size: 15px; line-height: 1.4; text-align: center; color: var(--yj-game-text); }
.tc-dock__def b { color: var(--yj-game-ink); font-weight: 800; margin-right: var(--yj-game-s1); }
.tc-dock [hidden] { display: none !important; }
/* 공용 ghost 단추는 가로 줄용(flex: 1 1 0)이라 세로로 쌓인 이 줄에서는 높이가 글자만큼(15px)으로 눌렸다 —
   「건너뛰기」가 터치 44 를 못 채웠다(2026-11-14). 이 줄의 단추는 제 높이를 지킨다 */
.tc-dock > .yj-game__btn { flex: 0 0 auto; }

/* 낱말 보기 — 두 칸 격자, 칸마다 48 */
.tc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--yj-game-s2); }
.tc-opt.yj-game__btn { height: 48px; padding: 0 var(--yj-game-s2); font-size: 17px; flex: none; }
.tc-opt.is-right { background: var(--yj-game-ok-tint); color: var(--yj-game-ok-ink); opacity: 1; }
.tc-opt.is-wrong { background: var(--yj-game-no-tint); color: var(--yj-game-no-ink); opacity: 1; }

/* ── 결과 시트 낱말 줄 ────────────────────────────────────── */
.tc-word { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.tc-word__def {
  font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--yj-game-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 로비 ─────────────────────────────────────────────────── */
.tc-lobby { display: flex; flex-direction: column; align-items: center; padding: var(--yj-game-s4); }
.tc-lobby .yj-game__card { max-width: 440px; animation: none; }
.tc-lobby .yj-game__sec-h { margin-bottom: var(--yj-game-s2); }
/* 고르는 단추 — 둘레 절의 칩 모양을 쓰되 누르는 것이라 높이 44 */
.tc-pick { display: flex; flex-wrap: wrap; gap: var(--yj-game-s2); }
.tc-pick .yj-game__chip {
  appearance: none; -webkit-tap-highlight-color: transparent;
  height: var(--yj-game-tap); min-width: var(--yj-game-tap);
  font-family: var(--yj-font); cursor: pointer;
}
.tc-pick .yj-game__chip:focus-visible { outline: 2px solid var(--yj-game-ink); outline-offset: 2px; }
.tc-lobby a.yj-game__btn--primary { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  .tc-card { transition: none; }
}

/* ============================================================
   놀이 스킨 A+ (2026-11-14) — 뿌리에 yj-play yj-play--toon 이 붙은 화면에서만
   ★ 값은 키트(../v4.css §13 yj-play) 토큰만 쓴다. 이 놀이는 「어디에 놓는가」와 상태만 정한다.
   ★ 입체(먹선 · 아래 단)는 키트 부품 클래스가 칠한다 — 카드는 yj-play__panel, 단추는 yj-game__btn.
     여기서는 그 부품이 읽는 --yj-play-step(단) · --yj-play-ring(색 고리) 값만 바꾼다(새 그림자 0).
   ============================================================ */

/* 화면 읽기 프로그램용으로만 남기는 글(세계 머리가 같은 글을 그림과 함께 보인다) */
.tc-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── 로비 — 세계 머리 → 크림 몸통 → 아래 고정 줄 ─────────────── */
.yj-play.yj-shell { background: var(--yj-play-cream); }
.yj-play .tc-head .yj-play__head-title, .yj-play .tc-head .yj-play__head-sub { margin-right: 140px; }
.yj-play .tc-head__art { position: absolute; z-index: 1; right: 14px; bottom: 26px; width: 124px; height: 124px; pointer-events: none; }
.yj-play .tc-head__art svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* 좁은 폰(374 이하) — 이름 · 한 줄이 두 줄로 꺾여 한 줄의 둘째 줄이 몸통 밑에 가렸다. 머리 높이를 글 줄 수만큼(11-18 · T-6) */
@media (max-width: 374px) { .yj-play .tc-head.yj-play__head { height: auto; min-height: calc(min(196px, 33dvh) + var(--yj-game-safe-t)); padding-bottom: 30px; } }
.yj-play .tc-lobby.yj-play__body { display: block; align-items: stretch; padding: 16px 16px 0; }
/* 옛 로비 카드는 몸통 안에서 판판하게 — 크림 몸통이 그 자리를 맡는다 */
.yj-play .tc-lobby .yj-game__card {
  --yj-play-step: 0px;
  max-width: 560px; margin: 0 auto; padding: 0;
  border-color: transparent; background: transparent;
}
.yj-play .tc-lobby .yj-game__sec { margin-top: 12px; padding: 12px 14px; }
.yj-play .tc-lobby .yj-game__stats { margin-top: 0; }
.yj-play .tc-lobby .yj-game__cap { color: var(--yj-play-ink); }
/* 아래 고정 줄 — 도크 위에 붙는다. 주 단추 하나 */
.yj-play .tc-cta.yj-play__cta {
  bottom: calc(var(--yj-dock-h, 56px) + env(safe-area-inset-bottom, 0px));
  margin: 16px -16px 0; padding-bottom: 14px;
  border-top: var(--yj-play-line) solid var(--yj-play-ink);
}
.yj-play .tc-cta > .yj-game__btn--primary { flex: 1 1 auto; width: 100%; }

/* ── 판 화면 ─────────────────────────────────────────────── */
.tc-page body.yj-play { background: var(--yj-play-world-low); color: var(--yj-play-ink); }
.yj-play .tc-stage.yj-play__world { color: var(--yj-play-ink); }
/* HUD — 제목 알약이 좁은 폭에서 진행 알약을 밀지 않게 */
.yj-play .yj-game__hud .yj-game__title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.yj-play .yj-game__hud .yj-game__title small { color: var(--yj-game-sub); margin-left: 6px; }
.yj-play .yj-game__hud .yj-game__prog { flex: 0 0 auto; margin-left: 0; margin-right: 0; }
.yj-play .yj-game__hud .yj-game__btn--icon { margin-left: auto; }
/* 「처음 만나는 이야기」 — 판 머리 제목 알약이 이 한 줄로 바뀐다(놀이 유자 옅은 면) */
.yj-play .yj-game__hud .yj-game__title.is-first { background: var(--yj-play-yuja-hi); }
.yj-play .yj-game__title.is-first .tc-title-name, .yj-play .yj-game__title.is-first small { display: none; }
.tc-first { font-weight: 700; }
/* 좁은 폰(374 이하) — 판 머리 제목 알약이 121px 라 놀이 이름을 빼고 「1권 · 쉬움」만(11-18 · T-6) */
@media (max-width: 374px) { .yj-play .yj-game__hud .yj-game__title .tc-title-name { display: none; } .yj-play .yj-game__hud .yj-game__title small { margin-left: 0; } }
/* 도움 이름(「· 쉬움」)은 놀이 이름과 함께 들어가지 않는 폭(375~413)에서만 숨긴다 */
@media (min-width: 375px) and (max-width: 413px) { .yj-play .tc-help-name { display: none; } }
.yj-game__title:not(.is-first) .tc-first { display: none; }
/* 로비 권 칩 — 위 권 이름, 아래 작은 상태 글(「20개」 · 「놀이로 3개」 · 「처음」). 끄지 않는다 */
.yj-play .tc-pick .tc-volchip { flex-direction: column; justify-content: center; gap: 1px; height: auto; min-height: 52px; padding: 4px 12px; line-height: 1.2; }
.yj-play .tc-pick .tc-volchip small { font-size: 13px; font-weight: 400; }

/* 컷 카드 — 크림 + 먹선 + 단 5(yj-play__panel). 틈은 색 고리(5px)가 이웃을 덮지 않을 만큼 */
.yj-play .tc-board { gap: 10px; padding: 8px 16px 10px; }
.yj-play .tc-card.yj-play__panel { gap: 4px; padding: 5px 6px 6px; border-radius: var(--yj-play-r-16); }
.yj-play .tc-card .tc-card__pic { border-radius: var(--yj-play-r-12); background: var(--yj-play-ink-06); }
/* 고른 것 · 놓을 자리 — 놀이 유자 옅은 면 + 유자 색 고리 */
.yj-play .tc-card.is-pick, .yj-play .tc-card.is-over { background: var(--yj-play-yuja-hi); --yj-play-ring: 0 0 0 5px var(--yj-play-ring-yuja); }
/* 집어 든 컷 — 단이 깊어져 살짝 들린다 */
.yj-play .tc-card.is-drag { --yj-play-step: var(--yj-play-step-7); --yj-play-ring: 0 0 0 5px var(--yj-play-ring-yuja); }
/* 굳은 컷 — 잎 색 고리 + 번호가 잎 조각 */
.yj-play .tc-card.is-locked { border-color: var(--yj-play-ink); --yj-play-ring: 0 0 0 5px var(--yj-play-ring-leaf); }
/* 자리 번호 — 작은 크림 조각(먹선). 굳으면 잎 윤기 */
.yj-play .tc-card__no {
  top: 12px; left: 12px; min-width: 30px; height: 30px; padding: 0 6px;
  border: 2px solid var(--yj-play-ink); background: var(--yj-play-cream); color: var(--yj-play-ink);
  font-size: 15px; font-weight: 700;
}
.yj-play .tc-card.is-locked .tc-card__no { background: var(--yj-play-gloss-leaf); color: var(--yj-play-ink); }
/* 대사 — 크림 말 카드의 글. 화자는 먹 굵게 */
.yj-play .tc-card__say { padding: 0 4px; color: var(--yj-play-ink); }
.yj-play .tc-card__who { color: var(--yj-play-ink); font-weight: 700; }
.yj-play .tc-card.is-live .tc-card__say { color: var(--yj-play-ink); font-weight: 700; }
.yj-play .tc-board[data-phase="reveal"] .tc-card:not(.is-live) .tc-card__say { color: var(--yj-game-sub); }
/* 가린 낱말 — 놀이 유자 옅은 면 + 먹 밑줄 · 드러난 낱말도 같은 면 */
.yj-play .tc-blank { background: var(--yj-play-yuja-hi); border-bottom: 2.5px solid var(--yj-play-ink); }
.yj-play .tc-hit { background: var(--yj-play-yuja-hi); color: var(--yj-play-ink); font-weight: 700; }

/* 아래 조작 줄 — 크림 몸통이 판 위로 올라탄다(세계색 위에 글자를 바로 두지 않는다) */
.yj-play .tc-dock {
  position: relative; z-index: 2; gap: 10px;
  padding: 12px 16px calc(14px + var(--yj-game-safe-b));
  border-top: var(--yj-play-line) solid var(--yj-play-ink);
  border-radius: var(--yj-play-r-24) var(--yj-play-r-24) 0 0;
  background: var(--yj-play-cream);
}
/* 고른 뒤 「맞았어요.」와 뜻 줄은 들어가면 한 줄에 나란히 — 그만큼 판 그림이 커진다. 나머지는 한 줄씩 */
.yj-play .tc-dock { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 8px; }
.yj-play .tc-dock > * { flex: 0 0 100%; }
.yj-play .tc-dock > .tc-dock__msg, .yj-play .tc-dock > .tc-dock__def { flex: 0 1 auto; }
.yj-play .tc-dock__msg { color: var(--yj-play-ink); }
.yj-play .tc-dock__msg--ok { color: var(--yj-game-ok-ink); }
.yj-play .tc-dock__msg--no { color: var(--yj-game-no-ink); }
.yj-play .tc-dock__def, .yj-play .tc-dock__def b { color: var(--yj-play-ink); }
/* 낱말 보기 — 입체 타일. 짧은 말뿐이면 한 줄 넷(판 그림이 덜 줄어든다) */
.yj-play .tc-opts { gap: 10px 8px; }
.yj-play .tc-opts[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.yj-play .tc-opt.yj-game__btn { height: 50px; padding: 0 6px; border-radius: var(--yj-play-r-12); font-size: 18px; }
.yj-play .tc-opts[data-long] .tc-opt.yj-game__btn { padding: 0 2px; font-size: 16px; letter-spacing: -.02em; }
/* 아주 좁은 폭(360 아래)에서는 네 글자 넷이 칸을 넘친다 — 두 줄 둘로 */
@media (max-width: 359px) { .yj-play .tc-opts[data-cols="4"][data-long] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.yj-play .tc-opt.is-right { background: var(--yj-play-leaf); color: var(--yj-play-ink); }
.yj-play .tc-opt.is-wrong { background: var(--yj-play-orange); color: var(--yj-play-ink); }

/* ── 시작 덮개 — 그림 세 컷 + 한 줄, 자세한 글은 「더 보기」 ─────────── */
.yj-play .tc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none; }
.yj-play .tc-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px;
  border: var(--yj-play-line) solid var(--yj-play-ink-25); border-radius: var(--yj-play-r-12);
  background: var(--yj-play-yuja-hi); color: var(--yj-play-ink); font-size: 15px; font-weight: 700;
}
.yj-play .tc-step__art { display: block; width: 28px; height: 28px; }
.yj-play .tc-step__art svg { display: block; width: 100%; height: 100%; }
.yj-play .tc-more { margin-top: 4px; }
.yj-play .tc-more__sum {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  list-style: none; cursor: pointer; color: var(--yj-play-ink); font-size: 15px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px;
}
.yj-play .tc-more__sum::-webkit-details-marker { display: none; }
.yj-play .tc-more[open] .tc-more__sum { text-decoration: none; }

/* ── 결과 시트 — 표지 띠 · 금테는 키트. 낱말은 알약 대신 줄(뜻이 함께 있어 줄이 읽기 쉽다) ── */
.yj-play .yj-game__sheet .yj-game__words { flex-direction: column; align-items: stretch; flex-wrap: nowrap; text-align: left; }
.yj-play .yj-game__sheet a.yj-game__word { justify-content: flex-start; gap: 8px; padding: 6px 12px; border-radius: var(--yj-play-r-12); }
.yj-play .yj-game__sheet .tc-word__def { color: var(--yj-play-ink); }
.yj-play .yj-game__sheet .yj-game__cap { color: var(--yj-play-ink); }

/* 결과 줄 표시 둘 — 순서 · 낱말(2026-11-18 · 시안 #tooncut-result 안 A · js/render/sheet.js marks). 판정 값 그대로, 모양만 */
.yj-play .yj-game__sheet a.yj-game__word.tc-row { align-items: center; min-height: 52px; padding: 6px 10px 6px 12px; color: var(--yj-play-ink); }
.yj-play .yj-game__sheet a.tc-row--both { background: var(--yj-play-ok-tint); }
.yj-play .yj-game__sheet a.tc-row--none { background: var(--yj-play-no-tint); }
.yj-play .yj-game__sheet a.tc-row--mix { background: var(--yj-play-ink-06); }
.yj-play .yj-game__sheet a.tc-row > .yj-game__ic { display: none; }   /* 앞 표시 하나(낱말만)는 표시 둘이 대신한다 — 마크업은 그대로 */
.yj-play .tc-marks { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; margin-left: auto; }
.yj-play .tc-mark {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px 0 4px; box-sizing: border-box;
  border: 2px solid var(--yj-play-ink); border-radius: var(--yj-play-r-full); background: var(--yj-play-cream);
  color: var(--yj-play-ink); font-size: 13px; font-weight: 700; font-style: normal; line-height: 1; white-space: nowrap;
}
.yj-play .tc-mark .yj-game__ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; color: var(--yj-play-ink); }
.yj-play .tc-mark.is-ok { background: var(--yj-play-leaf); }
.yj-play .tc-mark.is-re { background: var(--yj-play-yuja); }
.yj-play .tc-mark.is-no { border-style: dashed; }
.yj-play .tc-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 8px 0 0; color: var(--yj-play-ink); font-size: 14px; }
.yj-play .tc-key > span { display: inline-flex; align-items: center; gap: 4px; }
.yj-play .tc-key .tc-mark { padding: 0 4px; }

/* 결과 낱말의 「처음」(진도 연계 §5-3, 2026-11-16) — 놀이로 먼저 만난 한자의 낱말. 키트 딱지 그대로, 낱말 뒤 띄움만 */
.tc-first-tag { margin-left: 6px; vertical-align: middle; }
