:root {
  --ink: #4b2928;
  --soft: #6c4f4c;
  --rose: #df687c;
  --deep: #c94e68;
  --petal: #fff6f4;
  --blush: #fcecea;
  --gold: #d6a32b;
  --line: #ead3cb;
  --white: #fff;
  --footer: #2b2221;
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --shadow: 0 18px 48px rgba(75, 41, 40, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(255,255,255,.96), transparent 25%),
    radial-gradient(circle at 93% 13%, rgba(252,236,234,.9), transparent 24%),
    linear-gradient(180deg, #fffdfc 0%, var(--petal) 52%, #fffaf9 100%);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea { color: inherit; font: inherit; }

button,
input,
select,
textarea,
summary { touch-action: manipulation; }

.entry-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 10px 64px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(214,163,43,.35);
  box-shadow: 0 6px 18px rgba(75,41,40,.05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.entry-back {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

.entry-back::before { margin-right: 5px; content: "‹"; font-size: 23px; font-weight: 400; }

.entry-logo {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(12px, 3.5vw, 17px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-main {
  width: min(calc(100% - 28px), 720px);
  margin: 0 auto;
  padding: 32px 0 38px;
}

.entry-form-section {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 46px) clamp(18px, 6vw, 52px);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(214,163,43,.42);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.entry-form-section::before {
  position: absolute;
  top: -88px;
  right: -70px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(223,104,124,.14), transparent 68%);
  content: "";
  pointer-events: none;
}

.entry-heading,
.form-steps,
.entry-note,
.entry-form { position: relative; z-index: 1; }

.entry-heading { margin-bottom: 26px; text-align: center; }

.entry-en {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 32px;
  margin: 0 0 12px;
  color: var(--deep);
  border: 1px solid rgba(214,163,43,.55);
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}

.entry-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 500;
  line-height: 1.45;
  text-wrap: balance;
}

.entry-heading > p:not(.entry-en) { margin: 12px 0 0; color: var(--soft); font-size: 13px; }

.form-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.form-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 6px;
  color: #927b78;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.form-steps li span { font-family: Georgia, serif; }

.form-steps li.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--deep));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(201,78,104,.2);
}

.entry-note {
  margin: 0 0 24px;
  padding: 11px 14px;
  color: var(--soft);
  background: var(--petal);
  border: 1px dashed rgba(214,163,43,.65);
  border-radius: 14px;
  font-size: 12px;
}

.entry-note span,
.required,
.policy-consent b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 21px;
  margin-left: 5px;
  padding: 2px 7px;
  color: #fff;
  background: var(--deep);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.entry-note span { margin: 0 7px 0 0; }

.entry-form { display: grid; gap: 24px; }

.form-field { display: grid; gap: 7px; }

.form-field label,
.form-fieldset legend { font-family: var(--serif); font-size: 15px; font-weight: 600; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: #fffdfc;
  border: 1px solid #dcbdb7;
  border-radius: 12px;
  outline: 0;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, background-color 160ms ease-out;
}

.form-field textarea { min-height: 118px; resize: vertical; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: #ad9895; }

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover { border-color: #ce9b92; }

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  background: #fff;
  border-color: var(--deep);
  box-shadow: 0 0 0 4px rgba(201,78,104,.13);
}

.form-field [aria-invalid="true"] { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180,35,24,.09); }

.field-error { min-height: 0; margin: 0; color: #a3261c; font-size: 12px; font-weight: 600; }
.field-error:empty { display: none; }

.form-date-picker { position: relative; }

.date-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: #927b78;
  background: #fffdfc;
  border: 1px solid #dcbdb7;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, background-color 160ms ease-out;
}

.date-display:hover { border-color: #ce9b92; }
.date-display.has-value { color: var(--ink); }

.date-display:focus-visible,
.date-display[aria-expanded="true"] {
  color: var(--ink);
  background: #fff;
  border-color: var(--deep);
  box-shadow: 0 0 0 4px rgba(201,78,104,.13);
  outline: 0;
}

.date-display svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--deep);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.custom-calendar {
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  left: 0;
  width: min(340px, calc(100vw - 52px));
  padding: 14px;
  color: var(--ink);
  background: rgba(255,253,252,.98);
  border: 1px solid rgba(214,163,43,.52);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(75,41,40,.2);
  transform-origin: top left;
  animation: calendar-in 160ms ease-out both;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.custom-calendar[hidden] { display: none; }

@keyframes calendar-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line);
}

.calendar-month { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.calendar-nav { display: flex; gap: 4px; }

.calendar-nav button,
.calendar-actions button {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--deep);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.calendar-nav button { font-family: Georgia, serif; font-size: 29px; font-weight: 400; line-height: 1; }
.calendar-nav button:hover,
.calendar-actions button:hover { background: var(--petal); }
.calendar-nav button:disabled { color: #c9b9b6; cursor: not-allowed; background: transparent; }
.calendar-nav button:focus-visible,
.calendar-actions button:focus-visible,
.calendar-day:focus-visible { outline: 3px solid rgba(214,163,43,.68); outline-offset: 1px; }

.calendar-weekdays,
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-weekdays { padding: 10px 0 4px; color: #8e7471; font-size: 11px; font-weight: 700; text-align: center; }
.calendar-weekdays span:first-child { color: var(--deep); }
.calendar-weekdays span:last-child { color: #8c718a; }

.calendar-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.calendar-day:hover { color: var(--deep); background: var(--petal); }
.calendar-day.is-sunday { color: var(--deep); }
.calendar-day.is-saturday { color: #8c718a; }
.calendar-day:disabled { color: #c8b9b6; cursor: not-allowed; background: transparent; }
.calendar-day.is-today { border-color: var(--gold); }
.calendar-day.is-selected { color: #fff; background: var(--deep); border-color: var(--deep); box-shadow: 0 5px 14px rgba(201,78,104,.26); }
.calendar-day.is-empty { pointer-events: none; }

.calendar-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.calendar-actions button { width: auto; padding: 0 8px; font-size: 12px; }

.form-fieldset { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.form-fieldset legend { padding: 0 8px; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.entry-policy { overflow: hidden; background: var(--petal); border: 1px solid var(--line); border-radius: 14px; }
.entry-policy summary { min-height: 52px; padding: 13px 16px; color: var(--ink); font-family: var(--serif); font-weight: 600; cursor: pointer; }
.entry-policy summary:focus-visible { outline: 3px solid rgba(214,163,43,.6); outline-offset: -3px; }
.entry-policy div { padding: 0 16px 14px; color: var(--soft); font-size: 12px; }
.entry-policy p { margin: 8px 0 0; }

.policy-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 52px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.policy-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--deep); }
.policy-consent:focus-within { box-shadow: 0 0 0 4px rgba(201,78,104,.13); }
.policy-consent b { margin-left: 5px; }

.form-error-summary {
  margin-bottom: 22px;
  padding: 14px 16px;
  color: #8f2018;
  background: #fff2f0;
  border: 1px solid #e9aaa4;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.entry-submit-area { display: grid; justify-items: center; gap: 8px; margin-top: 4px; text-align: center; }

.entry-submit,
.entry-button-secondary {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.entry-submit {
  width: min(100%, 360px);
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--deep));
  border: 0;
  box-shadow: 0 10px 26px rgba(201,78,104,.25);
  text-align: center;
}

.entry-submit:hover { box-shadow: 0 13px 30px rgba(201,78,104,.34); transform: translateY(-1px); }
.entry-submit:active { transform: scale(.98); }
.entry-submit:disabled { cursor: wait; opacity: .7; }
.entry-submit:focus-visible,
.entry-button-secondary:focus-visible { outline: 3px solid rgba(214,163,43,.7); outline-offset: 3px; }
.entry-submit-area p { margin: 0; color: var(--soft); font-size: 11px; }

.entry-footer { padding: 34px 20px; color: #f9eeee; background: var(--footer); text-align: center; }
.entry-footer strong { font-family: var(--serif); }
.entry-footer p { margin: 14px 0 0; font-size: 10px; }

.entry-error { margin: 20px 0; padding: 18px; color: #8f2018; background: #fff2f0; border: 1px solid #e9aaa4; border-radius: 14px; }
.entry-error p { margin: 4px 0; }
.entry-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.entry-button-secondary { color: var(--deep); background: #fff; border: 1px solid var(--rose); }
.entry-confirm-form { display: grid; gap: 24px; }
.confirm-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.confirm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.confirm-table th,
.confirm-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.confirm-table tr:last-child th,
.confirm-table tr:last-child td { border-bottom: 0; }
.confirm-table th { width: 34%; color: var(--ink); background: var(--petal); font-family: var(--serif); }

@media (max-width: 520px) {
  .entry-main { width: min(calc(100% - 20px), 720px); padding-top: 20px; }
  .entry-form-section { padding: 26px 16px; border-radius: 22px; }
  .form-steps li { flex-direction: column; gap: 0; font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-fieldset { padding: 16px 12px; }
  .confirm-table th,
  .confirm-table td { display: block; width: 100%; }
  .confirm-table th { padding-bottom: 7px; border-bottom: 0; }
  .confirm-table td { padding-top: 7px; }
  .entry-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .form-field input,
  .form-field select,
  .form-field textarea,
  .entry-submit { transition: none; }
  .custom-calendar { animation: none; }
  .entry-submit:hover,
  .entry-submit:active { transform: none; }
}
