/* 최종 폴리싱: 기존 네이비/레드 토큰, 레이아웃, 게임별 구조를 유지합니다. */
:root { --control-radius:8px; --panel-radius:14px; }
html { scroll-padding-bottom:100px; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
:where(button,a,input,select,summary):focus-visible { outline:3px solid var(--color-primary); outline-offset:4px; }
button:disabled { cursor:default; }
.primary-button,.secondary-button { min-height:52px; border-radius:var(--control-radius); font-size:14px; line-height:1.5; letter-spacing:.1px; gap:16px; padding:12px 22px; transition:background .16s,border-color .16s,transform .16s; }
.secondary-button { color:var(--color-text); background:var(--color-surface); font-weight:700; }
.text-button,.text-link { min-height:44px; font-size:12px; line-height:1.6; }
.text-button { border-radius:var(--control-radius); padding:8px 10px; }
button:disabled.primary-button,button:disabled.secondary-button { opacity:.55; transform:none; }
.balance-page,.fortune-page,.worldcup-page,.guess-page,.manager-page,.career-page,.draft-page { padding-block:36px 56px; }
.balance-heading { align-items:flex-start; margin-bottom:28px; padding-bottom:22px; border-bottom:1px solid var(--color-border); }
.balance-heading>div { min-width:0; }
.balance-heading h1,.career-page .balance-heading h1 { font-size:32px; line-height:1.4; letter-spacing:-1.2px; margin-top:10px; word-break:keep-all; overflow-wrap:anywhere; }
.balance-heading>.text-link { flex-shrink:0; margin-top:16px; }
.balance-heading .eyebrow { font-size:10px; letter-spacing:1.4px; line-height:1.6; }
.worldcup-intro h2,.guess-intro h2,.manager-intro h2,.career-intro h2,.draft-intro h2,.fortune-ready h2 { font-size:32px; line-height:1.5; letter-spacing:-1.2px; }
.worldcup-intro p,.guess-intro p,.manager-intro p,.career-intro p,.draft-intro>p,.fortune-ready p { font-size:15px; line-height:1.9; word-break:keep-all; overflow-wrap:anywhere; }
.worldcup-intro,.guess-intro,.manager-intro,.career-intro,.draft-intro { padding-block:20px 32px; }
.worldcup-intro { margin:0; }
.balance-record,.xp-profile,.xp-section,.fortune-ready,.fortune-ticket,.guess-result,.manager-result,.draft-result,.career-records { border-radius:var(--panel-radius); }
.balance-record { margin-block:24px; }
.balance-record h2 { font-size:22px; line-height:1.5; margin-bottom:22px; }
.balance-record dt { font-size:12px; line-height:1.6; }
.balance-record dd { line-height:1.45; overflow-wrap:anywhere; }
.balance-record p { font-size:14px; line-height:1.85; }
.balance-record .primary-button { font-size:13px; }
.balance-save-note,.fortune-save-note,.worldcup-save-note,.guess-data-note,.manager-note,.career-note,.career-save-status,.draft-note,.draft-save-status { font-size:12px; line-height:1.9; }
.match-caption p,.match-tip,.worldcup-item-description,.worldcup-data-note,.guess-difficulty p,.guess-rules p,.manager-rules p,.draft-rules p,.draft-board-note,.career-current-rating p { font-size:14px; line-height:1.85; }
.answer-situation,.answer-summary small,.guess-hints li>span,.guess-hint-actions>span,.manager-option small,.career-action>p,.draft-scout-notes p,.draft-scout-notes b,.draft-candidate>p { font-size:12px; line-height:1.8; }
.manager-option,.career-action { border-radius:var(--panel-radius); }
.draft-profile,.draft-candidate,.worldcup-category,.guess-difficulty { border-radius:var(--panel-radius); }
.guess-input-row input,.career-form input,.career-form select,.draft-filters select { border-radius:var(--control-radius); min-height:50px; }
.guess-input-row input::placeholder,.career-form input::placeholder { color:var(--color-muted); opacity:1; }
.guess-hints li,.draft-potential { border-radius:10px; }
.guess-feedback,.career-form-error { font-size:13px; }
.draft-card-actions { flex-wrap:wrap; }
.draft-card-actions .secondary-button { font-size:12px; min-height:44px; }
.draft-card-actions .text-button { font-size:12px; }
.draft-candidate>.draft-type { font-size:12px; line-height:1.7; }
.draft-profile-name p,.draft-type,.draft-profile-name span,.draft-scout-notes b,.draft-potential>span,.draft-attributes dt,.career-form label,.career-form label span { font-size:12px; line-height:1.7; }
.draft-pagination>span,.draft-history-list button small,.career-history summary small,.manager-history summary small { font-size:12px; line-height:1.7; }
.game-card,.random-card { border-radius:var(--panel-radius); }
.game-card { display:flex; flex-direction:column; }
.game-card .card-top { width:100%; }
.game-card .card-art { width:100%; flex-shrink:0; }
.card-content { flex:1; min-width:0; }
.card-content h3 { font-size:20px; line-height:1.5; }
.card-content p { font-size:13px; line-height:1.8; padding-right:10px; overflow-wrap:anywhere; }
.game-category,.card-top,.coming-badge { font-size:10px; }
.art-caption { font-size:8px; }
.random-card p { font-size:13px; line-height:1.8; }
.random-bottom { font-size:11px; line-height:1.6; }
.today-stats { flex-wrap:wrap; }
.xp-profile .text-link { color:var(--color-text); font-weight:700; }
.xp-section-note,.xp-empty { font-size:14px; }
.xp-achievement-top img,.xp-recent-achievements img { width:30px; height:30px; object-fit:contain; }
.xp-achievement-bottom,.xp-recent-achievements p,.xp-play-list span { font-size:12px; line-height:1.7; }
.xp-rules p,.xp-rules li { font-size:14px; }
.xp-rules summary,.xp-achievements summary { min-height:44px; padding-block:8px; }
.xp-notification { bottom:calc(24px + env(safe-area-inset-bottom)); }
.xp-notification>button { width:44px; height:44px; right:4px; top:2px; }
.xp-notification>div { min-width:0; }
.xp-notification p { overflow-wrap:anywhere; }
.xp-notification a { display:inline-flex; align-items:center; min-height:44px; font-size:12px; }
[data-theme="dark"] :is(.xp-achievement-top,.xp-recent-achievements)>.ui-icon { filter:brightness(1.7); }
@media(hover:hover) and (pointer:fine) {
  .secondary-button:not(:disabled):hover { background:var(--color-surface-alt); border-color:var(--color-text); transform:translateY(-2px); }
  .text-button:not(:disabled):hover,.text-link:hover { color:var(--color-primary); }
  .text-button:not(:disabled):hover { background:var(--color-surface-alt); }
  summary:hover { color:var(--color-primary); }
}
@media(max-width:800px) {
  .balance-heading h1,.career-page .balance-heading h1 { font-size:28px; }
}
@media(max-width:600px) {
  .balance-page,.fortune-page,.worldcup-page,.guess-page,.manager-page,.career-page,.draft-page { padding-block:24px 36px; }
  .balance-heading { flex-wrap:wrap; gap:8px 12px; margin-bottom:24px; padding-bottom:18px; }
  .balance-heading>div { flex-basis:100%; }
  .balance-heading h1,.career-page .balance-heading h1 { font-size:26px; line-height:1.45; letter-spacing:-1px; }
  .balance-heading .eyebrow { font-size:9px; }
  .balance-heading>.text-link { min-height:44px; margin:0 0 -8px; font-size:12px; }
  .worldcup-intro h2,.guess-intro h2,.manager-intro h2,.career-intro h2,.draft-intro h2,.fortune-ready h2 { font-size:27px; }
  .worldcup-intro p,.guess-intro p,.manager-intro p,.career-intro p,.draft-intro>p,.fortune-ready p { font-size:14px; }
  .primary-button,.secondary-button { min-height:48px; font-size:13px; padding:12px 17px; gap:12px; }
  .text-link,.text-button { font-size:12px; }
  .result-actions,.fortune-actions,.guess-result-actions,.manager-result-actions,.career-final-actions,.draft-result-actions { gap:10px; }
  .balance-record { padding:22px 18px; margin-block:20px; }
  .balance-record h2 { font-size:20px; }
  .balance-record dd { font-size:23px; }
  .balance-record .primary-button { width:100%; justify-content:center; }
  .balance-record dl { gap:20px; }
  .match-caption h2 { font-size:23px; }
  .match-caption p,.match-tip,.worldcup-item-description,.worldcup-data-note,.guess-difficulty p,.guess-rules p,.manager-rules p,.draft-rules p,.draft-board-note { font-size:13px; }
  .balance-save-note,.fortune-save-note,.worldcup-save-note,.guess-data-note,.manager-note,.career-note,.career-save-status,.draft-note,.draft-save-status { font-size:11px; }
  .fortune-date { flex-wrap:wrap; line-height:1.7; }
  .fortune-ticket-bottom { flex-wrap:wrap; row-gap:10px; font-size:8px; }
  .fortune-next,.fortune-ready small { font-size:11px; line-height:1.8; }
  .worldcup-category p { font-size:13px; }
  .worldcup-category-bottom { font-size:12px; }
  .worldcup-rounds { gap:3px; }
  .worldcup-rounds span { padding:7px 8px; font-size:11px; }
  .worldcup-match-heading { flex-wrap:wrap; gap:8px; }
  .guess-question-top { flex-wrap:wrap; row-gap:10px; }
  .guess-hint-actions>span,.guess-result>p { font-size:12px; }
  .guess-answer a,.guess-summary a { min-height:44px; font-size:12px; }
  .career-toolbar,.draft-toolbar { flex-wrap:wrap; font-size:12px; line-height:1.7; }
  .career-action-top { flex-wrap:wrap; row-gap:8px; }
  .career-action-top small { font-size:11px; line-height:1.7; }
  .career-feedback>p,.career-feedback ul,.career-event>p { font-size:13px; }
  .career-quick-condition { font-size:11px; }
  .career-profile-toggle { min-height:48px; font-size:12px; }
  .draft-board-heading { flex-wrap:wrap; }
  .draft-board-heading h2 { font-size:24px; }
  .draft-compare-heading { flex-wrap:wrap; font-size:12px; }
  .draft-compare>p { font-size:13px; }
  .draft-filters label { font-size:12px; }
  .draft-pagination { flex-wrap:wrap; gap:8px 12px; }
  .draft-pagination>span { font-size:11px; }
  .game-card,.random-card { min-height:320px; padding:16px 14px 24px; }
  .card-content h3 { font-size:19px; }
  .card-content p { font-size:12px; padding-right:0; }
  .card-top,.coming-badge { font-size:9px; }
  .game-category { font-size:10px; }
  .art-caption { font-size:7px; }
  .random-card p { font-size:12px; }
  .random-bottom { font-size:10px; }
  .xp-section-heading { flex-wrap:wrap; }
  .xp-section-heading>span { font-size:10px; }
  .xp-notification { bottom:calc(84px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom:calc(98px + env(safe-area-inset-bottom)); }
  input,select { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .primary-button,.secondary-button { transition:none; }
  .primary-button:hover,.secondary-button:hover { transform:none; }
}
/* 다크 모드에서도 작은 흰색 버튼 글자의 대비를 확보합니다. */
[data-theme="dark"] .primary-button,
[data-theme="dark"] .balance-option.is-picked,
[data-theme="dark"] .worldcup-choice.is-picked,
[data-theme="dark"] .worldcup-rounds [aria-current] { background:#c8102e; }
@media(hover:hover) and (pointer:fine) {
  [data-theme="dark"] .primary-button:not(:disabled):hover { background:#a50d26; }
}
main summary { min-height:44px; }
.worldcup-sources summary { font-size:12px; line-height:1.8; padding-block:10px; }
@media(max-width:600px) { .theme-toggle { width:44px; height:44px; } }
.recovery-page { min-height:55vh; padding-block:64px; max-width:640px; margin-inline:auto; }
.recovery-page p { line-height:1.9; margin:20px 0; }
.recovery-page .primary-button { margin-top:12px; }
