:root {
  color-scheme: dark;
  --bg: #090b0e;
  --surface: #12161b;
  --surface-2: #181d24;
  --surface-3: #20262e;
  --line: #29313b;
  --text: #f5f7f9;
  --muted: #929ba8;
  --accent: #adff2f;
  --accent-soft: rgba(173, 255, 47, .12);
  --success: #72e8a1;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(900px 430px at 50% -270px, rgba(126, 176, 48, .2), transparent 72%),
    var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px max(22px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(9, 11, 14, .82);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  box-shadow: 0 8px 30px rgba(173, 255, 47, .16);
  color: #10140b;
  font-size: 19px;
  font-weight: 950;
}
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

main { width: min(1280px, calc(100% - 44px)); margin: auto; }
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding: 66px 0 44px;
}
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 13px 0 0;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -.055em;
}
.intro h1 em { color: #89919c; font-style: normal; }
.steps { display: grid; min-width: 275px; gap: 9px; color: #cbd1d8; }
.steps span { display: flex; align-items: center; gap: 10px; }
.steps i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.catalog-head { position: relative; z-index: 5; }
.search {
  display: flex;
  height: 58px;
  align-items: center;
  gap: 13px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search:focus-within { border-color: #647341; background: #14191e; box-shadow: 0 0 0 4px rgba(173, 255, 47, .05); }
.search span { color: var(--accent); font-size: 26px; line-height: 1; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.search input::placeholder { color: #727b87; }
.search kbd { padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px; color: #737c88; font-size: 10px; }
.filter-row { display: flex; gap: 9px; overflow-x: auto; padding: 13px 0 6px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  height: 42px;
  flex: none;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: #e1e5e9;
  cursor: pointer;
  transition: transform .15s, color .15s, border-color .15s, background .15s;
}
.chip:hover { transform: translateY(-1px); border-color: #46513a; }
.chip.active, .chip[aria-expanded="true"] { border-color: #637740; background: var(--accent-soft); color: var(--accent); }
.chip span { display: inline-block; margin-left: 6px; color: #7c8590; transition: transform .18s; }
.chip[aria-expanded="true"] span { transform: rotate(180deg); }
.chip.reset { border-color: transparent; background: transparent; color: #ff9aa3; }
.result-line { display: flex; align-items: center; justify-content: flex-end; padding: 20px 2px 15px; color: var(--muted); font-size: 12px; }
.result-line b { color: #e5e8ec; font-size: 13px; }
.result-line span { display: flex; align-items: center; gap: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(114, 232, 161, .45); animation: pulse 2s infinite; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: #46515e; box-shadow: 0 22px 55px rgba(0, 0, 0, .34); }
.card:focus-visible { outline: 3px solid rgba(173, 255, 47, .35); outline-offset: 3px; }
.art, .detail-art {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.08;
  place-items: center;
  background: radial-gradient(circle at 50% 38%, var(--c, #334453), var(--e, #17202a));
}
.art::before { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 42%); content: ""; }
.art::after, .detail-art::after { position: absolute; right: 13%; bottom: 3%; left: 13%; height: 17%; border-radius: 50%; background: #000; content: ""; filter: blur(22px); opacity: .2; }
.art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .22s; }
.art img.is-fallback { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 15px 22px rgba(0, 0, 0, .2)); }
.card:hover .art img { transform: scale(1.045); }
.card-body { display: block; padding: 17px 17px 16px; }
.card-title { display: block; overflow: hidden; font-size: 15px; font-weight: 800; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { display: flex; min-height: 19px; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.card-sub span:last-child { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.card-price { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .065); }
.card-price b { font-size: 18px; letter-spacing: -.02em; }
.card-price i { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--accent); color: #0d1207; font-size: 18px; font-style: normal; font-weight: 900; transition: transform .18s, box-shadow .18s; }
.card:hover .card-price i { transform: translateX(2px); box-shadow: 0 7px 20px rgba(173, 255, 47, .16); }
.skeleton { height: 390px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 20%, #20262d 35%, var(--surface) 50%); background-size: 300% 100%; animation: shine 1.3s infinite; }
.empty { grid-column: 1 / -1; padding: 75px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty b { display: inline-block; margin-bottom: 5px; color: var(--text); font-size: 17px; }
.load-wrap { display: flex; justify-content: center; padding: 34px; }
.load-more, .primary, .secondary { height: 49px; padding: 0 23px; border: 0; border-radius: 14px; font-weight: 800; cursor: pointer; }
.load-more, .secondary { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.primary { background: var(--accent); color: #10140b; }
.primary:disabled { cursor: wait; opacity: .58; }

footer { display: flex; width: min(1280px, calc(100% - 44px)); justify-content: space-between; margin: 54px auto 0; padding: 29px 0 max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer b { color: #e3e7eb; }

.filter-menu {
  position: fixed;
  z-index: 70;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: hidden;
  padding: 20px;
  border: 1px solid #343d48;
  border-radius: 20px;
  background: rgba(18, 22, 27, .98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
  backdrop-filter: blur(20px);
  animation: dropdown-in .18s ease-out;
}
.filter-menu[hidden] { display: none; }
.filter-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.filter-menu h2 { margin: 5px 0 15px; font-size: 23px; letter-spacing: -.025em; }
.close { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 21px; cursor: pointer; }
.filter-search, .field input, .field select { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: var(--surface-2); color: var(--text); padding: 0 13px; }
.filter-search:focus, .field input:focus, .field select:focus { border-color: #64763f; box-shadow: 0 0 0 3px rgba(173, 255, 47, .05); }
.option-list { display: grid; max-height: 260px; gap: 4px; overflow-y: auto; margin: 9px -6px 0; padding: 0 6px; scrollbar-color: #3b444f transparent; scrollbar-width: thin; }
.option { display: flex; min-height: 40px; align-items: center; justify-content: space-between; width: 100%; padding: 8px 11px; border: 0; border-radius: 10px; background: transparent; color: #e1e5e9; text-align: left; cursor: pointer; transition: color .14s, background .14s; }
.option:hover, .option.selected { background: var(--accent-soft); color: var(--accent); }
.option.selected::after { content: "✓"; font-weight: 900; }
.option-empty { padding: 22px 8px; color: var(--muted); text-align: center; }
.option-more { padding: 12px 8px 7px; color: var(--muted); font-size: 11px; text-align: center; }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field span { color: var(--muted); font-size: 12px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-actions { display: grid; grid-template-columns: 1fr 1.45fr; gap: 9px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }

.overlay { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(3, 4, 6, .78); backdrop-filter: blur(11px); }
.overlay[hidden] { display: none; }
.sheet { position: relative; width: min(520px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; border: 1px solid var(--line); border-radius: 24px; background: #111419; box-shadow: 0 25px 80px rgba(0, 0, 0, .55); animation: sheet-in .2s ease; }
.detail-sheet { display: grid; width: min(860px, 100%); grid-template-columns: 1.03fr .97fr; overflow: hidden; }
.detail-sheet > .close { position: absolute; z-index: 2; top: 16px; right: 16px; background: rgba(17, 20, 25, .84); }
.detail-art { min-height: 560px; aspect-ratio: auto; }
.detail-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.detail-art img.is-fallback { width: 86%; height: 86%; object-fit: contain; }
.detail-content { overflow: auto; padding: 44px 35px 31px; }
.detail-content h2 { margin: 9px 0 0; font-size: 32px; }
.gift-no { margin: 3px 0 25px; color: var(--muted); }
.traits { display: grid; gap: 8px; }
.trait { display: grid; grid-template-columns: 1fr auto; gap: 2px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.trait span { color: var(--muted); font-size: 11px; }
.trait b { grid-column: 1; font-size: 13px; }
.trait i { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--accent); font-size: 11px; font-style: normal; }
.price-box { display: grid; grid-template-columns: 1fr auto; margin: 18px 0; padding: 16px 2px 0; border-top: 1px solid var(--line); }
.price-box span, .price-box small { color: var(--muted); font-size: 11px; }
.price-box b { grid-row: 1 / 3; grid-column: 2; font-size: 25px; }
.create { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.hint { color: var(--muted); font-size: 11px; text-align: center; }
.success { padding: 17px; border: 1px solid #405b2b; border-radius: 15px; background: #182014; }
.success b { display: block; color: var(--accent); font-size: 18px; }
.success p { margin: 6px 0 14px; color: #c9d3bd; font-size: 12px; }
.success .primary { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pay-now { width: 100%; }
.pay-now.is-open:disabled { opacity: 1; cursor: default; background: #426e1d; color: #e2ffc8; }
.copy-link { width: 100%; margin-top: 10px; border: 1px solid #4a5442; background: transparent; color: #dce6d5; }
.copy-link.copied { border-color: #527a35; color: var(--accent); }
.timer { font-variant-numeric: tabular-nums; }
.error { padding: 14px; border: 1px solid #5c3035; border-radius: 12px; background: #211417; color: #ffb0b5; font-size: 12px; }
.toast { position: fixed; z-index: 80; bottom: 24px; left: 50%; padding: 11px 17px; border: 1px solid var(--line); border-radius: 999px; background: #20242a; color: #fff; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(114, 232, 161, 0); } }
@keyframes shine { to { background-position: -150% 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(15px) scale(.98); } }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-7px) scale(.98); } }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { min-height: 65px; padding: 11px 16px; }
  main { width: min(100% - 24px, 1280px); }
  .intro { display: block; padding: 39px 2px 28px; }
  .intro h1 { font-size: 43px; }
  .steps { grid-template-columns: repeat(3, 1fr); min-width: 0; gap: 6px; margin-top: 26px; }
  .steps span { display: grid; justify-items: center; gap: 6px; font-size: 10px; text-align: center; }
  .result-line span { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card-body { padding: 13px; }
  .card-price { margin-top: 13px; padding-top: 12px; }
  .card-price b { font-size: 16px; }
  .card-price i { width: 34px; height: 34px; border-radius: 11px; }
  .skeleton { height: 310px; }
  .detail-sheet { display: block; max-width: 500px; }
  .detail-art { min-height: 280px; aspect-ratio: 1.28; }
  .detail-content { padding: 28px 21px 21px; }
  .detail-content h2 { font-size: 27px; }
  footer { width: calc(100% - 24px); }
}
@media (max-width: 560px) {
  .brand-mark { width: 39px; height: 39px; }
  .brand b { font-size: 13px; }
  .brand small { font-size: 10px; }
  .intro h1 { font-size: 36px; }
  .search kbd { display: none; }
  .filter-row { margin-right: -12px; }
  .card-title { font-size: 13px; }
  .card-sub { font-size: 10px; }
  .art { aspect-ratio: 1; }
  .skeleton { height: 275px; }
  .filter-menu { top: auto !important; right: 0 !important; bottom: 0; left: 0 !important; width: 100%; max-height: 78vh; padding: 21px 17px max(18px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 22px 22px 0 0; animation-name: sheet-in; }
  .option-list { max-height: 31vh; }
  .overlay { place-items: end center; padding: 0; }
  .sheet { width: 100%; max-height: 91vh; border-radius: 24px 24px 0 0; }
  .detail-art { min-height: 235px; aspect-ratio: 1.35; }
  .detail-content { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  footer { display: grid; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
