/* Andarax Labs — site styles. No external resources; fonts are self-hosted. */

@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* ---- tokens: dark is the default; light is opt-in via the toggle ---- */
:root {
  --bg: #0d1211;
  --bg-2: #111817;
  --surface: #151d1c;
  --surface-2: #1a2423;
  --line: #24312f;
  --line-strong: #33433f;
  --text: #ebe6db;
  --text-2: #c4c2b8;
  --muted: #8d9792;
  --accent: #6ad8b9;          /* water */
  --accent-strong: #8fe5cd;
  --accent-ink: #04211a;
  --accent-soft: rgba(106, 216, 185, 0.13);
  --clay: #d08a62;            /* terracotta */
  --clay-soft: rgba(208, 138, 98, 0.16);
  --amber: #d9b25c;
  --amber-soft: rgba(217, 178, 92, 0.16);
  --danger: #e38b7a;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 20px 40px -24px rgba(0,0,0,0.6);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #efebe2;
  --surface: #fbf9f4;
  --surface-2: #f6f3ec;
  --line: #e0d9cb;
  --line-strong: #cfc6b4;
  --text: #142019;
  --text-2: #33403a;
  --muted: #66716b;
  --accent: #1d7a72;
  --accent-strong: #15625b;
  --accent-ink: #f4fbfa;
  --accent-soft: rgba(29, 122, 114, 0.1);
  --clay: #b25a37;
  --clay-soft: rgba(178, 90, 55, 0.12);
  --amber: #a87b17;
  --amber-soft: rgba(168, 123, 23, 0.13);
  --danger: #b2412c;
  --shadow: 0 1px 2px rgba(20,32,25,0.04), 0 18px 36px -24px rgba(20,32,25,0.25);
  color-scheme: light;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0 0 1em; }
em { font-style: italic; }
img, svg { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.eyebrow {
  font: 500 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin: 0 0 18px;
}
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em;
  font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 1.0;
}
.display em, .display-sm em { color: var(--accent); }
.display-sm {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.08;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 40em; line-height: 1.65; }

/* ---- logo ---- */
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark .lm-a { fill: none; stroke: var(--text); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.logo-mark .lm-c { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.logo-mark .lm-d { fill: var(--accent); }

/* ---- header / footer ---- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.wordmark { font: 600 1.13rem/1 var(--sans); letter-spacing: -0.03em; }
.wm-labs { font-weight: 400; color: var(--muted); margin-left: 0.28em; }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a { color: var(--text-2); text-decoration: none; font-size: 0.93rem; }
.header-nav a:hover { color: var(--text); }
.header-nav form { margin: 0; }
@media (max-width: 680px) { .header-nav a { display: none; } }
.theme-toggle {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--text-2); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
:root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.875rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.foot-brand .logo-mark { width: 22px; height: 22px; }

/* ---- buttons & forms ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 0.95rem/1 var(--sans); padding: 13px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 8px 13px; font-size: 0.85rem; }
.btn-lg { padding: 17px 28px; font-size: 1.05rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.field em { font-style: normal; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.field-inline select { width: auto; padding: 8px 42px 8px 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > .field { flex: 1 1 180px; }
.row-end { align-items: flex-end; }
.grow { flex: 2 1 260px !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { background: var(--clay-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--clay) 45%, transparent); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.flash { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.93rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .panel { padding: 20px; } }

/* ---- homepage ---- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.narrow .wrap { max-width: 520px; }
.section-head { max-width: 760px; margin-bottom: 52px; }

.hero { position: relative; overflow: hidden; padding: clamp(80px, 13vw, 168px) 0 clamp(72px, 10vw, 128px); }
.hero-inner { position: relative; z-index: 1; }
.hero .display { margin-bottom: 28px; }
.hero .lede { margin-bottom: 36px; }
.channels {
  position: absolute; top: 0; bottom: 0; right: 0; left: 46%; width: auto; height: 100%; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 25%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 25%, #000 60%);
  opacity: .9;
}
.channels .ch path { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.channels .ch-flow path {
  fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 3 22; opacity: .85; animation: flow 6s linear infinite;
}
.channels .ch-flow path:nth-child(2) { animation-duration: 8s; }
.channels .ch-flow path:nth-child(3) { animation-duration: 7s; }
.channels .ch-node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
@keyframes flow { to { stroke-dashoffset: -250; } }
@media (prefers-reduced-motion: reduce) { .channels .ch-flow path { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 900px) { .channels { left: 0; opacity: .28; } }

.legacy-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; background: var(--bg-2); }
.legacy-strip .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.strip-label { font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--clay); white-space: nowrap; }
.mono-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 0.85rem/1.4 var(--mono); color: var(--muted); }
.mono-list li::before { content: "▸ "; color: var(--line-strong); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px 32px;
  position: relative; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-num { font: 500 0.8rem/1 var(--mono); color: var(--accent); display: block; margin-bottom: 36px; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--text-2); margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; }
.steps li { padding: 4px 32px 0 0; position: relative; counter-increment: s; }
.steps li::before {
  content: "0" counter(s); font: 500 0.8rem/1 var(--mono); color: var(--muted); display: block; margin-bottom: 14px;
}
.steps li::after { content: ""; position: absolute; top: 5px; left: 34px; right: 22px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.steps li:last-child::after { display: none; }
.step-k { font-family: var(--serif); font-size: 2rem; display: block; margin-bottom: 10px; }
.steps p { color: var(--text-2); margin: 0; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps li { padding: 0 0 0 0; }
  .steps li::after { display: none; }
}

.story-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.story-body p { font-size: 1.1rem; color: var(--text-2); }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; gap: 24px; } }

.contact { border-top: 1px solid var(--line); background:
  radial-gradient(60% 80% at 85% 100%, var(--accent-soft), transparent 70%), var(--bg); }
.contact-inner .display { margin-bottom: 24px; }
.contact-inner .lede { margin-bottom: 34px; }

/* ---- scheduling ---- */
.gate h1 { margin-bottom: 10px; }
.gate form { margin-top: 22px; }
.sched-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.sched-head h1 { margin-bottom: 10px; }
.sched-head p { margin: 0; }
.sched-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.access-note { margin: 0; font-size: 0.85rem; display: flex; gap: 10px; }
@media (max-width: 700px) { .sched-meta { align-items: flex-start; } }

.week-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.week-tabs button {
  font: 500 0.88rem/1 var(--sans); padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-2); border: 1px solid var(--line);
}
.week-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 8px 12px; min-width: 0; }
.day.is-today { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.day-h { text-align: center; margin-bottom: 10px; line-height: 1.2; }
.day-h .dw { display: block; font: 500 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.day-h .dd { display: block; font-family: var(--serif); font-size: 1.45rem; margin-top: 4px; }
.day-empty { color: var(--muted); text-align: center; font-size: 0.8rem; padding: 12px 0; }
.slots { display: flex; flex-direction: column; gap: 4px; }
.slot {
  font: 500 0.78rem/1 var(--mono); letter-spacing: -0.01em; padding: 8px 2px; border-radius: 7px; cursor: pointer;
  background: var(--accent-soft); color: var(--text); border: 1px solid transparent; text-align: center; white-space: nowrap;
  transition: background-color .1s, border-color .1s;
}
.slot:hover { border-color: var(--accent); }
.slot.busy { background: transparent; color: color-mix(in srgb, var(--muted) 45%, transparent); cursor: default; border: 1px dashed color-mix(in srgb, var(--line) 80%, transparent); }
.slot-div { font: 500 0.62rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); text-align: center; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; grid-column: 1 / -1; }
.day.is-past { opacity: .5; }
.slot.busy:hover { border-color: transparent; }
.slot.sel { background: var(--accent); color: var(--accent-ink); }
.slot.sel-mid { border-radius: 3px; }
@media (max-width: 860px) {
  .week { grid-template-columns: 1fr; }
  .day { padding: 14px; }
  .day-h { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .day-h .dd { font-size: 1.3rem; margin: 0; }
  .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .day.all-busy .slots { display: none; }
  .day.is-past { display: none; }
  .day-empty { padding: 4px 0 0; text-align: left; }
}

.picker { position: sticky; bottom: 16px; margin-top: 20px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; align-items: start; z-index: 3; }
.picker-sel .eyebrow { margin-bottom: 10px; }
.sel-when { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin-bottom: 14px; }
.sel-end { margin-bottom: 10px; max-width: 260px; }
.req-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req-form .field-wide, .req-form .alert, .req-actions { grid-column: 1 / -1; }
.req-form .alert { margin: 0; }
.req-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 860px) { .picker { grid-template-columns: 1fr; position: static; } .req-form { grid-template-columns: 1fr; } }
.done { margin-top: 20px; text-align: center; }
.done h2 { margin-bottom: 12px; }
#done-when { font-size: 1.1rem; }

/* ---- admin ---- */
.admin .wrap { max-width: 1240px; }
.section.admin { padding-top: 40px; }
.admin-head { margin-bottom: 24px; }
.admin-head .eyebrow { margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px 12px; color: var(--muted); text-decoration: none; font-size: 0.93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.admin .flash, .admin .alert { margin-bottom: 20px; }
.h-sub { font-size: 1.05rem; font-weight: 600; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.panel .h-sub { margin-top: 0; }
.count { font: 500 0.75rem/1 var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; color: var(--muted); }
.empty { color: var(--muted); padding: 18px 0; border-top: 1px dashed var(--line); }

.req { display: flex; justify-content: space-between; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 10px; }
.req-pending { border-left-color: var(--amber); }
.req-confirmed { border-left-color: var(--accent); }
.req-declined { opacity: .65; }
.req p { margin: 0 0 6px; }
.req-when { font-weight: 600; }
.req-note { color: var(--text-2); white-space: pre-wrap; background: var(--bg-2); border-radius: 8px; padding: 10px 12px; margin: 10px 0 !important; }
.req-meta { font-size: 0.75rem; color: var(--muted); margin: 0 !important; }
.req-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.req-actions form { margin: 0; }
@media (max-width: 700px) { .req { flex-direction: column; } }
.badge { display: inline-block; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .08em; font-size: 0.68rem; margin-right: 6px; background: var(--surface-2); }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-confirmed { background: var(--accent-soft); color: var(--accent); }
.history summary { cursor: pointer; color: var(--muted); margin: 34px 0 14px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.two-col .h-sub:first-child { margin-top: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.days { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.days legend { font-size: 0.8rem; color: var(--muted); font-weight: 500; margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.88rem; }
.chip input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.list-row form { margin: 0; }
.code-row.is-off { opacity: .55; }
.code-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.code-val { color: var(--accent); font-size: 0.95rem; word-break: break-all; }
.code-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .list-row { flex-direction: column; align-items: flex-start; } .code-actions { justify-content: flex-start; } }
.settings .panel { margin-bottom: 18px; }
.settings .row + .row { margin-top: 14px; }
.settings .muted.small { margin: 14px 0 0; }

/* admin schedule grid */
.grid-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.grid-toolbar p { margin: 0; }
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-nav strong { min-width: 190px; text-align: center; font-weight: 600; }
.legend { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.8rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 7px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-strong); }
.grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.agrid { display: grid; grid-template-columns: 76px repeat(7, minmax(86px, 1fr)); gap: 2px; padding: 0 8px 8px 0; min-width: 700px; user-select: none; -webkit-user-select: none; touch-action: none; }
.agrid .gh { position: sticky; top: 0; background: var(--surface); padding: 12px 6px 10px; text-align: center; font-size: 0.8rem; cursor: pointer; border-radius: 6px; }
.agrid .gh:hover { color: var(--accent); }
.agrid .gh.today { color: var(--accent); font-weight: 600; }
.agrid .gh.corner { cursor: default; }
.agrid .gt { font: 400 0.72rem/1 var(--mono); color: var(--muted); padding: 0 10px 0 0; display: flex; align-items: center; justify-content: flex-end; height: 22px; }
.agrid .gt.hour { color: var(--text-2); }
.agrid .gc { height: 22px; border-radius: 4px; cursor: pointer; transition: filter .1s; }
.agrid .gc:hover { filter: brightness(1.25); }
.agrid .gc.hour { margin-top: 3px; }
.agrid .gt.hour { margin-top: 3px; }
.lg-open, .gc.s-open { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.lg-rule, .gc.s-rule { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--clay) 35%, var(--surface)) 0 4px, var(--surface-2) 4px 8px); }
.lg-blocked, .gc.s-blocked { background: color-mix(in srgb, var(--clay) 60%, var(--surface)); }
.lg-opened, .gc.s-opened { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.lg-pending, .gc.s-pending { background: color-mix(in srgb, var(--amber) 65%, var(--surface)); }
.lg-confirmed, .gc.s-confirmed { background: var(--accent); }
.gc.s-past { background: var(--bg-2); cursor: default; opacity: .5; }
.gc.s-past:hover, .gc.s-none:hover { filter: none; }
.gc.s-none { background: transparent; cursor: default; }
.gc.painting { outline: 2px solid var(--text); outline-offset: -2px; }
