/* 오징어 운세 — 공통 스타일
 * 색은 모두 변수. 스킨을 고르면 skins.js 가 --bg, --accent 등을 바꿔 끼운다.
 * 브레이크포인트: 모바일 기본, 768px 이상 PC 배치.
 */
:root {
  --bg: #EAF7FB;
  --bg2: #D3EEF6;
  --surface: #FFFFFF;
  --ink: #3A2E2C;
  --ink-soft: #6F625E;
  --line: #6A4A3A;
  --accent: #3FA9D6;
  --accent-ink: #FFFFFF;
  --machine: #A8DDF0;
  --machine-dark: #6BBBD9;
  --reel-bg: #FFFFFF;
  --coin: #FFCF4A;
  --coin-dark: #E0A422;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --gap: 16px;
  --pad: 16px;
  --shadow: 0 4px 0 rgba(58, 46, 44, .08), 0 12px 28px rgba(58, 46, 44, .10);
  /* 글꼴 역할: 타이틀(큰 제목·운 이름·총운·결론) = 고운바탕 굵게 / 캐릭터 이름 = 주아(여기서만)
     / 결과 단계(대박 등) = 고운돋움 / 설명 = 연성 / 버튼·상단·진지한 곳 = 프리텐다드 굵게 */
  --font-head: 'Gowun Batang', 'Gowun Dodum', serif;
  --head-weight: 700;
  --font-name: 'Jua', 'Gowun Dodum', sans-serif;
  --font-title: 'Gowun Dodum', 'Malgun Gothic', serif;
  --font-body: 'Yeon Sung', 'Gowun Dodum', 'Malgun Gothic', sans-serif;
  --font-serious: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all; /* 한글 단어 중간에서 줄바꿈하지 않게 */
  overflow-wrap: anywhere;
  color: var(--ink);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg) 0%, var(--bg2) 100%) fixed;
  transition: background .4s var(--ease-out);
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.25; margin: 0; }

/* 물방울 배경 (장식) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 78%, rgba(255,255,255,.55) 0 10px, transparent 11px),
    radial-gradient(circle at 18% 70%, rgba(255,255,255,.45) 0 5px, transparent 6px),
    radial-gradient(circle at 88% 30%, rgba(255,255,255,.5) 0 14px, transparent 15px),
    radial-gradient(circle at 92% 20%, rgba(255,255,255,.4) 0 6px, transparent 7px),
    radial-gradient(circle at 70% 88%, rgba(255,255,255,.45) 0 8px, transparent 9px);
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 상단 바 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 36px; width: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 8px;
  background: var(--surface); border-radius: 999px;
  box-shadow: var(--shadow);
  font-family: var(--font-serious); font-weight: 700; font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.pill .coin-ico { width: 22px; height: 22px; }
/* 오늘 코인: 있으면 불 켜짐(.on), 쓰면 회색 */
.coin-pill { font-size: 13px; color: var(--ink-soft); }
.coin-pill .coin-ico { filter: grayscale(1) opacity(.45); transition: filter .4s; }
.coin-pill.on { color: var(--ink); box-shadow: var(--shadow), 0 0 0 2px var(--coin), 0 0 14px rgba(255, 207, 74, .75); }
.coin-pill.on .coin-ico { filter: drop-shadow(0 0 4px rgba(255, 196, 40, .9)); }
.pill-join {
  padding: 0 16px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  touch-action: manipulation;
}
.pill-join:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 로고 옆 KO / EN */
.topbar-left { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-toggle {
  display: inline-flex; padding: 2px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px rgba(106, 74, 58, .18);
}
.lang-toggle button {
  height: 24px; min-width: 30px; padding: 0 7px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-soft);
  font-family: var(--font-serious); font-weight: 700; font-size: 11px; letter-spacing: .02em; line-height: 1;
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; cursor: default; }
.lang-toggle button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.logo, .pill { flex: none; white-space: nowrap; }
.streak { min-width: 0; overflow: hidden; }
/* 상단 'OO님 · N일째 출석' 한 줄, 고딕 */
.streak { display: flex; align-items: baseline; white-space: nowrap; font-family: var(--font-serious); font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.streak b { display: inline-block; max-width: 5em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-weight: 700; color: var(--ink); }
.streak-day::before { content: '·'; margin: 0 4px; }
/* 'OO님 · N일째 출석'을 누르면 출석 달력 */
button.streak {
  border: 0; background: none; padding: 6px 8px; margin: 0 -2px 0 0; border-radius: 10px; cursor: pointer;
  align-items: center; line-height: 1.2; transition: background .2s;
}
button.streak:hover { background: rgba(255, 255, 255, .7); }
button.streak:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cal-ico { width: 14px; height: 14px; margin-left: 5px; flex: none; color: var(--ink-soft); }
.streak b { flex: none; } /* 좁을 땐 닉네임 대신 'N일째 출석'이 줄어듦 */
.streak-day { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 모바일: 첫 줄 = 로고 + KO/EN, 둘째 줄 = 닉네임·출석(왼쪽) + 코인(오른쪽) */
@media (max-width: 767px) {
  .topbar { flex-wrap: wrap; height: auto; row-gap: 6px; padding-top: 12px; padding-bottom: 4px; }
  .topbar-left { width: 100%; justify-content: space-between; } /* KO/EN은 첫 줄 오른쪽 끝 */
  .topbar-right { width: 100%; justify-content: space-between; }
  button.streak { margin-left: -8px; } /* 글자 왼쪽 끝을 로고 왼쪽 끝에 맞춤(안쪽 여백만큼) */
  .streak b { max-width: 8em; }
}

/* 출석 달력 창 */
.att-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
.att-sum div { background: var(--bg); border-radius: var(--r-sm); padding: 10px 4px 9px; text-align: center; font-family: var(--font-serious); }
.att-sum b { display: block; font-weight: 800; font-size: 22px; line-height: 1.2; }
.att-sum span { display: block; font-weight: 600; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-family: var(--font-serious); }
.cal-head strong { font-weight: 800; font-size: 17px; }
.cal-nav {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0 0 3px;
  border: 0; border-radius: 50%; background: var(--bg); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.cal-nav[disabled] { opacity: .3; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-week { margin-bottom: 5px; }
.cal-week span { text-align: center; font-family: var(--font-serious); font-weight: 700; font-size: 12px; color: var(--ink-soft); }
.cal-week span:first-child { color: #D9534F; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px; background: #F7F2F0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-family: var(--font-serious);
}
.cal-empty { background: none; }
.cal-d { font-style: normal; font-weight: 600; font-size: 12px; line-height: 1; color: var(--ink-soft); }
.cal-cell.on { background: var(--bg2, #FFE9A8); box-shadow: inset 0 0 0 2px var(--line); }
.cal-cell.on .cal-d { font-size: 10px; color: var(--ink); }
/* 운세 본 날은 그날 총운 단계 색(결과 화면 캡슐과 같은 색) */
.cal-cell.on.lv-5 { background: #FFD45C; }
.cal-cell.on.lv-4 { background: #FFE9A8; }
.cal-cell.on.lv-3 { background: #FFFFFF; }
.cal-cell.on.lv-2 { background: #E3E8F0; }
.cal-cell.on.lv-1 { background: #C9D0DC; }
.cal-sc { font-weight: 800; font-size: 15px; line-height: 1; color: var(--ink); }
.cal-cell.today { outline: 2px dashed var(--accent); outline-offset: 1px; }
.cal-foot { margin: 12px 0 0; text-align: center; font-family: var(--font-serious); font-weight: 600; font-size: 12px; color: var(--ink-soft); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--font-serious); font-weight: 800; font-size: 18px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out), filter .2s;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn:focus-visible, .theme-card:focus-visible, .lever-hit:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* =========================================================
 * ① 테마 선택
 * ========================================================= */
.hero { text-align: center; padding: 24px 0 28px; }
.hero h1 { font-size: 30px; text-wrap: balance; }
.hero p { margin: 8px 0 0; color: var(--ink-soft); }

.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 20px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.notice p { margin: 0; }

.theme-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: 1fr;
  padding-bottom: 40px;
}
.theme-card {
  --c-bg: #fff; --c-bg2: #eee; --c-accent: #999;
  display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px;
  padding: 16px; border: 0; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow);
  text-align: left; cursor: pointer;
  /* 등장은 CSS 애니메이션(translate·scale, 끝나면 사라짐), 마우스 반응은 transform 으로 나눠 서로 부딪치지 않게 */
  transition: transform .2s var(--ease-out);
  animation: card-in .45s cubic-bezier(.3, 1.4, .5, 1) backwards;
}
.theme-card:nth-child(2) { animation-delay: .08s; }
.theme-card:nth-child(3) { animation-delay: .16s; }
.theme-card:nth-child(4) { animation-delay: .24s; }
@keyframes card-in { from { opacity: 0; translate: 0 16px; scale: .96; } }
.theme-card:hover { transform: translateY(-4px); }
.theme-card:active { transform: scale(.98); }
.theme-art {
  width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--c-bg) 0%, var(--c-bg2) 100%);
  display: grid; place-items: center; overflow: hidden;
}
.theme-art img, .theme-art svg { width: 86%; height: 86%; object-fit: contain; }
.theme-info h2 { font-family: var(--font-name); font-weight: 400; font-size: 22px; }
.theme-info p { margin: 4px 0 10px; color: var(--ink-soft); font-size: 15px; }
.theme-go {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 999px; background: var(--c-accent); color: #fff;
  font-family: var(--font-serious); font-weight: 700; font-size: 15px;
}
/* 새 캐릭터 자리(커밍순): 틀만, 누를 수 없음 */
.soon-card {
  display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px;
  padding: 16px; border-radius: var(--r-lg);
  border: 2px dashed rgba(106, 74, 58, .28); background: rgba(255, 255, 255, .35);
  color: var(--ink-soft);
  animation: card-in .45s cubic-bezier(.3, 1.4, .5, 1) .3s backwards;
}
.soon-2 { display: none; }
.soon-art { background: rgba(255, 255, 255, .55); font-family: var(--font-title); font-size: 48px; color: rgba(106, 74, 58, .35); }
.soon-card h2 { font-family: var(--font-head); font-weight: var(--head-weight); color: var(--ink-soft); }
.soon-card p { margin: 4px 0 0; }

/* 가입 창 */
.modal {
  border: 0; padding: 0; border-radius: var(--r-lg); width: min(420px, calc(100% - 32px));
  box-shadow: 0 24px 60px rgba(0,0,0,.25); color: var(--ink);
}
.modal::backdrop { background: rgba(40, 30, 30, .45); }
.modal-in { position: relative; padding: 24px; }
.modal-x {
  position: absolute; right: 10px; top: 19px; width: 40px; height: 40px; /* 가운데를 제목 줄 가운데에 맞춤 */
  display: grid; place-items: center; padding: 0 0 4px; border: 0; border-radius: 50%; /* 고딕 × 글자 가운데를 제목 글자 가운데에 맞춤(실측) */
  background: transparent; color: var(--ink-soft); font-family: var(--font-serious); font-weight: 400; font-size: 26px; line-height: 1; cursor: pointer;
}
.modal-x:hover { background: var(--bg); }
/* 가입창은 주아체를 쓰지 않음: 제목·버튼 = 프리텐다드 굵게 */
.modal h2 { font-family: var(--font-serious); font-weight: 800; font-size: 24px; text-align: center; }
.modal .lead { text-wrap: balance; text-align: center; color: var(--ink-soft); margin: 6px 0 18px; font-size: 15px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-family: var(--font-serious); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  border: 2px solid #E6DCD8; border-radius: var(--r-sm);
  font: inherit; font-family: var(--font-serious); font-weight: 700; background: #FFFCFB;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field small { display: block; font-family: var(--font-serious); font-weight: 700; margin-top: 4px; color: var(--ink-soft); font-size: 13px; }
.check { font-family: var(--font-serious); font-weight: 700; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0 18px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.err { font-family: var(--font-serious); font-weight: 700; color: #C0392B; font-size: 14px; min-height: 20px; margin: -6px 0 8px; }
.modal .btn { width: 100%; font-family: var(--font-serious); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-family: var(--font-serious); font-weight: 700; font-size: 16px;
  transition: opacity .3s, transform .3s var(--ease-out); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.dev {
  position: fixed; right: 12px; bottom: 12px; z-index: 95;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: rgba(30, 24, 28, .88); border-radius: 12px;
}
.dev-badge { color: #FFD45C; font-size: 12px; font-weight: 700; padding: 0 6px; }
.dev button { font-size: 12px; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: #fff; color: #222; cursor: pointer; }

/* =========================================================
 * ② 슬롯
 * ========================================================= */
.slot-page { display: flex; flex-direction: column; align-items: center; padding-bottom: 40px; }
.slot-title { text-align: center; margin: 4px 0 18px; }
.slot-title h1 { font-size: 26px; }
.slot-title p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }

/* 크기 기준: --tile(그림 한 칸). 나머지는 여기서 계산
 * 모바일: 2×2 배치 / PC(768px 이상): 1×4 배치
 * 가로 = 4(테두리)×2 + m-pad×2 + 칸 수×(tile + col-pad×2) + 간격 + 레버 */
.stage {
  --cols: 2;
  --rows: 2;
  --reel-gap: 10px;
  --col-pad: 6px;
  --label-h: 34px;
  --m-pad: 12px;
  --top-h: 64px;
  --lever-w: 40px;
  --tile: clamp(90px, calc((100vw - 32px - 40px - 8px - 24px - 24px - 10px) / 2), 150px);
  --col-h: calc(var(--tile) + var(--col-pad) + var(--label-h)); /* 위 여백 + 그림 + 이름표 */
  --reels-h: calc(var(--col-h) * var(--rows) + var(--reel-gap) * (var(--rows) - 1));
  /* 레버 높이 = 릴 묶음 세로 가운데 (테두리 4 + 간판 + 간격 12 + 릴 묶음 절반) */
  --reel-center: calc(4px + var(--top-h) + 12px + var(--reels-h) / 2);
  position: relative;
  padding-right: var(--lever-w);
}
.machine {
  position: relative;
  width: calc((var(--tile) + var(--col-pad) * 2) * var(--cols) + var(--reel-gap) * (var(--cols) - 1) + var(--m-pad) * 2 + 8px);
  background: var(--machine);
  border: 4px solid var(--line);
  border-radius: 32px 32px 24px 24px;
  box-shadow: inset 0 -10px 0 var(--machine-dark), 0 18px 34px rgba(58, 46, 44, .18);
  padding: 0 var(--m-pad) 18px;
}
.machine-top {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--top-h); margin: 0 calc(var(--m-pad) * -1) 12px;
  border-bottom: 4px solid var(--line);
  border-radius: 28px 28px 0 0;
  background: var(--accent);
  color: var(--accent-ink);
}
.machine-top .sign-art { width: 48px; height: 48px; margin-top: -18px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.machine-top .sign-art img, .machine-top .sign-art svg { width: 100%; height: 100%; object-fit: contain; }
.machine-top h2 { font-family: var(--font-name); font-weight: 400; font-size: 22px; letter-spacing: .02em; }

.reels {
  display: grid; gap: var(--reel-gap);
  grid-template-columns: repeat(var(--cols), auto);
}
.reel-col {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--col-pad) var(--col-pad) 0;
  background: var(--line); border-radius: var(--r-md);
}
.reel-window {
  width: var(--tile); height: var(--tile);
  background: var(--reel-bg);
  border-radius: var(--r-sm);
  box-shadow: inset 0 6px 8px -6px rgba(0,0,0,.35), inset 0 -6px 8px -6px rgba(0,0,0,.35);
}
.reel-window .slot-machine__tile {
  width: var(--tile); height: var(--tile);
  display: grid; place-items: center;
}
.reel-window .slot-machine__tile img,
.reel-window .slot-machine__tile svg { width: 88%; height: 88%; object-fit: contain; }

.reel-label {
  width: var(--tile); height: var(--label-h);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-serious); font-weight: 700; font-size: 15px; line-height: 1;
  color: rgba(255,255,255,.75);
}
.reel-label b { font-weight: 400; color: rgba(255,255,255,.45); }
.reel-label b.on { color: #FFD45C; }

.machine-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 12px;
  background: rgba(255,255,255,.6); border-radius: var(--r-md);
}
.status { margin: 0; font-family: var(--font-serious); font-weight: 700; font-size: 16px; line-height: 1.35; }
.coin-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.slot-hole {
  width: 40px; height: 12px; border-radius: 999px;
  background: var(--line); box-shadow: inset 0 3px 0 rgba(0,0,0,.4);
  transition: box-shadow .3s;
}
.coin-slot.glow .slot-hole { box-shadow: inset 0 3px 0 rgba(0,0,0,.4), 0 0 0 4px var(--coin), 0 0 16px 4px var(--coin); }
.coin-slot span:last-child { font-size: 12px; color: var(--ink-soft); }

/* 레버 */
.lever {
  position: absolute; right: 0; top: 0; bottom: 0; width: var(--lever-w);
  pointer-events: none;
}
.lever {
  --base-h: 36px; --base-w: 22px; --arm-h: 92px; --arm-w: 10px;
}
.lever-base {
  position: absolute; left: -6px; top: calc(var(--reel-center) - var(--base-h) / 2);
  width: var(--base-w); height: var(--base-h); border-radius: 0 10px 10px 0;
  background: var(--machine-dark); border: 4px solid var(--line); border-left: 0;
}
.lever-arm {
  position: absolute; width: var(--arm-w);
  left: calc(-6px + var(--base-w) / 2 - var(--arm-w) / 2);
  top: calc(var(--reel-center) - var(--arm-h)); height: var(--arm-h);
}
.lever-rod {
  position: absolute; inset: 0; border-radius: 6px;
  background: linear-gradient(90deg, #D9D9DE, #FFFFFF 40%, #B9B9C2);
  border: 3px solid var(--line);
}
.lever-knob {
  position: absolute; left: 50%; top: -14px; width: 34px; height: 34px; margin-left: -17px;
  border-radius: 50%; border: 4px solid var(--line);
  background: radial-gradient(circle at 35% 35%, #FFFFFF 0 4px, var(--accent) 5px);
}
.lever-hit {
  position: absolute; right: -8px; width: 60px;
  top: calc(var(--reel-center) - var(--arm-h) - 28px); height: calc(var(--arm-h) * 2 + 56px);
  background: transparent; border: 0; border-radius: 20px;
  pointer-events: auto; cursor: grab; touch-action: none;
}
.lever-hit[disabled] { cursor: default; }
.lever.ready .lever-knob { animation: knob-pulse 1.2s ease-in-out infinite; }
@keyframes knob-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.0); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(255,255,255,.55); transform: scale(1.08); }
}

/* 칸 멈춤 효과 */
.reel-col { position: relative; }
.reel-window { position: relative; z-index: 1; transition: box-shadow .4s; }
.reel-window.glow-5 { box-shadow: 0 0 0 3px #FFD45C, 0 0 18px 6px rgba(255, 212, 92, .85); }
.reel-window.glow-4 { box-shadow: 0 0 0 3px #FFE9A8, 0 0 12px 3px rgba(255, 233, 168, .7); }
.fx-layer { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - var(--label-h)); pointer-events: none; z-index: 2; }
.reel-window { overflow: hidden; }
.reel-window .slot-machine__container { position: relative; z-index: 1; }
/* 대길: 칸 안 캐릭터 뒤에서 빛살이 천천히 돔 (칸 밖으로는 안 나감) */
.fx-rays {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 50%;
  width: calc(var(--tile) * 1.5); height: calc(var(--tile) * 1.5);
  max-width: none; /* 기본 img 최대폭 때문에 타원으로 찌그러지지 않게 */
  margin: calc(var(--tile) * -.75) 0 0 calc(var(--tile) * -.75);
}
.reel-strip { will-change: transform; }
.fx-spark { position: absolute; left: 50%; top: 50%; width: 22%; margin: -11% 0 0 -11%; }
.fx-stamp {
  position: absolute; right: -6%; top: -8%; width: 42%; aspect-ratio: 1;
  display: grid; place-items: center; z-index: 3;
}
.fx-stamp-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-stamp span { position: relative; font-family: var(--font-title); font-size: clamp(13px, calc(var(--tile) * .14), 24px); line-height: 1; }
.fx-stamp.lv-s5 span { color: #E8574A; }
.fx-stamp.lv-s4 span { color: #E0861F; }
.fx-sweat { position: absolute; right: 8%; top: 4%; width: 18%; z-index: 3; }
.fx-cloud { position: absolute; left: 20%; top: -10%; width: 60%; z-index: 3; }
.fx-cloud-img { width: 100%; display: block; }
.fx-cloud i {
  position: absolute; top: 70%; width: 3px; height: 12%; border-radius: 3px; background: #7CC4FF; opacity: 0;
}
.fx-cloud i:nth-of-type(1) { left: 22%; } .fx-cloud i:nth-of-type(2) { left: 42%; }
.fx-cloud i:nth-of-type(3) { left: 62%; } .fx-cloud i:nth-of-type(4) { left: 80%; }

/* 날아가는 동전 */
.fly-coin {
  position: fixed; left: 0; top: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  pointer-events: none;
}

/* 마지막 연출: 캐릭터만 남고 어두워짐 */
.finale {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
}
.finale-dim { position: absolute; inset: 0; background: #120E14; opacity: 0; }
.finale-item { position: absolute; display: grid; place-items: center; }
.finale-item img, .finale-item svg { width: 100%; height: 100%; object-fit: contain; }

/* =========================================================
 * ③ 결과
 * ========================================================= */
.fade-in-cover { position: fixed; inset: 0; z-index: 90; background: #120E14; pointer-events: none; }

.result-head { text-align: center; padding: 8px 0 20px; }
.result-head .date { font-family: var(--font-serious); font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.result-head h1 { font-size: 28px; margin-top: 2px; }

.lv {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 26px; padding: 0 10px; margin-top: 4px;
  border-radius: 999px; font-family: var(--font-title); font-size: 14px;
  border: 2px solid var(--line);
}
.lv-5 { background: #FFD45C; }
.lv-4 { background: #FFE9A8; }
.lv-3 { background: #FFFFFF; }
.lv-2 { background: #E3E8F0; }
.lv-1 { background: #C9D0DC; }
/* 좋음·대박 캡슐: 글자 더 굵게 + 테두리 꾸밈(안쪽 흰 줄, 대박은 금빛·은은한 빛·반짝이 별) */
.lv.lv-4, .lv.lv-5 {
  position: relative; -webkit-text-stroke: .03em currentColor; letter-spacing: .02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
}
.lv.lv-5 {
  background: linear-gradient(180deg, #FFE58A 0%, #FFD45C 55%, #F5B935 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 0 10px 3px rgba(255, 212, 92, .55);
}
.lv.lv-5::before, .lv.lv-5::after {
  content: '✦'; position: absolute; color: #FFB800; line-height: 1;
  -webkit-text-stroke: 0; text-shadow: 0 0 0 var(--line), 1px 1px 0 var(--line), -1px -1px 0 var(--line), 1px -1px 0 var(--line), -1px 1px 0 var(--line);
}
.lv.lv-5::before { top: -9px; right: -7px; font-size: 14px; }
.lv.lv-5::after { bottom: -7px; left: -6px; font-size: 10px; }

.r-list { display: grid; gap: 12px; margin-bottom: 20px; }
/* 운별 카드: 그림 + 풀이 한 묶음 */
.r-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start;
  padding: 14px 16px 16px 12px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.r-card .art { width: 96px; height: 96px; display: grid; place-items: center; background: var(--bg); border-radius: var(--r-sm); }
.r-card .art img, .r-card .art svg { width: 92%; height: 92%; object-fit: contain; }
.r-card .body { min-width: 0; }
.r-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.r-item-head h2 { font-size: 20px; -webkit-text-stroke: .045em currentColor; } /* 고운바탕은 700이 가장 굵어서 외곽선으로 더 두껍게 */
.r-item-head .lv { margin-top: 0; }
.r-item-head .who { color: var(--ink-soft); font-size: 14px; }
.r-card p { margin: 6px 0 0; }
.r-card .todo { grid-column: 1 / -1; margin-top: 0; }
.todo {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 10px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--r-sm); font-size: 15px;
}
.todo b { font-family: var(--font-title); font-weight: 400; flex: none; color: var(--line); }

.total {
  position: relative; overflow: hidden; /* 대길 빛살이 칸 밖으로 안 나가게 */
  padding: 16px 18px 24px; margin-bottom: 20px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  border: 4px solid var(--line);
}
.total-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.total .label { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 22px; }
.stamp {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 84px; height: 84px;
  background: url('../img/fx/fx-stamp-3.webp') center / contain no-repeat;
  font-family: var(--font-title); font-size: 24px; color: #8A7F76;
  transform: rotate(-8deg);
}
.stamp.lv-5 { background-image: url('../img/fx/fx-stamp-5.webp'); color: #E8574A; }
.stamp.lv-4 { background-image: url('../img/fx/fx-stamp-4.webp'); color: #E0861F; }
.stamp-rays {
  position: absolute; left: 50%; top: 50%; width: 220%; height: 220%; margin: -110% 0 0 -110%;
  background: url('../img/fx/fx-rays-5.webp') center / contain no-repeat; z-index: -1;
  animation: spin 14s linear infinite;
}
.total-head { position: relative; z-index: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 총운 점수 줄: 0~100, 캐릭터가 점수 자리까지 걸어감.
   점수(큰 말풍선)는 캐릭터 위, 캐릭터는 줄 가운데에 걸쳐 줄을 덮음 */
/* 총운 그림(정사각) 실측: 캐릭터 몸 가운데 = 그림 높이의 64%. 머리(소품 포함) 위 끝 --t 는 그림마다 달라 page-result.js 가 재서 넣음(기본 .31) */
.meter { --walker: 84px; --track-h: 18px; --bubble-h: 52px; --t: .31; margin: 0 0 6px; padding: 0 calc(var(--walker) / 2 - 4px); }
.meter-track {
  position: relative; height: var(--track-h);
  margin-top: calc(var(--bubble-h) + 12px + var(--walker) * (.64 - var(--t)) - var(--track-h) / 2);
  background: var(--bg); border: 3px solid var(--line); border-radius: 999px;
}
.meter-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--score) * 1%);
  background: var(--accent); border-radius: 999px;
}
.meter-walker {
  position: absolute; left: calc(var(--score) * 1%); bottom: calc((var(--track-h) - 6px) / 2 - var(--walker) * .36); z-index: 1; /* 몸 가운데(64%)를 줄 가운데에. 6px = 줄 위아래 테두리 */
  width: var(--walker); margin-left: calc(var(--walker) / -2);
  display: flex; flex-direction: column; align-items: center;
}
.walker-art { width: var(--walker); height: var(--walker); transform-origin: 50% 100%; }
.walker-art img, .walker-art svg { width: 100%; height: 100%; object-fit: contain; }
.bubble {
  position: relative; display: flex; align-items: baseline; gap: 2px;
  height: var(--bubble-h); margin-bottom: calc(10px - var(--walker) * var(--t)); padding: 0 16px; white-space: nowrap; z-index: 1;
  background: var(--line); color: #fff; border-radius: 999px;
  font-family: var(--font-serious); font-weight: 700; font-size: 18px; line-height: var(--bubble-h);
}
.bubble::after { /* 말풍선 꼬리 */
  content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -8px;
  border: 8px solid transparent; border-bottom: 0; border-top-color: var(--line);
}
.bubble b { font-weight: 800; font-size: 36px; letter-spacing: -.02em; }
.meter-ticks { position: relative; height: 18px; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--ink-soft); }
.meter-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.meter-ticks span:nth-child(1) { left: 0; }
.meter-ticks span:nth-child(2) { left: 20%; }
.meter-ticks span:nth-child(3) { left: 40%; }
.meter-ticks span:nth-child(4) { left: 60%; }
.meter-ticks span:nth-child(5) { left: 80%; }
.meter-ticks span:nth-child(6) { left: 100%; }
.total-text { margin-top: 18px; }
.total-text p { margin: 0 0 10px; font-size: 17px; }
/* 결론: 진하고 크게, 형광펜 밑줄 */
.total-text .closing { margin: 18px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.5; color: var(--ink); text-align: center; text-wrap: balance; }
.total-text .closing span { background: linear-gradient(transparent 58%, rgba(255, 207, 74, .6) 58%); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-bottom: 12px; }
.tomorrow { text-align: center; color: var(--ink-soft); font-size: 14px; padding-bottom: 40px; }

/* ---------- 슬롯: 기계 몸통·레버 그림 (PC·모바일 모두 2×2) ----------
 * 좌표 단위 --u = 기계 그림 1px. 몸통 그림(1024×1536)의 불투명 영역 왼쪽 위(38, 82)를 원점으로 씀.
 * 실측(2차 기계): 화면(마젠타) 81,277 787×787 · 간판 150,75 650×144 · 상태 띠 151,1109 647×60
 *       동전 구멍 381,1218 168×17 · 레버 꽂는 곳 가운데 957,998 (레버 그림은 0.5배)
 */
.lever-img { display: none; }
/* 기계 위 전구 5개(몸통 그림 전구 자리, 가운데 x 314.5 + 80씩, y 29.5, 지름 47): 돌 때 차례로, 멈추면 한꺼번에 반짝 */
.bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bulbs i {
  position: absolute; top: calc(var(--u) * 29.5); left: calc(var(--u) * 314.5);
  width: calc(var(--u) * 47); height: calc(var(--u) * 47);
  margin: calc(var(--u) * -23.5) 0 0 calc(var(--u) * -23.5); border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #fff 0 22%, rgba(255, 246, 190, .95) 45%, rgba(255, 226, 110, 0) 72%);
  box-shadow: 0 0 calc(var(--u) * 28) calc(var(--u) * 8) rgba(255, 226, 110, .75);
  opacity: 0;
}
.bulbs i:nth-child(2) { left: calc(var(--u) * 394.5); }
.bulbs i:nth-child(3) { left: calc(var(--u) * 474.5); }
.bulbs i:nth-child(4) { left: calc(var(--u) * 554.5); }
.bulbs i:nth-child(5) { left: calc(var(--u) * 634.5); }
.machine.spinning .bulbs i { animation: bulb-chase .7s linear infinite; }
.machine.spinning .bulbs i:nth-child(2) { animation-delay: .14s; }
.machine.spinning .bulbs i:nth-child(3) { animation-delay: .28s; }
.machine.spinning .bulbs i:nth-child(4) { animation-delay: .42s; }
.machine.spinning .bulbs i:nth-child(5) { animation-delay: .56s; }
.machine.win .bulbs i { animation: bulb-flash .4s steps(1) 5; }
@keyframes bulb-chase { 0%, 24% { opacity: 1; } 34%, 100% { opacity: .12; } }
@keyframes bulb-flash { 0% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .machine.spinning .bulbs i, .machine.win .bulbs i { animation: none; opacity: .8; } }
@media all {
  .stage {
    /* 가로: 화면 폭과 높이(머리글·제목 약 230px 제외) 중 작은 쪽에 맞춤, 최대 600px */
    /* 기계 몸통(폭 966)이 가운데 오도록 왼쪽에도 레버 폭(119)만큼 빈칸 → 전체 폭 1204 */
    --sw: min(calc(100vw - 32px), 666px, calc((100dvh - 230px) * 1204 / 1364));
    --u: calc(var(--sw) / 1204);
    --gap: calc(var(--u) * 14);
    --col-pad: calc(var(--u) * 10);
    --label-h: calc(var(--u) * 64);
    /* 칸 크기: 화면 788 안에 2×2 + 이름표가 들어가는 크기 중 작은 쪽 */
    --tile: min(calc((var(--u) * 788 - var(--gap) * 3) / 2 - var(--col-pad) * 2),
                calc((var(--u) * 788 - var(--gap) * 3) / 2 - var(--col-pad) - var(--label-h)));
    width: var(--sw); height: calc(var(--u) * 1364);
    padding: 0;
  }
  .machine {
    position: absolute; left: calc(var(--u) * 119); top: 0;
    width: calc(var(--u) * 966); height: calc(var(--u) * 1364);
    padding: 0; border: 0; border-radius: 0; box-shadow: none;
    background: url('../img/machine/machine-body.webp?v=2') no-repeat;
    background-size: calc(var(--u) * 1024) calc(var(--u) * 1536);
    background-position: calc(var(--u) * -38) calc(var(--u) * -82);
  }
  .machine-top {
    position: absolute; left: calc(var(--u) * 150); top: calc(var(--u) * 75);
    width: calc(var(--u) * 650); height: calc(var(--u) * 144);
    margin: 0; border: 0; border-radius: 0; background: none; color: var(--ink);
  }
  .machine-top .sign-art { width: calc(var(--u) * 120); height: calc(var(--u) * 120); margin-top: 0; }
  .machine-top h2 { font-size: calc(var(--u) * 64); position: relative; top: calc(var(--u) * 5); } /* 주아 글자가 위로 떠 보여서 간판 안쪽 테두리 가운데에 맞춤(실측) */
  .reels {
    /* 마젠타 영역보다 사방 3px 크게 덮어 가장자리 분홍 테두리가 안 보이게 */
    position: absolute; left: calc(var(--u) * 77); top: calc(var(--u) * 273);
    width: calc(var(--u) * 794); height: calc(var(--u) * 794);
    box-sizing: border-box; padding: var(--gap);
    gap: var(--gap); align-content: center; justify-content: center;
    background: var(--line); border-radius: calc(var(--u) * 44);
    overflow: hidden; /* 대길 빛살이 화면 밖으로 안 나가게 */
  }
  .reel-col { background: rgba(255,255,255,.08); }
  .reel-label { font-size: calc(var(--u) * 36); }
  .machine-panel { display: contents; }
  .status {
    position: absolute; left: calc(var(--u) * 151); top: calc(var(--u) * 1109);
    width: calc(var(--u) * 647); height: calc(var(--u) * 60);
    display: flex; align-items: center; justify-content: center;
    font-size: calc(var(--u) * 38); line-height: 1; white-space: nowrap; overflow: hidden;
  }
  .coin-slot {
    position: absolute; left: calc(var(--u) * 381); top: calc(var(--u) * 1218);
    width: calc(var(--u) * 168); height: calc(var(--u) * 17); display: block;
  }
  .coin-slot span:last-child { display: none; }
  .slot-hole { display: block; width: 100%; height: 100%; background: transparent; box-shadow: none; }
  .coin-slot.glow .slot-hole { box-shadow: 0 0 0 3px var(--coin), 0 0 14px 4px var(--coin); }

  .lever { position: absolute; inset: 0; width: auto; overflow-x: clip; } /* 레버 그림 투명 여백 때문에 가로 스크롤 생기지 않게 */
  .lever-rod, .lever-knob { display: none; }
  /* 연결대: 몸통 오른쪽 외곽선(몸통 x 987)에서 레버 막대 아래까지 가로로 이어 줌
     (몸통 그림의 원래 경첩 동그라미·받침은 지움) */
  .lever-base {
    left: calc(var(--u) * 1061); top: calc(var(--u) * 976);
    width: calc(var(--u) * 70); height: calc(var(--u) * 36);
    background: var(--frame, #6BC4A6); border: calc(var(--u) * 8) solid #111; border-left: 0;
    border-radius: 0 calc(var(--u) * 18) calc(var(--u) * 18) 0;
  }
  .lever-arm {
    /* 레버 막대 가운데 = 몸통 그림 x 1030 (꽂는 곳 987~1004 바로 오른쪽), 화면 좌표는 +81 */
    left: calc(var(--u) * 983); top: calc(var(--u) * 482); /* 막대 아래 끝 = 연결대 가운데(몸통 y 1076) */
    width: calc(var(--u) * 256); height: calc(var(--u) * 512);
  }
  .lever-img { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; }
  .lever-hit {
    left: calc(var(--u) * 1000); right: auto; width: calc(var(--u) * 204);
    top: calc(var(--u) * 470); height: calc(var(--u) * 820);
  }

  /* 기계 뒤에서 엿보는 캐릭터: 디자이너 예시(assets/peek/mock-<id>.png)에서 잘라 낸 위치 그대로 — 표지 원본(cover.png)을 예시에 맞춰 돌린 고해상도 그림 (tools/fit-peek.js 출력값) */
  .peek { position: absolute; max-width: none; pointer-events: none; user-select: none; }
  .peek-squid .peek { left: calc(var(--u) * -213.2); top: calc(var(--u) * 396.7); width: calc(var(--u) * 660.2); height: calc(var(--u) * 773); }
  .peek-toad .peek { left: calc(var(--u) * 183.5); top: calc(var(--u) * -182.2); width: calc(var(--u) * 813.3); height: calc(var(--u) * 836.4); } /* 예시보다 85% 크기, 머리 꼭대기는 -182(디자이너 요청: 덜 깨져 보이게, 기계는 약 100px만 내려가게) */
  /* 꺼비는 기계 위로 머리를 내밀어 제목을 덮지 않게 그만큼(182) 아래로 내리고, 높이 맞춤도 그만큼 더 셈 */
  .stage.peek-toad {
    --sw: min(calc(100vw - 32px), 666px, calc((100dvh - 230px) * 1204 / 1546));
    margin-top: calc(var(--u) * 182);
  }
  .peek-capybara .peek { left: calc(var(--u) * 699.3); top: calc(var(--u) * 114.2); width: calc(var(--u) * 749.9); height: calc(var(--u) * 669.3); }
}
/* 엿보는 캐릭터가 화면 옆으로 삐져나가도 가로 스크롤이 생기지 않게 */
.slot-page { overflow-x: clip; } /* 안쪽 여백 바깥(=모바일에선 화면 끝)에서 잘림 */

/* ---------- PC (768px 이상) ---------- */
@media (min-width: 768px) {
  :root { --pad: 32px; --gap: 24px; }
  .topbar { height: 80px; }
  .logo img { height: 64px; }
  .streak { font-size: 14px; }
  .streak b { max-width: 9em; }
  .hero { padding: 40px 0 44px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 18px; }
  /* 6칸 격자: 캐릭터 3개가 2칸씩, 커밍순 2개는 그 사이에 엇갈려 놓임(올림픽 고리 모양) */
  .theme-grid { grid-template-columns: repeat(6, 1fr); }
  .theme-card, .soon-card { grid-column: span 2; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 28px 24px 26px; }
  .soon-card { grid-column: 2 / span 2; }
  .soon-2 { display: grid; grid-column: 4 / span 2; animation-delay: .38s; }
  .theme-art { width: 200px; height: 200px; }
  .soon-art { font-size: 72px; }
  .theme-info h2 { font-size: 28px; }

  .slot-title h1 { font-size: 34px; }

  .result-head h1 { font-size: 38px; }
  .lv { font-size: 16px; height: 30px; }
  .r-list { grid-template-columns: 1fr 1fr; gap: 16px; }
  .r-card { grid-template-columns: 140px 1fr; gap: 18px; padding: 18px 20px 20px 16px; }
  .r-card .art { width: 140px; height: 140px; }
  .total { padding: 22px 40px 36px; }
  .total .label { font-size: 28px; }
  .stamp { width: 104px; height: 104px; font-size: 30px; }
  .meter { --walker: 120px; --track-h: 22px; --bubble-h: 64px; }
  .bubble { font-size: 22px; padding: 0 20px; }
  .bubble b { font-size: 46px; }
  .meter-ticks { font-size: 14px; height: 20px; line-height: 20px; }
  .total-text p { font-size: 18px; }
  .total-text .closing { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 첫 화면 아래 읽을거리 버튼 · 저작권 ---------- */
.info-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 36px 0 0; }
.info-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  font-family: var(--font-serious); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none;
  transition: transform .12s var(--ease-out);
}
.info-link:hover { transform: translateY(-2px); }
.info-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.copyright { margin: 18px 0 40px; text-align: center; font-family: var(--font-serious); font-weight: 600; font-size: 12px; color: var(--ink-soft); }

/* ---------- 읽을거리 페이지(운세 설명·개인정보처리방침·캐릭터 소개) ---------- */
html[lang="en"] [data-lang="ko"], html[lang="ko"] [data-lang="en"] { display: none !important; }
.doc { max-width: 760px; padding-top: 8px; }
.doc-back { display: inline-block; margin: 4px 0 14px; font-family: var(--font-serious); font-weight: 700; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.doc-back:hover { color: var(--ink); }
.doc article { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px 24px 30px; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc .doc-lead { margin: 0 0 22px; color: var(--ink-soft); }
.doc h2 { font-family: var(--font-title); font-weight: 700; font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { margin: 0 0 8px; }
.doc ul, .doc ol { margin: 0 0 8px; padding-left: 1.3em; }
.doc a { color: var(--ink); }
.doc .note { margin-top: 22px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); font-size: 14px; }
.doc table { width: 100%; border-collapse: collapse; margin: 4px 0 10px; font-family: var(--font-serious); font-size: 14px; }
.doc th, .doc td { padding: 8px 10px; border-bottom: 1px solid #EEE4E0; text-align: left; vertical-align: top; }
.doc th { font-weight: 700; white-space: nowrap; }
/* 개인정보처리방침·영어 글은 읽기 쉬운 고딕 */
.doc-formal, html[lang="en"] .doc article { font-family: var(--font-serious); font-weight: 500; font-size: 15px; line-height: 1.7; }
.doc-formal h2, html[lang="en"] .doc h2 { font-family: var(--font-serious); font-weight: 800; font-size: 17px; }
/* 단계 표시 칩 */
.lv-chip { display: inline-block; min-width: 3.6em; padding: 1px 10px; border: 2px solid var(--line); border-radius: 999px; text-align: center; font-family: var(--font-title); font-size: 14px; }
/* 캐릭터 소개 */
.char-list { display: grid; gap: 14px; }
.char { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--c-bg, var(--bg)); }
.char img { width: 120px; height: 120px; object-fit: contain; }
.char h2 { margin: 0 0 4px; font-family: var(--font-name); font-weight: 400; font-size: 26px; }
.char .tag { margin: 0 0 6px; font-family: var(--font-title); color: var(--ink-soft); }
.char p { margin: 0; }
@media (max-width: 480px) {
  .doc article { padding: 22px 18px 24px; }
  .char { grid-template-columns: 88px 1fr; gap: 12px; }
  .char img { width: 88px; height: 88px; }
}
