:root {
  --bg: #f5f4ee;
  --ink: #171717;
  --ink-d: #141414;
  --muted: #696969;
  --muted-d: #5c5c5c;
  --line: #deddd5;
  --line-d: #e6e6e6;
  --card: #ffffff;
  --yellow: #ffe414;
  --yellow-d: #f0d400;
  --ok-bg: #e9f8df;
  --bad-bg: #ffe4e1;
  --info-bg: #fff6c2;
  --shadow: 0 14px 34px rgba(24, 24, 18, 0.09);
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(740px 380px at 86% -8%, rgba(255, 228, 20, 0.36), transparent 62%),
    radial-gradient(620px 360px at -8% 42%, rgba(255, 255, 255, 0.9), transparent 66%),
    var(--bg);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.5;
}
a { color: var(--yellow); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.04em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); line-height: 0.96; }
h2 { font-size: 1.7rem; }
p { margin: 0 0 0.8em; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0;
  background: rgba(245, 244, 238, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: #111; margin-right: auto; }
.brand strong { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.04em; }
.brand small { color: var(--muted); }
.mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--yellow); color: #111; border-radius: 12px; font-weight: 800; font-size: 1.2rem;
}
.nav { display: flex; gap: 3px; align-items: center; flex-wrap: nowrap; }
.nav a, .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 999px;
  color: #292929;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav a:hover, .nav-item:hover {
  color: #111;
  background: rgba(255, 228, 20, 0.62);
  transform: translateY(-1px);
}
.linkish {
  color: #292929; background: none; border: 0; font: inherit; cursor: pointer;
}
.nav form { margin: 0; }
.nav-badge {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 0.68rem;
  line-height: 1;
}
.nav-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  background: white;
  color: #111;
  border: 1px solid #deddd5;
  border-radius: 999px;
  padding: 9px 13px;
  font: inherit;
  font-weight: 700;
}
main { padding: 28px 0 64px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); padding: 22px 0 36px; font-size: 0.92rem; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(20, 20, 20, .06);
  border-radius: 32px;
  background: #f9f8f2;
  box-shadow: 0 18px 46px rgba(24, 24, 18, .08);
}
.landing .hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(249, 248, 242, .9) 0%, rgba(249, 248, 242, .68) 48%, rgba(249, 248, 242, .28) 100%),
    url("/static/shop-background.jpg") center / cover no-repeat;
}
.lede { color: #4f4f4f; font-size: 1.12rem; max-width: 38rem; }
.hero-actions { margin-top: 18px; }
.stack, .paths { display: grid; gap: 14px; }
.paths { grid-template-columns: 1fr 1fr; margin-bottom: 34px; }
.discovery {
  margin: 26px 0;
  padding: 26px;
  border: 1px solid rgba(20, 20, 20, .07);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
}
.discovery-head {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}
.discovery h2 { margin-bottom: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.market-search {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(170px, .65fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #dbdad2;
  border-radius: 18px;
  background: #f7f6f1;
}
.market-search .search-icon { margin-left: 8px; color: #6f6200; font-size: 1.2rem; }
.market-search input,
.market-search select {
  border: 0;
  background: transparent;
  outline: 0;
}
.market-search select { border-left: 1px solid #d9d8d1; border-radius: 0; }
.market-search .btn { padding: 10px 15px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.category-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  padding: 15px 8px 13px;
  border: 1px solid #e7e5dc;
  border-radius: 17px;
  color: #171717;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: #d2c000;
  background: #fffbea;
}
.category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff3a4;
  color: #171717;
  font-size: 1.35rem;
}
.category-arrow {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 13px;
  opacity: .35;
}
.shop-search { max-width: 860px; margin: 16px 0 12px; }
.category-pills {
  display: flex;
  gap: 8px;
  padding: 2px 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.category-pills a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #dad8ce;
  border-radius: 999px;
  color: #171717;
  background: white;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}
.category-pills a:hover,
.category-pills a.on {
  border-color: #111;
  background: #111;
  color: white;
}
.category-admin-layout { grid-template-columns: 1.6fr .7fr; align-items: start; }
.admin-category-list { display: grid; gap: 10px; }
.admin-category-row {
  display: grid;
  grid-template-columns: auto 1fr 130px 115px auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e8e6de;
  border-radius: 16px;
  background: #faf9f5;
}
.admin-category-row .category-icon { align-self: center; }
.admin-category-row label { min-width: 0; }
.category-meta {
  display: grid;
  align-self: center;
  color: #555;
  font-size: .8rem;
  white-space: nowrap;
}
.category-meta small { color: #888; }
.card, .panel {
  background: var(--card);
  color: var(--ink-d);
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.card a, .panel a { color: #111; }
.card .muted, .panel .muted, .alert .muted { color: var(--muted-d); }
.card { padding: 18px; }
.card h2, .card h3 { color: #111; }
.card h2 { font-size: 1.45rem; }
.path {
  position: relative;
  display: block;
  min-height: 224px;
  text-decoration: none;
  color: inherit;
  padding: 24px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.path:hover { transform: translateY(-5px); box-shadow: 0 24px 56px rgba(24, 24, 18, .15); }
.path-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: #111;
  color: var(--yellow);
  font-size: 1.3rem;
}
.path-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #111;
  font-weight: 800;
  font-size: .9rem;
}
.path:hover .path-cta .icon { transform: translateX(3px); }
.path-cta .icon { transition: transform .18s ease; }
.kicker { color: #6f6200; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; }
.card .kicker { color: #111; }

.mosaic {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: repeat(3, 118px);
  gap: 12px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.tile::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 38% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  pointer-events: none;
}
.tile-img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.tile > *:not(.tile-img) { position: relative; z-index: 2; }
.tile strong, .tile em { color: white; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.tile:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 16px 30px rgba(24, 24, 18, .13); }
.tile:hover .tile-img { transform: scale(1.045); }
.tile strong { font-size: 1.05rem; letter-spacing: -0.03em; }
.tile em { font-style: normal; font-size: 0.82rem; opacity: 0.7; }
.tile .glyph { width: 92px; height: 70px; position: absolute; right: 12px; top: 16px; }
.t1 { grid-column: 1; grid-row: 1 / span 3; background: var(--yellow); color: #111; }
.t2 { grid-column: 2; grid-row: 1; }
.t3 { grid-column: 2; grid-row: 2; }
.t4 { grid-column: 2; grid-row: 3; }
.t1 .glyph { width: 150px; height: 110px; top: 36px; right: 16px; }
.t2 { background: #1c1c1c; color: white; border: 1px solid #2c2c2c; }
.t3 { background: #f3f3f3; color: #111; }
.t4 { background: #2a2a2a; color: var(--yellow); }
.chip {
  position: absolute; top: 14px; left: 14px;
  background: #111; color: var(--yellow);
  border-radius: 999px; padding: 4px 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product { overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.product { transition: transform .2s ease, box-shadow .2s ease; }
.product:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(24, 24, 18, .15); }
.product .visual img { transition: transform .35s ease; }
.product:hover .visual img { transform: scale(1.035); }
.product .visual, .ph, .visual img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #f3f3f3; }
.ph { display: grid; place-items: center; font-weight: 800; font-size: 2.2rem; color: #111; background:
  linear-gradient(160deg, #ffe414 0%, #fff6a8 42%, #f4f4f4 42%); }
.slot-ph { background:
  repeating-linear-gradient(135deg, #f7f7f7 0 12px, #ececec 12px 24px); color: #111; }
.slot-ph span { background: var(--yellow); border-radius: 999px; padding: 6px 12px; font-size: 0.95rem; }
.product .body, .pad { padding: 14px 16px 16px; }
.price { font-weight: 800; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn, button.btn, .nav .btn-small {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--yellow); color: #111; text-decoration: none;
  border: 0; border-radius: 999px; padding: 12px 16px; font: inherit; font-weight: 800; cursor: pointer;
}
.btn:hover, .nav .btn-small:hover { background: var(--yellow-d); }
.btn.clay { background: #111; color: var(--yellow); }
.btn.clay:hover { background: #2a2a2a; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn.small, .btn-small { padding: 8px 12px; font-size: 0.92rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: grid; gap: 6px; font-weight: 700; font-size: 0.94rem; }
input, textarea, select {
  width: 100%; font: inherit; color: #111; background: #f6f6f6;
  border: 1px solid #e4e4e4; border-radius: 14px; padding: 11px 12px;
}
textarea { min-height: 110px; resize: vertical; }
.form { display: grid; gap: 14px; }
.form.narrow, .narrow { width: min(560px, 100%); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; color: #141414; }
.alert.ok { background: var(--ok-bg); }
.alert.bad { background: var(--bad-bg); }
.alert.info { background: var(--info-bg); }
.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; color: inherit; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-d); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-d); font-weight: 700; }
.pill {
  display: inline-block; border-radius: 999px; padding: 3px 9px; background: #fff3a3; color: #111; font-size: 0.85rem; font-weight: 700;
}
.pill.wait { background: #ffe7a3; }
.pill.done { background: var(--ok-bg); }
.pill.stop { background: var(--bad-bg); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat strong { display: block; font-size: 1.8rem; }
.thread { display: grid; gap: 10px; margin: 12px 0; }
.bubble { padding: 12px 14px; border-radius: 16px; background: #f6f6f6; color: #141414; }
.bubble.admin { background: #fff6c2; }
.bubble .who { font-size: 0.82rem; color: var(--muted-d); }
.msg { white-space: pre-wrap; margin: 4px 0 0; }
.layout { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 16px; }
.search { display: flex; gap: 8px; margin: 8px 0 16px; }
.search input { max-width: 360px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters a { text-decoration: none; color: #171717; }
.filters a.on { background: var(--yellow); color: #111; border-color: var(--yellow); }
.empty { padding: 18px 0 8px; color: var(--muted); }
.detail p { white-space: pre-wrap; }
hr.sep { border: 0; border-top: 1px solid var(--line-d); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .55s cubic-bezier(.2, .8, .2, 1),
    transform .55s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero .mosaic { animation: soft-float 5s ease-in-out infinite; }
.mark { animation: mark-pop .55s cubic-bezier(.2, .9, .25, 1.25) both; }

@keyframes soft-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes mark-pop {
  from { transform: scale(.72) rotate(-8deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

@media (max-width: 1020px) {
  .hero, .layout, .stats, .split, .paths { grid-template-columns: 1fr; }
  .hero { padding: 26px; }
  .discovery-head { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .category-admin-layout { grid-template-columns: 1fr; }
  .admin-category-row { grid-template-columns: auto 1fr 1fr; }
  .admin-category-row .category-meta,
  .admin-category-row .btn { grid-column: auto; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 150px 130px 130px; }
  .t1 { grid-column: 1; grid-row: 1 / span 2; }
  .t2 { grid-column: 2; grid-row: 1; }
  .t3 { grid-column: 1; grid-row: 3; }
  .t4 { grid-column: 2; grid-row: 2 / span 2; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid #e3e1d8;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(24, 24, 18, .18);
  }
  .nav.is-open { display: grid; }
  .nav a, .nav-item {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: .96rem;
  }
  .nav form { width: 100%; }
  .nav-badge { margin-left: auto; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(2.35rem, 12vw, 3.2rem); }
  .brand small { display: none; }
  .hero { gap: 22px; padding: 20px; border-radius: 24px; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 135px 115px 115px; }
  .tile { border-radius: 18px; padding: 13px; min-height: 0; }
  .tile .glyph { width: 64px; height: 54px; }
  .t1 .glyph { width: 110px; height: 80px; top: 44px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .discovery { padding: 18px; border-radius: 22px; }
  .market-search { grid-template-columns: auto 1fr; }
  .market-search select { grid-column: 1 / -1; border: 0; border-top: 1px solid #d9d8d1; }
  .market-search .btn { grid-column: 1 / -1; width: 100%; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-category-row { grid-template-columns: auto 1fr; }
  .admin-category-row label,
  .admin-category-row .category-meta,
  .admin-category-row .btn { grid-column: 1 / -1; }
  .product .body { padding: 12px; }
  .product h3 { font-size: 1rem; }
  .product .row { display: grid; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .reveal { opacity: 1; transform: none; }
}
