:root { --club:#24695f; --text:#203d40; --accent:#c66a40; --sub-accent:#24695f; --bg:#f3f3e9; }
body { min-height:100svh; padding:max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); background:radial-gradient(ellipse at top,#deebe0,transparent 65%),#f3f3e9; }
.app-container { max-width:480px; }
.main-card { padding:20px 18px 24px; border:3px solid var(--text); border-radius:26px; box-shadow:0 7px 0 var(--text); margin-bottom:24px; }
.main-card header h1 { font-size:25px; margin-bottom:4px; padding:0 36px; }
.main-card header p { font-size:12px; color:#4b6262; margin:0; }
.main-card header { min-height:54px; display:flex; flex-direction:column; justify-content:center; }
.title-icon-box { display:none; }
.sound-toggle { top:15px; left:14px; width:42px; height:42px; box-shadow:0 3px 0 var(--text); }
.sound-toggle svg { width:23px; height:23px; fill:none; stroke:var(--text); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sound-muted,#soundIcon[data-muted=true] .sound-waves { display:none; }
#soundIcon[data-muted=true] .sound-muted { display:block; }
.record-toolbar { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:16px 0 10px; }
.region-chip { display:flex; align-items:center; gap:7px; min-width:0; color:var(--text); font-size:13px; }
.region-chip b { display:inline-grid; place-items:center; min-width:35px; height:29px; border-radius:7px; background:var(--club); color:#fff; font-family:'Outfit',sans-serif; letter-spacing:.04em; }
.club-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; padding:12px; border:1px solid #c8d4c9; border-radius:14px; background:#edf2e8; text-align:left; }
.club-panel label { grid-column:1/-1; font-size:11px; font-weight:900; color:#3d5652; }
#teamGateTitle { display:none; grid-column:1/-1; margin:4px 0 12px; font-size:21px; color:var(--text); }
#teamChange { border:0; background:transparent; color:var(--text); font-size:10px; padding:6px 2px; text-decoration:underline; }
body.gameplay-active #teamChange { display:none; }
.main-card.result-active #teamChange { display:none; }
.team-selection-required #teamGateTitle { display:block; }
.team-selection-required .main-card .stage-box,.team-selection-required .main-card .controls,.team-selection-required .record-toolbar,.team-selection-required .strike-zones { display:none !important; }
.team-selection-required .club-panel { margin-top:22px; padding:20px 14px; }
.team-selected .club-panel { display:none; }
.club-panel select { min-width:0; width:100%; min-height:44px; padding:6px; border:2px solid #aabdb5; border-radius:8px; color:#203d40; background:#fff; font:700 16px 'Zen Maru Gothic','Noto Sans KR',sans-serif; }
.club-panel button { padding:8px 12px; border:0; border-radius:8px; background:var(--club); color:white; font:700 12px 'Zen Maru Gothic','Noto Sans KR',sans-serif; }
.club-panel button:disabled { opacity:.6; }
#teamStatus { grid-column:1/-1; font-size:10px; line-height:1.6; color:#4c625b; min-height:16px; margin:0; }
.stage-box { border:3px solid var(--text); border-radius:20px; margin:14px 0 17px; background:#6bb2d1; box-shadow:0 5px 0 var(--text); isolation:isolate; }
.stadium-bg { animation:none; }
.pitch-mark { position:absolute; z-index:34; width:22px; height:22px; border:3px solid #ff303e; border-radius:50%; background:radial-gradient(circle,#ff303e88 0 22%,transparent 26%); box-shadow:0 0 0 2px #fff9,0 0 12px #ff303e88; transform:translate(-50%,-50%); pointer-events:none; }
.pitch-mark[hidden] { display:none; }
.pitcher,.batter { animation:none; }
.character-art-ready .pitcher { width:30%; aspect-ratio:1; top:calc(37% + 10px); }
.character-art-ready .batter { width:50%; aspect-ratio:1; bottom:8%; left:31%; }
.team-art-ready img { visibility:hidden; }
.pitcher:not(.team-art-ready):not(.art-fallback) img,.batter:not(.team-art-ready):not(.art-fallback) img { visibility:hidden; }
.team-art-ready::before { content:''; position:absolute; inset:-8%; background-image:var(--player-frame); background-size:100% 100%; background-position:center; background-repeat:no-repeat; image-rendering:auto; }
.batter.team-art-ready::before { transform:scaleX(-1); }
.batter.art-fallback img { transform:scaleX(-1); }
.pitcher.special img { filter:none; }
.pitcher.special::after { background:#28584f; border-width:1px; font-size:9px; padding:2px 6px; top:-10px; box-shadow:none; }
.scoreboard-hud { width:61px; border:1px solid #d2e4ce; border-radius:8px; background:#17363bf0; box-shadow:none; right:7px; bottom:7px; pointer-events:none; }
.scoreboard-topline { font-size:8px; }
.scoreboard-team-row { font-size:11px; }
.controls { margin:0; }
.controls .btn { min-height:64px; padding:12px; font-size:24px; margin:0; border-radius:17px; box-shadow:0 5px 0 var(--text); border-width:3px; }
.btn-swing { background:var(--club); }
.prompt-msg { font-size:clamp(24px,8vw,36px); top:65%; }
.flash-overlay { background:#ffe8a4; }
.hit-result-label { max-width:94%; white-space:normal; font-size:clamp(18px,6vw,28px); line-height:1.35; top:16%; }
.live-dist { font-size:clamp(36px,12vw,64px); font-variant-numeric:tabular-nums; white-space:nowrap; }
.main-card.result-active .stage-box,.main-card.result-active .controls,.main-card.result-active .club-panel { display:none; }
.main-card .modal-overlay.active { position:relative; inset:auto; border-radius:0; padding:18px 0 0; background:transparent; color:var(--text); }
.result-mark { color:var(--club); font-family:'Outfit',sans-serif; font-size:13px; font-weight:900; letter-spacing:.15em; }
.res-dist { font-size:clamp(38px,12vw,58px); color:var(--club); white-space:nowrap; margin:12px 0; }
.res-label { color:var(--text); font-size:18px; }
.main-card .modal-overlay .btn { min-height:48px; padding:10px; margin:8px 0 0; border-radius:13px; font-size:16px; }
.modal-overlay .input-group { width:100%; }
.modal-overlay input { margin:12px 0 0; min-height:46px; }
.result-hub { color:var(--text); margin-top:18px; font-size:13px; text-decoration:underline; }
.team-ranking-row { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:8px; padding:13px 0; border-bottom:1px solid #d8e3d8; text-align:left; font-size:14px; }
.team-ranking-row > span:first-child { font-size:11px; white-space:nowrap; }
.team-ranking-row small { display:inline-block; margin-left:6px; color:#526961; font-size:10px; white-space:nowrap; vertical-align:baseline; }
.team-ranking-row > span:nth-child(2) { font-family:inherit; font-weight:900; }
.team-ranking-row small { font-weight:400; }
.personal-team-label { display:block; font-size:10px; line-height:1.5; color:#526961; font-family:'Zen Maru Gothic','Noto Sans KR',sans-serif; }
.team-ranking-row strong { color:#24695f; font-family:'Outfit','Zen Maru Gothic',sans-serif; font-size:15px; }
#teamRankingRules { font-size:11px; color:#4f685f; background:none; margin:8px 0; }
body.gameplay-active .ranking-section,body.gameplay-active .more-games,body.gameplay-active #hubAccountCardGame,body.gameplay-active .hub-link,body.gameplay-active .club-panel { display:none !important; }
body.gameplay-active { overflow:visible; }
body.gameplay-active .main-card { padding:12px; margin-bottom:0; }
body.gameplay-active .main-card header h1 { font-size:19px; }
body.gameplay-active .main-card header p { display:none; }
body.gameplay-active .record-toolbar { margin:12px 0 6px; }
body.gameplay-active .stage-box { width:min(100%,calc(100svh - 205px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); max-height:none; margin:8px auto 14px; aspect-ratio:1; }
body.gameplay-active .app-container { min-height:0; padding:0; }
body.gameplay-active { background:radial-gradient(ellipse at top,#285858,#173b3c 75%); min-height:100svh; justify-content:center; }
body.gameplay-active .decor { display:none; }
@media(max-width:380px) { body { padding:max(10px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }.main-card { padding:16px 12px 20px; }.main-card header h1 { font-size:22px; }.club-panel { padding:9px; }.controls .btn { min-height:58px; font-size:22px; } }
@media(orientation:landscape) and (max-height:560px) {
    body.gameplay-active .main-card { display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:8px 14px; }
    body.gameplay-active .main-card header,body.gameplay-active .record-toolbar { grid-column:1/-1; margin:0; }
    body.gameplay-active .stage-box { grid-column:1; grid-row:3; width:min(100%,calc(100svh - 115px)); margin:0 auto 5px; }
    body.gameplay-active .controls { grid-column:2; grid-row:3; align-self:center; }
    body.gameplay-active .sound-toggle { top:8px; }
}
@media(prefers-reduced-motion:reduce) { .stage-box.hit-pulse,.flying-ball,.speed-line { animation:none !important; }.hit-result-label { transition:none; } }
