/* ======================================================================
   WINTERNET — SHARED SITE CSS (site.css)
   Styles for the shared front-end foundation injected by site.js:
     • language toggle (EN / 中文 / BM)
     • slide-in cart drawer + dimmed backdrop + count badge
     • fixed bottom-left breathing logo
   Apple-LIGHT aesthetic, Gaegu handwritten display font, Apple-blue
   #0071e3 accents, frosted surfaces — consistent with index/merch pages.
   Self-contained; works on file:// by double-click. No build step.
   ====================================================================== */

/* ---------------------------------------------------------------------
   Local design tokens (mirror the per-page :root so this file is usable
   standalone). Pages already define these; we fall back gracefully.
   --------------------------------------------------------------------- */
:root {
  --wn-blue:        #0071e3;
  --wn-blue-hover:  #0077ed;
  --wn-ink:         #1d1d1f;
  --wn-muted:       #6e6e73;
  --wn-light:       #f5f5f7;
  --wn-hairline:    rgba(0,0,0,0.12);
  --wn-hand: "Gaegu", "ZCOOL KuaiLe", "Comic Sans MS", "Bradley Hand",
             "Chalkboard SE", "Marker Felt", "Segoe Print", cursive;
  --wn-z-backdrop: 10000;
  --wn-z-drawer:   10001;
  --wn-z-logo:     9998;
}

/* =====================================================================
   LANGUAGE TOGGLE  (rendered into [data-lang-toggle])
   A small frosted pill segmented control: EN | 中文 | BM
   ===================================================================== */
.wn-langtoggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 980px;
  background: rgba(245,245,247,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  vertical-align: middle;
  line-height: 1;
}
.wn-langtoggle__btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: rgba(245,245,247,0.8);
  font-family: var(--wn-hand);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  padding: 5px 10px;
  border-radius: 980px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}
.wn-langtoggle__btn:hover { color: #f5f5f7; }
.wn-langtoggle__btn.is-active {
  background: var(--wn-blue);
  color: #fff;
}
.wn-langtoggle__btn:focus-visible {
  outline: 2px solid var(--wn-blue);
  outline-offset: 1px;
}

/* A light-surface variant when the toggle sits on a white/light section */
.wn-langtoggle--light {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}
.wn-langtoggle--light .wn-langtoggle__btn { color: var(--wn-muted); }
.wn-langtoggle--light .wn-langtoggle__btn:hover { color: var(--wn-ink); }
.wn-langtoggle--light .wn-langtoggle__btn.is-active { color: #fff; }

/* =====================================================================
   CART — count badge (any [data-cart-count])
   Sits over the nav bag icon; hidden when the cart is empty.
   ===================================================================== */
.wn-cart-count {
  position: absolute;
  top: 6px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wn-blue);
  color: #fff;
  font-family: var(--wn-hand);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 1.5px rgba(22,22,23,0.9);
  pointer-events: none;
}
.wn-cart-count[hidden] { display: none; }

/* =====================================================================
   CART — backdrop + slide-in drawer
   ===================================================================== */
.wn-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
  z-index: var(--wn-z-backdrop);
}
.wn-backdrop.is-open { opacity: 1; visibility: visible; }

.wn-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: 400px;
  max-width: 92vw;
  background: rgba(255,255,255,0.86);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-left: 1px solid var(--wn-hairline);
  box-shadow: -16px 0 50px rgba(0,0,0,0.16);
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: var(--wn-z-drawer);
  display: flex;
  flex-direction: column;
  color: var(--wn-ink);
}
.wn-drawer.is-open { transform: translateX(0); }

/* Drawer header */
.wn-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--wn-hairline);
  flex: 0 0 auto;
}
.wn-drawer__title {
  font-family: var(--wn-hand);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.005em;
  color: var(--wn-ink);
}
.wn-drawer__close {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: rgba(0,0,0,0.05);
  color: var(--wn-ink);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}
.wn-drawer__close:hover { background: rgba(0,0,0,0.10); }
.wn-drawer__close svg { display: block; }

/* Drawer scrollable item list */
.wn-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px;
}

/* Empty state */
.wn-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 240px;
  gap: 6px;
  color: var(--wn-muted);
}
.wn-cart-empty__icon {
  color: var(--wn-blue);
  opacity: 0.7;
  margin-bottom: 6px;
}
.wn-cart-empty__title {
  font-family: var(--wn-hand);
  font-size: 24px;
  font-weight: 700;
  color: var(--wn-ink);
}
.wn-cart-empty__note {
  font-family: var(--wn-hand);
  font-size: 17px;
  color: var(--wn-muted);
  max-width: 240px;
}

/* Cart line item */
.wn-cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--wn-hairline);
}
.wn-cart-item__media {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wn-light);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wn-cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wn-cart-item__info { min-width: 0; }
.wn-cart-item__name {
  font-family: var(--wn-hand);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--wn-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wn-cart-item__price {
  font-family: var(--wn-hand);
  font-size: 15px;
  color: var(--wn-muted);
  margin-top: 2px;
}

/* Quantity stepper */
.wn-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--wn-hairline);
  border-radius: 980px;
  padding: 2px;
}
.wn-qty__btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--wn-ink);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.wn-qty__btn:hover { background: var(--wn-blue); color: #fff; }
.wn-qty__val {
  font-family: var(--wn-hand);
  font-size: 16px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  color: var(--wn-ink);
}
.wn-property-deed {
  width:max-content;
  max-width:100%;
  margin-top:9px;
  padding:5px 9px;
  color:#315d43;
  background:#e7f3e9;
  border:1px dashed #86ad91;
  border-radius:9px 12px 8px 11px;
  font-family:var(--wn-hand);
  font-size:14px;
  line-height:1;
  transform:rotate(-1deg);
}

/* Right column: line total + remove */
.wn-cart-item__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.wn-cart-item__total {
  font-family: var(--wn-hand);
  font-size: 17px;
  font-weight: 700;
  color: var(--wn-ink);
  white-space: nowrap;
}
.wn-cart-item__remove {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--wn-muted);
  font-family: var(--wn-hand);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: color .2s ease;
}
.wn-cart-item__remove:hover { color: var(--wn-blue); }

/* Drawer footer — subtotal + checkout */
.wn-drawer__foot {
  flex: 0 0 auto;
  padding: 16px 20px 22px;
  border-top: 1px solid var(--wn-hairline);
  background: rgba(255,255,255,0.6);
}
.wn-cart-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wn-cart-subtotal__label {
  font-family: var(--wn-hand);
  font-size: 18px;
  color: var(--wn-ink);
}
.wn-cart-subtotal__value {
  font-family: var(--wn-hand);
  font-size: 22px;
  font-weight: 700;
  color: var(--wn-ink);
}
.wn-checkout {
  display: block;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 980px;
  background: var(--wn-blue);
  color: #fff;
  font-family: var(--wn-hand);
  font-size: 18px;
  font-weight: 700;
  padding: 13px 22px;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}
.wn-checkout:hover:not(:disabled) { background: var(--wn-blue-hover); }
.wn-checkout:disabled {
  background: rgba(0,0,0,0.10);
  color: var(--wn-muted);
  cursor: not-allowed;
}
.wn-cart-foot-note {
  text-align: center;
  font-family: var(--wn-hand);
  font-size: 13px;
  color: var(--wn-muted);
  margin-top: 8px;
}

/* Shared paper Wallet checkout */
.wn-pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20,20,22,.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.wn-pay-sheet {
  width: min(100%, 440px);
  max-height: min(760px, 92dvh);
  overflow: auto;
  color: var(--wn-ink);
  background:
    radial-gradient(rgba(29,29,31,.055) .55px, transparent .7px) 0 0 / 7px 7px,
    #fffdf7;
  border: 1px solid rgba(29,29,31,.2);
  border-radius: 24px 20px 27px 21px;
  box-shadow: 8px 12px 0 rgba(0,0,0,.12), 0 26px 70px rgba(0,0,0,.3);
  animation: wnPayIn .22s ease-out;
}
@keyframes wnPayIn { from { opacity:0; transform:translateY(14px) scale(.98) rotate(-.25deg); } to { opacity:1; transform:none; } }
.wn-pay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 17px;
  border-bottom: 1px dashed rgba(29,29,31,.2);
}
.wn-pay-head h2 { margin:0; font-family:var(--wn-hand); font-size:30px; line-height:1; }
.wn-pay-head p { margin:7px 0 0; color:var(--wn-muted); font-family:var(--wn-hand); font-size:14px; line-height:1.25; }
.wn-pay-x {
  flex:0 0 auto; width:36px; height:36px; display:grid; place-items:center;
  border:1px solid rgba(29,29,31,.13); border-radius:50%; color:var(--wn-ink);
  background:rgba(255,255,255,.72); cursor:pointer; font:24px/1 var(--wn-hand);
}
.wn-pay-body { padding:20px 22px; }
.wn-pay-list { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.wn-pay-list li { display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px dashed rgba(29,29,31,.14); font-family:var(--wn-hand); font-size:17px; }
.wn-pay-list li span { min-width:0; overflow-wrap:anywhere; }
.wn-pay-list li span small { display:block; margin-top:3px; color:var(--wn-muted); font-size:13px; }
.wn-pay-list li b { flex:0 0 auto; }
.wn-pay-summary { display:grid; gap:8px; margin:18px 0 0; }
.wn-pay-summary div,.wn-pay-success dl div { display:flex; align-items:baseline; justify-content:space-between; gap:14px; }
.wn-pay-summary dt,.wn-pay-summary dd,.wn-pay-success dt,.wn-pay-success dd { margin:0; font-family:var(--wn-hand); }
.wn-pay-summary dt { color:var(--wn-muted); font-size:16px; }
.wn-pay-summary dd { font-size:19px; font-weight:700; }
.wn-pay-summary .total { margin-top:5px; padding-top:12px; border-top:2px solid var(--wn-ink); }
.wn-pay-summary .total dt,.wn-pay-summary .total dd { color:var(--wn-ink); font-size:24px; }
.wn-pay-status { display:flex; align-items:center; gap:12px; padding:15px; color:#315d43; background:#e7f3e9; border:1px solid #bdd8c4; border-radius:15px 12px 17px 13px; }
.wn-pay-status.is-error { color:#8f2d24; background:#fff0ed; border-color:#efc2ba; }
.wn-pay-status-mark { width:29px; height:29px; flex:0 0 auto; display:grid; place-items:center; border:1px solid currentColor; border-radius:50%; font-family:var(--wn-hand); font-weight:700; }
.wn-pay-status p { margin:0; font-family:var(--wn-hand); font-size:17px; line-height:1.25; }
.wn-pay-login { display:flex; min-height:46px; align-items:center; justify-content:center; margin-top:13px; color:#fff; background:var(--wn-blue); border-radius:999px; font-family:var(--wn-hand); font-size:18px; font-weight:700; }
.wn-pay-actions { display:flex; gap:10px; padding:0 22px 22px; }
.wn-pay-actions button { flex:1; min-height:47px; padding:10px 15px; border-radius:999px; cursor:pointer; font-family:var(--wn-hand); font-size:18px; font-weight:700; }
.wn-pay-cancel { color:var(--wn-ink); background:rgba(255,255,255,.7); border:1px solid rgba(29,29,31,.2); }
.wn-pay-primary { color:#fff; background:var(--wn-blue); border:1px solid var(--wn-blue); }
.wn-pay-primary:disabled { color:var(--wn-muted); background:rgba(29,29,31,.1); border-color:transparent; cursor:not-allowed; }
.wn-pay-success { text-align:center; }
.wn-pay-success > span { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 10px; color:#fff; background:#2c8a50; border-radius:50% 47% 52% 46%; font-family:var(--wn-hand); font-size:34px; transform:rotate(-3deg); }
.wn-pay-success h3 { margin:0; font-family:var(--wn-hand); font-size:29px; }
.wn-pay-success > p { margin:6px auto 18px; max-width:320px; color:var(--wn-muted); font-family:var(--wn-hand); font-size:16px; line-height:1.3; }
.wn-pay-success dl { display:grid; gap:7px; padding:14px; text-align:left; background:rgba(255,255,255,.7); border:1px dashed rgba(29,29,31,.22); border-radius:13px; }
.wn-pay-success dt { color:var(--wn-muted); }
.wn-pay-success dd { max-width:65%; overflow-wrap:anywhere; text-align:right; font-weight:700; }

/* A small hand-cut moving-day scene for property checkout. */
.wn-delivery-sketch {
  position:relative;
  height:154px;
  margin:18px 0 1px;
  overflow:hidden;
  background:
    linear-gradient(rgba(66,111,139,.075) 1px,transparent 1px) 0 0/15px 15px,
    linear-gradient(90deg,rgba(66,111,139,.075) 1px,transparent 1px) 0 0/15px 15px,
    #eef6f7;
  border:1px dashed rgba(29,29,31,.28);
  border-radius:17px 13px 20px 14px;
}
.wn-delivery-sketch::after {
  content:"";
  position:absolute;
  left:-5%; right:-5%; bottom:25px;
  height:2px;
  background:rgba(29,29,31,.62);
  box-shadow:0 5px 0 rgba(29,29,31,.08);
  transform:rotate(-.5deg);
}
.wn-delivery-sketch > p {
  position:absolute;
  z-index:5;
  left:13px; bottom:4px;
  margin:0;
  color:#53636a;
  font-family:var(--wn-hand);
  font-size:13px;
  transform:rotate(-1deg);
}
.wn-sketch-cloud { position:absolute; top:20px; width:43px; height:14px; background:rgba(255,255,255,.86); border:1.5px solid rgba(29,29,31,.42); border-radius:50%; }
.wn-sketch-cloud::before,.wn-sketch-cloud::after { content:""; position:absolute; bottom:-1px; background:#f8fcfb; border:inherit; border-bottom:0; border-radius:50% 50% 0 0; }
.wn-sketch-cloud::before { left:7px; width:16px; height:17px; }
.wn-sketch-cloud::after { right:6px; width:13px; height:12px; }
.wn-sketch-cloud.one { left:24px; transform:rotate(-3deg); }
.wn-sketch-cloud.two { left:46%; top:31px; transform:scale(.72) rotate(2deg); opacity:.72; }
.wn-sketch-house { position:absolute; z-index:3; right:24px; bottom:27px; width:70px; height:57px; background:#f3c7aa; border:2px solid #29292c; box-shadow:4px 5px 0 rgba(29,29,31,.12); transform:rotate(1.4deg); }
.wn-sketch-house .roof { position:absolute; left:5px; top:-31px; width:56px; height:56px; background:#cf7968; border:2px solid #29292c; transform:rotate(45deg); z-index:-1; }
.wn-sketch-house .door { position:absolute; left:28px; bottom:-1px; width:17px; height:31px; background:#fff7df; border:2px solid #29292c; }
.wn-sketch-house .door::after { content:""; position:absolute; right:2px; top:14px; width:3px; height:3px; background:#29292c; border-radius:50%; }
.wn-sketch-house .window { position:absolute; left:7px; top:13px; width:14px; height:14px; background:#b8dfeb; border:2px solid #29292c; }
.wn-sketch-route { position:absolute; z-index:2; left:128px; right:99px; bottom:42px; display:flex; justify-content:space-around; transform:rotate(-2deg); }
.wn-sketch-route i { width:13px; height:2px; background:rgba(29,29,31,.5); transform:rotate(8deg); }
.wn-sketch-van { position:absolute; z-index:4; left:22px; bottom:28px; width:94px; height:45px; color:#29292c; background:#fff1b8; border:2px solid #29292c; border-radius:8px 3px 3px 7px; box-shadow:4px 5px 0 rgba(29,29,31,.12); animation:wnVanNudge 2.6s ease-in-out infinite; }
.wn-sketch-van > span { position:absolute; left:11px; top:13px; font-family:var(--wn-hand); font-size:12px; font-weight:700; letter-spacing:.05em; }
.wn-sketch-van .cab { position:absolute; right:-30px; bottom:-2px; width:31px; height:35px; background:#dfeced; border:2px solid #29292c; border-left:0; border-radius:0 10px 3px 0; }
.wn-sketch-van .window { position:absolute; z-index:2; right:-22px; top:15px; width:18px; height:12px; background:#9fd0df; border:1.5px solid #29292c; border-radius:2px 7px 2px 2px; }
.wn-sketch-van b { position:absolute; bottom:-9px; width:17px; height:17px; background:#29292c; border:3px solid #f7f2e8; border-radius:50%; box-shadow:0 0 0 1.5px #29292c; }
.wn-sketch-van .wheel-a { left:14px; }
.wn-sketch-van .wheel-b { right:-20px; }
@keyframes wnVanNudge { 0%,100% { transform:translateX(0) rotate(-1deg); } 50% { transform:translateX(5px) rotate(.3deg); } }

@media (max-width: 480px) {
  .wn-drawer { width: 100%; max-width: 100vw; }
  .wn-pay-overlay { align-items:end; padding:10px; }
  .wn-pay-sheet { width:100%; max-height:94dvh; border-radius:23px 23px 16px 16px; }
  .wn-delivery-sketch { height:139px; }
  .wn-sketch-route { left:118px; right:93px; }
}

/* =====================================================================
   BREATHING LOGO — fixed bottom-left, gentle scale + opacity pulse
   ===================================================================== */
.winternet-logo-link {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: var(--wn-z-logo);
  display: block;
  line-height: 0;
}
.winternet-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  transform-origin: center;
  animation: wn-breathe 3.6s ease-in-out infinite;
  transition: box-shadow .25s ease;
}
.winternet-logo-link:hover .winternet-logo {
  box-shadow: 0 10px 28px rgba(0,113,227,0.32);
}

@keyframes wn-breathe {
  0%, 100% { transform: scale(1);     opacity: 0.86; }
  50%      { transform: scale(1.07);  opacity: 1; }
}

@media (max-width: 480px) {
  .winternet-logo-link { left: 14px; bottom: 14px; }
  .winternet-logo { width: 46px; height: 46px; }
}

/* =====================================================================
   Reduced motion — calm everything injected by site.js
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .winternet-logo { animation: none; opacity: 1; }
  .wn-sketch-van { animation: none; }
  .wn-backdrop, .wn-drawer { transition: none; }
}

/* Lock body scroll while the drawer is open (toggled by site.js) */
body.wn-noscroll { overflow: hidden; }

/* =====================================================================
   PAPER TEXTURE — warm off-white base for the whole site.
   A fixed full-viewport ::before layer paints a light cream base plus a
   subtle fibrous grain (SVG fractalNoise data-URI) at very low opacity, so
   text stays readable. Lives here so every page inherits it; pages must NOT
   cover it with an opaque full-bleed background — keep cards white/translucent
   so the paper reads through the margins.
   ===================================================================== */
:root {
  --wn-paper: #f3efe6;        /* warm cream base                          */
  /* Translucent surfaces pages can use so the paper reads through them.   */
  --wn-surface:       rgba(255,255,255,0.78);  /* frosted white card      */
  --wn-surface-solid: #ffffff;                 /* opaque white card       */
  --wn-surface-light: rgba(245,245,247,0.72);  /* frosted light band      */
}

html { background: var(--wn-paper); }

/* The texture lives on a fixed full-viewport layer behind all page content.
   Cream base + a faint fibrous grain (SVG fractalNoise) + sparse long
   "fibers". Everything is kept at very low opacity so type stays crisp. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;            /* sits behind all page content */
  pointer-events: none;
  background-color: var(--wn-paper);
  background-image:
    /* ---- CRUMPLED PAPER: fractal noise lit from the upper-left. The specular
       pass paints bright ridges, the diffuse pass paints the crease shadows —
       together they read as a sheet that's been scrunched and smoothed out.
       Same turbulence (seed 8) in both so highlights and shadows line up. ---- */
    /* ridge highlights (blended 'screen' — lightens where paper catches light) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='6' seed='8' stitchTiles='stitch' result='n'/%3E%3CfeSpecularLighting in='n' surfaceScale='4.2' specularConstant='0.9' specularExponent='14' lighting-color='%23ffffff'%3E%3CfeDistantLight azimuth='235' elevation='46'/%3E%3C/feSpecularLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E"),
    /* crease shadows (blended 'multiply' — darkens the folds) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='6' seed='8' stitchTiles='stitch' result='n'/%3E%3CfeDiffuseLighting in='n' surfaceScale='4.2' diffuseConstant='1.05' lighting-color='%23ffffff'%3E%3CfeDistantLight azimuth='235' elevation='46'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E"),
    /* fine fractal grain — the paper's tooth */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.13'/%3E%3C/svg%3E"),
    /* soft top-light wash so the sheet feels lit, not flat */
    radial-gradient(150% 120% at 50% -10%, rgba(255,255,255,0.45), rgba(255,255,255,0) 60%);
  background-repeat: repeat, repeat, repeat, no-repeat;
  background-size: 560px 560px, 560px 560px, 200px 200px, cover;
  /* highlights lighten, shadows multiply, grain overlays, wash lifts the top */
  background-blend-mode: screen, multiply, normal, screen;
  /* a touch more contrast so the crumple reads stronger (still text-safe) */
  filter: contrast(1.04);
}

/* Texture is a static painted layer — nothing animates — so it already
   honours prefers-reduced-motion. Kept explicit for clarity. */
@media (prefers-reduced-motion: reduce) {
  body::before { background-attachment: scroll; }
}

/* Reversible launch hiding for dormant global-nav destinations. */
[data-temporarily-hidden="true"] { display: none !important; }

/* ---- Mobile nav hamburger for the shared dark global nav ---- */
.wn-hamburger { display: none; background: none; border: 0; color: rgba(245,245,247,0.85); cursor: pointer; padding: 6px; align-items: center; }
.wn-hamburger:hover { color: #fff; }
@media (max-width: 900px) {
  .wn-hamburger { display: inline-flex; }
  .globalnav { position: relative; }
  .globalnav .nav-links { display: none !important; }
  .globalnav.wn-nav-open .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(22,22,23,0.97);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    padding: 6px 0;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 14px 28px rgba(0,0,0,0.32);
    z-index: 9998;
  }
  .globalnav.wn-nav-open .nav-links a { display: block; width: 100%; padding: 13px 22px; line-height: 1.2; }
}

/* =====================================================================
   iOS-26 "LIQUID GLASS" — page-switch transition + liquid nav indicator
   Switching pages from the top bar now morphs the whole view (cross-document
   View Transitions) instead of a hard cut, while the top bar itself settles
   in place. Unsupported browsers just navigate normally (progressive).
   ===================================================================== */
@view-transition { navigation: auto; }

/* the sticky top bar is a shared element: it persists/settles across the
   transition instead of fading out with the page body */
.chrome { view-transition-name: wn-topbar; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: wn-vt-out .44s cubic-bezier(.4, 0, .2, 1) both; }
  ::view-transition-new(root) { animation: wn-vt-in  .48s cubic-bezier(.22, 1, .36, 1) both; }
  /* the top bar eases with a soft liquid settle rather than a cross-fade */
  ::view-transition-group(wn-topbar) { animation-duration: .48s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
}
@keyframes wn-vt-out { to   { opacity: 0; transform: scale(.985); filter: blur(5px); } }
@keyframes wn-vt-in  { from { opacity: 0; transform: scale(1.015); filter: blur(6px); } }

/* ---- liquid sliding indicator under the top-nav links ---- */
.globalnav .nav-links { position: relative; }
.globalnav .nav-links a { position: relative; z-index: 1; }
.wn-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.wn-nav-pill {
  position: absolute;
  top: 50%; left: 0; width: 0; height: 30px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -2px 4px rgba(0,0,0,0.18), 0 3px 12px rgba(0,0,0,0.22);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  backdrop-filter: blur(8px) saturate(160%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  /* springy 'liquid' glide between items */
  transition: left .5s cubic-bezier(.34, 1.36, .5, 1),
              width .5s cubic-bezier(.34, 1.36, .5, 1),
              opacity .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .wn-nav-pill { transition: opacity .2s ease; }
}
@media (max-width: 900px) {
  .wn-nav-pill { display: none; }   /* nav collapses into the hamburger dropdown */
}

/* =====================================================================
   SHARED MOBILE LAYER — applies on every page that loads site.css.
   Additive + phone-scoped, so the desktop layout is untouched.
   ===================================================================== */
/* media never overflows its container (canvas excluded — the design board
   manages its own width for zoom) */
img, svg, video { max-width: 100%; }

@media (max-width: 640px) {
  /* iOS Safari zooms the page when a focused input is < 16px — pin to 16 */
  input, textarea, select { font-size: 16px; }
  /* tighter side gutters so the sticky chrome doesn't crowd small screens */
  .globalnav-rail, .utility-rail { padding-left: 14px; padding-right: 14px; }
  /* the wordmark shrinks a touch to leave room for the hamburger */
  .nav-brand { font-size: 18px; }
}

/* the hamburger dropdown can be taller than a short phone — let it scroll */
@media (max-width: 900px) {
  .globalnav.wn-nav-open .nav-links {
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* on the narrowest phones the bag drawer takes the full width */
@media (max-width: 380px) {
  .wn-drawer { width: 100vw; max-width: 100vw; }
}
