:root {
  --bg: #f4efe6;
  --surface: #fffaf1;
  --surface-soft: #f9f2e6;
  --ink: #17130f;
  --text: #2d2924;
  --muted: #766c60;
  --line: rgba(55, 43, 28, 0.14);
  --gold: #b98b42;
  --gold-deep: #8c642d;
  --forest: #30483f;
  --forest-deep: #1f332d;
  --shadow: 0 22px 60px rgba(52, 39, 23, 0.14);
  --radius: 8px;
  --max-width: 1120px;
  --gap: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.84), rgba(244, 239, 230, 0.95)),
    radial-gradient(circle at top left, rgba(185, 139, 66, 0.18), transparent 34%),
    #f4efe6;
  color: var(--text);
  font-family:
    Manrope,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 34px auto;
}

.app-header {
  margin: 0 0 24px;
  color: var(--ink);
}

h1,
h2,
h3,
.room-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.92;
}

h2 {
  margin: 0 0 16px;
  font-size: 38px;
  line-height: 1;
}

h3 {
  margin: 24px 0 10px;
  font-size: 26px;
}

.card {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(185, 139, 66, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.success-screen {
  position: relative;
  min-height: min(620px, calc(100vh - 68px));
  display: grid;
  gap: 14px;
  align-content: center;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(242, 231, 212, 0.92)),
    #fffaf1;
}

.success-screen::before,
.success-screen::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.success-screen::before {
  inset: 18px;
  border: 1px solid rgba(185, 139, 66, 0.22);
}

.success-screen::after {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 139, 66, 0.18), transparent 68%);
  transform: translateY(-18px);
}

.success-screen[hidden] {
  display: none;
}

.success-screen > * {
  position: relative;
  z-index: 1;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(185, 139, 66, 0.42);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-deep), var(--forest));
  color: #fffaf1;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(31, 51, 45, 0.22);
}

.success-screen p {
  margin: 2px 0 0;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.success-screen h2 {
  margin: 0;
  color: var(--forest-deep);
  max-width: 620px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.96;
}

.wizard {
  position: relative;
  overflow: hidden;
}

.progress {
  height: 5px;
  background: rgba(48, 72, 63, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--forest));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.form-message {
  margin: -10px 0 22px;
  border: 1px solid rgba(140, 100, 45, 0.22);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(185, 139, 66, 0.09);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 14px;
}

.form-message.success {
  border-color: rgba(48, 72, 63, 0.24);
  border-left-color: var(--forest);
  background: rgba(48, 72, 63, 0.09);
}

.form-message[hidden] {
  display: none;
}

.step > p {
  max-width: 580px;
  margin: -6px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

.room-card {
  min-height: 100%;
  background: linear-gradient(180deg, #fffdf8, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 18px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.room-card:hover {
  border-color: rgba(185, 139, 66, 0.48);
  box-shadow: 0 16px 34px rgba(52, 39, 23, 0.12);
  transform: translateY(-3px);
}

.room-card.selected {
  background: linear-gradient(180deg, #fffaf1, #f2e7d4);
  border-color: rgba(139, 97, 45, 0.76);
  box-shadow: 0 18px 42px rgba(52, 39, 23, 0.16);
}

.room-card.advancing {
  animation: selection-settle 0.45s ease both;
}

@keyframes selection-settle {
  0% {
    transform: translateY(-3px) scale(1);
  }
  55% {
    transform: translateY(-5px) scale(1.015);
  }
  100% {
    transform: translateY(-2px) scale(1);
  }
}

.room-card label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}

.room-card input[type="checkbox"] {
  accent-color: var(--forest);
  inline-size: 18px;
  block-size: 18px;
  margin-top: 2px;
}

.room-title {
  font-size: 25px;
  line-height: 1.06;
  margin: 0 0 12px;
}

.room-price {
  color: var(--gold-deep);
  font-size: 15px;
  font-weight: 800;
}

.room-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 0;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 18px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

button.primary {
  background: linear-gradient(135deg, var(--forest-deep), var(--forest));
  color: #fffaf1;
  box-shadow: 0 14px 28px rgba(31, 51, 45, 0.2);
}

button.primary:hover {
  box-shadow: 0 17px 32px rgba(31, 51, 45, 0.25);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

button.ghost {
  background: rgba(255, 250, 241, 0.65);
  border: 1px solid var(--line);
  color: var(--forest-deep);
}

button.ghost:hover {
  border-color: rgba(48, 72, 63, 0.34);
  background: #fffdf8;
}

button.muted {
  background: rgba(185, 139, 66, 0.08);
  border: 1px solid rgba(185, 139, 66, 0.2);
  color: var(--gold-deep);
  padding: 8px 12px;
}

label {
  display: block;
  margin: 14px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  padding: 12px 13px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

input[type="text"]:focus,
select:focus {
  border-color: rgba(185, 139, 66, 0.7);
  box-shadow: 0 0 0 4px rgba(185, 139, 66, 0.13);
  outline: 0;
}

input.invalid {
  border-color: rgba(148, 61, 45, 0.72);
  box-shadow: 0 0 0 4px rgba(148, 61, 45, 0.1);
}

.field-error {
  display: block;
  min-height: 19px;
  margin-top: 6px;
  color: #943d2d;
  font-size: 12px;
  font-weight: 800;
}

.date-picker {
  max-width: 540px;
  margin-top: 14px;
  border: 1px solid rgba(185, 139, 66, 0.22);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, #fffdf8, var(--surface-soft));
}

.calendar-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-title {
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.calendar-nav {
  width: 42px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(48, 72, 63, 0.16);
  border-radius: 7px;
  background: rgba(48, 72, 63, 0.06);
  color: var(--forest-deep);
  font-size: 24px;
  line-height: 1;
}

.calendar-nav:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

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

.calendar-weekday {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 0;
  text-align: center;
  text-transform: uppercase;
}

.calendar-spacer {
  aspect-ratio: 1;
}

.calendar-day {
  aspect-ratio: 1;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(48, 72, 63, 0.06);
  color: var(--ink);
}

.calendar-day:hover {
  background: rgba(185, 139, 66, 0.12);
  border-color: rgba(185, 139, 66, 0.28);
}

.calendar-day:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  background: rgba(16, 18, 20, 0.03);
  color: #8f8a82;
}

.calendar-day:disabled:hover {
  border-color: transparent;
  background: rgba(16, 18, 20, 0.03);
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fffaf1;
  box-shadow: 0 10px 20px rgba(140, 100, 45, 0.2);
}

.selected-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  margin-top: 15px;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(185, 139, 66, 0.16);
  border-radius: 999px;
  background: rgba(185, 139, 66, 0.1);
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 800;
}

.summary {
  border: 1px solid rgba(185, 139, 66, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(249, 242, 230, 0.82)),
    #fffdf8;
  padding: 16px;
}

.summary-room {
  display: grid;
  gap: 4px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.summary-room span,
.summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-room strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 25px;
  line-height: 1.05;
}

.summary-breakdown,
.summary-totals {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.addon-breakdown {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.summary-section-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.summary-totals {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
}

.summary-row strong {
  flex: 0 0 auto;
  color: var(--gold-deep);
  font-size: 16px;
  font-weight: 900;
}

.grand-total {
  margin-top: 4px;
  border-radius: 7px;
  background: rgba(185, 139, 66, 0.12);
  padding: 12px;
}

.grand-total span {
  color: var(--ink);
}

.grand-total strong {
  color: var(--forest-deep);
  font-size: 22px;
}

.payment-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid rgba(185, 139, 66, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(185, 139, 66, 0.1), rgba(48, 72, 63, 0.07)),
    #fffdf8;
  padding: 18px;
}

.payment-upload h3 {
  margin: 0 0 4px;
}

.payment-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.upload-control {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin: 0;
  border: 1px dashed rgba(48, 72, 63, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.74);
  color: var(--ink);
  cursor: pointer;
  padding: 14px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
}

.upload-control:hover {
  border-color: rgba(185, 139, 66, 0.7);
  background: #fffaf1;
  box-shadow: 0 14px 28px rgba(52, 39, 23, 0.1);
  transform: translateY(-1px);
}

.upload-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-deep), var(--forest));
  color: #fffaf1;
  font-size: 24px;
  font-weight: 800;
}

.upload-control strong,
.upload-control small {
  display: block;
}

.upload-control strong {
  color: var(--ink);
  font-size: 14px;
}

.upload-control small {
  max-width: 220px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screenshot-preview img {
  display: block;
  max-width: 220px;
  margin-top: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

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

.footer {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 22px, var(--max-width));
    margin: 16px auto;
  }

  .card {
    padding: 18px;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 32px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions button {
    width: 100%;
  }

  .calendar-grid {
    gap: 4px;
  }

  .payment-upload {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
