/* app.css — layout and components for the prototype. Colors come only from the variables in tokens.css. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.45; overflow-x: hidden; }
a { color: var(--link); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.sidebar :focus-visible { outline-color: var(--side-text); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ic { flex: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 200px; min-width: 0; }

/* ---------- buttons, pills, controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-height-compact); padding: 0 16px; border-radius: var(--radius-control); border: 1px solid transparent; background: var(--primary); color: var(--on-primary); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--primary-hover); }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--input-border); }
.btn.sec:hover { background: var(--canvas); }
.btn.danger { background: var(--urgent-bg); color: var(--urgent-text); }
.btn.ghost { background: transparent; color: var(--link); padding: 0 8px; }
.btn.ghost:hover { background: var(--soft-bg); }
.btn.lg { min-height: var(--control-height); font-size: 16px; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-control); border: none; background: transparent; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--canvas); }
.icon-btn.bordered { border: 1px solid var(--input-border); background: var(--surface); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-pill); font-weight: var(--fw-pill); padding: 2px 8px; border-radius: var(--radius-chip); white-space: nowrap; line-height: 1.5; }
.pill.urgent { background: var(--urgent-bg); color: var(--urgent-text); }
.pill.ok { background: var(--ok-bg); color: var(--ok-text); }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); }
.pill.draft { background: var(--draft-bg); color: var(--draft-text); }
.pill.tag { background: var(--soft-bg); color: var(--soft-text); border: 1px solid var(--soft-border); font-weight: 600; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.meter { height: 6px; border-radius: var(--radius-chip); background: var(--track); overflow: hidden; min-width: 40px; }
.meter span { display: block; height: 6px; border-radius: var(--radius-chip); background: var(--bar); }
.avatar { width: 36px; height: 36px; border-radius: var(--radius-chip); background: var(--soft-bg); color: var(--soft-text); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.who small { color: var(--muted); font-size: 12.5px; }
.count { font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: var(--radius-chip); background: var(--draft-bg); color: var(--draft-text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-chip); margin-right: 8px; border: 1px solid var(--side-border); }

/* ---------- sign-in */
header.site { background: var(--surface); border-bottom: 1px solid var(--border); }
header.site .inner { max-width: 1240px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.tile { width: 36px; height: 36px; border-radius: 9px; background: var(--tile); display: grid; place-items: center; flex: none; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.2px; }
.brand-tag { font-size: 12.5px; color: var(--muted); }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-nav span { font-size: 15px; font-weight: 500; }
.signin { max-width: 1240px; margin: 0 auto; padding: 56px 16px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: center; }
.pitch { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pitch h1 { font-size: clamp(32px, 4.4vw, var(--fs-hero)); line-height: 1.06; font-weight: var(--fw-hero); letter-spacing: -1px; text-wrap: balance; }
.pitch mark { background: var(--mark-bg); color: var(--mark-text); padding: 0 8px; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lede { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-chip); background: var(--soft-bg); color: var(--soft-text); border: 1px solid var(--soft-border); }
.families-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; max-width: 34rem; }
.families-card h2 { font-size: 16px; font-weight: 700; }
.families-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.families-card li { display: flex; gap: 10px; align-items: flex-start; }
.families-card svg { color: var(--link); margin-top: 2px; }
.signin-card { flex: 0 1 440px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); box-shadow: 0 16px 40px var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.signin-card h2 { font-size: 26px; font-weight: 800; }
.signin-card .sub { color: var(--muted); }
.divider { height: 1px; background: var(--border); }
.parents { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.parents p { color: var(--muted); }
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.stores span { flex: 1 1 140px; min-height: 44px; border-radius: var(--radius-control); border: 1px solid var(--input-border); display: flex; align-items: center; justify-content: center; font-weight: 600; }
@media (max-width: 520px) { .signin-card { padding: 24px 20px; } .signin { padding-block: 32px; } }

/* ---------- console shell */
.app { display: flex; min-height: 100vh; }
.sidebar { flex: none; width: 236px; background: var(--sidebar); color: var(--side-text); padding: 18px 14px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--side-border); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar .brand span:last-child { font-size: 17px; font-weight: 800; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--side-border); background: transparent; color: var(--side-text); font-size: 14px; font-weight: 600; }
.navwrap { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.program { display: flex; justify-content: space-between; align-items: center; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--side-border); background: transparent; color: var(--side-text); font-size: 14px; font-weight: 600; width: 100%; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .signout { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; color: var(--side-muted); font-size: 14px; font-weight: 500; text-decoration: none; min-height: 38px; }
.nav a:hover, .signout:hover { color: var(--side-text); }
.nav a[aria-current="page"] { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 650; }
.nav-sep { margin-top: 10px; border-top: 1px solid var(--side-border); border-radius: 0 0 9px 9px !important; padding-top: 12px !important; }
.sidebar-foot { margin-top: auto; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search-form { flex: 1 1 200px; min-width: 0; display: flex; }
.search { width: 100%; height: 40px; padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--input-border); background: var(--canvas); color: var(--ink); font-size: 14px; }
#main { outline: none; flex: 1; min-width: 0; }
.body { padding: 22px 22px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1500px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 16px; }
.page-head h1 { font-size: var(--fs-page-title); font-weight: var(--fw-page-title); line-height: 1.2; }
.page-head p { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; align-self: flex-start; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar { width: auto; border-right: none; border-bottom: 1px solid var(--side-border); padding: 10px 16px; gap: 0; }
  .menu-btn { display: inline-flex; }
  .navwrap { display: none; padding-top: 12px; gap: 12px; }
  .navwrap.open { display: flex; }
  .nav { display: grid; grid-template-columns: 1fr 1fr; }
  .nav a { min-height: 44px; }
  .nav-sep { grid-column: 1 / -1; }
  .topbar, .body { padding-left: 16px; padding-right: 16px; }
  .topbar .avatar { display: none; }
}

/* ---------- cards, stats, panels, lists */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.stat .label { font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--muted); }
.stat .value { font-size: var(--fs-stat); font-weight: var(--fw-stat); line-height: 1.15; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat .meter { align-self: stretch; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel.span2 { grid-column: 1 / -1; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel h2 { font-size: var(--fs-section-title); font-weight: var(--fw-section-title); }
.panel h3 { font-size: 14px; font-weight: 700; }
.panel-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { display: flex; flex-direction: column; gap: 5px; padding-block: 10px; border-bottom: 1px solid var(--border); min-width: 0; }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: none; padding-bottom: 0; }
.li-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.li-top a, .li-top b { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); min-width: 0; }
.li-top a:hover { color: var(--link); text-decoration: underline; }
.li-top > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.events li a, .events li > div { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--canvas); text-decoration: none; color: inherit; }
.events li a:hover { outline: 1px solid var(--soft-border); }
.when { width: 62px; flex: none; display: flex; flex-direction: column; }
.when small { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.4px; text-transform: uppercase; }
.when b { font-size: 13px; }
.what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.what b { font-size: 14px; }
.what span { font-size: 12.5px; color: var(--muted); }
.cancelled .what b { text-decoration: line-through; }
.empty { border: 1px dashed var(--input-border); border-radius: var(--radius-card); padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 16px; }
.kv dt { font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--muted); }
.kv dd { margin: 2px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.checklist a { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--canvas); text-decoration: none; color: inherit; }
.checklist .tick { width: 22px; height: 22px; border-radius: var(--radius-chip); background: var(--ok-bg); color: var(--ok-text); display: grid; place-items: center; flex: none; }
.checklist small { display: block; color: var(--muted); font-size: 12.5px; }
.setup-done { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 10px 14px; font-size: 14px; }

/* ---------- tables, filters, tabs */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.panel .table-wrap { border: none; border-radius: 0 0 var(--radius-card) var(--radius-card); margin: 0 -16px -16px; border-top: 1px solid var(--border); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td a { font-weight: 600; text-decoration: none; }
.tbl td a:hover { text-decoration: underline; }
.tbl .right { text-align: right; }
.tbl .pills { gap: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.filter { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter > span { font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--muted); }
.filter select, .filter input { height: var(--control-height-compact); padding: 0 10px; border-radius: var(--radius-control); border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); font-size: 14px; max-width: 100%; }
.filter.grow input { width: 100%; }
.result-count { font-size: 13px; color: var(--muted); margin-left: auto; align-self: center; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--draft-bg); max-width: 100%; }
.seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--muted); }
.seg a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.tabs-row { display: flex; gap: 2px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tabs-row a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; min-height: 44px; }
.tabs-row a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--tab-active); }
.datebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.datebar h2 { font-size: 16px; font-weight: 700; margin: 0 6px; }
.datebar .icon-btn { border: 1px solid var(--input-border); background: var(--surface); text-decoration: none; }

/* ---------- forms and dialog */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .checks legend { font-size: 13.5px; font-weight: 600; padding: 0; }
.field input, .field select, .field textarea { min-height: var(--control-height-compact); padding: 8px 12px; border-radius: var(--radius-control); border: 1px solid var(--input-border); background: var(--canvas); color: var(--ink); font-size: 14.5px; width: 100%; }
.field textarea { resize: vertical; line-height: 1.45; }
.field small, .toggle small { font-size: 12.5px; color: var(--muted); }
.field input[type="color"] { padding: 4px; width: 64px; }
.checks { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.checks > div { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { position: relative; display: inline-flex; }
.checks input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.checks label span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--radius-chip); border: 1px solid var(--input-border); background: var(--surface); font-size: 13.5px; font-weight: 600; }
.checks input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.checks input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.checks input:disabled + span { opacity: 0.45; text-decoration: line-through; }
.toggle { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.toggle span { display: flex; flex-direction: column; font-size: 14px; }
.form-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.form h3 { font-size: 14px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 2px; }
.alert { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; border: 1px solid var(--border); background: var(--canvas); }
.alert.err { background: var(--urgent-bg); color: var(--urgent-text); border-color: transparent; font-weight: 600; }
.alert.warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.alert.info { background: var(--soft-bg); color: var(--soft-text); border-color: var(--soft-border); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert a { color: inherit; }
dialog.dlg { border: 1px solid var(--border); border-radius: var(--radius-sheet); background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 16px 40px var(--shadow); }
dialog.dlg.wide { width: min(760px, calc(100vw - 24px)); }
dialog.dlg.side { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); border-radius: var(--radius-sheet) 0 0 var(--radius-sheet); border-width: 0 0 0 1px; }
dialog.dlg::backdrop { background: var(--shadow); backdrop-filter: blur(1px); }
dialog.dlg[open] { display: flex; flex-direction: column; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 18px; font-weight: 800; }
.dlg-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.dlg-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); }
.choice:hover { background: var(--soft-bg); }
.choice small { color: var(--muted); font-size: 12.5px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s; z-index: 2147483647; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---------- reservation kinds (color + label together) */
.k { border: 1px solid transparent; }
.k-practice { background: var(--bar); color: var(--on-tile); }
.k-signup { background: var(--ok-text); color: var(--ok-bg); }
.k-booking { background: var(--soft-bg); color: var(--soft-text); border-color: var(--soft-text); }
.k-coach { background: var(--warn-text); color: var(--warn-bg); }
.k-rental { background: var(--ink); color: var(--surface); }
.k-block { background: repeating-linear-gradient(135deg, var(--draft-bg) 0 6px, var(--border) 6px 8px); color: var(--draft-text); border-color: var(--input-border); }
.k-open { background: transparent; color: var(--link); border: 1px dashed var(--link); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- facility calendar */
.fc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow-x: auto; }
.fc-inner { min-width: 900px; }
.fc-row { display: grid; grid-template-columns: 168px 1fr; border-bottom: 1px solid var(--border); }
.fc-row:last-child { border-bottom: none; }
.fc-head { position: sticky; top: 0; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--muted); }
.fc-label { padding: 8px 12px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.fc-label b { font-size: 13.5px; }
.fc-label small { font-size: 12px; color: var(--muted); }
.fc-lane { padding: 8px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); background: var(--canvas); border-bottom: 1px solid var(--border); }
.fc-hours { display: grid; grid-template-columns: repeat(var(--cols, 13), 1fr); }
.fc-hours span { padding: 8px 6px; border-left: 1px solid var(--border); }
.fc-track { position: relative; height: 58px; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: calc(100% / var(--cols, 13)) 100%; }
.fc-closed { position: absolute; top: 0; bottom: 0; background: var(--draft-bg); opacity: 0.75; }
.fc-item { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; padding: 3px 7px; font-size: 12px; line-height: 1.25; text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.fc-item b, .fc-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.fc-item b { font-weight: 700; }
.fc-item.k-open { font-weight: 700; align-items: center; opacity: 0.85; }
.fc-item.k-open:hover { background: var(--soft-bg); opacity: 1; }
.fc-item:hover { filter: brightness(0.96); z-index: 1; }
.fc-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--urgent-bg); z-index: 1; pointer-events: none; }
.fc-fields .fc-track { height: auto; min-height: 44px; background: none; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border-radius: 7px; padding: 4px 8px; font-size: 12px; font-weight: 600; text-align: left; }
.fw-inner { min-width: 900px; }
.fw-row { display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.fw-row:last-child { border-bottom: none; }
.fw-cell { padding: 8px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fw-cell.today { background: var(--soft-bg); }
.fw-head { font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--ink); }
.fw-head small { display: block; font-weight: 600; color: var(--muted); }
.fw-track { position: relative; height: 24px; border-radius: 5px; background: var(--draft-bg); overflow: hidden; }
.fw-seg { position: absolute; top: 0; bottom: 0; padding: 0; border-radius: 3px; min-width: 3px; }
.fw-seg.k-open { border-radius: 0; border-width: 1px 0; background: var(--surface); }
.fw-pct { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 4px; }
.fw-chips { display: flex; flex-direction: column; gap: 4px; }
.fm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.fm-dow { padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); text-align: center; }
.fm-day { min-height: 104px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: inherit; min-width: 0; }
.fm-day:nth-child(7n) { border-right: none; }
.fm-day:hover { background: var(--canvas); }
.fm-day.out { background: var(--canvas); color: var(--muted); }
.fm-day.today .fm-date { background: var(--primary); color: var(--on-primary); }
.fm-date { font-size: 13px; font-weight: 700; width: 26px; height: 26px; border-radius: var(--radius-chip); display: grid; place-items: center; }
.fm-pct { font-size: 13px; font-weight: 700; }
.fm-pct small { font-weight: 500; color: var(--muted); }
.fm-kinds { display: flex; flex-wrap: wrap; gap: 3px; }
.fm-kinds span { font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; line-height: 1.6; }
@media (max-width: 820px) { .fm-day { min-height: 74px; padding: 5px; } .fm-kinds, .fm-pct small { display: none; } .fm-pct { font-size: 12px; } }

/* ---------- schedule week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.day-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.day-col.today { border-color: var(--link); }
.day-col h3 { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.day-col h3 small { color: var(--muted); font-weight: 600; }
.ev { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; border-radius: 8px; background: var(--canvas); border-left: 4px solid var(--bar); text-decoration: none; color: inherit; font-size: 12.5px; min-width: 0; }
.ev:hover { outline: 1px solid var(--soft-border); }
.ev b { font-size: 13px; overflow-wrap: anywhere; }
.ev span { color: var(--muted); }
.ev.signup { border-left-color: var(--ok-text); }
.ev.cancelled b { text-decoration: line-through; }
.ev .pills { margin-top: 2px; }
.day-empty { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1180px) { .week { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); } }

/* ---------- detail layouts */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
.post-body { white-space: pre-line; font-size: 15px; line-height: 1.55; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; align-items: start; }
.price-table { border-collapse: collapse; font-size: 13.5px; }
.price-table td { padding: 2px 14px 2px 0; }
.amount.plus { color: var(--ok-text); font-weight: 700; }
.amount.minus { font-weight: 700; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px; margin-right: 6px; border: 1px solid var(--border); }
.accent-preview { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--canvas); color: var(--ink); }
.accent-preview .fake-nav { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; background: var(--side-active-bg); color: var(--side-active-text); font-size: 14px; font-weight: 650; align-self: flex-start; }
.item-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.item-row .seg a, .item-row .checks label span { min-height: 30px; }

/* ---------- family app preview */
.app-preview { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.app-notes { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.phone { width: 360px; max-width: 100%; border-radius: 44px; background: var(--phone-frame); padding: 10px; box-shadow: 0 16px 40px var(--shadow); flex: none; margin-inline: auto; }
.screen { border-radius: 35px; overflow: hidden; background: var(--canvas); color: var(--ink); display: flex; flex-direction: column; height: 700px; max-height: calc(100vh - 80px); min-height: 520px; position: relative; }
.screen-head { padding: 18px 16px 12px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.screen-head .t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.screen-head b { font-size: 15px; }
.screen-head .t span { font-size: 12px; color: var(--muted); }
.screen-head .tile { width: 32px; height: 32px; }
.screen-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; text-decoration: none; color: inherit; width: 100%; font-size: 14px; }
button.fcard:hover, a.fcard:hover { border-color: var(--soft-border); }
.fcard b { font-size: 14.5px; line-height: 1.3; }
.fcard .d { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.fcard.unread { border-left: 4px solid var(--primary); }
.fcard.urgent-card { border-color: var(--urgent-bg); }
.fbtn { min-height: 46px; border-radius: 10px; border: none; background: var(--primary); color: var(--on-primary); font-size: 14px; font-weight: 700; display: grid; place-items: center; padding: 0 14px; text-decoration: none; width: 100%; }
.fbtn.sec { background: var(--surface); color: var(--ink); border: 1px solid var(--input-border); }
.fbtn.sm { min-height: 36px; font-size: 13px; width: auto; }
.ptabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.ptabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); min-height: 44px; justify-content: center; text-decoration: none; border-radius: 8px; }
.ptabs a[aria-current="page"] { color: var(--tab-active); font-weight: 750; }
.urgent-banner { background: var(--urgent-bg); color: var(--urgent-text); padding: 10px 14px; font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; text-decoration: none; }
.day-h { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); padding: 6px 2px 0; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchips a, .pchips button { min-height: 34px; padding: 0 12px; border-radius: var(--radius-chip); border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.pchips a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pchips a.off { opacity: 0.45; text-decoration: line-through; pointer-events: none; }
.plabel { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.welcome { flex: 1; overflow-y: auto; padding: 28px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.welcome h2 { font-size: 24px; font-weight: 800; line-height: 1.15; }
.welcome .spacer { flex: 1; }
.pfield { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.pfield input, .pfield select, .pfield textarea { min-height: 44px; padding: 8px 12px; border-radius: var(--radius-control); border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; width: 100%; }
.pfield input[readonly] { background: var(--draft-bg); color: var(--draft-text); }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: var(--radius-chip); background: var(--track); border: 1px solid var(--input-border); }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: var(--radius-chip); background: var(--surface); border: 1px solid var(--input-border); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { left: 20px; }
.switch input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.6; }
