/* LineupPro app. Whiteboard look: marker-navy ink, highlighter yellow, red for open stations. */
:root {
  --board: #f7f9f6; --paper: #fff; --ink: #14213d; --soft: #5a6478; --line: #d5dbe3;
  --hi: #ffd23f; --gap: #d62839; --gap-bg: #fde8ea; --ok: #1b7f5c; --over: #b45f06; --over-bg: #fff1dc; --blue: #2456c9;
  --cond: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--board); }
h1, h2, h3, h4 { font-family: var(--cond); letter-spacing: 0.01em; line-height: 1.1; margin: 0 0 0.5rem; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.3rem; } h4 { font-size: 1.05rem; margin-top: 1rem; }
h3 small { font-family: var(--body); font-size: 0.85rem; font-weight: 400; color: var(--soft); }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.top { background: var(--ink); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1rem; }
.brand { color: #fff; text-decoration: none; font-family: var(--cond); font-weight: 700; font-size: 1.35rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand i { width: 1.1rem; height: 1.1rem; background: var(--hi); border-radius: 3px; transform: rotate(-8deg); }
.top-note { font-size: 0.8rem; opacity: 0.8; }
main { max-width: 62rem; margin: 0 auto; padding: 1rem; }
.panel, .sec { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.9rem; }
.panel { padding: 1.1rem; }
.sec > summary { cursor: pointer; padding: 0.85rem 1rem; font-family: var(--cond); font-size: 1.25rem; font-weight: 600; list-style: none; display: flex; gap: 0.6rem; align-items: baseline; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary b { background: var(--hi); border-radius: 4px; min-width: 1.7rem; text-align: center; padding: 0 0.3rem; }
.sec > summary::after { content: "+"; margin-left: auto; color: var(--soft); }
.sec[open] > summary::after { content: "\2212"; }
.sec-body { padding: 0 1rem 1rem; }
.f { display: block; margin-bottom: 0.7rem; }
.f span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 7px; background: #fff; min-height: 2.6rem; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 1.3rem; height: 1.3rem; min-height: 0; flex: none; accent-color: var(--ink); }
.ck { display: flex; gap: 0.6rem; align-items: center; padding: 0.35rem 0; }
.grid2, .grid3 { display: grid; gap: 0 0.8rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.btn { font: inherit; font-weight: 600; cursor: pointer; border: 2px solid var(--ink); background: var(--ink); color: #fff; border-radius: 8px; padding: 0.6rem 1rem; min-height: 2.75rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 0.35rem 0.7rem; min-height: 2.3rem; font-size: 0.92rem; }
.btn:disabled { opacity: 0.6; }
.x { font: inherit; font-size: 1.1rem; cursor: pointer; border: 0; background: none; color: var(--soft); min-width: 2.2rem; min-height: 2.2rem; border-radius: 6px; }
.x:hover { background: var(--gap-bg); color: var(--gap); }
.hint { color: var(--soft); font-size: 0.9rem; margin: 0.4rem 0; }
.warn { color: var(--gap); font-weight: 600; }
.bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.9rem; position: sticky; top: 0; background: var(--board); padding: 0.5rem 0; z-index: 5; }
.bar b { font-family: var(--cond); font-size: 1.2rem; margin: 0 0.4rem; }
.spacer { flex: 1; }
.saved { list-style: none; margin: 0; padding: 0; }
.saved li { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.saved a { flex: 1; text-decoration: none; color: var(--ink); } .saved span { color: var(--soft); font-size: 0.9rem; }
.tbl-wrap { overflow-x: auto; margin: 0.4rem 0; }
.tbl { border-collapse: collapse; width: 100%; min-width: 34rem; }
.tbl th { text-align: left; font-size: 0.82rem; padding: 0.3rem 0.35rem; white-space: nowrap; }
.tbl td { padding: 0.2rem; vertical-align: top; }
.tbl td input:not([type="checkbox"]) { min-width: 6.5rem; }
.tbl .t { min-width: 5.6rem !important; width: 5.6rem; }
.team .tags { display: flex; gap: 0.4rem; align-items: center; min-width: 25rem; }
.team .tags select { width: 7rem; flex: none; } .team .tags .ck { white-space: nowrap; font-size: 0.85rem; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem; margin-bottom: 0.7rem; }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.sentence { line-height: 2.9; border-bottom: 1px dashed var(--line); padding-bottom: 0.6rem; margin: 0 0 0.6rem; }
.inl { display: inline-block; width: 7rem; min-height: 2.2rem; padding: 0.25rem 0.45rem; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: #fffbe6; }
.import textarea { font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }
.file { cursor: pointer; }
.period { border-top: 3px solid var(--ink); padding-top: 0.8rem; margin-top: 1.2rem; }
.period-h { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.flags { margin: 0.2rem 0 0.6rem; font-size: 0.92rem; font-weight: 600; }
.flags .gap { color: var(--gap); } .flags .ok { color: var(--ok); } .flags .over { color: var(--over); }
.stations { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.area { grid-column: 1 / -1; font-family: var(--cond); font-weight: 700; font-size: 1.05rem; margin-top: 0.4rem; }
.station, .bench { border: 2px solid var(--line); border-radius: 8px; padding: 0.45rem; min-height: 4.6rem; display: flex; flex-direction: column; gap: 0.3rem; background: #fff; }
.station.gap { border-color: var(--gap); background: var(--gap-bg); }
.station.over { border-color: var(--over); background: var(--over-bg); }
.bench { margin-top: 0.5rem; border-style: dashed; flex-direction: row; flex-wrap: wrap; align-items: center; min-height: 3.2rem; }
.bench .st-name { width: 100%; }
.st-name { font-family: var(--cond); font-weight: 700; font-size: 1rem; }
.empty { color: var(--soft); font-size: 0.82rem; font-style: italic; }
.station.gap .empty { color: var(--gap); font-weight: 700; font-style: normal; text-transform: uppercase; }
.chip { font: inherit; font-size: 0.93rem; font-weight: 600; text-align: left; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; border: 0; border-radius: 6px; background: var(--ink); color: #fff; padding: 0.4rem 0.55rem; min-height: 2.3rem; }
.chip.tr { background: #3d5a99; } .chip i { font-style: normal; background: var(--hi); color: var(--ink); border-radius: 3px; padding: 0 0.25rem; font-size: 0.75rem; margin-left: 0.25rem; }
.chip.on { outline: 3px solid var(--hi); outline-offset: 1px; }
.chip.ghost { position: fixed; z-index: 50; pointer-events: none; transform: translate(-50%, -50%) rotate(-3deg); box-shadow: 0 6px 16px rgba(20, 33, 61, 0.35); }
.cl { margin-top: 0.8rem; background: #fffbe6; border-radius: 8px; padding: 0.3rem 0.8rem 0.8rem; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.7rem 1rem; border-radius: 8px; max-width: 92vw; z-index: 60; border-left: 6px solid var(--hi); }
#modal { position: fixed; inset: 0; background: rgba(20, 33, 61, 0.6); display: grid; place-items: center; padding: 1rem; z-index: 70; }
#modal[hidden], #board[hidden], #toast[hidden] { display: none; }
.modal-in { background: #fff; border-radius: 12px; padding: 1.4rem; max-width: 26rem; }
#board { position: fixed; inset: 0; background: var(--ink); color: #fff; z-index: 80; overflow: auto; padding: 1rem; }
.board-h { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.board-h h2 { flex: 1; font-size: clamp(1.6rem, 5vw, 3rem); margin: 0; } .board-h small { font-size: 0.5em; opacity: 0.8; font-family: var(--body); }
.board-h button { font: inherit; font-weight: 700; min-height: 3rem; min-width: 3rem; border-radius: 8px; border: 2px solid #fff; background: none; color: #fff; cursor: pointer; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.7rem; }
.board-grid > div { background: #fff; color: var(--ink); border-radius: 10px; padding: 0.7rem; display: flex; flex-direction: column; gap: 0.2rem; min-height: 6.5rem; }
.board-grid b { font-family: var(--cond); font-size: 1.15rem; border-bottom: 3px solid var(--hi); padding-bottom: 0.2rem; }
.board-grid span { font-size: 1.35rem; font-weight: 700; } .board-grid .gap { background: var(--gap-bg); } .board-grid .e { color: var(--gap); }
#print { display: none; }

@media (min-width: 40rem) {
  .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 2fr 1fr 1fr; }
  .stations { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
}
@media (prefers-reduced-motion: no-preference) { .chip { transition: outline-color 0.15s; } }

@media print {
  @page { margin: 9mm; }
  body { background: #fff; }
  .top, main, #toast, #modal, #board { display: none !important; }
  #print { display: block; font-size: 9.5pt; color: #000; }
  #print h1 { font-size: 15pt; margin: 0 0 2pt; } #print h2 { font-size: 11pt; margin: 7pt 0 2pt; border-bottom: 1.5pt solid #000; break-after: avoid; } #print h3 { font-size: 10pt; margin: 5pt 0 1pt; }
  #print p, #print ul { margin: 2pt 0; } #print ul { padding-left: 13pt; }
  #print table { border-collapse: collapse; width: 100%; break-inside: avoid; } #print th, #print td { border: 0.6pt solid #555; padding: 1.5pt 4pt; text-align: left; vertical-align: top; } #print th { background: #eee; }
  #print td.open { font-weight: 700; }
  #print .todo { list-style: none; padding: 0; } #print .box { display: inline-block; width: 9pt; height: 9pt; border: 0.8pt solid #000; margin-right: 5pt; text-align: center; line-height: 9pt; font-size: 8pt; }
  #print.one { column-count: 2; column-gap: 9mm; font-size: 8.5pt; } #print.one h1 { column-span: all; }
}
