:root {
  --bg: #f6f3ea; --surface: #fffdf7; --text: #14211a; --muted: #5d6b62;
  --border: #e2dccb; --accent: #1f7a45; --accent-ink: #ffffff; --accent-soft: #e4efe3;
  --off: #efebdf; --warn-soft: #fbe9e4; --danger: #b42318;
  --brand: #0c3b23; --lime: #c6f432; --primary-bg: #0c3b23; --primary-ink: #ffffff;
  --primary-shadow: 3px 3px 0 #c6f432;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --radius: 8px; --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1511; --surface: #151f19; --text: #e8efe9; --muted: #9db0a3;
    --border: #25332a; --accent: #5fd88f; --accent-ink: #0c1a10; --accent-soft: #1a3324;
    --off: #1c2820; --warn-soft: #3a1d1b; --danger: #f97066;
    --brand: #e8efe9; --primary-bg: #c6f432; --primary-ink: #0c1a10; --primary-shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16.5px/1.5 "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 48px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hint { color: var(--muted); font-size: 0.85rem; }
.icon { width: 18px; height: 18px; flex: none; }

/* Header and team tabs */
.bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar .wrap { height: 52px; display: flex; align-items: center; }
.brand { font-weight: 800; letter-spacing: -0.01em; color: var(--text); display: inline-flex;
  align-items: center; gap: 8px; }
.brand img { border-radius: 7px; display: block; }
.brand:hover { text-decoration: none; }
.teamhead { background: var(--surface); border-bottom: 1px solid var(--border); }
.teamhead .wrap { padding-top: 16px; }
.teamhead h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
.tabs { display: flex; margin: 12px -8px 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 10px 8px; color: var(--muted); font-weight: 600;
  font-size: 0.92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.page-title { font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.section-title { margin: 24px 0 8px; }
.back { display: inline-flex; align-items: center; gap: 2px; font-weight: 600;
  font-size: 0.9rem; margin-bottom: 12px; }

/* Cards, rows, lists */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 + * { margin-top: 12px; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 12px; }
.cardhead h2 + * { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack h2:not(:first-child) { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.stack-tight { display: flex; flex-direction: column; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-name { display: grid; grid-template-columns: 1fr 96px; gap: 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.row-main { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  color: var(--text); min-width: 0; }
.row-main:hover { text-decoration: none; }
.row-main.game { flex-direction: row; align-items: center; gap: 14px; }
.row-main.game .stack-tight { flex: 1; }
.row .inline { padding-right: 8px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.date { width: 44px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.date b { font-size: 1.3rem; }
.date span { font-size: 0.7rem; color: var(--muted); font-weight: 700; letter-spacing: 0.05em; }
.chip { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--off); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--danger); }
.chip.off { text-decoration: line-through; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.notice.error { background: var(--warn-soft); color: var(--danger); }
.syncline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.card > summary, details > summary { cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 12px; }
details.import { margin-bottom: 16px; color: var(--accent); }
details.import[open] { color: var(--text); }
details.import > summary { color: var(--accent); }

/* Forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
a.button { display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
  border-radius: 10px; padding: 11px 16px; text-decoration: none; }
a.button:hover { text-decoration: none; filter: brightness(1.05); }
button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px; border: 1px solid transparent;
  padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.primary { background: var(--accent); color: var(--accent-ink); }
button.secondary { background: var(--off); color: var(--text); border-color: var(--border); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.link { background: none; border: 0; padding: 6px 0; color: var(--accent); }
button.link.danger { color: var(--danger); }
.icon-btn { background: none; border: 0; padding: 8px; color: var(--muted); border-radius: 8px; }
.icon-btn:hover { background: var(--off); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }
.icon-btn.done { color: var(--accent); }
.drop { flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 14px;
  border: 1.5px dashed var(--border); border-radius: 10px; color: var(--accent); cursor: pointer;
  text-align: center; position: relative; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.filled { border-style: solid; border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { display: flex; flex-direction: column; gap: 2px; }
.drop-text small { color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.shots { display: flex; flex-direction: column; gap: 8px; }
.small-btn { padding: 8px 12px; font-size: 0.88rem; align-self: flex-start; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumbs span { position: relative; }
.thumbs img { width: 72px; height: 96px; object-fit: cover; object-position: top; border-radius: 8px;
  border: 1px solid var(--border); display: block; }
.thumbs button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; padding: 0;
  border-radius: 50%; background: var(--text); color: var(--surface); font-size: 0.9rem; line-height: 1; }
.danger-zone h2 { color: var(--danger); }
.danger-zone form { margin-top: 12px; }
.footer-actions { margin-top: 24px; text-align: center; }
form.inline { display: inline; }

/* Account, footer, public pages */
.bar .wrap { justify-content: space-between; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.foot { padding: 8px 0 32px; }
.foot .wrap { display: flex; gap: 8px; justify-content: center; font-size: 0.85rem; color: var(--muted); }
.narrow { max-width: 440px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.wide { width: 100%; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pre { white-space: pre-wrap; }
.prose h2 { margin: 20px 0 6px; }
.prose ul { padding-left: 20px; margin: 6px 0; }
.prose li, .prose p { margin: 4px 0; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
/* Quick edits: Plays and Strength under each name */
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
td.who .here + .quick { margin-left: 32px; }
.mini { flex-direction: row; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 500;
  color: var(--muted); }
.mini select { width: auto; max-width: 150px; padding: 5px 8px; font-size: 0.85rem; border-radius: 8px; }
.roster td.who { padding-top: 12px; }
.roster td.who .quick { margin-top: 6px; }
.form-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* Lineup rules */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; font-weight: 400;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 2px; flex: none; }
.choice > span { display: flex; flex-direction: column; gap: 2px; }
.choice .muted { font-size: 0.88rem; }
.build-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline-label { flex: 1 1 220px; max-width: 320px; }

/* Admin */
.admin-tabs { margin: 4px 0 16px; border-bottom: 1px solid var(--border); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-num { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-label { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.members { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--border); }
.members li:last-child { border-bottom: 0; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.invite { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; }
.invite pre.copy { font-size: 0.8rem; word-break: break-all; }

/* Positions (player page) */
.positions { display: flex; flex-direction: column; gap: 8px; }
.pos-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pos-row > span { font-weight: 600; }
.segmented { display: inline-flex; background: var(--off); border-radius: 10px; padding: 3px; }
.segmented label { font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* Tables */
.scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left;
  font-variant-numeric: tabular-nums; }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 16px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 16px; }
.grid th, .grid td { text-align: center; white-space: nowrap; padding: 8px 6px; }
.grid th[scope=row] { text-align: left; font-weight: 600; }
.season { white-space: nowrap; }
.meter { display: inline-block; width: 56px; height: 6px; background: var(--off); border-radius: 3px;
  vertical-align: middle; overflow: hidden; margin-right: 6px; }
.meter span { display: block; height: 100%; background: var(--accent); }
.notes { color: var(--muted); font-size: 0.86rem; background: var(--bg); border-radius: 10px;
  padding: 10px 12px; margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.meta { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* Lineup depth chart: neutral grid, one muted color per position */
.depth { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.88rem;
  font-variant-numeric: tabular-nums; }
.depth th, .depth td { padding: 7px 4px; text-align: center; white-space: nowrap;
  border-bottom: 1px solid var(--border); }
.depth thead th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted);
  border-bottom: 1px solid var(--border); }
.depth tbody tr:last-child > * { border-bottom: 0; }
.depth th[scope=row] { text-align: left; font-weight: 600; padding-right: 12px; position: sticky; left: 0;
  background: var(--surface); z-index: 1; }
.depth col.alt { background: var(--bg); }
.depth .total { font-weight: 700; padding-left: 10px; }
.depth .total span { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
.sit span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
.pos { display: inline-block; min-width: 42px; padding: 3px 7px; border-radius: 6px; font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.01em; }
.p0 { background: #fef3c7; color: #92400e; }
.p1 { background: #dbeafe; color: #1e40af; }
.p2 { background: #ede9fe; color: #5b21b6; }
.p3 { background: #ffe4e6; color: #9f1239; }
.p4 { background: #ccfbf1; color: #115e59; }
.p5 { background: #e2e8f0; color: #334155; }
.p6 { background: #ffedd5; color: #9a3412; }
.p7 { background: #e0f2fe; color: #075985; }
@media (prefers-color-scheme: dark) {
  .p0 { background: rgb(251 191 36 / 14%); color: #fcd34d; }
  .p1 { background: rgb(96 165 250 / 14%); color: #93c5fd; }
  .p2 { background: rgb(167 139 250 / 16%); color: #c4b5fd; }
  .p3 { background: rgb(251 113 133 / 14%); color: #fda4af; }
  .p4 { background: rgb(45 212 191 / 13%); color: #5eead4; }
  .p5 { background: rgb(148 163 184 / 16%); color: #cbd5e1; }
  .p6 { background: rgb(251 146 60 / 14%); color: #fdba74; }
  .p7 { background: rgb(56 189 248 / 13%); color: #7dd3fc; }
}
#lineup details { margin: 12px 0; }
#lineup form { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Attendance: extra columns hidden until toggled */
.toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-label { flex-direction: row; color: var(--accent); cursor: pointer; font-weight: 600; }
.toggle-label::before { content: "+ "; }
.toggle:checked + .toggle-label::before { content: "– "; }
.attendance .opt { display: none; }
.toggle:checked ~ .scroll .attendance .opt { display: table-cell; }
.attendance td select { padding: 6px 8px; width: auto; }
.attendance td { padding: 0 8px 0 0; }
.here { flex-direction: row; align-items: center; gap: 12px; font-weight: 500; font-size: 0.95rem;
  padding: 10px 0; cursor: pointer; white-space: nowrap; }
details > summary .icon { transition: transform 0.15s; }
details[open] > summary .icon:last-child { transform: rotate(180deg); }
details.import[open] > summary .icon:last-child { transform: none; }
.gamehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

/* Plans and messages */
.cues { padding-left: 18px; margin: 10px 0; }
.drill p + p { margin-top: 8px; }
.copyblock { position: relative; }
.copyblock .icon-btn { position: absolute; top: 4px; right: 4px; }
pre.copy, p.copy { white-space: pre-wrap; font: inherit; background: var(--bg); padding: 12px 40px 12px 12px;
  border-radius: 10px; border: 1px solid var(--border); margin: 8px 0; }
.message h2 { margin-top: 4px; }

@media print {
  .noprint, .bar, .teamhead, .back, .footer-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .depth th[scope=row] { position: static; }
}


/* Brand type: condensed athletic display face for names, titles, tabs and buttons */
.brand { font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--brand); }
.page-title, .teamhead h1, .section-title, .card > h2, .card .cardhead h2, form.card > h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--brand); }
.page-title, .teamhead h1 { font-size: 1.9rem; line-height: 1; }
.card > h2, .card .cardhead h2, form.card > h2, .section-title { font-size: 1.3rem; line-height: 1.1; }
.tabs a { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 1.02rem; }
.tabs a.active { border-bottom: 3px solid var(--lime); }
@media (prefers-color-scheme: dark) { .tabs a.active { border-bottom-color: var(--lime); } }
.table thead th, .depth thead th { font-family: var(--display); font-size: 0.9rem; letter-spacing: 0.05em; }
.date b { font-family: var(--display); font-size: 1.5rem; }
.chip { border-radius: 4px; font-weight: 700; letter-spacing: 0.01em; }
.pos { border-radius: 4px; font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.05em; }
button.primary, a.button.primary, .button.primary {
  background: var(--primary-bg); color: var(--primary-ink); font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.1rem; border-radius: 6px;
  box-shadow: var(--primary-shadow); padding: 11px 20px; }
button.primary:hover, .button.primary:hover { filter: brightness(1.12); }
button.secondary, .button.quiet { border-radius: 6px; font-weight: 700; }
.bar { background: var(--bg); border-bottom: 2px solid var(--brand); }
@media (prefers-color-scheme: dark) { .bar { border-bottom-color: var(--border); } }
.teamhead { background: var(--bg); }
.notice { border-left: 4px solid var(--accent); border-radius: 6px; }
.notice.error { border-left-color: var(--danger); }
input, select, textarea { background: var(--surface); }
.foot a { font-weight: 600; }

/* Landing page: app-style, soft and rounded */
body.landing { overflow-x: hidden; --lx-bg: #f4efe6; --lx-card: #fffaf2; --lx-ink: #17241c;
  --lx-muted: #6b6f63; --lx-green: #0c3b23; --lx-soft: 0 24px 48px -24px rgb(60 45 25 / 35%), 0 2px 6px rgb(60 45 25 / 6%);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; background:
  radial-gradient(700px 500px at 85% 10%, rgb(198 244 50 / 22%), transparent 70%),
  radial-gradient(600px 500px at 0% 60%, rgb(31 122 69 / 12%), transparent 70%), var(--lx-bg); color: var(--lx-ink); }
@media (prefers-color-scheme: dark) {
  body.landing { --lx-bg: #0f1411; --lx-card: #18201b; --lx-ink: #eef3ee; --lx-muted: #a3ada5;
    --lx-soft: 0 24px 48px -24px rgb(0 0 0 / 70%); }
}
.landing .bar { background: transparent; border: 0; }
.landing .bar .wrap, .landing main.wrap { max-width: 1120px; }
.landing main.wrap { padding-top: 0; }
.landing .brand { font-family: "Plus Jakarta Sans", sans-serif; text-transform: none; font-size: 1.15rem;
  letter-spacing: -0.02em; color: var(--lx-ink); }
.landing .foot { border: 0; }
.landing .account a { background: var(--lx-card); color: var(--lx-ink); padding: 9px 18px; border-radius: 999px;
  font-weight: 700; box-shadow: var(--lx-soft); text-decoration: none; }
.lx-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px 0 72px; }
.lx-pill { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--lx-card);
  box-shadow: var(--lx-soft); font-size: 0.85rem; font-weight: 700; color: var(--lx-muted); }
.lx-copy h1 { font: 800 clamp(2.8rem, 6.2vw, 4.6rem)/1.02 "Plus Jakarta Sans", sans-serif; letter-spacing: -0.045em;
  margin: 22px 0 16px; color: var(--lx-ink); }
.lx-sub { font-size: 1.25rem; color: var(--lx-muted); margin-bottom: 30px; }
.lx-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lx-btn { display: inline-flex; align-items: center; padding: 15px 26px; border-radius: 999px; font-weight: 700;
  background: var(--lx-green); color: #fff; text-decoration: none !important; box-shadow: var(--lx-soft);
  transition: transform .15s ease; }
.lx-btn:hover { transform: translateY(-2px); }
.lx-btn.ghost { background: var(--lx-card); color: var(--lx-ink); }
@media (prefers-color-scheme: dark) { .lx-btn:not(.ghost) { background: #c6f432; color: #0c1a10; } }
.lx-stage { position: relative; display: flex; justify-content: center; padding: 10px 0; text-align: left; }
.lx-phone { width: 300px; border-radius: 46px; padding: 11px; background: #111712;
  box-shadow: 0 40px 80px -30px rgb(20 30 20 / 55%), inset 0 0 0 2px #2b332d; transform: rotate(-2deg); }
.lx-screen { border-radius: 36px; background: #fbf8f2; color: #17241c; padding: 14px 16px 12px; overflow: hidden;
  font-size: 0.86rem; }
.lx-status { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.75rem;
  padding: 0 6px 10px; }
.lx-notch { width: 84px; height: 22px; border-radius: 12px; background: #111712; }
.lx-apphead { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 12px; }
.lx-apphead b { display: block; font-size: 1.15rem; letter-spacing: -0.02em; }
.lx-apphead small { color: #6b6f63; font-weight: 600; }
.lx-apphead img { border-radius: 9px; }
.lx-seg { display: flex; background: #efe9de; border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.lx-seg span { flex: 1; text-align: center; padding: 6px 0; border-radius: 999px; font-weight: 700; color: #6b6f63;
  font-size: 0.8rem; }
.lx-seg .on { background: #fff; color: #17241c; box-shadow: 0 2px 6px rgb(60 45 25 / 15%); }
.lx-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.lx-list li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 7px 10px;
  box-shadow: 0 1px 3px rgb(60 45 25 / 8%); }
.lx-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  font-size: 0.7rem; }
.lx-name { flex: 1; font-weight: 700; }
.lx-pos { font-weight: 800; font-size: 0.7rem; padding: 3px 9px; border-radius: 999px; }
.h0 { background: #fdeccc; color: #8a5a10; } .h1 { background: #dbe8ff; color: #2448a8; }
.h2 { background: #e8e0ff; color: #5b3cc4; } .h3 { background: #ffdfe2; color: #b0263a; }
.lx-bench { display: flex; align-items: center; gap: 6px; margin: 12px 2px; font-size: 0.78rem; color: #6b6f63;
  font-weight: 700; }
.lx-chip { background: #efe9de; color: #17241c; padding: 4px 10px; border-radius: 999px; }
.lx-tabbar { display: flex; justify-content: space-around; border-top: 1px solid #ece5d8; padding-top: 10px;
  font-size: 0.72rem; font-weight: 700; color: #9a9c92; }
.lx-tabbar .on { color: #0c3b23; }
.lx-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; background: var(--lx-card);
  color: var(--lx-ink); padding: 10px 14px; border-radius: 18px; box-shadow: var(--lx-soft); font-weight: 700;
  font-size: 0.9rem; max-width: 175px; line-height: 1.25; }
.lx-f1 { top: 30%; left: calc(50% - 150px - 172px); }
.lx-f2 { bottom: 20%; right: calc(50% - 150px - 168px); }
.lx-floats { display: none; }
.lx-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #efe9de;
  color: #0c3b23; font-size: 0.85rem; }
.lx-dot.ok { background: #c6f432; }
.lx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.lx-tile { background: var(--lx-card); border-radius: 28px; padding: 24px; box-shadow: var(--lx-soft); }
.lx-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
  background: #e6f1d5; color: #0c3b23; margin-bottom: 14px; }
.lx-tile h3 { font: 800 1.15rem "Plus Jakarta Sans", sans-serif; letter-spacing: -0.02em; margin: 0 0 4px; }
.lx-tile p { color: var(--lx-muted); }
.lx-note { display: flex; align-items: center; gap: 22px; background: var(--lx-card); border-radius: 28px;
  padding: 22px 26px; box-shadow: var(--lx-soft); margin-bottom: 28px; }
.lx-note img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; flex: none; }
.lx-note p { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.lx-note span { color: var(--lx-muted); font-weight: 700; font-size: 0.9rem; }
.lx-end { text-align: center; padding: 40px 0 24px; }
.lx-end h2 { font: 800 clamp(1.8rem, 4vw, 2.6rem) "Plus Jakarta Sans", sans-serif; letter-spacing: -0.04em;
  margin: 0 0 22px; color: var(--lx-ink); }
@media (max-width: 820px) {
  .lx-hero { grid-template-columns: 1fr; gap: 36px; padding: 28px 0 48px; text-align: center; }
  .lx-actions { justify-content: center; }
  .lx-tiles { grid-template-columns: 1fr; }
  .lx-phone { width: 270px; transform: rotate(0deg); }
  .lx-stage { flex-direction: column; align-items: center; gap: 14px; }
  .lx-float { position: static; max-width: none; }
  .lx-stage .lx-f1, .lx-stage .lx-f2 { display: none; }
  .lx-floats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
  .lx-tile { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; border-radius: 22px; }
  .lx-tile .lx-ico { grid-row: span 2; margin: 0; }
  .lx-note { flex-direction: column; text-align: center; }
}

/* Full-screen lineup */
.cardtools { display: flex; gap: 2px; }
[data-full-open-area] { cursor: zoom-in; }
html.full-open, html.full-open body { overflow: hidden; }
.full { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; background: var(--surface); color: var(--text);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.full[hidden] { display: none; }
.full-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border); }
.full-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.full-title b { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-title small { color: var(--muted); font-size: 0.8rem; }
.full-seg { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.full-seg button { background: none; border: 0; padding: 6px 12px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.full-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.full-close { background: var(--bg); border: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text); flex: none; }
.full-close .icon { width: 20px; height: 20px; }
.full-body { flex: 1; min-height: 0; overflow: hidden; padding: 12px 14px;
  display: flex; justify-content: center; align-items: flex-start; }
.full-fit { transform-origin: top left; }
.full-fit table { width: auto; }
.full-fit .depth th[scope=row] { position: static; }
@media (max-width: 520px) { .full-title small { display: none; } .full-seg button { padding: 6px 9px; } }
@media (max-height: 500px) { .full-head { padding: 4px 10px 4px 14px; } .full-close { width: 34px; height: 34px; }
  .full-title small { display: none; } .full-body { padding: 6px 12px; } }

/* FamilyCal additions */
.kid { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border); }
.agenda li:last-child { border-bottom: 0; }
.agenda .when { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.agenda .cancelled { text-decoration: line-through; color: var(--muted); }
@media (max-width: 480px) { .agenda li { grid-template-columns: 1fr; gap: 0; } }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.formrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.formrow label { flex: 1 1 160px; }
.formrow input[type=color] { padding: 4px; height: 46px; width: 64px; }
.formrow label.color { flex: 0 0 auto; }
pre.copy { overflow-wrap: anywhere; }          /* long feed links wrap on phones */
code { font-size: 0.88em; background: var(--off); padding: 1px 5px; border-radius: 4px; }
ol.steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
a.button.primary { background: var(--accent); color: var(--accent-ink); }
a.button.secondary { background: var(--off); color: var(--text); border: 1px solid var(--border); }
