/*
 * KZNA HEART POP — UI
 * 콘셉트: 수박게임의 투박함(굵은 잉크 외곽선 · 딱딱한 그림자 · 평평한 면) × 아이돌 포토카드 스티커
 * 멤버 컬러(--mc)가 화면의 주인공. 핑크는 하트/LOVE에만 쓴다.
 */
:root {
  --ink: #1e2a47;        /* 외곽선, 글자 */
  --ink-soft: #5b6b8e;   /* 보조 글자 */
  --ice: #cfe3f7;        /* 바탕 */
  --paper: #ffffff;      /* 스티커 면 */
  --pink: #ff4f9a;       /* 하트 · LOVE */
  --sun: #ffd84d;        /* 신기록 · 배지 */
  --mc: #6fb8ff;         /* 선택한 멤버 컬러 (JS에서 설정) */
  --line: 3px;
  --pop: 0 4px 0 var(--ink);
  /* 글꼴: 귀엽지만 크고 선명하게
     - 제목 · 숫자: Mochiy Pop One (일본 모바일게임식 굵은 팝) / 한글은 주아체
     - 본문 · 말풍선: M PLUS Rounded 1c 800 / 한글은 주아체 */
  --f-display: "Mochiy Pop One", "Jua", "M PLUS Rounded 1c", sans-serif;
  --f-hand: "M PLUS Rounded 1c", "Jua", "Hiragino Maru Gothic ProN", sans-serif;
  --hanko: #e8383d;
  --f-body: "M PLUS Rounded 1c", "Jua", "Hiragino Maru Gothic ProN", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--f-body); font-weight: 800;
  color: var(--ink);
  background-color: var(--ice);
  background-image: radial-gradient(rgba(30, 42, 71, .09) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

#app { position: relative; height: 100vh; height: 100dvh; max-width: 480px; margin: 0 auto; overflow: hidden; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; }

/* 공통: 스티커 */
.sticker { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: var(--pop); }

/* ============ 1. 선택 화면 ============ */
#screen-select {
  padding: max(16px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
  align-items: center; justify-content: center; gap: 12px;
}
.lang-switch {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 5;
  display: flex; border: var(--line) solid var(--ink); border-radius: 99px; overflow: hidden;
  background: var(--paper); box-shadow: 0 3px 0 var(--ink);
}
[hidden] { display: none !important; }
.lang-switch button { font-family: var(--f-display); font-size: 11px; padding: 5px 9px; color: var(--ink-soft); }
.lang-switch button + button { border-left: 2px solid var(--ink); }
.lang-switch button.on { background: var(--ink); color: #fff; }

.title { text-align: center; margin-top: 10px; }
.title-logo {
  display: block; width: 150px; aspect-ratio: 1200 / 313; margin: 0 auto; background: var(--ink);
  -webkit-mask: url(../assets/kzna-logo.png) center / contain no-repeat;
          mask: url(../assets/kzna-logo.png) center / contain no-repeat;
}
.title-name {
  margin: 2px 0 0; font-family: var(--f-display); font-weight: 400; font-size: 44px; line-height: 1;
  color: var(--pink); letter-spacing: .01em;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}
.title-name { position: relative; display: inline-block; }
.spark { position: absolute; font-size: 20px; color: var(--sun); -webkit-text-stroke: 1.5px var(--ink); text-shadow: 0 2px 0 var(--ink); }
.spark.s1 { left: -22px; top: -6px; transform: rotate(-12deg); }
.spark.s2 { right: -20px; bottom: -2px; font-size: 15px; transform: rotate(10deg); }
.title-copy { margin: 14px 0 0; font-size: 14px; font-weight: 800; color: var(--ink-soft); }

.pick { margin: 4px 0 0; font-family: var(--f-display); font-weight: 400; font-size: 21px; }

.member-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 6px 4px 0; }
/* チェキ: 흰 프레임 + 아래 넓은 여백 + 마스킹테이프 */
.member-card {
  position: relative; display: block; text-align: center;
  padding: 7px 7px 0; background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 6px; box-shadow: 0 5px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .15s ease, box-shadow .15s ease;
}
.member-card:active { transform: rotate(var(--tilt, 0deg)) translateY(4px); box-shadow: 0 1px 0 var(--ink); }
@media (hover: hover) { .member-card:hover { transform: rotate(0deg) translateY(-3px) scale(1.02); box-shadow: 0 8px 0 var(--ink); } }
.tape {
  position: absolute; left: 50%; top: -10px; width: 56px; height: 18px; z-index: 2;
  transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) * -2.5));
  background: color-mix(in srgb, var(--mc) 70%, #fff);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 4px, transparent 4px 8px);
  opacity: .92; border-left: 2px dashed rgba(255,255,255,.7); border-right: 2px dashed rgba(255,255,255,.7);
}
.card-art {
  position: relative; aspect-ratio: 1 / 1.05; overflow: hidden; border: 2px solid var(--ink); border-radius: 2px;
  background-color: var(--mc);
  background-image: radial-gradient(rgba(255,255,255,.5) 1.4px, transparent 1.5px);
  background-size: 10px 10px;
}
.card-art img, .card-art svg { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 0; }
.card-cap { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 7px 4px 9px; }
.card-name { font-family: var(--f-display); font-size: 17px; line-height: 1.1; }
.card-sign { font-family: var(--f-hand); font-weight: 800; font-size: 13px; color: var(--pink); }
.card-hw {
  position: absolute; left: 6px; top: 6px;
  display: flex; align-items: center; gap: 4px; padding: 2px 7px 2px 6px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 99px;
  font-family: var(--f-display); font-size: 10px;
}
.card-hw::before { content: ""; width: 10px; height: 9px; background: var(--pink); clip-path: path("M5 9 C1 6 0 4.5 0 2.8 C0 1.2 1.2 0 2.6 0 C3.6 0 4.4 .6 5 1.4 C5.6 .6 6.4 0 7.4 0 C8.8 0 10 1.2 10 2.8 C10 4.5 9 6 5 9Z"); }
/* 최고 LOVE 레벨: 작은 판코 도장 */
.card-best {
  position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  color: var(--hanko); border: 2.5px solid var(--hanko); background: rgba(255,255,255,.85);
  font-family: var(--f-display); font-size: 14px; transform: rotate(-12deg);
}
.card-best small { font-size: 6.5px; letter-spacing: .05em; }

.how { list-style: none; margin: 4px 0 0; padding: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.how li { display: flex; align-items: center; gap: 4px; }
.how li + li::before { content: ""; width: 14px; height: 2.5px; margin-right: 2px; background: var(--ink-soft); border-radius: 2px; }
.how-ic { width: 16px; height: 16px; border: 2.5px solid var(--ink); border-radius: 50%; flex: none; }
.how-merge { background: #c4e8ff; }
.how-heart { background: var(--pink); border-radius: 4px; transform: rotate(45deg) scale(.8); }
.how-lv { background: var(--sun); border-radius: 4px; }

/* ============ 2. 게임 화면 ============ */
#screen-game { padding: max(8px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); gap: 8px; }

/* 멤버 무대: 멤버 컬러의 포토카드 */
.stage {
  position: relative; flex: none; height: clamp(150px, 26dvh, 240px);
  border: var(--line) solid var(--ink); border-radius: 22px; overflow: hidden;
  background: var(--mc); box-shadow: var(--pop);
}
.stage-dots {
  position: absolute; inset: 0; overflow: hidden;
  background-image: radial-gradient(rgba(255,255,255,.45) 1.6px, transparent 1.7px);
  background-size: 12px 12px;
}
.rays {
  position: absolute; left: 50%; top: 75%; width: 640px; height: 640px; margin: -320px 0 0 -320px;
  background: repeating-conic-gradient(rgba(255,255,255,.35) 0deg 9deg, rgba(255,255,255,0) 9deg 22deg);
  animation: spin 30s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 60%); mask: radial-gradient(circle, #000 15%, transparent 60%);
}
.stage.aura .rays {
  background: repeating-conic-gradient(rgba(255,79,154,.5) 0deg 8deg, rgba(255,255,255,.55) 8deg 16deg, rgba(255,255,255,0) 16deg 26deg);
  opacity: calc(.6 + var(--aura, 0) * .4); animation-duration: 10s;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topbar { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.member-name {
  font-family: var(--f-display); font-size: 17px; line-height: 1; padding: 6px 10px 5px;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink);
}
.member-name small { margin-left: 5px; font-family: var(--f-body); font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.hw-live {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  background: var(--ink); color: #fff; border-radius: 99px;
}
.hw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px rgba(255,79,154,.35); animation: beat 1.1s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.5); } 30% { transform: scale(1.1); } 45% { transform: scale(1.35); } }
.hw-live b { font-family: var(--f-display); font-weight: 400; font-size: 12px; letter-spacing: .02em; }
.hw-live.tick b { animation: hwTick .35s ease-out; }
@keyframes hwTick { 40% { color: var(--sun); } }

.tools { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px;
  background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .ic-off { display: none; }
.icon-btn.off .ic-on { display: none; }
.icon-btn.off .ic-off { display: block; }

.avatar-wrap { position: absolute; left: 50%; bottom: 0; height: 100%; aspect-ratio: 1; transform: translateX(-50%); z-index: 1; }
.avatar { position: relative; width: 100%; height: 100%; transform-origin: 50% 90%; }
.avatar svg, .avatar img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: bottom; }
.stage .avatar img { filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink)); }
.avatar svg .blush { opacity: .25; transition: opacity .25s; }
.avatar svg.blushing .blush { opacity: .75; }
.avatar svg.blink .eye-open { transform: scaleY(.1); }
.avatar.pulse { animation: pulse .32s ease-out; }
.avatar.react { animation: bounce .45s cubic-bezier(.3,1.6,.5,1); }
.avatar.react.pulse { animation: pulse .32s ease-out; }
.avatar[data-state="celebrate"], .avatar[data-state="special"] { animation: dance .5s ease-in-out 3; }
@keyframes pulse { 40% { transform: scale(1.06); } }
@keyframes bounce { 40% { transform: translateY(-6px) scale(1.03); } }
@keyframes dance { 25% { transform: rotate(-3deg) translateY(-4px); } 75% { transform: rotate(3deg) translateY(-4px); } }

.bubble {
  position: absolute; right: 8px; bottom: 10px; z-index: 3; max-width: 44%;   /* 얼굴을 가리지 않게 어깨 옆 */
  padding: 9px 13px 8px; border-radius: 16px 16px 16px 4px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  font-family: var(--f-hand); font-weight: 800; font-size: 17px; line-height: 1.35; color: var(--ink);
  word-break: keep-all; overflow-wrap: anywhere;
  opacity: 0; transform: translateY(8px) scale(.85); transform-origin: 0 100%;
  transition: opacity .18s, transform .25s cubic-bezier(.3,1.6,.5,1); pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }

/* 하트 게이지 */
.love { flex: none; display: flex; align-items: center; gap: 8px; }
.lv {
  flex: none; min-width: 66px; text-align: center; padding: 6px 8px 5px;
  font-family: var(--f-display); font-size: 17px; line-height: 1; color: #fff;
  background: var(--pink); border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink);
}
.gauge {
  position: relative; flex: 1; height: 28px; overflow: hidden;
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink);
}
.gauge-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--pink); border-right: 2.5px solid var(--ink);
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0) 0 9px, rgba(255,255,255,.3) 9px 14px);
  animation: stripe 1s linear infinite;
}
@keyframes stripe { to { background-position: 28px 0; } }
.gauge-text {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-display); font-size: 12px; color: var(--ink);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}
.gauge.hit { animation: gaugeHit .28s ease-out; }
.gauge.levelup { animation: gaugeLv .6s ease-out; }
@keyframes gaugeHit { 40% { transform: scaleY(1.15); } }
@keyframes gaugeLv { 0% { background: var(--sun); transform: scale(1.04); } }

/* 점수 줄: 카드 없이 숫자만 */
.scoreline { flex: none; display: flex; align-items: center; gap: 14px; padding: 0 4px; }
.sc { display: flex; align-items: baseline; gap: 6px; }
.sc-lbl { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.sc-num { font-family: var(--f-display); }
.sc-score .sc-num { font-size: 26px; line-height: 1; }
.sc-best .sc-num { font-size: 16px; color: var(--ink-soft); }
.sc-next { margin-left: auto; align-items: center; }
#nextCanvas {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}

/* 게임판: 굵은 테두리의 통 */
.board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: none; }
#board {
  display: block; border: var(--line) solid var(--ink); border-top-width: 0; border-radius: 4px 4px 24px 24px;
  background: #eef6ff;
  background-image: linear-gradient(90deg, rgba(30,42,71,.05) 1.5px, transparent 1.5px);
  background-size: 30px 100%;
  box-shadow: 0 5px 0 var(--ink), inset 0 -8px 0 rgba(30,42,71,.06);
}

.center-msg, .levelup-banner {
  position: absolute; left: 50%; transform: translate(-50%, -50%) scale(.7); pointer-events: none; opacity: 0;
  white-space: nowrap; font-family: var(--f-display); color: #fff;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink);
}
.center-msg { top: 36%; font-size: 26px; color: var(--paper); transition: opacity .2s, transform .3s cubic-bezier(.2,1.5,.4,1); }
.center-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.levelup-banner { top: 22%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.levelup-banner b { font-weight: 400; font-size: 30px; color: var(--pink); }
.levelup-banner span {
  font-size: 13px; color: var(--ink); -webkit-text-stroke: 0; text-shadow: none;
  padding: 4px 10px 3px; background: var(--sun); border: 2.5px solid var(--ink); border-radius: 99px;
}
.levelup-banner.show { animation: banner 1.8s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(-3deg); }
  28% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  82% { opacity: 1; transform: translate(-50%, -58%) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translate(-50%, -72%) scale(.95) rotate(-3deg); }
}

/* ============ 3. 결과: 아래에서 올라오는 시트 ============ */
.result {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end;
  background: rgba(30, 42, 71, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.result.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; padding: 0 18px max(16px, env(safe-area-inset-bottom));
  background: var(--paper); border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0;
  transform: translateY(100%); transition: transform .45s cubic-bezier(.2,1.2,.3,1);
  text-align: center;
}
.result.show .sheet { transform: none; }

/* 결과 チェキ */
.res-cheki {
  position: relative; width: 196px; margin: -112px auto 0; padding: 8px 8px 0;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 6px; box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-3deg); --tilt: -1.2deg;
}
.res-art {
  width: 100%; aspect-ratio: 1; overflow: hidden; border: 2px solid var(--ink); border-radius: 2px;
  background-color: var(--mc); background-image: radial-gradient(rgba(255,255,255,.45) 1.5px, transparent 1.6px); background-size: 11px 11px;
}
.res-art img, .res-art svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.res-quote {
  margin: 0; padding: 7px 4px 4px; min-height: 30px;
  font-family: var(--f-hand); font-weight: 800; font-size: 15px; line-height: 1.4; color: var(--ink);
}
.res-member { display: block; padding: 0 0 8px; font-family: var(--f-display); font-size: 12px; color: var(--pink); text-align: right; padding-right: 6px; }
/* LOVE 레벨 판코(도장) */
.hanko {
  position: absolute; right: -30px; top: 112px; width: 76px; height: 76px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  color: var(--hanko); border: 3.5px solid var(--hanko); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--hanko);
  background: rgba(255,255,255,.88); transform: rotate(14deg) scale(0);
  font-family: var(--f-display);
}
.hanko small { font-size: 10px; letter-spacing: .08em; }
.hanko b { font-weight: 400; font-size: 21px; margin-top: 2px; }
.result.show .hanko { animation: stamp .45s .35s cubic-bezier(.3,1.8,.5,1) forwards; }
@keyframes stamp { 0% { transform: rotate(14deg) scale(2.2); opacity: 0; } 100% { transform: rotate(14deg) scale(1); opacity: 1; } }
.res-special {
  display: none; position: absolute; left: -26px; top: 18px; transform: rotate(-14deg);
  font-family: var(--f-display); font-size: 11px; padding: 4px 9px 3px; border-radius: 6px; background: var(--ink); color: #fff;
}
.res-special.show { display: block; }

.res-stats { margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 9px;
  border: 2.5px solid var(--ink); border-radius: 16px; background: #f2f7fd;
}
.rs-lbl { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.rs-num { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.rs-hw .rs-num { color: var(--pink); }
.rs-sub { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
/* NEW! 별 터짐 배지 */
.res-best {
  display: none; position: absolute; top: -26px; right: -14px; width: 66px; height: 66px;
  align-items: center; justify-content: center; text-align: center; line-height: 1.05;
  font-family: var(--f-display); font-size: 11px; color: var(--ink); background: var(--sun);
  clip-path: polygon(50% 0%, 59% 15%, 75% 6%, 76% 24%, 94% 25%, 85% 41%, 100% 50%, 85% 59%, 94% 75%, 76% 76%, 75% 94%, 59% 85%, 50% 100%, 41% 85%, 25% 94%, 24% 76%, 6% 75%, 15% 59%, 0% 50%, 15% 41%, 6% 25%, 24% 24%, 25% 6%, 41% 15%);
  filter: drop-shadow(0 0 0 var(--ink)); transform: rotate(10deg); padding: 10px;
}
.res-best.show { display: flex; animation: wobble 1.4s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-6deg) scale(1.06); } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: var(--pop);
  font-family: var(--f-display); font-size: 16px; transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-main { width: 100%; margin-top: 16px; padding: 14px; font-size: 21px; background: var(--pink); color: #fff; text-shadow: 0 2px 0 rgba(30,42,71,.35); }
.btn-row { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-x { padding: 11px 8px; background: var(--ink); color: #fff; }
.btn-sub { padding: 11px 8px; background: var(--paper); color: var(--ink); }

.home {
  margin: 14px auto 0; width: fit-content; display: flex; align-items: center; gap: 7px; padding: 6px 4px;
  font-size: 13.5px; font-weight: 800; color: var(--ink-soft); text-decoration: none;
}
.home-logo {
  width: 46px; aspect-ratio: 1200 / 313; background: var(--ink);
  -webkit-mask: url(../assets/kzna-logo.png) center / contain no-repeat;
          mask: url(../assets/kzna-logo.png) center / contain no-repeat;
}

/* 작은 화면 */
@media (max-height: 680px) {
  .bubble { font-size: 15px; bottom: 8px; }
  .title { margin-top: 40px; }
  .title-logo { width: 120px; }
  .stage { height: 138px; }
  .gauge { height: 24px; }
  .lv { font-size: 15px; min-width: 58px; }
  .sc-score .sc-num { font-size: 22px; }
  .title-name { font-size: 34px; }
  #screen-select { gap: 8px; }
  .member-grid { gap: 14px 12px; }
  .card-art { aspect-ratio: 1 / .8; }
  .card-cap { padding: 5px 4px 6px; }
  .title-copy { margin-top: 6px; font-size: 12px; }
  .pick { font-size: 17px; }
  .res-cheki { width: 150px; margin-top: -84px; }
  .hanko { width: 62px; height: 62px; top: 84px; right: -26px; }
  .hanko b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .rays, .hw-dot, .gauge-fill { animation: none; }
}
