/* 사역체 테스트. 토큰은 BRIEF.md 가 정본이고 여기서 바꾸지 않는다.
   never: 그라데이션, 블러 그림자, 1px 저대비 보더, Tailwind 기본 hex, 이모지 아이콘,
          모든 속성을 한꺼번에 굴리는 트랜지션, 세리프, 줄표, width/height/top/left 애니메이션.
          트랜지션·애니메이션은 transform 과 opacity 만 굴린다(배경색 전환 하나만 예외).
   시그니처: 모든 덩어리가 «잉크 2px 외곽선 + 하드 오프셋 그림자» 스티커. 누르면 내려앉는다.
   v8 시그니처: «캡슐 월드맵». 위쪽 진행 표시가 다섯 판을 잇는 점선 길이고, 내 캡슐이 답할 때마다 톡 튀고
   판을 깨면 다음 칸으로 튀어 간다. 끝에 같은 캡슐이 열리면서 결과 캐릭터가 나온다. */

/* 글꼴(9/23 v23, JH «네이버 무료 폰트 중 제일 잘 어울리는 걸로»). 네이버 나눔 글꼴을 앱 글자만 남겨 우리 서버에서(tools/build_fonts.py, public/fonts/OFL.txt).
   제목·본문 = 나눔스퀘어라운드 한 가족을 굵기로(R 400 · B 700 · EB 800). 둥근 획 끝이 스티커의 둥근 잉크 선과 맞는다.
   손글씨 = 나눔손글씨 «힘내라는 말보단»(굵기 하나, .hand 의 700 은 합성). 없는 글자는 둥근체로 떨어진다.
   실제 화면 다섯 벌(지금 · 둥근체+다행체 · 둥근체+힘내라는 · 네오+다행체 · 둥근체+흰꼬리수리)을 찍어 비교해서 골랐다. */
@font-face{ font-family:'XF Round'; src:url(/fonts/xf-round-r.woff2) format('woff2'); font-weight:100 500; font-display:swap; }
@font-face{ font-family:'XF Round'; src:url(/fonts/xf-round-b.woff2) format('woff2'); font-weight:600 700; font-display:swap; }
@font-face{ font-family:'XF Round'; src:url(/fonts/xf-round-eb.woff2) format('woff2'); font-weight:800 900; font-display:swap; }
/* 제목용은 어떤 굵기를 불러도 EB 한 벌(합성 굵기가 덧씌워지지 않게) */
@font-face{ font-family:'XF Round Display'; src:url(/fonts/xf-round-eb.woff2) format('woff2'); font-weight:100 900; font-display:swap; }
@font-face{ font-family:'XF Hand'; src:url(/fonts/xf-hand.woff2) format('woff2'); font-weight:400; font-display:swap; }

:root{
  --ink:#1E1B2E;
  --paper:#FFFFFF;
  --page:#F3F1EC;
  --lemon:#FFE27A; --lilac:#D8CBFF; --sky:#BFE3F5; --peach:#FFC3A8; --slate:#C5D2F2;
  --mint:#BDEBD3;  --pink:#FFC1D9;  --apricot:#FFD59E; --kraft:#EBDCC2;
  --line:2px;
  --shadow:4px 4px 0 var(--ink);
  --shadow-sm:2px 2px 0 var(--ink);
  --r-card:18px; --r-chip:999px; --r-btn:14px;
  --font-display:'XF Round Display', 'XF Round', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-hand:'XF Hand', 'XF Round', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-body:'XF Round', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --bg:var(--sky);
  /* 움직임. 튕기는 것(spring)은 한 번 넘쳤다 돌아온다. 빠지는 것(out)은 끝이 부드럽다 */
  --spring:cubic-bezier(.34,1.56,.64,1);
  --out:cubic-bezier(.22,1,.36,1);
}

*{ box-sizing:border-box; }
/* 위아래 고무줄 튕김·당겨서 새로고침을 끈다(9/23 JH «카톡 안에서 화면이 위아래로 움직이고 터치가 풀린다»). 스크롤은 된다 */
html,body{ margin:0; padding:0; overscroll-behavior:none; }
body{
  background:var(--page);
  color:var(--ink);
  font-family:var(--font-body);
  -webkit-text-size-adjust:100%;
  overflow-x:hidden;
}

.app{
  position:relative;
  max-width:430px;
  margin-inline:auto;
  min-height:100dvh;
  background:var(--bg);
  transition:background-color .32s ease;
  padding:14px 18px calc(28px + env(safe-area-inset-bottom));
  overflow-x:hidden;
}
@media (min-width:480px) and (max-width:599px){
  .app{ border-inline:var(--line) solid var(--ink); }
}

.screen[hidden]{ display:none !important; }
[hidden]{ display:none !important; }

/* 스티커 문법 --------------------------------------------------------- */
.sticker{
  border:var(--line) solid var(--ink);
  box-shadow:var(--shadow);
  background:var(--paper);
  border-radius:var(--r-card);
}
.press{
  transition:transform .09s ease, box-shadow .09s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.press:active{
  transform:translate(2px,2px);
  box-shadow:0 0 0 0 var(--ink);
}
:focus-visible{ outline:3px solid var(--ink); outline-offset:3px; }

/* 글자 ---------------------------------------------------------------- */
.display{
  font-family:var(--font-display);
  font-weight:400;
  line-height:1.16;
  margin:0;
  color:var(--paper);
  -webkit-text-stroke:7px var(--ink);
  paint-order:stroke fill;
  letter-spacing:-.01em;
  word-break:keep-all;
  white-space:pre-line;
  text-wrap:balance;
}
.hand{ font-family:var(--font-hand); font-weight:700; }

/* 맨 위 한 줄 ----------------------------------------------------------- */
/* 왼쪽 = 지도(판이 도는 동안), 오른쪽 = 말 바꾸기(모든 화면). 말 바꾸기는 줄 맨 위에 붙는다. */
.topbar{
  display:flex; align-items:flex-start; gap:10px;
  min-height:32px; margin:0 0 6px;
}
.top-btns{ flex:0 0 auto; margin-left:auto; display:flex; gap:8px; align-items:center; }
.lang-pill{
  flex:0 0 auto;
  min-height:30px; padding:2px 13px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); color:var(--ink);
  font-size:15px; line-height:1.5; cursor:pointer;
}
/* 소리 알약(JH 9/22 «귀엽게, 원하는 대로 껐다 켰다» → 9/23 «BGM 끄기, 효과음 끄기, 전부 다 끄기»).
   두 칸: 왼쪽 음표 = 배경음악(켜지면 레몬, 음표가 117bpm 박자로 까딱), 오른쪽 스피커 = 효과음(켜지면 핑크, 물결이 깜빡).
   꺼진 칸은 흰 칸에 흐린 그림 + 사선. 누르면 알약이 한 번 찌그러지고 밑에 소리 창이 뜬다. */
.snd-pill{
  position:relative; flex:0 0 auto;
  display:flex; width:62px; height:30px; padding:0;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); color:var(--ink);
  box-shadow:var(--shadow-sm); cursor:pointer;
}
.sp-half{
  position:relative; flex:1 1 0; display:grid; place-items:center;
  transition:background-color .25s ease;
}
.sp-bgm{ border-radius:var(--r-chip) 0 0 var(--r-chip); }
.sp-sfx{ border-radius:0 var(--r-chip) var(--r-chip) 0; border-left:var(--line) solid var(--ink); }
.sp-half svg{ display:block; width:15px; height:15px; transition:opacity .2s ease, transform .3s var(--spring); }
.snd-pill.bgm-on .sp-bgm{ background:var(--lemon); }
.snd-pill.sfx-on .sp-sfx{ background:var(--pink); }
.snd-pill.bgm-on .sp-bgm svg{ animation:beat .51s ease-in-out infinite alternate; }
@keyframes beat{ from{ transform:translateY(.6px) rotate(-9deg); } to{ transform:translateY(-1.4px) rotate(9deg); } }
.snd-pill.sfx-on .sp-sfx .sw1{ animation:wave 1.02s ease-in-out infinite; }
.snd-pill.sfx-on .sp-sfx .sw2{ animation:wave 1.02s ease-in-out .25s infinite; }
@keyframes wave{ 0%, 100%{ opacity:1; } 50%{ opacity:.25; } }
/* 꺼진 칸: 흐린 그림 + 잉크 사선 */
.snd-pill:not(.bgm-on) .sp-bgm svg, .snd-pill:not(.sfx-on) .sp-sfx svg{ opacity:.35; transform:rotate(-14deg); }
.snd-pill:not(.bgm-on) .sp-bgm::after, .snd-pill:not(.sfx-on) .sp-sfx::after{
  content:''; position:absolute; left:50%; top:50%; width:20px; height:2.2px; margin:-1.1px 0 0 -10px;
  background:var(--ink); border-radius:2px; transform:rotate(-45deg);
}
.snd-pill.flip{ animation:squish .38s var(--spring); }
@keyframes squish{ 0%{ transform:scale(1); } 35%{ transform:scale(1.12, .84); } 100%{ transform:scale(1); } }

/* 소리 창. 알약 밑에 말풍선처럼(꼬리는 app.js 가 --tail 로 맞춘다). 뒤판은 투명해서 화면은 그대로 보이고, 누르면 닫힌다 */
.snd-back{ position:fixed; inset:0; z-index:44; background:transparent; }
.snd-panel{
  position:fixed; z-index:45; width:252px; margin:0;
  padding:12px 12px 12px;
  display:flex; flex-direction:column; gap:8px;
  background:var(--paper); color:var(--ink);
  border:var(--line) solid var(--ink); border-radius:18px; box-shadow:var(--shadow);
}
.snd-panel[hidden]{ display:none !important; }
.snd-panel::before{
  content:''; position:absolute; top:-8px; left:calc(var(--tail, 60px) - 7px);
  width:12px; height:12px; background:var(--paper);
  border-left:var(--line) solid var(--ink); border-top:var(--line) solid var(--ink);
  transform:rotate(45deg);
}
.snd-panel.in{ animation:hintpop .42s var(--spring) both; }
.snd-panel.in > *{ animation:popin .4s var(--spring) backwards; }
.snd-panel.in > :nth-child(2){ animation-delay:.05s; }
.snd-panel.in > :nth-child(3){ animation-delay:.1s; }
.snd-panel.in > :nth-child(4){ animation-delay:.15s; }
.sp-title{ margin:0 2px 2px; font-family:var(--font-display); font-size:17px; }
.sp-row{
  display:flex; align-items:center; gap:10px;
  width:100%; min-height:48px; padding:6px 10px;
  border:var(--line) solid var(--ink); border-radius:14px;
  background:var(--paper); color:var(--ink); box-shadow:var(--shadow-sm);
  font-family:var(--font-body); font-size:15.5px; font-weight:700; text-align:left; cursor:pointer;
}
.sp-ico{
  width:30px; height:30px; flex:0 0 auto; border-radius:50%;
  display:grid; place-items:center;
  border:var(--line) solid var(--ink); background:var(--paper);
  transition:background-color .25s ease;
}
.sp-ico svg{ width:16px; height:16px; display:block; }
#sp-bgm.on .sp-ico{ background:var(--lemon); }
#sp-sfx.on .sp-ico{ background:var(--pink); }
.sp-row:not(.on) .sp-ico svg{ opacity:.4; }
.sp-name{ flex:1 1 auto; min-width:0; }
/* 줄마다 작은 켜고 끄기 스위치 */
.mini-sw{
  position:relative; flex:0 0 auto; width:44px; height:26px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); transition:background-color .25s ease;
}
.mini-sw i{
  position:absolute; top:2px; left:2px; width:18px; height:18px; display:block;
  border-radius:50%; background:var(--paper); border:var(--line) solid var(--ink);
  transition:transform .42s var(--spring);
}
.sp-row.on .mini-sw{ background:var(--mint); }
.sp-row.on .mini-sw i{ transform:translateX(18px); }
.sp-row.bump .mini-sw{ animation:squish .38s var(--spring); }
.sp-all{ min-height:46px; font-size:17px; margin-top:2px; }
.sp-all.turn-on{ background:var(--lemon); color:var(--ink); }
/* 켤 때 스위치에서 튀어나오는 음표 셋 */
.fly-note{ position:absolute; left:-11px; top:-11px; width:22px; height:22px; display:block; animation:flynote .82s var(--out) var(--d) both; }
.fly-note svg{ display:block; width:100%; height:100%; overflow:visible; }
@keyframes flynote{
  0%{ opacity:0; transform:translate(0, 4px) scale(.4) rotate(0); }
  35%{ opacity:1; transform:translate(calc(var(--dx) * .5), -12px) scale(1) rotate(calc(var(--rot) * .5)); }
  100%{ opacity:0; transform:translate(var(--dx), 34px) scale(.9) rotate(var(--rot)); }
}
/* 스위치 밑 말풍선(«쉿!», 처음 음악이 나올 때 «소리는 여기서 끄고 켜»). 꼬리는 스위치 가운데를 가리킨다(app.js 가 --tail 을 잰다) */
.snd-hint{
  position:fixed; z-index:40; margin:0;
  padding:7px 12px 6px;
  background:var(--paper); color:var(--ink);
  border:var(--line) solid var(--ink); border-radius:14px; box-shadow:var(--shadow-sm);
  font-size:17px; line-height:1.2; white-space:nowrap; cursor:pointer;
}
.snd-hint::before{
  content:''; position:absolute; top:-8px; left:calc(var(--tail, 30px) - 7px);
  width:12px; height:12px; background:var(--paper);
  border-left:var(--line) solid var(--ink); border-top:var(--line) solid var(--ink);
  transform:rotate(45deg);
}
/* 알약 왼쪽에 뜰 때: 꼬리가 오른쪽 가운데에서 알약을 가리킨다 */
.snd-hint.side::before{
  top:50%; left:auto; right:-8px; margin-top:-6px;
  border-left:0; border-top:var(--line) solid var(--ink); border-right:var(--line) solid var(--ink);
}
.snd-hint.in{ animation:hintpop .42s var(--spring) both; }
.snd-hint.side.in{ animation:hintside .42s var(--spring) both; }
@keyframes hintside{ 0%{ opacity:0; transform:translateX(8px) scale(.8); } 100%{ opacity:1; transform:none; } }
@keyframes hintpop{ 0%{ opacity:0; transform:translateY(-6px) scale(.8); } 100%{ opacity:1; transform:none; } }

/* 지도 ---------------------------------------------------------------- */
.hud{ flex:1 1 auto; min-width:0; }
.map{
  position:relative;
  display:flex; align-items:center; justify-content:space-between;
  height:44px; padding:10px 2px 0;
}
/* 칸을 잇는 점선 길. 칸 가운데 높이를 지난다 */
.map-path{
  position:absolute; left:14px; right:14px; top:calc(10px + 17px);
  border-top:3px dashed var(--ink); opacity:.55;
}
.node{
  position:relative; z-index:1;
  width:26px; height:26px; flex:0 0 auto;
  display:grid; place-items:center;
  border:var(--line) solid var(--ink); border-radius:50%;
  background:var(--paper); color:var(--ink);
  box-shadow:var(--shadow-sm);
}
.node svg{ width:16px; height:16px; }
.node.todo svg{ opacity:.5; }
.node.now{
  width:34px; height:34px;
  background:var(--nc, var(--paper));
}
.node.now svg{ width:19px; height:19px; }
.node.done{ background:var(--lemon); }
.node-star{ width:17px !important; height:17px !important; }
.node-star path{ fill:var(--paper); stroke:var(--ink); stroke-width:2; stroke-linejoin:round; }
.node.extra{ width:22px; height:22px; }
.node.extra svg{ width:13px; height:13px; }
.node.extra.now{ width:30px; height:30px; }
/* 작은 폰(≤380px)에 보너스·마지막 칸까지 여덟 칸이 서면 소리 스위치와 붙는다. 칸을 조금 줄인다 */
@media (max-width:380px){
  .node{ width:23px; height:23px; }
  .node svg{ width:14px; height:14px; }
  .node.now{ width:30px; height:30px; }
  .node.now svg{ width:17px; height:17px; }
  .node.extra{ width:19px; height:19px; }
  .node.extra svg{ width:11px; height:11px; }
  .node.extra.now{ width:27px; height:27px; }
  .node-star{ width:15px !important; height:15px !important; }
  .topbar{ gap:8px; }
  .top-btns{ gap:6px; }
  .lang-pill{ padding:2px 10px; }
}
.node.goal{ border-style:dashed; box-shadow:none; }
/* 판을 깨면 별이 쿵 찍힌다 */
.node.stamp{ animation:stamp .5s var(--spring) both; }
@keyframes stamp{
  0%{ transform:scale(2.1) rotate(-24deg); opacity:0; }
  60%{ transform:scale(.9) rotate(4deg); opacity:1; }
  100%{ transform:scale(1) rotate(0); }
}

/* 내 캡슐. 칸 위에 서 있다. 옮겨 갈 때는 옆으로 가면서(바깥) 위로 튄다(안쪽) */
.token{
  position:absolute; z-index:2; left:0; top:-6px;
  width:0; height:0;
  transition:transform .56s var(--out);
  pointer-events:none;
}
.token-hop{ position:absolute; left:-12px; top:-2px; display:block; animation:idle 2.6s ease-in-out infinite; }
.token-hop.jump{ animation:jump .56s var(--out) both; }
.token-hop.bop{ animation:bop .34s var(--spring) both; }
@keyframes idle{ 0%, 100%{ transform:translateY(0); } 50%{ transform:translateY(-3px); } }
/* 지금 칸은 동그라미 물결이 퍼진다(여기야) */
.node.now::after{
  content:''; position:absolute; inset:-7px; border-radius:50%;
  border:var(--line) solid var(--ink); opacity:0;
  animation:ring 2.2s ease-out infinite;
}
@keyframes ring{ 0%{ opacity:.5; transform:scale(.75); } 100%{ opacity:0; transform:scale(1.35); } }
@keyframes jump{
  0%{ transform:translateY(0) scale(1,1); }
  18%{ transform:translateY(2px) scale(1.15,.82); }
  50%{ transform:translateY(-18px) scale(.92,1.1); }
  82%{ transform:translateY(1px) scale(1.12,.86); }
  100%{ transform:translateY(0) scale(1,1); }
}
@keyframes bop{
  0%{ transform:translateY(0) scale(1); }
  40%{ transform:translateY(-8px) scale(.94,1.08); }
  100%{ transform:translateY(0) scale(1); }
}

.hud-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin:6px 0 0;
}
.hud-label{
  font-family:var(--font-display); font-size:15px; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0;
}

/* 캡슐 ---------------------------------------------------------------- */
/* 뽑기 캡슐. 위 반은 색, 아래 반은 흰색, 가운데 띠. 작은 것(cap-sm, 지도)과 큰 것(cap-lg, 결과 뽑기).
   ⚠ 크기 이름에 mini·big 을 쓰지 않는다. 리더 보고서 CSS 의 .mini 단추와 겹쳐서 캡슐이 검은 단추로 그려졌다(2026-09-22). */
.capsule{
  --cap:var(--lemon);
  position:relative; display:block;
}
.capsule .cap-top, .capsule .cap-bottom{
  position:absolute; left:0; right:0;
  border:var(--line) solid var(--ink);
}
.capsule .cap-top{ top:0; background:var(--cap); }
.capsule .cap-bottom{ background:var(--paper); }
.capsule .cap-band{ position:absolute; left:0; right:0; background:var(--paper); border:var(--line) solid var(--ink); }
.capsule.cap-sm{ width:24px; height:24px; }
.capsule.cap-sm .cap-top{ height:13px; border-radius:12px 12px 0 0; }
.capsule.cap-sm .cap-bottom{ top:11px; height:13px; border-radius:0 0 12px 12px; }
.capsule.cap-sm .cap-band{ display:none; }

/* 버튼 ---------------------------------------------------------------- */
.btn{
  display:flex; align-items:center; justify-content:center;
  width:100%; min-height:56px;
  border:var(--line) solid var(--ink);
  border-radius:var(--r-btn);
  background:var(--ink); color:var(--paper);
  font-family:var(--font-display); font-size:20px;
  box-shadow:var(--shadow);
  cursor:pointer;
  padding:10px 16px;
}
.btn.light{ background:var(--paper); color:var(--ink); }
.btn.half{ flex:1 1 0; min-width:0; font-size:18px; }
.btn:disabled{ opacity:.42; box-shadow:none; transform:translate(2px,2px); cursor:default; }
/* 지금 눌러야 하는 단추는 테두리 물결이 퍼진다(단추 자체는 안 움직여서 누르는 느낌은 그대로) */
#go-input, #st-go, .btn.interest.big:not(.done), #r-try{ position:relative; }
#go-input::after, #st-go::after, .btn.interest.big:not(.done)::after, #r-try::after{
  content:''; position:absolute; inset:-3px; border-radius:calc(var(--r-btn) + 3px);
  border:var(--line) solid var(--ink); opacity:0; pointer-events:none;
  animation:halo 2.4s ease-out 1s infinite;
}
@keyframes halo{ 0%{ opacity:.55; transform:scale(1); } 70%, 100%{ opacity:0; transform:scale(1.08, 1.3); } }

.row{ display:flex; gap:10px; align-items:stretch; }

/* 표지 ---------------------------------------------------------------- */
.cover{ text-align:center; padding-top:4px; }
.eyebrow{
  font-family:var(--font-hand); font-weight:700; font-size:19px;
  margin:0 0 6px; color:var(--ink);
}
.cover .display{ font-size:clamp(36px, 11.8vw, 46px); }
.board{
  position:relative;
  margin:20px 0 14px;
  padding:14px;
  display:flex; align-items:center; justify-content:center;
  min-height:220px;
}
/* 10/15 테스터 «첫 화면이랑 스테이지 카드 그림이 많이 흔들린다, 떨린다» → 큰 그림은 가만히 둔다. 틀 안에서 그림만 6px 오르내려 틀 선과 어긋나 보였고,
   2배 줄여 그린 그림을 0.06px씩 옮기니 굵은 선이 프레임마다 다시 그려져 떨려 보였다. 움직임은 별 · 스티커 · 코스 캡슐이 맡는다 */
.board .cover-img{ display:block; width:100%; height:auto; max-height:260px; object-fit:contain; }
@keyframes float{ 0%, 100%{ transform:translateY(0); } 50%{ transform:translateY(-6px); } }
/* 교회 표시. 판 왼쪽 위 모서리에 비스듬히 붙은 스티커 한 장 */
.brand-tag{
  position:absolute; left:-10px; top:-14px; z-index:1;
  display:flex; align-items:center;
  padding:8px 13px;
  background:var(--lemon);
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  box-shadow:var(--shadow-sm);
  transform:rotate(-5deg);
  transform-origin:18% 60%;
  animation:swing 4.2s ease-in-out infinite;
}
.brand-tag img{ display:block; width:120px; height:auto; }
@keyframes swing{ 0%, 100%{ transform:rotate(-5deg); } 50%{ transform:rotate(-8.5deg); } }
.sub{
  font-size:14px; margin:0 0 16px; color:var(--ink); opacity:.78;
  font-weight:500;
}
.count-line{
  font-family:var(--font-hand); font-weight:700; font-size:18px;
  margin:12px 0 0; text-align:center;
}

/* 표지 = 게임 타이틀 화면(9/23). 들어올 때 차례로 톡톡, 제목은 통 튀어 들어온다 */
.cover.go > *{ animation:popin .5s var(--spring) backwards; }
.cover.go > .cover-title{ animation:titlein .7s var(--spring) .06s backwards; }
.cover.go > .board{ animation-delay:.18s; }
.cover.go > .course{ animation-delay:.3s; }
.cover.go > .course-cap{ animation-delay:.38s; }
.cover.go > #go-input{ animation-delay:.46s; }
.cover.go > .count-chip{ animation-delay:.54s; }
@keyframes titlein{
  0%{ opacity:0; transform:scale(.4) rotate(-6deg); }
  60%{ opacity:1; transform:scale(1.08) rotate(2deg); }
  100%{ opacity:1; transform:scale(1) rotate(0); }
}
/* 캐릭터 판 둘레에서 반짝이는 별 셋 */
.twinkle{ position:absolute; width:24px; height:24px; overflow:visible; pointer-events:none; z-index:1; }
.twinkle path{ fill:var(--lemon); stroke:var(--ink); stroke-width:1.6; stroke-linejoin:round; }
.tw1{ right:-11px; top:22px; animation:twinkle 2.6s ease-in-out infinite; }
.tw2{ left:-9px; bottom:40px; width:18px; height:18px; animation:twinkle 2.6s ease-in-out .9s infinite; }
.tw2 path{ fill:var(--pink); }
.tw3{ right:34px; bottom:-11px; width:20px; height:20px; animation:twinkle 2.6s ease-in-out 1.7s infinite; }
.tw3 path{ fill:var(--mint); }
@keyframes twinkle{
  0%, 100%{ transform:scale(.7) rotate(0); opacity:.55; }
  45%{ transform:scale(1.15) rotate(35deg); opacity:1; }
}
/* 코스 미리보기: 퀴즈 지도와 같은 부품. 칸마다 그 판 색, 캡슐이 칸을 건너간다 */
.course{ margin:18px 0 0; padding:2px 16px 10px; }
.course .node{ background:var(--nc, var(--paper)); }
.course .node svg{ opacity:1; }
.course .node.goal{ background:var(--paper); }
.course .node.lit{ animation:nodepop .45s var(--spring) both; }
@keyframes nodepop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.28) rotate(-6deg); } 100%{ transform:scale(1) rotate(0); } }
.course-cap{ margin:10px 0 0; font-size:18px; line-height:1.35; text-align:center; word-break:keep-all; }
#go-input{ margin-top:16px; }
/* 참여 수 = 캡슐 달린 딱지 */
.count-chip{
  display:flex; align-items:center; gap:8px;
  width:fit-content; max-width:100%; margin:14px auto 0; padding:5px 14px 4px 9px;
  background:var(--paper); border:var(--line) solid var(--ink); border-radius:var(--r-chip); box-shadow:var(--shadow-sm);
  font-family:var(--font-hand); font-weight:700; font-size:17px; line-height:1.2;
}
.count-chip:not(.on){ visibility:hidden; }
.count-cap{ --cap:var(--pink); flex:0 0 auto; animation:idle 2.6s ease-in-out infinite; }

/* 이름 입력 = 스테이지 카드 문법(9/23): READY 배지 + 제목 + 한 줄, 칸마다 잉크 이름표 */
.input-screen{ text-align:center; }
.input-screen .field{ text-align:left; }
.ready-badge{ margin:0 0 24px; }
.in-how{ margin:10px 0 0; font-size:19px; text-wrap:balance; }
.course-cap{ text-wrap:balance; }
.tagbox{ position:relative; }
.tagbox.sticker{ margin:30px 0 0; padding:24px 12px 14px; }
.tag-name{
  position:absolute; left:14px; top:-15px; z-index:1; margin:0;
  padding:4px 12px 3px; border-radius:var(--r-chip);
  background:var(--ink); color:var(--paper);
  font-family:var(--font-display); font-weight:400; font-size:15px; line-height:1.3;
}
.name-box{ margin:42px 0 0; }
.name-box .input{ padding-top:16px; }
.input-screen.go > *{ animation:popin .5s var(--spring) backwards; }
.input-screen.go > .ready-badge{ animation-name:popin-tilt; animation-delay:.04s; }
.input-screen.go > .display{ animation-delay:.1s; }
.input-screen.go > .in-how{ animation-delay:.18s; }
.input-screen.go > .tagbox{ animation-delay:.26s; }
.input-screen.go > .name-box{ animation-delay:.34s; }
.input-screen.go > #go-quiz{ animation-delay:.42s; }
.input-screen.go > .back{ animation-delay:.5s; }
.input-screen.go .mkbtn{ animation:popin .42s var(--spring) backwards; animation-delay:calc(.3s + var(--i, 0) * 22ms); }
/* 다 채우면 «테스트 시작» 이 통 튀고 테두리 물결 */
.input-screen #go-quiz.pop{ animation:readypop .5s var(--spring) backwards; }
@keyframes readypop{ 0%{ transform:scale(.92); } 55%{ transform:scale(1.05); } 100%{ transform:scale(1); } }
#go-quiz.ready{ position:relative; }
#go-quiz.ready::after{
  content:''; position:absolute; inset:-3px; border-radius:calc(var(--r-btn) + 3px);
  border:var(--line) solid var(--ink); opacity:0; pointer-events:none;
  animation:halo 2.4s ease-out .6s infinite;
}

/* 입력 ---------------------------------------------------------------- */
.input-screen{ padding-top:10px; }
.input-screen .display{ font-size:clamp(28px, 8.6vw, 34px); text-align:center; -webkit-text-stroke:6px var(--ink); }
.field{ margin:18px 0 0; }
.label{
  display:block; font-family:var(--font-hand); font-weight:700; font-size:18px;
  margin:0 0 6px 4px;
}
.input{
  width:100%; min-height:54px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-body); font-size:17px; font-weight:600;
  padding:12px 14px;
  box-shadow:var(--shadow);
}
.input::placeholder{ color:var(--ink); opacity:.34; font-weight:500; }
.mkgrid{ display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.mkbtn{
  min-height:46px; border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink); font-family:var(--font-display); font-size:19px;
  box-shadow:var(--shadow); cursor:pointer; padding:0;
}
.mkbtn:active, .mkbtn.on{ transform:translate(2px,2px); box-shadow:0 0 0 0 var(--ink); }
.mkbtn.on{ background:var(--ink); color:var(--paper); }
/* 누른 목장 칸은 톡 튄다(실로폰 한 음과 같이) */
.input-screen .mkbtn.pop, .input-screen .mkchip.pop{ animation:mkpop .38s var(--spring) backwards; }
@keyframes mkpop{ 0%{ transform:translate(2px,2px) scale(.86); } 55%{ transform:translate(2px,2px) scale(1.1); } 100%{ transform:translate(2px,2px) scale(1); } }
/* 빠진 게 있으면 그 칸이 도리도리 */
#mk-grid.shake, #in-name.shake{ animation:shake .4s ease both; }
#go-quiz.notyet{ opacity:.45; box-shadow:none; transform:translate(2px,2px); }
.mkother{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mkchip{
  border:2px solid var(--ink); border-radius:var(--r-chip); background:transparent; color:var(--ink);
  font-family:var(--font-body); font-size:14px; font-weight:600; padding:7px 12px; cursor:pointer;
}
.mkchip.on{ background:var(--ink); color:var(--paper); }
@media (max-width:344px){ .mkbtn{ font-size:17px; min-height:42px; } }
.input:focus{ outline:none; transform:translate(2px,2px); box-shadow:0 0 0 0 var(--ink); }
.err{
  font-family:var(--font-hand); font-weight:700; font-size:17px;
  margin:10px 0 0; min-height:22px;
}

/* 스테이지 카드 -------------------------------------------------------- */
.stage-screen{ text-align:center; padding-top:18px; }
.stage-in{ position:relative; display:flex; flex-direction:column; align-items:center; }
.stage-badge{
  display:inline-block; margin:0;
  padding:6px 16px 5px;
  background:var(--ink); color:var(--paper);
  border-radius:var(--r-chip);
  font-family:var(--font-display); font-size:17px; letter-spacing:.06em;
  transform:rotate(-4deg);
  box-shadow:var(--shadow-sm);
}
.stage-title{ font-size:clamp(34px, 10.4vw, 42px); margin:14px 0 0; }
.stage-how{ font-size:20px; line-height:1.35; margin:10px 0 0; white-space:pre-line; word-break:keep-all; }
.stage-art{
  width:100%; margin:18px 0 20px; padding:0; overflow:hidden; line-height:0;
}
.stage-art img{ display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; background:var(--paper); }
/* 깬 판 도장. 배지 위에 제 줄로(배지를 가리지 않게) */
.clear-stamp{
  position:relative; z-index:2; margin:0 0 14px;
  display:inline-flex; align-items:center; gap:7px;
  padding:6px 14px 4px;
  background:var(--lemon);
  border:var(--line) solid var(--ink); border-radius:12px;
  box-shadow:var(--shadow-sm);
  font-size:19px; transform:rotate(-3deg);
}
.clear-stamp::before{
  content:''; width:18px; height:18px; flex:0 0 auto;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.8l2.4 5 5.4.6-4 3.7 1.1 5.4L10 13.8l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z' fill='%23fff' stroke='%231E1B2E' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* 들어올 때 차례로 톡톡 */
.stage-in.go > *{ animation:popin .5s var(--spring) backwards; }
.stage-in.go > .clear-stamp{ animation:stampin .6s var(--spring) .05s backwards; }
.stage-in.go > .stage-badge{ animation-delay:.08s; }
.stage-in.go > .stage-title{ animation-delay:.16s; }
.stage-in.go > .stage-how{ animation-delay:.24s; }
.stage-in.go > .stage-art{ animation-delay:.3s; }
.stage-in.go > .btn{ animation-delay:.4s; }
@keyframes popin{
  0%{ opacity:0; transform:translateY(16px) scale(.92); }
  100%{ opacity:1; transform:translateY(0) scale(1); }
}
.stage-in.go > .stage-badge{ animation-name:popin-tilt; }
/* «가자» 를 누르면 카드가 아래로 쏙 빠진다 */
.stage-in.leave > *{ animation:leave .3s var(--out) both !important; }
@keyframes leave{ to{ opacity:0; transform:translateY(22px) scale(.95); } }
/* 스테이지 그림도 가만히(10/15, 위 표지 그림과 같은 피드백). 전엔 7초에 3.5% 커졌다 작아지며 «숨 쉬게» 했는데 폰에서는 떨림으로 보였다.
   들어올 때 톡 튀는 것(.stage-in.go)은 그대로 */
@keyframes popin-tilt{
  0%{ opacity:0; transform:translateY(-14px) rotate(-16deg) scale(.8); }
  100%{ opacity:1; transform:translateY(0) rotate(-4deg) scale(1); }
}
@keyframes stampin{
  0%{ opacity:0; transform:scale(2) rotate(-18deg); }
  100%{ opacity:1; transform:scale(1) rotate(-3deg); }
}

/* 문항 공통 ------------------------------------------------------------
   JH 9/22 «너무 빨리 지나간다, 부드럽게. 그렇다고 답답하게는 말고». 누르고 → 고른 게 톡(나머지는 물러남) →
   0.3초 보고 → 0.3초에 빠지고 → 0.5초에 튕겨 들어온다. 시간 값은 app.js PACE 와 짝이다. */
.qblock{ transition:transform .3s var(--out), opacity .26s ease; }
.qblock.out{ transform:translateX(-34px) rotate(-1.5deg); opacity:0; }
.qblock.enter{ animation:qin .52s var(--spring) backwards; }
@keyframes qin{
  0%{ opacity:0; transform:translateX(34px) scale(.96); }
  100%{ opacity:1; transform:translateX(0) scale(1); }
}
/* 선택지는 조금씩 늦게 톡톡 올라온다 */
.qblock.enter .opt, .qblock.enter .tile, .qblock.enter .seat, .qblock.enter .sbtn{
  animation:popin .5s var(--spring) backwards;
  animation-delay:calc(.16s + var(--i, 0) * .07s);
}
/* 고른 순간: 고른 건 톡 튀고, 나머지는 한 발 물러난다.
   들어올 때 건 애니메이션(fill both)이 남아 있으면 투명도가 안 먹어서 먼저 뗀다. */
.qblock.picked .opt, .qblock.picked .tile, .qblock.picked .skip, .qblock.picked .seat,
.qblock.picked .sbtn, .qblock.picked .replies.in .reply{
  animation:none; opacity:1;
  transition:opacity .25s ease, transform .25s var(--out);
}
.qblock.picked .opt:not(.chosen), .qblock.picked .tile:not(.chosen), .qblock.picked .skip:not(.chosen),
.qblock.picked .replies.in .reply:not(.chosen), .qblock.picked .sbtn:not(.chosen), .qblock.picked .seat:not(.chosen){
  opacity:.38; transform:scale(.97);
}
.qblock.picked .opt.chosen, .qblock.picked .tile.chosen, .qblock.picked .skip.chosen,
.qblock.picked .replies.in .reply.chosen, .qblock.picked .sbtn.chosen, .btn.chosen{ animation:chosen .42s var(--spring) both; }
.qblock.picked .seat.chosen{ animation:seatpop .42s var(--spring) both; }
@keyframes chosen{
  0%{ transform:translate(2px,2px) scale(.97); }
  55%{ transform:translate(0,0) scale(1.045); }
  100%{ transform:translate(0,0) scale(1); }
}
@keyframes seatpop{ 0%{ transform:scale(.8); } 60%{ transform:scale(1.22); } 100%{ transform:scale(1); } }

.qart{ margin:8px 0 0; padding:0; overflow:hidden; line-height:0; }
.qart img{
  display:block; width:100%; height:auto; aspect-ratio:4/3;
  object-fit:cover; background:var(--paper);
}
.q{
  font-size:20px; font-weight:600; line-height:1.4;
  margin:14px 0 16px; white-space:pre-line; word-break:keep-all;
  text-align:center; min-height:28px;
}
.opts{ display:flex; flex-direction:column; gap:10px; }
.opt{
  display:flex; align-items:center;
  width:100%; min-height:62px; text-align:left;
  border:var(--line) solid var(--ink); border-radius:var(--r-card);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-body); font-size:16.5px; font-weight:600; line-height:1.4;
  padding:14px 16px;
  box-shadow:var(--shadow);
  cursor:pointer; word-break:keep-all;
}
.opt.on{ background:var(--ink); color:var(--paper); }
/* «셋 다 아닌데». 답이 아니라 빠져나가는 길이라 답 카드보다 약하게 둔다. 글자만큼만 넓다. */
.skip{
  display:flex; align-items:center; justify-content:center;
  margin:14px auto 0; min-height:44px; padding:0 22px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:transparent; color:var(--ink);
  font-family:var(--font-body); font-size:15px; font-weight:600;
  cursor:pointer; text-align:center;
}
.skip.on{ background:var(--ink); color:var(--paper); }
.hint-line{ font-size:17px; text-align:center; margin:12px 0 0; opacity:.78; }
.hint-line.top{ margin:-6px 0 12px; }

.back{
  display:block; margin:18px auto 0;
  background:none; border:0; padding:8px 12px;
  font-family:var(--font-hand); font-weight:700; font-size:18px;
  color:var(--ink); opacity:.72; cursor:pointer;
}

/* 그림 칸(그림 고르기 · 담기 · 순서) ------------------------------------ */
.tiles{ display:grid; gap:10px; }
.tiles.four{ grid-template-columns:repeat(2, 1fr); }
.tiles.six{ grid-template-columns:repeat(3, 1fr); gap:8px; }
.tile{
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  min-width:0; padding:8px 8px 10px;
  border:var(--line) solid var(--ink); border-radius:var(--r-card);
  background:var(--paper); color:var(--ink);
  box-shadow:var(--shadow); cursor:pointer;
  font-family:var(--font-body);
}
.tile-img{
  display:block; width:100%; height:auto; aspect-ratio:1/1; object-fit:cover;
  border-radius:12px; border:var(--line) solid var(--ink); background:var(--paper);
}
.tile-ico{ display:block; width:62px; height:62px; object-fit:contain; margin-top:4px; }
.tiles.four .tile-ico{ width:78px; height:78px; }
.tile-cap{ font-size:14px; font-weight:700; line-height:1.3; text-align:center; word-break:keep-all; }
.tiles.six .tile-cap{ font-size:13px; }
.tile.on{ background:var(--ink); color:var(--paper); transform:translate(2px,2px); box-shadow:0 0 0 0 var(--ink); }
.tile.on .tile-ico{ filter:none; }
/* 담기에서 고른 칸은 체크 딱지 */
.tiles.six .tile.on::after{
  content:''; position:absolute; top:-8px; right:-8px;
  width:24px; height:24px; border-radius:50%;
  background:var(--lemon) no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E1B2E' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  border:var(--line) solid var(--ink);
  animation:pip .3s var(--spring) both;
}
/* 순서 번호 */
.rank-badge{
  position:absolute; top:-9px; left:-9px; z-index:1;
  width:30px; height:30px; border-radius:50%;
  display:grid; place-items:center;
  font-family:var(--font-display); font-size:17px; line-height:1;
  background:var(--lemon); color:var(--ink);
  border:var(--line) solid var(--ink);
  opacity:0; transform:scale(.4);
  transition:transform .3s var(--spring), opacity .15s ease;
}
.tile.on .rank-badge{ opacity:1; transform:scale(1); }

.basket{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:16px 0 0; padding:10px 14px;
  border:var(--line) dashed var(--ink); border-radius:var(--r-card);
  background:rgba(255,255,255,.55);
}
.basket.shake{ animation:shake .4s ease both; }
@keyframes shake{
  0%,100%{ transform:translateX(0); } 20%{ transform:translateX(-6px); } 40%{ transform:translateX(6px); }
  60%{ transform:translateX(-4px); } 80%{ transform:translateX(3px); }
}
.basket-t{ font-size:18px; }
.slots{ display:flex; gap:8px; }
.slot{
  width:46px; height:46px; border-radius:50%;
  border:var(--line) dashed var(--ink); background:var(--paper);
  display:grid; place-items:center; overflow:hidden;
}
.slot.full{ border-style:solid; background:var(--lemon); animation:pip .3s var(--spring) both; }
.slot-ico{ width:34px; height:34px; object-fit:contain; }
/* 담기: 그림이 날아오는 동안 칸은 비워 두고, 떨어지면 뽁 */
.slot.incoming{ background:var(--paper); border-style:dashed; animation:none; }
.slot.incoming .slot-ico{ opacity:0; }
.slot.landed{ animation:land .38s var(--spring) both; }
@keyframes land{ 0%{ transform:scale(1.3); } 60%{ transform:scale(.9); } 100%{ transform:scale(1); } }
.flyer{ position:fixed; z-index:35; margin:0; object-fit:contain; pointer-events:none; }
.rank-badge.pop{ animation:badgepop .45s var(--spring) both; }
@keyframes badgepop{ 0%{ opacity:1; transform:scale(1.9) rotate(-24deg); } 100%{ opacity:1; transform:scale(1) rotate(0); } }
.btn.go{ margin:14px 0 0; }
.btn.go.ready{ animation:ready .45s var(--spring) backwards; }
@keyframes ready{ 0%{ transform:scale(.94); } 100%{ transform:scale(1); } }
.go-row{ display:flex; align-items:center; gap:12px; margin:14px 0 0; }
.go-row .btn.go{ margin:0; flex:1 1 auto; }
.mini-link{
  flex:0 0 auto; background:none; border:0; padding:8px 6px; cursor:pointer;
  font-size:18px; color:var(--ink); text-decoration:underline; text-underline-offset:4px;
}

/* 밸런스 시소 ---------------------------------------------------------- */
.seesaw{ margin:6px 0 0; }
.poles{ display:grid; grid-template-columns:1fr auto 1fr; gap:8px; align-items:center; }
.pole{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 8px 14px; min-height:156px; justify-content:center;
  transition:transform .4s var(--spring), opacity .25s ease;
}
.pole-ico{ width:86px; height:86px; object-fit:contain; }
.pole-t{ font-size:15.5px; font-weight:700; line-height:1.35; text-align:center; word-break:keep-all; }
.pole.left.lean{ transform:translateY(-8px) rotate(-3deg); }
.pole.right.lean{ transform:translateY(-8px) rotate(3deg); }
.pole.far{ opacity:.5; }
.vs{
  width:38px; height:38px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--ink); color:var(--paper);
  font-family:var(--font-display); font-size:15px;
}
.rig{ position:relative; height:86px; margin:18px 4px 0; }
.plank{
  position:absolute; left:0; right:0; top:14px; height:44px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 2px;
  transform-origin:50% 50%;
  transition:transform .55s var(--spring);
}
/* 판자 = 잉크 막대 */
.plank::before{
  content:''; position:absolute; left:0; right:0; top:50%; height:12px; margin-top:-6px;
  background:var(--paper); border:var(--line) solid var(--ink); border-radius:8px;
  box-shadow:var(--shadow-sm);
}
.seat{
  position:relative; z-index:1;
  width:44px; height:44px; border-radius:50%;
  border:var(--line) solid var(--ink); background:var(--paper);
  box-shadow:var(--shadow-sm); cursor:pointer; padding:0;
}
.seat.mid{ width:36px; height:36px; }
.seat.on{ background:var(--ink); }
.seat.on::after{
  content:''; position:absolute; inset:9px; border-radius:50%; background:var(--lemon);
}
.fulcrum{
  position:absolute; left:50%; top:44px; width:0; height:0; margin-left:-16px;
  border-left:16px solid transparent; border-right:16px solid transparent;
  border-bottom:28px solid var(--ink);
}
.scale-words{
  display:flex; justify-content:space-between; align-items:center;
  margin:-8px 2px 0; font-size:16px; opacity:.72;
}
/* 무게가 실리면 시소 전체가 한 번 출렁 */
.rig.settle{ animation:settle .7s ease-out both; }
@keyframes settle{
  0%{ transform:translateY(0); } 22%{ transform:translateY(4px); } 46%{ transform:translateY(-2px); }
  70%{ transform:translateY(1px); } 100%{ transform:translateY(0); }
}

/* 공감 카드 ------------------------------------------------------------ */
/* 카드와 더미는 브라우저가 터치를 가져가지 못하게(touch-action:none). pan-y 였을 때는 엄지가 살짝만 비스듬해도
   위아래 움직임으로 넘어가 손이 풀렸다(9/23) */
.deck{ position:relative; height:318px; margin:4px 0 0; touch-action:none; }
.card-back{
  position:absolute; inset:14px 10px 0;
  border:var(--line) solid var(--ink); border-radius:22px; background:var(--paper);
}
.card-back.one{ transform:rotate(3deg) translateY(6px); opacity:.8; }
.card-back.two{ transform:rotate(-4deg) translateY(10px); opacity:.55; }
.swipe-card{
  position:absolute; inset:0 0 18px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  padding:22px 20px; border-radius:22px;
  touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; cursor:grab;
  transition:transform .38s var(--spring);
}
.swipe-ico{ width:112px; height:112px; object-fit:contain; pointer-events:none; }
.swipe-t{
  margin:0; font-size:21px; font-weight:700; line-height:1.42; text-align:center; word-break:keep-all;
}
.stamp-word{
  position:absolute; top:16px; z-index:2;
  padding:4px 12px 2px; border:3px solid var(--ink); border-radius:10px;
  font-family:var(--font-display); font-size:22px;
  opacity:0; pointer-events:none;
}
.stamp-word.no{ right:16px; transform:rotate(10deg); background:var(--slate); }
.stamp-word.yes{ left:16px; transform:rotate(-10deg); background:var(--lemon); }
.swipe-card.fly-r{ animation:fly-r .47s var(--out) forwards; }
.swipe-card.fly-l{ animation:fly-l .47s var(--out) forwards; }
.swipe-card.fly-d{ animation:fly-d .47s var(--out) forwards; }
.swipe-card.fly-r .stamp-word.yes, .swipe-card.fly-l .stamp-word.no,
.swipe-card.say-yes .stamp-word.yes, .swipe-card.say-no .stamp-word.no{ opacity:1; }
/* 날아가기는 app.js flyCard(손 뗀 자리에서 이어서). 아래 fly-* 는 그게 안 되는 옛 브라우저용 */
@keyframes fly-r{ 20%{ transform:translateX(-10px) rotate(-2deg); } to{ transform:translateX(135%) rotate(20deg); opacity:0; } }
@keyframes fly-l{ 20%{ transform:translateX(10px) rotate(2deg); } to{ transform:translateX(-135%) rotate(-20deg); opacity:0; } }
@keyframes fly-d{ 30%{ transform:scale(1.04); } to{ transform:translateY(40px) scale(.9); opacity:0; } }
/* 다음 카드는 더미에서 올라온다(화면이 통째로 바뀌지 않는다) */
/* 9/23 «너무 빠르다» 로 .5s → .62s, 튕김은 덜 세게 */
.qblock.deal .swipe-card{ animation:deal .62s cubic-bezier(.25,1.18,.45,1) backwards; }
.qblock.deal .card-back.one{ animation:shuffle .62s var(--out) backwards; }
@keyframes deal{
  0%{ opacity:.25; transform:translateY(22px) rotate(3deg) scale(.92); }
  100%{ opacity:1; transform:none; }
}
@keyframes shuffle{ 0%{ transform:rotate(-2deg) translateY(12px); } 100%{ transform:rotate(3deg) translateY(6px); } }

/* 밀라는 표시(JH 9/22 «옆으로 밀어야 되는지 모르겠다» → 9/23 «화살표가 밀라는 건지 탭하라는 건지 구별이 안 된다»).
   이 앱에서 테두리 + 딱딱한 그림자 = 누르는 것. 그래서 옆 표시는 테두리·그림자 없이 바깥으로 흘러가는 꺾쇠 셋 + 말(밀어서 잠금 해제처럼).
   처음 두 장은 손가락 스티커가 카드를 눌러 옆으로 끌었다 놓고(카드 흔들기와 같은 박자), 그 쪽 꺾쇠와 도장이 같이 반응한다. */
.deck .lane{
  position:absolute; top:40%; z-index:3;
  display:flex; flex-direction:column; align-items:center; gap:2px;
  pointer-events:none; transition:transform .25s var(--spring);
}
.deck .lane.l{ left:-3px; }
.deck .lane.r{ right:-3px; }
.chev{ display:block; width:46px; height:22px; }
.chev svg{ display:block; width:100%; height:100%; overflow:visible; }
.lane.l .chev svg{ transform:scaleX(-1); }
.chev path{ fill:none; stroke:var(--ink); stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; opacity:.2; }
.chev .c1{ animation:chev 1.5s ease-in-out infinite; }
.chev .c2{ animation:chev 1.5s ease-in-out .18s infinite; }
.chev .c3{ animation:chev 1.5s ease-in-out .36s infinite; }
@keyframes chev{ 0%, 70%, 100%{ opacity:.2; } 30%{ opacity:1; } }
.lane-word{
  font-style:normal; font-size:15px; line-height:1; white-space:nowrap;
  padding:3px 6px 2px; border-radius:var(--r-chip); background:var(--paper);
}
.deck.lean-r .lane.r{ transform:translateX(3px) scale(1.1); }
.deck.lean-l .lane.l{ transform:translateX(-3px) scale(1.1); }
.deck.lean-r .lane.r .chev path, .deck.lean-l .lane.l .chev path{ opacity:1; animation:none; }
/* 손가락 스티커: 카드 글자를 가리지 않게 아이콘 오른쪽 빈자리에서 */
.swipe-hand{
  position:absolute; z-index:4; left:calc(73% - 24px); top:calc(24% - 3px);
  width:54px; height:54px; pointer-events:none; opacity:0;
}
.swipe-hand .hand-svg{ display:block; width:100%; height:100%; overflow:visible; filter:drop-shadow(2px 2px 0 var(--ink)); }
.swipe-hand .hand-svg path{ fill:var(--paper); stroke:var(--ink); stroke-width:15; stroke-linejoin:round; paint-order:stroke fill; }
.swipe-hand .trail{ position:absolute; top:34%; width:26px; height:19px; overflow:visible; opacity:0; }
.swipe-hand .trail path{ fill:none; stroke:var(--ink); stroke-width:3; stroke-linecap:round; }
.swipe-hand .trail.r{ right:92%; }
.swipe-hand .trail.l{ left:92%; }
.deck.teach .swipe-hand{ animation:hand-drag 2.8s ease-in-out .7s infinite; }
.deck.teach .swipe-hand .trail.r{ animation:trail-r 2.8s ease-in-out .7s infinite; }
.deck.teach .swipe-hand .trail.l{ animation:trail-l 2.8s ease-in-out .7s infinite; }
@keyframes trail-r{ 0%, 5%, 15%, 100%{ opacity:0; } 8%, 12%{ opacity:1; } }
@keyframes trail-l{ 0%, 27%, 37%, 100%{ opacity:0; } 30%, 34%{ opacity:1; } }
@keyframes hand-drag{
  0%{ opacity:0; transform:translate(0, 10px) scale(1); }
  4%{ opacity:1; transform:translate(0, 0) scale(.86); }
  12%{ opacity:1; transform:translate(38px, 0) scale(.86); }
  17%{ opacity:1; transform:translate(38px, -4px) scale(1); }
  23%{ opacity:1; transform:translate(0, 0) scale(1); }
  27%{ opacity:1; transform:translate(0, 0) scale(.86); }
  34%{ opacity:1; transform:translate(-38px, 0) scale(.86); }
  39%{ opacity:1; transform:translate(-38px, -4px) scale(1); }
  46%, 100%{ opacity:0; transform:translate(0, 10px) scale(1); }
}
.deck.lean-r .swipe-card{ background:color-mix(in srgb, var(--lemon) 40%, var(--paper)); }
.deck.lean-l .swipe-card{ background:color-mix(in srgb, var(--slate) 45%, var(--paper)); }
.deck.teach .swipe-card{ animation:nudge 2.8s ease-in-out .7s infinite; }
.deck.teach .stamp-word.yes{ animation:nudge-yes 2.8s ease-in-out .7s infinite; }
.deck.teach .stamp-word.no{ animation:nudge-no 2.8s ease-in-out .7s infinite; }
.deck.teach .lane.r{ animation:poke-r 2.8s ease-in-out .7s infinite; }
.deck.teach .lane.l{ animation:poke-l 2.8s ease-in-out .7s infinite; }
@keyframes nudge{
  0%, 44%, 100%{ transform:none; }
  12%{ transform:translateX(38px) rotate(3.5deg); }
  24%{ transform:none; }
  34%{ transform:translateX(-38px) rotate(-3.5deg); }
}
@keyframes nudge-yes{ 0%, 24%, 100%{ opacity:0; } 10%, 14%{ opacity:.9; } }
@keyframes nudge-no{ 0%, 24%, 46%, 100%{ opacity:0; } 32%, 36%{ opacity:.9; } }
@keyframes poke-r{ 0%, 24%, 100%{ transform:none; } 12%{ transform:translateX(3px) scale(1.12); } }
@keyframes poke-l{ 0%, 24%, 46%, 100%{ transform:none; } 34%{ transform:translateX(-3px) scale(1.12); } }
/* 날아가기는 «더미에서 올라오기»·«흔들며 가르치기» 보다 늘 이긴다. 전에는 둘째 카드부터 이 둘에 막혀
   손가락을 안 따라오고 날아가지도 않았다(9/23 audit_ui.mjs 로 찾음). 올라오기·흔들기는 fill 을 backwards 로 둔다. */
.qblock .deck .swipe-card.fly-r{ animation:fly-r .47s var(--out) forwards; }
.qblock .deck .swipe-card.fly-l{ animation:fly-l .47s var(--out) forwards; }
.qblock .deck .swipe-card.fly-d{ animation:fly-d .47s var(--out) forwards; }

.swipe-btns{ display:grid; grid-template-columns:1fr .8fr 1fr; gap:8px; margin:6px 0 0; }
.sbtn{
  min-height:54px; padding:6px 8px;
  display:flex; align-items:center; justify-content:center; gap:5px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-display); font-size:17px; line-height:1.15;
  box-shadow:var(--shadow); cursor:pointer; word-break:keep-all;
}
.sbtn .arr{ display:inline-block; font-size:18px; line-height:1; }
.deck.teach + .swipe-btns .s2 .arr{ animation:arr-r 1.4s ease-in-out infinite; }
.deck.teach + .swipe-btns .s0 .arr{ animation:arr-l 1.4s ease-in-out infinite; }
@keyframes arr-r{ 0%, 100%{ transform:none; } 50%{ transform:translateX(4px); } }
@keyframes arr-l{ 0%, 100%{ transform:none; } 50%{ transform:translateX(-4px); } }
.sbtn.s0{ background:var(--slate); }
.sbtn.s2{ background:var(--lemon); }
.sbtn.on{ background:var(--ink); color:var(--paper); }

/* 카톡 ----------------------------------------------------------------- */
.chatwin{ margin:6px 0 0; padding:0; overflow:hidden; }
.chat-head{
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; border-bottom:var(--line) solid var(--ink);
  background:var(--paper);
}
.avatar{
  width:40px; height:40px; border-radius:14px; overflow:hidden; flex:0 0 auto;
  border:var(--line) solid var(--ink);
}
.avatar-img{ width:100%; height:100%; object-fit:cover; object-position:50% 12%; transform:scale(1.5) translateY(14%); }
.chat-from{ font-family:var(--font-display); font-size:18px; }
.chat-log{
  display:flex; flex-direction:column; gap:8px;
  min-height:116px; padding:14px 14px 16px;
  background:var(--slate);
}
.bubble{
  max-width:82%; padding:10px 14px;
  border:var(--line) solid var(--ink); border-radius:18px;
  font-size:16px; font-weight:600; line-height:1.42; word-break:keep-all;
  animation:bubble .34s var(--spring) both;
}
.bubble.them{ align-self:flex-start; background:var(--paper); border-top-left-radius:6px; }
.bubble.me{ position:relative; align-self:flex-end; background:var(--lemon); border-top-right-radius:6px; }
/* 카톡의 안 읽은 «1». 노란 숫자가 말풍선 왼쪽 아래에 떴다가 읽으면 사라진다 */
.bubble .read{
  position:absolute; left:-17px; bottom:1px;
  font-family:var(--font-display); font-size:14px; line-height:1;
  color:#E0A100;
  transition:opacity .25s ease, transform .25s var(--out);
}
.bubble .read.gone{ opacity:0; transform:scale(.3); }
/* 영어는 iMessage 처럼 말풍선 밑에 Delivered → Read */
html[lang="en"] .bubble.me{ margin-bottom:16px; }
html[lang="en"] .bubble .read{
  left:auto; right:4px; bottom:-19px;
  font-family:var(--font-body); font-size:11.5px; font-weight:700; color:var(--ink); opacity:.62;
}
.qblock.sent .chat-prompt{ opacity:.3; transition:opacity .3s ease; }
/* 카톡 입력칸(9/23 «실시간으로 타이핑하는 느낌»): 고른 답장이 여기서 한 글자씩 쳐지고 노란 «전송» 이 눌린다 */
.chat-compose{
  display:flex; align-items:flex-end; gap:8px;
  padding:8px 10px; border-top:var(--line) solid var(--ink); background:var(--paper);
}
.cc-field{
  flex:1 1 auto; min-width:0; min-height:36px;
  padding:7px 12px 6px; border:var(--line) solid var(--ink); border-radius:18px;
  background:var(--page);
  font-size:15px; font-weight:600; line-height:1.4; word-break:keep-all;
}
.cc-ph{ opacity:.42; font-weight:500; }
.cc-field.on .cc-ph{ display:none; }
.cc-caret{ display:none; width:2px; height:1.05em; margin-left:1px; background:var(--ink); vertical-align:-2px; }
.cc-field.on .cc-caret{ display:inline-block; animation:blink .9s steps(2, start) infinite; }
@keyframes blink{ to{ visibility:hidden; } }
.cc-send{
  flex:0 0 auto; margin-bottom:1px;
  padding:7px 12px 5px; border:var(--line) solid var(--ink); border-radius:14px;
  background:var(--paper); font-family:var(--font-display); font-size:15px; line-height:1.3;
  opacity:.4; transition:opacity .2s ease, background-color .2s ease, transform .09s ease, box-shadow .09s ease;
}
.cc-send.ready{ opacity:1; background:var(--lemon); box-shadow:var(--shadow-sm); }
.cc-send.push{ transform:translate(2px, 2px); box-shadow:0 0 0 0 var(--ink); }
@keyframes bubble{
  0%{ opacity:0; transform:translateY(8px) scale(.9); }
  100%{ opacity:1; transform:translateY(0) scale(1); }
}
.bubble.typing{ display:flex; gap:5px; padding:14px 16px; }
.bubble.typing i{
  width:7px; height:7px; border-radius:50%; background:var(--ink); display:block;
  animation:dot 1s ease-in-out infinite;
}
.bubble.typing i:nth-child(2){ animation-delay:.15s; }
.bubble.typing i:nth-child(3){ animation-delay:.3s; }
@keyframes dot{ 0%,100%{ opacity:.25; transform:translateY(0); } 40%{ opacity:1; transform:translateY(-3px); } }
.chat-prompt{ font-size:19px; text-align:center; margin:16px 0 10px; opacity:0; }
.replies{ display:flex; flex-direction:column; align-items:flex-end; gap:9px; }
.reply{
  max-width:88%; min-height:48px; padding:11px 16px;
  border:var(--line) solid var(--ink); border-radius:18px; border-top-right-radius:6px;
  background:var(--lemon); color:var(--ink);
  font-family:var(--font-body); font-size:15.5px; font-weight:700; line-height:1.4; text-align:left;
  box-shadow:var(--shadow); cursor:pointer; word-break:keep-all;
  opacity:0;
}
.reply.on{ background:var(--ink); color:var(--paper); }
.chat-prompt.in{ opacity:1; animation:popin .36s var(--spring) backwards; }
.replies.in .reply{ opacity:1; animation:popin .4s var(--spring) backwards; animation-delay:calc(var(--i, 0) * .06s); }
.chat-skip{ margin-top:12px; }

/* 결과 뽑기 ------------------------------------------------------------ */
.reveal-screen{ text-align:center; padding-top:26px; cursor:pointer; user-select:none; }
.reveal-line{ font-size:24px; margin:0; }
.capsule-stage{ position:relative; height:300px; margin:24px 0 0; }
/* 캡슐 뒤 햇살. 캡슐이 열리면 천천히 돈다 */
.rays{
  position:absolute; left:50%; top:136px; width:520px; height:520px; margin:-260px 0 0 -260px;
  opacity:0; transform:scale(.6);
  transition:opacity .4s ease, transform .6s var(--spring);
  pointer-events:none;
}
.rays svg{ width:100%; height:100%; display:block; animation:spin 24s linear infinite; }
.capsule-stage.open .rays{ opacity:1; transform:scale(1); }
@keyframes spin{ to{ transform:rotate(360deg); } }
.capsule.cap-lg{
  position:absolute; left:50%; top:48px; width:176px; height:176px; margin-left:-88px;
  opacity:0;
}
.capsule.cap-lg .cap-top{ height:92px; border-width:4px; border-radius:88px 88px 0 0; transform-origin:12% 100%; }
.capsule.cap-lg .cap-bottom{ top:84px; height:92px; border-width:4px; border-radius:0 0 88px 88px; }
.capsule.cap-lg .cap-band{
  top:76px; height:26px; z-index:1; border-width:4px; border-radius:6px;
  display:grid; place-items:center; background:var(--paper);
}
.capsule.cap-lg .cap-band img{ width:112px; height:auto; display:block; }
.rv-char{
  position:absolute; left:50%; top:22px; width:220px; height:220px; margin-left:-110px;
  object-fit:contain; opacity:0; transform:scale(.3);
}
.burst{ position:absolute; left:50%; top:130px; width:1px; height:1px; }
.capsule-stage.drop .capsule.cap-lg{ animation:drop .8s var(--spring) both; }
.capsule-stage.wiggle .capsule.cap-lg{ opacity:1; animation:wiggle .9s ease-in-out both; }
.capsule-stage.open .capsule.cap-lg{ opacity:1; }
.capsule-stage.open .cap-top{ animation:lid .6s var(--out) forwards; }
.capsule-stage.open .cap-band{ animation:fade .3s ease forwards; }
.capsule-stage.open .cap-bottom{ animation:sink .6s var(--out) forwards; }
.capsule-stage.open .rv-char{ animation:popchar .7s var(--spring) .08s forwards; }
@keyframes drop{
  0%{ opacity:0; transform:translateY(-260px) rotate(-20deg); }
  60%{ opacity:1; }
  100%{ opacity:1; transform:translateY(0) rotate(0); }
}
@keyframes wiggle{
  0%,100%{ transform:rotate(0); }
  15%{ transform:rotate(-9deg); } 30%{ transform:rotate(8deg); }
  45%{ transform:rotate(-7deg); } 60%{ transform:rotate(6deg); } 75%{ transform:rotate(-3deg); }
}
@keyframes lid{ to{ transform:translate(-70px,-120px) rotate(-38deg); opacity:0; } }
@keyframes sink{ to{ transform:translateY(60px) scale(.9); opacity:0; } }
@keyframes fade{ to{ opacity:0; } }
@keyframes popchar{
  0%{ opacity:0; transform:scale(.3) translateY(40px); }
  100%{ opacity:1; transform:scale(1) translateY(0); }
}
.rv-you{ font-size:22px; margin:0; min-height:30px; }
.rv-name{ font-size:clamp(30px, 9.4vw, 38px); -webkit-text-stroke:7px var(--ink); margin:2px 0 0; min-height:44px; }
.rv-team{
  display:inline-block; margin:10px 0 0; padding:4px 14px 3px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--paper);
  font-family:var(--font-display); font-size:17px; box-shadow:var(--shadow-sm);
}
.rv-you:not(:empty), .rv-name:not(:empty), .rv-team:not(:empty){ animation:popin .5s var(--spring) both; }
.rv-name:not(:empty){ animation-delay:.12s; }
.rv-team:not(:empty){ animation-delay:.24s; }
.rv-team:empty{ display:none; }
.rv-skip{ font-size:16px; opacity:.6; margin:22px 0 0; }
/* 열리고 나면 «톡 눌러서 계속» 이 까딱까딱 */
.rv-skip.go{ opacity:1; font-size:18px; animation:nudge-down 1.1s ease-in-out infinite; }
@keyframes nudge-down{ 0%, 100%{ transform:translateY(0); } 50%{ transform:translateY(4px); } }

/* 내 답 스티커가 캡슐 둘레로 톡톡 → 캡슐로 쏙. 캡슐은 하나 삼킬 때마다 꿀꺽 */
.feed{ position:absolute; left:50%; top:136px; width:0; height:0; z-index:2; pointer-events:none; }
.feed-i{
  position:absolute; left:-27px; top:-27px; width:54px; height:54px;
  object-fit:contain; padding:5px;
  background:var(--paper); border:var(--line) solid var(--ink); border-radius:14px;
  box-shadow:var(--shadow-sm);
  opacity:0; transform:translate(var(--x), var(--y)) rotate(var(--r)) scale(.2);
}
.feed-i.photo{ object-fit:cover; padding:0; }
.feed.in .feed-i{ animation:feedin .46s var(--spring) both; animation-delay:calc(var(--k) * 55ms); }
.feed.suck .feed-i{ animation:suck .42s cubic-bezier(.55,0,.85,.35) both; animation-delay:calc(var(--k) * 45ms); }
.feed.gone{ display:none; }
@keyframes feedin{
  0%{ opacity:0; transform:translate(var(--x), var(--y)) rotate(var(--r)) scale(.2); }
  100%{ opacity:1; transform:translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
}
@keyframes suck{
  0%{ opacity:1; transform:translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  100%{ opacity:0; transform:translate(0, 0) rotate(0) scale(.2); }
}
.capsule-stage .capsule.cap-lg.gulp{ opacity:1; animation:gulp .3s var(--spring) both; }
@keyframes gulp{ 0%{ transform:scale(1); } 40%{ transform:scale(1.07, .93); } 100%{ transform:scale(1); } }

/* 화면 바꾸기: 누른 자리에서 다음 색 동그라미가 잉크 테두리를 두르고 퍼진다 → 막이 위로 걷힌다 */
.wipe{ position:fixed; inset:0; z-index:50; }
.wipe-blob{
  position:absolute; border-radius:50%;
  border:5px solid var(--ink);
  transform:scale(0);
  transition:transform .56s cubic-bezier(.65,0,.35,1);
}
.wipe-blob.grow{ transform:scale(1); }
.wipe-sheet{
  position:absolute; left:-12%; right:-12%; top:-4px; height:calc(100% + 64px);
  border-bottom:5px solid var(--ink);
  border-radius:0 0 50% 50% / 0 0 64px 64px;
}
.wipe.lift{ transform:translateY(calc(-100% - 76px)); transition:transform .52s cubic-bezier(.7,0,.3,1); }
/* 판을 깼을 때 가운데 뜨는 별 + «STAGE n 클리어!» */
.clear-badge{
  position:absolute; left:0; right:0; top:50%;
  display:flex; flex-direction:column; align-items:center; gap:12px;
  transform:translateY(-58%); padding:0 18px; text-align:center;
}
.cb-star{ width:124px; height:124px; overflow:visible; }
.cb-star path{ fill:var(--lemon); stroke:var(--ink); stroke-width:.62; stroke-linejoin:round; }
.cb-star .cb-shadow{ fill:var(--ink); stroke:none; }
.cb-text{ font-size:clamp(34px, 11vw, 46px); }
.clear-badge.in .cb-star{ animation:cbstar .62s var(--spring) both; }
.clear-badge.in .cb-text{ animation:popin .5s var(--spring) .14s both; }
@keyframes cbstar{ 0%{ transform:scale(0) rotate(-140deg); } 100%{ transform:scale(1) rotate(0); } }
.star-fly{ position:fixed; z-index:55; pointer-events:none; overflow:visible; }
.star-fly path{ fill:var(--lemon); stroke:var(--ink); stroke-width:.62; stroke-linejoin:round; }
.star-fly .cb-shadow{ fill:var(--ink); stroke:none; }

/* 색종이 비. 결과 캡슐이 열릴 때, 관심 있어요를 눌렀을 때 */
.rain{ position:fixed; inset:0; z-index:45; pointer-events:none; overflow:hidden; }
.rain i{
  position:absolute; top:-24px; width:11px; height:15px; display:block;
  border:var(--line) solid var(--ink); border-radius:3px;
  animation:rain var(--d) linear var(--delay) forwards;
}
@keyframes rain{ to{ transform:translate(var(--x), 112vh) rotate(var(--r)); } }

/* 결과 스토리 ---------------------------------------------------------
   한 장에 하나. 위 = 몇 장째(막대), 가운데 = 그림 한 덩어리, 아래 = 팀 캐릭터 대화창.
   JH 9/22 «글 줄줄이면 끈다». 그래서 가운데는 그림과 큰 글자만, 말은 대화창이 한 줄씩 한다. */
.story{
  display:flex; flex-direction:column;
  min-height:calc(100dvh - 92px);
  user-select:none; -webkit-user-select:none; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.story-top{ display:flex; align-items:center; gap:12px; }
.story-bars{ flex:1 1 auto; display:flex; gap:5px; }
.story-bars i{
  position:relative; flex:1 1 0; height:9px; display:block; overflow:hidden;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--paper);
}
.story-bars i.done{ background:var(--ink); }
.story-bars i.now::after{
  content:''; position:absolute; inset:0; background:var(--ink);
  transform-origin:0 50%; animation:barfill .7s var(--out) both;
}
@keyframes barfill{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
.story-skip{
  flex:0 0 auto; background:none; border:0; padding:6px 2px; cursor:pointer;
  font-size:17px; color:var(--ink); opacity:.72;
}
.story-stage{
  flex:1 1 auto;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
  padding:20px 0 34px;
  transition:transform .23s var(--out), opacity .2s ease;
}
.story-stage.out{ opacity:0; transform:translateX(-30px); }
.story-stage.in > *{ animation:popin .55s var(--spring) backwards; }
.story-stage.in > :nth-child(2){ animation-delay:.32s; }
.story-stage.in > :nth-child(3){ animation-delay:.46s; }
.story-stage.in > :nth-child(4){ animation-delay:.58s; }
.story-stage.in > :nth-child(5){ animation-delay:.68s; }

/* 대화창(게임 대화창). 왼쪽 위에 말하는 캐릭터 얼굴과 이름표 */
.dialog{
  position:relative; margin-top:auto;
  padding:26px 18px 18px;
  min-height:128px;
  background:var(--paper);
  border:var(--line) solid var(--ink); border-radius:20px;
  box-shadow:var(--shadow);
}
.dialog-face{
  position:absolute; left:14px; top:-34px;
  width:58px; height:58px; border-radius:50%; overflow:hidden;
  border:var(--line) solid var(--ink); box-shadow:var(--shadow-sm);
  animation:talk 2.2s ease-in-out infinite;
}
.face-img{ display:block; width:100%; height:100%; object-fit:cover; object-position:50% 12%; transform:scale(1.5) translateY(14%); }
@keyframes talk{ 0%, 100%{ transform:rotate(-3deg); } 50%{ transform:rotate(3deg) translateY(-2px); } }
.dialog-name{
  position:absolute; left:80px; top:-14px;
  padding:4px 12px 3px; border-radius:var(--r-chip);
  background:var(--ink); color:var(--paper);
  font-family:var(--font-display); font-size:14px; line-height:1.3; white-space:nowrap;
}
.dialog-text{
  margin:0; min-height:54px;
  font-size:19px; font-weight:700; line-height:1.46;
  white-space:pre-line; word-break:keep-all;
}
.dialog-tmi{ margin:10px 0 0; font-size:18px; line-height:1.3; opacity:0; word-break:keep-all; }
.dialog-tmi:empty{ display:none; }
.dialog-tmi.in{ animation:popin .45s var(--spring) both; }
.dialog-tmi::before{
  content:'TMI'; display:inline-block; margin:0 7px 0 0; padding:2px 7px 1px;
  font-family:var(--font-display); font-size:12px; letter-spacing:.04em;
  background:var(--lemon); border:var(--line) solid var(--ink); border-radius:8px;
  vertical-align:2px;
}
/* 다 말하면 오른쪽 아래 ▼ 가 까딱(누르면 다음) */
.dialog-next{
  position:absolute; right:16px; bottom:12px; width:0; height:0;
  border-left:8px solid transparent; border-right:8px solid transparent;
  border-top:10px solid var(--ink); opacity:0;
}
.dialog.ready .dialog-next{ opacity:1; animation:nudge-down .9s ease-in-out infinite; }

/* ①② 성향 카드 */
.trait-card{
  width:min(100%, 300px);
  display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:22px 18px 18px;
  transform:rotate(-2deg);
}
.story-stage.in > .trait-card{ animation-name:popin-tilt2; }
@keyframes popin-tilt2{
  0%{ opacity:0; transform:translateY(20px) rotate(-10deg) scale(.8); }
  100%{ opacity:1; transform:translateY(0) rotate(-2deg) scale(1); }
}
.trait-badge{
  width:96px; height:96px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--tc); border:var(--line) solid var(--ink); box-shadow:var(--shadow-sm);
}
.trait-badge svg{ width:52px; height:52px; }
.story-stage.in .trait-badge{ animation:wobble .9s var(--spring) .25s both; }
@keyframes wobble{ 0%{ transform:scale(.6) rotate(-20deg); } 60%{ transform:scale(1.08) rotate(6deg); } 100%{ transform:scale(1) rotate(0); } }
.trait-axis{ margin:8px 0 0; font-size:17px; opacity:.66; }
.trait-name{ font-size:clamp(34px, 11vw, 44px); }
.stars{ display:flex; gap:4px; margin:6px 0 0; }
.star{ display:block; }
.star svg{ display:block; width:24px; height:24px; overflow:visible; }
.star path{ fill:var(--paper); stroke:var(--ink); stroke-width:1.7; stroke-linejoin:round; }
.star.on path{ fill:var(--lemon); }
.story-stage.in .star.on{ animation:starpop .42s var(--spring) both; animation-delay:calc(.56s + var(--k) * .12s); }
@keyframes starpop{ 0%{ transform:scale(.2) rotate(-60deg); opacity:.3; } 100%{ transform:scale(1) rotate(0); opacity:1; } }

/* «네가 고른 답» 영수증 */
.receipt{
  position:relative;
  width:min(100%, 320px);
  display:flex; align-items:center; gap:12px;
  padding:12px 14px;
  background:var(--paper); border:var(--line) dashed var(--ink); border-radius:14px;
  transform:rotate(1.5deg);
}
.story-stage.in > .receipt{ animation:receipt .6s var(--spring) .42s backwards; }
@keyframes receipt{
  0%{ opacity:0; transform:translateY(34px) rotate(-5deg); }
  100%{ opacity:1; transform:translateY(0) rotate(1.5deg); }
}
.rc-ico{ width:50px; height:50px; flex:0 0 auto; object-fit:contain; display:block; }
.rc-ico.photo{ object-fit:cover; border:var(--line) solid var(--ink); border-radius:10px; }
.rc-glyph{ display:grid; place-items:center; border:var(--line) solid var(--ink); border-radius:12px; background:var(--lemon); }
.rc-glyph svg{ width:28px; height:28px; }
.rc-body{ min-width:0; flex:1 1 auto; }
.rc-label{ display:block; font-size:15px; opacity:.66; line-height:1.1; }
.rc-text{ margin:3px 0 0; font-size:15px; font-weight:700; line-height:1.38; word-break:keep-all; }
.receipt.chat .rc-text{
  display:inline-block; padding:7px 11px; border:var(--line) solid var(--ink);
  border-radius:14px; border-top-right-radius:5px; background:var(--lemon);
}
.rc-tag{
  position:absolute; top:-13px; right:-8px;
  padding:3px 9px 2px; border-radius:10px;
  background:var(--lemon); border:var(--line) solid var(--ink);
  font-family:var(--font-display); font-size:14px; transform:rotate(7deg);
}

/* ③ 내 모양(꽃). 꽃잎 길이 = 그 축 점수 */
.shape-box{ width:min(100%, 330px); }
.shape{ display:block; width:100%; height:auto; overflow:visible; }
.petal path{ stroke:var(--ink); stroke-width:2.6; stroke-linejoin:round; }
.petal.hot path{ stroke-width:3.6; }
.story-stage.in .petal{ transform:scale(0); animation:petal .62s var(--spring) forwards; animation-delay:calc(.22s + var(--k) * 75ms); }
@keyframes petal{ to{ transform:scale(1); } }
.shape-core{ stroke:var(--ink); stroke-width:2.6; }
.pl{ font-family:var(--font-display); font-size:17px; fill:var(--ink); opacity:.62; }
.pl.hot{ opacity:1; font-size:22px; }
.story-stage.in .pl{ animation:fadein .5s ease .95s both; }
@keyframes fadein{ from{ opacity:0; } }

/* ④ 성향 + 성향 = 팀 */
.equation{ width:100%; display:flex; align-items:center; justify-content:center; gap:6px; }
.eq-chip{ display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0; flex:0 1 auto; }
.eq-badge{
  width:62px; height:62px; border-radius:50%; display:grid; place-items:center;
  background:var(--tc); border:var(--line) solid var(--ink); box-shadow:var(--shadow-sm);
}
.eq-badge svg{ width:32px; height:32px; }
.eq-face{
  width:96px; height:96px; border-radius:50%; overflow:hidden;
  border:var(--line) solid var(--ink); box-shadow:var(--shadow);
}
.eq-img{ display:block; width:100%; height:100%; object-fit:contain; }
.eq-name{ font-size:16px; line-height:1.15; text-align:center; word-break:keep-all; max-width:92px; }
.eq-op{ font-size:30px; -webkit-text-stroke:6px var(--ink); margin:0 0 26px; }
.story-stage.in .equation > *{ animation:popin .5s var(--spring) backwards; }
.story-stage.in .equation > :nth-child(2){ animation-delay:.2s; }
.story-stage.in .equation > :nth-child(3){ animation-delay:.36s; }
.story-stage.in .equation > :nth-child(4){ animation-delay:.52s; }
.story-stage.in .equation > :nth-child(5){ animation:popbig .7s var(--spring) .7s backwards; }
@keyframes popbig{ 0%{ opacity:0; transform:scale(.3) rotate(-12deg); } 100%{ opacity:1; transform:scale(1) rotate(0); } }
.job-card{ width:100%; padding:14px 16px; }
.job-h{ margin:0; font-size:16px; opacity:.66; }
.job-t{ margin:4px 0 0; font-size:15px; font-weight:600; line-height:1.55; word-break:keep-all; }
.job-sub{ margin:10px 0 0; font-family:var(--font-display); font-size:16px; }
.close-chip{
  margin:0; padding:4px 13px 3px; font-size:16px;
  background:var(--paper); border:var(--line) solid var(--ink); border-radius:var(--r-chip);
}

/* ⑤ 관심 있어요 */
.ask-hero{ position:relative; width:190px; height:190px; display:grid; place-items:center; }
.ask-rays{
  position:absolute; left:-70px; top:-70px; width:330px; height:330px;
  animation:spin 26s linear infinite; pointer-events:none;
}
.ask-char{ position:relative; width:176px; height:176px; object-fit:contain; animation:float 3.2s ease-in-out infinite; }
.btn.big{ min-height:62px; font-size:21px; }
.ask-note{ margin:-4px 0 0; font-size:16px; text-align:center; opacity:.8; word-break:keep-all; }
.to-card{ min-height:50px; font-size:17px; }
.to-card.ready{ background:var(--ink); color:var(--paper); animation:ready .45s var(--spring) backwards; }

/* 반짝이 ---------------------------------------------------------------- */
.fx{ position:fixed; z-index:30; width:0; height:0; pointer-events:none; }
.spark{
  position:absolute; left:-9px; top:-9px; width:18px; height:18px; display:block;
  animation:spark .62s var(--out) forwards;
}
.spark svg{ width:100%; height:100%; display:block; }
@keyframes spark{
  0%{ transform:translate(0,0) scale(.3) rotate(0); opacity:1; }
  70%{ opacity:1; }
  100%{ transform:translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity:0; }
}

/* 결과 ---------------------------------------------------------------- */
.result{ padding-top:2px; }
/* 스토리에서 넘어오면 위에서부터 차례로 톡톡 */
.result.in > *{ animation:popin .5s var(--spring) backwards; }
.result.in > :nth-child(2){ animation-delay:.08s; }
.result.in > :nth-child(3){ animation-delay:.14s; }
.result.in > :nth-child(4){ animation-delay:.2s; }
.result.in > :nth-child(5){ animation-delay:.26s; }
.result.in > :nth-child(6){ animation-delay:.32s; }
.result.in > :nth-child(n+7){ animation-delay:.38s; }
.ask-box{ margin:16px 0 0; }
.ask-box .interest{ margin:0; }
.ask-box .ask-note{ margin:8px 0 0; font-size:15px; }
#r-try{ margin:16px 0 0; }
/* 내 모양 칸: 왼쪽 작은 꽃, 오른쪽 성향 둘 */
.shape-row{ display:flex; align-items:center; gap:14px; }
.shape-mini{ width:136px; flex:0 0 auto; }
.trait-chips{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:12px; }
.trait-chip{ display:flex; align-items:center; gap:10px; min-width:0; }
.tc-badge{
  width:44px; height:44px; flex:0 0 auto; border-radius:50%;
  display:grid; place-items:center;
  background:var(--tc); border:var(--line) solid var(--ink);
}
.tc-badge svg{ width:24px; height:24px; }
.tc-body{ min-width:0; }
.tc-name{ display:block; font-family:var(--font-display); font-size:18px; line-height:1.15; word-break:keep-all; }
.trait-chip .stars{ margin:3px 0 0; gap:2px; }
.trait-chip .star svg{ width:15px; height:15px; }
@media (max-width:360px){ .shape-mini{ width:118px; } }
details.acc .acc-body h3{ font-family:var(--font-display); font-weight:400; font-size:16px; margin:16px 0 0; }
details.acc .acc-body .tag{ margin:4px 0 0; font-size:17px; }
.result-hi{
  font-family:var(--font-display); font-size:22px; margin:0 0 12px;
}
.card-img{
  display:block; width:100%; height:auto; aspect-ratio:1080/1350;
  background:var(--paper); padding:0; border-radius:var(--r-card);
}
.hint{
  font-family:var(--font-hand); font-weight:700; font-size:17px;
  text-align:center; margin:12px 0 0;
}
.interest{ margin:16px 0 0; }
.interest.done{
  background:transparent; color:var(--ink);
  box-shadow:0 0 0 0 var(--ink);
  font-family:var(--font-hand); font-size:18px;
}
.interest.done:active{ transform:none; }

.tag{
  font-family:var(--font-display); font-size:19px; margin:22px 0 0; line-height:1.4;
}
.note{ font-size:15px; line-height:1.66; margin:10px 0 0; word-break:keep-all; }
.panel{
  padding:16px; margin:16px 0 0;
}
.panel h3{
  font-family:var(--font-display); font-size:17px; margin:0 0 8px; font-weight:400;
}
.chips{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.chip{
  display:inline-flex; align-items:center; gap:6px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  padding:8px 14px; font-size:14px; font-weight:700;
  background:var(--paper); box-shadow:var(--shadow-sm);
}
.chip-art{
  width:36px; height:36px; display:block; flex:0 0 auto;
  object-fit:contain; margin:-6px -2px -6px -6px;
}
.rank{ display:flex; flex-direction:column; gap:8px; margin:12px 0 0; }
.rank-row{ display:grid; grid-template-columns:76px 1fr 42px; gap:8px; align-items:center; }
.rank-name{ font-size:13.5px; font-weight:700; white-space:nowrap; }
html[lang="en"] .rank-row{ grid-template-columns:92px 1fr 42px; }
html[lang="en"] .rank-name{ white-space:normal; font-size:12px; line-height:1.18; }
.rank-bar{
  height:16px; border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); overflow:hidden;
}
.rank-in{ height:100%; }
.rank-pct{ font-size:13px; font-weight:700; text-align:right; font-variant-numeric:tabular-nums; }
.rank-row{ border:var(--line) solid transparent; border-radius:12px; padding:5px 7px; }
.rank-row.top{ border-color:var(--ink); font-weight:800; }
.rank-row.top .rank-name{ font-weight:800; }
.note.soft{ font-size:13.5px; opacity:.72; }
.dist{ max-width:560px; }
.rank-row.r4{ grid-template-columns:86px 1fr 48px 44px; }
.rank-row.irow{ grid-template-columns:86px 1fr 118px; }
.rank-row.irow .rank-pct{ font-size:12.5px; white-space:nowrap; text-align:left; }
.actions{ margin:22px 0 0; }
.link-share{
  display:block; margin:12px auto 0; background:none; border:0; padding:8px 12px;
  font-family:var(--font-hand); font-weight:700; font-size:17px; color:var(--ink);
  opacity:.75; cursor:pointer;
}
details.acc{ margin:10px 0 0; padding:0; overflow:hidden; }
details.acc summary{
  list-style:none; cursor:pointer; padding:14px 16px;
  font-family:var(--font-display); font-size:16px;
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
details.acc summary::-webkit-details-marker{ display:none; }
details.acc summary::after{ content:'+'; font-family:var(--font-display); font-size:20px; }
details.acc[open] summary::after{ content:'-'; }
details.acc .acc-body{ padding:0 16px 16px; font-size:14.5px; line-height:1.62; }
/* 모든 사역체: 캐릭터 얼굴 + 팀 + 캐릭터 이름 + 한 줄. 내 결과 팀은 팀 색 바탕 + «내 결과» 딱지 */
.team-list{ display:flex; flex-direction:column; gap:8px; }
.team-row{
  position:relative; display:flex; align-items:center; gap:12px;
  padding:8px 10px; border:var(--line) solid transparent; border-radius:16px;
}
.team-row.mine{ background:var(--tc); border-color:var(--ink); box-shadow:var(--shadow-sm); }
.team-face{
  width:48px; height:48px; flex:0 0 auto; overflow:hidden;
  border-radius:50%; border:var(--line) solid var(--ink);
}
.team-face-img{ display:block; width:100%; height:100%; object-fit:cover; object-position:50% 12%; transform:scale(1.4) translateY(12%); }
.team-row-txt{ min-width:0; display:flex; flex-direction:column; gap:1px; }
.team-row-top{ display:flex; flex-wrap:wrap; align-items:baseline; column-gap:6px; }
.team-row-name{ font-family:var(--font-display); font-size:17px; line-height:1.25; }
.team-row-mascot{ font-size:15px; line-height:1.2; opacity:.72; }
.team-row-tag{ font-size:14px; font-weight:600; line-height:1.4; word-break:keep-all; }
.team-row-me{
  position:absolute; top:-10px; right:10px;
  padding:2px 9px 1px; border-radius:var(--r-chip);
  background:var(--ink); color:var(--paper);
  font-family:var(--font-display); font-size:12.5px; line-height:1.4;
}
/* 맨 아래 서명. 교회 글자 한 줄 */
.signoff{ margin:30px 0 4px; display:flex; justify-content:center; opacity:.8; }
.signoff img{ display:block; width:120px; height:auto; }

/* 토스트 --------------------------------------------------------------- */
.toast{
  position:fixed; left:50%; bottom:22px; transform:translateX(-50%);
  /* left:50% 만 두면 글자 칸이 화면 반폭(360폭에서 180px)에 갇혀 두세 줄로 꺾였다(9/29 브금 알림에서 발견). 글자만큼 넓히고 꺾을 땐 낱말 사이에서 */
  width:max-content; max-width:min(92vw, 394px); word-break:keep-all; overflow-wrap:anywhere; text-wrap:balance;
  background:var(--ink); color:var(--paper);
  border-radius:var(--r-btn); padding:13px 18px;
  font-family:var(--font-hand); font-weight:700; font-size:17px;
  text-align:center; z-index:40; box-shadow:4px 4px 0 rgba(30,27,46,.28);
}
.toast[hidden]{ display:none; }

/* 리더 보고서 ---------------------------------------------------------- */
.report{ max-width:1180px; margin-inline:auto; padding:22px 18px 60px; background:var(--page); min-height:100dvh; }
.report .display{ font-size:32px; -webkit-text-stroke:4px var(--ink); }
.gate{ max-width:340px; margin:60px auto 0; }
.gate .sub{ text-align:center; margin:10px 0 18px; }
.tools{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:18px 0 0; }
.select, .search{
  min-height:44px; border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); font-family:var(--font-body); font-size:15px; font-weight:600;
  padding:8px 12px; color:var(--ink); box-shadow:2px 2px 0 var(--ink);
}
.select{ flex:0 0 auto; }
.search{ flex:1 1 130px; min-width:0; }
/* 걸개 하나. 켜져 있으면 잉크로 차서 지금 걸려 있다는 게 한눈에 보인다 */
.check{
  display:inline-flex; align-items:center; gap:8px;
  min-height:44px; padding:8px 14px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-body); font-size:14.5px; font-weight:600;
  box-shadow:2px 2px 0 var(--ink); cursor:pointer; white-space:nowrap;
}
.check input{ width:18px; height:18px; margin:0; accent-color:var(--ink); cursor:pointer; }
.check.on{ background:var(--ink); color:var(--paper); }

.mini{
  min-height:44px; border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--ink); color:var(--paper); font-family:var(--font-display); font-size:15px;
  padding:8px 16px; box-shadow:2px 2px 0 var(--ink); cursor:pointer;
}
.mini.light{ background:var(--paper); color:var(--ink); }
.tally{ display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.tally .chip{ font-size:13.5px; }
.tablewrap{ margin:18px 0 0; overflow-x:auto; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); box-shadow:var(--shadow); }
table{ border-collapse:collapse; width:100%; min-width:880px; font-size:13.5px; }
th, td{ padding:9px 10px; text-align:left; border-bottom:var(--line) solid rgba(30,27,46,.14); white-space:nowrap; }
th{ font-family:var(--font-display); font-weight:400; font-size:13.5px; background:var(--page); position:sticky; top:0; }
tbody tr:last-child td{ border-bottom:0; }
/* 남는 폭은 칸 하나가 먹는다. 안 그러면 시간 칸만 늘어져서 표가 헐렁해 보인다.
   어느 칸이 먹을지는 표마다 다르다(명단은 1순위, 목장별은 팀 칩). */
.zbars{ display:flex; gap:3px; align-items:flex-end; height:22px; }
.zbar{ width:7px; background:var(--ink); border-radius:2px 2px 0 0; min-height:2px; }
.empty{ font-family:var(--font-hand); font-weight:700; font-size:18px; padding:28px 16px; text-align:center; }
.legend{ font-size:13px; opacity:.7; margin:8px 2px 0; line-height:1.5; }

/* 리더 보고서: 세 칸 -------------------------------------------------- */
.tabs{ display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 0; }
.tab{
  min-height:46px; padding:8px 22px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-display); font-size:17px;
  box-shadow:var(--shadow); cursor:pointer;
}
.tab.on{ background:var(--ink); color:var(--paper); }
.pane{ margin:22px 0 0; }
.pane[hidden]{ display:none !important; }
.pane-title{ font-family:var(--font-display); font-weight:400; font-size:23px; margin:0; }
.pane-sub{ font-size:14px; opacity:.78; margin:6px 0 0; line-height:1.55; word-break:keep-all; }

/* 누를 수 있는 줄. 이름에 밑줄을 그어서 눌러도 되는 줄이라는 걸 보인다 */
.prow{ cursor:pointer; }
.prow:hover td, .prow:focus-visible td{ background:var(--lemon); }
.cell-name{ font-weight:800; }
.cell-name .nm{ text-decoration:underline; text-underline-offset:3px; }
/* 영어로 테스트한 사람. 이름 옆에 작게 붙는다 */
.enchip{
  display:inline-block; margin-left:6px; padding:0 6px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  font-size:11px; font-weight:800; line-height:1.5; vertical-align:1px;
}
/* 명단의 «관심» 딱지. 줄 높이를 밀지 않게 칩보다 조금 작다 */
.ichip{ padding:4px 10px; font-size:12.5px; box-shadow:2px 2px 0 var(--ink); }
#p-list th:nth-child(4), #p-list td:nth-child(4){ width:100%; }
.search{ max-width:260px; }

/* 한 사람 보기(서랍) --------------------------------------------------- */
.drawer-back{ position:fixed; inset:0; background:rgba(30,27,46,.38); z-index:11; }
.drawer-back[hidden]{ display:none !important; }
.drawer{
  position:fixed; top:0; right:0; z-index:12;
  width:min(470px, 100%); height:100dvh; overflow-y:auto;
  background:var(--page); border-left:var(--line) solid var(--ink);
  padding:18px 18px calc(40px + env(safe-area-inset-bottom));
}
.drawer[hidden]{ display:none !important; }
@media (max-width:720px){
  .drawer{ width:100%; border-left:0; }
}
.drawer-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.drawer-name{ font-family:var(--font-display); font-weight:400; font-size:25px; margin:0; }
.drawer-meta{ font-size:13.5px; opacity:.76; margin:4px 0 0; }
.dclose{
  flex:0 0 auto; min-height:40px; padding:6px 16px;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-display); font-size:15px;
  box-shadow:2px 2px 0 var(--ink); cursor:pointer;
}
.dtop .dtype{ font-family:var(--font-display); font-size:21px; margin:4px 0 0; }
.dtop .dsub{ font-size:15px; font-weight:700; margin:10px 0 0; }
.drawer .panel{ margin:14px 0 0; }
.rank-row.out .rank-name{ opacity:.6; }

/* z 막대. 0 이 가운데라서 좌우로 뻗는다 */
.zline{ margin:10px 0 0; }
.zline-head{ display:flex; align-items:baseline; gap:8px; font-size:13.5px; }
.zline-head b{ flex:0 0 auto; font-size:14.5px; }
.zmean{ flex:1 1 auto; min-width:0; opacity:.72; font-size:12.5px; word-break:keep-all; }
.znum{ flex:0 0 auto; font-weight:800; font-variant-numeric:tabular-nums; }
.dbar{
  position:relative; height:14px; margin:4px 0 0;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); overflow:hidden;
}
.dbar::before{ content:''; position:absolute; left:50%; top:0; bottom:0; width:2px; background:rgba(30,27,46,.3); }
.dbar i{ position:absolute; top:0; bottom:0; background:var(--ink); }

/* 사실 문항 */
.facts{ display:flex; flex-direction:column; gap:6px; margin:10px 0 0; }
.fact-row{ display:flex; gap:10px; align-items:baseline; font-size:14.5px; }
.fact-name{ flex:0 0 76px; font-weight:700; opacity:.72; }
.fact-val{ font-weight:800; }

/* 답 전체 */
.agroup{
  font-family:var(--font-display); font-size:15px; margin:16px 0 0;
  border-bottom:var(--line) solid var(--ink); padding:0 0 4px;
}
.alist{ display:flex; flex-direction:column; gap:10px; margin:10px 0 0; }
.aitem .aq{ font-size:13.5px; opacity:.76; margin:0; line-height:1.45; word-break:keep-all; }
.aitem .apick{ font-size:14.5px; font-weight:700; margin:2px 0 0; line-height:1.45; word-break:keep-all; }
.aitem .apick.none{ opacity:.6; font-weight:600; }

/* 통계 ---------------------------------------------------------------- */
.bigrow{ display:flex; flex-wrap:wrap; gap:12px; margin:18px 0 0; }
.bignum{
  flex:1 1 150px; min-width:0; padding:14px 16px; background:var(--paper);
  display:flex; flex-direction:column; gap:2px;
}
.bignum strong{ font-family:var(--font-display); font-weight:400; font-size:30px; line-height:1.1; }
.bignum span{ font-size:12.5px; opacity:.74; line-height:1.4; word-break:keep-all; }
.stat2{ display:grid; gap:14px; margin:0; }
.stack{ display:flex; flex-direction:column; gap:14px; }
@media (min-width:980px){
  .stat2{ grid-template-columns:1fr 1fr; align-items:start; }
}
.stat2 .panel{ margin:14px 0 0; }
.stack .panel{ margin:0; }
.subline{ margin:12px 0 0; }
.subteam{ font-size:14px; font-weight:800; }
.chips.tight{ margin:6px 0 0; gap:6px; flex-wrap:nowrap; }
.chips.tight .chip{ padding:5px 10px; font-size:12.5px; box-shadow:2px 2px 0 var(--ink); white-space:nowrap; }
/* 목장별 표에서는 팀 칩 칸이 남는 폭을 먹는다 */
#p-stats .panel table th:nth-child(3), #p-stats .panel table td:nth-child(3){ width:100%; }
#p-stats .grid9 table th:nth-child(3), #p-stats .grid9 table td:nth-child(3){ width:auto; }
#p-stats .zline{ max-width:720px; }

/* 날짜별. 30칸이라 폰에서는 가로로 민다 */
.daywrap{ margin:12px 0 0; overflow-x:auto; }
.days{ display:flex; gap:3px; align-items:flex-end; min-width:560px; }
.day{ flex:1 1 0; display:flex; flex-direction:column; align-items:center; gap:3px; }
.day-n{ font-size:11px; font-weight:800; height:14px; font-variant-numeric:tabular-nums; }
.day-bar{
  width:100%; height:66px; display:flex; align-items:flex-end;
  border:var(--line) solid var(--ink); border-radius:4px; background:var(--paper); overflow:hidden;
}
.day-bar i{ width:100%; background:var(--ink); }
.day-d{ font-size:10.5px; opacity:.7; font-variant-numeric:tabular-nums; }

/* 팀 x 축 표 */
.grid9 table{ min-width:760px; }
td.num{ font-variant-numeric:tabular-nums; text-align:right; }
td.num.hi{ font-weight:800; background:rgba(30,27,46,.1); }
td.num.lo{ opacity:.5; }
.cell-team{ font-weight:800; }

/* 문항 ---------------------------------------------------------------- */
.qcard{ padding:14px 16px; margin:12px 0 0; background:var(--paper); }
.qcard.flag{ background:var(--lemon); }
.qcard-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.qcard-id{ display:flex; align-items:baseline; gap:8px; }
.qphase{
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  padding:2px 10px; font-size:12px; font-weight:700;
}
.qid{ font-size:12.5px; opacity:.6; font-variant-numeric:tabular-nums; }
.qseen{ font-size:12.5px; opacity:.74; white-space:nowrap; }
.qq{ font-size:16px; font-weight:700; margin:8px 0 0; line-height:1.45; word-break:keep-all; }
.qflag{ font-family:var(--font-hand); font-weight:700; font-size:16px; margin:8px 0 0; }
.orows{ display:flex; flex-direction:column; gap:6px; margin:10px 0 0; }
.orow{ display:grid; grid-template-columns:42px minmax(90px, 200px) 1fr; gap:10px; align-items:center; font-size:13.5px; }
.opct{ font-weight:800; text-align:right; font-variant-numeric:tabular-nums; }
.obar{
  height:12px; border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); overflow:hidden;
}
.obar i{ display:block; height:100%; background:var(--ink); }
/* «셋 다 아닌데» 는 답이 아니라 빠져나간 사람 수다. 줄 하나를 떼어서 구분한다 */
.orow.noans{ margin-top:3px; padding-top:7px; border-top:var(--line) solid rgba(30,27,46,.16); }
.orow.noans .otext, .orow.noans .opct{ opacity:.62; }
.otext{ word-break:keep-all; line-height:1.4; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
  .qblock.out, .qblock.enter{ transform:none; }
}

/* 소리 점검판(?snd=1 일 때만). 폰에서 소리가 안 날 때 원인을 화면으로 본다 */
.snd-probe{
  position:fixed; left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom, 0px)); z-index:9999; margin:0;
  padding:8px 10px; background:var(--ink); color:var(--paper); border-radius:10px;
  font:12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space:pre-wrap; pointer-events:none; opacity:.92;
}

/* =====================================================================
   화면 맞춤(9/23 JH, 여러 번에 걸쳐)
   «UI 가 전부 위로 쏠려 있고 아래가 너무 비었다, 컨트롤하기 불편» · «폰 크기가 다 다르니까 알아서 adaptive 하게, 큰 태블릿·데스크톱도»
   «카톡 브라우저에서 한 화면에 다 안 들어와서 스크롤해서 아래 단추를 눌러야 한다. 카톡 안에서 본다고 가정»
   «진행 지도가 위에 짱박혀 삐딱하다, 가운데로 · 점 네 개는 불필요, UI 는 무조건 심플 · 배치는 황금비로»
   «스테이지 1 은 아래로 내려와 있고 다른 스테이지는 위로 올라가 있다. 정렬을 전체적으로. 3분이든 5분이든 편안하게»

   문법 하나(모든 화면이 같다)
     위     = 지도(가운데) · 한 줄 이름. 문항 화면이면 질문도 늘 같은 자리(지도 바로 밑)
     가운데 = 그 판의 큰 것(그림·시소·카드·카톡 창·그림 칸·캐릭터 판·캡슐). 남는 높이 안에서 위 1 : 아래 1.618(황금비) 자리
     아래   = 답·단추(늘 같은 바닥 자리, 엄지가 닿는 곳)
   CSS order 로 줄 세운다: 1 위 · 2 위 빈칸(::before) · 3 가운데 · 4 아래 빈칸(::after) · 5 아래
   늘었다 줄었다 하는 것(장면 그림·스테이지 그림·카드 더미·카톡 창·캐릭터 판)은 빈칸보다 먼저 커지고(최대: 그림 38.2%, 카드·카톡 61.8%),
   모자라면 먼저 줄어서 단추는 늘 한 화면에 들어온다.
   판 높이 = 지금 실제로 보이는 높이(--app-h, app.js 가 window.innerHeight 로). 결과 정리 화면만 긴 글이라 아래로 흐른다.
   ===================================================================== */
:root{ --app-h:100svh; --u:calc(var(--app-h) / 100); }
.app{ min-height:var(--app-h); display:flex; flex-direction:column; }
html:not([data-screen="result"]) .app{ height:var(--app-h); }
/* 화면·문항 블록은 제 내용보다 작아지지 않는다(min-height:auto). 0 으로 두면 넘친 답이 밑의 «← 이전» 위로 겹쳤다(9/23) */
.app > .screen:not(.result){ flex:1 1 auto; display:flex; flex-direction:column; }
.story{ min-height:0; }

/* 맨 위: [EN] [지도(가운데)] [소리] / 밑 줄에 판 이름. 양옆 칸 폭을 같게 둬서 지도가 화면 정가운데에 선다 */
.topbar{
  flex:0 0 auto;
  display:grid; grid-template-columns:62px minmax(0, 1fr) 62px; align-items:center; column-gap:10px;
  grid-template-areas:"lang map snd" "label label label";
  margin:0 0 4px;
}
.topbar > .hud, .topbar > .top-btns{ display:contents; }
.hud > .map{ grid-area:map; width:100%; max-width:280px; justify-self:center; }
.hud > .hud-row{ grid-area:label; justify-content:center; margin:2px 0 0; }
.hud-label{ font-size:15px; text-align:center; }
.topbar .lang-pill{ grid-area:lang; justify-self:start; }
.topbar .snd-pill{ grid-area:snd; justify-self:end; }

/* 줄 세우기 공통 */
.cover::before, .cover::after,
.input-screen::before, .input-screen::after,
.stage-in::before, .stage-in::after,
.qblock::before, .qblock::after,
.reveal-screen::before, .reveal-screen::after{ content:''; flex:1 1 0; min-height:0; }
.cover::before, .input-screen::before, .stage-in::before, .qblock::before, .reveal-screen::before{ order:2; flex-grow:1; }
.cover::after, .input-screen::after, .stage-in::after, .qblock::after, .reveal-screen::after{ order:4; flex-grow:1.618; }

/* 그림 칸: 남는 높이만큼 늘고 줄고, 그림은 칸 안에서 4:3 그대로 */
.art-slot{
  container-type:size; min-width:0; align-self:stretch;
  display:flex; align-items:center; justify-content:center;
  flex:12 1 0; min-height:100px; max-height:calc(var(--u) * 38.2);
}
.art-slot > .qart, .art-slot > .stage-art{ flex:0 0 auto; margin:0; width:min(100%, calc(100cqh * 4 / 3)); }

/* 표지: 위 = 카리스 청년부·제목 / 가운데 = 캐릭터 판 / 아래 = 코스·설명·시작하기·참여 수 */
.cover > *{ order:5; }
.cover > .eyebrow, .cover > .cover-title{ order:1; }
.cover > .board{ order:3; flex:12 1 0; min-height:120px; max-height:calc(var(--u) * 38.2); margin:16px 0 12px; }
.board .cover-img{ width:auto; height:100%; max-width:100%; max-height:100%; object-fit:contain; }

/* 목장·이름: 위 = READY·제목·한 줄 / 가운데 = 목장 판 / 아래 = 이름·시작 */
.input-screen > *{ order:5; }
.input-screen > .ready-badge, .input-screen > .display, .input-screen > .in-how{ order:1; }
.input-screen > .tagbox{ order:3; }
.input-screen > .ready-badge{ align-self:center; }

/* 스테이지 카드: 위 = 도장·배지·제목·한 줄 / 가운데 = 그림 / 아래 = 가자 */
.stage-screen > .stage-in{ flex:1 1 auto; }
.stage-in > *{ order:1; }
.stage-in > .art-slot{ order:3; margin:12px 0; }
.stage-in > .btn{ order:5; }

/* 문항: 위 = 질문(늘 지도 바로 밑 같은 자리) / 가운데 = 그 판의 큰 것 / 아래 = 답 */
/* 줄어드는 건 «큰 것» 만. 질문·보기·단추는 제 키보다 작아지지 않는다(.q 의 min-height 28px 때문에 두 줄 질문이 한 줄로 눌려 그림에 겹쳤다) */
.qblock > *, .stage-in > *, .cover > *, .input-screen > *, .reveal-screen > *{ flex-shrink:0; }
.qblock > .art-slot, .qblock > .deck, .qblock > .chatwin, .stage-in > .art-slot, .cover > .board{ flex-shrink:1; }
#s-quiz > .qblock{ flex:1 1 auto; display:flex; flex-direction:column; }
.qblock > *{ order:5; }
.qblock > .q, .qblock > .hint-line.top{ order:1; }
.qblock > .q{ margin-top:6px; }
.qblock > .art-slot, .qblock > .seesaw, .qblock > .deck, .qblock > .chatwin, .qblock > .tiles{ order:3; }
.qblock > .art-slot{ margin:0 0 12px; }
/* 그림 고르기 네 칸은 높이에 맞춰 폭을 줄인다(칸마다 그림 밑 이름 줄이 있어서 네 칸 묶음 높이 ≈ 폭 × 1.09).
   담기 여섯 칸은 아이콘이 고정 크기라 폭을 줄여도 높이가 안 준다(이름이 더 접혀서 오히려 높아진다) → 키 작은 폰에서 아이콘을 줄인다(아래) */
.qblock[data-kind="image"] > .tiles.four{ align-self:center; width:min(100%, calc((var(--app-h) - 316px) * 0.92)); }
/* 질문 줄이 없는 판(카드·카톡)은 큰 것이 질문 자리(지도 바로 밑)에서 시작한다. 남는 건 큰 것 밑으로 */
.qblock[data-kind="swipe"]::before, .qblock[data-kind="chat"]::before{ flex-grow:0; }
/* 공감 카드: 더미가 남는 높이만큼(최대 61.8%). 아이콘·글자도 같이 */
.qblock[data-kind="swipe"] > .deck{ flex:12 1 0; height:auto; min-height:220px; max-height:calc(var(--u) * 61.8); }
.swipe-ico{ width:clamp(96px, calc(var(--u) * 15), 156px); height:auto; }
.swipe-t{ font-size:clamp(19px, calc(var(--u) * 2.8), 25px); }
/* 카톡: 창이 남는 높이만큼(최대 61.8%), 말풍선은 진짜 카톡처럼 입력칸 쪽(아래)에. 넘치면 오래된 말이 위로 가려진다 */
.qblock[data-kind="chat"] > .chatwin{ flex:12 1 0; min-height:236px; max-height:calc(var(--u) * 61.8); display:flex; flex-direction:column; }
.qblock[data-kind="chat"] .chat-log{ flex:1 1 auto; min-height:0; overflow:hidden; justify-content:flex-end; }
/* 시소: 두 보기 카드·그림이 화면 높이에 맞춰 */
.qblock[data-kind="slide"] > .q{ font-size:clamp(20px, calc(var(--u) * 3), 26px); }
.pole{ min-height:clamp(136px, calc(var(--u) * 21), 224px); }
.pole-ico{ width:clamp(72px, calc(var(--u) * 11.5), 124px); height:auto; aspect-ratio:1; }
.pole-t{ font-size:clamp(15px, calc(var(--u) * 2), 18px); }

/* 결과 뽑기: 위 = 한 줄 / 가운데 = 캡슐 / 아래 = 이름·팀·누르기 */
.reveal-screen > *{ order:5; }
.reveal-screen > .reveal-line{ order:1; }
.reveal-screen > .capsule-stage{ order:3; height:clamp(230px, calc(var(--u) * 40), 300px); margin:12px 0; }
.reveal-screen > .rv-team{ align-self:center; }

/* 넓은 폰 옆 여백(431~599px)은 판 색으로 */
@media (min-width:431px){
  html, body{ background-color:var(--bg, var(--sky)); transition:background-color .32s ease; }
}
/* 태블릿·데스크톱(600px~): 판을 가운데 세운 스티커 판으로. 바닥은 판 색 + 점무늬(스티커 시트 바닥처럼) */
@media (min-width:600px){
  :root{ --board-h:min(calc(var(--app-h) - 48px), 940px); --u:calc(var(--board-h) / 100); }
  body{
    min-height:var(--app-h);
    display:flex; flex-direction:column;
    padding:24px 20px;
    background-image:radial-gradient(circle, color-mix(in srgb, var(--ink) 13%, transparent) 1.5px, transparent 1.7px);
    background-size:24px 24px;
  }
  .app{
    width:min(100%, 520px); max-width:none; margin:auto;
    min-height:var(--board-h);
    padding:18px 22px 26px;
    border:var(--line) solid var(--ink); border-radius:30px; box-shadow:8px 8px 0 var(--ink);
  }
  html:not([data-screen="result"]) .app{ height:var(--board-h); }
  .qblock[data-kind="image"] > .tiles.four{ width:min(100%, calc((var(--board-h) - 330px) * 0.92)); }
}
/* 큰 태블릿(세로로 긴 아이패드): 판을 조금 더 크게, 읽는 글자도 한 단계 */
@media (min-width:760px) and (min-height:900px){
  :root{ --board-h:min(calc(var(--app-h) - 48px), 1000px); }
  .app{ width:min(100%, 580px); }
  .q{ font-size:23px; }
  .opt{ font-size:18px; min-height:68px; }
  .bubble{ font-size:17.5px; }
  .reply{ font-size:17px; }
  .chat-prompt, .hint-line{ font-size:19px; }
}

/* 높이별로 촘촘하게(카톡 인앱 키: 큰 아이폰 750 안팎 · 보통 660 안팎 · SE 550 안팎). 한 화면에 안 들어오면 장식부터 뺀다.
   목장 화면은 키 760 밑이면 READY·설명 한 줄을 빼고 제목을 한 줄로(390x664 에서 96px 넘쳐 «테스트 시작» 이 스크롤 밑이었다) */
@media (max-height:760px){
  /* READY·설명 한 줄은 이제 키로 빼지 않고 fitScreen 이 넘칠 때만 뺀다(v31) */
  .input-screen .display{ font-size:clamp(24px, 7.2vw, 30px); white-space:normal; }
  .tagbox.sticker{ margin-top:26px; padding:20px 10px 12px; }
  .mkbtn{ min-height:42px; }
  .name-box{ margin-top:32px; }
}
/* 키 700 밑: 결과 스토리(성향 카드·대화창)와 카톡 판을 조금 촘촘하게 */
@media (max-height:700px){
  .story-stage{ padding:8px 0 16px; gap:10px; }
  .trait-card{ padding:16px 14px 14px; }
  .trait-badge{ width:74px; height:74px; }
  .trait-badge svg{ width:42px; height:42px; }
  .trait-name{ font-size:clamp(28px, 9vw, 36px); }
  .dialog{ min-height:108px; padding:22px 16px 14px; }
  .dialog-text{ font-size:17.5px; min-height:48px; }
  .dialog-tmi{ font-size:16px; margin-top:6px; }
  .chat-head{ padding:8px 12px; }
  .avatar{ width:34px; height:34px; }
  .chat-compose{ padding:6px 8px; }
  .qblock[data-kind="chat"] > .chatwin{ min-height:196px; }
  .reply{ padding:10px 15px; min-height:44px; }
  .replies{ gap:8px; }
}
/* 키 640 밑(카톡 안 아이폰 SE): 표지는 코스 지도를 빼고 제목·캐릭터 판을 줄이고, 목장 칸은 더 낮게 */
@media (max-height:640px){
  .cover .display{ font-size:clamp(30px, 9.4vw, 38px); }
  .cover > .course{ display:none; }
  .cover > .board{ margin:12px 0 8px; padding:10px; }
  .input-screen .display{ font-size:clamp(23px, 7vw, 28px); }
  .tagbox.sticker{ margin-top:20px; padding:18px 10px 10px; }
  .mkbtn{ min-height:36px; }
  .mkgrid{ gap:7px; }
  .name-box{ margin-top:24px; }
  .err{ margin:4px 0; }
  .input{ min-height:48px; }
  .tiles.six{ gap:6px; }
  .tiles.six .tile{ padding:6px 4px 8px; gap:4px; }
  .tiles.six .tile-ico{ width:46px; height:46px; margin-top:2px; }
  .basket{ margin-top:8px; padding:6px 12px; }
  .slot{ width:40px; height:40px; }
  /* 목장 화면의 «← 처음으로» 는 넘칠 때 fitScreen 이 먼저 뺀다(v31) */
  #q-back{ margin-top:2px; padding:4px 12px; font-size:16px; }
  /* 카톡 판: 답장이 두 줄씩인 문항도 한 화면에(창은 가장 최근 말풍선이 보이는 데까지 줄어든다) */
  .qblock[data-kind="chat"] > .chatwin{ min-height:168px; }
  .reply{ font-size:14.5px; padding:8px 12px; min-height:40px; }
  .chat-prompt{ font-size:17px; margin:8px 0 6px; }
  .chat-skip{ margin-top:8px; }
  /* 결과 마지막 장(관심 있어요): 단추·대화창을 조금 낮게 */
  .story-stage{ padding:4px 0 10px; gap:8px; }
  .story-stage .btn{ min-height:50px; }
  .dialog{ min-height:96px; padding:20px 14px 12px; }
  .dialog-text{ font-size:17px; min-height:44px; }
  .stage-title{ font-size:clamp(28px, 8.6vw, 34px); margin-top:10px; }
  .stage-how{ font-size:18px; }
  /* 장면 문항(그림 + 질문 + 보기 넷 + 셋 다 아닌데)이 한 화면에: 보기를 조금 낮게, 질문 글자 한 단계, 그림은 작게까지 */
  .q{ font-size:18px; margin:2px 0 10px; }
  .opts{ gap:8px; }
  .opt{ min-height:50px; padding:9px 14px; font-size:15.5px; }
  .skip{ min-height:40px; margin-top:10px; }
  .qblock > .art-slot{ min-height:56px; margin-bottom:8px; }
  .reply{ min-height:44px; padding:9px 14px; }
  .replies{ gap:7px; }
  .chat-prompt{ margin:10px 0 8px; }
}

/* =====================================================================
   움직임 다시 맞춤(9/23 JH «애니메이션 좀 더 부드럽고 다양하게 넣어도 될 것 같다. 생각보다 짧아서 굳이 전부 빠르게 할 필요 없다.
   애니메이션까지 빠르면 정신없다»). 시간은 app.js PACE 와 같이 1.35~1.5배 느리게.
   튕김은 약하게(--soft), 멈출 때는 미끄러지듯(--glide). 판마다 들어오는 모양이 다르다:
   장면 = 그림이 떠오름 · 시소 = 두 카드가 양옆에서 · 카톡 = 폰 창이 아래서 · 카드 = 더미에서 · 칸 = 한 장씩 놓임.
   전부 fill backwards(끝나면 놓아 줌): fill both 는 눌림·끌기를 막는다(audit_ui 가 센다).
   ===================================================================== */
:root{ --soft:cubic-bezier(.25,1.2,.4,1); --glide:cubic-bezier(.16,1,.3,1); }

/* 문항 들고 나기: 빠질 때는 살짝 떠오르며 사라지고, 들어올 때는 판마다 다르게 */
.qblock{ transition:transform .42s var(--glide), opacity .38s ease; }
.qblock.out{ transform:translateY(-14px); opacity:0; }
.qblock.enter{ animation:qfade .5s ease backwards; }
@keyframes qfade{ from{ opacity:0; } to{ opacity:1; } }
.qblock.enter > .q, .qblock.enter > .hint-line.top{ animation:rise .75s var(--glide) .05s backwards; }
@keyframes rise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
.qblock.enter .opt, .qblock.enter .seat, .qblock.enter .sbtn{
  animation:popin .68s var(--soft) backwards;
  animation-delay:calc(.3s + var(--i, 0) * .09s);
}
/* 장면: 그림이 흐릿하게 떠올라 자리 잡는다 */
.qblock.enter > .art-slot > .qart{ animation:artin .9s var(--glide) .08s backwards; }
@keyframes artin{ from{ opacity:0; transform:translateY(10px) scale(.95) rotate(-1.2deg); } to{ opacity:1; transform:none; } }
/* 시소: 두 보기 카드가 양옆에서 들어와 가운데서 멈추고, 판은 위에서 살짝 내려앉는다 */
.qblock.enter[data-kind="slide"] .pole.left{ animation:fromleft .85s var(--soft) .12s backwards; }
.qblock.enter[data-kind="slide"] .pole.right{ animation:fromright .85s var(--soft) .22s backwards; }
.qblock.enter[data-kind="slide"] .vs{ animation:popin .6s var(--soft) .46s backwards; }
.qblock.enter[data-kind="slide"] .rig{ animation:dropin .85s var(--soft) .32s backwards; }
@keyframes fromleft{ from{ opacity:0; transform:translateX(-46px) rotate(-5deg); } to{ opacity:1; transform:none; } }
@keyframes fromright{ from{ opacity:0; transform:translateX(46px) rotate(5deg); } to{ opacity:1; transform:none; } }
@keyframes dropin{ from{ opacity:0; transform:translateY(-16px); } to{ opacity:1; transform:none; } }
/* 카톡: 폰 창이 아래에서 올라온다 */
.qblock.enter[data-kind="chat"] > .chatwin{ animation:phonein .9s var(--glide) backwards; }
@keyframes phonein{ from{ opacity:0; transform:translateY(46px) scale(.97); } to{ opacity:1; transform:none; } }
/* 공감 카드 첫 장: 더미에서 비스듬히 올라온다(다음 장부터는 .deal) */
.qblock.enter[data-kind="swipe"] .swipe-card{ animation:cardin .9s var(--soft) .1s backwards; }
@keyframes cardin{ from{ opacity:0; transform:translateY(30px) rotate(5deg) scale(.9); } to{ opacity:1; transform:none; } }
/* 칸(담기·순서·그림 고르기): 탁자에 한 장씩 놓이듯 */
.qblock.enter .tile{ animation:tilein .72s var(--soft) backwards; animation-delay:calc(.22s + var(--i, 0) * .085s); }
@keyframes tilein{ from{ opacity:0; transform:translateY(14px) scale(.86) rotate(-3deg); } to{ opacity:1; transform:none; } }
/* 고른 순간의 톡도 조금 느긋하게 */
.qblock.picked .opt, .qblock.picked .tile, .qblock.picked .skip, .qblock.picked .seat,
.qblock.picked .sbtn, .qblock.picked .replies.in .reply{ transition:opacity .34s ease, transform .34s var(--glide); }
.qblock.picked .opt.chosen, .qblock.picked .tile.chosen, .qblock.picked .skip.chosen,
.qblock.picked .replies.in .reply.chosen, .qblock.picked .sbtn.chosen, .btn.chosen{ animation:chosen .56s var(--soft) both; }

/* 화면 바뀌기(색 동그라미 → 막 걷기): PACE.wipe 760 · PACE.unwipe 700 과 같게 */
.wipe-blob{ transition:transform .76s cubic-bezier(.65,0,.35,1); }
.wipe.lift{ transition:transform .7s cubic-bezier(.7,0,.3,1); }

/* 스테이지 카드·표지·목장 화면이 차례로 들어오는 것도 느긋하게 */
.stage-in.go > *{ animation-duration:.72s; animation-timing-function:var(--soft); }
.stage-in.go > .clear-stamp{ animation-duration:.8s; animation-delay:.06s; }
.stage-in.go > .stage-badge{ animation-delay:.12s; }
.stage-in.go > .stage-title{ animation-delay:.22s; }
.stage-in.go > .stage-how{ animation-delay:.34s; }
.stage-in.go > .art-slot{ animation-delay:.44s; }
.stage-in.go > .btn{ animation-delay:.58s; }
.stage-in.leave > *{ animation-duration:.42s !important; }
.cover.go > *, .input-screen.go > *{ animation-duration:.7s; animation-timing-function:var(--soft); }
.cover.go > .cover-title{ animation-duration:.9s; animation-delay:.08s; }
.cover.go > .board{ animation-delay:.24s; }
.cover.go > .course{ animation-delay:.4s; }
.cover.go > .course-cap{ animation-delay:.5s; }
.cover.go > #go-input{ animation-delay:.62s; }
.cover.go > .count-chip{ animation-delay:.72s; }
.input-screen.go > .display{ animation-delay:.14s; }
.input-screen.go > .in-how{ animation-delay:.24s; }
.input-screen.go > .tagbox{ animation-delay:.34s; }
.input-screen.go > .name-box{ animation-delay:.46s; }
.input-screen.go > #go-quiz{ animation-delay:.56s; }
.input-screen.go > .back{ animation-delay:.66s; }
.story-stage.in > *{ animation-duration:.72s; }
@media (prefers-reduced-motion:reduce){
  .qblock.enter, .qblock.enter *, .stage-in.go > *, .cover.go > *, .input-screen.go > *{ animation:none !important; }
}

/* 키 600 밑(가장 작은 폰): 카톡 판은 «뭐라고 보낼래?» 줄을 빼고(입력칸과 노란 답장만으로 뜻이 보인다) 창이 더 줄어들게.
   가장 긴 답장(c14, 28자)이 세 줄이어도 한 화면에 들어오게 맞춤 */
@media (max-height:600px){
  .qblock[data-kind="chat"] .chat-prompt{ display:none; }
  .qblock[data-kind="chat"] > .chatwin{ min-height:140px; }
  .reply{ font-size:14px; padding:7px 11px; min-height:38px; }
}

/* =====================================================================
   공간 되찾기(9/23 JH «이미지가 너무 작아졌는데?» · «공간 활용 좀 잘 해 봐»).
   한 화면에 넣으면서 장면 그림이 남는 자리만 받아 390x664 에서 90~120px 썸네일이 됐다. 그림을 줄이지 말고 나머지를 조인다.
   · «← 이전» 은 맨 아래 한 줄 → 윗줄(판 이름 왼쪽). 문항마다 40px
   · 보기 카드 62 → 54px, 간격 10 → 8. «셋 다 아닌데»·질문 여백 조금. 판 아래 여백 28 → 18
   · 그림 칸 최소를 올린다(150, 키 700 밑 120, 640 밑 84). 스테이지 그림은 그 화면 주인공이라 61.8% 까지
   · 공감 카드 아이콘·시소 카드 그림·그림 고르기 칸도 전보다 작아지지 않게
   ===================================================================== */
.topbar{ grid-template-areas:"lang map snd" "back label ."; }
.topbar > #q-back{
  grid-area:back; justify-self:start; align-self:center;
  margin:0; padding:2px 0; font-size:15px; opacity:.72; white-space:nowrap;
}
.app{ padding-bottom:calc(18px + env(safe-area-inset-bottom, 0px)); }
.qblock > .q{ margin:4px 0 12px; }
.opts{ gap:8px; }
.opt{ min-height:54px; padding:11px 16px; }
.skip{ min-height:40px; margin-top:10px; }
.qblock > .art-slot{ min-height:150px; }
.stage-in > .art-slot{ max-height:calc(var(--u) * 61.8); }
.swipe-ico{ width:clamp(112px, calc(var(--u) * 18), 172px); }
.pole-ico{ width:clamp(86px, calc(var(--u) * 13.5), 132px); }
/* 10/13: 266 → 274. 이름이 두 줄로 꺾이는 그림 문항이 412x620 에서 4px 넘쳤다(screen_fit). 키 큰 폰은 min(100%) 에 막혀 그대로 */
.qblock[data-kind="image"] > .tiles.four{ width:min(100%, calc((var(--app-h) - 274px) * 0.92)); }
@media (min-width:600px){
  .qblock[data-kind="image"] > .tiles.four{ width:min(100%, calc((var(--board-h) - 280px) * 0.92)); }
}
@media (max-height:700px){
  .qblock > .art-slot{ min-height:120px; }
}
@media (max-height:640px){
  .qblock > .art-slot{ min-height:84px; }
  .opt{ min-height:48px; padding:9px 14px; }
}

/* =====================================================================
   그림은 캐릭터를 안 자르고 칸을 채운다(9/23 JH «이미지가 너무 작아졌다» → «위아래 공간 꽉 채울 수 있잖아?»
   → «잘려도 된다는 게 캐릭터가 잘리게 하라는 게 아닌 거. 센스껏 진짜 전문 UI UX 디자이너처럼»).
   · 장면·스테이지 그림: 칸이 4:3 보다 납작하면 틀이 옆으로 넓어지고 그림은 위아래(벽·천장·바닥)만 잘린다.
     얼마나 넓어질지(--r)와 어디를 남길지(--py)는 그림마다 다르다(app.js ART_BAND, 캐릭터 귀 끝~발끝 + 말풍선).
     칸이 4:3 보다 길쭉하면(큰 폰·태블릿) 4:3 그대로. 좌우는 어느 경우에도 안 자른다.
   · 표지: 가로형 단체 그림(16:9, 흰 바탕)이 흰 판 폭에 꽉 찬다. 캐릭터가 양 끝까지 있어서 좌우는 절대 안 자르고,
     판이 낮으면 위아래 흰 여백만 잘리고(캐릭터 머리·발 위아래 4·3% 는 남김, 2.02:1 까지), 그보다 낮으면 그림째 줄어 흰 판에 뜬다.
     판 높이는 그림 높이까지만(흰 칸이 남지 않게). 남는 높이는 황금비 빈칸이 가져간다.
   ===================================================================== */
.art-slot > .qart, .art-slot > .stage-art{ width:min(100cqi, calc(100cqh * var(--r, 1.3334))); height:min(100cqh, 75cqi); }
.art-slot > .qart > img, .art-slot > .stage-art > img{ width:100%; height:100%; aspect-ratio:auto; object-fit:cover; object-position:50% var(--py, 50%); }
.cover{ container-type:inline-size; }
.cover > .board{ padding:6px; container-type:size; max-height:min(calc(var(--u) * 38.2), calc((100cqi - 16px) * .5625 + 16px)); margin-top:24px; }   /* 위 24: 모서리 딱지(SAEHAN XAPIS)가 판 위로 20px 솟는다. 빈칸이 0 이 되면 제목 «사역체?» 를 가렸다(375x553) */
.board .cover-img{ width:min(100cqi, calc(100cqh * 2.02)); height:min(100cqh, 56.25cqi); max-width:none; max-height:none; object-fit:cover; object-position:50% 45%; border-radius:12px; }
/* 큰 것(그림 칸·캐릭터 판·카드 더미·카톡 창)이 빈칸보다 먼저 큰다. 12 : 1 : 1.618 이면 빈칸 둘이 남는 높이의 18% 를 늘 가져가서
   390x664 표지 판이 154px 에 멈췄다(그림 제 높이 206). 큰 것이 제 최대(38.2%·61.8%·그림 높이)에 닿은 뒤 남는 것만 빈칸이 1 : 1.618 로 나눈다. */
.art-slot, .cover > .board, .qblock[data-kind="swipe"] > .deck, .qblock[data-kind="chat"] > .chatwin{ flex-grow:1000; }
/* 말 바꾸기 알약은 한 줄. 영어 화면에서 «한국어» 가 62px 칸에서 두 줄로 꺾여 알약이 세로로 길쭉했다(v21 윗줄 칸 고정 뒤, 9/23 발견). 좌우 10px 이면 61px */
.topbar .lang-pill{ white-space:nowrap; padding-left:10px; padding-right:10px; }
/* «← 이전» 이 윗줄 판 이름 줄(18px)보다 키가 커서(26px) 이전이 보이는 문항만 질문이 6px 내려갔다(판 첫 문항 96 · 둘째부터 102, 9/23).
   글줄은 이름과 같은 18px, 누르는 면은 위아래 6px 씩 넓히되 음수 여백으로 줄 높이에는 안 보탠다 */
.topbar > #q-back{ line-height:18px; padding-block:6px; margin-block:-6px; }
/* 영어는 같은 글자 크기에서 한글보다 줄이 길다. 보기·답장이 두 줄로 꺾여 한 화면을 넘쳤다(9/23 fit_check --en: 375x553 장면 26 · 390x664 장면 10·카톡 3).
   폰 폭 영어 화면에서만 질문·보기·답장을 한 단계 작게, 줄 간격도 조금. 태블릿은 자리가 넉넉해서 그대로 */
@media (max-width:599px){
  /* 최소 높이 28px 는 한국어 한 줄 높이. 영어 한 줄(16.5~18px × 1.3)은 더 낮아서 한 줄 질문 밑에 빈 5~7px 가 생겼다(gap_check 375x553 m08 위 24 · 아래 14) → 영어 한 줄 높이로 */
  html[lang="en"] .q{ font-size:18px; line-height:1.3; min-height:1.3em; }
  html[lang="en"] .opt{ font-size:15px; line-height:1.3; }
  html[lang="en"] .reply{ font-size:14.5px; line-height:1.3; }
}
@media (max-width:599px) and (max-height:640px){
  html[lang="en"] .q{ font-size:16.5px; }
  html[lang="en"] .opt{ font-size:14px; min-height:44px; padding:7px 13px; }
  html[lang="en"] .opts{ gap:6px; }
  html[lang="en"] .reply{ font-size:13.5px; }
  /* 결과 스토리(9/23 375x553 영어 캡처: 대화창이 세 줄, 관심 단추가 두 줄로 꺾여 13~28px 넘침) */
  html[lang="en"] .dialog-text{ font-size:15px; line-height:1.35; min-height:40px; }
  html[lang="en"] .dialog-tmi{ font-size:14.5px; }
  html[lang="en"] .trait-card{ padding:14px 14px 12px; }
  html[lang="en"] .trait-badge{ width:72px; height:72px; }
  html[lang="en"] .trait-badge svg{ width:40px; height:40px; }
  html[lang="en"] .trait-name{ font-size:30px; }
  html[lang="en"] .story-stage .btn{ font-size:17px; }
  html[lang="en"] .qblock .skip{ margin-top:6px; }
}
/* 10/13 screen_fit: v36 영어 성향 글이 길어져 결과 이야기 첫 장이 430x720 · 390x520 에서 6~7px 넘쳤다(640 규칙과 740 여유 사이) → 이야기 쪽만 720 까지 */
@media (max-width:599px) and (max-height:720px){
  html[lang="en"] .dialog-text{ font-size:15px; line-height:1.35; min-height:40px; }
  html[lang="en"] .dialog-tmi{ font-size:14.5px; }
  html[lang="en"] .trait-card{ padding:14px 14px 12px; }
  html[lang="en"] .trait-badge{ width:72px; height:72px; }
  html[lang="en"] .trait-badge svg{ width:40px; height:40px; }
  html[lang="en"] .trait-name{ font-size:30px; }
}

/* =====================================================================
   목장 판 · 이름표(9/23 JH «키패드가 너무 기본 클로드 디자인 같다, 솔직히 너무 못생겼다. 우리가 디자인한 UI 에 어울리게. 이름 칸도»).
   흰 네모 계산기 → 위쪽 월드맵과 같은 문법: 동그란 칸 · 줄마다 점선 길 · 고른 칸에 내 캡슐이 올라앉는다(다른 칸을 고르면 톡 뛰어 간다).
   칸 색은 세로줄마다 무지개 파스텔(핑크·살구·레몬·민트·하늘). 누를 때 나는 실로폰 음도 왼쪽에서 오른쪽으로 올라가서, 보이는 것과 들리는 것이 한 계단.
   새가족·기타도 같은 스티커 옷(파스텔 알약 + 그림 하나). 이름 칸은 «HELLO my name is» 이름표 스티커: 띠에 «안녕, 나는», 줄 위에 이름,
   고른 목장이 띠 오른쪽에 작은 스티커로 붙는다. 이름표는 살짝 비뚤게 붙어 있다가 쓰기 시작하면 반듯해진다.
   ===================================================================== */
.input-screen{ --mkd:clamp(34px, calc(var(--u) * 6.7), 50px); }
.tagbox.sticker{ padding:24px 10px 14px; }
.mkgrid{ display:flex; flex-direction:column; gap:clamp(6px, calc(var(--u) * 1.25), 12px); }
.mkrow{ position:relative; display:grid; grid-template-columns:repeat(5, 1fr); justify-items:center; align-items:center; }
.mkrow::before{
  content:''; position:absolute; left:10%; right:var(--end, 10%); top:50%; margin-top:-1.5px;
  border-top:3px dashed var(--ink); opacity:.28; pointer-events:none;
}
.mkbtn{
  position:relative; z-index:1;
  width:var(--mkd); height:var(--mkd); min-height:0; padding:0;
  display:grid; place-items:center;
  border:var(--line) solid var(--ink); border-radius:50%;
  background:var(--kc, var(--paper)); color:var(--ink);
  font-family:var(--font-display); font-size:calc(var(--mkd) * .42); line-height:1;
  box-shadow:3px 3px 0 var(--ink);
}
.mkbtn:active{ transform:translate(2px, 2px); box-shadow:0 0 0 0 var(--ink); }
.mkbtn.on{ background:var(--ink); color:var(--lemon); transform:translate(2px, 2px); box-shadow:0 0 0 0 var(--ink); }
/* 고른 칸은 월드맵의 «지금 칸» 처럼 동그라미 물결 */
.mkbtn.on::after{
  content:''; position:absolute; inset:-7px; border-radius:50%;
  border:var(--line) solid var(--ink); opacity:0; pointer-events:none;
  animation:ring 2.2s ease-out .4s infinite;
}
.mkother{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:clamp(8px, calc(var(--u) * 1.8), 16px); }
.mkchip{
  display:flex; align-items:center; justify-content:center; gap:6px;
  min-height:calc(var(--mkd) * .84); padding:0 12px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  color:var(--ink); background:var(--lilac);
  font-family:var(--font-display); font-weight:400; font-size:16px; line-height:1;
  box-shadow:3px 3px 0 var(--ink);
}
.mkchip.other{ background:var(--kraft); }
.mkchip svg{ width:20px; height:20px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.mkchip.other svg{ fill:currentColor; stroke:none; }
.mkchip:active{ transform:translate(2px, 2px); box-shadow:0 0 0 0 var(--ink); }
.mkchip.on{ background:var(--ink); color:var(--lemon); transform:translate(2px, 2px); box-shadow:0 0 0 0 var(--ink); }
.input-screen .mkbtn.pop, .input-screen .mkchip.pop{ animation:mkpop .38s var(--spring) backwards; }
/* 내 캡슐(고른 칸 오른쪽 위에 앉는다). 옮겨 갈 때는 월드맵 캡슐처럼 옆으로 가면서 위로 튄다 */
.mk-cap{ position:absolute; left:0; top:0; z-index:3; width:0; height:0; pointer-events:none; transition:transform .5s var(--out); }
.mk-cap .token-hop{ left:0; top:0; }
.mk-cap .capsule{ --cap:var(--pink); }
.input-screen.go .mkbtn{ animation:popin .42s var(--spring) backwards; animation-delay:calc(.3s + var(--i, 0) * 18ms); }
.input-screen.go .mkchip{ animation:popin .42s var(--spring) .66s backwards; }
.input-screen.go .mk-cap{ animation:fadein .3s ease .8s backwards; }

/* 이름표 */
.input-screen > .hello{ order:3; }
.input-screen .hello{
  position:relative; margin:20px 4px 0; padding:0;
  border:var(--line) solid var(--ink); border-radius:16px; background:var(--paper);
  box-shadow:var(--shadow); overflow:hidden;
  transform:rotate(-1.4deg); transition:transform .35s var(--glide);
}
.input-screen .hello:focus-within{ transform:rotate(0); }
.hello-band{
  display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:36px;
  padding:5px 10px 4px 14px; background:var(--pink); border-bottom:var(--line) solid var(--ink);
}
.hello-hi{ font-family:var(--font-hand); font-weight:700; font-size:19px; line-height:1.2; }
.hello-mk{
  flex:0 0 auto; padding:3px 11px 2px; transform:rotate(3deg);
  border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--paper);
  font-family:var(--font-display); font-size:14px; line-height:1.3; box-shadow:var(--shadow-sm);
}
.hello-mk:empty{ display:none; }
.hello-mk.pop{ animation:stickerpop .45s var(--spring) backwards; }
@keyframes stickerpop{ 0%{ transform:rotate(-12deg) scale(.4); opacity:0; } 100%{ transform:rotate(3deg) scale(1); opacity:1; } }
.hello-input{
  display:block; width:calc(100% - 40px); margin:8px 20px 12px; padding:4px 0 5px;
  border:0; border-bottom:var(--line) dashed rgba(30, 27, 46, .4); border-radius:0;
  background:transparent; color:var(--ink); text-align:center;
  font-family:var(--font-display); font-weight:400; font-size:25px; line-height:1.25;
}
.hello-input::placeholder{ color:var(--ink); opacity:.25; }
.hello-input:focus{ outline:none; border-bottom-style:solid; border-bottom-color:var(--ink); }
#in-name.shake{ animation:none; }
/* 이름이 빠졌으면 이름표가 도리도리. 곧바로 입력칸에 커서가 가서 반듯해지니 반듯한 채로 흔든다.
   아이디로 거는 까닭: 목장 화면에 붙어 있는 들어오기 규칙(.input-screen.go > .hello)이 더 세서 클래스로는 흔들기가 안 걸렸다 */
#name-box.shake{ animation:helloshake .4s ease; }
@keyframes helloshake{ 0%, 100%{ transform:rotate(0); } 20%{ transform:translateX(-6px); } 40%{ transform:translateX(6px); } 60%{ transform:translateX(-4px); } 80%{ transform:translateX(3px); } }
/* 누르는 면: 작은 폰에서 동그라미가 37px 까지 준다. 보이는 크기는 그대로, 누르는 면만 넓힌다(옆은 칸 사이 틈 안, 위아래는 줄 틈 절반) */
.mkbtn::before{ content:''; position:absolute; inset:-4px -11px; border-radius:999px; }   /* 테두리 안쪽 기준이라 보이는 가장자리에서 옆 9px · 위아래 2px. 360px 폭에서도 옆 칸과 안 겹친다 */
/* 한 화면(카톡 인앱). «← 처음으로» 는 거의 안 쓰고 폰에선 뒤로 가기가 있어서 넘치면 제일 먼저 뺀다(v31 fitScreen, 전엔 키 760 밑이면 뺐다) */
@media (max-height:700px){
  .tagbox.sticker{ padding:22px 10px 12px; }
  .input-screen .hello{ margin-top:16px; }
  .hello-band{ min-height:32px; padding-top:4px; padding-bottom:3px; }
  .hello-hi{ font-size:17px; }
  .hello-input{ font-size:22px; margin:6px 20px 10px; }
}
@media (max-height:640px){
  .tagbox.sticker{ padding:20px 8px 10px; }
  .mkother{ margin-top:8px; }
  .mkchip{ font-size:15px; }
  .input-screen .hello{ margin-top:12px; }
  .hello-band{ min-height:30px; }
  .hello-hi{ font-size:16px; }
  .hello-mk{ font-size:13px; padding:2px 9px 1px; }
  .hello-input{ font-size:19px; margin:3px 18px 7px; padding:2px 0 3px; }
}
/* 이름표는 비뚤게 붙은 채로 들어온다(들어오기 애니메이션이 끝나고 기울기가 튀지 않게) */
.input-screen.go > .hello{ animation-name:helloin; }
@keyframes helloin{ 0%{ opacity:0; transform:translateY(16px) rotate(-6deg) scale(.92); } 100%{ opacity:1; transform:rotate(-1.4deg); } }
@media (prefers-reduced-motion:reduce){ .mkbtn.on::after{ animation:none; } }
/* READY 배지가 제목에 3px 겹쳤다(뒤에 오는 .stage-badge{margin:0} 이 .ready-badge 의 아래 여백을 지웠다). 스테이지 카드와 같은 14px 로 */
.input-screen > .ready-badge{ margin-bottom:14px; }

/* =====================================================================
   움직이는 캐릭터(9/23, GPT Image 스프라이트 시트 → 프레임. app.js ANIM).
   대화창 얼굴: 세 장(t0 웃는 입 · t1 입 다묾 · t2 눈 감음)을 겹쳐 두고 클래스로 한 장만 보인다. 말할 때 shut 이 초당 8번쯤 켜졌다 꺼지고, 가끔 blink.
   결과 뽑기: 만세(r3)로 튀어나와 1.1초 뒤 제자리(r0)로 살짝 눌렸다 펴지고(settle), 가끔 깜빡(r2).
   ===================================================================== */
.dialog-face.talky .fr{ position:absolute; inset:0; opacity:0; }
.dialog-face.talky .fr-0{ opacity:1; }
.dialog-face.talky.shut .fr-0{ opacity:0; }
.dialog-face.talky.shut .fr-1{ opacity:1; }
.dialog-face.talky.blink .fr-0, .dialog-face.talky.blink .fr-1{ opacity:0; }
.dialog-face.talky.blink .fr-2{ opacity:1; }
.capsule-stage.open .rv-char.settle{ animation:settle .42s var(--spring) both; }
@keyframes settle{ 0%{ opacity:1; transform:scale(1.06, .9) translateY(6px); } 100%{ opacity:1; transform:none; } }

/* =====================================================================
   v27(9/23) 그림 고르기 네 칸, 키 작은 폰. fit_check 에 칸 형식(담기·순서·그림)을 넣고 처음 재 보니
   375x553 에서 네 칸 이름이 다 두 줄이면 2px(한국어 i01·i03·i04·i07·i08), 영어는 세 줄이 섞여 16px(i04·i07) 넘쳤다.
   보기 순서는 판마다 섞여서 긴 이름이 두 줄에 하나씩 가는 판이 반드시 나온다.
   → 키 600 밑 폰에서만 칸 폭을 조금 줄이고(그림 약 3%), 영어 칸 이름은 담기 여섯 칸과 같은 13px 로.
   9/27 키 640 까지 넓힘: screen_fit 이 412x620 에서 i16(이름 둘이 두 줄) 8px · 영어 열 문항 2px 넘침을 잡았다(fit_check 다섯 크기 사이라 안 보였다).
   넓은 폰은 칸 폭이 키에 막혀서 칸이 좁아지고 이름이 더 접힌다.
   ===================================================================== */
@media (max-width:599px) and (max-height:640px){
  .qblock[data-kind="image"] > .tiles.four{ width:min(100%, calc((var(--app-h) - 274px) * 0.92)); }
  html[lang="en"] .tiles.four .tile-cap{ font-size:13px; line-height:1.2; }
}

/* =====================================================================
   v27(9/23) 카톡 창, 키 작은 폰. 창은 넘치면 오래된 말이 위로 가려지게 돼 있는데(진짜 카톡처럼)
   문항에선 첫 말풍선이 상황 설명이라 가려지면 안 된다. fit_check 에 «첫 말풍선 가려짐» 을 넣고 처음 재 보니
   영어 375x553 에서 18개(라이브 문항 c01·c02·c10 포함), 390x664 에서 10개, 한국어는 새 문항 4개가 11~70px 가려져 있었다.
   창 높이는 남는 자리만큼이라 그대로 두고, 창 머리·입력칸·말풍선 여백을 줄여 말풍선 자리를 넓힌다. 키 600 밑은 한 단계 더.
   ===================================================================== */
@media (max-width:599px) and (max-height:700px){
  .chat-head{ padding:6px 12px; gap:8px; }
  .chat-head .avatar{ width:30px; height:30px; border-radius:11px; }
  .chat-from{ font-size:16px; }
  .qblock[data-kind="chat"] .chat-log{ padding:10px 12px 12px; gap:6px; }
  .bubble{ padding:7px 12px; font-size:15px; line-height:1.36; }
  .chat-compose{ padding:5px 8px; }
  .cc-field{ min-height:30px; padding:5px 11px 4px; font-size:14px; line-height:1.35; }
  .cc-send{ padding:5px 10px 4px; font-size:14px; }
}
@media (max-width:599px) and (max-height:600px){
  .qblock[data-kind="chat"] .chat-log{ padding:8px 10px 10px; }
  .bubble{ padding:6px 11px; font-size:14px; line-height:1.32; }
  .replies{ gap:6px; }
}

/* =====================================================================
   리더 보고서 9/24: 사람 단위 · 이 결과 믿을 만해? · 성격 프로필 · 실제 팀(정확도)
   클래스는 rp- 로 시작한다(app.css 를 앱과 보고서가 같이 써서 이름이 겹치면 안 된다. mini 사고 두 번).
   ===================================================================== */
.rp-badge{
  display:inline-flex; align-items:center; padding:3px 10px; margin-left:2px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  font-size:12.5px; font-weight:800; line-height:1.3; white-space:nowrap; vertical-align:middle;
  background:var(--paper); color:var(--ink);
}
.rp-badge.rp-high{ background:var(--mint); }
.rp-badge.rp-mid{ background:var(--lemon); }
.rp-badge.rp-low{ background:var(--peach); }
.rp-badge.rp-na{ opacity:.6; }
.rp-kv .rp-meter{ grid-column:1 / -1; margin:0 0 4px; }
.bignum.rp-high{ background:var(--mint); }
.bignum.rp-mid{ background:var(--lemon); }
.bignum.rp-low{ background:var(--peach); }
.rp-meter{ position:relative; height:12px; margin:8px 0 0; border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--paper); overflow:hidden; }
.rp-meter i{ position:absolute; top:0; bottom:0; left:0; background:var(--ink); }
.rp-kv{ display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:12px 0 0; font-size:14px; }
.rp-kv dt{ font-weight:700; opacity:.72; white-space:nowrap; }
.rp-kv dd{ margin:0; font-weight:800; font-variant-numeric:tabular-nums; word-break:keep-all; }
.rp-warn{ font-weight:800; }
.rp-reasons{ margin:6px 0 0; padding:0 0 0 18px; font-size:14px; line-height:1.55; }
.rp-flags{ margin:10px 0 0; padding:0 0 0 18px; font-size:13px; line-height:1.55; opacity:.8; }
.rp-range{ position:relative; height:6px; margin:3px 2px 0; }
.rp-range::before{ content:''; position:absolute; left:50%; top:-2px; bottom:-2px; width:1px; background:rgba(30,27,46,.35); }
.rp-range i{ position:absolute; top:1px; bottom:1px; border-radius:3px; background:var(--ink); opacity:.45; }
.rp-trait{ margin:10px 0 0; padding:11px 14px; border:var(--line) solid var(--ink); border-radius:var(--r-card); }
.rp-trait b{ font-family:var(--font-display); font-weight:400; font-size:17px; }
.rp-trait p{ margin:4px 0 0; font-size:13.5px; line-height:1.5; word-break:keep-all; }
.rp-trait .rp-why{ opacity:.8; }
.rp-mean{ display:flex; align-items:flex-end; gap:10px; margin:8px 0 0; }
.rp-plays{ display:flex; flex-direction:column; gap:6px; margin:12px 0 0; }
.rp-play{
  display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; width:100%;
  padding:8px 10px; border:var(--line) solid var(--ink); border-radius:12px;
  background:var(--paper); color:var(--ink); font:inherit; font-size:13.5px; text-align:left; cursor:pointer;
}
.rp-play.on{ background:var(--lemon); font-weight:800; }
.rp-when{ font-variant-numeric:tabular-nums; }
.rp-actual{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:10px 0 0; }
.rp-status{ font-size:14px; }
.rp-method{ margin:14px 0 0; font-size:13.5px; }
.rp-method summary{ cursor:pointer; font-weight:800; }
.rp-method dl{ margin:6px 0 0; }
.rp-method dt{ font-weight:800; margin:10px 0 0; }
.rp-method dd{ margin:2px 0 0; line-height:1.6; opacity:.86; word-break:keep-all; }
.rp-answers summary{ cursor:pointer; font-family:var(--font-display); font-size:16px; }

/* =====================================================================
   v29(9/24) 구멍 메우기. JH «밸런스 게임 보면 질문이랑 선택지 사이가 너무 멀어서 큰 공간이 보여. 이런 UI 문제 또 있어?»
   tools/gap_check.mjs 로 재 보니 64px 넘는 구멍이 23곳(시소·카드·담기·순서·그림, 키 큰 폰일수록 커서 최대 271px).
   원인: 남는 높이를 빈칸 둘(1 : 1.618)이 나눠 갖는데, 커지는 «큰 것» 이 장면 그림·카톡 창뿐이었다.
   첫 시도(카드·칸을 세로로 늘이기)는 속이 빈 긴 상자가 됐다(«짝 없는 요소는 안 늘인다» 위반) → 되돌림.
   남는 높이를 «내용 → 바닥 단추» 사이로 몰아 보니 구멍이 자리만 옮겼다(시소 148~201px). 폭이 막는 내용(시소 두 카드·칸)은 키 큰 폰에서 억지로 못 채운다.
   JH 두 번째 말(아래)로 규칙을 이렇게 정했다:
    ① 질문 → 큰 것 → 답 사이는 작은 간격(위 8~16px · 아래 10~20px 까지). 질문·그림·보기는 늘 한 덩어리로 위에서부터 읽힌다.
    ② 내용은 모양을 지키며 큰다(카드는 세로 3:4, 키 큰 폰 2:3, 칸은 4:5 까지. 그림·글자도 폭에 맞춰).
    ③ 그래도 남는 높이는 전부 맨 아래(.qtail). 선택지 수가 바뀌어도 위의 자리는 안 움직인다.
   검사: node tools/gap_check.mjs --max=40 (여섯 크기 전 형식 35px 이하).
   ===================================================================== */
/* 9/24 JH 두 번째 말: «맨 위 질문, 가운데 그림, 아래 선택지가 각각 너무 벌어져 있어서 보기 불편.
   선택지가 줄면 원래 하나 있던 자리가 그림 위 공백을 더 키운다» → 문항 화면은 위에서부터 한 덩어리로 붙인다.
   질문 → 큰 것 → 답 사이는 작은 간격, 큰 것(그림·카드 더미·카톡 창)은 여전히 먼저 크고,
   그래도 남는 높이는 전부 맨 아래(.qtail). 선택지 수가 바뀌어도 질문·그림 자리는 안 움직인다. */
/* 빈칸 둘은 바탕 키 0 에서 제 크기까지만 큰다. 차례: 큰 것(flex-grow 1000) → 빈칸 둘(1) → 맨 아래 .qtail(0.1).
   키를 못 박으면(height) 문항 블록이 그만큼을 «최소 키» 로 쳐서 작은 폰(375x553)에서 장면·카톡이 5~17px 넘쳤고,
   큰 것과 같은 우선(1000)이면 카톡 창 몫을 뺏어 영어 첫 말풍선이 1~4px 가려졌다(fit_check). 좁을 때 몫은 v28 과 같은 비율(1000 : 1).
   카드·카톡의 위 빈칸은 전처럼 0. .qtail 이 1 보다 작아서 다 못 먹은 높이도 맨 아래 남는다(뒤에 아무것도 없어서 똑같다) */
.qblock::before{ flex:1 1 0; min-height:0; max-height:clamp(8px, calc(var(--u) * 1.6), 16px); }
.qblock::after{ flex:1 1 0; min-height:0; max-height:clamp(10px, calc(var(--u) * 2), 20px); }
.qblock > .qtail{ order:6; flex:0.1 1 0; min-height:0; display:block; }
/* ② 시소 두 카드: 세로 3:4 카드까지 크고, 그림·글자는 카드 폭에 맞춰 */
.qblock[data-kind="slide"] .pole{ container-type:inline-size; aspect-ratio:3 / 4; max-height:calc(var(--u) * 33); }
/* 키 큰 폰은 카드를 한 단계 더 세로로(2:3), 가운데 VS 는 작게 해서 카드 폭을 번다 */
@media (min-height:700px){
  .qblock[data-kind="slide"] .pole{ aspect-ratio:2 / 3; max-height:calc(var(--u) * 40); }
  .qblock[data-kind="slide"] .poles{ gap:6px; }
  .qblock[data-kind="slide"] .vs{ width:32px; height:32px; font-size:13px; }
}
.qblock[data-kind="slide"] .pole-ico{ width:clamp(72px, 70cqw, 150px); }
.qblock[data-kind="slide"] .pole-t{ font-size:clamp(15px, 8.6cqw, 19px); }
/* 공감 카드: 더미 상한 61.8% → 70%(카드 한 장은 세로로 길어도 카드 모양이라 괜찮다) */
.qblock[data-kind="swipe"] > .deck{ max-height:calc(var(--u) * 70); }
/* 담기·순서 칸: 4:5 까지 크고, 아이콘은 칸 폭에 맞춰 */
.qblock[data-kind="multi"] .tile, .qblock[data-kind="order"] .tile{ container-type:inline-size; aspect-ratio:4 / 5; justify-content:center; }
.qblock[data-kind="multi"] .tile{ max-height:calc(var(--u) * 21); }
.qblock[data-kind="order"] .tile{ max-height:calc(var(--u) * 25); }
.qblock[data-kind="multi"] .tile-ico{ width:clamp(46px, 60cqw, 104px); height:auto; aspect-ratio:1; }
.qblock[data-kind="order"] .tile-ico{ width:clamp(62px, 56cqw, 128px); height:auto; aspect-ratio:1; }
/* 장면: 키 큰 폰에서 그림 칸 상한 38.2% → 44% */
@media (min-height:880px){
  .qblock[data-kind="pick"] > .art-slot{ max-height:min(calc(var(--u) * 44), calc(var(--app-cw, 999px) * .75)); }
}

/* =====================================================================
   v30(9/24) 가운데 그래픽 기준으로 위아래 맞추기. JH «사람은 시각적인 동물이잖아? 가운데 이미지나 그래픽을 기준으로
   위아래가 맞도록 맞춘 거지? 이전엔 위로 몰아서 아래에 공간이 남는 문제가 있었던 거 기억하지?»
   v29 는 위에서부터 붙이고 남는 높이를 전부 맨 아래로 버렸다 → 키 큰 폰(390x844)에서 아래가 시소 285 · 담기 230 · 그림 221px 비었다(v20 과 같은 문제).
   → 질문·그래픽·답은 그대로 붙이고, 그 덩어리를 지도 밑 공간 가운데에 놓는다. 남는 높이는 위(.qlead)와 아래(.qtail)가 반씩.
     안쪽 빈칸(질문↔그래픽, 그래픽↔답)은 바깥보다 먼저 제 크기까지(grow 4 대 1). 좁은 폰은 남는 게 없어서 전과 같다.
   장면 그림 칸은 그림(4:3) 높이까지만 큰다(--app-cw = 판 안쪽 폭, setAppHeight). 더 크면 칸 안에서 그림 위아래로
   빈 띠가 생겼다(키 큰 폰 56~114px). 칸 상자로 재는 gap_check 로는 안 보였다 → gap_check 가 이제 보이는 끝으로 잰다.
   ===================================================================== */
.qblock > .qlead{ order:0; flex:1 1 0; min-height:0; display:block; }
.qblock > .qtail{ flex:1 1 0; }
.qblock::before, .qblock::after{ flex-grow:4; }
.qblock > .art-slot{ max-height:min(calc(var(--u) * 38.2), calc(var(--app-cw, 999px) * .75)); }
/* 그래픽 위·아래를 «보이는 끝» 으로 같게(글자는 줄 간격을 뺀 잉크, 카드·칸은 딱딱한 그림자까지. tools/gap_check.mjs).
   늘어나는 빈칸을 0 으로 두고 잰 기본값이 형식마다 달랐다(375x553: 장면 15/4 · 담기 18/4 · 그림 18/6 · 시소 21/28 · 순서 12/12 · 공감 카드 8/-15).
   → 기본 여백을 형식마다 맞추고, 늘어나는 빈칸 둘은 같은 크기로 같이 큰다. 그래서 어느 키에서나 위아래가 같다 */
.qblock::before, .qblock::after{ max-height:clamp(8px, calc(var(--u) * 1.6), 16px); }
.qblock > .art-slot{ margin-bottom:19px; }                              /* 장면: 그림 아래 8·12 → 19(그림 그림자 4 빼고 15 = 질문 아래 15) */
.qblock[data-kind="multi"] > .basket{ margin-top:20px; }                /* 담기: 칸 그림자 4 빼고 16 */
html[lang] .qblock[data-kind="image"] > .skip{ margin-top:20px; }        /* 그림 고르기: 〃 (html[lang]: 영어 압축 규칙 .skip 6px 보다 세게) */
.qblock[data-kind="slide"]::before{ max-height:0; }                     /* 시소: 카드 아래(막대까지 28)는 안 늘어나니 위도 안 늘린다 */
.qblock[data-kind="slide"] > .seesaw{ margin-top:13px; }                /* 6 → 13: 질문 잉크 → 카드 28 = 카드 → 막대 28 */
.qblock[data-kind="swipe"] > .deck{ margin-bottom:23px; }               /* 공감 카드: 뒤에 겹친 카드가 21px 밑으로 삐져나와 단추를 덮었다 */
.qblock[data-kind="swipe"]::after{ flex-grow:1; max-height:none; }      /* 공감 카드는 질문 줄이 없다: 지도↔더미 = 더미↔단추 = 맨 아래, 남는 걸 셋이 같이 */
/* 가장 작은 폰(키 600 밑): 여백을 늘린 만큼 장면 8px · 그림 칸 4px 넘쳤다(fit_check) → 질문 아래 12 → 6, 그래픽 아래도 같이 줄여 위아래 같게(전체 높이는 v29 와 같다) */
@media (max-height:600px){
  .qblock[data-kind="pick"] > .q, .qblock[data-kind="image"] > .q, .qblock[data-kind="multi"] > .q{ margin-bottom:6px; }
  .qblock > .art-slot{ margin-bottom:14px; }
  html[lang] .qblock[data-kind="image"] > .skip{ margin-top:16px; }
  .qblock[data-kind="multi"] > .basket{ margin-top:14px; }
}
/* 카톡은 창이 먼저 큰다(빈칸이 창 몫을 1px 가져가서 영어 c30 첫 말풍선이 가려졌다, 390x664) */
.qblock[data-kind="chat"]::after{ flex-grow:1; }
.qblock[data-kind="chat"] > .qlead, .qblock[data-kind="chat"] > .qtail{ flex-grow:.1; }
/* «뭐라고 보낼래?» 줄이 빠지는 작은 폰: 첫 답장이 창 그림자에 붙었다(위 10 / 아래 -3). 아래만 13 늘리면 영어 첫 말풍선이 4~7px 가려져서
   위를 6 → 2, 아래를 8 로(보이는 간격 6 / 5, 창은 4px 만 준다) */
@media (max-height:600px){ .qblock[data-kind="chat"] > .chatwin{ margin-top:2px; margin-bottom:8px; } }

/* =====================================================================
   v31(9/24) 한 화면 자동 맞춤 + 목장 화면 빈 줄. JH «폰으로 돌려 보니 처음 목장 이름 페이지에서 스크롤 다운을 해야 한다.
   공간이 대놓고 보이는데 엔터 쳐 놓은 것처럼 빈칸이 보인다 · 카톡 웹은 위아래가 잘려서 더 좁을 텐데 자동 맞춤이 기술적으로 안 되는 거야?»
   ① 키 몇 개(640·700·760)로 끊어 빼던 것을 JS 로: 그린 뒤 재서 판이 넘치면 data-fit 1 → 2 → 3 차례로 뺀다(app.js fitScreen).
      412x780 에서 89px, 390x844 에서 27px 넘쳤다. 판이 제 안에서 스크롤해서 문서 높이로는 안 보였다(tools/screen_fit.mjs 가 이제 판 안을 잰다).
   ② 비어 있는 에러 줄(&nbsp;)이 늘 22px 를 차지해서 이름표와 «테스트 시작» 사이가 빈 줄처럼 보였다 → 비면 자리 없음.
   ③ 문항 화면(v30)과 같은 문법: 덩어리는 작은 간격으로 붙이고, 남는 높이는 덩어리 위(.slead)와 아래(.stail)가 반씩.
   ===================================================================== */
.fit-out{ display:none !important; }
.input-screen .err:empty{ display:none; }
.input-screen > .slead{ order:0; flex:1 1 0; min-height:0; display:block; }
.input-screen > .stail{ order:6; flex:1 1 0; min-height:0; display:block; }
.input-screen::before, .input-screen::after{ flex-grow:4; max-height:8px; }   /* 판 위(목장 딱지가 14px 솟음)·단추 위 여백에 더해 조금만. 남는 건 바깥으로 */
.input-screen > #go-quiz{ margin-top:12px; }   /* 빈 에러 줄이 없어지자 딱 맞는 키에서 이름표에 붙었다(0~4px) */
/* ④ 표지·스테이지 카드도 같은 문법(tools/screen_fit.mjs: 표지는 키 큰 폰에서 제목↔판 83~129px, 판↔코스 95~200px 벌어졌다).
   캐릭터 판·스테이지 그림은 폭에 막혀 더 못 크니 남는 높이를 안쪽 빈칸이 아니라 덩어리 위아래로 */
.cover > .slead, .stage-in > .slead{ order:0; flex:1 1 0; min-height:0; display:block; }
.cover > .stail, .stage-in > .stail{ order:6; flex:1 1 0; min-height:0; display:block; }
.cover::before, .cover::after, .stage-in::before, .stage-in::after{ flex-grow:4; max-height:14px; }
/* ⑤ 결과 뽑기: 키 640 밑에서 캡슐 무대를 40 → 34%(키 520~620 에서 최대 22px 넘쳤다). «눌러서 바로 보기» 는 그래도 넘치면 뺀다(data-fit) */
@media (max-height:640px){ .reveal-screen > .capsule-stage{ height:clamp(170px, calc(var(--u) * 34), 300px); margin:6px 0; } }
/* ⑥ 관심 있어요 큰 캐릭터를 키에 맞춰 124~190px(전엔 190 고정이라 키 540 밑에서 26px 넘쳤다). 햇살은 같은 비율로 */
.ask-hero{ --hero:clamp(124px, calc(var(--u) * 28), 190px); width:var(--hero); height:var(--hero); }
.ask-char{ width:calc(var(--hero) * .926); height:calc(var(--hero) * .926); }
.ask-rays{ left:calc(var(--hero) * -.368); top:calc(var(--hero) * -.368); width:calc(var(--hero) * 1.737); height:calc(var(--hero) * 1.737); }
@media (max-height:560px){ .story-stage{ padding:2px 0 6px; gap:6px; } .dialog{ min-height:84px; padding:18px 12px 10px; } }
/* ⑦ 캡슐 햇살이 520px 고정이라 작은 키에서 판 밑으로 37~94px 삐져나가 판이 스크롤됐다(블록은 안 넘치는데 장식이 스크롤 영역을 늘림) → 키에 맞춰 */
.reveal-screen .rays{ --rs:min(520px, calc(var(--u) * 78)); width:var(--rs); height:var(--rs); margin:calc(var(--rs) / -2) 0 0 calc(var(--rs) / -2);
  overflow:hidden; border-radius:50%; }   /* 네모 햇살이 돌면서 45도마다 대각선(1.4배)만큼 커져 판 스크롤을 늘렸다 줄였다 → 동그랗게 잘라 돌아도 크기 그대로 */
/* ⑧ 목장 화면 키 540 밑: 뺄 것을 다 빼도 4px 넘쳤다 */
@media (max-height:540px){ .tagbox.sticker{ margin-top:16px; } .input-screen > #go-quiz{ margin-top:8px; } }
/* ⑩ 영어 키 520: 담기 5px · 그림 칸 2px(표지 1px 는 참여 수 칩이 data-fit 으로 빠진다) */
/* 10/13 screen_fit: 키 520 에서 그림 네 칸이 11~13px 넘쳤다(위 266 기준) → 키 540 밑은 칸 폭을 조금 더 줄인다 */
@media (max-height:540px){ .qblock[data-kind="image"] > .tiles.four{ width:min(100%, calc((var(--app-h) - 292px) * 0.92)); } }
@media (max-height:540px){ .tiles.six{ gap:4px; } .qblock[data-kind="multi"] > .basket{ margin-top:10px; } html[lang] .qblock[data-kind="image"] > .skip{ margin-top:12px; } }
/* ⑨ 결과 이야기 첫 장(성향 카드) 키 540 밑에서 3px 넘쳤다 */
@media (max-height:540px){ .trait-card{ padding:12px 12px 10px; } .trait-badge{ width:64px; height:64px; } .trait-badge svg{ width:36px; height:36px; } }
/* ⑪ 카톡 창 최소 높이: 키 계단(600·640·700 밑 140·168·196, 그 위 236) 대신 키에 비례(모든 키에서 전과 같거나 작다).
   700 바로 위(375x720)에서 영어 카톡이 9px 넘쳤다(screen_fit). 창은 여전히 먼저 크고, 최소 높이는 모자랄 때만 쓰인다 */
.qblock[data-kind="chat"] > .chatwin{ min-height:min(236px, calc(var(--u) * 25.3)); }
/* ⑫ 스테이지 5 순서·담기 칸이 왼쪽으로 쏠렸다(JH 9/24 «카드 4개 뜨는 게 왼쪽으로 쏠렸다, 중앙이 아니라»). 키가 막으면 칸(4:5 + 높이 상한)이
   셀보다 좁아져 셀 왼쪽에 붙었다(390x664 순서: 왼쪽 0 · 오른쪽 39px, 375x553: 54px). 묶음 폭을 칸 폭(높이 상한 × 4/5)에 맞춰 가운데로, 셀 안에서도 가운데 */
.qblock[data-kind="order"] > .tiles{ align-self:center; width:100%; max-width:calc(var(--u) * 40 + 10px); }
.qblock[data-kind="multi"] > .tiles{ align-self:center; width:100%; max-width:calc(var(--u) * 50.4 + 16px); }
/* 칸은 셀을 채우고(width 100%. justify-items:center 로 두면 내용 폭만큼 줄어든다), 높이 상한 때문에 좁아질 때만 셀 가운데 */
.qblock[data-kind="order"] > .tiles > .tile, .qblock[data-kind="multi"] > .tiles > .tile{ width:100%; justify-self:center; }

/* =====================================================================
   v32(9/24) 카톡 연출. JH «답변 중에 (링크를 보낸다) 아니면 (사진을 보낸다) 이런 답변 보내면 진짜 링크랑 사진 보내 주는 거 연출해 줄 수 있어?»
   괄호 속 행동은 진짜로(링크 카드·짤·지도 캡처·이모티콘·공감 하트·투표·보이스톡·알림 끔·갠톡·자는 척), 속마음은 구름으로,
   친구 쪽 음성 메시지·사진·파일·위치·앨범·초대 줄도 진짜처럼(app.js CHAT_STAGE). 말풍선 문법은 그대로: 잉크 2px, 친구 흰색·나 레몬
   ===================================================================== */
.cc-plus{
  flex:0 0 auto; width:30px; height:30px; margin-bottom:3px; display:grid; place-items:center;
  border:var(--line) solid var(--ink); border-radius:10px; background:var(--paper);
  font-family:var(--font-display); font-size:20px; line-height:1;
  transition:transform .12s ease, background-color .15s ease;
}
.cc-plus.push{ transform:rotate(45deg) scale(.92); background:var(--lemon); }
.bubble.them{ position:relative; }
/* 미디어 말풍선: 테두리는 말풍선 것 그대로, 안은 꽉(모서리 둥글게 잘라서) */
.bubble.media{ padding:0; background:var(--paper); max-width:78%; }
.bubble.media .md-clip{ display:block; overflow:hidden; border-radius:16px; }
.bubble.them.media .md-clip{ border-top-left-radius:4px; }
.bubble.me.media .md-clip{ border-top-right-radius:4px; }
.bubble.media img{ display:block; }
/* 사진 */
.bubble.photo{ width:200px; }
.bubble.photo img{ width:100%; height:auto; }
.bubble.photo.selfie .md-clip{ position:relative; aspect-ratio:1; background:var(--apricot); display:grid; place-items:end center; }
.bubble.photo.selfie img{ width:78%; height:auto; }
.spk{ position:absolute; width:12px; height:12px; background:var(--paper); clip-path:polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation:spk 1.4s ease-in-out infinite; }
.spk.s1{ left:14%; top:14%; } .spk.s2{ right:14%; top:24%; width:9px; height:9px; animation-delay:.4s; } .spk.s3{ left:22%; top:46%; width:8px; height:8px; animation-delay:.8s; }
@keyframes spk{ 0%, 100%{ transform:scale(.4); opacity:.5; } 50%{ transform:scale(1.1); opacity:1; } }
/* 음성 메시지 */
.bubble.media.voice{ display:flex; align-items:center; gap:8px; padding:7px 12px 7px 7px; }
.vo-play{ flex:0 0 auto; width:30px; height:30px; border-radius:50%; background:var(--ink); display:grid; place-items:center; }
.vo-play svg{ width:13px; height:13px; fill:var(--paper); margin-left:2px; }
.vo-wave{ display:flex; align-items:center; gap:2px; height:22px; }
.vo-wave i{ width:3px; height:calc(var(--h) * 1px); border-radius:2px; background:var(--ink); opacity:.72; }
.vo-dur{ font-size:13px; font-weight:700; opacity:.7; }
/* 파일 */
.bubble.media.file{ display:flex; align-items:center; gap:10px; padding:8px 14px 8px 8px; }
.fi-ico{ flex:0 0 auto; width:38px; height:38px; border-radius:11px; background:var(--lilac); border:var(--line) solid var(--ink); display:grid; place-items:center; color:var(--ink); }
.fi-ico svg{ width:20px; height:20px; fill:var(--ink); }
.fi-meta{ display:flex; flex-direction:column; line-height:1.25; }
.fi-meta b{ font-size:14px; } .fi-meta small{ font-size:12px; font-weight:700; opacity:.6; }
/* 지도(위치 카드·지도 캡처) */
.bubble.location, .bubble.mapshot{ width:200px; }
.map-svg{ display:block; width:100%; height:auto; }
.mp-land{ fill:#F4EFE3; }
.mp-water{ fill:none; stroke:var(--sky); stroke-width:13; }
.mp-park{ fill:var(--mint); }
.mp-road{ fill:none; stroke:var(--paper); stroke-width:8; stroke-linecap:round; }
.mp-route{ fill:none; stroke:#E4574F; stroke-width:4.5; stroke-dasharray:7 5; stroke-linecap:round; stroke-linejoin:round; animation:route 1.2s ease-out both; }
@keyframes route{ from{ stroke-dashoffset:120; } to{ stroke-dashoffset:0; } }
.mp-me{ fill:var(--ink); stroke:var(--paper); stroke-width:3; }
.mp-pin{ fill:#E4574F; stroke:var(--ink); stroke-width:1.6; }
.loc-cap, .al-cap{ margin:0; padding:6px 10px 7px; display:flex; align-items:baseline; justify-content:space-between; gap:8px; background:var(--paper); border-top:var(--line) solid var(--ink); line-height:1.25; }
.loc-cap b, .al-cap b{ font-size:13.5px; } .loc-cap span, .al-cap span{ font-size:12px; font-weight:700; opacity:.6; }
/* 앨범 */
.bubble.album{ width:196px; }
.al-grid{ display:grid; grid-template-columns:1fr 1fr; gap:2px; background:var(--ink); }
.al-grid img{ width:100%; aspect-ratio:1; object-fit:cover; }
/* 링크 카드 */
.bubble.lcard{ width:212px; }
.lc-thumb{ position:relative; display:grid; place-items:center; aspect-ratio:16 / 9; border-bottom:var(--line) solid var(--ink); }
.lc-thumb img{ width:40%; height:auto; }
.lc-play{ position:absolute; right:8px; bottom:8px; width:26px; height:26px; border-radius:50%; background:var(--ink); display:grid; place-items:center; }
.lc-play svg{ width:12px; height:12px; fill:var(--paper); margin-left:2px; }
.lc-meta{ display:flex; flex-direction:column; gap:1px; padding:6px 10px 8px; background:var(--paper); }
.lc-title{ font-size:13.5px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.lc-dom{ font-size:11.5px; font-weight:700; opacity:.55; }
.bubble.lcard.small{ width:222px; }
.bubble.lcard.small .md-clip{ display:flex; align-items:stretch; }
.bubble.lcard.small .lc-thumb{ flex:0 0 46px; aspect-ratio:auto; border-bottom:0; border-right:var(--line) solid var(--ink); }
.bubble.lcard.small .lc-thumb img{ width:78%; }
.bubble.lcard.small .lc-play{ display:none; }
.bubble.lcard.small .lc-meta{ min-width:0; justify-content:center; padding:5px 9px; }
.bubble.lcard.small .lc-title{ -webkit-line-clamp:1; font-size:12.5px; }
/* 짤 */
.bubble.meme{ width:176px; }
.bubble.meme .md-clip{ position:relative; aspect-ratio:1; background:var(--lilac); display:grid; place-items:end center; }
.bubble.meme img{ width:76%; height:auto; }
.mm{ position:absolute; left:6px; right:6px; text-align:center; font-family:var(--font-display); font-size:19px; line-height:1.12; color:var(--paper); -webkit-text-stroke:5px var(--ink); paint-order:stroke fill; word-break:keep-all; }
.mm.top{ top:8px; } .mm.bot{ bottom:9px; }
/* 투표 */
.bubble.media.poll{ width:206px; padding:10px 12px 12px; }
.pl-tag{ margin:0 0 3px; display:flex; align-items:center; gap:4px; font-size:12px; font-weight:800; opacity:.62; }
.pl-tag svg{ width:13px; height:13px; fill:var(--ink); }
.pl-q{ display:block; margin-bottom:8px; font-size:15px; line-height:1.3; }
.pl-opts{ list-style:none; margin:0 0 9px; padding:0; display:flex; flex-direction:column; gap:5px; }
.pl-opts li{ display:flex; align-items:center; gap:8px; padding:5px 10px; border:var(--line) solid var(--ink); border-radius:10px; background:var(--page); font-size:13.5px; font-weight:600; }
.pl-opts i{ flex:0 0 auto; width:13px; height:13px; border-radius:50%; border:var(--line) solid var(--ink); background:var(--paper); }
.pl-btn{ display:block; padding:6px; border:var(--line) solid var(--ink); border-radius:10px; background:var(--lemon); text-align:center; font-family:var(--font-display); font-size:14px; }
/* 보이스톡 */
.bubble.media.call{ display:flex; align-items:center; gap:10px; padding:8px 14px 8px 8px; background:var(--lemon); }
.call-ico{ flex:0 0 auto; width:34px; height:34px; border-radius:50%; background:var(--paper); border:var(--line) solid var(--ink); display:grid; place-items:center; animation:ringing .22s ease-in-out infinite alternate; }
.call-ico svg{ width:17px; height:17px; fill:var(--ink); }
.bubble.call.on .call-ico{ animation:none; background:var(--mint); }
@keyframes ringing{ from{ transform:rotate(-14deg); } to{ transform:rotate(14deg); } }
.call-meta{ display:flex; flex-direction:column; line-height:1.25; }
.call-meta b{ font-size:14.5px; } .call-st{ font-size:12px; font-weight:700; opacity:.65; }
/* 이모티콘(말풍선 없이 캐릭터가 톡) */
.bubble.media.emo{ width:86px; max-width:none; background:none; border:0; animation:emopop .5s var(--spring) both; }
.bubble.media.emo img{ width:100%; height:auto; }
@keyframes emopop{ 0%{ opacity:0; transform:scale(.3) rotate(-14deg); } 60%{ opacity:1; transform:scale(1.14) rotate(5deg); } 100%{ transform:none; } }
/* 공감 하트(친구 말풍선 아래 모서리에) */
.bubble.reacted{ margin-bottom:12px; }
.react{ position:absolute; right:-10px; bottom:-13px; display:flex; align-items:center; gap:2px; padding:1px 7px 1px 5px; border:var(--line) solid var(--ink); border-radius:999px; background:var(--paper); animation:reactpop .45s var(--spring) both; }
.react svg{ width:12px; height:12px; fill:#EF4F7A; }
.react b{ font-size:11px; line-height:1.3; }
@keyframes reactpop{ 0%{ transform:scale(0); } 70%{ transform:scale(1.25); } 100%{ transform:scale(1); } }
/* 시스템 줄(초대·알림 끔·갠톡) */
.chat-sys{ align-self:center; margin:2px 0; padding:3px 11px; display:flex; align-items:center; gap:5px; border-radius:999px; background:rgba(30, 27, 46, .14); font-size:12px; font-weight:700; line-height:1.4; animation:bubble .34s var(--spring) both; }
.chat-sys svg{ width:13px; height:13px; flex:0 0 auto; }
/* 속마음 구름(보내지 않은 말) */
.think{ position:relative; align-self:flex-end; max-width:78%; margin:2px 8px 12px 0; padding:7px 13px 8px; border:var(--line) dashed rgba(30, 27, 46, .5); border-radius:20px; background:rgba(255, 255, 255, .7); font-family:var(--font-hand); font-weight:700; font-size:16px; line-height:1.3; animation:thinkin .5s var(--out) both; }
.think::before, .think::after{ content:''; position:absolute; border:var(--line) dashed rgba(30, 27, 46, .5); border-radius:50%; background:rgba(255, 255, 255, .7); }
.think::before{ width:10px; height:10px; right:16px; bottom:-10px; }
.think::after{ width:6px; height:6px; right:8px; bottom:-17px; }
@keyframes thinkin{ from{ opacity:0; transform:translateY(6px) scale(.92); } to{ opacity:1; transform:none; } }
/* 자는 척: 화면이 꺼진다 */
.chatwin{ position:relative; }
.chatwin.asleep::after{ content:''; position:absolute; inset:0; background:var(--ink); opacity:0; pointer-events:none; animation:sleepdim 1.1s .1s ease forwards; }
@keyframes sleepdim{ to{ opacity:.84; } }
/* 작은 폰: 미디어를 조금 작게 */
@media (max-height:700px){
  .bubble.photo, .bubble.location, .bubble.mapshot, .bubble.album{ width:176px; }
  .bubble.lcard{ width:196px; } .bubble.meme{ width:156px; } .bubble.media.poll{ width:192px; }
  .bubble.media.emo{ width:74px; }
}
@media (max-height:600px){
  .bubble.photo, .bubble.location, .bubble.mapshot, .bubble.album{ width:150px; }
  .bubble.lcard{ width:178px; } .bubble.meme{ width:138px; } .mm{ font-size:16px; -webkit-text-stroke-width:4px; }
  .bubble.media.voice{ padding:5px 10px 5px 5px; } .vo-play{ width:26px; height:26px; }
  .bubble.media.emo{ width:64px; }
}
@media (prefers-reduced-motion:reduce){ .call-ico, .spk, .mp-route{ animation:none; } }
/* 친구 쪽 미디어는 작게: 크면 첫 말풍선(상황 설명)이 창 위로 가려졌다(fit_check: c17 위치 · c19 셀카 · c30 앨범 모든 크기, c12·c24 작은 폰, 17~198px).
   내가 보내는 쪽(링크·짤·지도·투표)은 답한 뒤라 옛 말이 위로 밀려도 된다(진짜 카톡처럼) */
.bubble.them.photo{ width:156px; }
.bubble.them.photo.selfie{ width:100px; }
.bubble.them.location{ width:auto; }
.bubble.them.location .md-clip{ display:flex; align-items:stretch; }
.bubble.them.location .map-svg{ flex:0 0 76px; width:76px; border-right:var(--line) solid var(--ink); }
.bubble.them.location .loc-cap{ flex-direction:column; justify-content:center; align-items:flex-start; gap:1px; padding:5px 12px 5px 10px; border-top:0; }
.bubble.them.album{ width:168px; }
.bubble.them.album .al-grid{ grid-template-columns:repeat(3, 1fr); }
.bubble.them.album .al-grid img:nth-child(n+4){ display:none; }
@media (max-height:640px){
  .bubble.them.photo{ width:128px; }
  .bubble.them.photo.selfie{ width:84px; }
  .bubble.them.album{ width:150px; }
  .bubble.them.location .map-svg{ flex-basis:64px; width:64px; }
  .bubble.media.file{ padding:5px 12px 5px 5px; gap:8px; }
  .fi-ico{ width:32px; height:32px; border-radius:9px; }
  .fi-ico svg{ width:17px; height:17px; }
}
/* 카톡 맞추기 ②③(fitChat): 첫 말풍선이 가려지면 «뭐라고 보낼래?» → 친구 쪽 미디어 작게 → 한 줄 칩 */
.md-chip{ display:none; }
.chat-log.fit-mini .bubble.them.photo{ width:88px; }
.chat-log.fit-mini .bubble.them.photo.selfie{ width:62px; }
.chat-log.fit-mini .bubble.them.album{ width:116px; }
.chat-log.fit-mini .bubble.them.location .map-svg{ flex-basis:50px; width:50px; }
.chat-log.fit-chip .bubble.them.media:not(.own-chip){ display:none; }
.chat-log.fit-chip .bubble.them.media.own-chip{ width:auto; padding:6px 12px 6px 9px; }
.chat-log.fit-chip .bubble.them.media.own-chip > :not(.md-chip){ display:none; }
.chat-log.fit-chip .md-chip{ display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; line-height:1.3; }
.chat-log.fit-chip .md-chip.in-text{ display:inline-flex; gap:3px; margin-left:5px; vertical-align:-2px; font-size:.92em; opacity:.8; }
.md-chip svg{ width:16px; height:16px; flex:0 0 auto; fill:currentColor; }
.md-chip svg[fill="none"]{ fill:none; }

/* =====================================================================
   v35(9/25) 공감 카드: 반반은 위아래로. JH «좌도 우도 아닌 선택지만 아래 단추에 있다. 어차피 좌우로 넘기니까
   아래 단추 셋은 없애서 깔끔하게, 중립은 위나 아래로 쓸어서». 단추 셋은 키보드·화면 읽기용으로만 남는다(.sr-only).
   ===================================================================== */
.sr-only{ position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important;
  overflow:hidden !important; clip:rect(0 0 0 0) !important; white-space:nowrap !important; border:0 !important; }
.stamp-word.mid{ left:50%; right:auto; top:14px; transform:translateX(-50%) rotate(-3deg); background:var(--lilac); }
.swipe-card.say-mid .stamp-word.mid, .swipe-card.fly-u .stamp-word.mid, .swipe-card.fly-d .stamp-word.mid{ opacity:1; }
.deck.lean-m .swipe-card{ background:color-mix(in srgb, var(--lilac) 45%, var(--paper)); }
.swipe-card.fly-u{ animation:fly-u .47s var(--out) forwards; }
.qblock .deck .swipe-card.fly-u{ animation:fly-u .47s var(--out) forwards; }
@keyframes fly-u{ 30%{ transform:scale(1.03); } to{ transform:translateY(-120%) scale(.94); opacity:0; } }
/* 카드 밑 위아래 표시: 옆 표시와 같은 옷(테두리·그림자 없음). 위 꺾쇠는 위로, 아래 꺾쇠는 아래로 흐른다 */
/* 위 여백 6 = 옛 아래 단추 셋과 같은 자리(더미 뒤 카드가 21px 삐져나온다. -10 이면 7px 겹쳐서 gap_check 가 잡았다) */
.vlane{ display:flex; align-items:center; justify-content:center; gap:8px; margin:6px 0 0; pointer-events:none;
  transition:transform .25s var(--spring); }
.vchev{ display:block; width:15px; height:31px; }
.vchev svg{ display:block; width:100%; height:100%; overflow:visible; }
.vchev path{ fill:none; stroke:var(--ink); stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; opacity:.2; }
.vchev .c1{ animation:chev 1.5s ease-in-out infinite; }
.vchev .c2{ animation:chev 1.5s ease-in-out .18s infinite; }
.vchev .c3{ animation:chev 1.5s ease-in-out .36s infinite; }
.vlane .lane-word{ font-size:16px; }
.deck.lean-m + .vlane{ transform:scale(1.1); }
.deck.lean-m + .vlane .vchev path{ opacity:1; animation:none; }
/* 첫 두 장 안내: 오른쪽 → 왼쪽 → 아래(반반) 순서로 끌었다 놓는다(3.6초) */
.deck.teach .swipe-hand{ animation:hand-drag 3.6s ease-in-out .7s infinite; }
.deck.teach .swipe-hand .trail.r{ animation:trail-r 3.6s ease-in-out .7s infinite; }
.deck.teach .swipe-hand .trail.l{ animation:trail-l 3.6s ease-in-out .7s infinite; }
.deck.teach .swipe-card{ animation:nudge 3.6s ease-in-out .7s infinite; }
.deck.teach .stamp-word.yes{ animation:nudge-yes 3.6s ease-in-out .7s infinite; }
.deck.teach .stamp-word.no{ animation:nudge-no 3.6s ease-in-out .7s infinite; }
.deck.teach .stamp-word.mid{ animation:nudge-mid 3.6s ease-in-out .7s infinite; }
.deck.teach .lane.r{ animation:poke-r 3.6s ease-in-out .7s infinite; }
.deck.teach .lane.l{ animation:poke-l 3.6s ease-in-out .7s infinite; }
.deck.teach + .vlane{ animation:poke-v 3.6s ease-in-out .7s infinite; }
@keyframes hand-drag{
  0%{ opacity:0; transform:translate(0, 10px) scale(1); }
  4%{ opacity:1; transform:translate(0, 0) scale(.86); }
  11%{ opacity:1; transform:translate(38px, 0) scale(.86); }
  15%{ opacity:1; transform:translate(38px, -4px) scale(1); }
  20%{ opacity:1; transform:translate(0, 0) scale(1); }
  23%{ opacity:1; transform:translate(0, 0) scale(.86); }
  30%{ opacity:1; transform:translate(-38px, 0) scale(.86); }
  34%{ opacity:1; transform:translate(-38px, -4px) scale(1); }
  39%{ opacity:1; transform:translate(0, 0) scale(1); }
  42%{ opacity:1; transform:translate(0, 0) scale(.86); }
  50%{ opacity:1; transform:translate(0, 36px) scale(.86); }
  54%{ opacity:1; transform:translate(0, 36px) scale(1); }
  60%, 100%{ opacity:0; transform:translate(0, 10px) scale(1); }
}
@keyframes trail-r{ 0%, 4%, 13%, 100%{ opacity:0; } 6%, 11%{ opacity:1; } }
@keyframes trail-l{ 0%, 23%, 32%, 100%{ opacity:0; } 25%, 30%{ opacity:1; } }
@keyframes nudge{
  0%, 58%, 100%{ transform:none; }
  11%{ transform:translateX(38px) rotate(3.5deg); }
  20%{ transform:none; }
  30%{ transform:translateX(-38px) rotate(-3.5deg); }
  39%{ transform:none; }
  50%{ transform:translateY(30px); }
}
@keyframes nudge-yes{ 0%, 20%, 100%{ opacity:0; } 8%, 13%{ opacity:.9; } }
@keyframes nudge-no{ 0%, 20%, 39%, 100%{ opacity:0; } 27%, 32%{ opacity:.9; } }
@keyframes nudge-mid{ 0%, 39%, 58%, 100%{ opacity:0; } 47%, 52%{ opacity:.9; } }
@keyframes poke-r{ 0%, 20%, 100%{ transform:none; } 11%{ transform:translateX(3px) scale(1.12); } }
@keyframes poke-l{ 0%, 20%, 39%, 100%{ transform:none; } 30%{ transform:translateX(-3px) scale(1.12); } }
@keyframes poke-v{ 0%, 39%, 58%, 100%{ transform:none; } 50%{ transform:translateY(4px) scale(1.12); } }
@media (prefers-reduced-motion:reduce){ .vchev path{ animation:none; opacity:.6; } }

/* v35 말 바꾸기 알약: 하늘색 + 지구본 + 딱딱한 그림자. 처음 온 사람은 표지에서 두 번 까딱(.nudge) */
.lang-pill{ display:inline-flex; align-items:center; gap:5px; padding:2px 11px 2px 8px; background:var(--sky);
  font-family:var(--font-display); font-size:14px; line-height:1.5; box-shadow:var(--shadow-sm); }
.lang-pill svg{ display:block; width:15px; height:15px; flex:0 0 auto; fill:none; stroke:var(--ink); stroke-width:2.2; stroke-linejoin:round; }
.lang-pill .lang-word{ display:block; }
.lang-pill.nudge{ animation:langnudge 1.4s var(--spring) 2; transform-origin:50% 100%; }
@keyframes langnudge{ 0%, 45%, 100%{ transform:none; } 10%{ transform:translateY(-5px) rotate(-7deg); } 22%{ transform:translateY(0) rotate(5deg); } 33%{ transform:rotate(-2deg); } }
@media (prefers-reduced-motion:reduce){ .lang-pill.nudge{ animation:none; } }
.topbar .lang-pill{ padding-left:8px; padding-right:9px; gap:4px; }   /* 윗줄 양옆 칸은 62px(지도가 정가운데). 지구본 + EN/KO 가 그 안에 들어가게 */

/* =====================================================================
   v35(9/25) 시소를 한 몸으로. JH «밸런스 게임이 나쁘진 않은데 좀 더 그럴싸하게. 시소가 처음 만든 디자인이라 약해 보인다».
   두 카드가 나무 판자 양끝에 올라타고(.beam 이 카드째 기운다), 판자 위 다섯 자리 · 보랏빛 받침 · 땅 그림자.
   자리를 누르면 내 캡슐이 떨어져 앉는다. 고르기 전에는 판자가 살살 흔들린다(눌러 보라는 뜻).
   ===================================================================== */
.seesaw.v2 .rig{ position:relative; height:auto; margin:0; padding-bottom:50px; }
.seesaw.v2 .beam{ position:relative; z-index:1; transform:rotate(var(--tilt, 0deg)); transform-origin:50% calc(100% - 12px);
  transition:transform .62s cubic-bezier(.34, 1.5, .6, 1); }
.seesaw.v2 .rig:not(.chosen) .beam{ animation:ssrock 3.4s ease-in-out 1.3s infinite; }
@keyframes ssrock{ 0%, 100%{ transform:rotate(0deg); } 30%{ transform:rotate(-1.4deg); } 70%{ transform:rotate(1.4deg); } }
.seesaw.v2 .poles{ align-items:end; margin:0 2px -3px; }
.seesaw.v2 .pole{ cursor:pointer; font:inherit; color:inherit; width:100%; transition:background-color .25s ease, opacity .25s ease, transform .09s ease, box-shadow .09s ease; }
.seesaw.v2 .pole.lean{ transform:none; background:color-mix(in srgb, var(--lemon) 38%, var(--paper)); }
.seesaw.v2 .pole.far{ opacity:.62; }
.seesaw.v2 .vs{ align-self:center; margin-bottom:16px; }
/* 판자: 나무색 + 이음매 결 + 딱딱한 그림자. 양끝은 둥글게 */
.ss-plank{ position:relative; height:22px; margin:0 -6px; padding:0 4px;
  display:flex; align-items:center; justify-content:space-between;
  border:var(--line) solid var(--ink); border-radius:12px; box-shadow:0 3px 0 var(--ink);
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .45) 0 3px, transparent 3px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(30, 27, 46, .16) 46px 48px),
    #F6CE93; }
/* 자리 다섯: 판자에 박힌 동그라미. 고른 자리는 레몬 + 캡슐이 떨어져 앉는다 */
.seesaw.v2 .seat{ width:38px; height:38px; margin:-9px 0; padding:0; display:grid; place-items:center; overflow:visible;
  border:var(--line) solid var(--ink); border-radius:50%; background:var(--paper); box-shadow:var(--shadow-sm); }
.seesaw.v2 .seat.mid{ width:32px; height:32px; }
.seesaw.v2 .seat.on{ background:var(--lemon); }
.seesaw.v2 .seat.on::after{ content:none; }
.seesaw.v2 .seat .cap{ width:30px; height:30px; object-fit:contain; opacity:0; transform:translateY(-34px) scale(.7); pointer-events:none; }
.seesaw.v2 .seat.mid .cap{ width:26px; height:26px; }
.seesaw.v2 .seat.on .cap{ opacity:1; transform:translateY(-12px); animation:capdrop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes capdrop{ 0%{ opacity:0; transform:translateY(-46px) scale(.7) rotate(-20deg); } 55%{ opacity:1; transform:translateY(-8px) scale(1.08, .9); } 100%{ transform:translateY(-12px); } }
/* 받침: 보랏빛 삼각대 + 볼트 + 땅 그림자. 판자 가운데 밑 */
.ss-base{ position:absolute; left:50%; bottom:2px; width:84px; height:54px; margin-left:-42px; z-index:0; }
.ss-base svg{ display:block; width:100%; height:100%; overflow:visible; }
.ss-base .gnd{ fill:rgba(30, 27, 46, .16); }
.ss-base .leg{ fill:var(--lilac); stroke:var(--ink); stroke-width:3; stroke-linejoin:round; }
.ss-base .brace{ fill:none; stroke:var(--ink); stroke-width:2.4; stroke-linecap:round; opacity:.35; }
.ss-base .bolt{ fill:var(--paper); stroke:var(--ink); stroke-width:3; }
.ss-base .bolt-in{ fill:var(--ink); }
/* 판 위아래 균형(gap_check, v30 규칙): 질문 → 카드 위 끝 = 받침 아래 끝 → «완전 · 반반 · 완전». 전에는 28 대 4 였다 */
.qblock[data-kind="slide"] > .seesaw.v2{ margin-top:5px; }
.seesaw.v2 .scale-words{ margin:18px 2px 0; }
/* 무게가 실리면 시소가 한 번 출렁(받침은 그대로, 판자만 살짝 눌렸다 올라온다) */
.seesaw.v2 .rig.settle{ animation:none; }
.seesaw.v2 .rig.settle .ss-plank{ animation:plankbump .6s ease-out; }
@keyframes plankbump{ 0%{ transform:none; } 25%{ transform:scaleY(.82); } 55%{ transform:scaleY(1.06); } 100%{ transform:none; } }
/* 들어오기: 받침이 먼저 서고, 판자가 카드째 톡 내려앉는다 */
.qblock.enter[data-kind="slide"] .seesaw.v2 .ss-base{ animation:popin .5s var(--soft) .1s backwards; }
.qblock.enter[data-kind="slide"] .seesaw.v2 .beam{ animation:beamin .8s var(--soft) .18s backwards; }
@keyframes beamin{ 0%{ opacity:0; transform:translateY(-26px) rotate(-6deg); } 60%{ opacity:1; } 100%{ opacity:1; transform:rotate(0deg); } }
@media (prefers-reduced-motion:reduce){ .seesaw.v2 .rig:not(.chosen) .beam{ animation:none; } .seesaw.v2 .seat.on .cap{ animation:none; } }
.seesaw.v2{ padding:0 12px; }   /* 판자가 7도 기울면 카드 윗모서리가 바깥으로 27px 나간다. 판 여백 18 + 여기 12 안에 들어오게 */
.ss-base{ width:96px; height:60px; margin-left:-48px; }
.seesaw.v2 .rig{ padding-bottom:56px; }

/* v35 카톡 미리 맞추기: 말풍선을 다 넣은 모양을 재는 동안에는 자리만 차지하고 안 보인다(app.js preFitChat) */
.chat-log.measuring > *{ visibility:hidden; animation:none !important; }


/* v35 눌림: 시소 카드도 누르면 쑥(기울어 있어도). 글자 단추(이전 · 처음으로 · 건너뛰기 · 링크 복사 · 다시 고르기)는 눌리는 동안 옅어진다.
   전에는 이 여섯이 눌러도 아무 표시가 없었다 */
.back, .story-skip, .link-share, .mini-link{ transition:opacity .12s ease, transform .12s ease; -webkit-tap-highlight-color:transparent; }
.back:active, .story-skip:active, .link-share:active, .mini-link:active{ opacity:.5; transform:translateY(1px); }

/* v35 접는 칸(팀 더 알아보기 · 모든 사역체): 열면 속이 툭 내려오고, 머리 줄은 누르는 동안 살짝 눌린다. 전에는 글이 한 번에 뚝 나타났다 */
details.acc summary{ -webkit-tap-highlight-color:transparent; transition:background-color .12s ease; }
details.acc summary:active{ background:color-mix(in srgb, var(--ink) 6%, transparent); }
details.acc[open] > .acc-body{ animation:accin .38s var(--soft) backwards; }
@keyframes accin{ 0%{ opacity:0; transform:translateY(-8px); } 100%{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ details.acc[open] > .acc-body{ animation:none; } }
/* 넓은 화면은 더미 뒤 카드가 더 삐져나와서(1440x900 에서 위 22 · 아래 15) 반반 줄을 조금 더 내린다 */
@media (min-width:600px){ .vlane{ margin-top:13px; } }

/* v35 시소 들어오기 한 줄로: 받침 → 판자(카드째) 내려앉기 → 자리 · VS → 눈금 말 → 안내 줄.
   옛 v1 들어오기(카드가 양옆에서 · 막대 전체가 떨어짐)가 v2 에도 같이 걸려 판자와 따로 놀았고, 눈금 말과 안내 줄은 시소보다 먼저 떠 있었다 */
.qblock.enter[data-kind="slide"] .seesaw.v2 .rig,
.qblock.enter[data-kind="slide"] .seesaw.v2 .pole.left,
.qblock.enter[data-kind="slide"] .seesaw.v2 .pole.right{ animation:none; }
.qblock.enter[data-kind="slide"] .seesaw.v2 .scale-words{ animation:rise .5s var(--glide) .8s backwards; }
.qblock.enter[data-kind="slide"] > .hint-line{ animation:rise .5s var(--glide) .92s backwards; }
@media (prefers-reduced-motion:reduce){ .qblock.enter[data-kind="slide"] .seesaw.v2 .scale-words, .qblock.enter[data-kind="slide"] > .hint-line{ animation:none; } }
/* v35 «뭐라고 보낼래?» 줄이 빠진 카톡(사진 든 톡): 키 600 넘는 화면에선 첫 답장이 창 그림자에 4px 겹쳤다(430x750 c19, gap_check).
   창 위 간격(10)과 같게 14 를 둔다. 키 600 밑은 창 아래 여백 8 이 이미 있어서 그대로(v30) */
@media (min-height:601px){ .qblock[data-kind="chat"] .chat-prompt.fit-out + .replies{ margin-top:14px; } }
/* v35 시소 카드 아래: 판자(3px)와 자리 동그라미(판자 위로 9px)가 카드 아래 12px 를 덮는다. 글이 거기 안 들어가게 아래 여백을 두고,
   자리가 모자라면 그림이 먼저 줄어든다(글은 안 줄인다). 9/26 영어 375x553 에서 32문항 중 21개가 마지막 줄이 가려졌다(fit_check 시소 검사) */
.qblock[data-kind="slide"] .seesaw.v2 .pole{ padding-bottom:20px; }
/* 그림은 44px 밑으로는 안 줄인다(점처럼 보이면 없느니만 못하다). 그래도 모자라면 글이 너무 긴 것 = 문구를 줄인다 */
.qblock[data-kind="slide"] .seesaw.v2 .pole-ico{ flex:0 1 auto; min-height:44px; object-fit:contain; }
/* v35 고르기 전 살살 흔들림이 실제 판에선 안 돌았다: 들어오기(.enter) 규칙의 animation 이 흔들림(ssrock)을 덮었다.
   미리보기(?demo)에는 .enter 가 없어서 돌았고, 그래서 캡처로는 멀쩡해 보였다. 둘을 한 줄에 둔다(고르면 흔들림만 빠진다) */
.qblock.enter[data-kind="slide"] .seesaw.v2 .rig:not(.chosen) .beam{ animation:beamin .8s var(--soft) .18s backwards, ssrock 3.4s ease-in-out 1.3s infinite; }
@media (prefers-reduced-motion:reduce){ .qblock.enter[data-kind="slide"] .seesaw.v2 .rig:not(.chosen) .beam{ animation:none; } }
/* v35 카톡 사진 · 지도 · 밈 말풍선은 <figure> 라 브라우저 기본 여백(위아래 1em · 옆 40px)이 붙어 있었다: 내 지도가 오른쪽 끝에서 40px 떨어지고 친구 사진은 들여 쓰였다.
   그리고 창이 좁으면 그 말풍선이 눌려서(flex-shrink) 다음 말풍선이 지도 위로 올라탔다(JH 9/26 c17 «빨간 선 따라와»). 말풍선은 안 눌리고, 넘치면 오래된 말이 위로 밀려 올라간다 */
.chat-log > figure.bubble{ margin:0; }
.chat-log > *{ flex-shrink:0; }
/* v35 스테이지 그림은 누르는 옷을 벗는다: 이 앱에서 «잉크 테 + 딱딱한 그림자 = 누르는 것» 인데 스테이지 카드 그림이 그 옷을 입고 있어서
   테스터가 그림에서 뭘 하라는 건지 멈칫했다. 테 · 그림자를 빼고(자리는 그대로) 모서리만 둥글게. 누를 곳은 «가자» 하나 */
.stage-screen .stage-art.sticker{ border-color:transparent; box-shadow:none; border-radius:28px; }
/* 첫 판 카드, 처음 온 사람: 손가락이 «가자» 를 톡톡 두 번 */
/* 손가락은 단추 밑으로 16px 까지만(판 아래 여백 18px 안). 더 내려가면 키 작은 폰에서 판이 2px 스크롤됐다(375x553) */
.go-hand{ position:absolute; right:16%; bottom:-12px; width:44px; height:44px; pointer-events:none; opacity:0;
  animation:gohand 1.8s ease-in-out 1s infinite; }
.go-hand svg{ display:block; width:100%; height:100%; overflow:visible; filter:drop-shadow(2px 2px 0 var(--ink)); }
.go-hand path{ fill:var(--paper); stroke:var(--ink); stroke-width:15; stroke-linejoin:round; paint-order:stroke fill; }
@keyframes gohand{ 0%{ opacity:0; transform:translate(8px, 4px); } 14%{ opacity:1; transform:none; }
  26%{ transform:translate(0, 5px) scale(.9); } 38%{ transform:none; } 50%{ transform:translate(0, 5px) scale(.9); } 62%{ transform:none; opacity:1; } 80%, 100%{ opacity:0; } }
@media (prefers-reduced-motion:reduce){ .go-hand{ animation:none; opacity:1; } }
/* 시소 카드는 누르는 곳이 아니다: 누르면 그쪽 자리 둘만 톡 튄다 */
.seesaw.v2 .pole{ cursor:default; }
.seesaw.v2 .ss-plank.nudge-l .seat:nth-child(-n+2), .seesaw.v2 .ss-plank.nudge-r .seat:nth-last-child(-n+2){ animation:seatnudge .5s var(--spring); }
@keyframes seatnudge{ 0%, 100%{ transform:none; } 40%{ transform:translateY(-8px) scale(1.14); } }
/* v35 친구 반응: 친구가 내 말풍선에 누른 공감은 안쪽(가운데 쪽) 아래 모서리, «1» 이 있던 자리에. 얼굴은 그림 안에 색이 있다 */
.bubble.me .react{ right:auto; left:-10px; }
.bubble.me .react svg{ width:13px; height:13px; }
.react.r-thumb svg{ fill:#F2A516; }
/* v35 «가자» 는 그림 바로 밑(JH 9/27 «이미지 아래에 공간이 있고 그 아래에 버튼이 있잖아»). 그림 칸이 폭에 막힌 그림보다 길게 늘어나서
   그림 위아래가 비어 있었다(390x720 에서 위아래 66px씩) → 장면 그림 칸과 같게 칸 높이 상한 = 판 안쪽 폭 × 0.75(그림 높이). 남는 키는 덩어리 바깥(slead · stail)으로 간다.
   ⚠ aspect-ratio 4:3 으로 했다가 키 작고 넓은 폰(430x520~580)에서 판이 63px 넘쳤다: 칸의 최소 키가 폭 × 0.75 로 잡혀 카드 덩어리가 안 줄었다(screen_fit 이 잡음) */
.stage-in > .art-slot{ max-height:min(calc(var(--u) * 61.8), calc(var(--app-cw, 999px) * .75)); }

/* v36 신청서 판 ---------------------------------------------------------
   JH 10/12 «관심 있어요를 누르면 가벼운 신청서처럼. 목장 · 이름은 이미 넣었으니 됐고, 노트로 "가족이랑 같이" 정도».
   아래에서 올라오는 스티커 판. 판 폭은 앱 칸과 같고, 넘치면 판 안에서 스크롤한다(키보드가 떠도 보내기까지 내려갈 수 있게).
   뒤판은 반투명 잉크(흐림 없음). 누르는 것만 단추 옷(팀 칩 · 보내기 · 닫기), 이름표는 보여 주기만 해서 테만 */
.ap-back{
  position:fixed; inset:0; z-index:34; background:rgba(30,27,46,.42);
  animation:apfade .22s ease backwards;
}
@keyframes apfade{ from{ opacity:0; } }
.ap-sheet{
  position:fixed; z-index:35; left:50%; bottom:0;
  width:min(100%, 430px); max-height:calc(var(--app-h, 100dvh) - 18px);
  transform:translateX(-50%);
  border-radius:24px 24px 0 0; border-bottom:0;
  box-shadow:0 -4px 0 var(--ink);
  display:flex; flex-direction:column; overflow:hidden;
  animation:apup .42s var(--spring) backwards;
}
.ap-sheet.out{ animation:apdown .24s var(--out) forwards; }
@keyframes apup{ from{ transform:translate(-50%, 104%); } }
@keyframes apdown{ to{ transform:translate(-50%, 104%); } }
.ap-scroll{
  overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  padding:16px 18px calc(18px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column;
}
.ap-head{ display:flex; align-items:center; justify-content:space-between; }
.ap-badge{ transform:rotate(-3deg); font-size:15px; padding:5px 14px 4px; }
.ap-x{
  width:40px; height:40px; display:grid; place-items:center; padding:0; cursor:pointer;
  background:var(--paper); border:var(--line) solid var(--ink); border-radius:50%; box-shadow:var(--shadow-sm);
}
.ap-x svg{ width:18px; height:18px; fill:none; stroke:var(--ink); stroke-width:3; stroke-linecap:round; }
.ap-title{ font-size:clamp(26px, 7.6vw, 30px); -webkit-text-stroke:6px var(--ink); margin:10px 0 0; text-align:center; }
/* 누가 내는지: 처음에 넣은 이름표 그대로(작게). 고치는 곳 아님 */
.ap-who{
  align-self:center; display:flex; align-items:center; gap:8px; margin:12px 0 0;
  padding:6px 14px 5px; border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--pink);
  font-family:var(--font-display); font-size:16px;
}
.ap-who .ap-mk{ font-family:var(--font-hand); font-weight:700; font-size:16px; opacity:.85; }
.ap-label{ margin:16px 0 8px; font-family:var(--font-display); font-size:16px; text-align:left; }
.ap-label .ap-sub{ font-family:var(--font-hand); font-weight:700; font-size:15px; opacity:.7; margin-left:6px; }
.ap-teams{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.ap-team{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:8px 4px 7px; min-height:74px; cursor:pointer;
  background:var(--paper); color:var(--ink);
  border:var(--line) solid var(--ink); border-radius:16px; box-shadow:var(--shadow-sm);
  font-family:var(--font-display); font-size:14.5px; line-height:1.15; word-break:keep-all;
}
.ap-team .ap-face{
  width:34px; height:34px; border-radius:50%; overflow:hidden; border:var(--line) solid var(--ink); background:var(--tc);
}
.ap-team .ap-face img{ display:block; width:100%; height:100%; object-fit:cover; object-position:50% 12%; transform:scale(1.4) translateY(12%); }
.ap-team.on{ background:var(--tc); }
.ap-team.on::after{
  content:''; position:absolute; top:-8px; right:-6px; width:22px; height:22px; border-radius:50%;
  background:var(--ink) no-repeat center/13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation:apcheck .3s var(--spring) backwards;
}
@keyframes apcheck{ from{ transform:scale(0); } }
.ap-team .ap-mine{ font-family:var(--font-hand); font-weight:700; font-size:12.5px; opacity:.8; }
/* 영어 팀 이름은 «Announcements» 처럼 한 낱말이 칸보다 길었다(390폭에서 칸 테두리 밖으로, 10/13 캡처). 폭 따라 줄인다 */
html[lang="en"] .ap-team .ap-tname{ font-size:clamp(11px, 3.2vw, 14.5px); }
.ap-note{
  width:100%; min-height:84px; resize:none; display:block;
  border:var(--line) solid var(--ink); border-radius:var(--r-btn); background:var(--paper);
  font-family:var(--font-body); font-size:16px; line-height:1.5; color:var(--ink); padding:10px 12px;
}
.ap-note::placeholder{ color:var(--ink); opacity:.45; }
.ap-note:focus{ outline:none; box-shadow:var(--shadow-sm); }
.ap-honest{ margin:12px 2px 0; font-size:16px; line-height:1.4; text-align:center; word-break:keep-all; }
#ap-send{ margin:14px 0 0; }
.ap-sheet .link-share{ margin-top:6px; }
.ap-done{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:6px 0 0; }
.ap-done-t{ font-size:clamp(26px, 7.6vw, 30px); -webkit-text-stroke:6px var(--ink); margin:14px 0 0; }
.ap-done-s{ font-size:18px; line-height:1.45; margin:10px 0 18px; word-break:keep-all; white-space:pre-line; }
.ap-done .btn{ width:100%; }
.ap-sheet.sent .ap-form{ display:none; }
@media (max-height:600px){
  .ap-title{ margin-top:6px; }
  .ap-label{ margin:12px 0 6px; }
  .ap-team{ min-height:64px; padding:6px 3px 5px; }
  .ap-team .ap-face{ width:28px; height:28px; }
  .ap-note{ min-height:64px; }
}
@media (prefers-reduced-motion:reduce){ .ap-sheet, .ap-sheet.out, .ap-back, .ap-team.on::after{ animation:none; } }
/* 10/14 신청서가 떠 있으면 뒤 화면은 안 움직인다(손가락은 app.js touchmove 가 막고, 휠 · 데스크톱은 이것). 판 키는 자판에 맞춰 app.js apFit */
html.ap-open, html.ap-open body, html.ap-open .app{ overflow:hidden; }
.ap-back{ touch-action:none; }
.ap-sheet{ transition:bottom .18s ease, max-height .18s ease; }
/* 10/14 길게 누르기: 아이폰은 그림을 길게 누르면 «이미지 저장» 창이, 단추 글을 길게 누르면 글 고르기가 떠서 판이 끊겼다.
   게임 그림 · 누르는 것은 막고, 결과 카드 그림(#r-card)은 길게 눌러 저장할 수 있게 둔다 */
.app img{ -webkit-touch-callout:none; -webkit-user-drag:none; }
.app #r-card{ -webkit-touch-callout:default; }
.press{ -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
/* 신청을 보낸 뒤 관심 단추: 조용한 상태(선만) + 체크 */
.btn.interest.applied{
  background:var(--paper); color:var(--ink); box-shadow:var(--shadow-sm);
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.btn.interest.applied svg{ width:20px; height:20px; fill:none; stroke:var(--ink); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.ap-form{ display:flex; flex-direction:column; }
/* v36 사실 셋 한 화면(평일 낮 · 악기 · 운전). 줄마다 스티커 한 장 + 칩. 칩은 누르는 것이라 단추 옷, 고르면 잉크 */
.qblock[data-kind="facts"]{ justify-content:center; }
.fq-rows{ order:3; width:100%; display:flex; flex-direction:column; gap:12px; margin:6px 0 0; }
.fq-row{ padding:12px 14px 13px; text-align:left; }
.qblock.enter .fq-row{ animation:popin .45s var(--spring) backwards; animation-delay:calc(var(--i) * 70ms + 60ms); }
.fq-q{ margin:0; font-family:var(--font-display); font-size:18px; line-height:1.25; word-break:keep-all; }
.fq-sub{ margin:2px 0 0; font-size:15px; opacity:.72; }
.fq-chips{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.fq-chip{
  min-height:40px; padding:7px 14px 6px; cursor:pointer;
  background:var(--paper); color:var(--ink);
  border:var(--line) solid var(--ink); border-radius:var(--r-chip); box-shadow:var(--shadow-sm);
  font-family:var(--font-body); font-weight:700; font-size:15.5px; line-height:1.2; word-break:keep-all;
}
.fq-chip.on{ background:var(--ink); color:var(--paper); }
.fq-go{ order:5; width:100%; margin:16px 0 0; }
.fq-go.ready{ animation:ready .45s var(--spring); }
@media (max-height:600px){
  .fq-rows{ gap:8px; }
  .fq-row{ padding:9px 12px 10px; }
  .fq-chips{ gap:6px; margin-top:7px; }
  .fq-chip{ min-height:36px; padding:6px 12px 5px; font-size:15px; }
  .fq-go{ margin-top:12px; }
}
/* 키 540 밑(지금 폰의 카톡 인앱보다 낮음): 사실 셋 · 그림 네 칸을 한 단계 더 촘촘히. 10/13 screen_fit 영어 520~540 에서 사실 28~30px · 그림 14px 넘침 */
@media (max-height:540px){
  .fq-rows{ gap:6px; }
  .fq-row{ padding:7px 11px 8px; }
  .fq-q{ font-size:16px; }
  .fq-chips{ gap:5px; margin-top:5px; }
  .fq-chip{ min-height:33px; padding:5px 10px 4px; font-size:14.5px; }
  .fq-go{ margin-top:10px; }
  .tiles.four .tile-cap{ font-size:12.5px; }
  html[lang="en"] .tiles.four .tile-cap{ font-size:12px; }
  html[lang="en"] .qblock[data-kind="image"] > .q{ font-size:15.5px; }
  /* 영어 이야기 규칙(html[lang="en"] 붙음)이 위 «키 540 밑» 성향 카드 규칙보다 세서 영어만 배지가 72px 였다 → 같은 값으로 */
  html[lang="en"] .trait-card{ padding:12px 12px 10px; }
  html[lang="en"] .trait-badge{ width:64px; height:64px; }
  html[lang="en"] .trait-badge svg{ width:36px; height:36px; }
  html[lang="en"] .trait-name{ font-size:27px; }
}
/* 폭 380 밑(360폭 안드로이드 등): 칩 셋이 한 줄에 들어가게 조금 촘촘히. 360x640 영어에서 줄마다 칩이 두 줄로 꺾여 판이 넘쳤다(10/13 screen_fit) */
@media (max-width:380px){
  .fq-row{ padding-inline:12px; }
  .fq-chips{ gap:6px; }
  .fq-chip{ padding:6px 11px 5px; font-size:15px; }
}
/* v36 스토리 «← 이전»: 건너뛰기와 같은 옷(글자 단추), 왼쪽 끝. 앞 장으로 갈 때는 판이 오른쪽으로 빠진다 */
.story-back{
  flex:0 0 auto; background:none; border:0; padding:6px 2px; cursor:pointer;
  font-size:17px; color:var(--ink); opacity:.72;
  transition:opacity .12s ease, transform .12s ease; -webkit-tap-highlight-color:transparent;
}
.story-back:active{ opacity:.5; transform:translateY(1px); }
.story-stage.out-back{ opacity:0; transform:translateX(30px); }
/* v36 표지 말 바꾸기 단추: «시작하기» 바로 밑에 말 이름 그대로(English / 한국어). 위 알약과 같은 옷(하늘색 + 지구본 + 딱딱한 그림자)을 한 단계 크게.
   JH 10/12 «영어권 친구가 알려 주기 전까지 영어 버튼을 못 찾았다». 폰 말이 한국어가 아니면 표지가 뜬 뒤 두 번 까딱 */
.lang-cover{
  display:inline-flex; align-items:center; justify-content:center; gap:7px; align-self:center;
  margin:12px auto 0; min-height:40px; padding:6px 16px 5px 12px; cursor:pointer;
  background:var(--sky); color:var(--ink);
  border:var(--line) solid var(--ink); border-radius:var(--r-chip); box-shadow:var(--shadow-sm);
  font-family:var(--font-display); font-size:16px; line-height:1.2;
}
.lang-cover svg{ display:block; width:19px; height:19px; flex:0 0 auto; fill:none; stroke:var(--ink); stroke-width:2.2; stroke-linejoin:round; }
.lang-cover.nudge{ animation:langnudge 1.4s var(--spring) 3; transform-origin:50% 100%; }
@media (prefers-reduced-motion:reduce){ .lang-cover.nudge{ animation:none; } }
.cover.go > .lang-cover{ animation:popin .5s var(--spring) .5s backwards; }
@media (max-height:600px){ .lang-cover{ margin-top:8px; min-height:36px; padding-top:4px; padding-bottom:3px; } }
/* 들어오기(.cover.go > *)가 까딱을 덮지 않게(v35 시소 흔들림이 .enter 에 덮였던 것과 같은 함정) */
.cover.go > .lang-cover.nudge, .cover > .lang-cover.nudge{ animation:langnudge 1.4s var(--spring) 3; }
@media (prefers-reduced-motion:reduce){ .cover.go > .lang-cover.nudge, .cover > .lang-cover.nudge{ animation:none; } }

/* v36 리더 보고서 «신청서» 칸. 신청서 하나 = 카드 하나. 상태 색: 새로 옴 레몬 · 연락함 하늘 · 함께하기로 민트 · 나중에 종이 · 취소 흐리게 */
.apl-sum{ display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 0; }
.apl-tchip{ border:var(--line) solid var(--ink); cursor:pointer; font:inherit; }
.apl-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; margin:14px 0 0; }
.apl-card{ margin:0; display:flex; flex-direction:column; gap:10px; }
.apl-card.apl-cancelled{ opacity:.55; }
.apl-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.apl-who{ display:flex; align-items:baseline; gap:6px; font-size:17px; }
.apl-mk{ font-size:14px; opacity:.75; }
.apl-when{ margin-left:auto; font-size:13px; opacity:.65; }
.apl-st{ border:var(--line) solid var(--ink); }
.apl-st.apl-new{ background:var(--lemon); }
.apl-st.apl-contacted{ background:var(--sky); }
.apl-st.apl-joined{ background:var(--mint); }
.apl-st.apl-later{ background:var(--paper); }
.apl-st.apl-cancelled{ background:var(--paper); text-decoration:line-through; }
.apl-teams{ display:flex; flex-wrap:wrap; gap:6px; }
.apl-note{ margin:0; padding:10px 12px; background:var(--page); border-radius:12px; font-size:15px; line-height:1.55; white-space:pre-wrap; word-break:keep-all; overflow-wrap:anywhere; }
.apl-res{ align-self:flex-start; }
.apl-btns{ display:flex; flex-wrap:wrap; gap:6px; }
.apl-memo{ width:100%; flex:0 0 auto; }
.apl-old{ list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; }
.apl-old li{ display:flex; align-items:center; gap:8px; font-size:15px; }

/* 결과 카드 화살표(10/13 JH «결과 카드가 있는지 모르더라. 손글씨 같은 화살표로 누르라고»). 신청서를 보낸 뒤 마지막 장에서
   대화창 위 테두리에서 «결과 카드 보기» 단추로 손으로 긋듯 그려지고(ca-draw), 그다음 단추 쪽으로 살짝 콕콕(ca-poke). 자리 · 길이는 app.js cardArrow */
.card-arrow{ position:absolute; z-index:3; pointer-events:none; overflow:visible; color:var(--ink); }
.card-arrow path{ fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.card-arrow.ca-draw .ca-line{ stroke-dasharray:var(--len) var(--len); stroke-dashoffset:var(--len); animation:ca-ink .5s cubic-bezier(.35,.6,.4,1) .1s forwards; }
.card-arrow.ca-draw .ca-head{ stroke-dasharray:var(--hl) var(--hl); stroke-dashoffset:var(--hl); animation:ca-ink .16s ease-out .6s forwards; }
.card-arrow.ca-poke{ animation:ca-nudge 1.5s ease-in-out .95s infinite; }
.card-arrow.ca-poke-now{ animation:ca-nudge 1.5s ease-in-out infinite; }
@keyframes ca-ink{ to{ stroke-dashoffset:0; } }
@keyframes ca-nudge{ 0%, 55%, 100%{ transform:translate(0, 0); } 25%{ transform:translate(var(--px), var(--py)); } }

/* 마지막 장 대답(10/13 JH «게임에서 NPC 랑 대화하듯이»). 대화창 안 오른쪽 아래, 누르는 것이라 잉크 테 + 딱딱한 그림자. 관심 있어(레몬) · 지금은 괜찮아(흰) */
.dlg-choices{ display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.dlg-choice{
  min-height:44px; padding:8px 16px;
  border:var(--line) solid var(--ink); border-radius:var(--r-chip);
  background:var(--paper); color:var(--ink);
  font-family:var(--font-display); font-size:16px; line-height:1.2; white-space:nowrap;
  box-shadow:var(--shadow-sm); cursor:pointer;
}
.dlg-choice.yes{ background:var(--lemon); }
.dlg-choices.in .dlg-choice{ animation:popin .42s var(--spring) backwards; }
.dlg-choices.in .dlg-choice + .dlg-choice{ animation-delay:.09s; }
html[lang="en"] .dlg-choice{ font-size:15px; }
@media (max-height:700px){
  .dlg-choices{ margin-top:8px; }
  .dlg-choice{ min-height:42px; padding:7px 14px; font-size:15px; }
}
/* 마지막 장, 대화창 얼굴이 «결과 카드 보기» 를 덮을 만큼 좁을 때(app.js askRoom): 캐릭터를 줄인다 */
.story-stage.ask-tight{ gap:6px; }
.story-stage.ask-tight .ask-hero{ --hero:92px; }
/* 결과 카드 화살표가 있는 동안 관심 단추 테두리 물결은 멈춘다(움직이며 부르는 건 한 번에 하나) */
.btn.interest.big.halo-off:not(.done)::after{ animation:none; opacity:0; }   /* 원래 물결 규칙(.btn.interest.big:not(.done)::after)보다 세게 */

/* 리더 보고서 «한눈에»(10/13 JH «목사님이 보시더니 뭔지 잘 모르시더라. 필요한 중요한 정보만 한눈에»).
   큰 숫자 셋 → 연락을 기다리는 사람(단추 하나) → 팀별로 보기(눌러서 펼침) → 목장별 → 자세한 기록. 담는 판은 테만, 누르는 것만 딱딱한 그림자 */
#sheet:has(#home:not([hidden])) > h1{ max-width:760px; margin-inline:auto; }
.hm{ max-width:760px; margin-inline:auto; }
.hm-when{ margin:6px 0 0; font-size:14px; opacity:.72; }
.hm-nums{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; margin:16px 0 0; }
.hm-num{
  display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center;
  padding:14px 8px 12px; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper);
}
.hm-num b{ font-family:var(--font-display); font-weight:400; font-size:32px; line-height:1.05; font-variant-numeric:tabular-nums; }
.hm-num span{ font-size:14px; font-weight:700; line-height:1.3; word-break:keep-all; }
.hm-num.hot{ background:var(--lemon); }
.hm-h{ font-family:var(--font-display); font-weight:400; font-size:21px; margin:34px 0 0; display:flex; align-items:center; gap:8px; }
.hm-n{ font-family:var(--font-body); font-weight:700; font-size:14px; padding:3px 11px; border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--lemon); }
.hm-n:empty{ display:none; }
.hm-sub{ margin:6px 0 0; font-size:14.5px; opacity:.78; line-height:1.55; word-break:keep-all; }
.hm-empty{ margin:0; padding:14px 2px; font-size:15px; opacity:.7; }
.hm-wait{ display:grid; gap:12px; margin:14px 0 0; }
.hm-card{ padding:14px 16px 16px; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); }
.hm-chead{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.hm-cname{ font-family:var(--font-display); font-weight:400; font-size:21px; }
.hm-cmk{ font-size:14.5px; font-weight:700; opacity:.75; }
.hm-cwhen{ margin-left:auto; font-size:13.5px; opacity:.65; }
.hm-cteams{ display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 0; }
.hm-cteams .chip{ padding:5px 12px; font-size:14px; box-shadow:none; }
.hm-cnote{ margin:10px 0 0; padding:10px 12px; border-radius:12px; background:var(--page); font-size:15px; line-height:1.5; word-break:keep-all; overflow-wrap:anywhere; }
.hm-done{ margin:14px 0 0; min-height:52px; font-size:19px; }
.hm-card.marked{ background:var(--mint); padding-block:12px; }
.hm-marked{ margin:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; font-size:15px; font-weight:700; word-break:keep-all; }
.hm-teams{ display:grid; gap:10px; margin:14px 0 0; }
.hm-team{ border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); box-shadow:var(--shadow-sm); overflow:hidden; }
.hm-tsum{ display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--tc); cursor:pointer; list-style:none; }
.hm-tsum::-webkit-details-marker{ display:none; }
.hm-tsum::after{ content:''; flex:0 0 auto; width:9px; height:9px; margin:0 4px 0 2px; border-right:2.5px solid var(--ink); border-bottom:2.5px solid var(--ink); transform:rotate(-45deg); transition:transform .18s ease; }
.hm-team[open] .hm-tsum::after{ transform:rotate(45deg); }
.hm-team[open] .hm-tsum{ border-bottom:var(--line) solid var(--ink); }
.hm-face{ width:40px; height:40px; flex:0 0 auto; border-radius:50%; border:var(--line) solid var(--ink); background:var(--paper); object-fit:cover; }
.hm-tname{ font-family:var(--font-display); font-weight:400; font-size:18px; white-space:nowrap; }
.hm-tcnt{ margin-left:auto; display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:4px 8px; font-size:14px; font-weight:700; }
.hm-tapp{ opacity:.6; }
.hm-tapp.on{ opacity:1; padding:2px 10px; border:var(--line) solid var(--ink); border-radius:var(--r-chip); background:var(--paper); }
.hm-tres{ opacity:.8; }
.hm-tbody{ padding:2px 16px 16px; }
.hm-tlabel{ margin:14px 0 6px; font-family:var(--font-display); font-size:15px; }
.hm-none{ margin:0; font-size:14.5px; opacity:.6; }
.hm-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.hm-list li{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:15px; }
.hm-list b{ font-size:16.5px; }
.hm-mkl{ font-size:14px; opacity:.7; }
.hm-first{ font-size:12.5px; font-weight:700; padding:1px 8px; border:1.5px solid var(--ink); border-radius:var(--r-chip); }
.hm-st{ font-size:13px; font-weight:700; padding:2px 10px; border:1.5px solid var(--ink); border-radius:var(--r-chip); background:var(--paper); }
.hm-st.hm-new{ background:var(--lemon); }
.hm-st.hm-contacted{ background:var(--sky); }
.hm-st.hm-joined{ background:var(--mint); }
.hm-note{ flex:1 0 100%; font-size:14px; line-height:1.45; padding:6px 10px; border-radius:10px; background:var(--page); word-break:keep-all; overflow-wrap:anywhere; }
.hm-names{ margin:0; font-size:15px; line-height:1.7; word-break:keep-all; }
.hm-mk{ display:grid; grid-template-columns:repeat(auto-fill, minmax(118px, 1fr)); gap:8px; margin:14px 0 0; }
.hm-mkrow{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:10px 14px; border:var(--line) solid var(--ink); border-radius:14px; background:var(--paper); font-size:15px; font-weight:700; }
.hm-mkrow b{ font-family:var(--font-display); font-weight:400; font-size:18px; font-variant-numeric:tabular-nums; }
.hm-more{ display:block; width:100%; margin:36px 0 0; }
.hm-back{ margin:14px 0 0; }
@media (max-width:400px){
  .hm-num b{ font-size:28px; }
  .hm-num span{ font-size:13px; }
  .hm-tcnt{ font-size:13px; }
  .hm-tname{ font-size:17px; }
}

/* 질문 검토 페이지(/review.html, 10/13 JH «검토할 사람들이 바로 comment 달 수 있게»). 팀 묶음 → 질문 카드(한 · 영, 보기마다 팀 딱지) → 댓글 */
.rvw{ max-width:820px; }
.rvw-intro{ margin:14px 0 0; padding:16px 18px; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); font-size:15.5px; line-height:1.6; word-break:keep-all; }
.rvw-intro p{ margin:6px 0 0; }
.rvw-intro .rvw-lead{ margin:0; font-family:var(--font-display); font-size:19px; }
.rvw-namebox{ display:flex; align-items:center; gap:10px; margin:14px 0 0; font-weight:700; }
.rvw-namebox .search{ max-width:240px; }
.rvw-nav{ display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 0; }
.rvw-total{ flex:1 0 100%; margin:0 0 2px; font-size:14px; font-weight:700; opacity:.75; }
.rvw-jump{ text-decoration:none; color:var(--ink); font-size:14px; }
.rvw-group{ margin:34px 0 0; scroll-margin-top:12px; }
.rvw-ghead{ display:flex; align-items:center; gap:12px; padding:12px 16px; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); }
.rvw-ghead h2{ margin:0; font-family:var(--font-display); font-weight:400; font-size:21px; }
.rvw-ghead p{ margin:4px 0 0; font-size:14px; line-height:1.45; word-break:keep-all; }
.rvw-face{ width:52px; height:52px; flex:0 0 auto; border-radius:50%; border:var(--line) solid var(--ink); background:var(--paper); object-fit:cover; }
.rvw-qs{ display:grid; gap:12px; margin:12px 0 0; }
.rvw-q{ padding:14px 16px 14px; border:var(--line) solid var(--ink); border-radius:var(--r-card); background:var(--paper); }
.rvw-qhead{ display:flex; justify-content:space-between; gap:10px; font-size:13px; font-weight:700; opacity:.65; }
.rvw-line, .rvw-qt, .rvw-bub{ margin:0; display:flex; flex-direction:column; gap:2px; word-break:keep-all; }
.rvw-qt{ margin:8px 0 0; }
.rvw-qt .rvw-ko{ font-family:var(--font-display); font-size:18px; line-height:1.4; }
.rvw-ko{ font-size:15.5px; line-height:1.45; }
.rvw-en{ font-size:13.5px; line-height:1.4; color:#6A6577; }
.rvw-from{ margin:8px 0 6px; font-family:var(--font-display); font-size:15px; }
.rvw-bubs{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.rvw-bub{ max-width:88%; padding:8px 12px; border:1.5px solid var(--ink); border-radius:16px 16px 16px 4px; background:var(--page); }
.rvw-scene{ display:block; width:100%; max-width:300px; aspect-ratio:4/3; object-fit:cover; margin:10px 0 0; border-radius:12px; border:1.5px solid var(--ink); }
.rvw-opts{ list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.rvw-opts li{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:12px; background:var(--page); }
.rvw-opts li.hot{ background:var(--paper); outline:var(--line) solid var(--ink); }
.rvw-otext{ flex:1 1 auto; min-width:0; }
.rvw-side{ display:block; font-size:12.5px; font-weight:700; opacity:.6; }
.rvw-tile{ width:56px; height:56px; flex:0 0 auto; object-fit:cover; border-radius:10px; border:1.5px solid var(--ink); }
.rvw-tag{ flex:0 0 auto; font-size:13px; font-weight:700; padding:3px 10px; border:1.5px solid var(--ink); border-radius:var(--r-chip); white-space:nowrap; }
.rvw-tag.plain{ background:var(--paper); opacity:.7; }
.rvw-cm{ margin:12px 0 0; padding:10px 0 0; border-top:1.5px dashed rgba(30,27,46,.25); display:grid; gap:8px; }
.rvw-cmlist{ display:grid; gap:8px; }
.rvw-cmlist:empty{ display:none; }
.rvw-c{ padding:8px 12px; border-radius:12px; background:var(--lemon); }
.rvw-cmeta{ display:flex; align-items:center; gap:8px; font-size:13px; }
.rvw-cmeta span{ opacity:.65; }
.rvw-del{ margin-left:auto; border:0; background:none; font:inherit; font-size:13px; text-decoration:underline; cursor:pointer; color:var(--ink); padding:4px 2px; }
.rvw-ctext{ margin:4px 0 0; font-size:15px; line-height:1.5; white-space:pre-wrap; word-break:keep-all; overflow-wrap:anywhere; }
.rvw-open{ justify-self:start; }
.rvw-form{ display:grid; gap:8px; }
.rvw-ta{ width:100%; min-height:80px; resize:vertical; line-height:1.5; }
.rvw-frow{ display:flex; justify-content:flex-end; gap:8px; }
@media (max-width:420px){
  .rvw-opts li{ flex-wrap:wrap; }
  .rvw-tile{ width:48px; height:48px; }
}

/* 10/13 신청서: 팀을 안 골랐을 때 «보내기» 는 흐리게만(누르면 «팀을 하나는 골라 줘» + 팀 칸 도리도리). disabled 면 눌러도 아무 일이 없다 */
#ap-send.idle{ opacity:.42; box-shadow:none; transform:translate(2px,2px); }
#ap-teams.shake{ animation:shake .4s ease both; }
/* 10/13 키 작은 폰: 대화창 얼굴 동그라미가 대사 첫 줄 위를 덮었다(375x553 · 360x520 에서 6px 안팎, v36 전부터).
   얼굴을 조금 줄이고 내려서 첫 줄 글자 위에서 끝나게 한다. 이름표도 얼굴 옆으로 붙인다 */
@media (max-height:640px){
  .dialog-face{ width:52px; height:52px; top:-30px; }
  .dialog-name{ left:74px; }
}
@media (max-height:560px){
  .dialog-face{ width:46px; height:46px; top:-29px; }
  .dialog-name{ left:68px; }
}

/* 10/13 리더 보고서 «두 팀 사이»(경고 없이 안정성만 낮은 판): 사람 탓이 아니라 결과가 두 팀에 걸친 것이라 경고색(복숭아) 말고 하늘색 */
.rp-badge.rp-close{ background:var(--sky); }
.bignum.rp-close{ background:var(--sky); }
