/* 76.3 — information-first player cards and a complete game-day summary. */
body.player-detail-open { overflow:hidden; }
.player-detail-shell { height:min(600px,calc(100vh - 48px)); height:min(600px,calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
.player-detail-photo-wrap { flex:0 1 330px; height:330px; min-height:0; max-height:330px; }
.player-detail-body { flex:1 0 auto; max-height:none; overflow:visible; justify-content:center; padding:16px 20px 20px; gap:10px; }
.player-detail-meta { flex:0 0 auto; }
.player-detail-positions { flex:0 0 auto; margin:0; white-space:normal; }
.next-match { grid-template-columns:minmax(200px,.8fr) minmax(0,1.5fr); grid-template-areas:'date times' 'location note'; gap:12px 28px; }
.next-match-date-block { grid-area:date; }
.next-match-times { grid-area:times; display:grid; grid-template-columns:repeat(auto-fit,minmax(65px,1fr)); gap:12px; }
.next-match-times>div { min-width:0; }
.next-match-times strong { font-size:1.18rem; white-space:nowrap; }
.next-match-times .meet-time strong { color:#886831; }
.next-match-location { grid-area:location; margin-top:0; }
.next-match-note { grid-area:note; color:#54667b; font-size:.87rem; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; padding-left:12px; border-left:2px solid #dac9a5; }
.next-match-note:empty { display:none; }
.preview-banner { display:none; padding:9px 5%; gap:12px; align-items:center; justify-content:space-between; background:#f0e5ce; color:#654b20; font-size:.78rem; }
.is-preview .preview-banner { display:flex; }
.preview-banner strong { font-weight:800; }
.preview-banner a { color:inherit; text-underline-offset:3px; }
.preview-only { display:none !important; }
.is-preview .preview-only { display:initial !important; }
.tactics-entry { display:flex; gap:20px; align-items:center; justify-content:space-between; padding:26px; border:1px solid #dce6ea; border-radius:20px; background:linear-gradient(120deg,#edf4f6,#fff); }
.tactics-entry h3 { margin:0 0 8px; color:#16435a; }
.tactics-entry p { color:#637489; font-size:.9rem; line-height:1.6; }
.is-preview #lineup-builder.admin-only { display:block !important; }
.baseball-entry { margin:18px 0 26px; display:grid; grid-template-columns:1.2fr 1fr; background:linear-gradient(125deg,#123f42,#091f35); color:#fff; border-radius:22px; overflow:hidden; }
.baseball-entry-copy { padding:28px; }
.baseball-entry-copy small { color:#dbc48c; font-weight:800; letter-spacing:.14em; }
.baseball-entry-copy h3 { color:white; font-size:1.8rem; margin:10px 0; }
.baseball-entry-copy p { color:#b8ced2; line-height:1.7; font-size:.9rem; }
.baseball-entry-art { display:flex; align-items:center; justify-content:center; position:relative; background:radial-gradient(ellipse at 50% 50%,#408e7344,transparent 70%); min-height:200px; }
.baseball-entry-art svg { width:min(100%,280px); height:200px; }
.baseball-entry .game-actions { margin-top:18px; gap:8px; flex-wrap:wrap; }
.baseball-entry .btn-main { background:#d9bd7b; color:#17313c; }
.baseball-entry .btn-outline { color:#e9f1ef; border-color:#72938f; background:transparent; }

/* Full-screen workspaces are isolated from legacy page/header/section styles. */
.idn-workspace { position:fixed; inset:0; z-index:4100; width:100%; height:100%; height:100dvh; overflow:hidden; background:#eef3f6; color:#173443; padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.idn-workspace *, .idn-workspace *::before, .idn-workspace *::after { box-sizing:border-box; }
.idn-workspace [hidden] { display:none !important; }
.idn-workspace header { height:auto; min-height:0; background:none; color:inherit; border:0; border-radius:0; text-align:left; position:static; overflow:visible; flex-direction:row; }
.idn-workspace header::before,.idn-workspace header::after { display:none; }
.idn-workspace section { margin:0; padding:0; width:auto; max-width:none; min-width:0; min-height:0; }
.idn-workspace button { cursor:pointer; font:inherit; touch-action:manipulation; }
.idn-workspace button:disabled { opacity:.4; cursor:default; }
.ws-button { border:1px solid #cedce3; background:white; color:#244557; border-radius:10px; padding:9px 13px; font-weight:750 !important; font-size:.86rem !important; min-height:40px; }
.ws-primary { background:#126653; color:white; border-color:#126653; }
.ws-back { border:0; border-radius:50%; background:#e1eaee; color:#244557; width:36px; height:36px; font-size:1.25rem !important; flex:0 0 auto; }
.tb-shell { max-width:1260px; height:100%; margin:auto; display:grid; grid-template-rows:60px 30px minmax(0,1fr) 54px 64px; gap:8px; padding:0 24px; position:relative; }
.tb-toolbar { display:flex; gap:12px; align-items:center; }
.tb-toolbar>div { flex:1; }
.tb-toolbar small { font-size:.59rem; font-weight:900; color:#62818b; letter-spacing:.18em; }
.tb-toolbar h2 { font-size:1.3rem; line-height:1.1; margin:3px 0 0; color:#183f4e; }
.tb-status { font-size:.79rem; color:#4d6a79; background:#e2edf0; border-radius:8px; padding:7px 12px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.tb-board { display:grid; grid-template-columns:1.15fr 1fr; gap:24px; min-height:0; }
.tb-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:28px; margin-bottom:6px; }
.tb-panel-heading strong { font-size:.94rem; }
.tb-panel-heading>span { color:#6c8290; font-size:.72rem; }
.tb-panel-heading h3 { font-size:1.05rem; margin:0; }
.tb-field-panel,.tb-order-panel { min-height:0; display:flex; flex-direction:column; }
.tb-field-wrap { flex:1; min-height:0; display:flex; justify-content:center; align-items:center; }
.tb-field { width:100%; height:100%; max-height:470px; position:relative; border-radius:20px; background:#153e3e; overflow:hidden; box-shadow:inset 0 0 55px #05292266; }
.tb-field svg { width:100%; height:100%; position:absolute; inset:0; pointer-events:none; }
.tb-position { position:absolute; transform:translate(-50%,-50%); width:56px; min-height:44px; padding:3px; border:1px dashed #d8e9dd99; color:#fff; border-radius:11px; background:#133e3fdd; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1.1; z-index:1; }
.tb-position span { font-size:.65rem; letter-spacing:.04em; opacity:.8; }
.tb-position strong { font-size:.98rem; margin-top:3px; }
.tb-position.is-filled { background:#f8f5e9; border:1px solid #f5ead0; color:#245347; }
.tb-position.is-target { border-color:#f5c866; }
.tb-position.is-selected { background:#e2bd6c; color:#193d3c; outline:3px solid #fff9; }
.tb-order { display:grid; grid-template-columns:1fr; grid-template-rows:repeat(11,minmax(0,1fr)); gap:5px; flex:1; min-height:0; }
.tb-batter { display:flex; align-items:center; gap:9px; width:100%; min-width:0; min-height:0; border:1px solid #d8e1e6; background:#fff; border-radius:9px; padding:4px 10px; text-align:left; touch-action:none !important; user-select:none; }
.tb-batter>b { width:22px; text-align:center; color:#85969d; flex-shrink:0; font-size:.8rem; }
.tb-batter>span { display:flex; align-items:baseline; gap:8px; flex:1; min-width:0; }
.tb-batter strong { font-size:.91rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-batter small { color:#80929d; font-size:.72rem; }
.tb-batter em { border-radius:6px; padding:3px 5px; background:#edf4f1; color:#35715c; font-size:.7rem; font-style:normal; font-weight:750; flex-shrink:0; }
.tb-batter i { color:#a8b7be; font-size:1.1rem; font-style:normal; }
.tb-batter.is-empty { color:#a1afb8; border-style:dashed; background:transparent; font-size:.8rem; }
.tb-batter.is-empty em { background:none; }
.tb-batter.is-selected { border:2px solid #bd9850; background:#fff8e7; }
.tb-batter.is-drop-target { background:#d4ede1; outline:2px solid #3d9372; }
.tb-bench-strip { display:flex; align-items:center; gap:12px; overflow:hidden; border-top:1px solid #dbe4e9; }
.tb-bench-strip>span { font-size:.75rem; font-weight:800; color:#758c98; flex-shrink:0; }
.tb-bench { display:flex; align-items:center; gap:7px; overflow-x:auto; scrollbar-width:thin; padding:6px 0; }
.tb-bench button { flex-shrink:0; border:1px solid #cddce2; background:#fff; border-radius:8px; padding:8px 12px; font-size:.79rem; color:#31586c; white-space:nowrap; }
.tb-footer { display:flex; align-items:center; gap:8px; padding-bottom:8px; }
.tb-footer .ws-primary { margin-left:auto; min-width:140px; }
.tb-drawer { position:absolute; inset:0; z-index:10; background:#0a2539a8; display:flex; justify-content:flex-end; backdrop-filter:blur(3px); }
.tb-drawer-panel { height:100%; width:min(430px,100%); background:#f7fafb; padding:24px; display:flex; flex-direction:column; min-height:0; box-shadow:-12px 0 50px #08263830; }
#tb-roster-search { padding:11px 14px; border:1px solid #ccdce2; border-radius:10px; background:#fff; font-size:16px; margin:10px 0; width:100%; }
.tb-drawer-note { font-size:.79rem; color:#6c8290; margin-bottom:12px; }
#tb-roster-list { flex:1; min-height:0; overflow:auto; }
.tb-roster-choice { display:flex; align-items:center; gap:12px; min-height:58px; padding:8px 2px; border-bottom:1px solid #e0e9ed; cursor:pointer; }
.tb-roster-choice input { width:19px; height:19px; accent-color:#16705a; }
.tb-roster-choice>span { flex:1; min-width:0; }
.tb-roster-choice strong { display:block; font-size:.9rem; }
.tb-roster-choice small { font-size:.72rem; color:#7f929a; }
.tb-roster-choice em { font-size:.7rem; font-style:normal; color:#2a7c60; }
.tb-review-panel { background:white; width:min(540px,100%); margin:auto; max-height:94%; border-radius:20px; padding:24px; overflow:auto; }
.tb-review-order { padding-left:26px; display:grid; gap:5px; margin:15px 0; }
.tb-review-order li { font-size:.9rem; padding:6px; border-bottom:1px solid #edf1f4; }
.tb-review-order li b { float:right; font-size:.8rem; color:#35715c; }
.tb-warning { color:#916d28; font-size:.82rem; margin-top:8px; }
#tb-review-message { margin:15px 0; font-size:.85rem; color:#4b7165; }
.tb-menu { position:absolute; top:58px; right:24px; background:#fff; box-shadow:0 12px 32px #10293833; border:1px solid #dbe5e9; padding:8px; border-radius:12px; z-index:12; }
.tb-menu button { display:block; border:0; background:none; padding:12px; color:#315269; font-size:.85rem; width:100%; text-align:left; }

@media(max-width:740px) {
  .next-match { grid-template-columns:1fr 1fr; grid-template-areas:'date date' 'times times' 'location note'; gap:12px; }
  .next-match-times { grid-template-columns:repeat(3,minmax(0,1fr)); padding-top:12px; }
  .next-match-times strong { font-size:1.08rem; }
  .next-match-note { font-size:.8rem; }
  .player-detail-photo-wrap { max-height:330px; }
  .baseball-entry { grid-template-columns:1fr; }
  .baseball-entry-copy { padding:24px; }
  .baseball-entry-art { display:none; }
  .tactics-entry { padding:20px; flex-direction:column; align-items:stretch; gap:14px; }
  .preview-banner { font-size:.7rem; gap:6px; }
  .tb-shell { padding:0 12px; grid-template-rows:50px 28px minmax(0,1fr) 45px 52px; gap:5px; }
  .tb-toolbar { gap:8px; }
  .tb-toolbar h2 { font-size:1.08rem; }
  .tb-toolbar small { font-size:.52rem; }
  .tb-toolbar .ws-button { padding:7px 10px; min-height:36px; font-size:.78rem !important; }
  .tb-status { font-size:.68rem; padding:7px 9px; }
  .tb-board { grid-template-columns:1fr; grid-template-rows:minmax(0,.95fr) minmax(0,1fr); gap:7px; }
  .tb-panel-heading { min-height:20px; margin-bottom:3px; }
  .tb-panel-heading strong { font-size:.79rem; }
  .tb-panel-heading>span { font-size:.64rem; }
  .tb-field { max-width:440px; border-radius:12px; }
  .tb-order { grid-template-columns:1fr 1fr; grid-template-rows:repeat(6,minmax(0,1fr)); grid-auto-flow:column; gap:4px 6px; }
  .tb-batter { border-radius:7px; gap:4px; padding:3px 6px; }
  .tb-batter>b { width:15px; font-size:.7rem; }
  .tb-batter>span { gap:4px; }
  .tb-batter strong { font-size:.77rem; }
  .tb-batter small { font-size:.6rem; }
  .tb-batter em { font-size:.59rem; padding:2px 4px; }
  .tb-batter i { display:none; }
  .tb-batter.is-empty { font-size:.7rem; }
  .tb-position { width:44px; min-height:35px; border-radius:8px; padding:2px; }
  .tb-position span { font-size:.54rem; }
  .tb-position strong { font-size:.78rem; margin-top:2px; }
  .tb-bench button { font-size:.7rem; padding:7px 9px; }
  .tb-footer .ws-button { padding:8px 10px; font-size:.76rem !important; }
  .tb-footer .ws-primary { min-width:110px; }
  .tb-drawer-panel { padding:18px; }
  .tb-review-panel { padding:18px; }
}
@media(max-width:420px) {
  .next-match { grid-template-areas:'date date' 'times times' 'location location' 'note note'; }
  .next-match-times { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .next-match-note { border-left:0; padding-left:0; }
  .tb-batter>span { display:block; }
  .tb-batter small { display:none; }
}
@media(max-height:650px) and (orientation:portrait) {
  .tb-shell { grid-template-rows:43px 23px minmax(0,1fr) 39px 45px; gap:4px; padding:0 10px; }
  .tb-status { padding:5px 7px; }
  .tb-toolbar small { display:none; }
  .tb-position { width:40px; min-height:30px; }
  .tb-position strong { font-size:.7rem; }
  .tb-board { grid-template-rows:minmax(0,.84fr) minmax(0,1fr); }
  .tb-footer .ws-button { min-height:36px; }
}
@media(max-height:520px) and (orientation:landscape) {
  .player-detail-photo-wrap { flex:none; height:100%; max-height:none; }
  .player-detail-body { min-height:0; padding:10px 16px; justify-content:center; }
  .tb-shell { grid-template-rows:42px minmax(0,1fr) 36px 42px; gap:3px; padding:0 14px; }
  .tb-status { display:none; }
  .tb-toolbar small { display:none; }
  .tb-toolbar h2 { margin:0; font-size:1rem; }
  .tb-toolbar .ws-button { min-height:32px; padding:5px 10px; }
  .tb-board { grid-template-columns:1fr 1.05fr; grid-template-rows:1fr; gap:14px; }
  .tb-order { grid-template-columns:1fr 1fr; grid-template-rows:repeat(6,minmax(0,1fr)); grid-auto-flow:column; gap:3px 5px; }
  .tb-panel-heading { min-height:18px; margin-bottom:3px; }
  .tb-panel-heading strong { font-size:.72rem; }
  .tb-batter { padding:2px 5px; gap:4px; }
  .tb-batter strong { font-size:.75rem; }
  .tb-batter small,.tb-batter i { display:none; }
  .tb-batter em { font-size:.6rem; padding:2px; }
  .tb-batter>b { width:14px; font-size:.68rem; }
  .tb-position { min-height:30px; width:40px; padding:2px; border-radius:8px; }
  .tb-position strong { font-size:.73rem; margin-top:1px; }
  .tb-position span { font-size:.5rem; }
  .tb-footer .ws-button { min-height:32px; padding:5px 10px; }
  .tb-bench button { padding:5px 8px; font-size:.72rem; }
}
