:root {
  color-scheme: light;
  --ink: #25211d;
  --muted: #766f68;
  --paper: #fffaf2;
  --panel: #ffffff;
  --line: #e8ddd0;
  --rose: #d94f70;
  --rose-dark: #a92949;
  --mint: #287d74;
  --sun: #f2b84b;
  --blue: #3f6fb5;
  --shadow: 0 18px 48px rgba(54, 39, 22, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 15%, rgba(242, 184, 75, 0.22), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(63, 111, 181, 0.14), transparent 26rem),
    linear-gradient(180deg, #fff7e9 0%, #f7eee5 54%, #fdf8ef 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(720px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(232, 221, 208, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(255, 250, 242, 0.97) 0%, rgba(255, 250, 242, 0.84) 45%, rgba(255, 250, 242, 0.22) 100%),
    linear-gradient(135deg, #f9d4d8, #f7ebc1 43%, #b7e2dd 100%);
  box-shadow: var(--shadow);
}

.hero__content {
  align-self: center;
  width: min(640px, 100%);
  padding: clamp(32px, 6vw, 72px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  line-height: 0.88;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.hero__copy {
  max-width: 520px;
  margin: 24px 0 0;
  color: #554c43;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.hero__actions,
.wall-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__actions {
  margin-top: 32px;
}

.button,
.icon-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button {
  padding: 0 20px;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--rose);
  color: white;
  box-shadow: 0 12px 24px rgba(217, 79, 112, 0.24);
}

.button--secondary,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.hero__media {
  position: absolute;
  inset: auto -70px -120px auto;
  width: min(560px, 56vw);
  height: 78%;
  transform: rotate(-8deg);
}

.photo-strip {
  position: absolute;
  display: grid;
  gap: 16px;
  width: 180px;
}

.photo-strip span {
  display: block;
  aspect-ratio: 4 / 5;
  border: 10px solid #fffdf8;
  border-bottom-width: 34px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 46%),
    var(--strip-color, #b7e2dd);
  box-shadow: 0 14px 32px rgba(52, 43, 34, 0.18);
}

.photo-strip--one {
  right: 260px;
  bottom: 36px;
  --strip-color: #ffd0dc;
}

.photo-strip--two {
  right: 48px;
  bottom: 0;
  --strip-color: #b7e2dd;
}

.photo-strip--one span:nth-child(2),
.photo-strip--two span:nth-child(1) {
  --strip-color: #f2b84b;
}

.photo-strip--one span:nth-child(3),
.photo-strip--two span:nth-child(2) {
  --strip-color: #9cc0ee;
}

.control-panel,
.starter-panel,
.composer,
.wish-wall {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 36px rgba(54, 39, 22, 0.08);
}

.control-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  padding: 18px;
}

.starter-panel,
.composer,
.wish-wall {
  padding: clamp(20px, 4vw, 36px);
}

.create-wall-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 24px;
}

.link-panel {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.copy-row input {
  min-width: 0;
  color: #554c43;
}

.wish-form {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin-top: 24px;
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 270px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cdbdad;
  border-radius: 8px;
  background: #fffaf2;
  cursor: pointer;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-box__preview {
  width: 100%;
  height: 100%;
  min-height: 270px;
  background:
    linear-gradient(135deg, rgba(217, 79, 112, 0.24), transparent 45%),
    linear-gradient(45deg, rgba(40, 125, 116, 0.18), transparent 55%),
    #fff4e5;
  background-position: center;
  background-size: cover;
}

.upload-box__text {
  position: absolute;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(37, 33, 29, 0.84);
  color: white;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.field--compact {
  width: min(320px, 100%);
}

.field--full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

input {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 142px;
  resize: vertical;
  padding: 14px;
  line-height: 1.55;
}

#note-input {
  font-family: Caveat, "Bradley Hand", cursive;
  font-size: 1.5rem;
  font-weight: 600;
}

input:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(40, 125, 116, 0.12);
}

.toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.toggle input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--rose);
}

.wall-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

.icon-button {
  padding: 0 14px;
}

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

.wish-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(54, 39, 22, 0.09);
}

.wish-card__photo {
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border: 3px solid #fff7e9;
  border-radius: 50%;
  object-fit: cover;
  background: #f5e9dc;
  box-shadow: 0 8px 18px rgba(54, 39, 22, 0.12);
}

.wish-card__body {
  min-width: 0;
}

.wish-card__wish {
  margin: 0;
  color: var(--rose-dark);
  font-weight: 900;
}

.wish-card__note {
  margin: 12px 0 18px;
  color: #4f463e;
  font-family: Caveat, "Bradley Hand", cursive;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.55;
}

.wish-card__name {
  margin: 0;
  color: var(--mint);
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed #cdbdad;
  border-radius: 8px;
  background: #fffaf2;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #25211d;
  color: white;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body:not(.celebrating) .confetti {
  display: none;
}

body.shared-card .hero,
body.shared-card .control-panel,
body.shared-card .starter-panel,
body.shared-card .composer,
body.shared-card #clear-wishes {
  display: none;
}

body.home-mode #scroll-to-form,
body.home-mode #copy-card-link,
body.home-mode .control-panel,
body.home-mode .composer,
body.home-mode .wish-wall {
  display: none;
}

body.wall-mode #create-wall-button,
body.wall-mode .starter-panel {
  display: none;
}

body.contributor-mode #copy-card-link,
body.contributor-mode .control-panel,
body.contributor-mode #clear-wishes {
  display: none;
}

body.admin-mode .starter-panel {
  display: block;
}

body.admin-mode .create-wall-form {
  display: none;
}

body.shared-card .app-shell {
  padding-top: 24px;
}

body.shared-card .wish-wall {
  margin-top: 0;
}

body.shared-card .wall-heading {
  display: block;
  text-align: center;
}

body.shared-card #wall-title::before {
  content: "Happy Birthday, ";
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .hero {
    min-height: 640px;
  }

  .hero__media {
    width: 520px;
    opacity: 0.42;
  }

  .wish-form,
  .create-wall-form,
  .form-grid,
  .wishes-grid {
    grid-template-columns: 1fr;
  }

  .upload-box,
  .upload-box__preview {
    min-height: 250px;
  }
}

@media (max-width: 520px) {
  .hero__content {
    padding: 28px 20px;
  }

  .hero__actions .button,
  .control-panel .field,
  .control-panel .toggle,
  .copy-row .button {
    width: 100%;
  }

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

  .button {
    width: 100%;
  }

  .wall-heading {
    align-items: flex-start;
  }

  .wish-card {
    gap: 12px;
    padding: 14px;
  }

  .wish-card__photo {
    width: 58px;
    height: 58px;
  }
}
