/* 운명의 사다리 · 2026-09-21 전면 개편
   재미 앱 표준 «법정 웹툰» 톤(헌법 §7) · 크림 바탕 + 검정 3px 테두리 + 오프셋 그림자 · 노랑·빨강·남색. */
:root {
    --cream: #FFF6E5;
    --paper: #FFFFFF;
    --ink: #1A1A1A;
    --ink-soft: #4A4A4A;
    --mute: #7A7266;
    --red: #E8332A;
    --red-soft: #FBE3E1;
    --yellow: #FFD13F;
    --yellow-soft: #FFF1B8;
    --navy: #2E4374;
    --navy-soft: #E4E9F4;
    --green: #2F9E6E;
    --green-soft: #E4F3EC;
    --gray-soft: #EEEDEA;
    --wood: #9A6A3A;
    --line: 3px solid var(--ink);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-s: 3px 3px 0 var(--ink);
    --display: 'Black Han Sans', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    --hdr: 56px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--ink); word-break: keep-all; line-height: 1.55; min-height: 100vh; -webkit-tap-highlight-color: transparent;
       background-color: var(--cream); background-image: repeating-linear-gradient(135deg, rgba(26,26,26,.028) 0 14px, transparent 14px 28px); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.wrap { max-width: 620px; margin: 0 auto; padding: 0 16px; }

/* 머리 (헌법 §5) */
.shin-header { position: sticky; top: 0; z-index: 40; height: var(--hdr); display: flex; align-items: center; background: var(--cream); border-bottom: var(--line); }
.shin-header-inner { width: 100%; max-width: 620px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--navy); color: #fff; border: 2px solid var(--ink); border-radius: 8px; font-family: serif; font-weight: 700; font-size: 18px; }
.brand-name { font-weight: 800; font-size: .95rem; white-space: nowrap; }
.head-tools { display: flex; gap: 6px; flex: none; }
.tool-btn { width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; line-height: 1; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); text-decoration: none; transition: transform .1s, box-shadow .1s; }
.tool-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.tool-btn.off { background: #EDE6D8; opacity: .75; }

/* 공통 */
.card { background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 16px; border: var(--line); border-radius: 14px; background: var(--paper); font-weight: 800; box-shadow: var(--shadow-s); text-decoration: none; color: var(--ink); text-align: center; transition: transform .1s, box-shadow .1s, opacity .2s; }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.btn:disabled { opacity: .42; cursor: default; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.yellow { background: var(--yellow); }
.btn.ghost { box-shadow: none; border-width: 2px; }
.btn.big { min-height: 58px; font-family: var(--display); font-weight: 400; font-size: 1.22rem; }
.btn.small { min-height: 40px; padding: 6px 11px; font-size: .86rem; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.btn.wide { width: 100%; }
.btn:focus-visible, .tool-btn:focus-visible, .linkbtn:focus-visible, .chip:focus-visible, .head:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.screen { padding: 16px 0 26px; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; box-shadow: 2px 2px 0 var(--ink); }
.linkbtn { background: none; border: none; font-size: .88rem; font-weight: 800; color: var(--ink-soft); padding: 4px 6px; }
.sec-title { display: block; font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.hint-line { font-size: .8rem; font-weight: 700; color: var(--mute); margin: 4px 0 10px; }
.hint-line b { color: var(--ink-soft); }
.notice-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; background: rgba(0,0,0,.035); border: 1px solid rgba(0,0,0,.09); border-radius: 10px; padding: 9px 12px; font-size: .82rem; line-height: 1.55; }
.notice-line svg { flex: none; margin-top: 3px; opacity: .5; }
.foot { text-align: center; font-size: .76rem; color: var(--mute); padding: 6px 0 28px; }
.foot a { color: var(--mute); }
body.in-game .foot { display: none; }

/* ① 사건 접수 */
.title-block { text-align: center; }
.logo { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 12vw, 3.2rem); line-height: 1.06; margin-top: 10px; }
.logo span { color: var(--yellow); -webkit-text-stroke: 1.6px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.sub { font-size: .9rem; font-weight: 700; color: var(--ink-soft); margin-top: 8px; }

.hero { position: relative; height: 236px; margin: 16px 0 14px; overflow: hidden;
        background: linear-gradient(180deg, #DDE6F6 0%, #F2F5FB 72%, #E9DCC4 72%, #E9DCC4 100%); }
/* 🚨 그림을 카드 바닥에 붙이고 높이를 100% 넘게 주면 머리가 카드 밖으로 잘린다(헌법 §7 · 2026-09-21).
      위에서 조금 띄우고 바닥까지 채운다. 검증은 좌표로. */
.hero-jo { position: absolute; left: -10px; top: 6px; bottom: auto; height: calc(100% - 6px); width: auto; transform-origin: 40% 100%; animation: sway 4.6s ease-in-out infinite; cursor: pointer; }
.hero-jo.wink { animation: joHop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.4deg); } }
@keyframes joHop { 0% { transform: translateY(0); } 40% { transform: translateY(-10px) rotate(-2deg); } 100% { transform: none; } }
.bubble { position: absolute; right: 10px; top: 14px; max-width: 46%; background: var(--paper); border: var(--line); border-radius: 14px; padding: 9px 12px; box-shadow: var(--shadow-s); font-weight: 800; font-size: .86rem; line-height: 1.42; }
.bubble::before { content: ''; position: absolute; left: -11px; top: 22px; border: 8px solid transparent; border-right-color: var(--ink); }
.bubble small { display: block; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--mute); }
.bubble.pop { animation: pop .32s cubic-bezier(.3,1.7,.5,1); }
@keyframes pop { 0% { transform: scale(.86); } 100% { transform: none; } }
.hero-crew { position: absolute; right: 8px; bottom: 6px; display: flex; gap: 2px; }
.hero-crew img { width: 46px; height: 46px; object-fit: contain; cursor: pointer; animation: crewHop 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.hero-crew img:nth-child(2) { animation-delay: .8s; }
.hero-crew img:nth-child(3) { animation-delay: 1.6s; }
@keyframes crewHop { 0%, 18%, 100% { transform: translateY(0) scale(1, 1); } 6% { transform: translateY(0) scale(1.1, .88); } 12% { transform: translateY(-14px) scale(.94, 1.06); } }
.hero-crew img.squeak { animation: squeak .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes squeak { 0% { transform: scale(1.25, .75); } 60% { transform: translateY(-12px) scale(.9, 1.1); } 100% { transform: none; } }

.step { padding: 14px 14px 16px; margin-bottom: 12px; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 5px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font-weight: 800; font-size: .86rem; box-shadow: 2px 2px 0 var(--ink); transition: transform .1s, box-shadow .1s, background .15s; }
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip.on { background: var(--yellow); }
.badrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 8px 10px; background: var(--red-soft); border: 2px solid var(--ink); border-radius: 12px; font-weight: 800; font-size: .88rem; }
#menuShuffle { margin-top: 10px; }
.stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.stepper button { width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 900; font-size: 1.1rem; box-shadow: 2px 2px 0 var(--ink); }
.stepper button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper b { min-width: 3em; text-align: center; font-family: var(--display); font-weight: 400; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.members { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mbtn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; padding: 2px; background: var(--paper); border: 2px solid var(--mc, var(--ink)); border-radius: 12px; box-shadow: 2px 2px 0 var(--mc, var(--ink)); transition: transform .1s; }
.mbtn img { width: 40px; height: 40px; object-fit: contain; }
.mbtn:active { transform: scale(.9); }
.mbtn.swap img { animation: squeak .38s cubic-bezier(.3,1.6,.5,1); }
.member input, .goal input { flex: 1; min-width: 0; min-height: 44px; padding: 7px 10px; font-size: .95rem; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; }
.member input:focus, .goal input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(46,67,116,.18); }
.member input::placeholder, .goal input::placeholder { color: #A8A094; font-weight: 700; }
.member.enter { animation: rowIn .3s cubic-bezier(.3,1.5,.5,1); }
@keyframes rowIn { 0% { opacity: 0; transform: translateY(-8px) scale(.96); } 100% { opacity: 1; transform: none; } }

.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goal { display: flex; align-items: center; gap: 6px; min-width: 0; }
.goal .env-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; font-size: .78rem; font-weight: 900; background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 8px; }
.goal[data-tone="bad"] .env-ico { background: var(--red-soft); color: var(--red); }
.goal[data-tone="good"] .env-ico { background: var(--green-soft); color: var(--green); }

.switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 50px; height: 30px; flex: none; background: #D9D3C7; border: 2px solid var(--ink); border-radius: 999px; transition: background .2s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; transition: transform .2s cubic-bezier(.3,1.5,.5,1); }
.switch input:checked + .sw { background: var(--green); }
.switch input:checked + .sw::after { transform: translateX(20px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--red); outline-offset: 2px; }
.sw-txt b { display: block; font-size: .92rem; }
.sw-txt small { display: block; font-size: .76rem; font-weight: 700; color: var(--mute); }

.history { padding: 12px 14px 14px; margin-top: 16px; }
.hist-list { list-style: none; margin-top: 6px; display: grid; gap: 6px; }
.hist-list li { font-size: .82rem; font-weight: 700; color: var(--ink-soft); background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; line-height: 1.45; }
.hist-list li time { color: var(--mute); font-size: .74rem; margin-right: 4px; }
.hist-list li b { color: var(--red); }

/* ② 사다리 법정 — 폰 한 화면에 전부 들어온다(헌법 §7 «고르는 순간은 한 화면에») */
.game { display: flex; flex-direction: column; height: calc(100vh - var(--hdr)); height: calc(100dvh - var(--hdr)); padding: 8px 0 10px; }
.casebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.caseno { font-size: .74rem; font-weight: 800; background: var(--ink); color: var(--yellow); border-radius: 6px; padding: 3px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ride-hint { text-align: center; font-size: .84rem; font-weight: 800; color: var(--red); margin: 4px 0 6px; min-height: 1.4em; }
.ride-hint .arrow { display: inline-block; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.ride-hint.quiet { color: var(--mute); }
.ride-hint.quiet .arrow { visibility: hidden; }

.arena { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px 6px 8px; }
.heads, .feet { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); }
.head { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 0 2px; background: none; border: none; }
.head .face { position: relative; width: var(--tk, 42px); height: var(--tk, 42px); display: grid; place-items: center; }
.head .face img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s, filter .2s; }
.arena.many .head .nm { font-size: .62rem; padding: 1px 3px; border-radius: 6px; }
.head .nm { max-width: 100%; font-size: .72rem; font-weight: 900; line-height: 1.2; padding: 2px 5px; background: var(--paper); border: 2px solid var(--mc, var(--ink)); border-radius: 7px; box-shadow: 2px 2px 0 var(--mc, var(--ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head:not(:disabled):active .nm { transform: translate(2px, 2px); box-shadow: none; }
.head:disabled { cursor: default; }
.head.gone .face img { opacity: .18; filter: grayscale(1); }
.head.done .nm { background: var(--mc); color: #fff; }
.head.idle .face img { animation: idle 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.head.idle:nth-child(2n) .face img { animation-delay: .7s; }
.head.idle:nth-child(3n) .face img { animation-delay: 1.3s; }
@keyframes idle { 0%, 80%, 100% { transform: none; } 86% { transform: scale(1.08, .9); } 92% { transform: translateY(-6px); } }

.board { position: relative; flex: 1; min-height: 150px; margin: 4px 0; touch-action: none; }   /* 🚨 none 이어야 폰에서 «쓱 긋기»가 화면 끌기로 새지 않는다 */
.board.drawing { cursor: crosshair; }
.ladder { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rail { stroke: var(--wood); stroke-width: 5; stroke-linecap: round; }
.rung { stroke: var(--wood); stroke-width: 5; stroke-linecap: round; }
.rung.secret { stroke: #5B5BD6; stroke-dasharray: 7 5; stroke-width: 4; }
.curtain-bg { fill: #FFE7A3; stroke: var(--ink); stroke-width: 3; }
.curtain-stripe { fill: url(#stripes); }
.curtain-txt { font-family: var(--display); font-size: 17px; fill: rgba(26,26,26,.5); text-anchor: middle; }
.secret-top { stroke: #fff; stroke-width: 2.6; stroke-dasharray: 3 5; stroke-linecap: round; }
.rail-over { stroke: rgba(154,106,58,.55); stroke-width: 4; stroke-linecap: round; }
.trail { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.trail-shadow { fill: none; stroke: rgba(26,26,26,.9); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.ripple { fill: none; stroke: #5B5BD6; stroke-width: 3; }
.pen { fill: none; stroke: #5B5BD6; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 9 6; }
.pen.bad { stroke: var(--red); }
.pen-demo { position: absolute; left: 26%; width: 48%; top: 62%; height: 0; pointer-events: none; animation: demoFade 3.9s forwards; }
.pen-demo i { position: absolute; left: 0; top: 0; width: 0; border-top: 4px dashed #5B5BD6; animation: demoTrail 1.7s ease-in-out .2s 2 both; }
.pen-demo b { position: absolute; left: 0; top: -30px; font-size: 26px; line-height: 1; animation: demoPen 1.7s ease-in-out .2s 2 both; }
@keyframes demoTrail { 0% { width: 0; opacity: 1; } 70% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }
@keyframes demoPen { 0% { left: 0; opacity: 1; } 70% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes demoFade { 0%, 92% { opacity: 1; } 100% { opacity: 0; } }
.tokens { position: absolute; inset: 0; pointer-events: none; }
.token { position: absolute; left: 0; top: 0; width: var(--tk, 42px); height: var(--tk, 42px); will-change: transform; filter: drop-shadow(1px 2px 0 rgba(26,26,26,.28)); }
.token img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; }
.token .sweat { position: absolute; right: -6px; top: -8px; font-size: 16px; opacity: 0; }
.token.sad img { filter: grayscale(.85) brightness(.95); }
.token.sad .sweat { opacity: 1; animation: sweat 1.1s ease-in-out infinite; }
@keyframes sweat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.token.joy img { animation: joy .7s cubic-bezier(.3,1.6,.5,1) 2; }
@keyframes joy { 0% { transform: none; } 40% { transform: translateY(-16px) rotate(-8deg); } 100% { transform: none; } }
.token.boo img { animation: boo .5s ease-in-out 2; }
@keyframes boo { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

.feet { gap: 0; }
.env { position: relative; margin: 0 2px; min-width: 0; height: 46px; display: grid; place-items: center; perspective: 300px; }
.env .shut, .env .open { position: absolute; inset: 0; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; backface-visibility: hidden; transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.env .shut { background: #F7E3B5; background-image: linear-gradient(155deg, transparent 49%, rgba(26,26,26,.25) 50%, transparent 51%), linear-gradient(25deg, transparent 49%, rgba(26,26,26,.25) 50%, transparent 51%); }
.env .shut i { width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 2px solid #9E1F18; color: #fff; font-style: normal; font-weight: 900; font-size: .72rem; display: grid; place-items: center; box-shadow: 1px 1px 0 rgba(0,0,0,.3); }
.env .open { transform: rotateY(180deg); background: var(--navy-soft); font-size: .72rem; font-weight: 900; line-height: 1.2; padding: 2px 3px; text-align: center; overflow: hidden; }
.env .open span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.env.is-open .shut { transform: rotateY(-180deg); }
.env.is-open .open { transform: rotateY(0); }
.env[data-tone="bad"] .open { background: var(--red); color: #fff; }
.env[data-tone="good"] .open { background: var(--green-soft); }
.env[data-tone="miss"] .open { background: var(--gray-soft); color: var(--ink-soft); }
.env.shake { animation: envShake .12s linear infinite; }
@keyframes envShake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-2px) rotate(-3deg); } 75% { transform: translateX(2px) rotate(3deg); } }
.env.flash::after { content: ''; position: absolute; inset: -6px; border-radius: 12px; border: 3px solid var(--yellow); animation: ring .7s ease-out forwards; pointer-events: none; }
@keyframes ring { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 10px; }
.controls .btn { flex: 1 1 auto; }
#secretBtn[aria-pressed="true"] { background: #5B5BD6; color: #fff; }
#secretBtn b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--yellow); font-size: .76rem; }
#toVerdictBtn { animation: beg 1.2s ease-in-out infinite; }
@keyframes beg { 0%, 100% { transform: none; } 50% { transform: translateY(-3px) scale(1.03); } }

/* ③ 판결문 */
.paper { position: relative; padding: 20px 18px 22px; background: #FFFDF6; overflow: hidden; }
.p-case { font-size: .76rem; font-weight: 800; color: var(--mute); padding-right: 74px; }
.paper-title { font-family: var(--display); font-weight: 400; font-size: 2rem; text-align: center; letter-spacing: .5em; text-indent: .5em; margin: 6px 0 4px; }
.p-sub { text-align: center; font-size: .82rem; font-weight: 700; color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.p-h { font-family: var(--display); font-weight: 400; font-size: 1.08rem; text-align: center; letter-spacing: .4em; text-indent: .4em; margin: 14px 0 8px; }
.orders { list-style: none; display: grid; gap: 7px; counter-reset: ord; }
.orders li { counter-increment: ord; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); opacity: 0; animation: ordIn .42s cubic-bezier(.3,1.5,.5,1) forwards; }
.orders li::before { content: counter(ord) '.'; font-weight: 900; font-size: .84rem; color: var(--mute); width: 1.4em; flex: none; }
.orders li img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.orders li .who { font-weight: 900; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders li .arr { color: var(--mute); font-weight: 900; flex: none; }
.orders li .what { flex: 1; font-weight: 900; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.orders li .mark { flex: none; font-family: var(--display); font-size: .82rem; color: var(--red); border: 2px solid var(--red); border-radius: 6px; padding: 0 5px; transform: rotate(-8deg); }
.orders li[data-tone="bad"] { background: var(--red-soft); }
.orders li[data-tone="good"] .mark { color: var(--green); border-color: var(--green); }
.orders li[data-tone="miss"] .mark, .orders li[data-tone="neutral"] .mark { color: var(--navy); border-color: var(--navy); }
@keyframes ordIn { 0% { opacity: 0; transform: translateX(-14px); } 100% { opacity: 1; transform: none; } }
.p-reason { font-size: .86rem; font-weight: 700; color: var(--ink-soft); line-height: 1.65; }
.p-date { text-align: center; font-weight: 800; margin-top: 16px; }
.p-judge { text-align: center; font-size: .9rem; font-weight: 700; margin-top: 6px; }
.p-judge small { display: block; font-size: .72rem; color: var(--mute); }
.p-stamp { position: absolute; right: 14px; top: 12px; width: 64px; height: 64px; display: grid; place-items: center; border: 3px solid var(--red); border-radius: 50%; color: var(--red); font-family: var(--display); font-size: 1.05rem; transform: rotate(-14deg); opacity: 0; }
.paper.stamped .p-stamp { animation: slam .42s cubic-bezier(.2,1.4,.4,1) .5s both; }
@keyframes slam { 0% { opacity: 0; transform: scale(2.4) rotate(-14deg); } 100% { opacity: .9; transform: scale(1) rotate(-14deg); } }

.say { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.say img { width: 78px; height: auto; flex: none; filter: drop-shadow(2px 2px 0 rgba(26,26,26,.18)); }
.say b { flex: 1; background: var(--yellow-soft); border: var(--line); border-radius: 12px; padding: 9px 11px; font-size: .88rem; line-height: 1.45; box-shadow: var(--shadow-s); margin-bottom: 14px; }
.v-actions { margin-top: 8px; display: grid; gap: 8px; }
.v-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-row .btn { font-size: .88rem; padding: 8px 8px; }
.share-note { font-size: .76rem; font-weight: 700; color: var(--mute); text-align: center; }
.jo-cta { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 14px 0 8px; text-decoration: none; color: var(--ink); overflow: hidden; background: var(--navy-soft); transition: transform .1s, box-shadow .1s; }
.jo-cta:active { transform: translate(3px, 3px); box-shadow: none; }
.jo-cta img { width: 70px; height: 84px; object-fit: cover; object-position: top; flex: none; }
.jo-cta b { display: block; font-size: .95rem; }
.jo-cta small { display: block; font-size: .8rem; font-weight: 800; color: var(--navy); padding-bottom: 8px; }

/* 떠 있는 것 */
.cutin { position: fixed; left: 50%; top: calc(var(--hdr) + 10px); z-index: 60; width: min(92vw, 420px); display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 0 8px; background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; transform: translateX(-50%); }
.cutin.show { animation: cutIn .38s cubic-bezier(.3,1.5,.5,1) both; }
.cutin.bad { background: var(--red-soft); }
.cutin.good { background: var(--green-soft); }
.cutin.drum { background: var(--yellow-soft); }
.cutin.mid { top: 40%; pointer-events: none; }                    /* 판 위에 뜨므로 누르는 손을 막지 않는다 */
/* ⚠️ 자리를 transform(translateX(-50%))으로 잡았으니 등장 애니메이션에도 같은 값을 넣는다(없으면 번쩍 튄다). */
@keyframes cutIn { 0% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.9); } 100% { opacity: 1; transform: translateX(-50%); } }
.cutin img { width: 74px; height: 92px; object-fit: cover; object-position: top; flex: none; }
.cutin p { flex: 1; align-self: center; padding: 6px 0 12px; font-weight: 900; font-size: 1rem; line-height: 1.4; }
.cutin.drum img { animation: drumBeat .16s linear infinite; }
@keyframes drumBeat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 70; max-width: 88vw; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 16px; font-size: .86rem; font-weight: 800; transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 65; }

/* 넓은 화면 */
@media (min-width: 600px) {
    .hero { height: 262px; }
    .members, .goals { gap: 10px; }
}
/* 폰 좁은 폭 */
@media (max-width: 380px) {
    .members, .goals { grid-template-columns: 1fr; }
    .brand-name { font-size: .88rem; }
    .tool-btn { width: 34px; height: 34px; font-size: 16px; }
    .controls .btn.small { padding: 6px 8px; font-size: .8rem; }
}
@media (max-height: 700px) {
    .ride-hint { margin: 2px 0 4px; font-size: .8rem; }
    .controls { margin-top: 7px; }
    .controls .btn.small { min-height: 36px; }
}

/* 🚨 움직임 줄이기는 «전부 끄기»가 아니다(헌법 §7). 반복 움직임·흔들림만 끄고, 타고 내려가는 것(게임 내용 자체)은 남긴다. */
@media (prefers-reduced-motion: reduce) {
    .hero-jo, .hero-crew img, .head.idle .face img, .ride-hint .arrow, #toVerdictBtn, .cutin.drum img, .token.sad .sweat { animation: none !important; }
    .env.shake { animation: none; }
    .orders li { animation-duration: .2s; }
}
