:root {
  --sky: #e4e5d4;
  --teal: #86aaae;
  --teal-deep: #6b9398;
  --navy: #2c4575;
  --cranberry: #b3312c;
  --gold: #eeb13c;
  --ink: #2b2b2b;
  --card: #fbfaf4;
  --line: #cfd6d0;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle, rgba(255,255,255,.8) 1.4px, transparent 2px) 0 0 / 28px 28px,
    radial-gradient(circle, rgba(255,255,255,.6) 1.2px, transparent 1.8px) 14px 17px / 28px 28px,
    var(--sky);
}

.wrap { max-width: 34rem; margin: 0 auto; padding-inline: 20px; }

h1, h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.1;
}

.hero { text-align: center; padding-block: 28px 4px; }

.portrait {
  display: block;
  width: min(78vw, 340px);
  height: auto;
  margin: 0 auto;
  border-radius: 50%;
}

h1 { font-size: clamp(2.1rem, 9vw, 3rem); margin: 22px 0 6px; }

.dates { margin: 0; color: var(--cranberry); font-weight: 800; font-size: 1.1rem; }

.gate { padding-block: 24px 64px; }

.unlock { display: flex; flex-direction: column; gap: 12px; max-width: 20rem; margin: 0 auto; }

.unlock .field { margin: 0 0 -12px; }

.cabin { text-align: center; padding-block: 28px 36px; }

.cabin h2 { font-size: 1.5rem; margin: 0 0 8px; }

address { font-style: normal; font-size: 1.1rem; margin-bottom: 16px; }

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  background: rgba(255,255,255,.6);
}

.mountains { display: block; width: 100%; height: 48px; margin-bottom: -1px; }

.activities {
  padding-block: 0 56px;
  background:
    radial-gradient(circle, rgba(255,255,255,.3) 1.6px, transparent 2.1px) 0 0 / 14px 14px,
    var(--teal);
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 24px 18px 20px;
  box-shadow: 0 6px 20px rgba(44,69,117,.18);
}

.card h2 { font-size: 1.6rem; margin: 0 0 16px; }

.saved-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 5.6em;
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e7e7e2;
  color: #6b6f6c;
  font: 800 .85rem/1.2 "Nunito", system-ui, sans-serif;
  vertical-align: middle;
}

.card.is-saved .saved-pill { background: #e1f0e3; color: #2f6e45; }

.card.is-saved .rank li { border-color: #9fcba8; }

.card.is-saved button[type="submit"] { background: #2f6e45; }

.card.is-saved .status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.field { display: block; font-weight: 800; color: var(--navy); margin-bottom: 20px; }

input[type="text"], textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px rgba(107,147,152,.25);
}

.hero--compact { padding-block: 18px 0; }

.hero--compact .portrait { width: auto; height: min(30vh, 230px); }

.hero--compact h1 { margin: 12px 0 4px; font-size: clamp(1.9rem, 8vw, 2.6rem); }

.cabin--compact { padding-block: 12px 18px; }

.cabin--compact address { margin-bottom: 10px; }

.rank {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  counter-reset: rank;
}

.rank li {
  counter-increment: rank;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.rank li::before {
  content: counter(rank);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e7e7e2;
  color: #6b6f6c;
  font-size: .9rem;
  font-weight: 800;
}

.rank li:nth-child(1)::before { background: #a34239; color: #ffffff; }

.rank li:nth-child(2)::before { background: #e3943e; color: #1a2742; }

.rank li:nth-child(3)::before { background: #d9ac60; color: #1a2742; }

.rank li:nth-child(4)::before { background: #85acb0; color: #1a2742; }

.rank li:nth-child(5)::before { background: #465a7c; color: #ffffff; }

.rank .label { padding-block: 8px; line-height: 1.3; }

.rank .grip { margin-left: auto; opacity: .5; letter-spacing: -2px; }

.toss, .restore {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.toss { color: var(--cranberry); }

.restore { margin-left: auto; color: var(--teal-deep); }

.rank .restore, .set-aside-list .toss, .set-aside-list .grip { display: none; }

.set-aside { margin: -4px 0 22px; }

.set-aside summary { padding: 6px 0; color: var(--navy); font-weight: 800; cursor: pointer; }

.set-aside-list { list-style: none; margin: 8px 0 0; padding: 0; }

.set-aside-list li {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  margin-bottom: 6px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  color: #6b6f6c;
  font-weight: 700;
}

.rank .sortable-ghost { opacity: .35; }

.rank .sortable-chosen { box-shadow: 0 8px 18px rgba(44,69,117,.28); }

button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}

button[type="submit"]:disabled { opacity: .6; }

.status { min-height: 1.5em; margin: 12px 0 0; text-align: center; font-weight: 800; color: var(--navy); }

.trap { position: absolute; left: -9999px; }
