/* ==========================================================================
   검은 숲의 소녀 — How to Play 튜토리얼 팝업 & 메인 버튼 스타일 (howto.css)
   ========================================================================== */

/* ── 메인 화면 How to Play 버튼 ─────────────────────────────────────────── */
.btn-howto {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 142px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #e0a555 0%, #b8712f 48%, #8a4e1a 100%);
  border: 1.5px solid #ffe29a;
  color: #fff9ee;
  font-family: var(--font-header);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(243, 199, 102, 0.4), inset 0 1.5px 0 rgba(255, 255, 255, 0.4), inset 0 -1.5px 0 rgba(0, 0, 0, 0.35);
  animation: howtoGlow 2.6s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
  transition: transform var(--tr-fast, 0.15s), filter var(--tr-fast, 0.15s);
}

.btn-howto:hover {
  filter: brightness(1.08);
}

.btn-howto:active {
  transform: translateY(1px) scale(0.98);
}

.btn-howto::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 36%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-18deg);
  animation: howtoSweep 3.6s ease-in-out infinite;
}

@keyframes howtoSweep {
  0% { transform: translateX(-160%) skewX(-18deg); }
  38%, 100% { transform: translateX(420%) skewX(-18deg); }
}

@keyframes howtoGlow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(243, 199, 102, 0.30), inset 0 1.5px 0 rgba(255, 255, 255, 0.4), inset 0 -1.5px 0 rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 226, 154, 0.75), inset 0 1.5px 0 rgba(255, 255, 255, 0.5), inset 0 -1.5px 0 rgba(0, 0, 0, 0.35);
  }
}

.howto-btn-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fff4d1;
  background: rgba(0, 0, 0, 0.28);
  color: #ffe8a3;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.howto-btn-text {
  line-height: 1;
  white-space: nowrap;
}

.howto-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff8dc;
  opacity: 0;
  pointer-events: none;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: howtoTwinkle 2.4s ease-in-out infinite;
}

.howto-sparkle.hs-1 { top: 4px; left: 22px; }
.howto-sparkle.hs-2 { top: 5px; right: 18px; animation-delay: 0.8s; }
.howto-sparkle.hs-3 { bottom: 4px; left: 46%; animation-delay: 1.6s; width: 7px; height: 7px; }

@keyframes howtoTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-howto,
  .btn-howto::before,
  .howto-sparkle {
    animation: none !important;
  }
  .howto-sparkle {
    opacity: 0.8;
  }
  .howto-track {
    transition: none !important;
  }
}

/* ── 팝업 오버레이 뼈대 ─────────────────────────────────────────────────── */
.howto-overlay {
  z-index: 150;
}

.howto-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #0d0f1a;
  padding: 0;
}

.howto-title-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 199, 102, 0.6);
  background: rgba(243, 199, 102, 0.15);
  color: var(--clr-gold-light, #ffe39f);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
}

/* ── 네비게이션 바 (헤더 바로 아래, 상단 고정) ─────────────────────────── */
.howto-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(22, 25, 40, 0.98) 0%, rgba(15, 17, 28, 0.95) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  flex-shrink: 0;
  z-index: 15;
  gap: 8px;
  min-height: 48px;
  box-sizing: border-box;
}

.howto-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(36, 38, 58, 0.85);
  border: 1.2px solid rgba(243, 199, 102, 0.45);
  color: var(--clr-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform var(--tr-fast, 0.15s), background var(--tr-fast, 0.15s), border-color var(--tr-fast, 0.15s), opacity var(--tr-fast, 0.15s);
  padding: 0;
}

.howto-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.howto-arrow:hover:not(:disabled) {
  transform: scale(1.08);
  background: rgba(50, 52, 80, 0.95);
  border-color: var(--clr-gold-light);
}

.howto-arrow:active:not(:disabled) {
  transform: scale(0.95);
}

.howto-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.howto-arrow:focus-visible,
.howto-dot:focus-visible {
  outline: 2px solid var(--clr-gold);
  outline-offset: 2px;
}

.howto-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.howto-dots::-webkit-scrollbar {
  display: none;
}

.howto-dot {
  position: relative;
  width: 18px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.howto-dot-pill {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(243, 199, 102, 0.28);
  transition: width 0.25s cubic-bezier(0.22, 0.8, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease;
  pointer-events: none;
}

.howto-dot.seen .howto-dot-pill {
  background: rgba(243, 199, 102, 0.5);
}

.howto-dot.active .howto-dot-pill {
  width: 22px;
  height: 7px;
  background: #f3c766;
  box-shadow: 0 0 10px rgba(243, 199, 102, 0.65);
}

/* ── 뷰포트 & 가로 트랙 ─────────────────────────────────────────────────── */
.howto-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  width: 100%;
}

.howto-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.3, 1);
  will-change: transform;
}

.howto-page {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.howto-page-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

/* ── 페이지 헤더 ───────────────────────────────────────────────────────── */
.howto-page-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.howto-page-title {
  font-family: var(--font-header);
  font-size: 1.15rem;
  color: var(--clr-gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  word-break: keep-all;
}

.howto-page-title-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.howto-page-lead {
  font-size: 0.9rem;
  color: var(--clr-text-dim, #b8b5c4);
  margin: 0;
  line-height: 1.42;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.howto-page-lead b {
  color: var(--clr-gold-light, #ffe39f);
  font-weight: 800;
}

/* ── 공통 행 (.ht-row) ─────────────────────────────────────────────────── */
.ht-rows-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.ht-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(22, 25, 40, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  line-height: 1.42;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  box-sizing: border-box;
}

.ht-thumb {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ht-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.ht-title-row {
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex-wrap: wrap;
}

.ht-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
  word-break: keep-all;
}

.ht-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(243, 199, 102, 0.15);
  border: 1px solid rgba(243, 199, 102, 0.5);
  color: #ffd67a;
  font-size: 0.8rem;
  font-weight: 800;
  margin-left: auto;
  white-space: nowrap;
}

.ht-desc {
  font-size: 0.86rem;
  color: rgba(220, 218, 228, 0.85);
  line-height: 1.42;
  word-break: keep-all;
  overflow-wrap: break-word;
  margin: 0;
}

.ht-desc b {
  color: var(--clr-gold-light, #ffe39f);
  font-weight: 800;
}

/* ── 팁 (.ht-tip) 및 힌트 (.ht-hint) ────────────────────────────────────── */
.ht-tip {
  background: linear-gradient(135deg, rgba(60, 44, 20, 0.55), rgba(30, 26, 20, 0.55));
  border: 1px solid rgba(243, 199, 102, 0.35);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #ffe8b5;
  line-height: 1.4;
  word-break: keep-all;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 2px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ht-tip-icon {
  flex-shrink: 0;
}

.ht-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--clr-text-dim, #b8b5c4);
  margin-top: 4px;
  opacity: 0.85;
  flex-shrink: 0;
}

/* ── 미니 카드 (.ht-card) ───────────────────────────────────────────────── */
.ht-card {
  position: relative;
  width: var(--w, 52px);
  aspect-ratio: 3 / 4;
  flex: none;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(15, 17, 26, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.ht-card .plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

.ht-card .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.7));
  box-sizing: border-box;
  pointer-events: none;
}

.ht-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 1px 3.5px;
  height: clamp(14px, calc(var(--w, 52px) * 0.3), 20px);
  border-radius: 999px;
  font-size: clamp(7.5px, calc(var(--w, 52px) * 0.155), 11px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.75);
  z-index: 5;
  pointer-events: none;
  box-sizing: border-box;
}

.ht-badge .badge-icon {
  font-size: 0.9em;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.ht-badge .badge-val {
  font-size: 1.05em;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1;
}

.ht-badge.monster {
  background: linear-gradient(180deg, #d94254 0%, #8a1c27 100%);
  border: 1.5px solid #ffa3ae;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ht-badge.weapon {
  background: linear-gradient(180deg, #4a90e2 0%, #1d4e89 100%);
  border: 1.5px solid #a4c9f7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ht-badge.item {
  background: linear-gradient(180deg, #2d936c 0%, #134f37 100%);
  border: 1.5px solid #8be8c4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ht-stack {
  position: absolute;
  top: 2px;
  left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 1px 3.5px;
  height: clamp(14px, calc(var(--w, 52px) * 0.3), 20px);
  border-radius: 999px;
  font-size: clamp(7.5px, calc(var(--w, 52px) * 0.155), 11px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffd166 0%, #ff9e00 100%);
  color: #101120;
  border: 1px solid #ffffff;
  box-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.65);
  z-index: 6;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.2px;
  box-sizing: border-box;
}

.ht-stack .stack-icon {
  font-size: 0.9em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.ht-stack .stack-val {
  font-size: 1.05em;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.3px;
}

/* ── 겹친 카드 2장 (.ht-cards-overlap) ─────────────────────────────────── */
.ht-cards-overlap {
  display: flex;
  align-items: center;
  position: relative;
  width: 68px;
  height: 60px;
  flex: none;
}

.ht-cards-overlap .ht-card:first-child {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.ht-cards-overlap .ht-card:last-child {
  position: absolute;
  left: 18px;
  top: 4px;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(212, 175, 55, 0.45);
}

/* ── 미니 타일 (.ht-tile) ───────────────────────────────────────────────── */
.ht-tile {
  position: relative;
  width: var(--w, 52px);
  aspect-ratio: 3 / 4;
  flex: none;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(15, 17, 26, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 55, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ht-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ht-tile-label {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  font-size: calc(var(--w, 52px) * 0.17);
  font-weight: 800;
  padding: 2px 1px;
  box-sizing: border-box;
  background: rgba(10, 12, 20, 0.85);
  color: #fff;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ht-tile.tile-exit .ht-tile-label {
  background: rgba(45, 20, 60, 0.92);
  color: #ffd67a;
  border-top-color: #f3c766;
}

/* ── 기타 썸네일들 (상점, 이모지, 칩, 이미지) ───────────────────────────── */
.ht-shop-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(243, 199, 102, 0.5);
  object-fit: cover;
  background: rgba(20, 22, 34, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.ht-shops-cluster {
  display: flex;
  align-items: center;
  position: relative;
  width: 68px;
  height: 52px;
  flex: none;
}

.ht-shops-cluster .ht-shop-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.ht-shops-cluster .ht-shop-icon:nth-child(1) { left: 0; top: 6px; z-index: 1; }
.ht-shops-cluster .ht-shop-icon:nth-child(2) { left: 14px; top: 0; z-index: 2; }
.ht-shops-cluster .ht-shop-icon:nth-child(3) { left: 28px; top: 8px; z-index: 3; }

.ht-emoji-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(20, 22, 34, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ht-img-thumb {
  width: 52px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: rgba(15, 17, 26, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ht-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ht-img-thumb img[src*="hero_girl"] {
  transform: scale(1.22) translateY(-2px);
}

.ht-chip-thumb {
  width: 92px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.ht-chip-thumb .hud-item {
  width: 100%;
  justify-content: center;
  font-size: 0.84rem;
  padding: 4px 6px;
  white-space: nowrap;
}

.ht-chip-stage,
.ht-stage-thumb {
  background: rgba(38, 30, 20, 0.9);
  border: 1px solid rgba(243, 199, 102, 0.55);
  color: #ffd166;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-header);
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
}

.ht-stage-thumb .stage-badge-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.5px;
}

.ht-stage-thumb .stage-badge-num {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
}

.ht-stage-thumb .stage-badge-divider {
  color: rgba(255, 255, 255, 0.45);
  margin: 0 1px;
}

/* ── 비주얼 블록 7종 공통 ──────────────────────────────────────────────── */
.ht-visual-block {
  width: 100%;
  background: rgba(16, 18, 30, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

/* 1. visual-steps (1페이지) */
.visual-steps-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.v-step-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: rgba(22, 25, 40, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  text-align: center;
  gap: 4px;
}

.v-step-box.v-step-highlight {
  border: 1.5px solid var(--clr-gold);
  background: rgba(45, 35, 20, 0.75);
  box-shadow: 0 0 10px rgba(243, 199, 102, 0.25);
}

.v-step-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.v-step-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  word-break: keep-all;
}

.v-step-sep {
  color: var(--clr-gold);
  font-size: 1.2rem;
  font-weight: 900;
  opacity: 0.7;
}

/* 2. visual-cardbadges (2페이지) */
.visual-cardbadges-wrap {
  display: flex;
  justify-content: space-around;
  gap: 6px;
}

.v-cb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.v-cb-caption {
  font-size: 0.72rem;
  color: rgba(220, 218, 228, 0.85);
  text-align: center;
  word-break: keep-all;
  line-height: 1.2;
}

/* 3. visual-griddemo (3페이지) */
.visual-griddemo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.v-grid-side-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 180px;
  font-size: 0.72rem;
  color: var(--clr-gold);
  font-weight: 800;
  text-align: right;
  padding: 6px 0;
  box-sizing: border-box;
}

.v-grid-center {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 220px;
}

.v-grid-side-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  font-size: 0.72rem;
  color: var(--clr-gold-light);
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  word-break: keep-all;
}

.v-grid-side-right .v-arrow-up {
  font-size: 1.4rem;
  color: var(--clr-gold);
  animation: floatUp 1.8s ease-in-out infinite;
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 3페이지 데모 애니메이션 */
.v-demo-cell {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.v-demo-cell .demo-under,
.v-demo-cell .demo-over {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.howto-page.active .v-anim-tap-target {
  animation: demoCardFade 5s ease-in-out infinite;
}
.howto-page.active .v-anim-hand {
  animation: demoHandTap 5s ease-in-out infinite;
}
.howto-page.active .v-anim-fog-reveal {
  animation: demoFogFlip 5s ease-in-out infinite;
}

.v-demo-hand {
  position: absolute;
  z-index: 10;
  font-size: 1.5rem;
  pointer-events: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

@keyframes demoHandTap {
  0%, 15% { opacity: 0; transform: translate(-50%, 0) scale(1.2); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  28% { opacity: 1; transform: translate(-50%, -45%) scale(0.9); }
  35% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; }
}

@keyframes demoCardFade {
  0%, 28% { opacity: 1; transform: scale(1); }
  34%, 85% { opacity: 0; transform: scale(0.8); }
  92%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes demoFogFlip {
  0%, 34% { opacity: 1; }
  42%, 85% { opacity: 0; }
  92%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .v-grid-side-right .v-arrow-up,
  .howto-page.active .v-anim-tap-target,
  .howto-page.active .v-anim-hand,
  .howto-page.active .v-anim-fog-reveal {
    animation: none !important;
  }
}

/* 4. visual-exitflow (4페이지) */
.visual-exitflow-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
}

.v-ef-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.v-ef-item .ht-tile.glow {
  box-shadow: 0 0 12px rgba(243, 199, 102, 0.7), 0 0 0 1.5px var(--clr-gold);
}

.v-ef-caption {
  font-size: 0.72rem;
  color: rgba(220, 218, 228, 0.9);
  text-align: center;
  word-break: keep-all;
  line-height: 1.25;
}

/* 5. visual-damage (5페이지) */
.visual-damage-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v-dmg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(22, 25, 40, 0.6);
  border-radius: 8px;
  padding: 4px 8px;
}

.v-dmg-op {
  font-size: 1.1rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
}

.v-bare-hands {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(60, 64, 80, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ddd;
  font-size: 0.78rem;
  font-weight: 800;
  height: 28px;
  box-sizing: border-box;
}

.v-dmg-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
  min-width: 64px;
}

.v-dmg-chip.ruby {
  background: rgba(50, 18, 24, 0.9);
  border: 1.5px solid #d94254;
  color: #ff94a2;
}

.v-dmg-chip.emerald {
  background: rgba(18, 50, 36, 0.9);
  border: 1.5px solid #2ec4b6;
  color: #8be8c4;
}

/* 5-2. visual-weapons (6페이지) */
.visual-weapons-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 4px;
}

.visual-weapons-img-wrap {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid rgba(243, 199, 102, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 12px rgba(243, 199, 102, 0.2);
  background: #000;
}

.visual-weapons-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.v-weapons-caption {
  font-size: 0.74rem;
  color: var(--clr-gold-light, #ffe39f);
  text-align: center;
  word-break: keep-all;
  line-height: 1.3;
}

/* 6. visual-slots (8페이지) */
.visual-slots-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  padding: 6px 0;
}

.v-slot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.v-slot-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--clr-gold);
}

.v-slot-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(22, 26, 44, 0.9);
  border: 1.5px solid rgba(243, 199, 102, 0.55);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.v-slot-circle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.v-girl-center {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v-girl-center img {
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.v-slots-caption {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  text-align: center;
  margin-top: 2px;
}

/* 7. visual-shopmock (9페이지) */
.visual-shopmock-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.v-shop-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  background: rgba(20, 22, 34, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 0.75rem;
  color: #ffe8b5;
}

.v-shop-top-slot {
  display: inline-flex;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  font-size: 0.68rem;
  color: var(--clr-text-dim);
}

.v-shop-card-mock {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(22, 25, 40, 0.85);
  border: 1px solid rgba(243, 199, 102, 0.4);
  border-radius: 10px;
  padding: 8px;
  gap: 4px;
}

.v-shop-mock-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(243, 199, 102, 0.2);
  border: 1px solid rgba(243, 199, 102, 0.5);
  color: #ffd67a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.v-shop-mock-info {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.v-shop-mock-info img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(243, 199, 102, 0.4);
}

.v-shop-mock-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v-shop-mock-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.v-shop-mock-price {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffd67a;
}

.v-shop-mock-prompt {
  font-size: 0.78rem;
  color: rgba(220, 218, 228, 0.9);
  margin-top: 2px;
}

.v-shop-mock-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.v-shop-btn-mock {
  flex: 1;
  padding: 5px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.v-shop-btn-no {
  background: rgba(45, 48, 68, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ccc;
}

.v-shop-btn-yes {
  background: linear-gradient(180deg, #e0a555, #8a4e1a);
  border: 1px solid #ffe29a;
  color: #fff;
}

/* 8. visual-score (12페이지) */
.visual-score-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v-score-formula {
  background: rgba(22, 25, 40, 0.8);
  border: 1px solid rgba(243, 199, 102, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffe8b5;
  text-align: center;
  word-break: keep-all;
}

.v-score-ranks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.v-rank-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(20, 22, 34, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 4px 2px;
  text-align: center;
}

.v-rank-grade {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--clr-gold);
  line-height: 1;
}

.v-rank-cond {
  font-size: 0.65rem;
  color: var(--clr-text-dim);
  margin-top: 2px;
  line-height: 1.1;
}

.v-rank-bonus {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffe39f;
  margin-top: 1px;
  line-height: 1.1;
}

/* ── 마지막 페이지 CTA 버튼 ─────────────────────────────────────────────── */
.howto-cta-wrap {
  margin-top: 6px;
  width: 100%;
  flex-shrink: 0;
}

.howto-cta-btn {
  width: 100%;
  height: 48px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 14px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform var(--tr-fast, 0.15s), filter var(--tr-fast, 0.15s);
}

.howto-cta-btn:hover {
  filter: brightness(1.08);
}

.howto-cta-btn:active {
  transform: translateY(1px) scale(0.98);
}
