:root {
  --ink: #382b58;
  --purple: #8f6be8;
  --pink: #ff6ba8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, #ffdeeb, transparent 40%),
    radial-gradient(circle at 90% 0%, #d7faf3, transparent 38%),
    #f9f3ff;
}

.wrap {
  max-width: 900px;
  margin: auto;
  padding: 24px;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.7rem);
  margin: 35px 0 10px;
}

.gradient {
  color: var(--purple);
}

.intro {
  line-height: 1.6;
}

.card {
  background: white;
  padding: 24px;
  border-radius: 23px;
  box-shadow: 0 15px 40px #51378120;
  margin: 20px 0;
  max-width: 560px;
}

label {
  display: block;
  font-weight: 800;
  margin: 14px 0 5px;
}

input {
  width: 100%;
  border: 2px solid #e8dafa;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

button {
  border: 0;
  border-radius: 13px;
  padding: 12px 17px;
  font: inherit;
  font-weight: 900;
  background: linear-gradient(100deg, var(--pink), var(--purple));
  color: white;
  cursor: pointer;
  margin-top: 15px;
}

button.secondary {
  background: #efe5ff;
  color: var(--ink);
}

button:disabled {
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #37bdb6;
  outline-offset: 3px;
}

.muted {
  color: #6d6285;
  line-height: 1.6;
}

.status {
  margin: 18px 0;
  padding: 12px;
  border-radius: 12px;
  background: #fff1c2;
  font-weight: 800;
}

.hide,
.row.hide {
  display: none;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row button {
  margin-top: 8px;
}

.gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #e8dafa;
  padding: 14px 0;
}

.gift-item img {
  display: block;
  width: min(100%, 220px);
  border: 1px solid #e8dafa;
  border-radius: 12px;
  margin-top: 8px;
}

.gift-flower {
  font-size: 2rem;
}

.gift-item button {
  margin-top: 0;
}

.gift-settings {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 26px 0;
  padding: clamp(17px, 4vw, 25px);
  border: 2px solid #f1d9f2;
  border-radius: 25px;
  background:
    radial-gradient(circle at 98% 1%, #ffe2aa 0, transparent 30%),
    radial-gradient(circle at 0% 100%, #d5f9ee 0, transparent 38%),
    linear-gradient(145deg, #fff4fa 0%, #fcf5ff 60%, #f4f0ff);
  box-shadow: 0 9px 25px #9c6fa61c, inset 0 1px #fff;
}

.gift-settings-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}

.gift-settings-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  font-size: 1.75rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 0 #efd6f0, 0 8px 16px #a17caf20;
  transform: rotate(-5deg);
}

.gift-settings-eyebrow {
  margin: 0 0 3px;
  color: #9564a6;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .065em;
}

.gift-settings-heading h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -.025em;
}

.gift-settings-sparkles {
  margin-left: auto;
  color: #e9a44c;
  font-size: 1.3rem;
  white-space: nowrap;
}

.gift-settings .gift-preference {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  min-height: 91px;
  padding: 15px 16px;
  border: 2px solid #efdfef;
  border-radius: 19px;
  background: #fffefa;
  box-shadow: 0 5px 0 #e9dce9, 0 9px 18px #9f7dbb10;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.gift-preference:has(input:checked) {
  background: #fffefa;
  border-color: #d5c3f7;
}

.gift-preference:focus-within {
  outline: 3px solid #37bdb6;
  outline-offset: 4px;
}

.gift-preference-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.gift-preference-title {
  color: #493463;
  font-size: 1rem;
  font-weight: 900;
}

.gift-preference-description {
  color: #776989;
  font-size: .86rem;
  line-height: 1.45;
  font-weight: 600;
}

.gift-preference input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  opacity: 0;
}

.gift-switch {
  display: flex;
  align-items: center;
  flex: 0 0 65px;
  width: 65px;
  height: 38px;
  padding: 4px;
  border: 2px solid #d6c9de;
  border-radius: 99px;
  background: #e8e0eb;
  box-shadow: inset 0 2px 5px #5636651f;
  transition: background .2s, border-color .2s;
}

.gift-switch-thumb {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #ad93b8;
  background: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 2px 6px #4b385032;
  transition: transform .2s, color .2s;
}

.gift-preference input:checked + .gift-switch {
  background: linear-gradient(110deg, #ff86b5, #9a7deb);
  border-color: #bd93ed;
}

.gift-preference input:checked + .gift-switch .gift-switch-thumb {
  transform: translateX(27px);
  color: #ec68a3;
}

.gift-preference input:disabled + .gift-switch {
  opacity: .55;
}

.gift-preference-status {
  display: inline-flex;
  margin: 17px 0 5px;
  padding: 7px 12px;
  border-radius: 99px;
  color: #82688a;
  background: #f1e6f5;
  font-size: .85rem;
  font-weight: 900;
}

.gift-preference-status.is-open {
  color: #316c65;
  background: #dbf7ee;
}

.gift-preference-note {
  margin: 8px 0 0;
  color: #756a83;
  font-size: .83rem;
  line-height: 1.5;
}

@media (max-width: 440px) {
  .gift-settings .gift-preference { padding: 12px 11px; }
  .gift-switch { flex-basis: 60px; width: 60px; }
  .gift-preference input:checked + .gift-switch .gift-switch-thumb { transform: translateX(22px); }
  .gift-settings-sparkles { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gift-preference, .gift-switch, .gift-switch-thumb { transition: none; }
}
