:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --card: #ffffff;
  --ink: #111111;
  --muted: #6f6d67;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(17, 17, 17, 0.28);
  --soft: #eeebe5;
  --shadow: 0 18px 42px rgba(26, 24, 20, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  text-rendering: geometricPrecision;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #fbfaf7 0%, var(--bg) 42%, #f4f2ed 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 76px 48px 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 38px;
}

.hero h2 {
  max-width: 920px;
  margin: 0;
  font-size: 4.1rem;
  line-height: 0.98;
  font-weight: 790;
  letter-spacing: 0;
}

.hero h2 span {
  display: block;
}

.hero p {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.55;
  letter-spacing: 0;
}

.hero-art {
  width: min(100%, 430px);
  min-width: 300px;
  justify-self: end;
  color: #111111;
  opacity: 0.92;
}

.hero-art path,
.hero-art ellipse,
.hero-art circle {
  vector-effect: non-scaling-stroke;
}

.hero-art__wave {
  stroke-width: 2.4;
}

.hero-art__sparkle {
  stroke-width: 1.9;
}

.hero-art__sparkle.small {
  stroke-width: 1.6;
}

.hero-art__sparkle.tiny {
  stroke-width: 1.5;
}

.hero-art ellipse,
.hero-art g > circle {
  stroke-width: 1.8;
}

.hero-art__dots {
  opacity: 0.2;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.wishlist-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.item-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #f0eee8;
  object-fit: cover;
}

.wishlist-card h2 {
  margin: 15px 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.28;
  font-weight: 690;
  letter-spacing: 0;
}

.item-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 18px 0 20px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.need {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow-wrap: anywhere;
}

.need-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #111111;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price {
  max-width: 11rem;
  color: #30302e;
  text-align: right;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-button {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: 0;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.gift-button:hover {
  transform: translateY(-1px);
  background: #272727;
  border-color: #272727;
}

.gift-button:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.18);
  outline-offset: 3px;
}

.wishlist-card.is-selected .gift-button {
  background: #ffffff;
  color: #151515;
  border-color: var(--line-strong);
}

.wishlist-card.is-selected .gift-button:hover {
  background: #f6f4ef;
  border-color: #111111;
}

.gift-button:disabled {
  border-color: transparent;
  background: var(--soft);
  color: #8b8881;
  cursor: not-allowed;
  transform: none;
}

.gift-button:disabled:hover {
  background: var(--soft);
}

@media (max-width: 1240px) {
  .page-shell {
    padding-right: 36px;
    padding-left: 36px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 36px;
  }

  .hero h2 {
    font-size: 3.35rem;
  }

  .wishlist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding-top: 48px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 30px;
  }

  .hero h2 {
    font-size: 2.75rem;
    line-height: 1.03;
  }

  .hero p {
    margin-top: 18px;
    font-size: 1.06rem;
  }

  .hero-art {
    display: none;
  }

  .wishlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 34px 18px 44px;
  }

  .hero h2 {
    font-size: 2.18rem;
    line-height: 1.08;
  }

  .hero p {
    font-size: 1rem;
  }

  .wishlist-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .item-meta {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    margin-bottom: 18px;
  }

  .price {
    max-width: 9.5rem;
    text-align: right;
  }
}

.admin-body {
  background: #f4f2ed;
}

.admin-shell,
.admin-login {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.admin-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.admin-topbar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-topbar h1,
.admin-panel h1,
.admin-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.admin-topbar h1,
.admin-panel h1 {
  font-size: 2rem;
  line-height: 1.1;
}

.admin-topbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-panel {
  width: 100%;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-panel h2 {
  margin-bottom: 18px;
  font-size: 1.2rem;
}

.admin-form,
.admin-grid-form,
.admin-item {
  display: grid;
  gap: 14px;
}

.admin-grid-form {
  grid-template-columns: minmax(170px, 1.4fr) minmax(140px, 1fr) minmax(120px, 0.8fr) minmax(170px, 1fr) minmax(150px, 1fr) 100px auto;
  align-items: end;
}

.admin-items {
  display: grid;
  gap: 14px;
}

.admin-item {
  grid-template-columns: 92px minmax(150px, 1.2fr) minmax(140px, 0.9fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) 80px auto auto auto auto;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.admin-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
}

.admin-form label,
.admin-grid-form label,
.admin-item label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.admin-form input,
.admin-grid-form input,
.admin-grid-form select,
.admin-item input,
.admin-item select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.admin-check {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  white-space: nowrap;
}

.admin-check input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.admin-form button,
.admin-grid-form button,
.admin-item button,
.admin-link-button {
  min-height: 40px;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  padding: 0 18px;
  font-weight: 620;
}

.admin-link-button {
  background: #ffffff;
  color: #111111;
  border-color: var(--line-strong);
}

.admin-danger-button {
  background: #ffffff !important;
  color: #7a281d !important;
  border-color: rgba(122, 40, 29, 0.34) !important;
}

.admin-flashes {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-flash,
.admin-warning {
  margin: 0;
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 0.94rem;
}

.admin-flash--success {
  background: #eef4ed;
  color: #274329;
}

.admin-flash--error,
.admin-warning {
  background: #f7ece8;
  color: #613528;
}

@media (max-width: 1040px) {
  .admin-grid-form,
  .admin-item {
    grid-template-columns: 1fr 1fr;
  }

  .admin-item img {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .admin-shell,
  .admin-login {
    padding: 24px 14px 42px;
  }

  .admin-topbar {
    display: grid;
  }

  .admin-grid-form,
  .admin-item {
    grid-template-columns: 1fr;
  }
}
