:root {
  --ink: #16181a; --paper: #f3f1ec; --white: #fff; --muted: #5a5d60;
  --line: #e6e3dc; --outline: #a6a39a; --yellow: #ffc83d; --green: #1f7a4d;
  --orange: #a7470a; --red: #b42318;
  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); font: 500 1rem/1.35 var(--sans); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1, h2, strong { font-weight: 800; }
h1 { font-size: 1.625rem; letter-spacing: -.03em; }
h2 { font-size: 1.125rem; letter-spacing: -.02em; }
.mono { font-family: var(--mono); }
.eyebrow, .legend { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.topbar { min-height: 76px; padding: 12px clamp(16px, 2.7vw, 32px); background: var(--ink); color: var(--paper); display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; }
.brand, #days, .account { display: flex; gap: 8px; align-items: center; }
.brand { margin-right: auto; gap: 12px; }
.brand strong { display: block; font-size: 1.375rem; letter-spacing: -.02em; }
.mark { display: inline-flex; justify-content: flex-end; align-items: center; flex: 0 0 92px; height: 36px; padding: 0 14px; border: 3px solid var(--paper); border-radius: 20px; font-weight: 800; font-size: 1.125rem; letter-spacing: -.02em; }
.mark span { color: var(--yellow); }
.subtitle { display: block; color: #b3b5b7; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.day, .pill { min-height: 44px; border: 2px solid var(--outline); border-radius: 24px; padding: 0 12px; background: var(--white); color: var(--ink); font-weight: 700; font-size: .875rem; }
.day { padding: 0 16px; font-size: 1rem; }
.topbar button { background: transparent; border-color: #74787b; color: var(--paper); }
.topbar button[aria-pressed=true] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.account { font-size: .75rem; color: #c1c4c5; }
.account span { max-width: 14ch; overflow-wrap: anywhere; }
.notices { max-width: 1560px; margin: 0 auto; }
#notice { margin: 12px clamp(12px, 2.35vw, 28px) 0; padding: 10px 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--white); }
#notice.error { color: var(--red); border-color: var(--red); }
#notice.success { color: #14532d; border-color: var(--green); }
#notice button { margin-left: 10px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 24px; padding: 20px clamp(12px, 2.35vw, 28px); max-width: 1560px; margin: auto; min-height: calc(100dvh - 76px); align-items: stretch; }
.schedule { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.open { --status: var(--green); }
.closed { --status: var(--orange); }
.full { --status: var(--muted); }
.legend span::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: var(--status); }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.slots > p { grid-column: 1 / -1; }
.slot-wrap { min-width: 0; position: relative; display: grid; }
.slot { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; width: 100%; min-height: 150px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--white); }
.slot.closed { background: #fbeadf; border-color: #e9b48c; }
.slot.full { background: #eceae5; }
.slot.selected { background: var(--ink); color: var(--paper); border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.slot-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.time { font-size: clamp(1.65rem, 2.85vw, 2.125rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.tag, .badge { font: 500 .6875rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 5px 8px; border-radius: 12px; }
.tag { color: var(--white); background: var(--status); }
.slot-description { font-size: .9375rem; overflow-wrap: anywhere; }
.slot-count { font-size: .6875rem; letter-spacing: .03em; }
.slot-meter { margin-top: auto; appearance: none; display: block; width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 4px; background: var(--line); }
.slot.selected .slot-meter { background: #3a3d40; }
.slot-meter::-webkit-progress-bar { background: transparent; }
.slot-meter::-webkit-progress-value { background: var(--status); }
.slot-meter::-moz-progress-bar { background: var(--status); }
.slot-wrap.blocked .slot { padding-bottom: 39px; }
.inspect { position: absolute; bottom: 3px; right: 8px; min-height: 35px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: .8125rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.slot.selected + .inspect { color: var(--paper); }
.panel { border: 2px solid var(--line); background: var(--white); border-radius: 16px; }
.roster { flex: 1; padding: 14px 16px; min-height: 150px; }
#roster { margin-top: 8px; }
.row { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; padding: 6px 0; min-height: 52px; border-bottom: 1px solid var(--line); }
.row-label { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.row-actions, .inline-step { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.badge.paid { background: #dcefe4; color: #14532d; }
.badge.pending { background: #fff1c2; color: #6b4e00; }
.danger { border-color: var(--red); color: var(--red); }
.confirm-danger { border-color: var(--red); background: var(--red); color: var(--white); }
.confirm-paid { border-color: var(--green); background: var(--green); color: var(--white); }
.prompt-danger { color: var(--red); }
.prompt-paid { color: #14532d; }
.inline-step button { width: 44px; padding: 0; font-size: 1.25rem; }
.inline-step output { min-width: 3.25rem; text-align: center; font-weight: 800; }
.management { margin-top: 12px; }
.management form { display: grid; gap: 8px; }
.booking { padding: 20px; border-radius: 20px; min-width: 0; }
#booking-form, .receipt { display: flex; flex-direction: column; min-height: 100%; gap: 12px; }
#booking-title { margin-top: 2px; font-size: 1.5rem; letter-spacing: -.03em; }
fieldset { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
label, .field { display: flex; flex-direction: column; gap: 5px; }
label, .label { font-size: .875rem; font-weight: 700; }
input { width: 100%; height: 48px; padding: 0 12px; border: 2px solid var(--outline); border-radius: 12px; background: var(--paper); font-size: 1.0625rem; }
input:disabled, fieldset button:disabled { opacity: .65; }
.stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stepper button { width: 52px; height: 52px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); font-size: 1.625rem; font-weight: 700; }
.stepper output { min-width: 2.5rem; text-align: center; font-size: 2rem; font-weight: 800; }
#capacity { margin-left: auto; font-size: .8125rem; color: var(--muted); }
.payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.payment-options button { min-height: 48px; padding: 5px 8px; border: 2px solid var(--outline); border-radius: 12px; background: var(--white); font-size: .9375rem; font-weight: 700; }
.payment-options [aria-pressed=true] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.payment-options [data-paid=true][aria-pressed=true] { background: var(--green); border-color: var(--green); }
.total { margin-top: auto; padding-top: 10px; border-top: 2px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; color: var(--muted); }
.total strong { color: var(--ink); font-size: 1.875rem; letter-spacing: -.03em; }
.primary { min-height: 60px; padding: 8px 14px; width: 100%; border: 0; border-radius: 32px; background: var(--yellow); color: var(--ink); font-size: 1.125rem; font-weight: 800; }
.primary:disabled { color: var(--muted); background: var(--line); }
.primary.dark { margin-top: auto; background: var(--ink); color: var(--paper); }
.receipt { gap: 14px; }
.receipt h2 { font-size: 1.75rem; line-height: 1.05; }
.receipt p { overflow-wrap: anywhere; }
#receipt-details { display: grid; gap: 6px; }
.checkmark { background: var(--green); color: var(--white); border-radius: 50%; }
body:has(#login-panel:not([hidden])) { min-height: 100dvh; display: flex; flex-direction: column; }
main:has(> #login-panel:not([hidden])) { flex: 1; display: grid; place-items: center; padding: 28px 12px; }
.login { width: min(100%, 410px); padding: 20px; }
.login form { display: grid; gap: 12px; margin-top: 12px; }
@media (hover: hover) {
  .slot:not(:disabled):not(.selected):hover, .payment-options button:not(:disabled):not([aria-pressed=true]):hover, .pill:not(:disabled):hover { border-color: currentColor; }
  .primary:not(:disabled):not(.dark):hover { background: #f5b91c; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; gap: 14px; min-height: 0; }
  .booking { min-height: 420px; }
  .inspect { min-height: 44px; }
  .slot-wrap.blocked .slot { padding-bottom: 48px; }
}
@media (max-width: 540px) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot { padding-inline: 9px; }
  .topbar { gap: 8px; }
  .brand { flex-basis: 100%; }
  .day { padding: 0 10px; font-size: .875rem; }
  .account { margin-left: auto; }
  .account span { max-width: 10ch; }
}
