:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid var(--tf-brand-blue); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: 1.125rem; line-height: 1.3; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.site-width { width: min(calc(100% - 48px), 1060px); margin-inline: auto; }
.site-header { background: var(--tf-surface); border-bottom: 1px solid var(--tf-border); }
.header-inner, .brand, .account { display: flex; align-items: center; gap: 16px; }
.header-inner { justify-content: space-between; min-height: 76px; padding-block: 9px; }
.brand img { display: block; width: 140px; max-width: 100%; height: auto; }
.brand span { border-left: 1px solid var(--tf-border); padding-left: 16px; font-weight: 650; }
.muted { color: var(--tf-text-muted); }
.access-layout { display: grid; grid-template-columns: 1fr 1fr; margin: 52px auto 0; max-width: 940px; border: 1px solid var(--tf-border); border-radius: var(--tf-radius-lg); background: var(--tf-surface); overflow: hidden; box-shadow: var(--tf-shadow-soft); }
.access-card, .access-aside { padding: clamp(24px, 4vw, 52px); min-width: 0; }
.access-card h1 { margin: 18px 0 12px; }
.access-card form { display: grid; gap: 12px; margin-top: 26px; }
.access-card label { font-weight: 650; }
.access-card input { width: 100%; min-width: 0; min-height: 51px; padding: 11px 14px; border: 1px solid #859b97; border-radius: var(--tf-radius-sm); color: var(--tf-text-primary); background: var(--tf-surface); }
.access-card input[aria-invalid=true] { border-color: #ac3331; }
.code-field { letter-spacing: .21em; font-variant-numeric: tabular-nums; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border-radius: var(--tf-radius-sm); border: 1px solid transparent; min-height: 44px; line-height: 1.3; font-weight: 650; }
.primary { color: var(--tf-brand-white); background: var(--tf-brand-teal); min-height: 49px; }
.primary:hover { background: #003f3d; }
.secondary, .quiet { background: var(--tf-surface); border-color: var(--tf-border); color: var(--tf-brand-teal); }
.secondary:hover, .quiet:hover, .icon-button:hover { background: var(--tf-surface-alt); }
.text-button { color: var(--tf-brand-teal); font-weight: 650; padding: 8px 0; min-height: 44px; border: 0; background: transparent; text-align: left; text-decoration: underline; text-underline-offset: .2em; }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; }
.recovery-after-code { justify-self: start; }
.feedback { border-left: 3px solid #ac3331; background: #fff0ef; color: #822d2a; padding: 9px 12px; margin-top: 16px; border-radius: 4px; }
.feedback[data-tone=info] { border-color: var(--tf-brand-teal); background: var(--tf-surface-alt); color: var(--tf-brand-teal); }
#recovery { display: grid; gap: 16px; margin-top: 16px; }
.preview-note { font-size: .875rem; padding: 10px 12px; border-radius: var(--tf-radius-sm); background: var(--tf-surface-alt); }
.access-aside { display: grid; align-items: center; background: var(--tf-brand-teal); color: var(--tf-brand-white); }
.access-aside h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); letter-spacing: -.03em; margin: 19px 0 8px; }
.icon-tile { display: grid; width: 44px; height: 44px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--tf-surface-alt); color: var(--tf-brand-teal); }
.access-aside .icon-tile { color: white; background: #ffffff22; }
.mini-agenda { margin-top: 27px; background: #ffffff12; border: 1px solid #ffffff44; padding: 16px; border-radius: var(--tf-radius-md); }
.mini-agenda > div, .mini-agenda p { display: flex; align-items: center; gap: 12px; }
.mini-agenda p { padding-top: 10px; margin-top: 10px; border-top: 1px solid #ffffff44; }
.mini-agenda strong { color: #c8f7e6; }
.review { max-width: 940px; margin: 20px auto 32px; font-size: .9rem; color: var(--tf-text-muted); }
.review summary { cursor: pointer; width: fit-content; max-width: 100%; padding-block: 8px; }
.review-body { padding: 12px 16px; border: 1px dashed #a3b5b2; border-radius: var(--tf-radius-sm); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.review-actions .button { font-size: .85rem; }
#agenda { margin-top: 40px; }
.agenda-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.agenda-header p { margin-top: 7px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--tf-surface-alt); border: 1px solid var(--tf-border); }
.segmented button { border: 0; background: transparent; color: var(--tf-brand-teal); border-radius: 8px; padding: 8px 15px; min-height: 44px; font-weight: 650; }
.segmented button[aria-pressed=true], .day[aria-pressed=true] { background: var(--tf-brand-teal); color: white; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: start; }
.calendar-panel, .count-panel, .appointment, .schedule-message, dialog { background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius-md); }
.calendar-panel { padding: 19px; }
.calendar-heading, .calendar-nav, .count-panel, .appointment-top { display: flex; align-items: center; gap: 8px; }
.calendar-heading { justify-content: space-between; }
.calendar-heading h2::first-letter { text-transform: uppercase; }
.icon-button { display: grid; place-items: center; border: 1px solid var(--tf-border); background: var(--tf-surface); color: var(--tf-brand-teal); border-radius: 9px; width: 44px; height: 44px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 13px; }
.day { display: grid; place-items: center; min-width: 0; min-height: 65px; padding: 5px 0; border-radius: 8px; border: 1px solid var(--tf-border); background: var(--tf-surface); color: var(--tf-text-primary); font-size: .75rem; }
.day strong { font-size: 1rem; }
.day small { line-height: 1.1; font-size: .6875rem; min-height: 12px; }
#return-today { margin-top: 6px; }
.count-panel { padding: 14px 17px; gap: 12px; background: var(--tf-surface-alt); }
.count-panel strong { display: block; font-size: 1.6rem; line-height: 1; }
.schedule-heading { margin-block: 18px 12px; }
.schedule-heading h2::first-letter { text-transform: uppercase; }
.appointment, .schedule-message { padding: 17px; margin-bottom: 10px; }
.appointment-top { justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; }
.appointment h3 { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.appointment .clock { color: var(--tf-brand-teal); font-weight: 700; }
.line { display: flex; align-items: flex-start; gap: 8px; margin-top: 5px; overflow-wrap: anywhere; }
.line .icon { margin-top: .125em; color: var(--tf-brand-teal); }
.appointment ul { list-style: none; padding: 0; margin: 0; }
.appointment .text-button { margin-top: 6px; }
.schedule-message p { margin: 6px 0 0; }
dialog { color: var(--tf-text-primary); width: min(440px, calc(100% - 32px)); padding: 22px; }
dialog::backdrop { background: #0d0f1080; }
dialog form { margin-top: 15px; }
@media (max-width: 800px) {
  .site-width { width: min(calc(100% - 32px), 1060px); }
  .agenda-layout { grid-template-columns: 1fr; gap: 16px; }
  .access-layout { margin-top: 32px; }
}
@media (max-width: 590px) {
  .header-inner { min-height: 64px; }
  .brand { gap: 7px; flex-wrap: wrap; }
  .brand img { width: 98px; }
  .brand span { font-size: .825rem; padding-left: 7px; }
  .access-layout { grid-template-columns: 1fr; margin-top: 24px; }
  .access-aside { display: none; }
  #agenda { margin-top: 24px; }
  .agenda-header { flex-wrap: wrap; margin-bottom: 16px; }
  .calendar-panel { padding: 12px; }
  .appointment { padding: 14px; }
}

#appointment-dialog { width: min(790px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: clamp(14px, 3vw, 24px); overscroll-behavior: contain; }
.detail-heading { margin-bottom: 14px; }
.detail-heading h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); overflow-wrap: anywhere; }
#appointment-detail { display: grid; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-section { min-width: 0; padding: clamp(10px, 2vw, 14px); border: 1px solid var(--tf-border); border-radius: var(--tf-radius-sm); }
.detail-section:first-child { background: var(--tf-surface-alt); }
.detail-grid .detail-section { background: var(--tf-surface); }
.detail-section h3, .action-review h4 { margin: 0 0 6px; font-size: 1rem; }
.detail-field { margin-top: 6px; line-height: 1.35; }
.detail-field > div { min-width: 0; }
.detail-field small { display: block; color: var(--tf-text-muted); font-size: .78rem; }
.detail-field span { display: block; font-weight: 600; white-space: pre-line; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-actions button { text-align: center; }
.action-review { margin-top: 12px; padding: 12px; border: 1px solid var(--tf-border); border-radius: var(--tf-radius-sm); background: var(--tf-surface-alt); }
#agenda-feedback { margin-bottom: 20px; }
@media (max-width: 590px) { .detail-grid { grid-template-columns: 1fr; } }
