:root{--navy:#101b32;--navy2:#172748;--deep:#0b1428;--card:#1e3252;--line:#33496c;--white:#f8f7ed;--muted:#b4c2d9;--orange:#fd7753;--yellow:#ffd564;--teal:#7de2c4;--blue:#3976cb;--shadow:rgba(0,0,0,.25)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'DM Sans',system-ui,-apple-system,sans-serif;color:var(--white);background:var(--deep)}body{background:radial-gradient(ellipse at 84% -30%,#24416b 0,transparent 45%),linear-gradient(160deg,#111f38 0%,#0b1428 100%)}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.36;cursor:not-allowed}button:focus-visible,input:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}.hidden{display:none!important}
#app{max-width:1200px;margin:auto;min-height:100dvh;display:flex;flex-direction:column}.topbar{padding:18px clamp(12px,3vw,28px);display:flex;justify-content:space-between;align-items:center;gap:10px}.brand{display:flex;align-items:center;gap:10px;font-family:'Barlow Condensed',Impact,sans-serif;font-weight:900;font-size:clamp(24px,4.2vw,38px);letter-spacing:1px;line-height:1}.brand em{color:var(--orange);font-style:normal}.brand-ball{border-radius:50%;background:#f5f6f4;color:#172240;font-family:initial;font-size:22px;display:grid;place-items:center;width:42px;height:42px;box-shadow:0 4px 0 #7a95ae}.top-right{display:flex;align-items:center;gap:10px}.season{font-family:'Barlow Condensed',sans-serif;font-weight:800;letter-spacing:1.5px;font-size:17px;color:var(--muted)}.wallet{font-family:'Barlow Condensed',sans-serif;font-size:24px;font-weight:900;color:var(--yellow);border:1px solid #695b3b;background:#333327;padding:5px 13px;border-radius:10px}
.nav{display:flex;gap:8px;padding:0 clamp(12px,3vw,28px) 14px;overflow-x:auto;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav-btn{border:1px solid var(--line);background:#1a2b49;color:#b3c1d5;padding:11px 14px;border-radius:11px;white-space:nowrap;font-size:12px;font-weight:900;letter-spacing:.7px}.nav-btn span{font-size:18px;margin-right:6px;vertical-align:-1px}.nav-btn.selected{color:#172439;border-color:var(--yellow);background:var(--yellow);box-shadow:0 3px 0 #bd9034}.screen{flex:1;padding:8px clamp(12px,3vw,28px) 20px}.footnote{color:#8699b3;font-size:11px;padding:12px clamp(12px,3vw,28px) 20px;line-height:1.5}
.hero{background:linear-gradient(118deg,#2d4972,#1b2e50);border:1px solid #49678e;border-radius:18px;overflow:hidden;display:grid;grid-template-columns:1.2fr .8fr;min-height:300px;position:relative;box-shadow:0 18px 34px var(--shadow)}.hero-copy{padding:clamp(20px,4vw,42px);z-index:2;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.eyebrow{color:var(--teal);font-weight:900;letter-spacing:2px;font-size:12px}.big-headline{font:900 clamp(44px,7vw,76px)/.94 'Barlow Condensed',Impact,sans-serif;margin:12px 0;text-transform:uppercase;letter-spacing:.7px}.big-headline span{color:var(--yellow)}.hero-copy p{color:#d7e4f5;font-size:14px;line-height:1.6;max-width:440px;margin:4px 0 22px}.hero-art{position:relative;overflow:hidden;background:radial-gradient(circle at 50% 38%,#5b9b88 0%,#4c9984 26%,#224761 66%,transparent 67%);display:grid;place-items:center}.hero-art:before{content:'';background:repeating-linear-gradient(-26deg,transparent 0 18px,#ffffff10 18px 20px);position:absolute;inset:0}.hero-player{position:relative;font-size:clamp(145px,22vw,240px);transform:rotate(-9deg);text-shadow:8px 12px 0 #142542;line-height:1}.hero-tag{position:absolute;bottom:20px;right:18px;background:var(--yellow);color:#1c2b44;border:3px solid #182746;border-radius:8px;padding:5px 12px;transform:rotate(-6deg);font:900 20px 'Barlow Condensed',sans-serif}
.primary{border:0;background:var(--orange);color:#17233b;border-radius:12px;padding:14px 24px;font-size:15px;letter-spacing:.4px;font-weight:900;box-shadow:0 5px 0 #ac4b39;transition:transform .1s}.primary:active,.action:active{transform:translateY(3px);box-shadow:0 2px 0 #734638}.primary.blue{background:#72b0ff;box-shadow:0 5px 0 #3969ac}.subbutton{border:1px solid #637da0;background:#233c61;color:#fff;border-radius:10px;padding:11px 15px;font-weight:800}.subbutton:active{background:#355780}.overview{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:12px;margin-top:16px}.metric{background:#182942;border:1px solid #2a4669;border-radius:14px;padding:15px 15px 13px}.metric-label{font-size:11px;font-weight:800;letter-spacing:1.3px;color:var(--muted)}.metric-value{font:900 37px 'Barlow Condensed',sans-serif;margin:2px 0;color:var(--white)}.metric-sub{font-size:11px;color:var(--teal)}.subhead{font:900 29px 'Barlow Condensed',sans-serif;letter-spacing:.6px;margin:23px 0 13px}.section-caption{font-size:13px;color:var(--muted);margin:-5px 0 18px;line-height:1.6}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.tile{border:1px solid #3b5274;background:linear-gradient(150deg,#223a5b,#1a2e4b);border-radius:15px;padding:18px;box-shadow:0 10px 18px #080f20a0}.tile h3{font:900 23px 'Barlow Condensed',sans-serif;margin:5px 0 7px}.tile p{font-size:12px;line-height:1.6;color:#bacce1;margin:0 0 10px}.tile .inline{display:flex;align-items:center;justify-content:space-between;gap:10px}.skill-number{font:900 31px 'Barlow Condensed',sans-serif;color:var(--yellow)}.skill-track{height:8px;border-radius:100px;background:#0d2036;margin:12px 0;overflow:hidden}.skill-fill{height:100%;background:linear-gradient(90deg,#5fceb5,#ffd564);border-radius:100px}.price{font-weight:800;color:var(--yellow);font-size:14px}.buy{border:0;padding:11px 14px;background:var(--yellow);color:#172540;border-radius:8px;font-size:12px;font-weight:900;white-space:nowrap}.buy:disabled{background:#71849e;color:#dce5f1}
.score-card{background:#1b2c48;border:1px solid #385374;border-radius:14px;padding:20px;margin-bottom:15px}.score-card h3{margin:0 0 10px;font:900 25px 'Barlow Condensed',sans-serif}.score-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.stat-pill{padding:12px;background:#0e213c;border-radius:10px;text-align:center}.stat-pill b{display:block;font:900 27px 'Barlow Condensed',sans-serif;color:var(--yellow)}.stat-pill small{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:1px}.data-table{width:100%;border-collapse:collapse;font-size:13px}.data-table th,.data-table td{padding:12px;text-align:left;border-bottom:1px solid #344a68}.data-table th{color:#b3cae1;font-weight:700}.data-table td{font-weight:700}.banner{background:#143b45;border:1px solid #397878;color:#dafbef;padding:14px;border-radius:12px;font-size:13px;line-height:1.6;margin:12px 0}.banner.warn{background:#453825;color:#fff2cf;border-color:#806239}.contract-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.contract-item{border:1px solid #526f92;padding:20px;background:#223758;border-radius:14px}.contract-item h3{font:900 28px 'Barlow Condensed',sans-serif;margin:6px 0}.contract-item strong{font:900 42px 'Barlow Condensed',sans-serif;color:var(--yellow)}.contract-item p{font-size:13px;color:var(--muted);line-height:1.5}.player-name{font:900 22px 'Barlow Condensed',sans-serif;letter-spacing:.4px;margin:8px 0 0}.input-group{display:flex;flex-direction:column;gap:7px;margin:12px 0 20px}.input-group label{font-weight:800;font-size:12px;letter-spacing:.7px;color:#bbcee4}.input-group input{background:#10223d;border:1px solid #527092;border-radius:10px;padding:12px;color:white;max-width:320px;font-size:16px}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#edf4e8;color:#102037;border:2px solid #a7cea6;padding:12px 18px;font-size:13px;font-weight:800;border-radius:10px;box-shadow:0 10px 30px #0008;z-index:99;max-width:90vw;text-align:center;pointer-events:none;animation:toastfade 2.4s forwards}@keyframes toastfade{0%,78%{opacity:1}100%{opacity:0}}
/* Game overlay takes the full viewport; mobile has no wasted sidebars */
.game-overlay{position:fixed;inset:0;z-index:20;background:#0a1425;display:flex;justify-content:center;align-items:center;overscroll-behavior:contain}.game-shell{width:min(100%,1140px);height:100dvh;display:flex;flex-direction:column;min-height:0;padding:env(safe-area-inset-top,0) max(8px,env(safe-area-inset-right,8px)) env(safe-area-inset-bottom,0) max(8px,env(safe-area-inset-left,8px));gap:5px}.game-top,.scoreline,.game-lower{display:flex;align-items:center;justify-content:space-between;gap:8px}.game-top{padding:5px 4px 2px}.game-title{display:flex;align-items:center;gap:8px;font-family:'Barlow Condensed',sans-serif;letter-spacing:.8px;font-size:clamp(12px,2.5vw,20px)}.game-title strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:55vw}.game-title #game-inning{color:var(--yellow)}.live-dot{width:8px;height:8px;border-radius:50%;background:#fc765e;box-shadow:0 0 0 3px #fc765e22;flex:none}.small-button{border:1px solid #66758a;color:white;background:#29364e;padding:7px 11px;border-radius:8px;font-size:11px;font-weight:900}.scoreline{padding:6px 8px;background:#1c3352;border:1px solid #3f5c7b;border-radius:10px;flex-wrap:wrap}.score-team{display:flex;gap:6px;align-items:center;font:900 clamp(13px,3vw,18px) 'Barlow Condensed',sans-serif;letter-spacing:.5px}.score-team b{font-size:23px;margin-left:5px;color:var(--yellow)}.team-swatch{width:13px;height:13px;border-radius:3px}.team-swatch.hawks{background:#ef815a}.team-swatch.rivals{background:#86c9e5}.score-count{font-weight:800;font-size:clamp(9px,2vw,12px);color:#b8cadf;letter-spacing:.5px}.canvas-wrap{min-height:0;flex:1;position:relative;display:flex;align-items:center;justify-content:center;border:2px solid #446c88;border-radius:12px;overflow:hidden;background:#3e819d}#field{display:block;width:100%;height:100%;object-fit:contain;touch-action:none}.game-prompt{position:absolute;left:50%;top:6%;transform:translateX(-50%);background:#172746d9;border:2px solid #bad9ee;border-radius:9px;padding:7px 18px;white-space:nowrap;font:900 clamp(17px,3.2vw,29px) 'Barlow Condensed',sans-serif;letter-spacing:1.2px;text-shadow:1px 2px #071326;pointer-events:none;max-width:90%;overflow:hidden;text-overflow:ellipsis}.game-tip{position:absolute;left:50%;bottom:5%;transform:translateX(-50%);background:#0c2035d9;border-radius:99px;padding:6px 12px;font-weight:700;font-size:clamp(9px,2vw,13px);white-space:nowrap;max-width:96%;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.game-controls{display:flex;gap:10px;align-items:stretch;justify-content:center;min-height:70px}.action{border:0;border-radius:12px;flex:1;max-width:320px;min-height:60px;padding:12px 15px;font:900 clamp(17px,4.5vw,26px) 'Barlow Condensed',sans-serif;letter-spacing:.7px;color:#10223a;box-shadow:0 5px 0 #1e3047}.action.orange{background:#ff825b;box-shadow:0 5px 0 #b24d3c}.action.gold{background:#f8cd60;box-shadow:0 5px 0 #9b742d}.action.blue{background:#91c3fd;box-shadow:0 5px 0 #4976ac}.game-lower{padding:4px 7px 9px;color:#b2c4da;font-size:11px}.game-lower span:first-child{color:var(--yellow);font-weight:800}
@media (max-width:650px){.topbar{padding:12px 11px}.brand{font-size:24px}.brand-ball{width:30px;height:30px;font-size:17px}.wallet{font-size:18px;padding:4px 7px}.season{font-size:12px}.nav{gap:6px;padding:0 11px 10px}.nav-btn{font-size:10px;padding:9px 10px}.nav-btn span{font-size:14px;margin-right:2px}.hero{grid-template-columns:1fr;min-height:390px}.hero-copy{padding:24px;min-height:245px}.hero-art{min-height:142px}.hero-player{font-size:120px}.hero-tag{font-size:17px;bottom:10px}.big-headline{font-size:51px}.overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.metric{padding:12px}.cards,.contract-choices{grid-template-columns:1fr}.game-shell{gap:3px}.game-controls{min-height:66px;gap:7px}.action{min-height:57px;padding:6px}.game-lower{font-size:9px}.scoreline{gap:5px}.score-count{flex-basis:100%;text-align:center}.game-prompt{top:4%}}
@media (orientation:landscape) and (max-height:520px){.game-top{padding:0 3px}.game-title{font-size:12px}.game-shell{gap:2px}.scoreline{padding:2px 7px}.score-count{font-size:10px}.game-controls{min-height:50px;max-height:52px}.action{min-height:43px;padding:3px;font-size:19px}.game-lower{padding:0 4px 2px;font-size:9px}.game-prompt{padding:4px 12px;font-size:18px}.game-tip{font-size:10px;padding:4px 9px}.score-team b{font-size:18px}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;scroll-behavior:auto!important}}

.hero-illustration{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 42%;border:0}
/* On an upright phone, keep the actual baseball image and its touch area together.
   The game is most immersive when the phone is rotated sideways. */
@media (orientation:portrait) and (max-width:750px){
 .game-shell{justify-content:flex-start;gap:8px}
 .canvas-wrap{flex:0 0 auto;width:100%;height:auto;aspect-ratio:16/9;min-height:0}
 #field{height:100%;width:100%;object-fit:fill}
 .game-controls{min-height:74px}
 .action{min-height:68px}
 .game-tip{font-size:10px}
 .game-prompt{font-size:clamp(16px,5vw,24px)}
 .game-lower{display:flex;flex-direction:column;gap:7px;align-items:center;padding:6px 2px}
 .game-lower:after{content:'↻ Turn phone sideways for a larger batting view';font-weight:800;color:#8faccd}
}
/* Landscape gameplay uses the whole width, cropping decorative sky/grass rather than shrinking the action. */
@media (orientation:landscape) and (max-height:520px){#field{object-fit:cover;object-position:center 73%}}

/* v2: 3D live baseball presentation */
#field{object-fit:fill;outline:none}
.canvas-wrap{border:3px solid #73d8cc;box-shadow:inset 0 0 0 2px #203f4b,0 16px 42px #050c16aa}
.game-view-label{position:absolute;left:12px;top:10px;padding:4px 8px;background:#132940ba;border:1px solid #ffffff55;border-radius:5px;color:#f7dd91;font-weight:900;font-size:10px;letter-spacing:1px;pointer-events:none;z-index:1}
.game-prompt{top:9%;background:#112337e0;border-color:#fbdd96;color:#fff7e8;box-shadow:0 4px 12px #0b132770}
.game-tip{bottom:4%;color:#edf9ff;background:#09233ddd;border:1px solid #ffffff44}
.action{touch-action:manipulation;user-select:none;-webkit-user-select:none}
.action.orange{background:linear-gradient(180deg,#ffa16d,#ff6b53)}
.action.gold{background:linear-gradient(180deg,#ffe48b,#f9bf45)}
@media (orientation:landscape) and (max-height:520px){.game-view-label{font-size:8px;left:8px;top:5px}.game-prompt{top:8%;font-size:18px}}

/* Mobile batting controls: large primary swing, without a start-pitch button. */
#normal-swing{flex:1.55;max-width:none;font-size:clamp(22px,5.1vw,31px);min-height:68px}
#power-swing{flex:1;max-width:none;min-height:68px}
#normal-swing:not(:disabled){outline:2px solid #fff4ba;outline-offset:-5px}
.motion-source{position:absolute;top:5px;left:7px;z-index:1;background:#091d2dd4;border:1px solid #99bed0a8;border-radius:8px;color:#b0f4d7;font:800 10px system-ui,sans-serif;padding:5px 7px;pointer-events:none;max-width:65%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-view-label{right:7px;left:auto;top:5px}
@media (orientation:landscape) and (max-height:520px){#normal-swing,#power-swing{min-height:43px;font-size:clamp(18px,4vw,24px)}.motion-source{font-size:9px}}

/* v0.9.3: Unobstructed view. No giant TRACK THE PITCH prompt or tip pills. */
.game-prompt,.game-tip{display:none!important}
