:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #667077;
  --line: #e5e9eb;
  --canvas: #f7f8f9;
  --surface: #fff;
  --mint: #dff4e8;
  --mint-ink: #145a3b;
  --booked: #d9dee2;
  --booked-ink: #39434a;
  --own: #f8dada;
  --own-ink: #8b3037;
  --closed: #f0f2f3;
  --blue: #2669b2;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #8bb8eb; outline-offset: 3px; }
a { color: inherit; }
.shell { width: min(100% - 48px, 1450px); margin-inline: auto; }

.site-header { background: rgba(255,255,255,.85); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; color: #fff; background: #1a2730; border-radius: 9px; font-size: 17px; letter-spacing: -.08em; }
.header-link { font-size: 13px; color: #3c4a53; text-decoration: none; }
.header-link:hover { color: var(--blue); }
.header-link span { margin-left: 3px; }
.admin-badge { padding: 4px 8px; background: #edf1f4; color: #59666e; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }

.hero { max-width: 940px; padding: 87px 0 58px; }
.eyebrow, .section-kicker { display: inline-block; color: #68757d; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 19px 0 22px; font-size: clamp(43px, 5.3vw, 80px); line-height: 1.06; font-weight: 700; letter-spacing: -.068em; }
.hero h1 span { color: #88949c; }
.hero p { max-width: 670px; margin: 0; color: #56636b; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.55; letter-spacing: -.015em; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; margin-top: 28px; color: var(--muted); font-size: 13px; }
.timezone-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: #e9edf0; border-radius: 999px; font-size: 12px; font-weight: 650; color: #36434b; white-space: nowrap; }
.tz-dot { width: 7px; height: 7px; border-radius: 50%; background: #419c75; }

.calendar-card, .schedule-panel { background: var(--surface); border: 1px solid #e7eaec; box-shadow: 0 13px 50px rgba(24, 39, 48, .045); border-radius: 20px; overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 31px 36px 21px; }
.calendar-toolbar h2, .panel-heading h2, .guide h2 { margin: 8px 0 0; font-size: clamp(25px, 2.6vw, 33px); line-height: 1.15; letter-spacing: -.045em; }
.week-range { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.week-controls { display: flex; align-items: center; gap: 7px; }
.text-button, .icon-button, .secondary-button, .primary-button, .danger-button { border: 0; border-radius: 10px; min-height: 42px; font-weight: 600; font-size: 13px; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.text-button { padding: 0 14px; background: #f0f3f5; color: #35434c; white-space: nowrap; }
.text-button:hover, .icon-button:hover, .secondary-button:hover { background: #e4eaf0; }
.icon-button { width: 42px; display: grid; place-items: center; background: #f0f3f5; color: #35434c; font-size: 27px; font-weight: 300; line-height: 1; }
.primary-button { background: #202b32; color: #fff; padding: 0 19px; }
.primary-button:hover { background: #3a4a53; transform: translateY(-1px); }
.secondary-button { background: #eff2f4; color: #33434b; padding: 0 17px; }
.danger-button { background: #f5e0e0; color: #922c36; padding: 0 18px; }
.danger-button:hover { background: #efcccc; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 0 36px 23px; color: #657078; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(0,0,0,.06); }
.legend-dot.free { background: var(--mint); }
.legend-dot.busy { background: var(--booked); }
.legend-dot.own { background: var(--own); border-color: #da898d; }
.legend-dot.closed { background: var(--closed); }
.mobile-scroll-hint { display: none; }
.status-line { min-height: 0; margin: 0; color: #627078; font-size: 13px; }
.calendar-card > .status-line:not(:empty) { padding: 0 36px 14px; }
.calendar-scroll { overflow: auto; max-height: min(77vh, 1040px); border-top: 1px solid var(--line); scrollbar-color: #cbd3d8 transparent; }
.calendar-grid { display: grid; grid-template-columns: 69px repeat(7, minmax(125px, 1fr)); grid-template-rows: 69px repeat(28, 46px); min-width: 944px; }
.calendar-corner, .day-header { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fcfdfd; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar-corner { left: 0; z-index: 4; color: #87939a; font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.day-header { gap: 4px; text-align: center; text-transform: capitalize; }
.day-header.today { background: #f0f7f4; }
.day-header.today strong { color: #216c4b; }
.day-name { color: #75818a; font-size: 11px; font-weight: 600; }
.day-header strong { color: #2c3940; font-size: 15px; font-weight: 650; letter-spacing: -.03em; }
.time-rail { position: sticky; left: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: center; padding-top: 9px; background: #fcfdfd; color: #8a959d; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.slot { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: #87939b; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 3px 5px; text-align: center; font-size: 11px; font-weight: 650; line-height: 1.15; transition: filter .15s ease; }
button.slot:hover { filter: brightness(.965); }
.slot-open { background: var(--mint); color: var(--mint-ink); }
.slot-booked { background: var(--booked); color: var(--booked-ink); }
.slot-mine { position: relative; background: var(--own); color: var(--own-ink); box-shadow: inset 0 0 0 2px #d68188; }
.slot-closed { background: var(--closed); color: #8a959b; }
.admin-page .slot-closed { background: #f2f4f5; }
.admin-page .slot-booked { background: #d4dbe1; color: #273942; }
.empty-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 36px; border-top: 1px solid var(--line); }
.empty-note[hidden] { display: none; }
.empty-note strong { font-size: 14px; }
.empty-note p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.guide { padding: 116px 0 104px; }
.guide-intro { margin-bottom: 30px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.guide article { min-height: 198px; padding: 29px; border-radius: 18px; border: 1px solid #e8ecee; background: #fff; }
.guide-number { display: inline-block; color: #95a1a9; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.guide h3 { margin: 23px 0 9px; font-size: 18px; letter-spacing: -.03em; }
.guide article p { margin: 0; color: #647078; font-size: 13px; line-height: 1.55; }
.privacy-note { margin: 23px 0 0; color: #66737a; font-size: 13px; line-height: 1.6; }
.site-footer { padding: 28px 0 34px; border-top: 1px solid #e4e8eb; color: #839097; font-size: 12px; }
.site-footer span { margin: 0 8px; }

.modal { width: min(100% - 32px, 480px); padding: 29px; border: 1px solid #e3e7ea; border-radius: 20px; box-shadow: 0 30px 90px rgba(18,33,44,.24); color: var(--ink); }
.modal::backdrop { background: rgba(27,37,44,.42); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.close-button { display: grid; place-items: center; width: 33px; height: 33px; border: 0; border-radius: 9px; background: #eff2f4; color: #53616b; font-size: 24px; font-weight: 300; }
.close-button:hover { background: #e2e8eb; }
.modal h2 { margin: 23px 0 7px; font-size: 29px; letter-spacing: -.045em; line-height: 1.15; }
.selected-time { margin: 0 0 24px; color: #5b6870; font-size: 15px; line-height: 1.45; }
.modal form label, .range-form label { display: flex; flex-direction: column; gap: 8px; color: #39474f; font-size: 13px; font-weight: 650; }
.modal form label { margin-top: 17px; }
.modal form label span { color: #909ba2; font-weight: 400; }
.modal input, .range-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #d9e0e4; border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; }
.modal input::placeholder { color: #a1abb1; }
.form-hint { color: #7a858c; font-size: 12px; line-height: 1.55; }
.form-error { padding: 10px 12px; border-radius: 9px; background: #fae5e5; color: #8d2f38; font-size: 12px; line-height: 1.5; }
.form-error[hidden] { display: none; }
.modal .primary-button { width: 100%; margin-top: 12px; height: 48px; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.booking-success { text-align: center; }
.booking-success[hidden] { display: none; }
.booking-success h2 { margin-top: 15px; }
.booking-success .selected-time { margin-bottom: 13px; }
.booking-success > p:not(.selected-time) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.success-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 20px auto 0; border-radius: 50%; background: #dff4e8; color: #23734d; font-size: 23px; }

.admin-hero { padding-top: 70px; padding-bottom: 47px; }
.admin-hero h1 { font-size: clamp(43px, 5vw, 68px); }
.admin-hero p { max-width: 650px; }
.schedule-panel { padding: 28px 34px 25px; margin-bottom: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.panel-heading h2 { font-size: 23px; }
.range-form { display: grid; grid-template-columns: minmax(170px, 1.25fr) repeat(2, minmax(110px, .75fr)) auto auto; gap: 12px; align-items: end; margin-top: 24px; }
.range-form .primary-button, .range-form .secondary-button { height: 45px; white-space: nowrap; }
.panel-tip { margin: 17px 0 0; max-width: 900px; color: #76828a; font-size: 12px; line-height: 1.55; }
.schedule-panel .status-line:not(:empty) { margin-top: 12px; color: #2d664c; }
.schedule-panel .status-line.error:not(:empty) { color: #9b343d; }
.admin-calendar { margin-bottom: 95px; }
.detail-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 19px 0; }
.detail-list div { display: flex; gap: 15px; justify-content: space-between; padding: 13px 0; }
.detail-list div + div { border-top: 1px solid var(--line); }
.detail-list dt { color: #7a858c; font-size: 13px; }
.detail-list dd { margin: 0; color: #2a383f; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.detail-list a { color: #226ca9; }
.modal .danger-button { width: 100%; margin-top: 10px; height: 46px; }

@media (max-width: 950px) {
  .range-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .range-form button { grid-column: span 1; }
  .guide-grid { gap: 9px; }
  .guide article { padding: 22px; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1450px); }
  .header-inner { min-height: 60px; }
  .header-link { font-size: 11px; }
  .hero { padding: 65px 0 45px; }
  .hero h1 { font-size: clamp(42px, 10vw, 58px); }
  .hero h1 br { display: none; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; padding: 24px 20px 20px; }
  .legend { gap: 11px 17px; padding: 0 20px 19px; }
  .mobile-scroll-hint { display: block; margin: 0; padding: 0 20px 17px; color: #87939a; font-size: 11px; }
  .calendar-card > .status-line:not(:empty) { padding: 0 20px 13px; }
  .calendar-grid { grid-template-columns: 58px repeat(7, 118px); min-width: 884px; }
  .empty-note { align-items: flex-start; flex-direction: column; padding: 20px; }
  .guide { padding: 85px 0; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide article { min-height: auto; }
  .guide h3 { margin-top: 16px; }
  .schedule-panel { padding: 24px 20px; }
  .range-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .range-form label:first-child { grid-column: span 2; }
  .range-form button { grid-column: span 1; }
  .panel-heading .timezone-pill { display: none; }
  .modal { padding: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
