:root {
  color-scheme: light;
  --bg: #f5efe6;
  --sheet: #ffffff;
  --text: #2d3641;
  --muted: #667382;
  --placeholder: #a1adba;
  --line: #d7dee6;
  --line-strong: #c6d0da;
  --accent: #2d3641;
  --accent-soft: #eef4fb;
  --accent-strong: #2f7de1;
  --shadow: 0 18px 44px rgba(93, 106, 122, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  color: var(--text);
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 14px 36px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.15;
  font-weight: 800;
}

.form {
  display: grid;
  gap: 18px;
}

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

.section h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.field,
.checkbox {
  display: grid;
}

.field {
  gap: 4px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.required-mark {
  color: #d34f4f;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  color: inherit;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

input,
select,
textarea {
  font-size: 15px;
  line-height: 1.4;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(47, 125, 225, 0.1);
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid #7b8794;
  border-bottom: 1.8px solid #7b8794;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
}

.date-field {
  position: relative;
}

.date-display {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #8ea0b4;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

.date-display::after {
  content: "";
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background:
    linear-gradient(#d3dbe4, #d3dbe4) center 5px / 10px 1px no-repeat,
    linear-gradient(#d3dbe4, #d3dbe4) center 9px / 10px 1px no-repeat,
    linear-gradient(#d3dbe4, #d3dbe4) center 13px / 10px 1px no-repeat;
}

.date-display-text.is-empty {
  color: var(--placeholder);
}

.date-picker {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 8px;
  width: 236px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(96, 110, 128, 0.18);
}

.date-picker-header {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
}

.date-picker-header strong {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.date-nav {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8c98a6;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-picker-weekdays {
  margin-bottom: 6px;
  color: #7f8a98;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.date-picker-day {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  box-shadow: none;
}

.date-picker-day.is-muted {
  color: #c5cdd6;
}

.date-picker-day.is-selected {
  background: var(--accent-strong);
  color: #fff;
}

.date-picker-day.is-today:not(.is-selected) {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 0;
  padding: 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}

.checkbox-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

#submit-button {
  border: 0;
  margin-top: 4px;
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3d4956 0%, #2d3641 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(45, 54, 65, 0.2);
}

.success-screen {
  display: grid;
  gap: 14px;
  padding-top: 10px;
}

.success-screen h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.success-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.success-text a {
  color: var(--accent-strong);
  text-decoration: none;
}

.success-text a:hover {
  text-decoration: underline;
}

.success-checkbox {
  margin-top: 2px;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .page {
    padding: 18px 12px 28px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .date-picker {
    left: 0;
    width: min(236px, calc(100vw - 48px));
  }
}
