/* Allsortery: a shop of all sorts. Warm cream paper, chunky type, sweet-shop colours used sparingly. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 400 800; font-display: swap; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400 900; font-display: swap; src: url(/fonts/nunito.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 400 700; font-display: swap; src: url(/fonts/caveat.woff2) format("woff2"); }

:root {
  --cream: #fdf4e3;
  --paper: #fffaf1;
  --paper-2: #f8ead2;
  --ink: #2b1d16;
  --ink-2: #5f4b3f;
  --muted: #8a776a;
  --pink: #ff5d8f;
  --pink-soft: #ffd3e1;
  --yellow: #ffc233;
  --yellow-soft: #ffeab0;
  --mint: #27b7a4;
  --mint-soft: #c9f0e9;
  --blue: #4f7cff;
  --blue-soft: #d6e1ff;
  --orange: #ff8a3d;
  --lilac: #b391ff;
  --ok: #1e8a5a;
  --bad: #c73a3a;
  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: Caveat, "Comic Sans MS", cursive;
  --r: 18px;
  --shadow: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.55 var(--body); background-color: var(--cream);
  /* a faint speckle, like a paper sweet bag */
  background-image: radial-gradient(rgba(43, 29, 22, .045) 1px, transparent 1.2px), radial-gradient(rgba(255, 93, 143, .05) 1.5px, transparent 1.8px);
  background-size: 22px 22px, 57px 57px; background-position: 0 0, 11px 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--paper); padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 20px;
  font: 700 17px/1.1 var(--display); color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--pink); }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--pink); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 38px; padding: 7px 14px; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); }
.btn-danger { color: var(--bad); }
.btn.wide { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; }

/* ---- Header / footer ---- */
.announce { background: var(--ink); color: var(--cream); text-align: center; font-weight: 700; font-size: 15px; padding: 7px 16px; }
.site-head, .admin-head { padding: 14px 0 10px; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; flex: none; transition: transform .3s; }
.brand:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.wordmark { font: 800 27px/1 var(--display); letter-spacing: -.035em; }
.basket-link {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 2.5px solid var(--ink);
  border-radius: 999px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); text-decoration: none; font: 700 16px var(--display);
}
.basket-link .count {
  position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--pink);
  color: #fff; border: 2px solid var(--ink); font: 800 13px/20px var(--display); text-align: center;
}
.basket-link .count.pop { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.35); } }
.holiday { background: var(--yellow-soft); border-block: 2px solid var(--ink); padding: 10px 0; font-weight: 700; text-align: center; }

body.shop { min-height: 100vh; display: flex; flex-direction: column; }
body.shop > main { flex: 1 0 auto; }
.site-foot { margin-top: 72px; }
.squiggle { display: block; width: 100%; height: 18px; fill: var(--ink); }
.foot-inner { background: var(--ink); color: var(--cream); padding: 30px 0 26px; }
.foot-inner .logo-mark rect, .foot-inner .logo-mark circle, .foot-inner .logo-mark path { stroke: var(--cream); }
.foot-grid { display: grid; gap: 22px; }
.foot-note { color: #e6d6bf; max-width: 420px; margin-top: 12px; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-content: start; font-weight: 700; }
.foot-links a { text-decoration-color: var(--pink); }
.legal { color: #bfae98; font-size: 13px; margin: 20px auto 0; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.2fr 1fr; } .foot-links { justify-content: flex-end; } }

/* ---- Home ---- */
.hero { padding: 26px 0 12px; }
.hero h1 { font-size: clamp(40px, 11vw, 84px); letter-spacing: -.045em; max-width: 12ch; }
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after {
  content: ""; position: absolute; left: -.06em; right: -.08em; bottom: .04em; height: .36em; z-index: -1; border-radius: .3em .1em .35em .15em;
  background: var(--yellow); transform: rotate(-1.5deg);
}
.lede { font-size: 19px; color: var(--ink-2); max-width: 560px; }
.scribble { font: 700 26px/1 var(--hand); color: var(--pink); display: inline-block; transform: rotate(-3deg); white-space: nowrap; }

.finder { margin: 10px 0 12px; }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 0 16px; box-shadow: var(--shadow); max-width: 520px;
}
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 600 17px var(--body); padding: 12px 0; color: var(--ink); outline: none; }
.search:focus-within { box-shadow: 3px 3px 0 var(--blue); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 800;
  font-size: 15px; text-decoration: none; white-space: nowrap;
}
.chip small { font-weight: 700; color: var(--muted); margin-left: 2px; }
.chip.on { background: var(--ink); color: var(--cream); }
.chip.on small { color: var(--yellow); }
.chip:nth-child(5n+2):hover { background: var(--pink-soft); }
.chip:nth-child(5n+3):hover { background: var(--yellow-soft); }
.chip:nth-child(5n+4):hover { background: var(--mint-soft); }
.chip:nth-child(5n):hover { background: var(--blue-soft); }
.results { color: var(--ink-2); }
.more { text-align: center; margin-top: 28px; }

/* ---- Item cards ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin-top: 8px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { --c: var(--pink); min-width: 0; }
.card:nth-child(5n+2) { --c: var(--yellow); }
.card:nth-child(5n+3) { --c: var(--mint); }
.card:nth-child(5n+4) { --c: var(--blue); }
.card:nth-child(5n+5) { --c: var(--orange); }
.card > a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: var(--r); box-shadow: 4px 4px 0 var(--c); overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.card > a:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 6px 6px 0 var(--c); }
.card-img { position: relative; display: block; aspect-ratio: 1; background: var(--paper-2); border-bottom: 2.5px solid var(--ink); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; }
.noimg-mark { width: 38%; height: auto; opacity: .55; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card-title { font-weight: 800; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.price { font: 800 19px var(--display); letter-spacing: -.02em; }
.cond { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tag {
  position: absolute; left: 8px; top: 8px; padding: 1px 10px 3px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px 12px 9px 11px;
  font: 700 21px/1.1 var(--hand); transform: rotate(-4deg); box-shadow: 2px 2px 0 var(--ink);
}
.tag-held { background: var(--blue-soft); }
.stamp {
  position: absolute; right: 8px; top: 8px; padding: 4px 11px; border: 3px solid var(--pink); color: var(--pink); background: rgba(255, 250, 241, .92);
  border-radius: 10px; font: 800 18px/1 var(--display); text-transform: uppercase; letter-spacing: .08em; transform: rotate(8deg);
}
.stamp.big { font-size: 30px; padding: 8px 18px; right: 16px; top: 16px; z-index: 2; }
.card.st-sold img, .card.st-sold .noimg { filter: grayscale(1); opacity: .55; }
.card.st-sold .card-body { opacity: .6; }
.card.st-sold > a { box-shadow: 4px 4px 0 #cdbfae; }

/* ---- Empty states ---- */
.empty { text-align: center; padding: 40px 12px 30px; max-width: 520px; margin: 0 auto; }
.empty-mark { width: 120px; height: 120px; margin: 0 auto 14px; display: block; animation: wobble 5s ease-in-out infinite; }
.empty.small .empty-mark { width: 72px; height: 72px; }
.empty h2 { font-size: 30px; }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .empty-mark, .basket-link .count.pop { animation: none; } }

/* ---- Item page ---- */
.crumbs { margin: 6px 0 12px; font-weight: 700; font-size: 15px; }
.crumbs a { display: inline-flex; align-items: center; gap: 2px; }
.item { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .item { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
  .gallery { grid-column: 1; grid-row: 1; }
  .thumbs { grid-column: 1; grid-row: 2; }
  .buybox { grid-column: 2; grid-row: 1 / span 2; }
}
.gallery { position: relative; border: 2.5px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--paper-2); box-shadow: 5px 5px 0 var(--mint); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 1; display: grid; place-items: center; background: var(--paper-2); }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink);
  background: rgba(255, 250, 241, .92); display: grid; place-items: center; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); color: var(--ink);
}
.gal-prev { left: 10px; } .gal-next { right: 10px; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.dots button { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--pink); }
.thumbs { display: none; gap: 10px; flex-wrap: wrap; }
@media (min-width: 900px) { .thumbs { display: flex; } }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--paper-2); }
.thumbs button[aria-current="true"] { box-shadow: 3px 3px 0 var(--pink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item.st-sold .slide img { filter: grayscale(.8); opacity: .7; }

.buybox h1 { font-size: clamp(30px, 7vw, 46px); overflow-wrap: anywhere; }
.bigprice { font: 800 40px/1 var(--display); letter-spacing: -.03em; margin: 4px 0 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cond-chip, .stock { display: inline-block; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 800; font-size: 15px; background: var(--mint-soft); }
.cond-chip.c-new { background: var(--yellow-soft); }
.cond-chip.c-like_new { background: var(--blue-soft); }
.cond-chip.c-for_parts { background: #eee3d6; }
.stock { background: var(--paper); font: 700 22px/1 var(--hand); padding: 3px 12px 5px; transform: rotate(-2deg); }
.stock.sold { color: var(--pink); border-color: var(--pink); }
.stock.held { background: var(--blue-soft); }
.postage { color: var(--ink-2); font-size: 15.5px; }
.buy-form { margin: 16px 0 10px; }
.qty { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 12px; }
.qty select { font: 700 17px var(--body); padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); }
.buy-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 10px; }
.buy-form .buy-btns { margin: 0; }
.buy-btns .btn { flex: 1 1 150px; }
.note { background: var(--paper); border: 2px dashed var(--ink-2); border-radius: 14px; padding: 12px 14px; margin: 14px 0; }
.desc { margin: 22px 0 16px; font-size: 17px; overflow-wrap: anywhere; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; padding: 14px 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; font-size: 15.5px; }
.details dt { font-weight: 800; }
.details dd { margin: 0; }
.more-from { margin-top: 48px; }
.more-from h2 { font-size: 30px; }

/* ---- Basket ---- */
.page-title { font-size: clamp(36px, 9vw, 56px); margin-top: 14px; }
.basket .loading { color: var(--muted); }
.bline { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; margin-bottom: 12px; }
.bline img, .bline .bimg { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper-2); }
.bline .btitle { font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.bline .bsub { font-size: 14px; color: var(--muted); }
.bline .bprice { font: 800 18px var(--display); text-align: right; }
.bline.gone { opacity: .6; }
.bctl { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.bctl select { font: 700 15px var(--body); padding: 4px 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); }
.bctl button { font: 700 14px var(--body); background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--ink-2); padding: 4px 0; }
.bsummary { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; padding: 16px; box-shadow: 5px 5px 0 var(--yellow); margin-top: 18px; }
.bsummary table { width: 100%; border-collapse: collapse; }
.bsummary td { padding: 4px 0; }
.bsummary td:last-child { text-align: right; font-weight: 800; }
.bsummary tr.total td { font: 800 24px var(--display); padding-top: 10px; border-top: 2px dashed var(--ink-2); }
.bsummary .hint { font-size: 14px; color: var(--muted); margin: 8px 0 14px; }
.bsummary .btn { width: 100%; }
@media (min-width: 860px) { .basket.filled { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; } .bsummary { margin-top: 0; } }

.thanks { text-align: center; max-width: 560px; margin: 20px auto; }
.thanks .big { font-size: 21px; }
.thanks-items { list-style: none; padding: 0; font-weight: 700; }

/* ---- Info pages ---- */
.prose { max-width: 720px; }
.prose h2 { font-size: 25px; margin-top: 32px; }
.prose li { margin-bottom: 8px; }

/* ---- Flash messages, toast ---- */
.flash { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px; margin: 12px 0 16px; font-weight: 700; background: var(--mint-soft); }
.flash.bad { background: #ffd9d6; }
.flash.warn { background: var(--yellow-soft); }
.flash.info { background: var(--blue-soft); font-weight: 600; }
.block-link { display: block; text-decoration: none; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px;
  background: var(--ink); color: var(--cream); border-radius: 18px; font-weight: 800; box-shadow: 3px 3px 0 var(--pink); display: flex; gap: 12px; align-items: center;
}
.toast[hidden] { display: none; }
.toast a { color: var(--yellow); white-space: nowrap; }

/* ---- Admin ---- */
.admin { background-image: none; }
.admin-head { border-bottom: 2.5px solid var(--ink); background: var(--paper); padding: 10px 0; }
.admin-head .wordmark { font-size: 22px; }
.admin-head .logo-mark { width: 32px; height: 32px; }
.admin-nav { display: none; gap: 4px; }
.admin-nav a, .tabbar a { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 999px; }
.admin-nav a.active { background: var(--ink); color: var(--cream); }
.admin-tools { display: flex; gap: 14px; align-items: center; font-size: 14px; font-weight: 700; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #fff; font: 800 12px/20px var(--display); text-align: center; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper);
  border-top: 2.5px solid var(--ink); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.tabbar a { flex-direction: column; gap: 1px; font-size: 12px; padding: 6px 2px; border-radius: 12px; }
.tabbar a .ico { width: 24px; height: 24px; }
.tabbar a.active { color: var(--pink); }
.tabbar .badge { position: absolute; top: 2px; left: 55%; }
.has-tabbar .admin-main { padding-bottom: 100px; }
@media (min-width: 820px) { .admin-nav { display: flex; } .tabbar { display: none; } .has-tabbar .admin-main { padding-bottom: 40px; } }
@media (max-width: 480px) { .admin-tools a { display: none; } }
.admin-main { padding-top: 16px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-top h1 { font-size: 32px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-box { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; padding: 16px; margin: 0 0 16px; }
.card-box h2 { font-size: 20px; }
.narrow { max-width: 420px; margin: 30px auto; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.tabs a { flex: none; padding: 6px 13px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 14.5px; background: var(--paper); }
.tabs a.on { background: var(--ink); color: var(--cream); }
.admin-search { display: flex; gap: 8px; margin: 6px 0 14px; }
.admin-search input { flex: 1; min-width: 0; }
.admin label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 14px; }
.admin input:not([type=checkbox]):not([type=radio]):not([type=file]), .admin select, .admin textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 13px; font: 600 17px var(--body); color: var(--ink); background: #fff;
  border: 2px solid var(--ink); border-radius: 12px;
}
.admin .admin-search input { margin-top: 0; padding: 8px 12px; }
.admin input:focus, .admin select:focus, .admin textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--blue); }
textarea { resize: vertical; }
.admin label.check { display: flex; gap: 10px; align-items: center; font-weight: 700; }
label.check input { width: 22px; height: 22px; accent-color: var(--pink); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 800; font-size: 15px; margin-bottom: 6px; padding: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 800 12.5px/1.6 var(--body); border: 1.5px solid var(--ink); background: var(--paper); vertical-align: middle; }
.pill.is-published { background: var(--mint-soft); }
.pill.is-draft { background: var(--yellow-soft); }
.pill.is-hidden, .pill.is-archived { background: #e9ded1; }
.pill.is-sold { background: var(--pink-soft); }
.pill.os-paid { background: var(--yellow); }
.pill.os-dispatched { background: var(--mint-soft); }
.pill.os-refunded, .pill.os-cancelled, .pill.os-expired, .pill.os-failed { background: #e9ded1; }
.pill.os-pending { background: var(--blue-soft); }

.admin-items { list-style: none; padding: 0; margin: 0; }
.admin-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; margin-bottom: 10px; }
.admin-item.st-hidden, .admin-item.st-archived { opacity: .75; }
.ai-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid var(--ink); background: var(--paper-2); display: grid; place-items: center; }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai-thumb .noimg-mark { width: 60%; }
.ai-title { font-weight: 800; text-decoration: none; overflow-wrap: anywhere; display: block; line-height: 1.3; }
.ai-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14px; margin-top: 3px; }
.ai-actions { margin-top: 6px; }
.ai-actions summary { cursor: pointer; font-weight: 800; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.ai-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ai-btns form { display: inline; }
.stock-form { display: flex; gap: 8px; align-items: end; }
.stock-form label { margin: 0; font-size: 14px; }
.admin .stock-form input { width: 100px; padding: 7px 10px; }

/* Add / edit item */
.item-form { max-width: 720px; }
.photos-box { background: var(--paper); border: 2.5px dashed var(--ink); border-radius: 18px; padding: 14px; margin-bottom: 18px; }
.photos-box h2 { font-size: 20px; margin-bottom: 10px; }
.photos-box h2 small { font: 600 14px var(--body); color: var(--muted); letter-spacing: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo-grid:empty { display: none; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ptile { position: relative; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--paper-2); touch-action: manipulation; }
.ptile img { width: 100%; height: 100%; object-fit: cover; }
.ptile.dragging { opacity: .5; }
.ptile.over { outline: 3px dashed var(--pink); outline-offset: 2px; }
.ptile .cover-badge { display: none; position: absolute; left: 6px; top: 6px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; padding: 0 7px; font: 700 18px/1.2 var(--hand); transform: rotate(-4deg); }
.ptile:first-child .cover-badge { display: block; }
.ptile:first-child [data-cover] { display: none; }
.ptools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(43, 29, 22, .55)); }
.pbtn { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--ink); }
.pbtn .ico { width: 16px; height: 16px; }
.pbtn.grip { cursor: grab; touch-action: none; }
.pbtn.danger { color: var(--bad); }
.ptile .spinner { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 250, 241, .7); font-weight: 800; font-size: 13px; }
.ptile .spinner::before { content: ""; width: 28px; height: 28px; border: 4px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.ptile.failed { border-color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.nojs-cover { position: absolute; top: 4px; right: 4px; font-size: 12px; background: var(--paper); padding: 2px 6px; border-radius: 8px; margin: 0; }
.js .nojs-cover { display: none; }
.photo-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-add .btn { min-height: 54px; padding: 10px 8px; font-size: 15.5px; white-space: nowrap; }
.photo-add input[type=file] { max-width: 100%; font-size: 13px; }
.js .photo-add input[type=file] { display: none; }
.photo-msg { color: var(--bad); font-weight: 700; margin: 8px 0 0; font-size: 15px; }
.photo-msg:empty { display: none; }
.row3 { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 10px; }
.row2 { display: grid; gap: 10px; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.conds { display: flex; flex-wrap: wrap; gap: 8px; }
.conds legend { width: 100%; }
.cond-opt { margin: 0; }
.cond-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cond-opt span { display: inline-block; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 15px; cursor: pointer; }
.cond-opt input:checked + span { background: var(--ink); color: var(--cream); }
.cond-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin: 8px -16px 14px; position: sticky; bottom: 66px; background: var(--cream); border-top: 2px dashed var(--ink-2); padding: 12px 16px; z-index: 5; }
@media (min-width: 820px) { .form-actions { bottom: 0; } }
.form-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
.item-form > label.check { margin: 4px 0 6px; }

/* Orders */
.order-list { list-style: none; padding: 0; margin: 0; }
.order-list a { display: grid; gap: 4px; padding: 12px 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; margin-bottom: 10px; text-decoration: none; }
.ol-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ol-sum { font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.ol-bottom { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.order-grid { display: grid; gap: 0 16px; }
@media (min-width: 860px) { .order-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.address { font-size: 18px; font-weight: 700; line-height: 1.45; }
.lines { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.lines td { padding: 5px 0; vertical-align: top; }
.lines .num { text-align: right; white-space: nowrap; padding-left: 10px; }
.lines tr.total td { font-weight: 800; border-top: 2px solid var(--ink); }
.history { padding-left: 18px; margin: 0 0 8px; font-size: 15px; }
.danger-zone summary { font-weight: 800; cursor: pointer; }
.danger-zone form { margin-top: 12px; }
.status-list { padding-left: 18px; }
.status-list li { margin-bottom: 6px; }
.crumbs + .admin-top { margin-top: 0; }
code { background: var(--paper-2); padding: 1px 5px; border-radius: 5px; font-size: .92em; }

/* Packing slip */
.slip { background: #fff; background-image: none; }
.slip-page { max-width: 720px; margin: 0 auto; padding: 24px 20px; }
.slip-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px solid var(--ink); padding-bottom: 14px; }
.slip-ref { text-align: right; font-size: 15px; }
.slip-to { margin: 22px 0; }
.slip-to h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.slip-address { font-size: 22px; font-weight: 800; line-height: 1.4; }
.slip-lines { width: 100%; border-collapse: collapse; margin: 10px 0 24px; }
.slip-lines th, .slip-lines td { text-align: left; padding: 10px 6px; border-bottom: 1.5px solid #d8cbbb; }
.slip-lines .num { text-align: right; }
.slip-lines .tick { width: 60px; }
.slip-lines .box { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 4px; }
.slip-thanks { font: 700 30px/1.1 var(--hand); color: var(--pink); }
.slip-small { font-size: 13px; color: var(--ink-2); }
@media print { .noprint { display: none; } .slip-page { padding: 0; } body { font-size: 14px; } }
