@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2B1A22;
  --muted: #6E5560;
  --berry: #9B2C5A;
  --rose: #F4DCE4;
  --ground: #FAF1F3;
  --line: #E6C9D3;
  --gold: #A97C3F;
  --white: #FFFFFF;
  --display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Intro */

.intro { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.intro-crown { color: var(--gold); }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 13.5vw, 76px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

/* Filters */

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.filter {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.filter[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }

.notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  font-size: 15px;
}

.empty { margin: 0; font-size: 17px; text-align: center; }

/* Wishes */

.wishes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wish {
  position: relative;
  min-width: 0;
  padding: 12px;
  border-radius: 20px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.wish[hidden] { display: none; }

.wish-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

/* Photos sit in an arched frame. The extra top padding keeps the product clear of the curve. */
.wish-image {
  display: block;
  width: 100%;
  height: 140px;
  padding: 24px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 12px 12px;
  background: var(--white);
  object-fit: contain;
}

.wish-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0 2px; }

.wish-name {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  hyphens: auto;
  overflow-wrap: break-word;
}

.wish-note { color: var(--muted); font-size: 13px; line-height: 1.35; }
.wish-price { margin-top: 6px; font-size: 16px; line-height: 1.2; font-weight: 700; }

/* The favourite wish spans the full width on a soft rose card and carries a small crown. */
.size-gross { grid-column: 1 / -1; padding: 16px; background: var(--rose); }
.size-gross .wish-link { flex-direction: row; align-items: center; gap: 18px; }
.size-gross .wish-image { flex: none; width: 124px; height: 148px; border-color: transparent; }
.size-gross .wish-text { padding-right: 30px; }
.size-gross .wish-name { hyphens: manual; font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: -0.01em; }
.size-gross .wish-note { color: var(--ink); font-size: 14px; }
.size-gross .wish-price { font-size: 18px; }

.wish-crown { position: absolute; top: 16px; right: 16px; color: var(--berry); }

/* Buttons */

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.wish .button { background: var(--berry); color: var(--white); padding: 0 8px; white-space: nowrap; }
.button:disabled { opacity: 0.6; cursor: default; }

.wish-status {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.undo {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Taken wishes turn grey so the free ones stand out. */
.wish.is-taken { background: #ECE8E9; color: #6B6467; }
.wish.is-taken .wish-note { color: inherit; }
.wish.is-taken .wish-image { border-color: transparent; background: #F6F4F4; filter: grayscale(1); opacity: 0.45; }
.wish.is-taken .wish-status { color: inherit; }

.wish-divider {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.wish-divider[hidden] { display: none; }

/* Confirm dialog */

.confirm {
  width: min(340px, calc(100vw - 40px));
  padding: 26px 22px 22px;
  border: 0;
  border-radius: 24px;
  background: var(--white);
  color: var(--ink);
  text-align: center;
}

.confirm::backdrop { background: rgba(43, 26, 34, 0.5); }
.confirm h2 { margin: 0 0 8px; font-family: var(--display); font-size: 30px; line-height: 1.05; font-weight: 400; }
.confirm p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.confirm-actions { display: flex; flex-direction: column; gap: 8px; }
.button-primary { background: var(--berry); color: var(--white); }
.button-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.legal { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.legal p { margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 46em; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (min-width: 700px) {
  .page { padding: 56px 32px 40px; gap: 32px; }
  .wishes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

/* Admin page */

.admin { max-width: 520px; }
.admin-title { font-size: clamp(34px, 9.5vw, 46px); }
.admin-sections { display: flex; flex-direction: column; gap: 16px; }
.admin-sections[hidden], .panel[hidden], .stack[hidden] { display: none; }

.panel {
  padding: 18px 16px;
  border-radius: 20px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1.1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

/* 16px keeps iOS from zooming into a field when it gets focus. */
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  resize: vertical;
}

.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--berry); }

.admin .button { min-height: 48px; font-size: 15px; }

.admin-preview {
  align-self: center;
  width: 140px;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: contain;
}

.admin-preview[hidden] { display: none; }

.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.admin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.admin-item:first-child { border-top: 0; padding-top: 0; }
.admin-item img { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: contain; }
.admin-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.25; }
.admin-item-text span { color: var(--muted); font-size: 13px; }
.admin .admin-delete { flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; }
.admin-empty { margin: 0; color: var(--muted); font-size: 15px; }

.admin-links { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; font-size: 14px; font-weight: 600; }
.admin-links a { color: var(--ink); text-underline-offset: 3px; }
