/* Big, high-contrast, outdoor-friendly styles */
:root {
  --bg: #f4f1e8; --card: #ffffff; --ink: #111; --muted: #555; --line: #222;
  --green: #0b6b2e; --green-d: #064a1f; --yellow: #ffd400; --red: #b3001b; --blue: #0047ab; --orange: #e06a00;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 18px; }
a { color: var(--blue); }
header.top { background: #111; color: var(--yellow); display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
header.top h1 { margin: 0; font-size: 26px; letter-spacing: .5px; text-transform: uppercase; }
header.top .sub { color: #fff; font-weight: 700; font-size: 18px; }
header.top nav { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
header.top nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 8px 12px; border: 2px solid #444; border-radius: 8px; font-size: 16px; }
header.top nav a.on { background: var(--yellow); color: #111; border-color: var(--yellow); }
.live-dot { font-weight: 800; font-size: 14px; padding: 6px 10px; border-radius: 20px; background: #333; color: #fff; white-space: nowrap; }
.live-dot.ok { background: var(--green); }
.live-dot.bad { background: var(--red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .5; } }
main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.card { background: var(--card); border: 3px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 24px; text-transform: uppercase; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: minmax(340px, 1fr) minmax(0, 2fr); }
.cols-3 { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.6fr) minmax(0, 1.4fr); }
.cols-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-3, .cols-2, .cols-even { grid-template-columns: minmax(0, 1fr); } }
label { display: block; font-weight: 800; margin: 10px 0 4px; font-size: 17px; }
input[type=text], input[type=number], input[type=password], input[type=url], select, textarea, input:not([type]), input[type=date], input[type=tel], input[type=search] {
  width: 100%; font-size: 22px; padding: 12px; border: 3px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 4px solid var(--yellow); outline-offset: 0; }
textarea { min-height: 70px; font-size: 18px; font-family: inherit; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 0; }
button, .btn { font-size: 20px; font-weight: 800; padding: 14px 18px; border-radius: 10px; border: 3px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; min-height: 56px; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; touch-action: manipulation; }
button:active, .btn:active { transform: translateY(2px); }
button.primary, .btn.primary { background: var(--green); color: #fff; border-color: var(--green-d); }
button.yellow { background: var(--yellow); border-color: #111; }
button.danger { background: var(--red); color: #fff; border-color: #600; }
button.blue { background: var(--blue); color: #fff; border-color: #002a66; }
button.orange { background: var(--orange); color: #fff; border-color: #7a3a00; }
button.small, .btn.small { font-size: 15px; padding: 8px 10px; min-height: 42px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 8px; border: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; background: #fff; cursor: pointer; font-size: 17px; }
.checks input { width: 26px; height: 26px; }
.checks label.on { background: var(--yellow); }
table { width: 100%; border-collapse: collapse; font-size: 19px; }
th { text-align: left; background: #111; color: var(--yellow); padding: 10px 8px; font-size: 15px; text-transform: uppercase; position: sticky; top: 0; }
td { padding: 10px 8px; border-bottom: 2px solid #ddd; vertical-align: middle; }
tr.first td { background: #fff4b0; font-weight: 800; }
tr.out td { color: #777; text-decoration: line-through; }
.num { display: inline-block; white-space: nowrap; min-width: 54px; text-align: center; background: #111; color: var(--yellow); font-weight: 900; border-radius: 8px; padding: 4px 8px; font-size: 22px; }
.place { font-weight: 900; font-size: 24px; }
.dist { font-weight: 900; font-size: 22px; white-space: nowrap; }
.tag { display: inline-block; font-size: 13px; font-weight: 900; padding: 3px 8px; border-radius: 6px; background: var(--green); color: #fff; text-transform: uppercase; }
.tag.red { background: var(--red); } .tag.gray { background: #666; } .tag.yellow { background: var(--yellow); color: #111; } .tag.blue { background: var(--blue); }
.muted { color: var(--muted); }
.big { font-size: 28px; font-weight: 900; }
.classbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.classbar button { font-size: 17px; min-height: 50px; }
.classbar button.on { background: var(--yellow); }
.classbar button .running { color: var(--green); }
.upnow { border: 5px solid var(--green); background: #eaffef; }
.upnow .label { font-size: 16px; font-weight: 900; color: var(--green); text-transform: uppercase; letter-spacing: 1px; }
.upnow .who { font-size: 34px; font-weight: 900; margin: 4px 0; }
.upnow .what { font-size: 21px; font-weight: 700; }
.upnow.done { border-color: var(--blue); background: #e8f0ff; }
.upnow.done .label { color: var(--blue); }
.distance-input { font-size: 44px !important; font-weight: 900; text-align: center; height: 84px; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn-grid .wide { grid-column: span 2; }
/* placeholder badge when a tractor has no number */
.num.nonum { background: #e7e3d8; color: #333; font-size: 0.85em; }
.lineup-list { list-style: none; margin: 0; padding: 0; }
.lineup-list li { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.lineup-list li .pos { font-weight: 900; font-size: 13px; text-transform: uppercase; width: 62px; text-align: center; line-height: 1.1; }
.lineup-list li .info { flex: 1; min-width: 0; }
.lineup-list li .info .d { font-weight: 900; font-size: 20px; line-height: 1.15; overflow-wrap: break-word; }
.lineup-list li .info .t { font-size: 15px; color: var(--muted); line-height: 1.2; }
.lineup-list li button.small { flex: none; }
.lineup-list li.deck { border-color: var(--orange); background: #fff1e0; }
.lineup-list li.hole { border-color: #b08a00; background: #fffbe0; }
.grip { font-size: 30px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #111; color: var(--yellow); border-radius: 8px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; flex: none; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: 0 0 0 4px var(--yellow); }
.sortable-drag, .sortable-fallback { opacity: .95 !important; transform: rotate(1deg); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.overlay .box { background: #fff; border: 4px solid #111; border-radius: 14px; padding: 22px; width: 100%; max-width: 460px; }
.overlay .box h2 { margin-top: 0; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 14px 22px; border-radius: 10px; font-weight: 800; font-size: 19px; z-index: 200; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.toast.err { background: var(--red); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 10px; }
.stat { background: #111; color: #fff; border-radius: 10px; padding: 10px; text-align: center; }
.stat .v { font-size: 26px; font-weight: 900; color: var(--yellow); }
.stat .k { font-size: 13px; text-transform: uppercase; font-weight: 800; overflow-wrap: break-word; }
.empty { padding: 20px; text-align: center; color: var(--muted); font-weight: 700; }
.hide { display: none !important; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 48px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 24px; font-weight: 900; color: var(--yellow); text-transform: uppercase; letter-spacing: .5px; }
.brand-meta { font-size: 15px; color: #fff; font-weight: 600; }
header.top .pagename { background: var(--yellow); color: #111; font-weight: 900; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; font-size: 16px; }
/* registration: required / optional markers */
.req { color: #b00020; font-weight: 900; }
.opt { color: var(--muted); font-weight: 600; font-size: 0.85em; }
@media (max-width: 600px) {
  .lineup-list li { gap: 6px; padding: 6px; }
  .lineup-list li .pos { width: 42px; font-size: 11px; }
  .lineup-list li button.small { padding: 4px 6px; font-size: 12px; min-height: 52px; width: 56px; line-height: 1.1; }
}
/* weight fits several classes: big pick buttons */
.checks.pick label { flex: 1 1 200px; padding: 14px 16px; font-size: 18px; line-height: 1.3; border-width: 4px; }
.checks.pick label .big { font-size: 40px; font-weight: 900; min-width: 44px; text-align: center; }
.checks.pick input { width: 30px; height: 30px; }
/* lineup in a narrow column (announcer on a laptop): put the Hook / Bottom buttons on their own row */
.lineup-list { container-type: inline-size; }
@container (min-width: 380px) and (max-width: 600px) {
  .lineup-list li { flex-wrap: wrap; }
  .lineup-list li .info { flex: 1 1 120px; }
  .lineup-list li button.small { flex: 1 1 calc(50% - 10px); min-height: 44px; }
}

/* ---- sleds ---- */
.sled-tag { display: inline-block; background: var(--sc); color: var(--si); border-radius: 999px; padding: 1px 10px; font-weight: 900; font-size: .8em; text-transform: uppercase; letter-spacing: .3px; vertical-align: middle; white-space: nowrap; }
.sledbar { background: var(--sc); color: var(--si); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 3px solid #111; }
.sledbar .sb-main { flex: 1 1 260px; min-width: 0; }
.sledbar .sb-k { font-weight: 800; text-transform: uppercase; font-size: 13px; opacity: .9; }
.sledbar .sb-name { font-weight: 900; font-size: 34px; line-height: 1.05; text-transform: uppercase; }
.sledbar .sb-cls { font-weight: 800; font-size: 18px; }
.sledbar .sb-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.sledbar .sb-pick button { background: #fff; color: #111; border: 3px solid #111; font-weight: 900; min-height: 52px; }
.sledbar .sb-pick button.on { background: #111; color: #fff; border-color: #fff; }
.sled-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
@media (min-width: 900px) { .sled-grid { grid-template-columns: 1fr 1fr; } }
.sledpanel { border: 6px solid var(--sc); border-radius: 14px; background: #fff; overflow: hidden; min-width: 0; }
.sledpanel .sp-head { background: var(--sc); color: var(--si); padding: 8px 12px; }
.sledpanel .sp-name { font-weight: 900; font-size: 30px; text-transform: uppercase; line-height: 1.05; }
.sledpanel .sp-cls { font-weight: 800; font-size: 17px; }
.sledpanel .sp-body { padding: 10px 12px; display: grid; gap: 8px; }
.sledpanel .sp-box { border: 3px solid #ddd; border-radius: 10px; padding: 8px 10px; }
.sledpanel .sp-box .lab { font-weight: 900; text-transform: uppercase; font-size: 13px; color: #555; }
.sledpanel .sp-box .nm { font-weight: 900; font-size: 24px; line-height: 1.15; }
.sledpanel .sp-box.up { border-color: var(--green); background: #eaffef; } .sledpanel .sp-box.up .lab { color: var(--green); }
.sledpanel .sp-box.done { border-color: var(--blue); background: #e8f0ff; } .sledpanel .sp-box.done .lab { color: var(--blue); }
.sledpanel .sp-box.lead { background: #111; color: #fff; border-color: #111; } .sledpanel .sp-box.lead .lab { color: var(--yellow); }
.sledpanel .sp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .sledpanel .sp-row { grid-template-columns: 1fr; } .sledpanel .sp-name { font-size: 24px; } }
.sledpanel table td { font-size: 16px; padding: 5px 4px; }
body.two-sleds main { max-width: 1500px; }
.sled-cfg { display: grid; grid-template-columns: auto 1fr 70px; gap: 8px; align-items: center; margin-top: 8px; }
.sled-cfg input[type=color] { width: 70px; height: 48px; padding: 2px; }
@media (max-width: 600px) {
  .sledbar { padding: 8px 10px; gap: 8px; }
  .sledbar .sb-name { font-size: 26px; }
  .sledbar .sb-cls { font-size: 16px; }
  .sledbar .sb-pick { flex: 1 1 100%; flex-wrap: nowrap; }
  .sledbar .sb-pick button { flex: 1 1 0; min-width: 0; padding: 6px; font-size: 16px; min-height: 48px; }
}
/* Sled Plan page */
.plan-grid { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 860px) { .plan-grid { grid-template-columns: minmax(0, 1fr); } }
.pcol { border: 5px solid var(--sc, #111); border-radius: 14px; background: #fff; overflow: hidden; min-width: 0; }
.pcol.unassigned { border: 4px dashed #777; background: #f7f7f2; }
.pcol-head { background: var(--sc, #555); color: var(--si, #fff); padding: 10px 12px; }
.pcol.unassigned .pcol-head { background: #ddd; color: #111; }
.pcol-name { font-weight: 900; font-size: 28px; text-transform: uppercase; line-height: 1.05; }
.pcol-sub { font-weight: 700; font-size: 15px; margin-top: 2px; }
.plist { list-style: none; margin: 0; padding: 10px; min-height: 110px; display: grid; gap: 10px; }
.plist:empty::after { content: 'Drag classes here'; display: block; text-align: center; color: #777; font-weight: 800; padding: 30px 8px; border: 3px dashed #bbb; border-radius: 10px; }
.pcard { border: 3px solid #222; border-radius: 12px; background: #fff; padding: 8px; }
.pcard.on-sled { border-color: var(--sc); box-shadow: 0 0 0 3px var(--sc) inset; background: #fffdf0; }
.pcard.done { background: #eef2f8; opacity: .85; }
.pcard .pc-top { display: flex; gap: 8px; align-items: center; }
.pcard .grip { font-size: 30px; background: #111; color: var(--yellow); border-radius: 10px; min-width: 52px; min-height: 52px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; }
.pcard .pc-pos { font-weight: 900; font-size: 16px; color: #555; min-width: 18px; text-align: center; }
.pcard .pc-letter { font-weight: 900; font-size: 34px; background: var(--yellow); color: #111; border: 3px solid #111; border-radius: 10px; min-width: 52px; text-align: center; line-height: 46px; }
.pcard .pc-info { flex: 1; min-width: 0; }
.pcard .pc-name { font-weight: 900; font-size: 19px; line-height: 1.15; }
.pcard .pc-meta { font-size: 14px; color: #444; margin-top: 2px; }
.pcard .pc-meta .tag { margin-left: 4px; }
.pcard .pc-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pcard .pc-btns button { flex: 1 1 auto; min-height: 44px; font-size: 14px; padding: 6px 8px; }
.plan-fill button { flex: 0 1 auto; }
/* announcer plan strip */
.planstrip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 3px solid var(--sc, #111); border-radius: 12px; background: #fff; padding: 8px 10px; margin-bottom: 12px; }
.planstrip .ps-k { font-weight: 900; text-transform: uppercase; font-size: 14px; }
.planstrip .ps-c { font-weight: 800; font-size: 15px; border: 2px solid #bbb; border-radius: 8px; padding: 4px 8px; background: #f4f4f4; }
.planstrip .ps-c.now { background: var(--sc, #111); color: var(--si, #fff); border-color: #111; }
.planstrip .ps-c.done { text-decoration: line-through; color: #777; }
.planstrip .ps-go { margin-left: auto; }
.sp-box.nextcls { border-style: dashed; }
.plan-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #111; margin-right: 6px; vertical-align: -2px; }

.lineup-list li.pulloff { border-color: var(--yellow); background: #fff8d6; }
