/* JesszShop - storefront + admin styles. Plain CSS, no build step. */
:root {
  --bg: #fff; --fg: #111; --muted: #6b6b6b; --line: #e6e6e6; --soft: #f6f6f4;
  --accent: #111; --accent-fg: #fff; --ok: #1f8f4e; --warn: #b7791f; --bad: #c0392b;
  --radius: 10px; --maxw: 1200px; --shadow: 0 8px 30px rgba(0,0,0,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--fg); background: var(--bg); line-height: 1.55; font-size: 15px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hidden, [hidden] { display: none !important; }  /* [hidden]: the UA rule loses to e.g. label.f { display:block } */

/* header */
.hdr { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.hdr .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.hdr .brand { font-weight: 700; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.hdr .brand .logo, .hdr .brand picture { display: inline-flex; height: 36px; }
.hdr .brand .logo img, .hdr .brand picture img { height: 36px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.hdr nav { display: flex; gap: 18px; margin-left: auto; align-items: center; flex: none; }
.hdr nav a { font-size: .95rem; color: #333; position: relative; padding: 4px 0; white-space: nowrap; }
.hdr nav a.active { font-weight: 600; }
.hdr nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--fg); border-radius: 1px; }  /* current page underlined */
/* when logo + menu do not fit on one line (measured by fitHeader, inline in base.html), the menu folds into a ☰ dropdown */
.hdr .menu-btn { display: none; margin-left: auto; border: 0; background: none; font-size: 1.5rem; line-height: 1; padding: 6px 4px; cursor: pointer; color: var(--fg); }
.hdr.collapsed .menu-btn { display: block; }
.hdr.collapsed nav { display: none; }
.hdr.collapsed.open nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 4px 20px 14px; }
.hdr.collapsed.open nav a { padding: 12px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.hdr.collapsed.open nav a:first-child { border-top: 0; }
.hdr.collapsed.open nav a.active::after { display: none; }
.hdr.collapsed.open nav a.active { color: var(--fg); }
.hdr.collapsed.open nav .lang { margin-top: 12px; }
@media (max-width: 640px) { .hdr .wrap { gap: 12px; } }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--fg); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; vertical-align: middle; margin-left: 4px; }
.badge.red { background: var(--bad); }
.badge.hidden { display: none; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--fg); background: var(--fg); color: #fff; cursor: pointer; font-weight: 500; transition: .15s; white-space: nowrap; }
.btn:hover { opacity: .85; text-decoration: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.xs { padding: 3px 9px; font-size: .78rem; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn.ok { border-color: var(--ok); background: var(--ok); }
.btn.link { border: none; background: none; color: var(--fg); padding: 4px 6px; text-decoration: underline; }
input:where(:not([type=checkbox], [type=radio], [type=file])), select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 8px; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--fg); }
textarea { min-height: 90px; resize: vertical; }
.hometexts { width: 100%; }
.hometexts textarea { min-height: 56px; min-width: 100%; width: 100%; resize: both; }  /* the table cell follows the box when it is dragged wider; the wrapper scrolls */
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 100px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
table.t input, table.t select { padding: 5px 8px; }
.scroll-x { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; background: var(--soft); border: 1px solid var(--line); }
.pill.pending { background: #fff7e6; border-color: #f2d9a6; color: #8a5a00; }
.pill.paid { background: #e8f7ee; border-color: #b7e4c7; color: #1f6f3f; }
.pill.shipped { background: #e8f0fe; border-color: #b8ccf5; color: #1f4f9f; }
.pill.completed { background: #eee; color: #333; }
.pill.cancelled { background: #fdecea; border-color: #f5c2bd; color: #9f2a1f; }
/* the cart while the shipping quote is on its way: the summary dims behind a spinner */
.loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; padding: 10px 0; }
.loading::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sum.busy > *:not(.loading) { opacity: .45; }

/* toast: top centre, above the sticky header and any modal; green when something went through, red when it did not */
.toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -14px); background: var(--ok); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: .92rem; font-weight: 600; max-width: calc(100vw - 32px); text-align: center; z-index: 999; box-shadow: var(--shadow); opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
.lb { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 300; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }  /* sideways swipe = previous / next */
.lb .lb-body { position: relative; width: 100%; height: 100%; }
.lb .lb-item { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .4s ease; }  /* one item; the new one fades in over the old (Media.lightbox) */
.lb .lb-item.on { opacity: 1; }
.lb img, .lb video { max-width: 96vw; max-height: 92vh; object-fit: contain; background: #000; }
.lb video { width: min(96vw, calc(92vh * 16 / 9)); }  /* small clips scale up to fill the viewer */
.lb .lb-x, .lb .arr { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; line-height: 44px; text-align: center; cursor: pointer; }
.lb .lb-x:hover, .lb .arr:hover { background: rgba(255,255,255,.35); }
.lb .lb-x { top: 16px; right: 16px; font-size: 18px; }
.lb .arr { top: 50%; transform: translateY(-50%); } .lb .arr.prev { left: 16px; } .lb .arr.next { right: 16px; }
.vwrap { position: relative; isolation: isolate; }
/* playback progress of an autoplaying video (Media.progress): a 3 px light-grey line growing along the bottom edge while it plays */
/* z-index 1000 of the line, tags, arrows and dots is only meant to beat the stacked layers inside their box: the boxes are stacking contexts (isolation: isolate), so nothing leaks above the viewer / a modal */
.vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); opacity: 0; transition: opacity .3s, height .15s; pointer-events: none; z-index: 1000; cursor: pointer; touch-action: none; }
.vprog.on { opacity: 1; pointer-events: auto; }
.vprog::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; bottom: 0; }  /* a taller strip to aim at: press or drag seeks */
.vprog:hover, .vprog.drag { height: 6px; background: rgba(255,255,255,.35); }
@media (hover: none) { .vprog { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } .vprog::before { top: -24px; } .vprog.drag { height: 8px; } }  /* fingers: a taller strip, no long-press link menu */
.vprog i { display: block; height: 100%; width: 0; background: rgba(214,214,214,.9); }
.vprog.img { opacity: 1; }  /* under a photo on a timer: fills until the next item's turn; not draggable */
.vprog.img i { animation: vfill linear forwards; }
.vprog.img.paused i { animation-play-state: paused; }
@keyframes vfill { from { width: 0; } to { width: 100%; } }
.vwrap .expand, .gallery .main .expand { position: absolute; top: 10px; right: 10px; border: 0; background: rgba(0,0,0,.55); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 2; }
.gallery .main { position: relative; isolation: isolate; touch-action: pan-y; }  /* sideways swipe = previous / next, the page still scrolls vertically */
.gallery .main img, .gallery .main video { cursor: zoom-in; }  /* a click opens the viewer (the video's control strip excepted) */
.blk .imgs a img { cursor: zoom-in; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal { background: #fff; border-radius: 14px; padding: 26px; max-width: 460px; width: 100%; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.modal.wide { max-width: 900px; }
.stars { color: #e0a800; letter-spacing: 2px; }
.stars.pick span { cursor: pointer; font-size: 1.4rem; }

/* storefront */
.hero { padding: 48px 0 28px; }
.hero h1 { font-size: 2.4rem; font-weight: 700; }
.hero.banner { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }  /* the banner takes the whole row, the title above it */
.hero-img { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--soft); position: relative; isolation: isolate; touch-action: pan-y; }  /* proportions of the first banner (inline style; 16:9 until its size is known); sideways swipe = next / previous slide */
.hero-img.portrait { display: none; }  /* the set for screens taller than wide (phones / tablets held upright), shown instead of the landscape one there */
@media (orientation: portrait) { .hero-img.landscape { display: none; } .hero-img.portrait { display: block; } }
.hero-img .hslide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.hero-img .hslide.on { opacity: 1; }  /* before the script runs: the first slide; afterwards: a layer that has faded in (Pages.stack) */
.hero-img .hslide.src { display: none; }  /* a photo slide is a source: fetched once, cloned into a fresh layer on every switch */
.lay.off { transition: none !important; }  /* a layer shown or hidden at once */
.hero-img .hslide a { display: block; width: 100%; height: 100%; }
.hero-img img, .hero-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-img .arr { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); color: #111; font-size: 22px; line-height: 40px; text-align: center; cursor: pointer; opacity: 0; transition: opacity .25s; z-index: 1000; }
.hero-img .arr.prev { left: 12px; } .hero-img .arr.next { right: 12px; }
.hero-img:hover .arr, .hero-img .arr:focus-visible { opacity: 1; }
.hero-img .dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; z-index: 1000; }
.hero-img .dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: background .25s, transform .25s; }
.hero-img .dots button.on { background: #fff; transform: scale(1.3); }
@media (hover: none) { .hero-img .arr { opacity: 1; } }
.hero-sub p { margin: 0 0 10px; }
.hero-sub figure.md-media { max-width: 820px; }  /* media embedded in the subtitle (![](media:<id>)): shown in place, no lightbox */
.hero-sub figure.md-media img { cursor: default; }
.hero-sub .vwrap .expand { display: none; }
.hero.banner .hero-text { order: -1; }
@media (max-width: 720px) { .hero.banner { gap: 16px; } }
.featured h2, .related h2 { font-size: 1.3rem; margin: 8px 0 18px; }
.related { margin-top: 30px; }
.related .more { text-align: center; margin: -28px 0 48px; }  /* Show more, under the strip (the grid keeps its own bottom padding) */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -24px 0 48px; }  /* page numbers under the grid; empty on a single page */
.pager:empty { display: none; }
.pg { min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; background: #fff; text-decoration: none; color: inherit; }
.pg.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.pg.off { opacity: .35; }
.pg.gap { border-color: transparent; background: none; }
@media (max-width: 480px) {  /* phones: one neighbour each side (‹ 1 … 59 60 61 … 120 ›) and tighter pills, so the row never wraps */
  .pager { gap: 4px; }
  .pg { min-width: 30px; padding: 6px 8px; font-size: .85rem; }
  .pg.gap { min-width: 16px; padding: 6px 2px; }
  .pg.far { display: none; }
}
.featured .pgrid { padding-bottom: 36px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar input[type=search] { max-width: 320px; }
.chips { display: flex; gap: 12px 8px; flex-wrap: wrap; }  /* rows breathe when the tags wrap (phones) */
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: .85rem; background: #fff; }
.chip.on { background: var(--fg); color: #fff; border-color: var(--fg); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 20px; padding-bottom: 60px; }
.pcard { display: block; position: relative; transition: transform .35s ease; }
.pcard.zoom { transform: scale(1.05); z-index: 2; }  /* the whole card (photo, title, price) grows while its sequence runs (the progress line on it): under the mouse on a desktop, nearest the middle of the screen on a touch screen; a card with nothing to play never grows */
.pcard .ph { aspect-ratio: 1; background: var(--soft); border-radius: var(--radius); overflow: hidden; position: relative; isolation: isolate; touch-action: pan-y; }  /* sideways swipe = previous / next photo, the page still scrolls vertically */
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph video.hover, .pcard .ph .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; pointer-events: none; }  /* layers (Pages.stack): the incoming one fades in on top */
.pcard .ph .slide.src { display: none; }  /* a photo is a source: fetched once, cloned into a fresh layer each time its turn comes */
.pcard .ph .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .ph .lay.on { opacity: 1; }
.chips.subs { margin: -6px 0 24px; }  /* 18px under the category row: a group of its own, not just another row of tags */
.chips.subs .chip { font-size: .8rem; padding: 4px 12px; border-style: dashed; }
.chips.subs .chip.on { border-style: solid; }
.about h1 { font-size: 2rem; margin: 36px 0 20px; }
.about-body { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; margin-bottom: 40px; }
.about-text { font-size: 1.05rem; line-height: 1.7; }
.about-imgs { display: grid; gap: 12px; }
.about-imgs img { width: 100%; border-radius: var(--radius); cursor: zoom-in; }
.about-imgs video { width: 100%; border-radius: var(--radius); background: #000; }
figure.md-media { margin: 1em 0; }  /* ![caption](media:<id>) in staff Markdown (product text blocks, About page) */
figure.md-media img { width: 100%; border-radius: var(--radius); cursor: zoom-in; }
figure.md-media video { width: 100%; border-radius: var(--radius); background: #000; }
figure.md-media figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.preview-bar { background: #ffe9a8; color: #5a4300; text-align: center; font-size: .85rem; padding: 6px 12px; }  /* product page opened with ?draft=1 by staff */
@media (max-width: 720px) { .about-body { grid-template-columns: 1fr; } }
footer .frow { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; padding-right: 72px; /* keep clear of the chat button */ }
footer .flinks { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-bottom: 14px; padding-right: 72px; }  /* About · Contact us · Privacy policy … (the pages written in the admin) */
footer .flinks a { color: var(--fg); }
.infonav { display: flex; gap: 6px 22px; flex-wrap: wrap; margin: -8px 0 26px; font-size: .95rem; }  /* About us · Contact us · Privacy policy … on those pages */
.infonav a { color: var(--muted); }
.infonav a.on { color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.page-text { max-width: 820px; margin-bottom: 40px; }  /* the same 40 px above the footer as the About text */
.page-updated, .contact-box { margin: -12px 0 40px; }  /* the text's 40 px, then 28 px to the date / chat button and 40 px to the footer */
footer .powered { color: var(--muted); font-size: .8rem; }
/* social / marketplace links: the platform's mark (app/social.py) as a round button, name as tooltip; an unknown site shows a link mark + its name */
.social { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.social span { margin-right: 4px; }
.social a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); }
.social a.named { padding: 0 12px 0 9px; }
.social a:hover { background: var(--fg); color: #fff; text-decoration: none; }
.social svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.pcard:hover { text-decoration: none; }
.pcard .pt { margin-top: 10px; font-weight: 500; }
.pcard .pp { color: var(--muted); }
.pcard .pp .sold { font-size: .8rem; margin-left: 8px; }
.pcard .pp b { color: var(--fg); font-weight: 600; margin-right: 6px; }
.pcard .pp s { font-size: .85rem; }
.pcard .tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 2px 10px; border-radius: 999px; font-size: .75rem; z-index: 1000; }  /* above the layers; frosted glass: the photo shows through blurred, the text stays legible (plain 80 % white where blur is unsupported) */

/* product page */
.prod { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding: 32px 0; }
.prod > * { min-width: 0; }  /* grid items default to min-width:auto: the thumbnail strip (n × 68px) would widen the column past the phone screen instead of scrolling */
@media (max-width: 860px) { .prod { grid-template-columns: 1fr; gap: 24px; } .hero h1 { font-size: 1.8rem; } }
.gallery .main { aspect-ratio: 1; background: var(--soft); border-radius: var(--radius); overflow: hidden; }
.gallery .main img, .gallery .main video { width: 100%; height: 100%; object-fit: contain; }
.gallery .main .gm { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }  /* one gallery item; the new one fades in over the old (shop.js showG) */
.gallery .main .gm.on { opacity: 1; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery .thumbs > * { width: 68px; height: 68px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; flex: none; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.gallery .thumbs > *.on { border-color: var(--fg); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.vt { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }  /* video still: poster thumbnail with a play mark (product gallery, admin thumbnails) */
.vt i { position: absolute; font-style: normal; color: #fff; font-size: 1.1rem; text-shadow: 0 0 6px rgba(0,0,0,.8); pointer-events: none; }
.vt b { position: absolute; right: 2px; bottom: 2px; font-weight: 500; font-size: .62rem; line-height: 1.4; padding: 0 4px; border-radius: 4px; color: #fff; background: rgba(0,0,0,.6); pointer-events: none; }  /* length */
.ft { display: block; padding: 4px; font-size: .68rem; line-height: 1.3; word-break: break-all; overflow: hidden; max-height: 100%; }  /* any other file: icon by extension + name */
.ft .ic { font-size: 1.6rem; line-height: 1.2; }
.buy h1 { font-size: 1.9rem; }
.buy .price { font-size: 1.5rem; font-weight: 600; margin: 12px 0; }
.buy .price s { color: var(--muted); font-weight: 400; font-size: 1rem; margin-left: 10px; }
.buy .price.inq, .pcard .pp b.inq { color: var(--muted); font-weight: 500; }  /* price on request */
.buy .tiers { margin: 12px 0 16px; }
.buy .tiers .name { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.buy .tiers .steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.buy .tiers .t { border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; font-size: .9rem; cursor: pointer; }  /* a click puts that many in the quantity box */
.buy .tiers .t:hover { border-color: var(--muted); }
.buy .tiers .t b { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.buy .tiers .t.on { border-color: var(--fg); }  /* the step the quantity in the box buys at */
.buy .tiers .t.on b { color: var(--fg); }
.buy .opt { margin: 14px 0; }
.buy .opt .name { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.buy .opt .vals { display: flex; gap: 8px; flex-wrap: wrap; }
.buy .opt .vals span { padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: .9rem; }
.buy .opt .vals span.on { border-color: var(--fg); background: var(--fg); color: #fff; }
.buy .opt .vals span.off { color: var(--muted); text-decoration: line-through; }  /* every combination with this value is out of stock */
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 36px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; }
.qty input { width: 74px; border: 0; text-align: center; padding: 8px 0; }  /* room for six digits: chips are ordered by the thousand */
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input[type=number] { -moz-appearance: textfield; appearance: textfield; }  /* the arrows would eat the width */
.actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; align-items: center; }
.meta-list { font-size: .9rem; color: var(--muted); }
.meta-list b { color: var(--fg); font-weight: 500; }
.meta-list .pill { margin: 3px 2px 3px 0; vertical-align: middle; }  /* the tag bubbles: 6 px between lines when they wrap on phones */

/* content blocks */
.blocks { max-width: 860px; margin: 40px auto 80px; }
.blk { margin: 28px 0; }
.blk h2 { font-size: 1.6rem; margin-top: 48px; }
.blk.text p { margin: 0 0 1em; font-size: 1.05rem; color: #333; overflow-wrap: anywhere; }  /* long URLs / part numbers wrap instead of widening the page */
.blk.text.lead p { font-size: 1.3rem; line-height: 1.5; font-weight: 300; color: #222; }
.blk.text.quote p { font-size: 1.2rem; font-style: italic; text-align: center; color: #444; padding: 10px 30px; }
.blk.text.center p { text-align: center; }
.blk figure { margin: 0; }
.blk figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.blk .imgs { display: grid; gap: 14px; }
.blk .imgs.grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.blk .imgs.full { grid-template-columns: 1fr; }
.blk .imgs.two { grid-template-columns: 1fr 1fr; }
.blk .imgs.three { grid-template-columns: repeat(3, 1fr); }
.blk .imgs img { width: 100%; border-radius: var(--radius); }
.blk video { width: 100%; border-radius: var(--radius); background: #000; }
.blk table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.blk table td, .blk table th { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.blk table th { background: var(--soft); font-weight: 600; }
.blk.divider hr { border: 0; border-top: 1px solid var(--line); width: 60px; margin: 40px auto; }
.blk .file { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.blk .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.blk .features div { background: var(--soft); padding: 18px; border-radius: var(--radius); }
.blk .features b { display: block; margin-bottom: 4px; }

/* password boxes: the eye shows the text */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 40px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); display: inline-flex; border-radius: 6px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--fg); }
.flag { font-family: "Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.1em; line-height: 1; letter-spacing: -1px; }

/* reviews */
.reviews { max-width: 860px; margin: 0 auto 80px; }
.review { padding: 18px 0; border-top: 1px solid var(--line); }
.review .who { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.review .who b { font-weight: 600; }
.review p { margin: 8px 0; overflow-wrap: anywhere; }
.review .rm { display: flex; gap: 8px; flex-wrap: wrap; }
.review .rm img, .review .rm video { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.review .thread { margin: 10px 0 0 22px; border-left: 2px solid var(--line); padding-left: 14px; display: grid; gap: 8px; }
.review .reply { background: var(--soft); padding: 10px 14px; border-radius: 8px; font-size: .9rem; }
.review .reply.staff { background: #f2f6ff; }
.review .reply .who { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; font-size: .85rem; }
.review .reply .who b { font-weight: 600; }
.review .reply .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: .8rem; }
.review .reply.deleted { opacity: .55; }
.pill.staff { background: #e6efff; border-color: #bcd0ff; color: #2a4fa8; }
.pill.awaiting { background: #fff7e6; border-color: #f2d9a6; color: #8a5a00; }
.review .reply-form { display: flex; gap: 8px; margin: 8px 0 0 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.review .reply-form textarea { min-height: 42px; flex: 1; }
.review-form { background: var(--soft); padding: 18px; border-radius: var(--radius); margin-top: 20px; }

/* cart */
.cart { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 32px 0 80px; }
@media (max-width: 860px) { .cart { grid-template-columns: 1fr; } }
.cline { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cline img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.oline { display: grid; grid-template-columns: 1fr 70px auto 110px auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }  /* staff-made order: product, qty × price, ✕; the options below */
.oline .opt { grid-column: 1 / -1; }
.sum { background: var(--soft); border-radius: var(--radius); padding: 20px; position: sticky; top: 80px; }
.sum .l { display: flex; justify-content: space-between; margin: 6px 0; }
.sum .l.total { font-weight: 600; font-size: 1.15rem; border-top: 1px solid #ddd; padding-top: 10px; margin-top: 10px; }
.sum .l.freeship { color: var(--ok); font-size: .85rem; margin-top: -4px; }  /* how much more buys free shipping */
.payopts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.order { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.order .oh { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.order .items { margin: 10px 0; font-size: .9rem; }

/* chat widget */
.chat-fab { position: fixed; right: 22px; bottom: 22px; width: 56px; height: 56px; border-radius: 50%; background: var(--fg); color: #fff; border: 0; cursor: pointer; box-shadow: var(--shadow); z-index: 100; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.chat-fab .badge { position: absolute; top: -4px; right: -4px; }
.chat-panel { position: fixed; right: 22px; bottom: 90px; width: 360px; max-width: calc(100vw - 30px); height: 520px; max-height: calc(100vh - 120px); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; z-index: 100; overflow: hidden; border: 1px solid var(--line); }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head b { flex: 1; }
.chat-head .muted { opacity: .45; }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: hsl(var(--hue, 200) 50% 82%); color: hsl(var(--hue, 200) 45% 28%); font-weight: 600; overflow: hidden; flex: 0 0 auto; vertical-align: middle; line-height: 1; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hdr nav a#acct { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; display: inline-block; }
.dot.on { background: var(--ok); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #fafaf9; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: .92rem; word-break: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--fg); color: #fff; border-color: var(--fg); }
.msg.me a { color: #fff; }
.msg .t { display: block; font-size: .7rem; opacity: .6; margin-top: 3px; white-space: nowrap; }
.msg img, .msg video { max-width: 240px; max-height: 240px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; }
.msg.deleted { opacity: .5; font-style: italic; }
.msg .del { float: right; margin-left: 8px; opacity: .5; cursor: pointer; font-size: .75rem; }
.chat-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-in textarea { min-height: 40px; max-height: 120px; border-radius: 12px; resize: none; overflow-y: hidden; }  /* grows with the text (chat.js); scrolls only past max-height */
.chat-in .attach { cursor: pointer; padding: 8px; font-size: 1.2rem; }
.chat-day { align-self: center; font-size: .72rem; color: var(--muted); margin: 6px 0; }
.sys { text-align: center; font-size: .8rem; color: var(--muted); padding: 12px; }
.sys.earlier { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* admin */
.adm { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 60px); }
.adm aside { border-right: 1px solid var(--line); padding: 20px 0; background: #fafaf9; }
.adm aside a { display: block; padding: 9px 20px; color: #333; }
.adm aside a.on { background: #fff; font-weight: 600; border-right: 2px solid var(--fg); }
.adm main { padding: 24px 28px 60px; min-width: 0; }
@media (max-width: 760px) { .adm { grid-template-columns: 1fr; } .adm aside { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); } .adm aside a { white-space: nowrap; } }
.adm .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.adm .top h2 { margin: 0; flex: 1; }
.adm tr.click { cursor: pointer; }
.adm tr.click:hover { background: var(--soft); }
.editor { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
/* the option-combination table in the product editor: one row per combination, the product's own values as the placeholders */
.vtab { overflow-x: auto; margin: 4px 0 6px; }
.vtab table { border-collapse: collapse; font-size: .85rem; }
.vtab th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 6px 4px; white-space: nowrap; }
.vtab td { padding: 1px 6px 1px 0; }
.vtab td.k { white-space: nowrap; padding-right: 12px; }
.vtab input, .vtab select { width: 84px; padding: 4px 6px; }
.vtab td:nth-child(2) input { width: 110px; }
.vtab select { width: 130px; }
.eblk { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.eblk .eh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .8rem; color: var(--muted); }
.eblk .eh b { text-transform: uppercase; letter-spacing: .05em; flex: 1; }
.eblk .eh button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: .8rem; }
.eblk textarea { min-height: 70px; }
.addblk { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 30px; }
.mthumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pm-grid { max-height: 60vh; overflow: auto; }
.mthumb.pm { cursor: pointer; }
.mthumb.pm.on { outline: 3px solid var(--fg); outline-offset: 1px; }
.mthumb .st { position: absolute; bottom: 2px; left: 2px; background: rgba(0,0,0,.6); color: #fff; border-radius: 4px; font-size: .65rem; padding: 0 4px; }
.mthumb { width: 84px; height: 84px; border-radius: 8px; overflow: hidden; position: relative; background: var(--soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: .7rem; text-align: center; padding: 2px; }
.mthumb picture { display: contents; }  /* <picture> (avif / webp / jpg thumbnails) must not become the flex item: the img itself fills the box */
.mthumb img { width: 100%; height: 100%; object-fit: cover; }
.x { cursor: pointer; }
.mthumb .x { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: .7rem; line-height: 18px; text-align: center; cursor: pointer; }
.mthumb .st { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .62rem; text-align: center; }
.mthumb[draggable="true"], .drag-row[draggable="true"] { cursor: grab; }
.drag { opacity: .4; }
.over { outline: 2px solid var(--fg); outline-offset: 2px; }
.mthumb.pv { cursor: pointer; }  /* click: full-screen preview (image / video) or open the file */
.mthumb .mv { position: absolute; top: 2px; left: 2px; cursor: pointer; background: rgba(255,255,255,.8); border-radius: 4px; font-size: .7rem; padding: 0 3px; }
.upbox { border: 1px dashed #bbb; border-radius: var(--radius); padding: 12px; text-align: center; font-size: .85rem; color: var(--muted); cursor: pointer; }
.upbox:hover { border-color: var(--fg); color: var(--fg); }
.fmt { display: flex; gap: 12px; font-size: .8rem; margin: 6px 0; flex-wrap: wrap; }
.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 170px); min-height: 460px; }
.inbox .list { border-right: 1px solid var(--line); overflow-y: auto; }
.inbox .conv { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .9rem; }
.inbox .conv.on { background: var(--soft); }
.inbox .conv .n { display: flex; justify-content: space-between; gap: 6px; }
.inbox .conv .p { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .pane { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 760px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox .list { max-height: 240px; } .inbox .pane { height: 60vh; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
pre.code { background: var(--soft); padding: 12px; border-radius: 8px; font-size: .8rem; overflow: auto; }
.login-box { max-width: 420px; margin: 80px auto; }
footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .85rem; }
.hdr select.lang { width: auto; padding: 4px 8px; border-radius: 6px; font-size: .85rem; border-color: var(--line); background: #fff; }
.langtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.langtabs .chip.has { border-color: var(--ok); }
.tr-hint { font-size: .78rem; color: var(--muted); font-style: italic; }
.draft-note { background: #fff4cc; border: 1px solid #f0d78a; border-radius: 8px; padding: 6px 10px; font-size: .82rem; margin: 0 0 10px; }  /* product editor holding a saved draft */
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 4px 0 2px; }
.bar span { display: block; height: 100%; background: var(--fg); transition: width .5s; }
.addr { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.addr-form { margin: 8px 0; }
.captcha { align-items: center; }
.captcha img { height: 44px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.notice { background: #fff7e6; border: 1px solid #f2d9a6; color: #6b4a00; border-radius: 8px; padding: 10px 12px; font-size: .85rem; margin: 10px 0; line-height: 1.45; }
.charge { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--line); padding: 8px 0; margin-top: 8px; font-size: .9rem; }

/* traffic: summary tiles, the day bars and the tables under them */
.stiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.stile { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.stile b { display: block; font-size: 1.3rem; line-height: 1.35; }
.stile span { color: var(--muted); font-size: .78rem; }
.sdays { display: flex; align-items: flex-end; gap: 2px; height: 86px; min-width: max-content; border-bottom: 1px solid var(--line); margin: 0 0 6px; }
.sdays i { flex: 1 1 0; min-width: 2px; min-height: 2px; background: var(--line); border-radius: 2px 2px 0 0; position: relative; align-self: flex-end; }
.sdays i b { position: absolute; left: 0; right: 0; bottom: 0; display: block; background: var(--fg); border-radius: 2px 2px 0 0; }
table.t th.s { cursor: pointer; white-space: nowrap; }
table.t th.s.on { color: var(--fg); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
