:root {
  color-scheme: light;
  --desktop: #151b26;
  --window: #e9ecf2;
  --ink: #202738;
  --muted: #515e72;
  --edge: #35445c24;
  --blue: #245bac;
  --title-bar: linear-gradient(#f8f9fc, #d9dfe9);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--desktop); }
body { display: flex; flex-direction: column; isolation: isolate; min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--ink); }
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(#11182732, #11182779), url("/assets/horny-and-sad-bed.jpg") 62% center / cover no-repeat;
}
a { color: inherit; }
button, input, select { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #2375d3; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.menu-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: calc(33px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid #ffffff1c;
  background: #16181ec7;
  color: #f1f2f7;
  font-size: 12px;
  backdrop-filter: blur(24px) saturate(150%);
}
.menu-bar a { display: inline-flex; align-items: center; gap: 7px; min-height: 33px; text-decoration: none; }
.menu-bar a:hover { text-decoration: underline; }
.menu-bar .brand { font-weight: 650; }
.menu-bar .bio-link { margin-left: auto; }
.shop-desktop {
  flex: 1;
  width: 100%;
  padding: clamp(22px, 5.5vw, 76px) max(14px, env(safe-area-inset-right)) 22px max(14px, env(safe-area-inset-left));
}
.window {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ffffffa8;
  border-radius: 12px;
  background: var(--window);
  box-shadow: 0 18px 48px #0007, 0 3px 10px #0004;
}
.titlebar {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid var(--edge);
  background: var(--title-bar);
  color: #353f52;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
}
.titlebar > span:first-child { grid-column: 2; grid-row: 1; }
.win-controls { display: flex; grid-column: 1; grid-row: 1; gap: 6px; }
.win-controls b { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 1px #0002; }
.win-controls b:nth-child(2) { background: #febc2e; }
.win-controls b:nth-child(3) { background: #28c840; }
h1 { margin: 0; font-size: clamp(25px, 3.5vw, 40px); line-height: 1.06; letter-spacing: -.045em; }

.catalog-view { width: min(100%, 1080px); margin: 0 auto; }
.catalog-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px 16px; padding: 20px 20px 15px; }
.catalog-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 0 20px 20px; }
.catalog-card { min-width: 0; }
.catalog-card-link {
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: #f7f8fb;
  text-decoration: none;
}
.catalog-card-link:is(:hover, :focus-visible) { border-color: #658bc7; background: #edf3fd; }
.catalog-shot, .product-shot { overflow: hidden; aspect-ratio: 1; background: #f3f4f7; }
.catalog-shot { position: relative; border-bottom: 1px solid var(--edge); }
.catalog-shot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity 180ms ease; }
.catalog-shot .back { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .catalog-card-link:hover .catalog-shot .front { opacity: 0; }
  .catalog-card-link:hover .catalog-shot .back { opacity: 1; }
}
.catalog-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px 12px; }
.catalog-info h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.2; letter-spacing: -.025em; }
.catalog-info p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.catalog-price { color: #244d87; font-size: 14px; font-weight: 650; white-space: nowrap; }

.shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  align-items: start;
  gap: 15px;
  width: min(100%, 1160px);
  margin: 0 auto;
}
.detail-back {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #ffffff59;
  border-radius: 8px;
  background: #171e30b8;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.detail-back:hover { background: #253b5d; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; position: sticky; top: 16px; }
.gallery.single { grid-template-columns: minmax(0, 1fr); }
.product-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-body, .success-body { padding: clamp(14px, 3vw, 24px); }
.product-body h1 { font-size: clamp(24px, 3vw, 35px); }
.status { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.price { margin: 10px 0 17px; color: #244d87; font-size: 20px; font-weight: 650; }
fieldset { min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
legend { margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 5px; }
.sizes input { position: absolute; opacity: 0; pointer-events: none; }
.sizes label, .delivery :is(select, input), .contact-email input {
  min-height: 44px;
  border: 1px solid #3e4c6340;
  border-radius: 7px;
  background: #fff;
}
.sizes label { display: grid; place-items: center; cursor: pointer; font-size: 13px; font-weight: 650; }
.sizes label:hover { background: #dce6f7; }
.sizes input:checked + label { border-color: var(--blue); background: var(--blue); color: #fff; }
.sizes input:focus-visible + label { outline: 2px solid #2375d3; outline-offset: 2px; }
.delivery { display: flex; gap: 8px; }
.delivery select { flex: 1; min-width: 0; }
.state-wrap { flex: 0 1 112px; min-width: 0; }
.delivery :is(select, input), .contact-email input { width: 100%; padding: 7px 9px; font-size: 16px; }
.field-help, .secure { display: block; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.secure { text-align: center; }
.buy {
  display: grid;
  width: 100%;
  min-height: 44px;
  place-items: center;
  padding: 9px 12px;
  border: 1px solid #1e4d92;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.buy:hover:not(:disabled) { background: #1f4e93; }
.buy.secondary { border-color: var(--edge); background: #f7f8fb; color: var(--ink); }
.buy.secondary:hover { background: #dce6f7; }
.buy:disabled { border-color: var(--edge); background: #dbe1eb; color: var(--muted); cursor: default; }
.buy[aria-disabled="true"] { cursor: wait; }
.checkout-message { display: none; margin: 0 0 12px; padding: 9px 10px; border-radius: 7px; background: #f7f8fb; font-size: 13px; line-height: 1.4; }
.checkout-message.show { display: block; }
.checkout-message.error { background: #fce5e5; color: #7c2626; }
.checkout-message.success { background: #e1f1e5; }

.cart, .copy, details, .order-summary { margin: 14px 0 0; border: 1px solid var(--edge); border-radius: 8px; background: #f7f8fb; }
.cart-head, .cart-total { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; font-size: 13px; font-weight: 650; }
.cart-head { border-bottom: 1px solid var(--edge); }
.cart-total { border-top: 1px solid var(--edge); }
.cart-list { display: grid; gap: 5px; padding: 7px; }
.cart-empty { margin: 0; padding: 8px; color: var(--muted); text-align: center; font-size: 12px; }
.cart-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--edge); border-radius: 7px; background: #fff; font-size: 12px; }
.cart-row img { width: 40px; height: 48px; object-fit: contain; }
.cart-row strong, .cart-row small { display: block; }
.cart-row small { margin-top: 3px; color: var(--muted); }
.cart-actions { display: grid; grid-template-columns: 28px 18px 28px; align-items: center; text-align: center; }
.cart-actions button { min-height: 30px; padding: 0; border: 1px solid var(--edge); border-radius: 5px; background: #f7f8fb; font-weight: 650; }
.cart-actions button:hover { background: #dce6f7; }
.cart-remove { grid-column: 1 / -1; margin-top: 4px; font-size: 10px; }
.checkout { width: calc(100% - 14px); margin: 0 7px 7px; }
.copy { padding: 11px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.copy p { margin: 0 0 8px; color: var(--ink); }
.copy ul { margin: 0; padding-left: 17px; }
summary { padding: 11px; font-size: 13px; font-weight: 650; }
.size-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.size-table :is(th, td) { padding: 7px; border-top: 1px solid var(--edge); text-align: center; }

.success-view { width: min(100%, 650px); margin: 0 auto; }
.success-stamp { display: block; margin-bottom: 8px; color: #244d87; font-size: 12px; font-weight: 700; }
.success-copy, .tracking-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.order-summary { padding: 9px 12px; }
.order-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 7px 0; border-bottom: 1px solid var(--edge); font-size: 13px; overflow-wrap: anywhere; }
.order-items { margin: 8px 0 3px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.success-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.success-actions .buy { flex: 1 1 140px; }

.store-footer { display: grid; justify-items: center; padding: 0 12px max(15px, env(safe-area-inset-bottom)); }
.store-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid #ffffff59;
  border-radius: 13px;
  background: linear-gradient(#b6bfd268, #68728766);
  backdrop-filter: blur(24px) saturate(155%);
  color: #fff;
  box-shadow: 0 6px 20px #0005;
}
.store-footer :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: #171e30b8;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}
.store-footer :is(a, button):hover { background: #273c60; }

@media (max-width: 820px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); width: min(100%, 620px); }
  .gallery { position: static; }
  .catalog-grid { gap: 9px; padding: 0 12px 12px; }
  .catalog-heading { padding: 15px 12px 12px; }
  .catalog-info { padding: 10px; }
}
@media (max-width: 560px) {
  .shop-desktop { padding-top: 12px; }
  .catalog-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .catalog-shot { aspect-ratio: 1.22; }
  .gallery { gap: 7px; }
  .gallery .titlebar { grid-template-columns: 42px 1fr 42px; padding-inline: 6px; }
  .gallery .win-controls { gap: 4px; }
  .gallery .win-controls b { width: 8px; height: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-shot img { transition: none; }
}
