:root {
  color-scheme: light; --ink: #14231f; --muted: #64736e; --line: #d9e2de; --paper: #f5f8f6; --card: #fff;
  --pine: #17634e; --pine-dark: #0c4938; --mint: #dff2ea; --red: #a23b3b; --shadow: 0 14px 42px rgb(18 42 34 / .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.025em; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.shell.narrow { width: min(900px, calc(100% - 32px)); }
.topbar, .public-header { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand > span:last-child { line-height: 1.25; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.brand-mark { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--pine); color: white; font-weight: 800; }
.staff-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .9rem; }
.staff-actions form { margin: 0; }
.text-button, .text-link, .back-button { border: 0; background: none; color: var(--pine); font-weight: 700; padding: 5px; text-decoration: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 58px 0 34px; }
.page-heading.compact { padding-bottom: 28px; }
.page-heading h1, .detail-hero h1 { margin: 7px 0 5px; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.03; }
.page-heading p:not(.eyebrow), .detail-hero p { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--pine); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.button, button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; border-radius: 10px; padding: 10px 17px; border: 1px solid transparent; font-weight: 750; text-decoration: none; transition: .16s ease; }
.primary { color: white; background: var(--pine); box-shadow: 0 7px 18px rgb(23 99 78 / .15); }
.primary:hover { background: var(--pine-dark); transform: translateY(-1px); }
.secondary { background: white; color: var(--ink); border-color: var(--line); }
.secondary:hover { border-color: #9db0a8; background: #fbfcfb; }
.danger { color: var(--red); }
button:disabled { cursor: wait; opacity: .65; transform: none !important; }
.wide { width: 100%; }
.schedule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 60px; }
.schedule-card, .card, .form-card, .panel, .share-card, .booking-card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.schedule-card { padding: 23px; border-radius: 16px; }
.schedule-card-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .84rem; }
.schedule-card h2 { margin: 23px 0 5px; font-size: 1.55rem; }
.schedule-card p { margin: 4px 0; color: var(--muted); }
.schedule-card .button { width: 100%; margin-top: 22px; }
.schedule-dates { color: var(--ink) !important; font-weight: 650; }
.status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 99px; text-transform: capitalize; font-weight: 800; font-size: .75rem; letter-spacing: .04em; }
.status.open { background: var(--mint); color: var(--pine-dark); }
.status.closed { background: #eceeed; color: #59645f; }
.empty-state { grid-column: 1/-1; min-height: 270px; display: grid; justify-items: center; align-content: center; text-align: center; border-radius: 18px; padding: 35px; }
.empty-state h2 { margin: 12px 0 3px; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.empty-icon, .state-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--pine); font-size: 1.4rem; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 10% 10%, #e2f1eb, transparent 35%), var(--paper); }
.login-card { width: min(440px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 70px rgb(18 42 34 / .12); }
.login-card .brand { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.login-copy { padding: 34px 0 18px; }
.login-copy h1 { margin: 7px 0 4px; font-size: 2.5rem; }
.login-copy p:not(.eyebrow) { margin: 0; color: var(--muted); }
.stack { display: grid; gap: 17px; }
label, legend { color: #344740; font-size: .9rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 45px; margin-top: 7px; border: 1px solid #cbd7d2; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: white; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgb(23 99 78 / .12); }
.optional { color: var(--muted); font-size: .78rem; font-weight: 500; }
.editor-form { display: grid; gap: 18px; padding-bottom: 70px; }
.form-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; border-radius: 16px; padding: 27px; }
.section-number, .booking-step > span { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--pine); background: var(--mint); font-weight: 850; }
.section-body { min-width: 0; }
.section-body > h2 { margin: 0 0 20px; font-size: 1.55rem; }
.section-help { margin: -13px 0 20px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-2 { grid-column: 1/-1; }
fieldset { margin: 24px 0 0; padding: 0; border: 0; }
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 9px; }
.day-pill input { position: absolute; opacity: 0; pointer-events: none; }
.day-pill span { display: grid; place-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); cursor: pointer; }
.day-pill input:checked + span { background: var(--pine); color: white; border-color: var(--pine); }
.day-pill input:focus-visible + span { outline: 3px solid rgb(23 99 78 / .2); }
.dynamic-list { display: grid; gap: 10px; }
.dynamic-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.dynamic-row input { margin: 0; }
.row-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #edf2ef; color: var(--muted); font-size: .82rem; font-weight: 800; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--muted); background: #f0f3f1; font-size: 1.25rem; }
.add-button { margin-top: 12px; padding: 8px 2px; border: 0; background: transparent; color: var(--pine); font-weight: 750; }
.closure-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr auto; gap: 10px; align-items: end; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfa; }
.closure-row .specific-date { grid-column: 1; }
.closure-row input, .closure-row select { min-height: 41px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #e6baba; border-radius: 9px; background: #fff0f0; color: #7d2525; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.detail-hero { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 50px 0 30px; }
.detail-actions { display: flex; gap: 9px; }
.detail-title-row { display: flex; align-items: center; gap: 15px; }
.share-card { display: grid; grid-template-columns: 1fr minmax(300px, 500px); gap: 30px; align-items: center; padding: 25px; border-radius: 16px; background: linear-gradient(120deg, #fff, #f0f8f5); }
.share-card h2 { margin: 4px 0; }
.share-card p:last-child { margin: 0; color: var(--muted); }
.share-control { display: flex; gap: 8px; }
.share-control input { margin: 0; background: white; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stats-row div { display: grid; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.stats-row strong { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.stats-row span { color: var(--muted); font-size: .8rem; }
.detail-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 18px; padding-bottom: 60px; }
.panel { min-width: 0; border-radius: 16px; padding: 23px; }
.panel-heading h2, .sidebar-panel h2 { margin: 4px 0 15px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.account-grid .panel h2 { margin: 4px 0 18px; }
.users-panel { margin-bottom: 60px; }
.user-list { border-top: 1px solid var(--line); }
.user-row { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.user-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--mint); color: var(--pine); font-weight: 850; }
.user-summary strong, .user-summary span { display: block; }
.user-summary span, .users-note, .form-hint { color: var(--muted); font-size: .82rem; }
.user-edit-form { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 15px; border-radius: 12px; background: var(--paper); }
.inline-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.form-hint { margin: 0; align-self: center; }
.users-note { margin: 15px 0 0; }
.success-alert { border-color: #a9d4c4; background: #ecf8f3; color: var(--pine-dark); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { padding: 10px; text-align: left; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 13px 10px; border-top: 1px solid var(--line); vertical-align: top; }
td small { display: block; margin-top: 2px; color: var(--muted); }
.table-empty { text-align: center; color: var(--muted); padding: 45px 10px; }
.sidebar-panel dl { margin: 0; }
.sidebar-panel dl > div { padding: 12px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
dd { margin: 3px 0 0; }
.sidebar-panel h3 { margin: 20px 0 8px; font-size: .9rem; }
.closure-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.closure-list li { padding: 10px; border-radius: 8px; background: var(--paper); }
.closure-list strong, .closure-list span { display: block; font-size: .82rem; }
.closure-list span, .muted { color: var(--muted); }
.public-page { min-height: 100vh; background: radial-gradient(circle at 90% 0%, #dff2ea, transparent 33%), var(--paper); }
.booking-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; }
.public-header { justify-content: center; }
.public-header .brand { pointer-events: none; }
.booking-intro { padding: 48px 10px 26px; text-align: center; }
.booking-intro h1 { margin: 8px 0 10px; font-size: clamp(2.35rem, 7vw, 4.2rem); line-height: 1.02; }
.booking-intro > p:not(.eyebrow) { width: min(590px, 100%); margin: 0 auto 18px; color: var(--muted); white-space: pre-line; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; background: rgba(255,255,255,.75); color: #42564f; font-size: .82rem; }
.privacy-note span { color: var(--pine); font-weight: 900; }
.booking-card { min-height: 260px; border-radius: 18px; padding: 28px; }
.loading { min-height: 200px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.loading span { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--pine); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.booking-step { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.booking-step h2 { margin: 2px 0 0; font-size: 1.6rem; }
.date-groups { display: grid; gap: 24px; }
.date-group { padding-top: 20px; border-top: 1px solid var(--line); }
.date-group h3 { margin: 0 0 12px; font-size: 1rem; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.time-button { min-height: 44px; border: 1px solid #bdd1c9; border-radius: 9px; background: white; color: var(--pine-dark); font-weight: 800; }
.time-button:hover, .time-button:focus-visible { color: white; background: var(--pine); border-color: var(--pine); }
.message-state, .confirmation { min-height: 230px; display: grid; justify-items: center; align-content: center; text-align: center; }
.message-state h2, .confirmation h2 { margin: 12px 0 2px; font-size: 1.8rem; }
.message-state p, .confirmation > p { margin: 3px 0; color: var(--muted); }
.back-button { margin: -5px 0 18px; }
.selection-summary { display: flex; align-items: center; gap: 13px; padding: 14px; margin-bottom: 25px; border-radius: 12px; background: var(--mint); }
.selection-summary strong, .selection-summary span { display: block; }
.selection-summary span { color: var(--muted); font-size: .86rem; }
.calendar-tile { width: 46px; height: 46px; display: grid !important; place-items: center; border-radius: 9px; color: white !important; background: var(--pine); font-weight: 850; text-transform: uppercase; }
.privacy-small { text-align: center; color: var(--muted); font-size: .8rem; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--pine); color: white; font-size: 1.7rem; margin-bottom: 15px; }
.confirmation-details { width: min(390px, 100%); display: grid; padding: 17px; margin: 17px 0; border-radius: 12px; background: var(--paper); }
.confirmation-details strong { font-size: 1.05rem; }
.confirmation-details small { margin-top: 5px; color: var(--muted); }
footer { padding: 22px 0 40px; text-align: center; color: var(--muted); font-size: .8rem; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); }
@media (max-width: 820px) {
  .schedule-grid { grid-template-columns: 1fr 1fr; } .detail-grid { grid-template-columns: 1fr; }
  .share-card { grid-template-columns: 1fr; } .closure-row { grid-template-columns: 1fr 1fr; } .closure-row .icon-button { grid-column: 2; justify-self: end; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .page-heading, .detail-hero { align-items: stretch; flex-direction: column; padding-top: 38px; }
  .page-heading .button, .detail-hero .button { width: 100%; } .detail-actions { flex-direction: column; width: 100%; } .schedule-grid { grid-template-columns: 1fr; }
  .staff-actions > span { display: none; } .form-card { grid-template-columns: 1fr; padding: 20px; } .section-number { width: 30px; height: 30px; }
  .field-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } .weekday-row { grid-template-columns: repeat(4, 1fr); }
  .closure-row { grid-template-columns: 1fr; } .closure-row .specific-date, .closure-row .icon-button { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; } .form-actions .button, .form-actions button { width: 100%; }
  .detail-title-row { align-items: flex-start; flex-direction: column; gap: 6px; } .stats-row { grid-template-columns: 1fr 1fr; }
  .share-control { flex-direction: column; } .time-grid { grid-template-columns: repeat(2, 1fr); } .booking-card { padding: 20px; }
  .booking-intro { padding-top: 36px; } .privacy-note { border-radius: 12px; text-align: left; }
  .user-row { grid-template-columns: auto 1fr; } .user-row > .edit-user { grid-column: 1 / -1; width: 100%; } .user-edit-form { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .inline-actions { grid-column: auto; flex-direction: column; } .inline-actions .button { width: 100%; }
}
