:root {
  --paper: #fffdf8;
  --canvas: #f2efe7;
  --ink: #17212b;
  --muted: #67717b;
  --line: #d7d2c7;
  --red: #ef3d20;
  --red-dark: #bf2b15;
  --blue: #123e5a;
  --green: #1e7458;
  --amber: #9a5a0a;
  --shadow: 0 18px 60px rgba(33, 38, 43, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(239, 61, 32, .08), transparent 28rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hero {
  min-height: 260px;
  padding: 54px max(24px, calc((100vw - 1180px) / 2));
  color: white;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  position: relative;
}
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; border: 90px solid rgba(255,255,255,.045); border-radius: 50%; right: -160px; top: -220px; }
.eyebrow { margin: 0 0 10px; color: #ffb8a9; font-size: .77rem; font-weight: 900; letter-spacing: .17em; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.055em; max-width: 760px; }
.lede { margin: 20px 0 0; max-width: 680px; color: #d9e5ec; font-size: 1.08rem; line-height: 1.55; }
.hero-mark { width: 138px; height: 138px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); transform: rotate(-8deg); }
.hero-mark span { font-size: 64px; }

main { width: min(1180px, calc(100% - 32px)); margin: -34px auto 54px; position: relative; z-index: 2; }
.panel { margin-bottom: 22px; padding: 30px; border: 1px solid rgba(23,33,43,.08); border-radius: 22px; background: rgba(255,253,248,.96); box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.section-heading p, .hint { color: var(--muted); font-size: .9rem; }
.step { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--red); font-size: .72rem; font-weight: 900; }

.field-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr .55fr; gap: 14px; }
label { color: #4f5964; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
input[type="text"], input[type="date"], select { width: 100%; height: 46px; margin-top: 7px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: white; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,62,90,.12); }

.button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; font-weight: 850; }
.button.primary { color: white; background: var(--red); }
.button.primary:hover { background: var(--red-dark); }
.button.secondary { color: var(--blue); background: #eaf0f3; }
.button.ink { color: white; background: var(--ink); }
.actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 9px !important; }

.roster-head, .roster-row { display: grid; grid-template-columns: 58px minmax(150px, 1.3fr) 62px 62px minmax(150px, 1fr) 40px; gap: 10px; align-items: center; }
.roster-head { padding: 0 10px 7px; color: var(--muted); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.roster-row { margin-bottom: 8px; padding: 9px 10px; border: 1px solid #e3ded4; border-radius: 12px; background: white; }
.roster-row input[type="text"] { height: 40px; margin: 0; }
.check { justify-self: center; position: relative; }
.check input { position: absolute; opacity: 0; }
.checkmark { width: 34px; height: 34px; display: grid; place-items: center; color: #9aa1a7; border: 1px solid #ccd0d3; border-radius: 9px; background: #fafafa; font-weight: 900; }
.check input:checked + .checkmark { color: white; background: var(--red); border-color: var(--red); }
.attending .checkmark::before { content: "✓"; }
.icon-button { border: 0; background: transparent; color: #9a4a3d; font-size: 1.45rem; }

.battery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.battery-card { padding: 15px; border: 1px solid #e0dbd1; border-radius: 14px; background: #faf8f3; }
.battery-card h3 { margin: 0 0 10px; font-size: .82rem; color: var(--red-dark); text-transform: uppercase; letter-spacing: .08em; }
.battery-card label { display: block; margin-top: 8px; }
.battery-card select { height: 39px; }

.status-bar { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; margin: -4px 0 14px; }
.status { padding: 6px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.status.good { color: #12563f; background: #dcefe8; }
.status.warn { color: #7a4507; background: #f9ead2; }
.status.bad { color: #8f2615; background: #fde2dc; }

.print-sheet { border: 2px solid var(--ink); background: white; }
.print-title-wrap { padding: 22px 24px 18px; }
.print-title-wrap h2 { margin: 0; color: var(--red); text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: .015em; text-align: center; }
.print-meta { display: flex; justify-content: space-between; margin-top: 16px; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.lineup-table { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; }
.lineup-table th, .lineup-table td { border: 1.5px solid var(--ink); }
.lineup-table th { height: 52px; padding: 8px; background: #eceae4; font-size: .9rem; }
.lineup-table th.order-col { width: 105px; }
.lineup-table th.player-col { width: 190px; }
.lineup-table td { height: 62px; padding: 0; text-align: center; }
.player-cell { padding: 7px 10px !important; font-weight: 850; }
.player-name-print { display: inline-flex; align-items: center; gap: 7px; }
.eligibility { color: var(--red); font-size: .68rem; font-weight: 950; }
.order-controls { display: flex; align-items: center; justify-content: center; gap: 5px; }
.order-number { min-width: 20px; font-weight: 900; }
.move { width: 25px; height: 25px; border: 0; border-radius: 6px; color: var(--blue); background: #e8eff2; font-weight: 900; }
.position-select { width: 72%; min-width: 74px; height: 38px; margin: 0 22% 0 6%; padding: 0 8px; border: 1px solid #bbb7ad; border-radius: 8px; background: white; font-weight: 850; }
.notes-box { min-height: 100px; padding: 12px 16px; border-top: 1.5px solid var(--ink); }

footer { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .82rem; padding: 2px 5px; }
.text-button { padding: 0; border: 0; color: var(--red-dark); background: transparent; text-decoration: underline; font-weight: 800; }

@media (max-width: 800px) {
  .hero { min-height: 220px; padding-top: 40px; }
  .hero-mark { display: none; }
  main { width: min(100% - 18px, 1180px); }
  .panel { padding: 20px 15px; border-radius: 16px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .battery-grid { grid-template-columns: 1fr 1fr; }
  .roster-head { display: none; }
  .roster-row { grid-template-columns: 42px 1fr 42px 42px 36px; }
  .roster-row .avoid { grid-column: 2 / -1; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .actions { justify-content: flex-start; }
  .print-title-wrap { padding: 16px; }
}

@media print {
  @page { size: landscape; margin: .3in; }
  body { background: white; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, footer { display: none !important; }
  main { width: 100%; margin: 0; }
  .panel { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .print-sheet { border: 2px solid #111; }
  .print-title-wrap { padding: 12px 18px 10px; }
  .print-title-wrap h2 { font-size: 24px; }
  .print-meta { margin-top: 8px; font-size: 12px; }
  .lineup-table { min-width: 0; }
  .lineup-table th { height: 34px; font-size: 11px; }
  .lineup-table td { height: 45px; }
  .order-controls .move { display: none; }
  .position-select { appearance: none; -webkit-appearance: none; border: 0; font-size: 13px; text-align: left; padding-left: 12%; margin: 0; width: 100%; background: transparent; }
  .notes-box { min-height: 72px; font-size: 11px; }
}
