:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --paper: #f6f5ed;
  --white: #fffefa;
  --ink: #1d3128;
  --muted: #53665c;
  --green: #254a38;
  --deep-green: #173d2f;
  --sage: #e8eee2;
  --border: #d7ded2;
  --red: #823f30;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #94632e; outline-offset: 3px; }
p, h1, h2, h3, dl, dd { margin: 0; }
.wrap { width: min(1056px, 100% - 56px); margin-inline: auto; }
.site-header { border-bottom: 1px solid #dedfd2; background: #faf9f2; }
.masthead { display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.1rem; font-weight: 720; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fbefd2; background: var(--green); font: 25px/1 Georgia, serif; }
.preview-label { font-size: .875rem; color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 16px; }

.intro { margin-block: 27px 28px; border-radius: 23px; min-height: 138px; overflow: hidden; isolation: isolate; position: relative; display: grid; align-content: center; padding: 26px 35px; color: #fcf7e8; background: var(--deep-green); }
.intro h1 { font-size: clamp(1.85rem, 4.5vw, 2.6rem); font-weight: 740; letter-spacing: -.065em; line-height: 1.2; }
.intro p { margin-top: 11px; color: #e2ebdd; }
.grove { position: absolute; z-index: -1; inset: 0 0 0 auto; width: min(36%, 314px); background: radial-gradient(circle at 77% 30%, #f2cf88 0 13px, transparent 14px), linear-gradient(140deg, transparent 20%, #426453 95%); opacity: .8; }
.grove span { position: absolute; border: 1px solid #aec3a9; border-radius: 55% 55% 0 0; transform: rotate(-17deg); width: 50%; height: 148%; top: 15%; left: 27%; }
.grove span:nth-child(2) { left: 48%; top: 35%; }
.grove span:nth-child(3) { left: 68%; top: 20%; }

h2 { font-size: 1.35rem; font-weight: 730; letter-spacing: -.035em; }
h3 { font-size: 1.06rem; font-weight: 730; }
.facility-section h2 { margin-bottom: 12px; }
.facility-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.facility-card { width: 100%; display: grid; grid-template-columns: minmax(70px, 107px) minmax(0, 1fr) auto; align-items: center; text-align: left; gap: 16px; border: 1px solid var(--border); border-radius: 16px; padding: 12px; color: var(--ink); background: var(--white); }
.facility-card:hover { border-color: var(--muted); }
.facility-card[aria-pressed="true"], .facility-card.is-selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #f9fbf5; }
.facility-thumbnail { display: grid; place-items: end center; min-height: 70px; padding: 6px 3px; border-radius: 9px; color: #2e4a3c; font-size: .875rem; font-weight: 650; text-align: center; background: repeating-linear-gradient(135deg, #e1e9dc, #e1e9dc 7px, #e7eee2 7px, #e7eee2 14px); }
.facility-thumbnail.lecture { color: #5b452e; background: repeating-linear-gradient(135deg, #eee5d6, #eee5d6 7px, #f3ebdf 7px, #f3ebdf 14px); }
.facility-name { display: block; font-size: 1.13rem; font-weight: 740; }
.facility-meta { display: block; margin-top: 2px; color: var(--muted); font-size: .925rem; }
.facility-indicator { display: grid; place-items: center; width: 22px; height: 22px; margin-right: 3px; border-radius: 100%; border: 1px solid #9baea1; color: transparent; font-size: .9rem; }
.facility-card[aria-pressed="true"] .facility-indicator { color: white; background: var(--green); border-color: var(--green); }
.facility-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 6px 11px; border-radius: 8px; color: white; background: var(--green); white-space: nowrap; font-size: .875rem; font-weight: 700; }
.facility-card:hover .facility-action { background: #1a4131; }
.facility-chevron { width: 8px; height: 8px; margin-right: 2px; transform: translateY(-2px) rotate(45deg); border: solid currentColor; border-width: 0 2px 2px 0; }
.facility-card[aria-expanded="true"] .facility-chevron { transform: translateY(2px) rotate(225deg); }
.seminar-options { min-width: 0; margin: 12px 0 0; padding: 8px 12px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.seminar-options legend { padding: 0 5px; color: var(--ink); font-size: .95rem; font-weight: 700; }
.seminar-room-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.seminar-choice { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px; background: #f8f9f3; cursor: pointer; }
.seminar-choice input { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.seminar-choice:hover { border-color: var(--green); }
.seminar-choice:has(input:checked) { border-color: var(--green); background: var(--sage); }
.seminar-choice-text { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; }
.seminar-choice small { color: var(--muted); font-size: .85rem; }

.schedule { margin-top: 26px; }
.schedule-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 13px; }
.quiet { font-size: .95rem; color: var(--muted); }
.text-button { min-height: 42px; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--green); font-size: .925rem; font-weight: 700; }
.text-button:hover:not(:disabled) { background: var(--sage); }
.text-button:disabled { color: #627366; }
.schedule-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(285px, 1fr); gap: 14px; align-items: start; }
.calendar-panel, .stay-panel, .lecture-panel { border: 1px solid var(--border); border-radius: 17px; padding: 17px 21px; background: var(--white); }
.month-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.month-nav { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 9px; color: var(--green); background: var(--white); }
.month-nav:hover:not(:disabled) { background: var(--sage); }
.month-nav:disabled { color: #8f9a90; background: #f3f4ee; }
.month-nav::before { display: block; content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.month-nav.previous::before { transform: rotate(-135deg); }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays { color: var(--muted); text-align: center; padding-block: 2px 7px; font-size: .875rem; }
.day { position: relative; border-radius: 8px; display: grid; place-items: center; min-height: 44px; padding: 2px; border: 1px solid transparent; color: var(--ink); background: #f6f8f2; font-size: .95rem; }
.day:hover:not(:disabled) { border-color: var(--green); }
.day:disabled { color: #647269; background: #f1f1eb; }
.day.is-today { box-shadow: inset 0 0 0 1px #9eaf9f; }
.day.is-booked { color: var(--red); background: #f6e9e3; text-decoration: line-through; }
.day.is-in-range { color: var(--deep-green); background: #e2ebde; }
.day.is-selected { color: white; background: var(--green); font-weight: 740; text-decoration: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 13px; color: var(--muted); font-size: .875rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend-selected { background: var(--green); }
.legend-booked { background: #f0d4c8; border: 1px solid #d7a795; }
.legend-unavailable { background: #e8e9e1; border: 1px solid #c5cec3; }

.stay-panel { padding: 17px 20px 20px; }
.stay-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.stay-dates div { padding: 9px 10px; border: 1px solid #e0e6dc; border-radius: 9px; background: #f4f6ee; }
.stay-dates dt, .guest-control small { color: var(--muted); font-size: .875rem; }
.stay-dates dd { font-size: 1rem; font-weight: 710; }
.night-count { margin-top: 8px; font-size: .925rem; font-weight: 700; color: var(--green); }
.guest-control { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 15px; }
.guest-control label { font-weight: 690; }
.guest-control small { margin-left: 2px; font-weight: 400; }
.guest-input { display: flex; align-items: center; gap: 5px; }
.guest-input input { width: 62px; min-height: 44px; padding: 5px; text-align: center; border-radius: 8px; border: 1px solid #9cae9d; color: var(--ink); background: var(--white); }
.primary-button { margin-top: 13px; width: 100%; min-height: 46px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; color: white; background: var(--green); font-weight: 700; }
.primary-button:hover:not(:disabled) { background: var(--deep-green); }
.primary-button:disabled { background: #dfe7db; color: #4a6154; }
.field-message { margin-top: 8px; font-size: .925rem; color: var(--red); }
.stay-result { margin-top: 12px; padding: 10px; border-radius: 8px; font-size: .95rem; background: var(--sage); color: var(--deep-green); }
.lecture-panel { margin-top: 23px; }
.lecture-rules { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-block: 10px; }
.lecture-rules dt { color: var(--muted); font-size: .9rem; }
.lecture-rules dd { font-weight: 690; }
.site-footer { color: var(--muted); font-size: .875rem; margin-block: 22px; }

@media (max-width: 740px) {
  .wrap { width: min(580px, 100% - 32px); }
  .schedule-grid { grid-template-columns: 1fr; }
  .facility-card { grid-template-columns: minmax(57px, 75px) minmax(0, 1fr) auto; gap: 9px; }
}

@media (max-width: 475px) {
  .masthead { min-height: 58px; }
  .intro { margin-block: 16px 20px; min-height: 120px; padding: 17px; border-radius: 16px; }
  .intro h1 { font-size: 1.7rem; }
  .intro p { margin-top: 7px; font-size: .94rem; }
  .grove { opacity: .3; }
  .facility-grid { grid-template-columns: 1fr; gap: 8px; }
  .facility-card { padding: 8px; }
  .facility-action { gap: 6px; padding-inline: 8px; }
  .seminar-room-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facility-thumbnail { min-height: 48px; }
  .schedule { margin-top: 20px; }
  .calendar-panel, .stay-panel, .lecture-panel { padding: 12px; }
  .schedule-header { gap: 4px; }
  .text-button { flex-shrink: 0; padding-inline: 4px; }
}

.legend-available { background: #edf2e8; border: 1px solid #abbead; }
.day.is-closed:not(.is-selected) { color: #4d5b54; background: repeating-linear-gradient(135deg, #e9e9e3 0 5px, #f2f2ed 5px 10px); }
.hour-periods { display: grid; gap: 7px; margin-top: 8px; }
.hour-period { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; min-height: 54px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); color: var(--ink); text-align: left; }
.hour-period-range { grid-column: 1; color: var(--muted); font-size: .85rem; }
.hour-period-status { grid-area: 1 / 2 / span 2; color: var(--green); font-size: .78rem; white-space: nowrap; }
.hour-period.is-booked { background: #f6e9e3; }
.hour-period.is-booked .hour-period-status { color: var(--red); }
.hour-period.is-closed { background: #efefeb; }
.hour-period.is-closed .hour-period-status { color: var(--muted); }
.hour-period[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.hour-period[aria-pressed="true"] small { color: #eff5e8; }
.hour-period:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--sage); border-color: var(--green); }
.booking-periods { margin-block: 9px 12px; }
.booking-periods p { color: var(--muted); font-size: .89rem; }
#periods-hint { margin-top: 7px; }
.seminar-span { color: var(--muted); font-size: .89rem; }
.chosen-day { margin-top: 11px; color: var(--muted); font-weight: 650; }

.application-panel, .receipt-panel { margin-top: 25px; padding: clamp(18px, 4vw, 30px); border: 1px solid var(--border); border-radius: 20px; background: var(--white); }
.application-panel { max-width: 760px; margin-inline: auto; }
.application-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.application-header .quiet { margin-top: 3px; }
.application-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.application-field { min-width: 0; }
.application-field.full-width { grid-column: 1 / -1; }
.application-field label { display: block; margin-bottom: 4px; font-weight: 680; }
.application-field input, .application-field textarea { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: var(--ink); border: 1px solid #9cae9d; border-radius: 8px; background: var(--white); }
.application-field textarea { resize: vertical; }
.application-field [aria-invalid="true"] { border-color: var(--red); }
.form-actions { display: flex; justify-content: flex-end; align-items: stretch; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.form-actions .primary-button { margin-top: 0; width: auto; padding-inline: 15px; }
.secondary-button { min-height: 44px; padding: 6px 12px; border: 1px solid #9cae9d; border-radius: 9px; color: var(--green); background: var(--white); font-weight: 680; }
.secondary-button:hover { background: var(--sage); }
.all-periods { width: 100%; margin-top: 8px; }
.all-periods[aria-pressed="true"] { background: var(--sage); border-color: var(--green); }
.all-periods:disabled { color: var(--muted); background: #efefeb; border-color: var(--border); }
.receipt-panel { max-width: 680px; margin: 40px auto 0; }
.receipt-panel h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.04em; }
.receipt-panel .quiet { margin-top: 7px; }
.receipt-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; color: var(--green); background: var(--sage); font-size: .9rem; font-weight: 700; margin-bottom: 10px; }
.receipt-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-block: 17px; background: var(--border); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.receipt-details div { min-width: 0; padding: 10px 12px; background: #f7f8f1; }
.receipt-details dt { color: var(--muted); font-size: .875rem; }
.receipt-details dd { margin-top: 2px; font-weight: 670; overflow-wrap: anywhere; white-space: pre-wrap; }
.receipt-panel .form-actions { justify-content: flex-start; }
.receipt-panel .primary-button { display: inline-grid; place-content: center; text-decoration: none; }
.file-entry-actions .secondary-button { display: inline-grid; place-content: center; text-decoration: none; }
.back-link { display: inline-block; margin-top: 17px; color: var(--green); font-weight: 680; }

@media (max-width: 475px) {
  .application-header { flex-wrap: wrap; }
  .application-fields, .receipt-details { grid-template-columns: 1fr; }
  .receipt-panel { margin-top: 22px; }
}
