/* Yard arena calendar. The Sale Ring palette: ink, magenta, slate and silver on a pale ground; raised tiles and buttons. */
:root {
  color-scheme: light;
  --bg: #F6F4F7;
  --card: #ffffff;
  --ink: #1E1B22;
  --muted: #6A6470;
  --line: #E7E3EA;
  --navy: #1E1B22;
  --blue: #D0177A;
  --blue-d: #8F0E52;
  --red: #B3392B;
  --red-d: #7E2419;
  --flat: #D0177A;
  --jump: #B45309;
  --lunge: #6D3FC4;
  --lesson: #0b7268;
  --other: #5B6470;
  --closed: #1E1B22;
  --radius: 16px;
  --raise: 0 2px 0 #C9CED6, 0 12px 26px rgba(30, 27, 34, .12);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 var(--font); overflow-wrap: anywhere; }
h1, h2 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
a { color: var(--blue-d); font-weight: 600; }
:focus-visible { outline: 3px solid #f2a100; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { background: linear-gradient(180deg, #38323F, var(--navy)); color: #fff; box-shadow: 0 3px 0 #0C0A0E, 0 10px 22px rgba(30, 27, 34, .25); }
.top-in { max-width: 1500px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 800; flex: 1 1 auto; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; fill: #D0177A; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; order: 3; flex: 1 1 100%; }
.nav a { flex: 1 1 130px; text-align: center; color: #fff; text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.nav a.on { background: #fff; color: var(--navy); box-shadow: 0 3px 0 #C9CED6; }
.out { margin: 0; }
@media (min-width: 900px) {
  .brand { flex: 0 1 auto; }
  .nav { order: 0; flex: 1 1 auto; }
  .nav a { flex: 0 0 auto; padding: 10px 18px; }
}

/* ---------- layout ---------- */
.wrap { max-width: 1500px; margin: 0 auto; padding: 18px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--raise); }
.pad { padding: 20px; }
.page-h { font-size: 28px; }
.page-h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.count { background: var(--navy); color: #fff; border-radius: 99px; padding: 2px 12px; font-size: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; align-items: start; }
.card h2 { font-size: 21px; margin-bottom: 12px; }
.card h2.sub { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- buttons ---------- */
.btn { font: 700 17px/1.2 var(--font); min-height: 48px; padding: 11px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; transition: transform .06s ease; }
.btn:active { transform: translateY(2px); }
.btn-primary { background: linear-gradient(180deg, #E0318F, var(--blue)); color: #fff; border-color: var(--blue-d); box-shadow: 0 4px 0 var(--blue-d), 0 8px 16px rgba(208, 23, 122, .28); }
.btn-primary:active { box-shadow: 0 2px 0 var(--blue-d); }
.btn-soft { background: linear-gradient(180deg, #fff, #F1EEF3); color: var(--ink); border-color: #C9CED6; box-shadow: 0 4px 0 #C9CED6, 0 8px 14px rgba(30, 27, 34, .1); }
.btn-soft:active { box-shadow: 0 2px 0 #C9CED6; }
.btn-danger { background: linear-gradient(180deg, #C84A3B, var(--red)); color: #fff; border-color: var(--red-d); box-shadow: 0 4px 0 var(--red-d), 0 8px 16px rgba(179, 57, 43, .25); }
.btn-danger:active { box-shadow: 0 2px 0 var(--red-d); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); min-height: 44px; padding: 8px 14px; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-weight: 700; margin-top: 6px; }
.form input:not([type=checkbox]), .form select, .cal-nav input, .linkbox input { font: 17px var(--font); color: var(--ink); width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #B9B3BE; border-radius: 12px; background: #fff; box-shadow: inset 0 2px 3px rgba(30, 27, 34, .08); }
.form input:disabled { background: #F1EEF3; color: var(--muted); }
.form .btn { margin-top: 10px; align-self: flex-start; }
.form .btn-wide { align-self: stretch; }
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; }
.check input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: var(--blue); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; align-items: end; }
.pair > div { display: flex; flex-direction: column; gap: 8px; }
.hint { color: var(--muted); font-size: 16px; }
.err { background: #F8E4E1; color: #7E2419; border: 1px solid #E5B1AA; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.flash { border-radius: 12px; padding: 12px 16px; font-weight: 600; border: 1px solid; }
.flash-ok { background: #FCE4F1; border-color: #F0A8CF; color: #8F0E52; }
.flash-bad { background: #F8E4E1; border-color: #E5B1AA; color: #7E2419; }

/* ---------- signed-out screens ---------- */
.gate .wrap { max-width: 520px; padding-top: 28px; }
.gate-card { padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.gate-head { background: linear-gradient(180deg, #38323F, var(--navy)); color: #fff; margin: -24px -20px 4px; padding: 24px 20px; border-radius: var(--radius) var(--radius) 0 0; }
.gate-head svg { width: 44px; height: 44px; fill: #D0177A; }
.gate-head h1 { font-size: 28px; }
.eyebrow { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; color: #C9CED6; margin: 6px 0 2px; }
.lead { font-size: 18px; }
.alt { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.tile { border-radius: var(--radius); padding: 16px 18px; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.tile-k { font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; opacity: .92; }
.tile-v { font-size: 22px; line-height: 1.25; }
.tile-now { background: linear-gradient(160deg, #E0318F, #B01166); box-shadow: 0 5px 0 #8F0E52, 0 14px 26px rgba(208, 23, 122, .3); }
.tile-free { background: linear-gradient(160deg, #6B7582, #3A4049); box-shadow: 0 5px 0 #24282E, 0 14px 26px rgba(58, 64, 73, .3); }
.tile-mine { background: linear-gradient(160deg, #3A3441, #1E1B22); box-shadow: 0 5px 0 #0C0A0E, 0 14px 26px rgba(30, 27, 34, .3); }

/* ---------- calendar ---------- */
.cal { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cal-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.tab { font: 700 17px var(--font); min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid #C9CED6; background: linear-gradient(180deg, #fff, #F1EEF3); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 #C9CED6; }
.tab[aria-selected=true] { background: linear-gradient(180deg, #38323F, var(--navy)); color: #fff; border-color: #0C0A0E; box-shadow: 0 4px 0 #0C0A0E; }
.cal-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 auto; justify-content: flex-end; }
.cal-nav .btn { flex: 0 0 auto; }
.cal-nav input { flex: 1 1 170px; width: auto; max-width: 220px; }
@media (max-width: 560px) { .cal-nav { justify-content: stretch; } .cal-nav .btn { flex: 1 1 auto; } .cal-nav input { flex: 1 1 100%; max-width: none; } }
.key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 16px; font-weight: 600; }
.key li { display: flex; align-items: center; gap: 7px; }
.dot { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.note { background: #fff4d6; border: 1px solid #e6c15a; color: #5b4300; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.t-flat { background: var(--flat); } .t-jump { background: var(--jump); } .t-lunge { background: var(--lunge); }
.t-lesson { background: var(--lesson); } .t-other { background: var(--other); } .t-closed { background: var(--closed); }

.grid { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: clip; background: #fff; }
.loading { padding: 24px; color: var(--muted); font-weight: 600; grid-column: 1 / -1; }
.gh { position: sticky; top: 0; z-index: 2; background: #F1EEF3; border-bottom: 2px solid #C9CED6; padding: 10px 6px; text-align: center; font-weight: 800; line-height: 1.2; }
.gh small { display: block; font-size: 15px; font-weight: 600; color: var(--muted); }
.gh.is-today { background: var(--navy); color: #fff; }
.gh.is-today small { color: #C9CED6; }
.gt { white-space: nowrap; padding: 12px 4px 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); border-top: 1px solid var(--line); background: #FAF9FB; }
.gc { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 5px; display: flex; flex-direction: column; gap: 5px; min-height: 58px; min-width: 0; }
.gc.past { background: repeating-linear-gradient(135deg, #F4F2F5 0 8px, #ECE9EE 8px 16px); }
.gt.hour, .gc.hour { border-top-color: #C9CED6; }
.chip { font: inherit; text-align: left; width: 100%; color: #fff; border: 0; border-radius: 10px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 3px 0 rgba(0, 0, 0, .28); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.chip b { font-size: 16px; line-height: 1.25; }
.chip span { font-size: 15px; line-height: 1.25; }
.chip.mine { outline: 3px solid #1E1B22; outline-offset: 1px; }
.add { font: 700 16px var(--font); width: 100%; flex: 1 1 auto; min-height: 44px; border: 2px dashed #C9CED6; border-radius: 10px; background: transparent; color: #4A4550; cursor: pointer; }
.add:hover { background: #FCE4F1; border-color: var(--blue); color: var(--blue-d); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.item { position: relative; padding: 16px 16px 16px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; overflow: hidden; }
.member { padding-left: 16px; }
.stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.item-main { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-main strong { font-size: 19px; }
.item-main span { color: var(--muted); }
.item form { margin: 0; }
.pills, .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acts { flex: 1 1 100%; }
.acts form { flex: 1 1 calc(50% - 8px); display: flex; }
.acts .btn { flex: 1; }
.pill { color: #fff; font-weight: 700; font-size: 15px; padding: 5px 12px; border-radius: 99px; }
.pill-ok { background: #5B6470; } .pill-warn { background: #b45309; } .pill-off { background: #6A6470; } .pill-blue { background: var(--blue-d); }
.empty { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.joincode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: #F1EEF3; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.joincode span { font-weight: 700; }
.joincode strong { font-size: 28px; letter-spacing: .12em; color: var(--navy); font-variant-numeric: tabular-nums; }
.arena-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.arena-row:first-of-type { border-top: 0; padding-top: 0; }
.arena-row input:not([type=checkbox]) { flex: 1 1 180px; width: auto; }
.arena-row label { margin: 0; }
.arena-row .btn { margin: 0; align-self: center; }
.linkbox { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border-color: #F0A8CF; background: #FEF4FA; }
.linkbox h2 { margin: 0; }

/* ---------- dialogs ---------- */
.sheet { border: 0; padding: 0; border-radius: 20px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; color: var(--ink); box-shadow: 0 30px 80px rgba(30, 27, 34, .45); }
.sheet::backdrop { background: rgba(30, 27, 34, .55); }
.sheet > .form { padding: 22px 20px; }
.sheet h2 { font-size: 24px; }
.when { font-size: 19px; font-weight: 700; color: var(--blue-d); }
.row-btn { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row-btn .btn { flex: 1 1 150px; margin: 0; align-self: auto; }
.facts { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); background: var(--navy); color: #fff; font-weight: 600; padding: 14px 18px; border-radius: 14px; box-shadow: 0 4px 0 #0C0A0E, 0 16px 34px rgba(30, 27, 34, .4); z-index: 20; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.top :focus-visible, .gate-head :focus-visible { outline-color: #fff; }
.install { padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-color: #F0A8CF; background: #FCE4F1; }
.install p { flex: 1 1 220px; font-weight: 700; color: #8F0E52; }
.install-btns { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 220px; }
.install-btns .btn { flex: 1 1 120px; }
.fieldwrap { display: flex; flex-direction: column; gap: 8px; }
