
:root {
  --background: #002046;
  --foreground: #ffffff;
  --card: #082d56;
  --card-2: #0b365f;
  --muted: #10466f;
  --muted-foreground: #b7c9dc;
  --primary: #f52368;
  --primary-foreground: #ffffff;
  --accent: #199eda;
  --accent-foreground: #002046;
  --destructive: #ee4b5f;
  --border: #1b547d;
  --shadow: 0 20px 50px rgba(0, 12, 31, .38);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(245,35,104,.13), transparent 32rem),
    radial-gradient(circle at 100% 0%, rgba(25,158,218,.15), transparent 36rem),
    var(--background);
  color: var(--foreground);
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.container { width: min(1460px, calc(100% - 40px)); margin-inline: auto; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(245,35,104,.16), transparent 48%, rgba(25,158,218,.17));
}
.header-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -280px;
  border-radius: 50%;
  background: rgba(25,158,218,.18);
  filter: blur(30px);
  pointer-events: none;
}
.header-content { position: relative; padding-block: 40px 24px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.brand-hero { display: flex; align-items: center; gap: clamp(20px, 3vw, 38px); min-width: 0; }
.logo-stage { width: clamp(250px, 31vw, 350px); flex: 0 1 auto; }
.team-logo {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 16px 26px rgba(0, 9, 28, .34));
}
.brand-copy { min-width: 190px; }
.eyebrow { margin: 0 0 2px; color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Barlow Condensed", Impact, sans-serif; }
h1 { margin: 0; font-size: clamp(40px, 7vw, 52px); line-height: .95; letter-spacing: -.02em; }
.season-line { margin: 7px 0 0; color: var(--muted-foreground); font-size: 14px; font-weight: 600; }
.stitch {
  width: 160px; height: 4px; border-radius: 999px; margin-top: 10px;
  background: repeating-linear-gradient(90deg, var(--primary) 0 8px, var(--accent) 8px 16px, transparent 16px 24px);
}
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.storage-notice {
  display: flex; align-items: flex-start; gap: 9px; max-width: 680px;
  margin-top: 24px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(8,45,86,.78); color: var(--muted-foreground); font-size: 12px; line-height: 1.5;
}
.notice-icon { color: var(--primary); font-size: 16px; line-height: 1; margin-top: 1px; }
.tabs { display: flex; gap: 8px; margin-top: 24px; }
.tab {
  border: 0; border-radius: 999px; padding: 11px 20px; color: var(--accent-foreground); background: var(--accent);
  font-size: 14px; font-weight: 700; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.tab:hover { background: #39b4eb; }
.tab:active { transform: scale(.98); }
.tab.active { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 10px 25px rgba(245,35,104,.24); }

.main-content { flex: 1; padding-block: 32px 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
h2 { margin: 0; font-size: 34px; line-height: 1; }
.section-heading p { margin: 6px 0 0; color: var(--muted-foreground); font-size: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
  color: var(--foreground); font-weight: 700; transition: transform .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 8px 22px rgba(245,35,104,.22); }
.button-primary:hover { background: #ff4f86; }
.button-secondary { background: var(--accent); color: var(--accent-foreground); border-color: transparent; }
.button-secondary:hover { background: #39b4eb; }
.button-ghost { background: transparent; }
.button-ghost:hover { background: rgba(25,158,218,.18); }
.button-danger { color: #ff8181; background: transparent; }
.button-danger:hover { background: rgba(228,71,71,.12); }
.button-small { min-height: 33px; padding: 7px 12px; font-size: 12px; }
.icon-button { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 8px; }

.roster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.player-card, .game-card {
  border: 1px solid var(--border); border-radius: 13px; background: var(--card);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.player-card { padding: 16px; }
.player-card:hover, .game-card:hover { transform: translateY(-2px); border-color: rgba(245,35,104,.72); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.player-top { display: flex; align-items: flex-start; gap: 12px; }
.player-badge {
  width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: rgba(245,35,104,.15); color: var(--primary); font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 19px; font-weight: 800;
}
.player-info { min-width: 0; flex: 1; }
.player-name { margin: 1px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.player-meta, .player-detail, .game-meta, .game-notes { color: var(--muted-foreground); font-size: 12px; line-height: 1.5; }
.player-detail { margin-top: 10px; overflow-wrap: anywhere; }
.player-notes { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-actions { display: flex; gap: 6px; margin-top: 12px; }

.games-list { display: grid; gap: 12px; }
.game-card { display: flex; align-items: center; gap: 16px; padding: 15px 16px; }
.date-block { width: 64px; flex: 0 0 auto; text-align: center; padding: 8px; border-radius: 9px; background: var(--card-2); }
.date-day { display: block; color: var(--primary); font-family: "Barlow Condensed", Impact, sans-serif; font-size: 26px; font-weight: 800; line-height: .9; }
.date-month { display: block; margin-top: 5px; color: var(--muted-foreground); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.game-body { min-width: 0; flex: 1; }
.game-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.game-title { margin: 0; font-size: 15px; font-weight: 700; }
.pill { border-radius: 999px; padding: 3px 8px; background: var(--muted); color: var(--muted-foreground); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pill-win { background: rgba(25,158,218,.18); color: #5bc8f4; }
.pill-loss { background: rgba(228,71,71,.14); color: #ff8585; }
.pill-tie { background: var(--muted); color: #b7c9dc; }
.game-meta { margin-top: 4px; }
.game-notes { margin-top: 4px; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.game-actions { display: flex; gap: 6px; flex: 0 0 auto; }

.empty-state {
  padding: 64px 20px; text-align: center; border: 1px dashed var(--border); border-radius: 14px; background: rgba(8,45,86,.48);
}
.empty-icon { font-size: 34px; color: var(--muted-foreground); }
.empty-state h3 { margin: 8px 0 4px; font-size: 24px; }
.empty-state p { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.empty-state .button { margin-top: 16px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.72); backdrop-filter: blur(3px);
}
.modal-card {
  position: relative; width: min(500px, 100%); max-height: calc(100vh - 36px); overflow-y: auto;
  border: 1px solid var(--border); border-radius: 15px; padding: 24px; background: #061f3d; box-shadow: var(--shadow);
}
.modal-card h3 { margin: 0 0 20px; font-size: 29px; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: var(--muted-foreground); font-size: 26px; }
.modal-close:hover { color: var(--foreground); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: span 1; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--foreground);
  padding: 9px 11px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input, .field select { height: 40px; }
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245,35,104,.18); }
.field input::placeholder, .field textarea::placeholder { color: #7898b6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }

.toast {
  position: fixed; z-index: 200; right: 20px; bottom: 20px; max-width: min(360px, calc(100% - 40px));
  border: 1px solid var(--border); border-radius: 10px; padding: 13px 16px; background: #082d56; color: var(--foreground);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
}
.toast.error { border-color: rgba(228,71,71,.65); }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); }
.footer-content { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-block: 24px; color: var(--muted-foreground); font-size: 13px; }

@media (max-width: 900px) {
  .header-top { align-items: flex-start; }
  .brand-hero { flex: 1 1 100%; }
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1152px); }
  .header-content { padding-top: 30px; }
  .header-top { display: block; }
  .brand-hero { flex-direction: column; gap: 8px; text-align: center; }
  .logo-stage { width: min(88vw, 320px); margin-inline: auto; }
  .brand-copy { min-width: 0; }
  .brand-copy .stitch { margin-inline: auto; }
  .backup-actions { margin-top: 22px; justify-content: center; }
  .backup-actions .button { flex: 1; }
  .storage-notice { max-width: none; }
  .tabs { justify-content: center; }
  .section-heading { align-items: stretch; }
  .section-heading .button { width: 100%; }
  .roster-grid { grid-template-columns: 1fr; }
  .game-card { align-items: flex-start; gap: 11px; }
  .game-actions { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field, .field-wide, .field-full { grid-column: 1; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}

/* Player data v2: readable selects and multi-position picker */
.field select {
  background-color: var(--card-2);
  color: var(--foreground);
  color-scheme: dark;
}
.field select option {
  background: #ffffff;
  color: #002046;
}

.position-picker { display: grid; gap: 8px; }
.position-trigger {
  width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
  background: var(--card-2); color: #9cb5cc; text-align: left; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.position-trigger:hover { border-color: var(--accent); }
.position-trigger:focus-visible,
.position-trigger[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245,35,104,.18); }
.position-trigger.has-selection { color: var(--foreground); }
.position-chevron { color: var(--accent); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.position-trigger[aria-expanded="true"] .position-chevron { transform: rotate(180deg); }
.position-menu {
  overflow: hidden; border: 1px solid #58bde9; border-radius: 10px; background: #ffffff; color: #002046;
  box-shadow: 0 18px 45px rgba(0, 10, 28, .35);
}
.position-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 8px; }
.position-option {
  display: flex; align-items: center; gap: 9px; min-height: 38px; border-radius: 7px; padding: 8px 9px;
  color: #002046; font-size: 13px; font-weight: 650; cursor: pointer; user-select: none;
}
.position-option:hover { background: rgba(25,158,218,.14); }
.position-option:has(input:checked) { background: rgba(245,35,104,.13); color: #9d1244; }
.position-option input { width: 17px; height: 17px; margin: 0; padding: 0; border-radius: 4px; box-shadow: none; accent-color: var(--primary); }
.position-menu-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px;
  border-top: 1px solid #c7ddeb; background: #eef8fd;
}
.position-clear, .position-done {
  min-height: 34px; border-radius: 7px; padding: 7px 13px; font-weight: 800;
}
.position-clear { border: 1px solid #199eda; background: #ffffff; color: #002046; }
.position-clear:hover { background: #eaf7fc; }
.position-done { border: 1px solid #f52368; background: #f52368; color: #ffffff; }
.position-done:hover { background: #ff4f86; }
.position-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.position-chip, .player-position-list > span:not(.position-empty) {
  display: inline-flex; align-items: center; border: 1px solid rgba(25,158,218,.55); border-radius: 999px;
  background: rgba(25,158,218,.13); color: #70d3fa; padding: 4px 8px; font-size: 10px; font-weight: 800;
}
.player-position-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.player-position-list .position-empty { color: var(--muted-foreground); font-size: 11px; font-style: italic; }

@media (max-width: 480px) {
  .position-options { grid-template-columns: 1fr; }
}


/* Lineup Sandbox */
.sandbox-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sandbox-help {
  margin: -7px 0 18px; border: 1px solid rgba(25,158,218,.42); border-radius: 10px;
  padding: 10px 13px; background: rgba(8,45,86,.7); color: var(--muted-foreground); font-size: 12px; line-height: 1.55;
}
.sandbox-help strong { color: #fff; }
.placement-notice {
  position: sticky; top: 10px; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 14px; border: 1px solid var(--primary); border-radius: 10px; padding: 10px 13px;
  background: #071d38; box-shadow: 0 12px 28px rgba(0,0,0,.28); color: #fff; font-size: 13px; font-weight: 700;
}
.placement-player-copy { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.placement-player-positions { color: #77d7fa; font-size: 11px; font-weight: 900; letter-spacing: .035em; }
.placement-player-instruction { flex-basis: 100%; color: var(--muted-foreground); font-size: 11px; font-weight: 600; }
.placement-notice button { flex: 0 0 auto; border: 0; background: transparent; color: #77d7fa; font-weight: 800; }
.lineup-workspace {
  display: grid; grid-template-columns: minmax(210px, 255px) minmax(620px, 1fr) minmax(240px, 290px);
  align-items: start; gap: 14px;
}
.sandbox-panel {
  min-width: 0; border: 1px solid var(--border); border-radius: 15px; background: rgba(6,31,61,.88); box-shadow: 0 16px 38px rgba(0,0,0,.14);
}
.sandbox-panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px;
  border-bottom: 1px solid var(--border);
}
.sandbox-panel-heading h3 { margin: 0; font-size: 24px; line-height: 1; }
.sandbox-panel-heading p { margin: 4px 0 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.35; }
.count-badge {
  flex: 0 0 auto; border: 1px solid rgba(25,158,218,.52); border-radius: 999px; padding: 4px 8px;
  background: rgba(25,158,218,.12); color: #74d5fb; font-size: 11px; font-weight: 800;
}
.sandbox-player-list { display: grid; gap: 7px; max-height: 745px; overflow: auto; padding: 10px; }
.sandbox-empty { padding: 34px 14px; text-align: center; color: var(--muted-foreground); font-size: 12px; line-height: 1.55; }
.sandbox-player {
  display: flex; align-items: flex-start; gap: 9px; width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px; background: var(--card); color: #fff; text-align: left; cursor: grab; transition: border-color .15s, transform .15s, background .15s;
}
.sandbox-player:hover { border-color: var(--accent); transform: translateY(-1px); }
.sandbox-player:active { cursor: grabbing; }
.sandbox-player.selected { border-color: var(--primary); background: rgba(245,35,104,.14); box-shadow: 0 0 0 2px rgba(245,35,104,.16); }
.sandbox-player.dragging { opacity: .45; }
.sandbox-number {
  width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; margin-top: 1px; border-radius: 50%;
  background: var(--primary); color: #fff; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 16px; font-weight: 800;
}
.sandbox-player-copy { min-width: 0; flex: 1; }
.sandbox-player-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
.sandbox-player-meta { display: block; margin-top: 3px; color: #9fdcf6; font-size: 9px; font-weight: 800; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.sandbox-statuses { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 1px; }
.sandbox-status { border-radius: 999px; padding: 2px 5px; background: rgba(25,158,218,.16); color: #70d3fa; font-size: 8px; font-weight: 800; }

.field-panel { overflow: hidden; }
.field-scroll { overflow: auto; padding: 12px; }
.softball-field {
  position: relative; width: 100%; min-width: 610px; aspect-ratio: 10 / 9; overflow: hidden; border: 2px solid rgba(85,185,140,.58);
  border-radius: 48% 48% 18px 18px / 38% 38% 18px 18px; background: #0d4b3d; box-shadow: inset 0 0 70px rgba(0,0,0,.35);
}
.field-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.field-slot {
  --slot-x: 50%; --slot-y: 50%; position: absolute; z-index: 5; left: var(--slot-x); top: var(--slot-y);
  width: 94px; transform: translate(-50%, -50%); border: 0; padding: 0; background: transparent; color: #fff; text-align: center;
}
.field-slot.drop-active .assignment-circle, .field-slot:hover .assignment-circle { border-color: #fff; box-shadow: 0 0 0 4px rgba(25,158,218,.32), 0 10px 24px rgba(0,0,0,.3); }
.assignment-circle {
  width: 68px; height: 68px; display: grid; place-items: center; margin-inline: auto; border: 3px solid var(--accent); border-radius: 50%;
  background: rgba(0,32,70,.92); box-shadow: 0 8px 20px rgba(0,0,0,.28); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.field-slot:active .assignment-circle { transform: scale(.96); }
.field-slot.empty .assignment-circle { border-style: dashed; background: rgba(0,32,70,.62); }
.slot-plus { color: #fff; font-size: 30px; font-weight: 400; line-height: 1; }
.jersey-icon {
  position: relative; width: 45px; height: 42px; display: grid; place-items: center; padding-top: 3px;
  clip-path: polygon(20% 0, 37% 8%, 63% 8%, 80% 0, 100% 22%, 82% 39%, 78% 100%, 22% 100%, 18% 39%, 0 22%);
  background: var(--primary); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.32); font-family: "Barlow Condensed", Impact, sans-serif; font-size: 18px; font-weight: 800;
}
.slot-player-name {
  display: block; overflow: hidden; margin-top: 4px; padding: 2px 4px; border-radius: 5px; background: rgba(0,32,70,.82);
  text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 10px; font-weight: 800; text-shadow: 0 1px 2px #002046;
}
.slot-position { display: block; margin-top: 2px; color: #d9f3ff; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 1px 2px #002046; }
.field-slot[draggable="true"] { cursor: grab; }
.field-slot[draggable="true"]:active { cursor: grabbing; }

.batting-panel { overflow: hidden; }
.batting-order { display: grid; gap: 6px; max-height: 655px; overflow: auto; padding: 10px 10px 4px; }
.batting-row {
  display: grid; grid-template-columns: 31px 35px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 54px;
  border: 1px solid var(--border); border-radius: 10px; padding: 7px; background: var(--card); cursor: grab; transition: border-color .15s, transform .15s, opacity .15s;
}
.batting-row:hover, .batting-row.drop-active { border-color: var(--accent); transform: translateY(-1px); }
.batting-row.dragging { opacity: .42; }
.order-number { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--primary); color: #fff; font-family: "Barlow Condensed", Impact, sans-serif; font-weight: 800; }
.order-jersey { display: grid; place-items: center; width: 35px; height: 32px; clip-path: polygon(20% 0,37% 8%,63% 8%,80% 0,100% 22%,82% 39%,78% 100%,22% 100%,18% 39%,0 22%); background: var(--accent); color: #002046; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 13px; font-weight: 800; }
.order-copy { min-width: 0; }
.order-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.order-meta { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: 9px; line-height: 1.3; white-space: normal; }
.order-buttons { display: flex; flex-direction: column; gap: 2px; }
.order-move { width: 22px; height: 20px; border: 0; border-radius: 5px; padding: 0; background: rgba(25,158,218,.14); color: #78d7fa; font-size: 10px; }
.order-move:hover { background: var(--accent); color: #002046; }
.batting-drop-zone {
  width: calc(100% - 20px); min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 8px 10px 10px;
  border: 1px dashed var(--accent); border-radius: 10px; background: rgba(25,158,218,.06); color: #78d7fa; font-size: 11px; font-weight: 800;
}
.batting-drop-zone:hover, .batting-drop-zone.drop-active { background: rgba(25,158,218,.17); border-color: #fff; color: #fff; }
.assignment-modal-card { width: min(440px, 100%); }
.assignment-current { margin: -10px 0 18px; color: var(--muted-foreground); font-size: 13px; line-height: 1.5; }
.assignment-player-positions { display: block; margin-top: 8px; border: 1px solid rgba(25,158,218,.36); border-radius: 8px; padding: 8px 10px; background: rgba(25,158,218,.09); color: #9fdcf6; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.assignment-player-positions strong { color: #fff; }
.assignment-help { margin: 9px 0 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.45; }
.assignment-actions { justify-content: space-between; margin-top: 20px; }

@media (max-width: 1180px) {
  .lineup-workspace { grid-template-columns: minmax(210px, 260px) minmax(600px, 1fr); }
  .batting-panel { grid-column: 1 / -1; }
  .batting-order { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
}
@media (max-width: 840px) {
  .lineup-workspace { grid-template-columns: 1fr; }
  .sandbox-player-list { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 320px; }
  .field-panel, .batting-panel { grid-column: auto; }
  .batting-order { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tabs { flex-wrap: wrap; }
  .tabs .tab { flex: 1 1 auto; }
  .lineup-heading { align-items: stretch; }
  .sandbox-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .sandbox-player-list { grid-template-columns: 1fr; }
  .field-scroll { padding: 8px; }
  .softball-field { min-width: 560px; }
  .assignment-actions { flex-direction: column-reverse; }
  .assignment-actions .button { width: 100%; }
}


/* Shared online data + private admin mode */
.admin-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.admin-session-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.admin-badge {
  display: inline-flex; align-items: center; min-height: 32px; border: 1px solid rgba(245,35,104,.72); border-radius: 999px;
  padding: 6px 10px; background: rgba(245,35,104,.16); color: #ff7ba8; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
}
.admin-email { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a9c5db; font-size: 10px; }
body:not(.admin-mode) .admin-only { display: none !important; }
body.admin-mode .storage-notice { border-color: rgba(245,35,104,.58); background: rgba(62,13,46,.34); }
.connection-loading .notice-icon { color: var(--accent); animation: connectionPulse 1.2s ease-in-out infinite; }
.connection-ready .notice-icon { color: #73e2aa; }
.connection-admin .notice-icon { color: var(--primary); }
.connection-error { border-color: rgba(255,96,96,.72) !important; background: rgba(94,17,31,.46) !important; }
.connection-error .notice-icon { color: #ff7a8c; }
@keyframes connectionPulse { 50% { opacity: .35; transform: scale(.78); } }
.login-modal-card { width: min(470px, 100%); }
.login-eyebrow { margin: 0 0 7px; }
.login-description { margin: -7px 0 20px; color: var(--muted-foreground); font-size: 12px; line-height: 1.55; }
.login-error { margin: 0; border: 1px solid rgba(255,87,112,.62); border-radius: 8px; padding: 9px 11px; background: rgba(111,16,38,.38); color: #ffafbd; font-size: 12px; }
.button:disabled { cursor: wait; opacity: .58; transform: none !important; }
.loading-state { display: grid; place-items: center; min-height: 210px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted-foreground); text-align: center; }
.loading-state strong { display: block; margin-bottom: 5px; color: #fff; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 22px; }

@media (max-width: 600px) {
  .admin-controls, .admin-session-controls { width: 100%; justify-content: center; }
  .admin-controls > .button, .admin-session-controls > .button { flex: 1 1 auto; }
  .admin-email { flex-basis: 100%; max-width: none; text-align: center; }
}
