:root {
  --background: #fff8f6;
  --card: #ffffff;
  --text: #281d20;
  --muted: #78686d;
  --accent: #e63b5f;
  --accent-dark: #c9284b;
  --border: #eadbd8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, #ffdbe3 0, transparent 28rem),
    radial-gradient(circle at 90% 8%, #dff4ef 0, transparent 24rem),
    var(--background);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  min-height: 100vh;
}

button, input, textarea { font: inherit; }

.header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 45px 0 80px;
}

.intro { max-width: 720px; margin-bottom: 42px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 13px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(230, 59, 95, .2);
  border-radius: 999px;
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -.045em;
}

.intro > p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 620px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}

.button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button:disabled { background: #aaa; cursor: default; transform: none; }
.button-small { padding: 11px 17px; }

.status {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, .58);
}

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

.gift-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 430px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 16px 42px rgba(76, 49, 56, .08);
}

.gift-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ffe4ea, #f4ece9 50%, #dcefeb);
}

.gift-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.gift-image[src=""] { display: none; }

.gift-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 56px;
}

.gift-image:not([src=""]) + .gift-placeholder { display: none; }

.reserved-label {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 8px 12px;
  color: white;
  background: var(--text);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.gift-card.reserved .reserved-label { display: block; }

.gift-content { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.gift-title { margin: 0; font-size: 22px; line-height: 1.2; }
.gift-description { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.gift-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 22px; }
.gift-link { color: var(--accent-dark); text-align: center; font-size: 14px; font-weight: 700; }
.gift-link:not([href]) { display: none; }

.modal {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 26px;
  box-shadow: 0 25px 80px rgba(44, 26, 31, .25);
}

.modal::backdrop { background: rgba(31, 18, 22, .55); backdrop-filter: blur(3px); }
.gift-form { display: grid; gap: 17px; padding: 28px; }
.modal-heading { display: flex; justify-content: space-between; gap: 20px; }
.modal-heading h2 { margin: 0; font-size: 28px; }
.modal-heading p { margin: 7px 0 0; color: var(--muted); }
.close { align-self: start; border: 0; background: none; cursor: pointer; font-size: 30px; line-height: 1; }

label { display: grid; gap: 8px; font-weight: 700; }
label span { color: var(--muted); font-size: 13px; font-weight: 400; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: white; }
input:focus, textarea:focus { outline: 3px solid rgba(230, 59, 95, .14); border-color: var(--accent); }
textarea { resize: vertical; }

@media (max-width: 850px) { .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 560px) {
  .header, .container { width: min(100% - 28px, 1120px); }
  .header { padding-top: 18px; }
  .container { padding-top: 28px; }
  .button-small { padding: 10px 13px; font-size: 14px; }
  .gift-grid { grid-template-columns: 1fr; }
  .gift-form { padding: 22px; }
}
