/* sites/balance/style.css — 밸런스 게임 전용 스타일
 * 컨셉: 예능 자막의 "VS" 화면. 탠저린(A) vs 코발트(B) 두 덩어리가 화면을 반으로 가르고, 레몬색 VS 스티커가 경계에 붙는다.
 * 고르면 경계선이 실제 선택률 쪽으로 밀려 움직인다 — 이 한 번의 움직임에 모션을 몰아 쓴다.
 * ladder(마리골드 코믹 아웃라인)·past-life(밤하늘 금빛)·life(흑백 잉크)와 겹치지 않는 차가운 종이 바탕 + 원색 대비.
 */

:root {
  color-scheme: light;
  --ink: #17153b;
  --ink-2: rgba(23, 21, 59, 0.7);
  --ink-3: rgba(23, 21, 59, 0.46);
  --line: rgba(23, 21, 59, 0.13);
  --paper: #edeff6;
  --card: #ffffff;
  --a: #ff5a1f;       /* A: 탠저린 — 위에 올리는 글자는 잉크색 (대비 5.6:1) */
  --a-deep: #c03a07;  /* 흰 바탕 위 A 글자 */
  --a-ink: #17153b;
  --b: #2743ff;       /* B: 코발트 — 위에 올리는 글자는 흰색 (대비 6.9:1) */
  --b-deep: #1a2fd1;
  --b-ink: #ffffff;
  --lemon: #ffe14a;
  /* 아래 4개 + --wb(줄바꿈)는 언어마다 다르다: tools/i18n/<lang>.js 의 fonts 를 gen-i18n.js 가 <head> 에 넣는다.
     여기 값은 기본(라틴 문자)용. 한글·가나·한자처럼 글자가 넓은 문자는 <html class="bal-dense"> 로 크기 단계를 바꾼다. */
  --font-display: 'Dela Gothic One', var(--font-sans);
  --font-num: 'Dela Gothic One', 'Black Han Sans', var(--font-sans);
  --font-opt: var(--font-sans);
  --opt-weight: 800;
  --opt-scale: 1;
  --wb: normal;
  --mg-star-on: var(--a);
  --mg-star-off: rgba(23, 21, 59, 0.18);
}

html { background: var(--paper); }
/* 줄바꿈: 한국어는 어절 단위(keep-all), 일본어는 문절(auto-phrase), 그 밖은 기본 — 언어 파일의 fonts.wordBreak */
body.bal-body { background: var(--paper); color: var(--ink); min-height: 100vh; word-break: var(--wb); overflow-wrap: break-word; line-break: strict; }

/* 모든 미니앱은 모바일 화면이 기본: 데스크톱에서도 가운데 한 줄(--app-width, shared/base.css). 넓히는 분기점은 두지 않는다. */
.bal-shell { max-width: var(--app-width, var(--max-width)); margin: 0 auto; padding: 0 16px 8px; }

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

:where(.bal-body) button:focus-visible,
:where(.bal-body) a:focus-visible,
:where(.bal-body) summary:focus-visible { outline: 3px solid var(--b); outline-offset: 3px; }

/* ---------------------------------------------------------------- 히어로: 제목이 A/B 두 덩어리로 갈라진다 */
.bal-hero { position: relative; margin: 14px 0 18px; }
.bal-hero-title { margin: 0; display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 400; }
.bal-hero-a,
.bal-hero-b { display: block; padding: 22px 22px 38px; line-height: 1.02; letter-spacing: -0.01em; }
.bal-hero-a {
  background: var(--a); color: var(--a-ink);
  border-radius: 28px 28px 0 0;
  font-size: clamp(38px, 11.4vw, 54px);
}
.bal-dense .bal-hero-a { font-size: clamp(44px, 13.5vw, 62px); }
.bal-hero-b {
  background: var(--b); color: var(--b-ink);
  border-radius: 0 0 28px 28px;
  padding: 38px 22px 22px;
  text-align: right;
  font-size: clamp(28px, 8.4vw, 40px);
}

.bal-vs,
.bal-hero-b::before {
  position: absolute; z-index: 3;
  left: 50%; top: 0;
  width: 62px; height: 62px;
  margin: -31px 0 0 -31px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--lemon); color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink);
  font-family: 'Dela Gothic One', var(--font-sans);
  font-size: 21px; line-height: 1; letter-spacing: -0.03em;
  transform: rotate(-10deg);
  pointer-events: none;
}
/* 히어로의 VS 는 B 덩어리 위쪽 가장자리(= 실제 경계)에 붙는다. 장식이므로 읽지 않는다(content 대체 텍스트 ""). */
.bal-hero-b { position: relative; }
.bal-hero-b::before { content: attr(data-vs); content: attr(data-vs) / ''; text-align: center; }

/* 페이지 첫 모션 한 번: 두 덩어리가 양쪽에서 부딪히고 VS 가 찍힌다 */
.bal-hero-a { animation: bal-in-left 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
.bal-hero-b { animation: bal-in-right 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) 0.05s both; }
.bal-hero-b::before { animation: bal-vs-stamp 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.42s both; }
@keyframes bal-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes bal-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes bal-vs-stamp {
  0% { opacity: 0; transform: scale(2.4) rotate(-30deg); }
  70% { opacity: 1; transform: scale(0.9) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(-10deg); }
}

.bal-hook { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin: 0 0 6px; max-width: 34em; }

.bal-h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.25; margin: 28px 0 12px; }

/* ---------------------------------------------------------------- 팩 고르기 */
.bal-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bal-pack {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 132px;
  padding: 14px 14px 12px;
  border: 0; border-radius: 20px;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
  text-align: left; cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.bal-pack:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.bal-pack:active { transform: scale(0.97); }
.bal-pack-emoji { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.bal-pack-name { font-family: var(--font-display); font-size: 21px; line-height: 1.12; }
.bal-pack-blurb { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.bal-pack-count { margin-top: auto; padding-top: 8px; font-size: 12px; font-weight: 700; color: var(--ink-3); }

/* 랜덤 12: 카드 자체가 A|B 로 갈라져 있다 */
.bal-pack--random {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 64% 36%;
  grid-template-areas: 'name emoji' 'blurb count';
  align-items: start;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: linear-gradient(90deg, var(--a) 0 64%, var(--b) 64% 100%);
  box-shadow: none;
}
.bal-pack--random:hover { box-shadow: inset 0 0 0 3px var(--ink); }
.bal-pack--random .bal-pack-name { grid-area: name; padding: 18px 16px 0; font-size: 28px; }
.bal-pack--random .bal-pack-blurb { grid-area: blurb; padding: 6px 16px 18px; color: rgba(23, 21, 59, 0.82); font-weight: 600; }
.bal-pack--random .bal-pack-emoji { grid-area: emoji; justify-self: center; align-self: end; margin: 0; padding-top: 16px; font-size: 40px; }
.bal-pack--random .bal-pack-count { grid-area: count; justify-self: center; margin: 0; padding: 8px 0 16px; color: #fff; }

/* 극한: 가장 어려운 팩은 잉크 바탕 */
.bal-pack--boss {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'emoji name count' 'emoji blurb count';
  column-gap: 14px; row-gap: 2px;
  align-items: center;
  padding: 16px 18px;
  background: var(--ink); color: #fff;
  box-shadow: none;
}
.bal-pack--boss:hover { box-shadow: inset 0 0 0 3px var(--lemon); }
.bal-pack--boss .bal-pack-emoji { grid-area: emoji; margin: 0; font-size: 32px; }
.bal-pack--boss .bal-pack-name { grid-area: name; color: var(--lemon); }
.bal-pack--boss .bal-pack-blurb { grid-area: blurb; color: rgba(255, 255, 255, 0.72); }
.bal-pack--boss .bal-pack-count { grid-area: count; margin: 0; padding: 0; color: rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------------- 질문 화면 */
.bal-bar { display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; }
.bal-icon-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
  cursor: pointer;
}
.bal-icon-btn:active { transform: scale(0.92); }
.bal-progress { flex: 1; min-width: 0; display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; }
.bal-progress li { flex: 1; height: 8px; border-radius: 4px; background: rgba(23, 21, 59, 0.12); transition: background 0.2s ease; }
.bal-progress li.is-current { background: var(--ink); }
.bal-progress li.is-skip { background: rgba(23, 21, 59, 0.3); }
.bal-progress li.is-a { background: var(--a); }
.bal-progress li.is-b { background: var(--b); }
.bal-progress-num { flex-shrink: 0; min-width: 44px; text-align: right; font-family: var(--font-num); font-size: 13px; font-variant-numeric: tabular-nums; }
.bal-text-btn {
  flex-shrink: 0;
  padding: 10px 2px;
  border: 0; background: none; color: var(--ink-2);
  font-size: 13px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.bal-text-btn[hidden] { display: inline-block !important; visibility: hidden; }

.bal-friend-banner {
  margin: 8px 0 0; padding: 10px 14px;
  border-radius: 14px;
  background: var(--lemon); color: var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.45;
}

.bal-q-head { text-align: center; margin: 12px 0 12px; }
.bal-q-pack { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.bal-prompt { margin: 0; min-height: 1.25em; font-family: var(--font-display); font-weight: 400; font-size: 23px; line-height: 1.25; text-wrap: balance; }
.bal-prompt.is-long { font-size: 17px; }

/* 대결 카드: 위 A / 아래 B. 고르면 flex-basis 가 선택률 쪽으로 움직인다 */
.bal-duel {
  position: relative;
  display: flex; flex-direction: column;
  height: clamp(340px, calc(100vh - 290px), 540px);
  height: clamp(340px, calc(100svh - 290px), 540px);
  border-radius: 28px;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
/* 친구 링크 안내나 긴 질문 문장이 있으면 그만큼 카드를 줄여 "다음" 버튼이 첫 화면에 남게 한다 */
.bal-friend-banner:not([hidden]) ~ .bal-duel {
  height: clamp(320px, calc(100vh - 360px), 520px);
  height: clamp(320px, calc(100svh - 360px), 520px);
}
.bal-screen.has-long-prompt .bal-duel {
  height: clamp(320px, calc(100vh - 320px), 520px);
  height: clamp(320px, calc(100svh - 320px), 520px);
}
.bal-screen.has-long-prompt .bal-friend-banner:not([hidden]) ~ .bal-duel {
  height: clamp(300px, calc(100vh - 390px), 500px);
  height: clamp(300px, calc(100svh - 390px), 500px);
}
.bal-side {
  position: relative;
  flex: 1 1 50%;
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 26px 22px;
  border: 0; border-radius: 0;
  font: inherit; text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: flex-basis 0.65s cubic-bezier(0.22, 1, 0.3, 1), filter 0.3s ease, padding 0.3s ease;
}
.bal-side--a { background: var(--a); color: var(--a-ink); overflow: hidden; }
.bal-side--b { background: var(--b); color: var(--b-ink); }
.bal-side:focus-visible { outline: 4px solid var(--lemon); outline-offset: -10px; }

/* 커다란 A / B 워터마크 (대각선으로 마주 보게) */
.bal-side-letter {
  position: absolute;
  font-family: 'Dela Gothic One', var(--font-sans);
  font-size: 200px; line-height: 0.8;
  opacity: 0.12;
  pointer-events: none;
}
.bal-side--a .bal-side-letter { top: -6px; left: 4px; }
.bal-side--b .bal-side-letter { right: 4px; bottom: -34px; }
.bal-side--b { overflow: visible; } /* VS 스티커가 경계 위로 튀어나온다 (바깥은 .bal-duel 이 자른다) */

.bal-opt {
  position: relative;
  max-width: 15em;
  font-family: var(--font-opt); font-weight: var(--opt-weight);
  font-size: calc(clamp(21px, 5.8vw, 27px) * var(--opt-scale)); line-height: 1.2; letter-spacing: -0.012em;
  overflow-wrap: anywhere; text-wrap: balance;
  transition: font-size 0.3s ease, opacity 0.3s ease;
}
.bal-dense .bal-opt { font-size: calc(clamp(26px, 8vw, 34px) * var(--opt-scale)); letter-spacing: 0; }
.bal-duel[data-long='1'] .bal-opt { font-size: calc(clamp(19px, 5.2vw, 24px) * var(--opt-scale)); }
.bal-dense .bal-duel[data-long='1'] .bal-opt { font-size: calc(clamp(23px, 6.8vw, 29px) * var(--opt-scale)); }

@media (hover: hover) {
  .bal-duel[data-state='idle'] .bal-side:hover .bal-opt { transform: scale(1.035); }
  .bal-opt { transition: font-size 0.3s ease, opacity 0.3s ease, transform 0.2s ease; }
}
.bal-duel[data-state='idle'] .bal-side:active { filter: brightness(0.93); }

/* 선택 */
.bal-side.is-chosen { animation: bal-punch 0.36s ease-out; }
@keyframes bal-punch { 0% { filter: brightness(1.15); } 100% { filter: none; } }
.bal-side::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ink);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.bal-side.is-other::before { opacity: 0.26; }
.bal-side.is-other .bal-opt { opacity: 0.8; }

.bal-tag {
  position: absolute; z-index: 2;
  top: 14px; right: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lemon); color: var(--ink);
  box-shadow: 0 0 0 3px var(--ink);
  font-size: 13px; font-weight: 800; line-height: 1.2;
  opacity: 0;
  transform: scale(0.4) rotate(-8deg);
  pointer-events: none;
}
.bal-side.is-chosen .bal-tag--you { animation: bal-stamp 0.42s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes bal-stamp {
  0% { opacity: 0; transform: scale(2.2) rotate(-20deg); }
  60% { opacity: 1; transform: scale(0.92) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.bal-tag--friend { right: auto; left: 14px; background: #fff; transform: rotate(4deg); }
.bal-duel:is([data-state='result'], [data-state='nodata']) .bal-side.has-friend .bal-tag--friend { opacity: 1; transform: rotate(4deg); transition: opacity 0.3s ease 0.4s; }

/* 결과: 퍼센트 + 인원 + 정확한 막대 */
.bal-stat { display: none; align-items: baseline; justify-content: center; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; position: relative; }
.bal-duel[data-state='result'] .bal-stat { display: flex; }
.bal-pct { font-family: 'Dela Gothic One', var(--font-sans); font-size: clamp(36px, 11vw, 50px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bal-cnt { font-size: 13px; font-weight: 700; opacity: 0.82; }
.bal-meter {
  position: absolute; left: 22px; right: 22px; bottom: 14px;
  height: 6px; border-radius: 3px;
  background: rgba(23, 21, 59, 0.2);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.bal-side--b .bal-meter { background: rgba(255, 255, 255, 0.24); }
.bal-meter-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width 0.65s cubic-bezier(0.22, 1, 0.3, 1); }
.bal-duel[data-state='result'] .bal-meter { opacity: 1; }
.bal-duel[data-state='result'] .bal-side { padding: 18px 20px 26px; gap: 6px; }
.bal-duel[data-state='result'] .bal-opt { font-size: clamp(15px, 4.2vw, 18px); }
.bal-dense .bal-duel[data-state='result'] .bal-opt { font-size: clamp(16px, 4.6vw, 20px); }
/* 자리가 넉넉한 쪽(경계선이 밀려난 반대편)은 글자를 한 단계 크게 둔다 */
.bal-duel[data-state='result'] .bal-side.is-roomy .bal-opt { font-size: clamp(17px, 4.8vw, 21px); }
.bal-dense .bal-duel[data-state='result'] .bal-side.is-roomy .bal-opt { font-size: clamp(19px, 5.6vw, 24px); }

/* 질문이 바뀔 때: 두 덩어리가 양쪽에서 짧게 밀려 들어온다 */
.bal-duel.is-entering .bal-side--a { animation: bal-slide-a 0.34s cubic-bezier(0.2, 0.9, 0.3, 1); }
.bal-duel.is-entering .bal-side--b { animation: bal-slide-b 0.34s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes bal-slide-a { from { transform: translateX(-18px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes bal-slide-b { from { transform: translateX(18px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.bal-duel.no-anim .bal-side,
.bal-duel.no-anim .bal-meter-fill,
.bal-duel.no-anim .bal-opt { transition: none !important; }

.bal-after { min-height: 96px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; }
.bal-note { margin: 0; min-height: 1.45em; max-width: 30em; font-size: 13px; line-height: 1.45; color: var(--ink-2); text-align: center; }
.bal-next {
  position: relative; overflow: hidden;
  width: 100%; max-width: 340px;
  padding: 15px 20px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-size: 18px; line-height: 1.2;
  cursor: pointer;
}
.bal-next[hidden] { display: block !important; visibility: hidden; }
.bal-next-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--lemon); transform: scaleX(0); transform-origin: left center; }
.bal-next.is-counting .bal-next-fill { transform: scaleX(1); transition: transform var(--advance, 1.2s) linear; }
.bal-next-label { position: relative; }
.bal-next:active { transform: scale(0.98); }

/* ---------------------------------------------------------------- 결과 화면 */
.bal-result {
  position: relative;
  margin-top: 14px;
  padding: 30px 20px 20px;
  border-radius: 28px;
  background: var(--ink); color: #fff;
  overflow: hidden;
}
.bal-result::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 10px;
  background: linear-gradient(90deg, var(--a) 0 50%, var(--b) 50% 100%);
}
.bal-result-pack { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.72); }
.bal-result-type { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 10vw, 48px); line-height: 1.05; color: var(--lemon); outline: none; }
.bal-dense .bal-result-type { font-size: clamp(40px, 12vw, 56px); }
.bal-result-desc { margin: 0 0 18px; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.86); }
.bal-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.bal-statbox { flex: 1 1 28%; min-width: 92px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.08); }
.bal-statbox[hidden] { display: none; }
.bal-statbox-num { font-family: 'Dela Gothic One', var(--font-sans); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.bal-statbox-label { font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, 0.72); }
.bal-rate-meter { margin-top: 14px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.bal-rate-meter[hidden] { display: none; }
.bal-rate-meter-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lemon); transition: width 0.9s cubic-bezier(0.22, 1, 0.3, 1); }
.bal-result-line { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.76); }
.bal-result-line:empty { display: none; }

.bal-actions { display: grid; gap: 10px; margin: 16px 0 4px; }
.bal-btn {
  width: 100%;
  padding: 16px 20px;
  border: 0; border-radius: 999px;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
  font-family: var(--font-display); font-size: 18px; line-height: 1.2;
  cursor: pointer;
}
.bal-btn--primary { background: var(--a); box-shadow: none; }
.bal-btn:active { transform: scale(0.98); }
.bal-link-btn {
  justify-self: center;
  padding: 8px 10px;
  border: 0; background: none; color: var(--ink-2);
  font-size: 14px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

.bal-block { margin-top: 28px; }
.bal-block h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.3; }
.bal-split-list,
.bal-picks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }

.bal-split { padding: 14px; border-radius: 18px; background: var(--card); }
.bal-split-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.bal-split-opt { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.bal-split-opt--a { color: var(--a-deep); }
.bal-split-opt--b { color: var(--b-deep); text-align: right; }
.bal-split-opt.is-mine::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.bal-split-opt--b.is-mine::before { display: none; }
.bal-split-opt--b.is-mine::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.bal-split-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; font-family: 'Dela Gothic One', var(--font-sans); font-size: 13px; }
.bal-split-a,
.bal-split-b { display: flex; align-items: center; padding: 0 10px; }
.bal-split-a { background: var(--a); color: var(--a-ink); }
.bal-split-b { background: var(--b); color: var(--b-ink); justify-content: flex-end; }

.bal-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); }
.bal-pick-dot { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: 'Dela Gothic One', var(--font-sans); font-size: 13px; }
.bal-pick.is-a .bal-pick-dot { background: var(--a); color: var(--a-ink); }
.bal-pick.is-b .bal-pick-dot { background: var(--b); color: var(--b-ink); }
.bal-pick.is-skip .bal-pick-dot { background: rgba(23, 21, 59, 0.08); }
.bal-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bal-pick-main { font-size: 14.5px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.bal-pick-alt { font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.bal-pick-friend { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.bal-pick-friend.is-same { color: var(--ink); }
.bal-pick.is-skip .bal-pick-main { font-weight: 600; color: var(--ink-3); }
.bal-pick-meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.bal-pick-pct { font-family: 'Dela Gothic One', var(--font-sans); font-size: 17px; color: var(--ink); }
.bal-pick-min { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--lemon); font-size: 11px; font-weight: 800; }

.bal-body .mg-rating { margin: 30px auto 8px; padding: 18px 12px; border-radius: 20px; background: var(--card); }

/* ---------------------------------------------------------------- SEO 안내 */
.bal-seo { margin-top: 44px; padding-top: 6px; border-top: 2px solid var(--line); }
.bal-seo h2 { margin: 28px 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.3; }
.bal-seo p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.bal-examples-wrap h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 800; }
.bal-examples { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bal-examples li { padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 13.5px; line-height: 1.5; }
.bal-ex-q { display: block; margin-bottom: 2px; font-size: 12.5px; color: var(--ink-2); }
.bal-ex-a { color: var(--a-deep); font-weight: 700; }
.bal-ex-b { color: var(--b-deep); font-weight: 700; }
.bal-ex-vs { color: var(--ink-3); font-size: 12px; }
.bal-faq { display: flex; flex-direction: column; gap: 8px; }
.bal-faq details { padding: 13px 16px; border-radius: 14px; background: var(--card); }
.bal-faq summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 800; line-height: 1.45; padding-right: 22px; position: relative; }
.bal-faq summary::-webkit-details-marker { display: none; }
.bal-faq summary::after { content: '+'; position: absolute; right: 0; top: -1px; font-size: 18px; font-weight: 800; }
.bal-faq details[open] summary::after { content: '−'; }
.bal-faq details p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }

.more-tests-section .bal-h2 { margin-top: 36px; }
.bal-body .more-test-card { background: var(--card); border: 0; box-shadow: inset 0 0 0 2px var(--line); }
.bal-body .more-test-card:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.bal-body .site-footer { opacity: 0.7; }

/* ---------------------------------------------------------------- 개인정보처리방침 */
.bal-doc { padding: 24px 0 20px; font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.bal-doc h1 { margin: 8px 0 20px; font-family: var(--font-display); font-weight: 400; font-size: 30px; color: var(--ink); }
.bal-doc h2 { margin: 26px 0 8px; font-size: 16px; font-weight: 800; color: var(--ink); }
.bal-doc a { color: var(--b-deep); text-decoration: underline; }

/* ---------------------------------------------------------------- 반응형 */
@media (max-height: 700px) {
  .bal-duel[data-state='result'] .bal-opt,
  .bal-dense .bal-duel[data-state='result'] .bal-opt { font-size: 15px; }
  .bal-pct { font-size: 34px; }
  .bal-duel[data-state='result'] .bal-side { padding: 12px 18px 22px; }
  .bal-q-head { margin: 8px 0; }
  .bal-prompt { font-size: 20px; }
}
@media (max-width: 359px) {
  .bal-pack-name { font-size: 18px; }
  .bal-text-btn { font-size: 12px; }
}
/* ---------------------------------------------------------------- 모션 감소 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}
