/* 다다의 태권도 코딩 — 휴대폰 세로 우선. 무대(위) + 내 순서(가운데) + 동작 블록(아래). 가로·넓은 화면은 좌우로. */
html, body.dtc { height: 100%; }
body.dtc {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  background: var(--cream); overscroll-behavior: none; -webkit-user-select: none; user-select: none;
  --punch: #C93A2E; --block: #2A66A8; --kick: #2F7F4F; --bow: #9A5B12; --repeat: #5B2C83; /* 흰 글자 대비 5.1·5.9·4.9·5.4·9.9 (4.5 이상, 10/18 검수) */
}
.dtc .topbar { flex: none; }
.dtc .topbar h1 { font-size: 20px; font-weight: 900; }
/* 휴대폰: 위 띠 제목 '태권도 코딩'을 두 줄로 (한 줄이면 '다다…'처럼 잘림, 10/18 검수) */
@media (max-width: 480px) { .dtc .topbar h1 { flex: 0 1 auto; min-width: 3.2em; overflow: visible; white-space: normal; word-break: keep-all; font-size: 16px; line-height: 1.05; text-align: center; } }
/* 도장이 화면 대부분, 내 순서 칸은 높이를 정해 두고(넘치면 칸 안에서 밀기) 블록·단추는 내용만큼 (10/18 검수: 흰 칸이 화면 절반) */
.dtc-app { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(230px, 1fr) auto; }

/* ── 무대 ── */
.stage { position: relative; overflow: hidden; background-size: cover; background-position: center bottom; border-radius: 0 0 26px 26px; }
.st-dojang { background-color: #FFF1D6; background-image: linear-gradient(#FFF6E3 0 70%, #E2BF84 70% 71%, #EBC98D 71% 100%); }
.st-yard { background-color: #BFE6FF; background-image: linear-gradient(#BFE6FF 0 66%, #7CC77B 66% 100%); }
.st-show { background-color: #1C2554; background-image: radial-gradient(60% 55% at 50% 72%, #3A4A8F 0 60%, transparent 61%), linear-gradient(#1C2554 0 70%, #2C1E4F 70% 100%); color: #fff; }
.hud { position: absolute; inset: 8px 10px auto; display: flex; justify-content: space-between; gap: 8px; z-index: 3; pointer-events: none; }
.hud p { background: rgba(255, 255, 255, .85); color: var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 15px; font-weight: 800; white-space: nowrap; }
.hud-score span + span { margin-left: 8px; }
/* 내 띠 (아이가 받는 띠, 다다는 늘 검은띠) */
.belt-tag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.belt-ico { position: relative; display: inline-block; flex: none; width: 26px; height: 9px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bc) 50%, var(--bc2) 50%); box-shadow: 0 0 0 1.5px rgba(28, 37, 84, .35); }
.belt-ico::after { content: ""; position: absolute; left: 50%; top: -3px; width: 7px; height: 15px; margin-left: -3.5px; border-radius: 2px;
  background: inherit; box-shadow: inherit; transform: rotate(18deg); }
.belt-ico--white { box-shadow: 0 0 0 1.5px rgba(28, 37, 84, .5); }
.belt .belt-ico { width: 40px; height: 13px; } .belt .belt-ico::after { top: -4px; width: 10px; height: 21px; margin-left: -5px; }
.belt .belt-tag { gap: 10px; }
.hud-score:empty, .hud-score:has(span:empty + span:empty) { display: none; }
.tiles { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 0; list-style: none; z-index: 2; }
.tile { width: 58px; height: 46px; border-radius: 12px; color: #fff; display: grid; place-items: center; align-content: center; line-height: 1.05;
  box-shadow: 0 3px 0 rgba(28, 37, 84, .2); animation: tileIn .25s ease-out; }
.tile i { font-style: normal; font-size: 15px; }
.tile span { font-size: 12px; font-weight: 800; }
/* 사범님 동작은 이름 대신 '?' 번호 칸 (정답 노출 X, 10/18) */
.tile--q { background: rgba(28, 37, 84, .55); }
.tile--q i { font-size: 18px; font-weight: 900; }
/* 봉봉 힌트 칸: 점선 금테 + 몇 번째인지 번호표 */
.tile--hint { position: relative; outline: 3px dashed var(--gold); outline-offset: 2px; }
.tile b { position: absolute; top: -9px; left: -9px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 900; display: grid; place-items: center; padding: 0 4px; }
@keyframes tileIn { from { transform: translateY(-10px) scale(.7); opacity: 0; } }
.title { position: absolute; top: 31%; left: 0; right: 0; z-index: 4; text-align: center; pointer-events: none;
  font-size: clamp(26px, 7vw, 40px); font-weight: 900; color: #fff; line-height: 1.1;
  -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.title b { display: inline-block; margin-left: 10px; color: var(--gold); }
.title.pop span, .title.pop b { display: inline-block; animation: pop .3s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
/* 무대가 낮은 화면(휴대폰 세로·가로, 태블릿 세로)은 얼굴이 무대 30~45% 높이에 온다 → 제목을 얼굴 아래(몸통 높이)로.
   31% 자리에서는 '오른 지르기!'가 사범님 머리를 10~31% 덮었다 (10/17 측정). 넓은 PC 무대는 얼굴이 아래쪽이라 31% 그대로 */
@media (orientation: portrait), (max-height: 500px) { .title { top: 58%; } }
.lights { position: absolute; left: 8%; right: 8%; bottom: 6px; display: flex; justify-content: space-between; z-index: 1; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: rgba(28, 37, 84, .15); transition: background .1s; }
.st-show .lights i { background: rgba(255, 255, 255, .15); }
.lights i.on.c0 { background: var(--gold); } .lights i.on.c1 { background: #FF8FB1; } .lights i.on.c2 { background: #7FE0FF; }
.cast { position: absolute; left: 0; right: 0; bottom: 16px; top: 64px; display: flex; justify-content: center; align-items: flex-end; gap: 2%; }
.who { position: relative; height: 100%; max-width: 46%; aspect-ratio: 240 / 300; margin: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.who-svg, .who-img { width: 100%; height: auto; max-height: calc(100% - 24px); object-fit: contain; overflow: visible; }
/* 그림 모드: 그림자 SVG 와 동작 그림을 같은 칸(이름표 위)에 겹친다. 크기는 예전 도형처럼 칸 너비 기준(넓으면 높이 기준), 발끝은 아래에 붙인다.
   그림은 칸보다 넓어(720×600 = 칸 너비의 150%) 옆차기 다리가 칸 밖으로 나와도 잘리지 않음 */
.who.art .who-svg, .who.art .who-img, .sheet-fig.art .who-svg, .sheet-fig.art .who-img { position: absolute; bottom: var(--tagH, 24px); height: auto; max-height: calc(100% - var(--tagH, 24px)); }
.who.art .who-svg, .sheet-fig.art .who-svg { left: 0; width: 100%; }
.who.art .who-img, .sheet-fig.art .who-img { left: 50%; width: 150%; max-width: none; object-fit: contain; object-position: 50% 100%; transform: translateX(-50%); transform-origin: 50% 95.3%; pointer-events: none; }
.tag { align-self: center; margin-top: -4px; padding: 0 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.who--player .tag { background: #C62828; } /* 다다 이름표: 흰 글자 대비 5.62:1 (대표색 그대로면 4.4:1, 고칠 일 8) */
.spark { position: absolute; top: 18%; right: 12%; font-size: 30px; color: var(--gold); animation: spark .7s ease-out forwards; pointer-events: none; }
@keyframes spark { from { transform: scale(.4); opacity: 1; } to { transform: translateY(-30px) scale(1.4); opacity: 0; } }
.tip { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(92%, 420px); z-index: 5;
  display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 18px; padding: 8px 12px;
  box-shadow: 0 4px 0 rgba(28, 37, 84, .2); font-size: 16px; font-weight: 700; line-height: 1.35; animation: tileIn .25s ease-out; }
.helper { flex: none; position: relative; width: 40px; height: 44px; background: center / contain no-repeat; } /* 봉봉 그림 (ART.helper) */
.ctl { position: absolute; z-index: 6; border: 0; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(28, 37, 84, .25); }
.ctl:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(28, 37, 84, .25); }
.ctl:disabled { opacity: .45; cursor: default; }
.ctl--stage { right: 10px; top: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 800; }

/* ── 내 순서 ── */
.work { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.prog { flex: none; height: clamp(92px, 16dvh, 190px); overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 20px; padding: 8px 10px 12px;
  box-shadow: inset 0 0 0 3px rgba(28, 37, 84, .08); }
.prog-head { position: sticky; top: 0; z-index: 2; display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 8px; padding: 4px 12px; border-radius: 12px 12px 12px 4px;
  background: var(--apricot); color: var(--ink); font-size: 15px; font-weight: 900; cursor: pointer; }
.prog-head small { font-size: 13px; font-weight: 700; opacity: .8; }
.prog-head.target { box-shadow: 0 0 0 3px var(--gold); }
.seq { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; min-height: 60px; }
.blk, .pal-item {
  position: relative; touch-action: none; cursor: grab; border: 0; color: #fff; border-radius: 14px;
  display: grid; place-items: center; align-content: center; line-height: 1.1; text-align: center; font-weight: 800;
  box-shadow: 0 4px 0 rgba(28, 37, 84, .25);
}
.blk.mv, .pal-item { width: 78px; height: 56px; }
.blk i, .pal-item i { font-style: normal; font-size: 17px; }
.blk i.art, .pal-item i.art { width: 48px; height: 48px; margin: -2px 0 0; background: center / contain no-repeat; } /* 동작 그림: 팔·다리를 크게 자른 다다 + 금색 움직임 표시 */
.blk.mv:has(i.art), .pal-item:has(i.art) { height: 72px; }
.blk:has(i.art) span, .pal-item:has(i.art) span { font-size: 13px; white-space: nowrap; }
/* 동작 종류마다 모양도 다르게: 지르기 = 네모, 막기 = 방패(아래가 둥긂), 차기 = 비스듬한 잎, 인사 = 둥근 알 */
.blk.fam-block, .pal-item.fam-block { border-radius: 12px 12px 30px 30px; }
.blk.fam-kick, .pal-item.fam-kick { border-radius: 28px 8px 28px 8px; }
.blk.fam-bow, .pal-item.fam-bow { border-radius: 32px 32px 16px 16px; }
.blk span, .pal-item span { font-size: 14px; }
.fam-punch { background: var(--punch); } .fam-block { background: var(--block); } .fam-kick { background: var(--kick); }
.fam-bow { background: var(--bow); } .fam-repeat { background: var(--repeat); }
.blk.rep { flex-basis: 100%; display: block; place-items: normal; align-content: normal; text-align: left; padding: 6px 8px 8px; background: #EFE6F7; color: var(--ink); box-shadow: inset 0 0 0 3px var(--repeat); cursor: grab; }
.rep-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--repeat); font-size: 16px; }
.rep-head i { font-size: 20px; }
.rep-n { min-width: 64px; min-height: 44px; border: 0; border-radius: 999px; background: var(--repeat); color: #fff; font-size: 17px; font-weight: 900; cursor: pointer; }
.seq--in { min-height: 64px; padding: 4px; border-radius: 12px; border: 2px dashed rgba(91, 44, 131, .35); }
.empty { align-self: center; padding: 0 8px; color: rgba(91, 44, 131, .7); font-size: 14px; font-weight: 700; }
.blk.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.blk.rep.target { box-shadow: inset 0 0 0 3px var(--repeat), 0 0 0 3px var(--gold); }
.blk.hl { transform: translateY(-4px) scale(1.06); box-shadow: 0 0 0 4px var(--gold), 0 6px 0 rgba(28, 37, 84, .25); transition: transform .12s; }
.blk.rep.hl { transform: none; box-shadow: inset 0 0 0 3px var(--repeat), 0 0 0 4px var(--gold); }
.blk.flash { animation: flash .45s ease-in-out 3; }
@keyframes flash { 50% { transform: translateX(-4px) rotate(-4deg); box-shadow: 0 0 0 5px #FFD465; } }
.blk.new { animation: pop .25s ease-out; }
.blk.dragging { opacity: .3; }
.x { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); color: #fff;
  font-size: 20px; font-weight: 900; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.x::after { content: ""; position: absolute; inset: -6px; } /* 누르는 곳은 48px */
.rep-head .x { position: static; margin-left: auto; }
.bar { flex: none; display: flex; gap: 10px; }
.bar .pill { min-width: 0; padding: 0 12px; white-space: nowrap; } /* '다시 보기'가 두 줄로 꺾이지 않게 */
.pill--watch { flex: 1; font-size: 17px; }
.pill--run { flex: 1.4; min-width: 0; font-size: 21px; }
.pill--help { flex: .75; font-size: 17px; }
@media (max-width: 420px) { .bar { gap: 6px; } .bar .pill { padding: 0 6px; min-height: 52px; } .pill--watch, .pill--help { font-size: 15px; } .pill--run { font-size: 19px; } }
@media (max-width: 370px) { .pill--watch, .pill--help { font-size: 14px; letter-spacing: -.3px; } }
.pill--help.glow { animation: glow .8s ease-in-out infinite alternate; }
.prog-head.full { animation: flash .45s ease-in-out 2; box-shadow: 0 0 0 3px #E8574A; }
.pill:disabled { opacity: .45; cursor: default; }
.palette { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pal-item { width: calc((100% - 24px) / 4); max-width: 96px; }
.pal-item.glow { animation: glow .8s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 5px var(--gold), 0 4px 0 rgba(28, 37, 84, .25); transform: translateY(-3px); } }
body.locked .prog, body.locked .palette { pointer-events: none; }
body.locked .palette { opacity: .55; }
.ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: .92; margin: 0; list-style: none;
  box-shadow: 0 10px 18px rgba(28, 37, 84, .3); cursor: grabbing; }
.caret { position: fixed; left: 0; top: 0; z-index: 49; width: 5px; border-radius: 3px; background: var(--gold); pointer-events: none; }
.hand { position: fixed; z-index: 40; font-size: 40px; width: 1.8em; height: 1.8em; background: url(../../assets/ui/finger.svg) center / contain no-repeat; margin: -.9em 0 0 -.9em; pointer-events: none; animation: hand 1.8s ease-in-out infinite; }
@keyframes hand { 0%, 15% { transform: none; opacity: 0; } 25% { opacity: 1; } 75% { transform: translate(var(--dx), var(--dy)); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* ── 덮개 (시작·카드·끝) ── */
.ov { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: 16px; background: rgba(28, 37, 84, .55); overflow: auto; }
.ov > .sheet { margin-block: auto; } /* 위아래 가운데 맞추되, 카드가 화면보다 크면 위가 잘려 못 올라가던 것(place-items:center 는 넘치면 위쪽이 막힘) → 위부터 스크롤 (10/31 의심 c, 가로 휴대폰 끝 카드) */
.sheet { width: min(100%, 440px); background: var(--cream); color: var(--ink); border-radius: 28px; padding: 20px 20px 24px; text-align: center;
  box-shadow: 0 8px 0 rgba(28, 37, 84, .25); animation: sheetIn .25s ease-out; }
/* 카드는 크기를 줄여 두지 않고 살짝 올라오며 나타남: scale(.7) 로 시작하면 처음 0.3초 동안 단추가 제자리에서 벗어나 빨리 누른 손가락이 빈 곳을 눌러 '다음 단계'가 안 눌림 (11/10 검수 하 6) */
@keyframes sheetIn { from { transform: translateY(8px); opacity: 0; } }
.sheet h2 { font-size: 28px; font-weight: 900; line-height: 1.2; margin: 4px 0 8px; }
.sheet p { margin: 6px 0; }
.sheet-fig { width: 150px; margin: -6px auto 0; }
.sheet-fig .who-svg { width: 100%; }
.sheet-fig.art { position: relative; aspect-ratio: 240 / 300; --tagH: 0px; }
/* 끝 화면: 검은띠가 되면 다다 옆에 '나'가 나란히 */
.end-pair { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.end-pair .sheet-fig { width: 120px; margin: -6px 0 0; } /* 120×150 = '나' 키와 같게, 끝 화면이 첫 화면 안에 들어오게 */
.me { position: relative; flex: none; width: 92px; height: 150px; margin-bottom: 4px; }
.me[hidden] { display: none; }
.me::before { content: ""; position: absolute; left: 10px; right: 10px; top: 62px; bottom: 0; border-radius: 30px 30px 14px 14px; background: #fff; box-shadow: inset 0 0 0 3px rgba(28, 37, 84, .2); }
.me-face { position: absolute; left: 50%; top: 0; width: 66px; height: 66px; margin-left: -33px; border-radius: 50%; background: #FFE1C4; z-index: 1;
  display: grid; place-items: center; font-size: 26px; font-weight: 900; color: var(--ink); box-shadow: inset 0 0 0 3px rgba(28, 37, 84, .15); }
.me-belt { position: absolute; left: 8px; right: 8px; top: 102px; height: 13px; border-radius: 4px; background: #1C1C1C; }
.me-belt::after { content: ""; position: absolute; left: 50%; top: -4px; width: 11px; height: 26px; margin-left: -5px; border-radius: 3px; background: #1C1C1C; transform: rotate(15deg); }
.sheet-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.pill { min-width: 220px; min-height: 56px; padding: 0 24px; border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 19px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 rgba(28, 37, 84, .2); display: inline-grid; place-items: center; text-decoration: none; }
.pill--go { background: var(--gold); min-width: 240px; font-size: 22px; }
.pill--small { min-height: 48px; font-size: 16px; font-weight: 800; background: transparent; box-shadow: inset 0 0 0 2px rgba(28, 37, 84, .25); }
.pill:active { transform: translateY(3px); }
.stars { font-size: 40px; letter-spacing: 6px; line-height: 1.2; }
.belt { font-weight: 900; color: var(--joy); font-size: 18px; }
.end-line { font-size: 19px; font-weight: 800; }
.end-score { font-size: 18px; font-weight: 800; }
.belts { font-weight: 800; color: var(--joy); }
/* 시작 화면: 설명 한 문장 + 블록을 칸으로 끌어 오는 손가락 그림 */
.sheet .lead { font-size: 19px; font-weight: 800; line-height: 1.4; word-break: keep-all; }
.how { position: relative; width: 220px; height: 96px; margin: 6px auto 0; }
.how-slot { position: absolute; right: 0; top: 4px; width: 70px; height: 62px; border-radius: 14px; border: 3px solid var(--gold); background: #fff; opacity: 0; animation: howSlot 2.4s ease-in-out infinite; }
.how-move { position: absolute; left: 0; top: 4px; width: 70px; height: 62px; animation: howMove 2.4s ease-in-out infinite; }
.how-blk { position: absolute; inset: 0; border-radius: 14px; background-color: var(--punch); background-position: center; background-size: 52px; background-repeat: no-repeat; box-shadow: 0 4px 0 rgba(28, 37, 84, .25); }
.how-hand { position: absolute; left: 26px; top: 28px; width: 56px; height: 56px; filter: drop-shadow(0 2px 0 rgba(28, 37, 84, .25)); }
@keyframes howMove { 0%, 15%, 100% { transform: none; } 60%, 85% { transform: translateX(150px); } }
/* 칸은 블록이 닿을 때만 나타난다 — 빈 점선 칸이 보이지 않게 (10/29 세 회차 지적) */
@keyframes howSlot { 0%, 54%, 90%, 100% { opacity: 0; } 60%, 85% { opacity: 1; } }
/* 띠 받는 카드의 예수님 한마디, 끝 화면 말씀 한 줄 */
.jesus-line { margin-top: 10px !important; padding: 10px 14px; border-radius: 16px; background: #FFF; font-size: 17px; font-weight: 700; line-height: 1.45; word-break: keep-all; }
.jesus-words { margin-top: 10px; padding: 10px 14px; border-radius: 16px; background: #FFF6DF; line-height: 1.4; word-break: keep-all; }
.jesus-words-intro { font-size: 14px; font-weight: 700; }
.jesus-words-text { font-size: 17px; font-weight: 800; }
.jesus-words-source { display: block; font-size: 12px; opacity: .75; }
.verse { margin-top: 10px !important; font-size: 16px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
.verse cite { display: block; font-style: normal; font-size: 14px; opacity: .75; }
.manners { margin-top: 12px !important; padding: 12px 14px; border-radius: 18px; background: #fff; font-size: 17px; font-weight: 700; line-height: 1.5; }

/* ── 가로 화면·넓은 화면: 무대 왼쪽, 순서 오른쪽 ── */
@media (orientation: landscape) and (min-width: 640px) {
  .dtc-app { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .stage { border-radius: 0 26px 26px 0; }
  .pal-item { width: 84px; }
  .prog { flex: 1; height: auto; min-height: 72px; } /* 가로 화면: 오른쪽 칸 전체가 순서 칸 */
}
/* 넓은 가로 화면(패드 가로·PC): 도장을 더 넓게, 오른쪽은 순서 칸(높이 정함)·단추·블록을 가운데에 모은다 (10/18 검수: 오른쪽 흰 칸이 비어 보임) */
@media (orientation: landscape) and (min-width: 900px) {
  .dtc-app { grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); }
  .work { justify-content: center; gap: 12px; padding: 16px 20px; }
  .prog { flex: none; height: clamp(150px, 36vh, 340px); }
}
@media (min-width: 1000px) { .blk.mv, .pal-item, .blk.mv:has(i.art), .pal-item:has(i.art) { width: 96px; height: 84px; } .blk i.art, .pal-item i.art { width: 56px; height: 56px; } .pal-item { max-width: 104px; } .blk span, .pal-item span { font-size: 15px; } }
@media (max-height: 480px) {
  .dtc .topbar { padding-top: 4px; padding-bottom: 4px; }
  .blk.mv, .pal-item, .blk.mv:has(i.art), .pal-item:has(i.art) { height: 52px; } .blk i.art, .pal-item i.art { width: 32px; height: 32px; }
  .blk span, .pal-item span { font-size: 12px; } .blk i, .pal-item i { font-size: 13px; }
  .work { gap: 6px; padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .prog-head { margin-bottom: 4px; }
  .tip { font-size: 14px; }
  .bar .pill { min-height: 44px; font-size: 16px; }
  .tiles { top: 40px; } .tile { height: 38px; }
}

/* ── 동작 줄이기·멈춤 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .blk.hl { transform: none; }
  .blk.flash { box-shadow: 0 0 0 5px #FFD465; }
  .hand { transform: translate(var(--dx), var(--dy)); }
  .how-move { transform: translateX(150px); }
  .how-slot { opacity: 1; }
}
body.paused * { animation-play-state: paused !important; }

/* 가로 휴대폰: 시작 시트를 두 칸으로 (왼쪽 다다, 오른쪽 글·단추) — 시작 단추가 첫 화면 안 (고칠 일 1) */
@media (orientation: landscape) and (max-height: 500px) {
  .ov { padding: 8px; }
  .sheet { width: min(100%, 680px); display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 12px 16px; }
  .sheet > * { grid-column: 2; }
  .sheet > .sheet-fig { grid-column: 1; grid-row: 1 / span 4; width: 150px; margin: 0 auto; }
  .sheet > .end-pair { grid-column: 1; grid-row: 1 / span 8; } /* 끝 카드도 다다·'나'는 왼쪽 칸으로 (한 줄로 쌓여 카드가 700px 가까이 되던 것, 10/31 의심 c) */
  .sheet h2 { font-size: 24px; margin: 0; }
  .sheet-btns { margin-top: 8px; gap: 8px; }
  .sheet.sheet--card { width: min(100%, 760px); display: flex; gap: 16px; justify-content: center; padding: 12px 16px; }
  .card-summary, .card-message { flex: 1 1 0; min-width: 0; }
  .sheet--card .jesus-line, .sheet--card .jesus-words { margin-top: 0 !important; }
  .sheet--card .jesus-words { margin-top: 8px !important; }
}
