:root {
  /* Tiffany blue reuse palette. Legacy variable names are kept to minimize code churn. */
  --white: #fbffff;
  --ivory: #f2ffff;
  --pink-beige: #eafafa;
  --pink-light: #d7f4f2;
  --rose: #0abab5;
  --rose-dark: #078e8a;
  --brown: #445a59;
  --brown-dark: #253d3c;
  --line: #bfe9e6;
  --shadow: 0 16px 36px rgba(7, 142, 139, .1);
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--brown);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.95), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(216,244,242,.62), transparent 22%),
    linear-gradient(180deg, #fbffff 0%, #effcfb 45%, #f8ffff 100%);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: .035em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.entry-page {
  min-height: 100svh;
  padding-bottom: 40px;
}

.entry-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 18px;
  background: rgba(251,255,255,.96);
  border-bottom: 1px solid rgba(191, 233, 230, .78);
  box-shadow: 0 5px 18px rgba(7, 142, 139, .06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.entry-back {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 700;
}

.entry-back::before {
  content: "‹";
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.entry-logo,
.entry-footer-logo {
  color: var(--brown-dark);
  font-family: Georgia, serif;
  font-size: 21px;
  letter-spacing: .12em;
  line-height: 1;
}

.entry-header .entry-logo {
  max-width: calc(100% - 104px);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

.entry-logo span,
.entry-footer-logo span {
  color: var(--rose);
  font-size: .68em;
}

.entry-main {
  width: calc(100% - 28px);
  max-width: 750px;
  margin: 0 auto;
  padding: 34px 0 18px;
}

.entry-form-section {
  position: relative;
  overflow: hidden;
  padding: 32px 18px 28px;
  background: rgba(251,255,255,.92);
  border: 1px solid rgba(191, 233, 230, .86);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.entry-form-section::before,
.entry-form-section::after {
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(216,244,242,.54), transparent 70%);
  content: "";
  pointer-events: none;
}

.entry-form-section::before {
  top: -62px;
  right: -50px;
}

.entry-form-section::after {
  bottom: 14%;
  left: -76px;
}

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

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

.entry-en {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 34px;
  margin: 0 0 12px;
  color: var(--rose-dark);
  border: 1px solid #bfe9e6;
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .24em;
}

.entry-heading h1 {
  margin: 0;
  color: var(--rose-dark);
  font-family: var(--serif);
  font-size: clamp(20px, 5.8vw, 34px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .04em;
  word-break: break-all;
}

.entry-heading > p:not(.entry-en) {
  margin: 12px 0 0;
  color: #5f7574;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

.form-steps li {
  display: grid;
  place-items: center;
  min-height: 42px;
  min-width: 0;
  padding: 6px;
  color: #6f8f8d;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.form-steps li.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0abab5, #078e8a);
  border-color: transparent;
  box-shadow: 0 9px 20px rgba(7, 142, 139, .18);
}

.entry-note {
  margin: 0 0 20px;
  padding: 12px 14px;
  color: #4f6968;
  background: #f6ffff;
  border: 1px dashed var(--line);
  border-radius: 16px;
  font-size: 12px;
}

.entry-note span,
.required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 22px;
  margin-right: 7px;
  color: #fff;
  background: var(--rose);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

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

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

.form-field label,
.form-fieldset legend {
  color: var(--brown-dark);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

.required {
  margin-right: 0;
  margin-left: 6px;
  vertical-align: middle;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  color: var(--brown);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #0abab5 50%),
    linear-gradient(135deg, #0abab5 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

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

.form-date-picker {
  display: grid;
  gap: 12px;
}

.date-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 13px 16px 13px 18px;
  color: var(--brown);
  text-align: left;
  background: #fff;
  border: 1.5px solid #6fd7d2;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  cursor: pointer;
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.date-display:focus-visible {
  border-color: var(--rose);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(10, 186, 181, .12);
}

.date-display-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-left: 12px;
  background: #eefcfc;
  border: 1px solid #96e0dc;
  border-radius: 12px;
}

.date-display-icon::before {
  width: 16px;
  height: 16px;
  background:
    linear-gradient(#0abab5, #0abab5) 0 4px / 100% 2px no-repeat,
    linear-gradient(#0abab5, #0abab5) 4px 0 / 2px 4px no-repeat,
    linear-gradient(#0abab5, #0abab5) 10px 0 / 2px 4px no-repeat;
  border: 2px solid #0abab5;
  border-radius: 4px;
  content: "";
}

.custom-calendar {
  display: none;
  padding: 18px 14px 15px;
  background: rgba(255,255,255,.96);
  border: 3px solid #0abab5;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(7, 142, 139, .13);
  opacity: 0;
  transform: translateY(-8px);
}

.custom-calendar.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: calendarFadeIn .22s ease;
}

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

@keyframes calendarFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 6px;
}

.calendar-month {
  margin: 0;
  color: #314d4c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #0abab5;
  background: #f6ffff;
  border: 1px solid #aee7e3;
  border-radius: 50%;
  cursor: pointer;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.calendar-nav button span {
  display: block;
  width: 20px;
  height: 20px;
  font-size: 30px;
  line-height: 18px;
  text-align: center;
  transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  min-height: 30px;
  color: #314d4c;
  font-size: 15px;
  font-weight: 700;
}

.calendar-day {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  color: #314d4c;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.calendar-day:not(:disabled):hover {
  background: #eefcfc;
}

.calendar-day.is-selected {
  color: #314d4c;
  background: #d7f4f2;
}

.calendar-day.is-today:not(.is-selected) {
  color: #0abab5;
  box-shadow: inset 0 0 0 1px #96e0dc;
}

.calendar-day.is-empty {
  cursor: default;
  pointer-events: none;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  background: #fbffff;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(10, 186, 181, .12);
}

.form-fieldset {
  min-width: 0;
  padding: 16px 14px 18px;
  margin: 0;
  background: #f8ffff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.form-fieldset legend {
  padding: 0 8px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.entry-submit-area {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  text-align: center;
}

.entry-submit,
.entry-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  color: #fff;
  background: linear-gradient(135deg, #0abab5, #078e8a);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  box-shadow: 0 13px 30px rgba(7, 142, 139, .24), inset 0 0 0 3px rgba(255,255,255,.12);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .08em;
}

.entry-button-secondary {
  color: var(--rose-dark);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 8px 20px rgba(7, 142, 139, .08);
}

.entry-submit-link {
  text-decoration: none;
}

.entry-submit-area p {
  margin: 0;
  color: #6f8f8d;
  font-size: 11px;
  line-height: 1.65;
}

.entry-confirm-form {
  position: relative;
  z-index: 1;
}

.confirm-table-wrap {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(7, 142, 139, .08);
}

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

.confirm-table th,
.confirm-table td {
  display: block;
  width: 100%;
  text-align: left;
  vertical-align: top;
}

.confirm-table th {
  padding: 15px 16px 6px;
  color: var(--rose-dark);
  background: #f6ffff;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.confirm-table td {
  padding: 0 16px 16px;
  color: var(--brown);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.75;
  word-break: break-word;
}

.confirm-table tr:last-child td {
  border-bottom: 0;
}

.entry-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 45px;
}

.entry-error {
  position: relative;
  z-index: 1;
  padding: 16px;
  color: #057f7a;
  background: #f2ffff;
  border: 1px solid #bfe9e6;
  border-radius: 18px;
}

.entry-error p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
}

.entry-error p:last-child {
  margin-bottom: 0;
}

.thanks-card {
  text-align: center;
}

.thanks-message {
  position: relative;
  z-index: 1;
  padding: 28px 16px;
  margin-top: 45px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(7, 142, 139, .08);
}

.thanks-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  color: #fff;
  background: linear-gradient(135deg, #0abab5, #078e8a);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(7, 142, 139, .18);
  font-family: Georgia, serif;
  font-size: 24px;
}

.thanks-message h2 {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .06em;
}

.thanks-message p {
  margin: 8px 0 0;
  color: #4f6968;
  font-size: 14px;
  line-height: 1.8;
}

.entry-footer {
  width: calc(100% - 28px);
  max-width: 750px;
  margin: 0 auto;
  padding: 24px 0 0;
  color: #89a9a7;
  text-align: center;
}

.entry-footer-logo {
  margin-bottom: 12px;
  color: var(--brown-dark);
}

.entry-footer p {
  margin: 0;
  font-size: 10px;
}

@media (min-width: 640px) {
  .entry-main { padding-top: 46px; }
  .entry-form-section { padding: 42px 46px 40px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .entry-actions {
    grid-template-columns: 1fr 1.25fr;
    align-items: center;
  }
  .thanks-card .entry-actions {
    grid-template-columns: minmax(260px, 420px);
    justify-content: center;
  }
  .confirm-table th,
  .confirm-table td {
    display: table-cell;
  }
  .confirm-table th {
    width: 32%;
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
  }
  .confirm-table td {
    padding: 17px 18px;
  }
}

@media (max-width: 420px) {
  .entry-main {
    width: calc(100% - 20px);
  }

  .entry-form-section {
    padding: 30px 10px 26px;
    border-radius: 22px;
  }

  .form-steps {
    gap: 4px;
  }

  .form-steps li {
    padding-inline: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
