/* 따라하기 — 단계별 애니메이션 튜토리얼.
 *
 * 화면 녹화가 아니라 CSS 애니메이션으로 그린다. 그래야
 *   · 용량이 거의 들지 않고 (영상 파일 없음)
 *   · 휴대폰에서도 또렷하며
 *   · 글자를 고치면 바로 반영된다.
 *
 * 각 단계는 .scene 하나다. 보일 때만 .is-on 이 붙고, 그때 애니메이션이 처음부터 돈다
 * (없으면 숨어 있는 동안 애니메이션이 다 지나가 버린다).
 */

.guide-tag {
  margin-left: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(81, 207, 102, .14); color: var(--accent);
  border: 1px solid rgba(81, 207, 102, .35);
}

.guide-main {
  max-width: 860px; margin: 0 auto;
  padding: 18px 16px calc(40px + env(safe-area-inset-bottom, 0px));
}

/* ── 무대 ──────────────────────────────────────────── */

.stage-wrap {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
}
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 80% at 50% 0%, #141a22 0%, #0c0f13 70%);
}
.scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 18px; padding: 22px;
  opacity: 0; visibility: hidden; transition: opacity .35s ease;
}
.scene.is-on { opacity: 1; visibility: visible; }

/* 움직임을 줄이도록 설정한 사용자에게는 애니메이션 없이 결과만 보여 준다. */
@media (prefers-reduced-motion: reduce) {
  .scene *, .scene *::before, .scene *::after { animation: none !important; transition: none !important; }
  .scene .typed { width: auto !important; }
  .scene .cursor { display: none; }
}

/* ── 가짜 UI 조각 (앱 화면을 작게 흉내 낸다) ─────────── */

.ui-card {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-size: 13px; width: min(360px, 100%);
}
.ui-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ui-h { font-size: 11.5px; color: var(--text-faint); font-weight: 700; }

.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  align-self: flex-start; white-space: nowrap;
}
.ui-btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-color: #2f9e44; color: #06240f;
}
.ui-btn.sm { padding: 5px 10px; font-size: 11.5px; }
.ui-btn.wide { align-self: stretch; }

.ui-f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-dim); }
.ui-f b { color: var(--text); font-size: 12px; }
.hintlet { color: var(--text-faint); font-size: 10.5px; }
.ui-input {
  display: block; height: 30px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg-2);
  font-style: normal; font-family: var(--mono); font-size: 12px;
  color: var(--text); padding: 6px 9px; overflow: hidden; white-space: nowrap;
}
.ui-input::after { content: attr(data-type); }

.ui-tabs { display: flex; gap: 4px; margin-bottom: 2px; }
.ui-tabs span {
  padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 700;
  color: var(--text-faint);
}
.ui-tabs .on { background: var(--bg-2); color: var(--accent); }

/* 눌리는 느낌 — 커서가 닿는 시점에 맞춰 살짝 눌렀다 올라온다 */
.is-on [data-click="1"] { animation: press 1s ease 2.4s 1 both; }
.is-on [data-click="2"] { animation: press 1s ease 1.6s 1 both; }
@keyframes press {
  0%, 40% { transform: scale(1); filter: brightness(1); }
  52%     { transform: scale(.94); filter: brightness(1.25); }
  70%,100%{ transform: scale(1); filter: brightness(1); }
}

/* 움직이는 손가락/커서.
   left/top 은 JS 가 대상 버튼의 중심으로 맞춘다 (레이아웃이 바뀌어도 어긋나지 않게).
   애니메이션은 그 지점을 향해 다가오는 것만 담당한다. */
.cursor {
  position: absolute; left: 0; top: 0; margin: -11px 0 0 -11px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--accent); background: rgba(81,207,102,.22);
  pointer-events: none; opacity: 0;
}
.cursor::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
}
.is-on .cursor { animation: cursor-in 3.4s ease forwards; }
.is-on .cursor::after { animation: tap-ring 1s ease 2.6s 1 both; }
@keyframes cursor-in {
  0%   { opacity: 0; transform: translate(60px, 70px) scale(1.3); }
  25%  { opacity: 1; }
  70%  { opacity: 1; transform: translate(0, 0) scale(1); }
  78%  { transform: translate(0, 0) scale(.8); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes tap-ring {
  0%   { opacity: .9; transform: scale(.5); }
  100% { opacity: 0;  transform: scale(1.6); }
}

/* ── 1. 전장 소개 ──────────────────────────────────── */

.arena-mini {
  position: relative; width: min(420px, 92%); aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #0a0d11;
}
.grid-bg {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
}
.arena-label {
  position: absolute; left: 10px; top: 8px;
  font-size: 10.5px; color: var(--text-faint); font-family: var(--mono);
}
.mini-tank {
  position: absolute; width: 11%; aspect-ratio: 1; border-radius: 4px;
}
.mini-tank .barrel {
  position: absolute; left: 50%; top: 42%; width: 85%; height: 14%;
  border-radius: 2px; background: inherit;
}
.t-green  { background: var(--accent); left: 18%; top: 62%; transform: rotate(-45deg); }
.t-purple { background: #7048e8;      left: 64%; top: 22%; }
.is-on .t-green  { animation: drive-a 9s ease-in-out infinite; }
.is-on .t-purple { animation: drive-b 9s ease-in-out infinite; }
/* 레이더가 차체 정면만 보므로 초록 탱크는 상대(북동쪽)를 향해 차체를 돌린다 */
@keyframes drive-a {
  0%,10%  { transform: translate(0,0) rotate(-45deg); }
  45%     { transform: translate(90%, -90%) rotate(-45deg); }
  70%,100%{ transform: translate(60%, -60%) rotate(-45deg); }
}
@keyframes drive-b {
  0%,10%  { transform: translate(0,0); }
  45%     { transform: translate(-40%, 40%); }
  70%,100%{ transform: translate(-20%, 30%); }
}
/* 레이더는 차체 정면 90도만 본다. 부채꼴 안을 좌우로 왕복하며 상대를 잡는다 */
.radar-ring {
  position: absolute; left: 18%; top: 62%; width: 11%; aspect-ratio: 1;
  border-radius: 50%; transform-origin: 50% 50%;
}
.is-on .radar-ring {
  animation: radar-follow 9s ease-in-out infinite;
}
.radar-ring::before {
  /* 북동쪽(상대가 있는 쪽)을 중심으로 한 90도 부채꼴 */
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 340%; height: 340%; margin: -170% 0 0 -170%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(34,184,207,.22) 0deg 90deg, transparent 90deg 360deg);
  -webkit-mask: radial-gradient(circle, #000 0 69%, transparent 70%);
          mask: radial-gradient(circle, #000 0 69%, transparent 70%);
}
.radar-ring::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 170%; height: 2px; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(34,184,207,.9), transparent);
  animation: sweep .5s ease-in-out infinite alternate;
}
@keyframes sweep {
  from { transform: rotate(-90deg); }
  to   { transform: rotate(0deg); }
}
@keyframes radar-follow {
  0%,10%  { transform: translate(0,0); }
  45%     { transform: translate(90%, -90%); }
  70%,100%{ transform: translate(60%, -60%); }
}
/* 포탄 한 발과 피격 */
.shot {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #ffd43b; box-shadow: 0 0 8px #ffd43b; opacity: 0;
  left: 26%; top: 64%;
}
.is-on .shot { animation: fly 9s linear infinite; }
@keyframes fly {
  0%,74%  { opacity: 0; transform: translate(0,0); }
  76%     { opacity: 1; transform: translate(0,0); }
  88%     { opacity: 1; transform: translate(190%, -150%); }
  90%,100%{ opacity: 0; transform: translate(190%, -150%); }
}
.boom {
  position: absolute; left: 64%; top: 22%; width: 11%; aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(circle, #ffd43b, transparent 70%);
  opacity: 0; transform: translate(-20%, 30%);
}
.is-on .boom { animation: boom 9s linear infinite; }
@keyframes boom {
  0%,88%  { opacity: 0; transform: translate(-20%,30%) scale(.4); }
  92%     { opacity: 1; transform: translate(-20%,30%) scale(1.5); }
  100%    { opacity: 0; transform: translate(-20%,30%) scale(1.8); }
}

/* ── 3. 승인 ───────────────────────────────────────── */

.ui-gate { align-items: center; text-align: center; position: relative; }
.ui-gate b { font-size: 14px; }
.ui-gate p { margin: 0; color: var(--text-dim); font-size: 12px; }
.ui-gate .ui-btn { align-self: center; }
.gate-clock { width: 40px; height: 40px; color: var(--warn); }
.gate-clock svg { width: 100%; height: 100%; }
.is-on .gate-clock .hand { transform-origin: 12px 12px; animation: tick 4s steps(8) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.stamp {
  position: absolute; inset: auto 0 14px; margin: 0 auto; width: fit-content;
  padding: 6px 16px; border-radius: 8px; font-weight: 800; font-size: 13px;
  color: var(--accent); border: 2px solid var(--accent);
  background: rgba(81,207,102,.12); opacity: 0;
}
.is-on .stamp { animation: stamp-in .6s ease 5s forwards; }
@keyframes stamp-in {
  0%   { opacity: 0; transform: scale(1.6) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(-4deg); }
}

/* ── 4. 격납고 ─────────────────────────────────────── */

.garage-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.tank-big { position: relative; width: 120px; height: 100px; flex: none; }
.tank-big .body {
  position: absolute; left: 10px; top: 24px; width: 100px; height: 52px;
  border-radius: 10px; background: var(--accent);
  display: grid; place-items: center;
}
.is-on .tank-big .body { animation: repaint 10s ease infinite; }
@keyframes repaint {
  0%,24%  { background: var(--accent); }
  34%,58% { background: #fd7e14; }
  68%,100%{ background: #4dabf7; }
}
.tank-big .emblem {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: #0c0f13; color: #fff; font-weight: 800; font-size: 14px;
  transform: rotate(45deg); border: 2px solid rgba(255,255,255,.75);
}
.tank-big .emblem { border-radius: 4px; }
.is-on .tank-big .emblem { animation: reshape 10s ease infinite; }
@keyframes reshape {
  0%,58%  { border-radius: 4px; transform: rotate(45deg); }
  70%,100%{ border-radius: 50%; transform: rotate(0deg); }
}
.tank-big .barrel-big {
  position: absolute; left: 95px; top: 44px; width: 44px; height: 11px;
  border-radius: 3px; background: #495057;
}
.tank-big .track {
  position: absolute; left: 6px; width: 108px; height: 11px;
  border-radius: 4px; background: #343a40;
}
.tank-big .track.top { top: 14px; }
.tank-big .track.bot { top: 76px; }

.ui-paint { width: min(260px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips i {
  width: 24px; height: 24px; border-radius: 7px; background: var(--c);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset; border: 2px solid transparent;
}
.chips i.pick { border-color: #fff; }
.shapes { display: flex; gap: 8px; }
.shapes .sh {
  width: 30px; height: 30px; background: var(--bg-2);
  border: 1px solid var(--line);
}
.shapes .circle  { border-radius: 50%; }
.shapes .diamond { transform: rotate(45deg); border-radius: 4px; }
.shapes .square  { border-radius: 4px; }
.shapes .shield  { border-radius: 4px 4px 14px 14px; }
.shapes .pick { border-color: var(--accent); background: rgba(81,207,102,.14); }

/* ── 5. 새 봇 ──────────────────────────────────────── */

/* 빈 줄이 접히면 카드가 줄어 위쪽 버튼까지 올라간다. 높이를 잡아 둔다. */
.ui-botlist { min-height: 132px; justify-content: flex-start; }
.ui-botlist .ui-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 8px; background: var(--bg-2);
  font-size: 12.5px; font-weight: 600;
}
.ui-botlist .empty { color: var(--text-faint); font-weight: 400; }
.is-on .ui-botlist .empty { animation: fade-out .4s ease 3.1s forwards; }
@keyframes fade-out { to { opacity: 0; height: 0; padding: 0; margin: 0; } }
.ui-botlist .born { opacity: 0; border: 1px solid var(--accent); }
.is-on .ui-botlist .born { animation: fade-in .5s ease 3.4s forwards; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ui-botlist .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── 6. 전술 적기 ──────────────────────────────────── */

.ui-prompt { width: min(400px, 100%); }
.ui-textarea {
  min-height: 74px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); padding: 9px 10px; font-size: 12.5px; line-height: 1.6;
  color: var(--text);
}
.typed { white-space: pre-wrap; }
.is-on .typed::after {
  /* 한 글자씩 치는 대신 통째로 넣고 가림막을 걷는 방식이 한글에서 깨지지 않는다 */
  content: '적을 찾으면 거리 300을 유지하며 예측 사격하고, 체력이 50 아래로 떨어지면 부스터로 빠진다.';
}
.is-on .typed {
  display: inline-block; overflow: hidden; white-space: nowrap;
  max-width: 0; animation: type 5.2s steps(46) 2.6s forwards;
}
@keyframes type { to { max-width: 100%; } }
.caret {
  display: inline-block; width: 2px; height: 14px; background: var(--accent);
  vertical-align: -2px; margin-left: 1px;
}
.is-on .caret { animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.ui-btn.voice .vdot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint);
}
.is-on .ui-btn.voice { animation: voice-on 13s linear forwards; }
@keyframes voice-on {
  0%, 14%   { border-color: var(--line); color: var(--text); }
  15%, 100% { border-color: #5c2b2b; color: var(--danger); }
}
.is-on .ui-btn.voice .vdot { animation: vdot 13s linear forwards; }
@keyframes vdot {
  0%, 14%   { background: var(--text-faint); }
  15%, 100% { background: var(--danger); }
}
.voice-hint { margin: 0; font-size: 11.5px; color: var(--text-faint); opacity: 0; }
.is-on .voice-hint { animation: fade-in .4s ease 2.2s forwards; }

/* ── 7. 생성 흐름 ──────────────────────────────────── */

.gen-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gen-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; min-width: 112px; text-align: center;
  display: flex; flex-direction: column; gap: 7px; align-items: center;
  opacity: .25;
}
.gen-box b { font-size: 12.5px; }
.gen-box span { font-size: 11px; color: var(--text-faint); }
.is-on .b1 { animation: light .4s ease .3s forwards; }
.is-on .b2 { animation: light .4s ease 3.4s forwards; }
.is-on .b3 { animation: light .4s ease 6.6s forwards; }
@keyframes light { to { opacity: 1; border-color: var(--accent); } }
.gen-arrow {
  width: 34px; height: 2px; background: var(--line); position: relative; opacity: .3;
}
.gen-arrow::after {
  content: ''; position: absolute; right: -1px; top: -3px;
  border-left: 7px solid var(--line); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.is-on .a1 { animation: light .4s ease 1.9s forwards; }
.is-on .a2 { animation: light .4s ease 5.2s forwards; }
.code-lines { display: flex; flex-direction: column; gap: 3px; width: 64px; }
.code-lines i { height: 3px; border-radius: 2px; background: var(--line); width: 100%; }
.code-lines i:nth-child(2) { width: 78%; }
.code-lines i:nth-child(3) { width: 90%; }
.code-lines i:nth-child(4) { width: 62%; }
.is-on .code-lines i { animation: line-in .3s ease forwards; opacity: 0; }
.is-on .code-lines i:nth-child(1) { animation-delay: 3.6s; }
.is-on .code-lines i:nth-child(2) { animation-delay: 3.9s; }
.is-on .code-lines i:nth-child(3) { animation-delay: 4.2s; }
.is-on .code-lines i:nth-child(4) { animation-delay: 4.5s; }
@keyframes line-in { to { opacity: 1; background: var(--accent); } }
.ok-badge {
  padding: 3px 9px; border-radius: 999px; font-weight: 700;
  color: var(--accent) !important; border: 1px solid #2b5c37; background: rgba(81,207,102,.1);
}
.gen-wait {
  margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--warn);
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
}

/* ── 8. 시합 ───────────────────────────────────────── */

.ui-slots {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  width: min(380px, 100%);
}
.ui-slots .slot {
  border: 1px dashed var(--line); border-radius: 9px; padding: 14px 8px;
  text-align: center; font-size: 12px; background: var(--bg-2); opacity: 0;
}
.ui-slots .slot.empty { color: var(--text-faint); opacity: 1; }
.is-on .s1 { animation: fade-in .4s ease .6s forwards; border-color: var(--accent); }
.is-on .s2 { animation: fade-in .4s ease 1.3s forwards; }
.is-on .s3 { animation: fade-in .4s ease 2.0s forwards; }
.match-bar {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.match-bar .chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.match-bar .chk i {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.is-on .match-bar .chk i { animation: check .3s ease 2.8s forwards; }
@keyframes check { to { background: var(--accent); border-color: var(--accent); } }

/* ── 9. 리그 ───────────────────────────────────────── */

.ui-league { width: min(360px, 100%); }
.lg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lg-head b { font-size: 13.5px; }
.pill {
  font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  color: var(--info); border: 1px solid #24455c; background: rgba(77,171,247,.1);
}
.lg-meta { font-size: 11.5px; color: var(--text-faint); }
.bracket { display: flex; gap: 6px; margin-top: 4px; }
.bracket .bx {
  flex: 1; height: 8px; border-radius: 3px; background: var(--bg-2);
  border: 1px solid var(--line);
}
.is-on .bracket .bx { animation: light .3s ease forwards; opacity: .3; }
.is-on .bracket .bx:nth-child(1) { animation-delay: 4.4s; }
.is-on .bracket .bx:nth-child(2) { animation-delay: 4.9s; }
.is-on .bracket .bx:nth-child(3) { animation-delay: 5.4s; }
.is-on .bracket .bx:nth-child(4) { animation-delay: 5.9s; }
.bracket .bx.win { background: rgba(81,207,102,.25); }

/* ── 10. 규칙 ──────────────────────────────────────── */

.rules-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: min(460px, 100%);
}
.rule {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 11px 8px; text-align: center; opacity: 0;
}
.rule b { display: block; font-size: 18px; font-family: var(--mono); font-weight: 800; }
.rule span { font-size: 10.5px; color: var(--text-faint); }
.rule.wide { grid-column: 1 / -1; }
.rule.wide b { font-size: 13px; }
.is-on .rule { animation: fade-in .4s ease forwards; }
.is-on .rule:nth-child(1) { animation-delay: .3s; }
.is-on .rule:nth-child(2) { animation-delay: .8s; }
.is-on .rule:nth-child(3) { animation-delay: 1.3s; }
.is-on .rule:nth-child(4) { animation-delay: 1.8s; }
.is-on .rule:nth-child(5) { animation-delay: 2.3s; }
.is-on .rule:nth-child(6) { animation-delay: 2.8s; }
.is-on .rule:nth-child(7) { animation-delay: 3.3s; }
.is-on .rule:nth-child(8) { animation-delay: 3.8s; }
.is-on .rule:nth-child(9) { animation-delay: 4.4s; }

/* ── 설명과 조작 ───────────────────────────────────── */

.caption { padding: 18px 2px 6px; min-height: 118px; }
.cap-no {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-faint);
  letter-spacing: .06em; margin-bottom: 4px;
}
.caption h2 { margin: 0 0 6px; font-size: 21px; }
.caption p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.65; }
.cap-tip {
  margin-top: 8px !important; font-size: 12.5px !important; color: var(--text-faint) !important;
  border-left: 2px solid var(--line); padding-left: 10px;
}

.controls { display: flex; flex-direction: column; gap: 12px; }
.bar { height: 3px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.buttons { display: flex; gap: 8px; justify-content: center; }
.buttons .btn { min-width: 104px; }

.dots { list-style: none; display: flex; justify-content: center; gap: 7px; margin: 0; padding: 0; flex-wrap: wrap; }
.dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2);
}
.dots button.is-on { background: var(--accent); border-color: var(--accent); }
.dots button.is-done { background: var(--line); }

.keys { text-align: center; margin: 0; }
.guide-foot { margin-top: 22px; text-align: center; }
.guide-foot .btn { min-width: 160px; }
.guide-foot p { margin: 12px 0 0; }
.guide-foot a[download] { color: var(--text-dim); }

/* ── 모바일 ────────────────────────────────────────── */

@media (max-width: 760px) {
  .guide-main { padding: 12px 12px calc(36px + env(safe-area-inset-bottom, 0px)); }
  .stage { aspect-ratio: 4 / 5; }
  .scene { padding: 14px; }
  .ui-card { font-size: 12px; padding: 12px 13px; }
  .caption { min-height: 132px; padding-top: 14px; }
  .caption h2 { font-size: 18px; }
  .caption p { font-size: 13.5px; }
  .buttons .btn { flex: 1; min-width: 0; }
  .garage-row { gap: 12px; }
  .tank-big { width: 96px; height: 80px; transform: scale(.85); }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .keys { display: none; }
}
