/* 유자 더하기 — 판 배치(뼈대).
   겉면(세계색 · 먹선 · 입체 단추 · 반응 효과)은 여기서 짓지 않는다. 틀은 ../v4.css §12 .yj-game, 값은 토큰만 쓴다.
   공통 스킨 키트가 오면 놀이 총괄이 이 파일 위에 입힌다. 클래스 이름(.ym__*)은 그대로 둔다.

   병 안(.ym__stage)은 1em = 엔진의 한 단위다(js/app/game.js 의 fit() 이 글자 크기로 배율을 정한다).
   그래서 구슬 · 넘침 선 · 손에 든 구슬의 자리는 전부 em 으로 적는다. */

html, body { margin: 0; }
body.ym {
  position: relative; box-sizing: border-box;
  height: 100dvh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--yj-game-bg); color: var(--yj-game-text); font-family: var(--yj-font);
  /* 쉬움 단계의 색 고리 — 주문 자리(위 · 가운데 · 아래)마다 하나. 시안의 하늘색은 토큰이 없어 주황을 쓴다. */
  --ym-c0: var(--yj-yuja-600); --ym-c1: var(--yj-leaf-solid); --ym-c2: var(--yj-orange);
}

/* 판 화면에는 도크가 없다 — ../app-safe-area.css 가 터치 기기에서 body 아래에 도크 몫 60px 를 주는 것을 되돌린다
   (그만큼 병이 작아졌다 · 2026-11-14 375×812 실측 아래 64px 빈칸). 아래 안전 영역은 .ym__board 가 --yj-game-safe-b 로 받는다.
   글자엮기(scrabble.css)와 같은 처리. */
body.ym { padding-bottom: 0 !important; }

/* 판 */
.ym__board {
  flex: 1 1 auto; min-height: 0; box-sizing: border-box; width: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--yj-game-s1);
  padding: var(--yj-game-s1) var(--yj-game-s3) calc(var(--yj-game-s1) + var(--yj-game-safe-b));
}
.ym__board[hidden] { display: none; }

/* 주문서 3장 — 가로 띠 */
.ym__orders { flex: 0 0 auto; margin: 0; padding: 0; list-style: none; display: grid; gap: var(--yj-game-s1); }
.ym__ord {
  box-sizing: border-box; min-height: 70px; border-radius: var(--yj-game-r);
  background: var(--yj-game-card); border: 1px solid var(--yj-game-line-strong); box-shadow: var(--yj-game-sh-1);
  overflow: hidden;
}
.ym__ord.is-empty { background: transparent; border-style: dashed; box-shadow: none; }
.ym__ord-btn {
  appearance: none; -webkit-tap-highlight-color: transparent; box-sizing: border-box;
  /* 띠 높이를 두 줄 뜻풀이 높이(70)로 고정한다 — 주문이 바뀔 때 병이 출렁이거나 다시 맞춰지지 않은 채 넘치지 않게 */
  width: 100%; height: 70px; margin: 0; padding: var(--yj-game-s1) var(--yj-game-s2) var(--yj-game-s1) var(--yj-game-s3);
  display: flex; align-items: center; gap: var(--yj-game-s2);
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ym__ord-btn:focus-visible { outline: 2px solid var(--yj-game-ink); outline-offset: -2px; }
.ym__ord.is-c0 { border-left: 8px solid var(--ym-c0); }
.ym__ord.is-c1 { border-left: 8px solid var(--ym-c1); }
.ym__ord.is-c2 { border-left: 8px solid var(--ym-c2); }
.ym__txt { flex: 1 1 auto; min-width: 0; display: block; }
.ym__w { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--yj-game-ink); }
.ym__w.is-big { font-size: 24px; }
.ym__w.is-hide i {
  display: inline-block; width: 17px; height: 17px; margin-right: 3px; vertical-align: -3px;
  border: 1px dashed var(--yj-game-sub); border-radius: var(--yj-game-r-sm);
}
.ym__d {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; line-height: 1.3; color: var(--yj-game-text); word-break: keep-all;
}
.ym__slots { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.ym__plus { font-style: normal; font-size: 14px; font-weight: 700; color: var(--yj-game-sub); width: 10px; text-align: center; }
.ym__slot {
  box-sizing: border-box; width: 52px; height: 52px; border-radius: var(--yj-game-r-full);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  background: var(--yj-game-day); border: 1px dashed var(--yj-game-sub); color: var(--yj-game-sub); font-size: 1px;
}
/* 글자 13px 아래로 내리지 않는다(총괄 권장안 Q2 — 375 폭 기준). 긴 뜻(4자 이상)은 두 줄로 줄 간격을 좁힌다 */
.ym__slot .ym__hun { font-size: 13px; }
.ym__slot .ym__hun.is-long { font-size: 13px; line-height: 1; max-width: 46px; word-break: keep-all; }
.ym__slot .ym__snd { font-size: 17px; }
.ym__slot.is-in { background: var(--yj-game-tint-press); border: 1px solid var(--yj-game-tint-line); color: var(--yj-game-ink); }
.ym__slot.is-now { background: var(--yj-game-tint-50); border: 1px solid var(--yj-game-ink); color: var(--yj-game-ink); }
.is-c0 .ym__slot { box-shadow: 0 0 0 3px var(--ym-c0); }
.is-c1 .ym__slot { box-shadow: 0 0 0 3px var(--ym-c1); }
.is-c2 .ym__slot { box-shadow: 0 0 0 3px var(--ym-c2); }
.is-c0 .ym__slots, .is-c1 .ym__slots, .is-c2 .ym__slots { gap: 6px; padding-right: 3px; }

/* 병 */
.ym__play {
  flex: 1 1 auto; min-height: 220px; display: flex; align-items: flex-end; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; outline: none;
}
.ym__play:focus-visible .ym__jar { outline: 2px solid var(--yj-game-ink); outline-offset: 3px; }
.ym__stage { position: relative; flex: 0 0 auto; font-size: 1px; }
.ym__jar {
  position: absolute; left: -3px; right: -3px; top: 70em; bottom: -3px; box-sizing: border-box;
  background: var(--yj-game-card); border: 3px solid var(--yj-game-line-strong); border-top: 0;
  border-radius: 0 0 var(--yj-game-r) var(--yj-game-r);
}
.ym__stage.is-warn .ym__jar { border-color: var(--yj-game-no); }
.ym__over { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--yj-game-no); pointer-events: none; }
.ym__over span { position: absolute; right: 6px; top: 3px; font-size: 12px; font-weight: 700; color: var(--yj-game-no-ink); }
.ym__guide {
  position: absolute; left: 0; top: 70em; bottom: 0; width: 0; margin-left: -1px;
  border-left: 2px dotted var(--yj-game-line-strong); pointer-events: none;
}
.ym__guide[hidden] { display: none; }
.ym__beads { position: absolute; inset: 0; pointer-events: none; }
.ym__bead { position: absolute; left: -33em; top: -33em; width: 66em; height: 66em; will-change: transform; }
/* 자리는 바깥 상자가 옮기고, 보이는 것과 모션(흔들림 · 맥박)은 안쪽 상자가 맡는다 */
.ym__bead-in {
  width: 100%; height: 100%; box-sizing: border-box;
  border-radius: var(--yj-game-r-full); background: var(--yj-game-tint-press); border: 2px solid var(--yj-game-tint-line);
  color: var(--yj-game-ink); display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05; text-align: center;
}
/* 구슬 안 글자(엔진 단위 em) — 규격 §16 「판 안 조각의 정보 글자 13px 이상」. 2026-11-14: 뜻을 크게(14 → 16) · 음을 조금 작게(24 → 22)
   바꿔 같은 구슬 크기에서 뜻 글자를 키웠다. 긴 뜻(4자 이상)은 한 줄 3자까지 두 줄(13.2 → 15) — 둥근 테두리 안에 들게 줄 폭을 3자로 묶는다 */
.ym__bead .ym__hun { font-size: 16em; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.ym__bead .ym__hun.is-long { font-size: 15.5em; max-width: 3.1em; line-height: 1; letter-spacing: -.04em; word-break: keep-all; }
.ym__bead .ym__snd { font-size: 22em; font-weight: 800; line-height: 1.05; }
.ym__bead .ym__hun.is-long + .ym__snd { font-size: 19em; line-height: 1; }   /* 긴 뜻 구슬은 음을 한 단 줄여 두 줄 뜻에 자리를 준다 */
.ym__bead.is-hand .ym__bead-in { box-shadow: var(--yj-game-sh-3); }
.ym__bead.is-hand.is-wait { opacity: .55; }
.ym__bead.is-c0 .ym__bead-in { box-shadow: 0 0 0 4em var(--ym-c0); }
.ym__bead.is-c1 .ym__bead-in { box-shadow: 0 0 0 4em var(--ym-c1); }
.ym__bead.is-c2 .ym__bead-in { box-shadow: 0 0 0 4em var(--ym-c2); }

/* 합쳐졌을 때 · 소리만 맞는 짝일 때 뜨는 말 */
.ym__say {
  /* 자리는 병 상자의 비율로 잡는다 — 이 상자는 글자 크기를 px 로 정해서 em 이 엔진 단위가 아니다 */
  position: absolute; left: 6%; right: 6%; top: 21%; z-index: 3; box-sizing: border-box;
  padding: var(--yj-game-s2) var(--yj-game-s3); border-radius: var(--yj-game-r);
  background: var(--yj-game-card); border: 1px solid var(--yj-game-line-strong); box-shadow: var(--yj-game-sh-3);
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; pointer-events: none;
  font-size: 16px; color: var(--yj-game-ink);
}
.ym__say[hidden] { display: none; }
.ym__say-w { font-size: 24px; font-weight: 800; line-height: 1.2; }
.ym__say-n { font-size: 18px; font-weight: 800; line-height: 1.3; }
.ym__say-c {
  font-size: 14px; font-weight: 700; padding: 1px 10px; border-radius: var(--yj-game-r-full);
  background: var(--yj-game-tint-press); border: 1px solid var(--yj-game-tint-line);
}
.ym__say-d { font-size: 15px; line-height: 1.35; color: var(--yj-game-text); word-break: keep-all; }

/* 아래 띠 — 남은 주문 점 · 안내 · 다음 구슬 */
.ym__foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--yj-game-s2); min-height: 44px; }
.ym__dots { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.ym__dots i { width: 12px; height: 12px; box-sizing: border-box; border-radius: var(--yj-game-r-full); border: 1px solid var(--yj-game-line-strong); background: var(--yj-game-card); }
.ym__dots i.is-on { background: var(--yj-game-ok); border-color: var(--yj-game-ok); }
.ym__dots i.is-skip { background: var(--yj-game-no-tint); border-color: var(--yj-game-no); }
.ym__tip { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--yj-game-sub); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 점이 많으면 안내가 「끌어서 …」로 잘렸다 — 그때는 숨긴다(11-18). 폰 폭에서 점 7개(보통 · 어려움) 이상, 좁은 폰(374 이하)은 늘 */
@media (max-width: 767px) { .ym__foot:has(.ym__dots i:nth-child(7)) .ym__tip { display: none; } }
@media (max-width: 374px) { .ym__tip { display: none; } }
.ym__next { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--yj-game-sub); }
.ym__next-bead {
  box-sizing: border-box; width: 44px; height: 44px; border-radius: var(--yj-game-r-full);
  background: var(--yj-game-tint-press); border: 1px solid var(--yj-game-tint-line); color: var(--yj-game-ink);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.ym__next-bead.is-none { background: transparent; border-style: dashed; border-color: var(--yj-game-line-strong); }
.ym__next-bead .ym__hun { font-size: 13px; font-weight: 700; letter-spacing: -.03em; }
.ym__next-bead .ym__hun.is-long { font-size: 13px; line-height: 1; max-width: 40px; text-align: center; word-break: keep-all; }
.ym__next-bead .ym__snd { font-size: 16px; font-weight: 800; line-height: 1; }

/* §12 의 알림 상자는 display 가 정해져 있어 hidden 속성을 이긴다 — 이 놀이에서는 비어 있을 때 숨긴다 */
.ym .yj-game__toast[hidden] { display: none; }
/* §12 은 left:50% + translateX(-50%) 로 가운데에 두는데, 등장 움직임(yj-game-in)의 끝 transform:none 이 남아
   가운데 정렬이 지워진다 — 알림이 오른쪽으로 밀려 잘린다(2026-11-14 실측 x=188 · 폭 306 / 375).
   이 놀이에서는 transform 없이 좌우 0 + 자동 여백으로 가운데에 둔다. 공용 v4.css 가 고쳐지면 이 덩어리를 걷는다. */
.ym .yj-game__toast { left: 0; right: 0; width: max-content; margin-inline: auto; transform: none; white-space: normal; text-align: center; }

/* 시작 덮개 */
.ym__start-list { margin-top: var(--yj-game-s4); text-align: left; }

/* 결과 시트 — 낱말이 많으면 시트 안에서 굴린다 */
/* 틀린 줄(.yj-game__word--no)은 §12 에서 양옆으로 8px 나간다 — 굴림 상자 안에서 잘리지 않게 그만큼 안쪽 여백을 준다 */
.ym__sheet .yj-game__words {
  max-height: 32dvh; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 0 var(--yj-game-s2); margin-inline: calc(var(--yj-game-s2) * -1);
}
.ym__sheet .yj-game__word span { flex: 0 0 auto; }
.ym__sheet .yj-game__word small { white-space: normal; text-align: right; }
.ym__sheet a.yj-game__btn { box-sizing: border-box; text-decoration: none; }

/* 로비 — 고르기(§12 칩을 단추로 쓴다) */
.ym-lobby main { max-width: 900px; margin: 0 auto; padding: 0 16px 96px; }
.ym-lobby__chips { margin-top: var(--yj-s2, 8px); flex-wrap: wrap; }
.ym-lobby__chips .yj-game__chip { appearance: none; height: 44px; cursor: pointer; font-family: inherit; }
.ym-lobby__chips .yj-game__chip.is-on { background: var(--yj-game-tint-press); border-color: var(--yj-game-tint-line); color: var(--yj-game-ink); }
.ym-lobby__chips .yj-game__chip[disabled] { opacity: .45; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .yj-game__shake, .yj-game__pulse { animation: none; }
}

/* ============================================================
   놀이 스킨 A+ — 뿌리 yj-play yj-play--merge (2026-11-14 · docs/play/skin/KIT.md · 규격 YUJA-DESIGN.md §16)
   값은 키트 토큰(--yj-play-*)만 쓴다. 여기 적는 것은 「어디에 놓는가」와, 이 놀이 고유 부품(병 · 주문서 · 구슬)을
   키트의 입체 문법(먹선 + 아래 단 · 윤기 3단)으로 그리는 것뿐이다. 기존 클래스는 지우지 않는다.
   ============================================================ */

/* ── 쉬움의 색 고리 — 주문 자리마다 하나(위 · 가운데 · 아래 = 하늘 · 잎 · 주황). 놀이 유자는 구슬 바탕과 같아 고리로 안 보인다.
      하늘은 키트 지킴이가 이 놀이 요청으로 더한 토큰(--yj-play-sky · 키트 38365949f · KIT.md §10). */
body.yj-play { --ym-c0: var(--yj-play-sky); --ym-c1: var(--yj-play-leaf); --ym-c2: var(--yj-play-orange); }

/* ── 로비 — 옛 §11-4 로비 층(body[data-mode] .x)이 키트(.yj-play .x)를 이겨서, body.yj-play[data-mode] 로 키트 값을 다시 적는다(새 값 0) */
html:has(> body.yj-play[data-mode]) { background-color: var(--yj-play-cream) !important; }
body.yj-play[data-mode] { background: var(--yj-play-cream); color: var(--yj-play-ink); }
body.yj-play[data-mode] > header.yj-play__head { display: block; min-height: 0; padding: 0; border-bottom: 0; color: var(--yj-play-on-world); }
body.yj-play[data-mode] > header.yj-play__head .yj-play__head-title { display: block; margin-right: 150px; color: var(--yj-play-on-world); }
body.yj-play[data-mode] > header.yj-play__head .yj-play__head-title img { display: none; }
body.yj-play[data-mode] > header.yj-play__head .yj-play__head-sub { margin-right: 150px; }
body.yj-play[data-mode] #lobbyBack svg { width: 22px; height: 22px; }
/* 세계 머리 그림 — 굵은 먹선의 둥근 병 + 맞닿은 두 구슬(코드로 그림) */
.yj-play .ym-head-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.yj-play .ym-head-jar {
  position: absolute; right: 18px; bottom: 30px; width: 116px; height: 78px; box-sizing: border-box;
  border: calc(var(--yj-play-line) * 2) solid var(--yj-play-ink); border-top: 0; border-radius: 0 0 var(--yj-play-r-24) var(--yj-play-r-24);
  background: var(--yj-play-cream);
}
.yj-play .ym-head-bead { position: absolute; --yj-play-d: 46px; bottom: 35px; }
.yj-play .ym-head-bead--a { right: 76px; }
.yj-play .ym-head-bead--b { right: 30px; }
/* 좁은 폰(374 이하) — 이름이 「유자 / 더하기」 두 줄로 꺾여 한 줄 설명의 둘째 줄이 몸통에 가렸다. 그림만 줄인다(이름 글자 크기 그대로 · 11-18) */
@media (max-width: 374px) {
  body.yj-play[data-mode] > header.yj-play__head .yj-play__head-title, body.yj-play[data-mode] > header.yj-play__head .yj-play__head-sub { margin-right: 108px; }
  .yj-play .ym-head-jar { right: 14px; width: 84px; height: 56px; }
  .yj-play .ym-head-bead { --yj-play-d: 34px; bottom: 34px; }
  .yj-play .ym-head-bead--a { right: 56px; }
  .yj-play .ym-head-bead--b { right: 24px; }
}
/* 크림 몸통 */
body.yj-play[data-mode] main.yj-play__body { max-width: none; margin: -22px 0 0; padding: 16px max(16px, calc((100% - 640px) / 2)) 0; }
body.yj-play[data-mode] .yj-lobby__start.yj-play__panel {
  margin: 4px 0 0; padding: 12px 16px 14px; border: var(--yj-play-line) solid var(--yj-play-ink); border-radius: var(--yj-play-r-16);
  background: var(--yj-play-cream); box-shadow: 0 var(--yj-play-step-5) 0 var(--yj-play-ink);
}
body.yj-play[data-mode] .yj-lobby__eyebrow.yj-play__tag { margin: 0 0 6px; color: var(--yj-play-ink); font-size: 13px; }
body.yj-play[data-mode] .yj-lobby__title { font-size: 22px; font-weight: 700; color: var(--yj-play-ink); }
body.yj-play[data-mode] .yj-lobby__reason { margin-top: 4px; font-size: 16px; color: var(--yj-play-ink); }
body.yj-play[data-mode] .yj-lobby__meta { margin: 4px 0 0; font-size: 14px; color: var(--yj-game-sub); }
body.yj-play[data-mode] .yj-lobby__progress { margin: 14px 0 0; padding: 8px 14px; border: 0; border-radius: var(--yj-play-r-12); background: var(--yj-play-ink-06); color: var(--yj-play-ink); font-size: 14px; }
body.yj-play[data-mode] .yj-lobby__progress b { color: var(--yj-play-ink); font-weight: 700; }
body.yj-play[data-mode] .yj-lobby__pick-head { margin: 18px 0 0; font-size: 16px; font-weight: 700; color: var(--yj-play-ink); }
/* 고르기 칩 — 키트 알약(보이는 36 · 닿는 44). 뼈대의 44 높이 · 유자 틴트를 키트 값으로 되돌린다 */
.yj-play .ym-lobby__chips { gap: 6px; padding: 4px 0; }
.yj-play .ym-lobby__chips .yj-game__chip { height: 36px; cursor: pointer; }
.yj-play .ym-lobby__chips .yj-game__chip::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.yj-play .ym-lobby__chips .yj-game__chip.is-on { background: var(--yj-play-ink); border-color: var(--yj-play-ink); color: var(--yj-play-cream); font-weight: 700; }
/* 과는 길 위의 점으로 고른다 — 과 칩 줄은 문서에 남기고 화면에서만 감춘다(점이 같은 일을 한다) */
.yj-play #lessonChips { display: none; }
.yj-play #lessonMap { margin-top: 6px; }
.yj-play #lessonMap .yj-play__node[aria-disabled="true"] { cursor: default; }
/* 아래 고정 줄 — 도크 위에 붙는다. 주 단추 하나 */
body.yj-play[data-mode] .yj-play__cta { margin: 18px -16px 0; bottom: calc(var(--yj-dock-h, 56px) + env(safe-area-inset-bottom, 0px)); padding-bottom: 12px; border-top: var(--yj-play-line) solid var(--yj-play-ink); }
body.yj-play[data-mode] #startBtn { flex: 1 1 0; width: auto; min-width: 0; margin: 0; color: var(--yj-play-ink); }

/* ── 시작 덮개 — 그림 세 컷 + 한 줄, 자세한 글은 「더 보기」 ── */
.yj-play .ym-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.yj-play .ym-steps[hidden] { display: none; }
.yj-play .ym-step { margin: 0; text-align: center; }
.yj-play .ym-step figcaption { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--yj-play-ink); }
.yj-play .ym-step-art {
  position: relative; height: 92px; box-sizing: border-box; overflow: hidden;
  border: var(--yj-play-line) solid var(--yj-play-ink); border-radius: var(--yj-play-r-12); background: var(--yj-play-ink-06);
}
.yj-play .ym-step-jar {
  position: absolute; left: 10%; right: 10%; bottom: 8px; height: 38px; box-sizing: border-box;
  border: var(--yj-play-line) solid var(--yj-play-ink); border-top: 0; border-radius: 0 0 var(--yj-play-r-12) var(--yj-play-r-12); background: var(--yj-play-cream);
}
.yj-play .ym-step-bead { position: absolute; --yj-play-d: 34px; }
.yj-play .ym-step-art--drop .ym-step-bead { left: 50%; top: 8px; margin-left: -17px; }
.yj-play .ym-step-guide { position: absolute; left: 50%; top: 44px; bottom: 12px; margin-left: -1px; border-left: 2px dotted var(--yj-play-ink-25); }
.yj-play .ym-step-art--touch .ym-step-bead { bottom: 11px; }
.yj-play .ym-step-art--touch .ym-step-bead--a { left: 50%; margin-left: -34px; }
.yj-play .ym-step-art--touch .ym-step-bead--b { left: 50%; }
/* 쉬움 — 둘째 컷 구슬에 판과 같은 색 고리(첫 주문 자리 색) · 글 「같은 색끼리 맞닿아요」(2026-11-18 시안 #yujamerge-ring 안 B).
   글이 두 줄이 되어도 그림 칸 높이(92)는 그대로라 세 컷 그림이 어긋나지 않는다 — 컷 줄은 위에 맞춘다 */
.yj-play .ym-steps { align-items: start; }
.yj-play .ym-step figcaption { line-height: 1.3; word-break: keep-all; }
.yj-play .ym-step-art--touch.is-ring .ym-step-bead { --yj-play-d: 30px; bottom: 13px; box-shadow: 0 0 0 4px var(--ym-c0), 0 0 0 calc(4px + var(--yj-play-line)) var(--yj-play-ink); }
.yj-play .ym-step-art--touch.is-ring .ym-step-bead--a { margin-left: -33px; }
.yj-play .ym-step-art--touch.is-ring .ym-step-bead--b { margin-left: 3px; }
.yj-play .ym-step-art--word .ym-step-word { --yj-play-d: 54px; left: 50%; top: 50%; margin: -27px 0 0 -27px; font-size: 19px; box-shadow: 0 0 0 5px var(--yj-play-ring-leaf); }
.yj-play .ym-more { height: 40px; margin: 8px auto 0; font-size: 15px; }
.yj-play .ym-more[hidden] { display: none; }
.yj-play #startRules.ym-rules:not(.is-open) { display: none; }

/* ── 판 — 바탕은 세계색, 주문서는 크림 카드(먹선 + 단), 병은 굵은 먹선의 둥근 통 ── */
.yj-play .ym__orders { gap: 6px; }
.yj-play .ym__ord {
  border: var(--yj-play-line) solid var(--yj-play-ink); border-radius: var(--yj-play-r-16);
  background: var(--yj-play-cream); box-shadow: 0 var(--yj-play-step-3) 0 var(--yj-play-ink);
}
.yj-play .ym__ord.is-empty { border: var(--yj-play-line) dashed var(--yj-play-ink-25); background: transparent; box-shadow: none; }
/* 쉬움의 색 띠 — 먹선 안쪽에 두른다(먹선은 그대로) */
.yj-play .ym__ord.is-c0, .yj-play .ym__ord.is-c1, .yj-play .ym__ord.is-c2 { border-left: var(--yj-play-line) solid var(--yj-play-ink); }
.yj-play .ym__ord.is-c0 { box-shadow: inset 8px 0 0 var(--ym-c0), 0 var(--yj-play-step-3) 0 var(--yj-play-ink); }
.yj-play .ym__ord.is-c1 { box-shadow: inset 8px 0 0 var(--ym-c1), 0 var(--yj-play-step-3) 0 var(--yj-play-ink); }
.yj-play .ym__ord.is-c2 { box-shadow: inset 8px 0 0 var(--ym-c2), 0 var(--yj-play-step-3) 0 var(--yj-play-ink); }
.yj-play .ym__ord-btn { height: 66px; }   /* 먹선 2.5 두 줄만큼 줄여 띠 바깥 높이를 70 대로 지킨다 */
.yj-play .ym__w, .yj-play .ym__d { color: var(--yj-play-ink); }
.yj-play .ym__w.is-hide i { border: 2px dashed var(--yj-play-ink-25); border-radius: var(--yj-play-r-full); }
.yj-play .ym__plus { color: var(--yj-play-ink); }
.yj-play .ym__slot { border: 2px dashed var(--yj-play-ink-25); background: var(--yj-play-ink-06); color: var(--yj-play-ink); }
.yj-play .ym__slot.is-in { border: var(--yj-play-line) solid var(--yj-play-ink); background: var(--yj-play-gloss); }
.yj-play .ym__slot.is-now { border: var(--yj-play-line) solid var(--yj-play-ink); background: var(--yj-play-yuja-hi); }
.yj-play .is-c0 .ym__slot { box-shadow: 0 0 0 4px var(--ym-c0); }
.yj-play .is-c1 .ym__slot { box-shadow: 0 0 0 4px var(--ym-c1); }
.yj-play .is-c2 .ym__slot { box-shadow: 0 0 0 4px var(--ym-c2); }
/* 병 */
.yj-play .ym__jar {
  left: -5px; right: -5px; bottom: -5px;
  border: calc(var(--yj-play-line) * 2) solid var(--yj-play-ink); border-top: 0;
  border-radius: 0 0 var(--yj-play-r-24) var(--yj-play-r-24); background: var(--yj-play-cream);
}
.yj-play .ym__stage.is-warn .ym__jar { border-color: var(--yj-play-warn); }
.yj-play .ym__over { border-top: var(--yj-play-line) dashed var(--yj-play-warn); }
.yj-play .ym__over span { color: var(--yj-play-ink); }
.yj-play .ym__guide { border-left: 2px dotted var(--yj-play-ink-25); }
/* 구슬 — 키트의 유자 조각. 크기 · 글자는 병 단위(em) 그대로 두고 겉만 조각이 된다 */
.yj-play .ym__bead .ym__bead-in.yj-play__piece { --yj-play-d: 100%; width: 100%; height: 100%; font-size: 1em; font-weight: 400; display: flex; flex-direction: column; line-height: 1.05; }
.yj-play .ym__bead .ym__bead-in .yj-play__leaf { border-width: 2px; }
.yj-play .ym__bead.is-hand .ym__bead-in { box-shadow: 0 var(--yj-play-step-3) 0 var(--yj-play-ink); }
.yj-play .ym__bead.is-c0 .ym__bead-in { box-shadow: 0 0 0 5px var(--ym-c0); }
.yj-play .ym__bead.is-c1 .ym__bead-in { box-shadow: 0 0 0 5px var(--ym-c1); }
.yj-play .ym__bead.is-c2 .ym__bead-in { box-shadow: 0 0 0 5px var(--ym-c2); }
/* 낱말 구슬 — 한 단 크게 + 잎색 테. 합쳐진 자리에서 떠서 주문서로 날아간다 */
.yj-play .ym-wordbead {
  position: absolute; z-index: 4; --yj-play-d: 82px; transform: translate(-50%, -50%); pointer-events: none;
  font-size: 24px; box-shadow: 0 0 0 5px var(--yj-play-leaf), 0 0 0 calc(5px + var(--yj-play-line)) var(--yj-play-ink);
}
.yj-play .ym-wordbead.is-away { transition: transform 320ms ease-in, opacity 320ms ease-in; opacity: .2; }
/* 합쳐졌을 때 · 소리만 맞는 짝일 때 뜨는 말 — 크림 카드 */
.yj-play .ym__say {
  border: var(--yj-play-line) solid var(--yj-play-ink); border-radius: var(--yj-play-r-16);
  background: var(--yj-play-cream); box-shadow: 0 var(--yj-play-step-5) 0 var(--yj-play-ink); color: var(--yj-play-ink);
}
.yj-play .ym__say-c { border: 2px solid var(--yj-play-ink); background: var(--yj-play-yuja-hi); }
.yj-play .ym__say-d { color: var(--yj-play-ink); }
/* 아래 띠 */
.yj-play .ym__dots i { border: 2px solid var(--yj-play-ink); background: var(--yj-play-cream); }
.yj-play .ym__dots i.is-on { background: var(--yj-play-leaf); border-color: var(--yj-play-ink); }
.yj-play .ym__dots i.is-skip { background: var(--yj-play-orange); border-color: var(--yj-play-ink); }
.yj-play .ym__tip, .yj-play .ym__next { color: var(--yj-play-ink); }
.yj-play .ym__next-bead { border: var(--yj-play-line) solid var(--yj-play-ink); background: var(--yj-play-gloss); color: var(--yj-play-ink); }
.yj-play .ym__next-bead.is-none { border: 2px dashed var(--yj-play-ink-25); background: transparent; }

/* ── 결과 시트 — 넘친 판의 표지 띠는 주황(잎은 다 마친 판에만) ── */
.yj-play .yj-play__ribbon.ym-ribbon--over { background: var(--yj-play-orange); }
.yj-play .ym__sheet .yj-play__score { text-align: center; margin: 4px 0 2px; }
.yj-play .ym__sheet .yj-game__words { max-height: 26dvh; }
/* 시트가 화면보다 길 때(320×568 등) 가운데 맞춤이 위쪽을 화면 밖으로 밀어 표지 띠가 잘리지 않게 — 넘칠 때만 위에서부터 놓이고 덮개가 스크롤된다.
   들어가는 화면에서는 지금처럼 가운데(2026-11-15 키트 정리 · play-records 보고 ⑦) */
.yj-play #resultVeil.yj-game__veil { justify-content: safe center; }
/* 옛 작은 별 줄은 큰 별로 바꿔 보인다 — 숨김 속성이 §12 의 display 를 이기게 */
.yj-play .ym__sheet .yj-game__stars[hidden] { display: none; }
/* 건반으로 병을 고를 때의 외곽선 — 굵은 병 먹선과 겹쳐 두 줄 틀로 보이지 않게 옅은 먹으로 */
.yj-play .ym__play:focus-visible .ym__jar { outline: 3px solid var(--yj-play-ink-25); outline-offset: 4px; }

/* ── 진도 연계(2026-11-14 PG-1 · PG-2) — 권 · 과 상태 한 마디 · 처음 만나는 과의 미리보기 카드 ── */
.ym-chip-sub { display: block; font-size: 13px; font-weight: 400; line-height: 1.1; }
.ym-lobby__chips .yj-game__chip { flex-direction: column; justify-content: center; }
.yj-play .ym-lobby__chips .yj-game__chip { height: auto; min-height: 44px; padding: 4px 13px; line-height: 1.15; }
.yj-play .ym-lobby__chips .yj-game__chip.is-on .ym-chip-sub { color: var(--yj-play-cream); }
.ym-node-sub { position: absolute; transform: translateX(-50%); font-size: 13px; font-weight: 400; line-height: 1; white-space: nowrap; color: var(--yj-game-sub); }
.yj-play .ym-node-sub { color: var(--yj-play-ink); }
.yj-play .ym-node-sub--first { color: var(--yj-game-sub); }
.ym-preview { margin: 12px 0 4px; text-align: center; }
.ym-preview[hidden] { display: none; }
.ym-preview__head { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.2; color: var(--yj-game-ink); }
.ym-preview__more { margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: var(--yj-game-sub); word-break: keep-all; }
.ym-preview__words { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ym-preview__words li { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: var(--yj-game-r-sm); background: var(--yj-game-day); font-size: 15px; line-height: 1.35; color: var(--yj-game-text); }
.ym-preview__words b { flex: 0 0 auto; font-size: 18px; font-weight: 800; color: var(--yj-game-ink); }
.yj-play .ym-preview__head, .yj-play .ym-preview__words b, .yj-play .ym-preview__words li { color: var(--yj-play-ink); }
.yj-play .ym-preview__words li { border-radius: var(--yj-play-r-12); background: var(--yj-play-ink-06); }
.yj-play .ym-node-sub { z-index: 1; padding: 1px 5px; border-radius: var(--yj-play-r-full); background: var(--yj-play-cream); }

/* ── 키 작은 화면(높이 760 이하) — 병은 화면 높이에 묶여 작아진다. 판 둘레 여백만 줄여 병 배율을 올린다(규칙 · 물리 값 그대로).
      주문서 띠: 뜻풀이 두 줄이 드는 최소 높이(62)로 · 띠 사이 3 · 아래 띠와 다음 구슬 40. 375×667 에서 배율 0.817 → 실측은 HANDOFF 6차 */
@media (max-height: 760px) {
  .ym__orders { gap: 3px; }
  .ym__ord-btn { height: 64px; padding-top: 0; padding-bottom: 0; }
  .yj-play .ym__orders { gap: 3px; }
  .yj-play .ym__ord-btn { height: 62px; }
  .ym__foot { min-height: 40px; }
  .ym__next-bead { width: 40px; height: 40px; }
  .ym__next-bead .ym__snd { font-size: 15px; }
}

/* ── 아주 키 작은 화면(높이 665 이하 — 360×640 · 320×568 들) — 주문서 석 장을 요약 띠 한 줄로 접는다(2026-11-14 배포 뒤 묶음).
      위의 여백 줄이기만으로는 360×640 구슬 글자 12.4px · 320×568 9.4px 였다(병이 높이에 묶여 배율 0.77 · 0.59).
      석 장(약 192px)이 요약 띠(44px)로 줄면 병이 그만큼 커진다. 펼치면 석 장이 병 위에 겹쳐 뜨고(자리를 차지하지 않아 병 크기 그대로),
      병을 누르면 접힌다(js/app/game.js setFold). 규칙 · 물리 값 · 넘침 판정 · 짝 보기는 그대로. 375×667 이상은 이 덩어리가 닿지 않는다. */
.ym__sum { display: none; }
@media (max-height: 665px) {
  .ym__board { position: relative; }
  .ym__sum {
    appearance: none; -webkit-tap-highlight-color: transparent; box-sizing: border-box;
    flex: 0 0 auto; width: 100%; height: 44px; margin: 0; padding: 0 var(--yj-game-s2);
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: var(--yj-game-s1);
    border-radius: var(--yj-game-r); background: var(--yj-game-card); border: 1px solid var(--yj-game-line-strong);
    color: var(--yj-game-ink); font: inherit; text-align: left; cursor: pointer;
  }
  .ym__sum:focus-visible { outline: 2px solid var(--yj-game-ink); outline-offset: 2px; }
  .ym__sum-i {
    min-width: 0; box-sizing: border-box; padding: 3px 6px; border-radius: var(--yj-game-r-sm); background: var(--yj-game-day);
    font-size: 15px; font-weight: 800; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ym__sum-i.is-c0 { box-shadow: inset 5px 0 0 var(--ym-c0); padding-left: 10px; }
  .ym__sum-i.is-c1 { box-shadow: inset 5px 0 0 var(--ym-c1); padding-left: 10px; }
  .ym__sum-i.is-c2 { box-shadow: inset 5px 0 0 var(--ym-c2); padding-left: 10px; }
  .ym__sum-i.is-empty { min-height: 26px; background: transparent; border: 1px dashed var(--yj-game-line-strong); }
  .ym__sum-t { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; white-space: nowrap; }
  .ym__sum-t svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .ym__board.is-open .ym__sum-t svg { transform: rotate(180deg); }
  /* 펼친 석 장 — 요약 띠 바로 아래, 병 위에 겹친다 */
  .ym__orders {
    position: absolute; z-index: 5; left: var(--yj-game-s3); right: var(--yj-game-s3);
    top: calc(var(--yj-game-s1) * 2 + 44px); display: none;
  }
  .ym__board.is-open .ym__orders { display: grid; }
  /* 놀이 스킨 — 요약 띠도 주문서와 같은 크림 카드(먹선 + 단) */
  .yj-play .ym__sum {
    border: var(--yj-play-line) solid var(--yj-play-ink); border-radius: var(--yj-play-r-16);
    background: var(--yj-play-cream); box-shadow: 0 var(--yj-play-step-3) 0 var(--yj-play-ink); color: var(--yj-play-ink);
  }
  .yj-play .ym__sum-i { background: var(--yj-play-ink-06); color: var(--yj-play-ink); }
  .yj-play .ym__sum-i.is-empty { background: transparent; border: 2px dashed var(--yj-play-ink-25); }
  .yj-play .ym__board.is-open .ym__orders { top: calc(var(--yj-game-s1) * 2 + 44px + var(--yj-play-step-3)); }
}

/* 판 안 「처음 만나요」(진도 연계 §5-3, 2026-11-16) — 키트 yj-play__tag 를 주문서 낱말 줄 끝에.
   주문서는 높이 70 고정이라 줄 높이를 늘리지 않게 위아래를 당긴다. 결과 낱말의 「처음」은 낱말 바로 뒤 */
.ym__w .ym-first { margin: -3px 0 -5px 8px; vertical-align: top; }   /* 위 -3 · 아래 -5 — 두 줄 뜻풀이 장에서도 윗 먹선 · 뜻풀이 줄에 닿지 않게 */
.yj-game__word .ym-first-tag { flex: 0 0 auto; }
