:root {
  color-scheme: light;
  --plum: #22182b;
  --ink: #24182d;
  --paper: #faf8f3;
  --line: #e8e0d7;
  --muted: #675b6d;
  --mango: #ffc757;
  --accent: #705282;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #a36bc2; outline-offset: 4px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 2; padding: 12px; background: var(--mango); }
.shell { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.dark { background: var(--plum); color: #fff8ef; }
.header { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #3d3046; }
.brand { display: inline-flex; align-items: center; font-size: 22px; font-weight: 850; letter-spacing: -.08em; white-space: nowrap; }
.brand > span:last-child { color: #f4ae37; }
.brand-mark { display: inline-block; position: relative; width: 21px; height: 24px; margin-right: 10px; border-radius: 70% 47% 65% 53%; background: var(--mango); transform: rotate(25deg); }
.brand-mark::before { content: ""; position: absolute; width: 11px; height: 5px; background: #a5cd8d; border-radius: 100% 10% 100% 10%; top: -3px; left: 10px; transform: rotate(-35deg); }
.bare { padding: 7px 0; border: 0; background: transparent; }
.bag { padding: 8px 12px; border: 1px solid #574361; border-radius: 9px; color: #fff8ef; background: #33253d; }
.bag span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; margin-left: 5px; border-radius: 50%; background: var(--mango); color: var(--ink); font-size: 12px; font-weight: 800; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 750; }
.primary { background: var(--mango); color: var(--ink); }
.primary:hover { background: #ffda83; }
.secondary { border-color: #61506d; color: #fff8ef; background: transparent; }
.secondary:hover { background: #3b2d48; }
.catalog { padding: 43px 0 56px; scroll-margin-top: 20px; }
.search { display: flex; align-items: center; min-width: 230px; gap: 8px; padding: 0 12px; min-height: 44px; border: 1px solid #ddd2df; border-radius: 8px; background: #fffdf9; }
.search span[aria-hidden] { color: #574863; font-size: 22px; line-height: 1; }
.search input { width: 100%; background: transparent; border: 0; color: var(--ink); font-size: 14px; padding: 9px 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 19px 0 12px; }
.filters button { padding: 8px 13px; border: 1px solid #e1d8e1; background: #fffdf9; border-radius: 99px; color: #53445d; font-weight: 650; font-size: 13px; }
.filters button[aria-pressed="true"] { background: var(--plum); color: white; border-color: var(--plum); }
.catalog-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.stock-filter { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.stock-filter input { width: 15px; height: 15px; accent-color: #5d3d71; }
.sort select { max-width: 100%; border: 1px solid #e1d8e1; border-radius: 7px; padding: 5px 7px; background: #fffdf9; color: var(--ink); }
.count { color: var(--muted); margin-left: auto; font-size: 13px; }
.store-notice { background: #fff1ce; color: #563b0b; padding: 9px 12px; margin: 0 0 13px; border-radius: 7px; font-size: 13px; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.products > p { grid-column: 1 / -1; }
.product { min-width: 0; display: flex; flex-direction: column; gap: 9px; border: 1px solid var(--line); padding: 16px; border-radius: 13px; background: #fffdf9; }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-label { color: #594a63; background: #f4eef5; border-radius: 99px; padding: 5px 8px; font-size: 11px; font-weight: 700; }
.product-label.in-stock { background: #e4f1e6; color: #2f6041; }
.product h3 { margin: 0; font-size: 22px; line-height: 1.1; letter-spacing: -.035em; }
.product p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.product .product-plan { font-size: 12px; font-weight: 700; color: #594164; }
.product-bottom { border-top: 1px solid #eee7df; margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.price { display: block; font-size: 19px; font-weight: 800; }
.load-more { display: flex; justify-content: center; margin-top: 20px; }
.requirements-title { margin: 17px 0 5px; font-size: 15px; }
.requirements { margin: 0 0 12px; color: #4f425b; background: #f5eef7; border-radius: 7px; padding: 9px 10px; }
.light-button { background: #fff6dd; border: 1px solid #f0dba1; border-radius: 7px; padding: 7px 10px; font-size: 13px; font-weight: 750; color: #382345; }
.light-button:hover { background: #ffebad; }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 30px; font-size: 13px; color: var(--muted); }
.footer .brand { color: var(--ink); }
.footer .brand > span:last-child { color: #995a00; }
.footer #support-link { margin-left: auto; text-decoration: underline; }
dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100% - 28px); color: var(--ink); background: #fffdf9; border: 1px solid var(--line); border-radius: 15px; padding: 22px; box-shadow: 0 18px 65px #180f244a; }
dialog::backdrop { background: #1d1426a8; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.panel-head h2 { margin: 0; letter-spacing: -.045em; }
.panel-head button { border: 0; background: #f2ebf4; color: var(--ink); border-radius: 50%; width: 33px; height: 33px; font-size: 21px; }
#panel-content { line-height: 1.5; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.panel-row small { color: var(--muted); display: block; }
.panel-row strong { text-align: right; }
.order-total { font-weight: 800; }
.checkout-form { display: grid; gap: 8px; margin-top: 15px; }
.checkout-form input { width: 100%; border: 1px solid #ad9ab8; padding: 9px; border-radius: 6px; }
.checkout-form label { font-weight: 700; }
.error { color: #8d2c1b; }
.order-link { overflow-wrap: anywhere; }
.delivery { white-space: pre-wrap; overflow-wrap: anywhere; background: #f3edf5; border-radius: 6px; padding: 13px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .header { height: 61px; gap: 8px; }
  .catalog { padding-top: 28px; }
  .search { min-width: 0; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product { padding: 10px; gap: 8px; }
  .product h3 { font-size: 17px; }
  .product p { font-size: 12px; }
  .product .product-plan { font-size: 11px; }
  .product-bottom { flex-wrap: wrap; }
}
@media (max-width: 350px) {
  .products { grid-template-columns: 1fr; }
  .count { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.nav-actions { display:flex; align-items:center; gap:16px; white-space:nowrap; }
.bare { color:white; }
.header .search { flex:1; max-width:680px; color:var(--ink); }
.search-icon { width:15px; height:15px; flex:none; border:2px solid #706676; border-radius:50%; position:relative; margin-right:4px; }
.search-icon::after { content:''; position:absolute; width:7px; height:2px; background:#706676; right:-6px; bottom:-3px; transform:rotate(45deg); }
.catalog { padding-top:26px; }
.catalog h1 { font-size:clamp(24px,3vw,32px); letter-spacing:-.045em; margin:0; }
.filters { padding-bottom:4px; }
.filters button { flex:none; }
.products { grid-template-columns:repeat(4,minmax(0,1fr)); }
.product { background:white; }
.service-art { display:grid; place-items:center; height:100px; margin-bottom:4px; border-radius:8px; background:#f7f7f8; font-size:18px; font-weight:700; }
.service-art img { display:block; width:60px; height:60px; object-fit:contain; }
.product h3 { font-size:18px; line-height:1.2; }
@media (max-width:950px) { .products { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:650px) {
  .header { height:auto; padding-block:12px; flex-wrap:wrap; }
  .header .search { flex-basis:100%; order:3; }
  .products { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product h3 { font-size:16px; }
  .service-art { height:86px; }
  .service-art img { width:50px; height:50px; }
}
@media (max-width:350px) { .products { grid-template-columns:1fr; } }

/* Blueprint pencil reveal for the PerkMango storefront. */
[data-sketch] { transition: opacity 420ms ease; }
html.sketch-boot [data-sketch],
html.sketch-running [data-sketch]:not([data-sketch-visible="true"]) { opacity: 0 !important; }
html.sketch-running [data-sketch]:not([data-sketch-visible="true"]) { pointer-events: none; }
.pencil-overlay { position: absolute; z-index: 40; top: 0; left: 0; max-width:100%; overflow:hidden; pointer-events:none; }
.pencil-stroke {
  fill: none;
  stroke: #80a9ff;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: .82;
  animation-name: perk-pencil-draw;
  animation-timing-function: cubic-bezier(.22,.8,.24,1);
  animation-fill-mode: forwards;
}
.pencil-stroke.secondary { stroke-width: .75; opacity: .38; }
.pencil-clear .pencil-stroke {
  animation-name: perk-pencil-erase;
  animation-duration: 340ms !important;
  animation-delay: 0ms !important;
}
@keyframes perk-pencil-draw { to { stroke-dashoffset: 0; } }
@keyframes perk-pencil-erase { to { stroke-dashoffset: -1; opacity: 0; } }
.sketch-replay {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px 0 13px;
  border: 1px solid #544463;
  border-radius: 999px;
  background: #24182d;
  color: #fff8ef;
  box-shadow: 0 3px 12px #160d1c33, 0 14px 34px -16px #170d20aa;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}
.sketch-replay:hover { background: #3a2a46; transform: translateY(-1px); }
.sketch-replay:active { transform: scale(.96); }
.sketch-replay-icon { color: #9dbbff; font-size: 20px; line-height: 1; }
@media (max-width:650px) { .sketch-replay { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) {
  [data-sketch] { transition: none; }
  .pencil-overlay { display: none; }
  .sketch-replay { display:none; }
}

#mobile-menu { display:none; }
.header, .header .search input, .panel-row > *, .checkout-form > * { min-width:0; }
.product-bottom, .panel-row { flex-wrap:wrap; }
.panel-row, .footer, .service-art { overflow-wrap:anywhere; }
.panel-head button { flex:none; }
.footer { padding-bottom:72px; }
.footer a { min-height:44px; display:inline-flex; align-items:center; max-width:100%; }
.footer #support-link { display:block; align-content:center; }
.missing main { padding-block:clamp(42px,12vh,120px); }
.missing h1 { margin:0; }
.feedback { background:#e4f1e6; color:#205434; border-radius:6px; padding:8px 12px; }
@media (max-width:650px) {
  .header { position:relative; z-index:42; }
  #orders-button { display:none; }
  #mobile-menu { display:block; }
  #mobile-menu summary { cursor:pointer; padding:10px 4px; }
  #mobile-menu nav { position:absolute; z-index:2; top:52px; right:0; width:min(220px,100%); background:white; color:var(--ink); border:1px solid var(--line); border-radius:8px; padding:4px; box-shadow:0 5px 18px #24182d26; }
  #mobile-menu nav > * { display:block; width:100%; padding:12px; border:0; text-align:left; color:inherit; background:transparent; font:inherit; }
  .nav-actions { gap:8px; }
  .filters button, .light-button, .bag, .panel-head button { min-height:44px; }
  .panel-head button { width:44px; }
  .footer #support-link { margin-left:0; }
  dialog { padding:16px; max-height:calc(100dvh - 24px); }
}
