:root {
  color-scheme: light;
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text: #1b1f24;
  --color-text-muted: #4a5360;
  --color-border: #d5dae1;
  --color-primary: #1f4fd1;
  --color-primary-strong: #173c9f;
  --color-primary-soft: #e8eefc;
  --color-on-primary: #ffffff;
  --color-danger: #b42318;
  --color-danger-soft: #fdecea;
  --color-warning-soft: #fff6dd;
  --color-warning-border: #e3b341;
  --color-success-soft: #e7f6ec;
  --color-success: #17653a;
  --color-placeholder-bg: #fff1a8;
  --color-placeholder-text: #5c4400;
  --color-focus: #b45309;
  --radius: 12px;
  --radius-small: 8px;
  --gutter: 16px;
  --content-max: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-primary-strong);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 12px;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-small);
}

.skip-link:focus {
  top: 8px;
}

.ph {
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder-text);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-header__brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: var(--radius-small);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--color-primary-soft);
}

.site-nav a[aria-current="page"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-weight: 700;
}

main {
  display: block;
  padding: 24px 0 48px;
}

.section {
  margin-bottom: 24px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px var(--gutter);
  margin-bottom: 16px;
}

.card > :last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.muted {
  color: var(--color-text-muted);
}

.small {
  font-size: 0.9rem;
}

.hero {
  display: grid;
  gap: 20px;
  align-items: center;
}

.hero__media img {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  width: 100%;
}

.hero__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0 0 16px;
}

.hero__facts dt {
  font-weight: 600;
  color: var(--color-text-muted);
}

.hero__facts dd {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: var(--radius-small);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--color-primary-strong);
  color: var(--color-on-primary);
}

.button:disabled,
.button[aria-disabled="true"] {
  background: #9aa4b2;
  border-color: #9aa4b2;
  color: #ffffff;
  cursor: not-allowed;
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-primary-strong);
}

.button--secondary:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

.button--block {
  width: 100%;
}

.form-submit {
  margin-bottom: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.steps li::before {
  content: counter(step);
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.price-table td:last-child,
.price-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.gallery {
  display: grid;
  gap: 12px;
}

.gallery img {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  width: 100%;
}

.notice {
  border-radius: var(--radius-small);
  padding: 14px 16px;
  margin: 0 0 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.notice > :last-child {
  margin-bottom: 0;
}

.notice--warning {
  background: var(--color-warning-soft);
  border-color: var(--color-warning-border);
}

.notice--danger {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
}

.notice--info {
  background: var(--color-primary-soft);
  border-color: #b8c8f2;
}

.notice--success {
  background: var(--color-success-soft);
  border-color: var(--color-success);
}

.notice__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.info-table th {
  width: 34%;
  color: var(--color-text-muted);
  font-weight: 600;
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.fieldset legend {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0;
  margin-bottom: 10px;
}

.step-label {
  display: inline-block;
  margin-right: 6px;
  color: var(--color-primary-strong);
}

.calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar__title {
  font-weight: 700;
  margin: 0;
}

.calendar__nav-button {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-small);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font: inherit;
  cursor: pointer;
}

.calendar__nav-button:disabled {
  color: #9aa4b2;
  cursor: not-allowed;
}

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar__weekdays {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
  cursor: pointer;
}

.choice input:disabled {
  cursor: not-allowed;
}

.choice__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  text-align: center;
  line-height: 1.2;
}

.choice__sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.choice input:checked + .choice__label {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
}

.choice input:checked + .choice__label .choice__sub {
  color: var(--color-on-primary);
}

.choice input:focus-visible + .choice__label {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.choice input:disabled + .choice__label {
  background: #eef0f3;
  color: #6b7480;
  border-style: dashed;
}

.calendar__empty {
  min-height: 48px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fare-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fare {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.fare__name {
  font-weight: 700;
}

.fare__target {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.fare__price {
  font-size: 0.95rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--color-surface);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text);
}

.stepper button:disabled {
  color: #b3bac4;
  cursor: not-allowed;
}

.stepper__count {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
}

.total-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 0 0;
  font-size: 1.05rem;
}

.total-bar strong {
  font-size: 1.25rem;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid #8a94a3;
  border-radius: var(--radius-small);
  background: var(--color-surface);
  color: var(--color-text);
}

.form-field input[aria-invalid="true"] {
  border-color: var(--color-danger);
  border-width: 2px;
}

.field-hint {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 6px 0 0;
}

.field-error {
  font-size: 0.9rem;
  color: var(--color-danger);
  margin: 6px 0 0;
  font-weight: 600;
}

.error-summary {
  border: 2px solid var(--color-danger);
  background: var(--color-danger-soft);
  border-radius: var(--radius-small);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.error-summary h2 {
  font-size: 1.05rem;
  color: var(--color-danger);
}

.error-summary ul {
  margin-bottom: 0;
}

.summary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 0 0 12px;
}

.summary-list dt {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.summary-list dd {
  margin: 0;
}

.summary-total {
  font-size: 1.2rem;
  font-weight: 700;
}

.consent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.consent-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.consent-all {
  font-weight: 700;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checkbox input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 2px 0 0;
  accent-color: var(--color-primary);
}

.consent-detail {
  margin: 6px 0 0 32px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.consent-detail dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 10px;
  margin: 0;
}

.consent-detail dd {
  margin: 0;
}

.payment-widget {
  margin: 0 -8px;
}

.status-message {
  min-height: 1.6em;
  margin: 10px 0 0;
  font-weight: 600;
}

.status-message--error {
  color: var(--color-danger);
}

.doc h2 {
  font-size: 1.12rem;
  margin-top: 24px;
}

.doc .doc__meta {
  color: var(--color-text-muted);
}

.site-footer {
  background: #eceff3;
  border-top: 1px solid var(--color-border);
  padding: 28px 0 40px;
  font-size: 0.88rem;
  color: #3b434e;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.site-footer__links a {
  color: #1b1f24;
  font-weight: 600;
}

.site-footer__links a.is-strong {
  font-weight: 800;
}

.site-footer__info {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.site-footer__copy {
  margin-top: 10px;
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  h1 {
    font-size: 2rem;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .slot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-list {
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
  }

  .summary-list dt {
    margin-top: 0;
  }

  .info-table th {
    width: 26%;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
  }

  .booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
  }

  .booking-aside {
    position: sticky;
    top: 16px;
  }

  .slot-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
