:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --primary: #111827;
  --primary-ink: #ffffff;

  --soft: #f3f4f6;
  --ok-bg: #ecfdf3;
  --ok-bd: #bbf7d0;
  --ok-tx: #166534;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(17,24,39,.08);

  --w: 980px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background:
    radial-gradient(900px 380px at 15% 0%, rgba(99,102,241,.10), transparent 60%),
    radial-gradient(700px 320px at 85% 10%, rgba(16,185,129,.08), transparent 55%),
    var(--bg);
}

.page{ min-height: 100%; }

.topbar{
  max-width: var(--w);
  margin: 0 auto;
  padding: 18px 18px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.brand{
  display:flex; align-items:center; gap: 12px;
}
.logo{
  width: 44px; height: 44px;
  display:grid; place-items:center;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(17,24,39,.05);
}
.brand-title{
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: 18px;
  line-height: 1.1;
}
.brand-subtitle{
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.topbar-actions{ display:flex; gap: 10px; }

.shell{
  max-width: var(--w);
  margin: 0 auto;
  padding: 18px;
  display:grid;
  gap: 14px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section{ padding: 18px; }
.hero{
  padding: 18px;
  display:grid;
  gap: 16px;
}
@media (min-width: 900px){
  .hero{ grid-template-columns: 1.2fr .8fr; align-items:start; }
}

.kicker{
  display:inline-flex;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

h1{
  margin: 10px 0 8px;
  font-size: clamp(22px, 3.2vw, 36px);
  letter-spacing: -.03em;
  line-height: 1.08;
}

h2{
  margin: 0 0 8px;
  letter-spacing: -.02em;
}

.lead{
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 62ch;
}

.muted{ color: var(--muted); }

.hero-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.meta{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 560px){
  .meta{ grid-template-columns: 1fr; }
}
.meta-item{
  border: 1px solid var(--border);
  background: #fafafa;
  border-radius: 14px;
  padding: 10px 12px;
}
.meta-label{ font-size: 12px; color: var(--muted); font-weight: 700; }
.meta-value{ font-weight: 900; margin-top: 2px; }

.summary{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fafafa;
}
.summary-row{
  display:flex; justify-content:space-between; align-items:center;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--border);
}
.summary-row:last-child{ border-bottom: none; }
.summary-row span{ color: var(--muted); font-weight: 700; }
.summary-row strong{ font-size: 18px; }

.note{
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.note-title{ font-weight: 900; margin-bottom: 4px; }
.note-text{ color: var(--muted); }

.btn{
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 20px rgba(17,24,39,.06); }
.btn:active{ transform: translateY(0); }

.btn-primary{
  background: var(--primary);
  color: var(--primary-ink);
  border-color: rgba(17,24,39,.9);
}
.btn-soft{
  background: var(--soft);
}
.btn-ghost{
  background: transparent;
}

.input,.select{
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  outline: none;
  font-weight: 700;
}
.select{ cursor:pointer; }

.info-grid{
  margin-top: 12px;
  display:grid;
  gap: 10px;
}
@media (min-width: 860px){
  .info-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.info{
  border: 1px solid var(--border);
  background: #fafafa;
  border-radius: 16px;
  padding: 12px;
}
.info-title{ font-weight: 900; margin-bottom: 4px; }
.info-text{ color: var(--muted); }

.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.controls{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.controls > *{ min-width: 220px; }

.grid{
  display:grid;
  gap: 12px;
}
@media (min-width: 860px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gift{
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  display:flex;
  flex-direction:column;
  gap: 10px;
  min-height: 210px;
}
.gift-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.price{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}
.gift-title{
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}
.gift-desc{
  margin: 0;
  color: var(--muted);
  flex: 1;
}
.gift-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--soft);
}
.badge-ok{
  background: var(--ok-bg);
  border-color: var(--ok-bd);
  color: var(--ok-tx);
}
.badge-muted{
  background: #f3f4f6;
  color: #374151;
}

.footer-hint{
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.empty{
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align:center;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
}
.modal[aria-hidden="false"]{ display:block; }
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(17,24,39,.45);
}
.modal-card{
  position: relative;
  width: min(520px, calc(100% - 28px));
  margin: 10vh auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal-head{
  padding: 14px 14px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-title{ font-weight: 950; }
.modal-subtitle{ color: var(--muted); font-weight: 700; font-size: 13px; margin-top: 2px; }
.modal-body{ padding: 14px; display:grid; gap: 10px; }
.label{ display:grid; gap: 6px; font-weight: 900; font-size: 13px; }
.modal-actions{ display:flex; justify-content:flex-end; gap: 10px; margin-top: 6px; }
.icon-btn{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  width: 36px; height: 36px;
  cursor:pointer;
  font-weight: 900;
}
.tiny{ font-size: 12px; }
