/* Layout: machined steel surfaces on a quiet grid; the one bold moment is the hero showcase of real engraved pieces. */
:root {
  --steel: #e3e5e7;       /* page ground, brushed steel */
  --plate: #f2f3f4;       /* raised surfaces */
  --ink: #14181c;
  --muted: #59626b;
  --rule: #c5cad0;
  --accent: #8f531b;      /* bronze, text-safe */
  --accent-ink: #f6efe6;
  --ok: #2b7a4b;
  --warn: #9a6200;
  --bad: #ad3a2f;
  --focus: #2f4e8c;
  /* heat-tint ramp from the fiber laser, identical in both themes */
  --t1: #e2cd8a; --t2: #c99a4a; --t3: #9a5a2c; --t4: #6e3a6a; --t5: #34508f; --t6: #6d9cc4;
  --display: "Chakra Petch", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-sm: 3px;
  --r-md: 6px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 24px -16px rgba(20, 24, 28, .45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --steel: #121518; --plate: #1b1f23; --ink: #e7e9eb; --muted: #9aa3ab; --rule: #2f353b;
    --accent: #d99550; --accent-ink: #1a1007; --ok: #5cbf86; --warn: #e2a73e; --bad: #e86d61; --focus: #8fb0ea;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 28px -18px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --steel: #121518; --plate: #1b1f23; --ink: #e7e9eb; --muted: #9aa3ab; --rule: #2f353b;
  --accent: #d99550; --accent-ink: #1a1007; --ok: #5cbf86; --warn: #e2a73e; --bad: #e86d61; --focus: #8fb0ea;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 28px -18px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons & inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--ink); background: var(--ink); color: var(--steel);
  font: 600 .95rem/1 var(--display); letter-spacing: .02em;
  padding: .8rem 1.15rem; border-radius: var(--r-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: .5rem .75rem; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }

label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--plate);
  border: 1px solid var(--rule); border-radius: var(--r-sm); padding: .65rem .75rem; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
textarea { min-height: 7rem; resize: vertical; }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  font: 600 .78rem/1 var(--body); padding: .32rem .55rem; border-radius: 99px;
  border: 1px solid currentColor;
}
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill.in { color: var(--ok); }
.pill.low { color: var(--warn); }
.pill.out { color: var(--bad); }
.pill.neutral { color: var(--muted); }
.pill.neutral::before { display: none; }

/* ---------- header ---------- */
.demo-bar { background: var(--accent); color: var(--accent-ink); font-size: .9rem; }
.demo-bar .wrap { padding-block: .5rem; }
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--steel) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; }
.brand { display: flex; align-items: baseline; gap: 0; font: 700 1.2rem/1 var(--display); text-decoration: none; letter-spacing: .01em; }
.brand b { font-weight: 700; color: var(--accent); }
.nav { display: flex; gap: 1.25rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.cart-btn .count {
  min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: .78rem;
}
/* Header menu: inline on wide screens, a Menu button + drop-down panel on phones */
.nav-extra, .menu-btn { display: none; }
.menu-btn { appearance: none; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 600 .9rem/1 var(--display); padding: .55rem .8rem; border-radius: var(--r-sm); cursor: pointer; }
@media (max-width: 720px) {
  .site-head .wrap { position: relative; }
  .menu-btn { display: inline-block; margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; margin: 0;
    background: var(--steel); border-bottom: 1px solid var(--rule); box-shadow: 0 16px 30px -18px rgba(0,0,0,.45);
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: .25rem .75rem; }
  .nav.open { display: flex; }
  .nav a, .nav .nav-extra { display: block; padding: .8rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 1.05rem; }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem); font-weight: 700; letter-spacing: -.025em; }
.hero p.lede { margin-top: 1.25rem; max-width: 34rem; font-size: 1.15rem; color: var(--muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.testgrid { display: grid; gap: .6rem; }
.testgrid .tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tile {
  aspect-ratio: 1; border-radius: 2px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: .4rem; max-width: 100%;
  font: 500 .68rem/1.15 var(--body); color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.tile::after { /* brushed grain */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.tile span { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.testgrid figcaption { font-size: .85rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .tile { animation: heat .7s ease-out both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes heat { from { filter: saturate(0) brightness(1.25); } to { filter: none; } }
}
@media (max-width: 820px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- sections ---------- */
section.block { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head p { max-width: 36rem; color: var(--muted); margin-top: .6rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  appearance: none; font: 500 .9rem/1 var(--body); color: var(--muted); background: transparent;
  border: 1px solid var(--rule); border-radius: 99px; padding: .5rem .85rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--steel); border-color: var(--ink); }

/* ---------- products ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; }
.product { display: grid; grid-template-rows: auto 1fr; background: var(--plate); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.product .art { aspect-ratio: 10 / 7; background: var(--rule); max-width: 100%; }
.product .art img, .product .art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.product .body { display: grid; grid-template-rows: auto auto 1fr auto; gap: .5rem; padding: 1.1rem 1.15rem 1.2rem; min-width: 0; }
.product .meta { font-size: .9rem; color: var(--muted); }
.product .desc { font-size: .95rem; color: var(--muted); }
.product .buy { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }
.product .price { font: 600 1.3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.product.soldout .art { filter: grayscale(.85); opacity: .7; }
.empty { padding: 2.5rem; text-align: center; color: var(--muted); border: 1px dashed var(--rule); border-radius: var(--r-md); }

/* ---------- custom orders ---------- */
.custom { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .custom { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.25rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .75rem; counter-increment: step; }
.steps li::before {
  content: counter(step); font: 700 1rem/2.25rem var(--display); text-align: center;
  width: 2.25rem; height: 2.25rem; border: 1px solid var(--rule); border-radius: 50%; color: var(--accent);
}
.steps strong { display: block; font-family: var(--display); font-weight: 600; }
.steps span { color: var(--muted); font-size: .95rem; }
.form-card { background: var(--plate); border-radius: var(--r-md); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.notice {
  display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--r-sm);
  font-size: .92rem; border: 1px solid var(--rule); background: var(--steel);
}
.notice.low { border-color: var(--warn); }
.notice.out { border-color: var(--bad); }
.notice.in { border-color: var(--ok); }
.notice .pill { margin-top: .1rem; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.form-msg { font-size: .95rem; }
.form-msg.error { color: var(--bad); }
.form-msg.ok { color: var(--ok); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- materials board ---------- */
.board-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.board-tools input { max-width: 22rem; }
.board-summary { font-size: .92rem; color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 2rem 2.5rem; }
.board h3 { padding-bottom: .6rem; border-bottom: 2px solid var(--ink); margin-bottom: .25rem; }
.board ul { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.board li > div { min-width: 0; }
.board li small { display: block; color: var(--muted); font-size: .88rem; }

/* ---------- footer ---------- */
footer.site-foot { border-top: 1px solid var(--rule); font-size: .92rem; color: var(--muted); }
footer.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 2.5rem; }
footer.site-foot .links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- cart drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 14, .45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(420px, 100%);
  background: var(--plate); box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .5);
  display: grid; grid-template-rows: auto 1fr auto;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.drawer header, .drawer footer { padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.drawer header { border-bottom: 1px solid var(--rule); }
.drawer footer { border-top: 1px solid var(--rule); display: grid; gap: .75rem; }
.drawer .items { overflow-y: auto; padding: .5rem 1.25rem; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.line .name { font-weight: 600; }
.line .sub { color: var(--muted); font-size: .9rem; grid-column: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: var(--r-sm); }
.stepper button { appearance: none; border: 0; background: transparent; color: var(--ink); width: 2rem; height: 2rem; font-size: 1.1rem; cursor: pointer; }
.stepper span { min-width: 1.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; font: 600 1.15rem/1 var(--display); }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.4rem; line-height: 1; padding: .25rem; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--steel); padding: .8rem 1.1rem; border-radius: var(--r-sm);
  max-width: calc(100% - 32px); font-size: .95rem; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
}

/* ---------- admin ---------- */
.admin-main { padding-block: 2rem 4rem; display: grid; gap: 1.5rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs a {
  text-decoration: none; padding: .75rem 1rem; font: 600 .95rem/1 var(--display); color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.tabs a .badge { margin-left: .35rem; font: 600 .75rem/1 var(--body); padding: .2rem .45rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 0; flex: 1 1 12rem; max-width: 20rem; }
.toolbar .spacer { flex: 1 1 auto; }
.stats { display: flex; flex-wrap: wrap; gap: .75rem; }
.stat { background: var(--plate); border-radius: var(--r-md); padding: .8rem 1rem; min-width: 8.5rem; box-shadow: var(--shadow); }
.stat b { display: block; font: 600 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn b { color: var(--warn); }
.stat.bad b { color: var(--bad); }
.table-wrap { overflow-x: auto; background: var(--plate); border-radius: var(--r-md); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
th { font: 600 .8rem/1.2 var(--body); color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .sub { color: var(--muted); font-size: .85rem; }
tr.cat-row td { background: var(--steel); font: 600 .9rem/1 var(--display); padding-block: .55rem; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: nowrap; }
.qty { display: inline-flex; align-items: center; gap: .25rem; }
.qty button { appearance: none; width: 1.9rem; height: 1.9rem; border: 1px solid var(--rule); background: transparent; color: var(--ink); border-radius: var(--r-sm); cursor: pointer; font-size: 1rem; }
.qty b { min-width: 2.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.thumb { width: 56px; height: 40px; border-radius: 2px; overflow: hidden; background: var(--rule); }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.switch { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; cursor: pointer; }
.switch input { width: auto; }

dialog {
  border: 0; border-radius: var(--r-md); padding: 0; width: min(640px, calc(100% - 32px));
  background: var(--plate); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(10, 12, 14, .5); }
dialog form { display: grid; gap: 1rem; padding: 1.5rem; }
dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
dialog .dialog-actions .left { margin-right: auto; }

.quote-list { display: grid; gap: 1rem; }
.quote { background: var(--plate); border-radius: var(--r-md); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); display: grid; gap: .75rem; }
.quote-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; }
.quote dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: 0; font-size: .95rem; }
.quote dt { color: var(--muted); }
.quote dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.quote-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: .75rem; align-items: end; }

.login { max-width: 400px; margin: 4rem auto; background: var(--plate); padding: 2rem; border-radius: var(--r-md); box-shadow: var(--shadow); display: grid; gap: 1rem; }

/* ---------- custom order form (step by step) ---------- */
.custom-intro { position: sticky; top: calc(5rem + env(safe-area-inset-top, 0px)); }
@media (max-width: 860px) { .custom-intro { position: static; } }
.qstep { border: 0; margin: 0; padding: 0 0 1.75rem; min-width: 0; display: grid; gap: 1rem; }
.qstep + .qstep, .qstep + .form-foot { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.qstep legend { display: flex; align-items: center; gap: .6rem; font: 600 1.15rem/1.2 var(--display); padding: 0; margin-bottom: 1rem; float: left; width: 100%; }
.qstep legend + * { clear: both; }
.qstep[disabled] { opacity: .55; }
.qnum {
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  border: 1px solid var(--accent); color: var(--accent); font-size: .9rem;
}
.qhint { font-size: .92rem; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: .75rem; }
.mat, .size {
  appearance: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--steel); border: 1px solid var(--rule); border-radius: var(--r-md);
  display: grid; gap: .4rem; padding: 0 0 .75rem; overflow: hidden; position: relative; min-width: 0;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.mat:hover, .size:hover { border-color: var(--muted); }
.mat[aria-checked="true"], .size[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mat .sw { height: 56px; max-width: 100%; position: relative; }
.mat .sw::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 3px); }
.mat .sw img { width: 100%; height: 100%; object-fit: cover; }
.mat .t { padding: 0 .7rem; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.mat .v { padding: 0 .7rem; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.mat .f { padding: 0 .7rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem; margin-top: .15rem; }
.mat .price, .size .price { font: 600 .9rem/1 var(--display); font-variant-numeric: tabular-nums; }
.mat .pill, .size .pill { font-size: .72rem; padding: .25rem .45rem; }
.tag-popular {
  position: absolute; top: .45rem; right: .45rem; z-index: 1; font: 600 .7rem/1 var(--body);
  background: var(--ink); color: var(--steel); padding: .3rem .45rem; border-radius: 99px;
}
.mat.other .sw { background: repeating-linear-gradient(135deg, var(--rule) 0 6px, transparent 6px 12px); }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .6rem; }
.size { padding: .75rem .8rem; gap: .35rem; }
.size .t { font-weight: 600; }
.qty-field { max-width: 9rem; }
.drop {
  border: 1.5px dashed var(--rule); border-radius: var(--r-md); padding: 1rem; cursor: pointer;
  display: grid; gap: .2rem; justify-items: start; background: var(--steel);
}
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop-title { font: 600 1rem/1.3 var(--display); color: var(--accent); overflow-wrap: anywhere; }
.form-foot p { margin: 0; }
.q-done { display: grid; gap: .9rem; justify-items: start; padding-block: 1rem; }
.q-done:focus { outline: none; }
.q-done-no { font: 700 clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem)/1 var(--display); color: var(--accent); letter-spacing: .01em; }

/* ---------- admin custom orders ---------- */
.quote-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.quote-head .no { font: 700 1rem/1 var(--display); color: var(--accent); }
.quote-head h3 { flex: 1 1 14rem; min-width: 0; }
.due { font-size: .85rem; font-weight: 600; }
.due.soon { color: var(--warn); }
.due.late { color: var(--bad); }
.pill.q-new { color: var(--focus); }
.pill.q-quoted { color: var(--warn); }
.pill.q-paid { color: var(--ok); }
.pill.q-shipped, .pill.q-closed { color: var(--muted); }
.pill.q-cancelled { color: var(--bad); }
.quote-actions { display: grid; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
.quote-actions .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .75rem; align-items: end; }
.quote-actions .btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.quote-meta { font-size: .9rem; color: var(--muted); }
.reorder { color: var(--warn); font-weight: 600; font-size: .8rem; display: block; }
.proof-thumb { width: 120px; max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--rule); }

/* ---------- custom order page & home teaser ---------- */
.nav a[aria-current="page"] { color: var(--ink); }
.custom-page { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem); }
.page-title { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; }
.teaser { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.teaser-copy { display: grid; gap: 1rem; justify-items: start; }
.teaser-copy p { max-width: 30rem; }
.teaser .steps { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
@media (max-width: 860px) { .teaser { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .teaser .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- category manager ---------- */
.cat-manager { display: grid; gap: 1rem; padding: 1.5rem; }
#c-dialog { width: min(760px, calc(100% - 32px)); }
.cat-delete { display: grid; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.cat-state { font-size: .85rem; }
.cat-row .cat-state { font: 400 .85rem/1 var(--body); color: var(--muted); margin-left: .6rem; }
.tag-limited {
  position: absolute; top: .45rem; left: .45rem; z-index: 1; font: 600 .7rem/1 var(--body);
  background: var(--accent); color: var(--accent-ink); padding: .3rem .45rem; border-radius: 99px;
}

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { width: 34px; height: 34px; display: inline-block; flex: none; color: var(--ink); }
.brand-mark svg, .foot-badge svg { width: 100%; height: 100%; display: block; }
.foot-brand { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.foot-badge { width: 104px; height: 104px; flex: none; color: var(--ink); }
@media (max-width: 520px) { .foot-brand { flex-direction: column; align-items: flex-start; } }

/* ---------- kinds ---------- */
.pill.kind-product { color: var(--accent); }
.pill.kind-commission { color: var(--focus); }
.pill.kind-collaboration { color: var(--ok); }
.pill.kind-personal { color: var(--muted); }
.pill[class*="kind-"]::before { display: none; }

/* ---------- recent work strip (home) ---------- */
.work-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 980px) { .work-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work { display: grid; gap: .65rem; text-decoration: none; color: var(--ink); min-width: 0; }
.wimg { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-md); background: #15181b; max-width: 100%; }
.wimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.work:hover .wimg img { transform: scale(1.035); }
.wmeta, .pmeta { display: grid; gap: .35rem; justify-items: start; }
.ptitle { font: 600 1.05rem/1.2 var(--display); }
.pcredit { font-size: .9rem; color: var(--muted); }

/* ---------- portfolio page ---------- */
.portfolio-page { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem); }
.chip .num { opacity: .65; margin-left: .2rem; }
.pgrid { columns: 3 280px; column-gap: 1.5rem; }
.pgrid > .empty { column-span: all; }
.pcard {
  appearance: none; border: 0; background: none; padding: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
  display: grid; gap: .7rem; width: 100%; break-inside: avoid; margin: 0 0 1.75rem;
}
.pimg { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: #15181b; box-shadow: var(--shadow); }
.pimg img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.pcard:hover .pimg img { transform: scale(1.03); }
.pcard:focus-visible { outline: none; }
.pcard:focus-visible .pimg { outline: 2px solid var(--focus); outline-offset: 3px; }
.pcount { position: absolute; right: .5rem; bottom: .5rem; background: rgba(10, 12, 14, .7); color: #fff; font: 600 .75rem/1 var(--body); padding: .35rem .5rem; border-radius: 99px; }
@media (prefers-reduced-motion: reduce) { .pimg img, .wimg img { transition: none; } }

.lightbox { width: min(1120px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; overflow: auto; }
.lb-inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); min-height: 0; }
.lb-media { background: #0f1113; display: grid; gap: .5rem; align-content: center; padding: .75rem; }
.lb-media > img { width: 100%; max-height: 78vh; object-fit: contain; }
.lb-thumbs { display: flex; gap: .4rem; overflow-x: auto; }
.lb-thumbs button { appearance: none; border: 2px solid transparent; padding: 0; background: none; width: 64px; height: 64px; flex: none; cursor: pointer; border-radius: var(--r-sm); overflow: hidden; }
.lb-thumbs button[aria-current="true"] { border-color: var(--accent); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lb-info { padding: 1.5rem; display: grid; gap: .9rem; align-content: start; min-width: 0; }
.lb-top { display: flex; justify-content: space-between; align-items: center; }
.lb-info h2 { font-size: 1.8rem; }
.lb-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: 0; font-size: .95rem; }
.lb-meta dt { color: var(--muted); }
.lb-meta dd { margin: 0; }
.lb-meta:empty { display: none; }
@media (max-width: 760px) { .lb-inner { grid-template-columns: minmax(0, 1fr); } .lb-media > img { max-height: 60vh; } }

/* ---------- admin portfolio ---------- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.acard { background: var(--plate); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr; }
.acard .aimg { aspect-ratio: 4 / 3; background: #15181b; max-width: 100%; position: relative; }
.acard .aimg img { width: 100%; height: 100%; object-fit: cover; }
.acard.hidden-item .aimg img { opacity: .4; }
.acard .abody { padding: .8rem .9rem 1rem; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.acard .arow { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; font-size: .88rem; }
.thumb-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.thumb-row .t { position: relative; width: 76px; height: 76px; border-radius: var(--r-sm); overflow: hidden; background: var(--rule); }
.thumb-row .t img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row .t button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; }

/* ---------- hero showcase ---------- */
.hero-copy { display: grid; align-content: center; min-width: 0; }
.audiences { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.audiences a { display: grid; gap: .25rem; text-decoration: none; color: var(--ink); }
.audiences strong { font: 600 .98rem/1.2 var(--display); }
.audiences span { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.audiences a:hover strong { color: var(--accent); }
@media (max-width: 560px) { .audiences { grid-template-columns: minmax(0, 1fr); gap: .85rem; } }
.hero-show { margin: 0; display: grid; gap: .75rem; min-width: 0; }
.hero-frame { position: relative; display: block; aspect-ratio: 1 / 1; max-width: 100%; border-radius: var(--r-md); overflow: hidden; background: #111315; box-shadow: 0 30px 60px -30px rgba(10, 12, 14, .6); }
.hero-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.hero-frame img.on { opacity: 1; }
.hero-cap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .92rem; color: var(--muted); min-width: 0; }
.hero-cap > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-cap .pill { margin-right: .35rem; vertical-align: 1px; }
.hero-dots { display: flex; gap: .4rem; flex: none; }
.hero-dots button { appearance: none; width: .65rem; height: .65rem; border-radius: 50%; border: 1px solid var(--muted); background: transparent; padding: 0; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: var(--ink); border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .hero-frame img { transition: none; } }

.hero-v2 .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "copy show" "aud show"; row-gap: 0; }
.hero-v2 .hero-copy { grid-area: copy; align-self: end; }
.hero-v2 .audiences { grid-area: aud; align-self: start; }
.hero-v2 .hero-show { grid-area: show; align-self: center; }
@media (max-width: 820px) {
  .hero-v2 .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "show" "aud"; row-gap: 2rem; }
  .hero-v2 .audiences { margin-top: 0; }
}

.foot-contact { margin-top: .4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.foot-contact a { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.copy-btn { padding: .3rem .55rem; font-size: .78rem; }

/* ---------- drag to reorder ---------- */
.handle {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: grab;
  width: 2rem; height: 2rem; border-radius: var(--r-sm); display: inline-grid; place-items: center; padding: 0;
  touch-action: none; user-select: none; -webkit-user-select: none; flex: none;
}
.handle:hover { color: var(--ink); border-color: var(--rule); }
.handle svg { width: 14px; height: 18px; display: block; }
.handle[disabled] { opacity: .3; cursor: not-allowed; }
.sorting, .sorting * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.drag-src { opacity: .35; }
.drag-ghost { position: fixed; z-index: 100; pointer-events: none; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); opacity: .95; }
tr.drag-ghost { display: table; background: var(--plate); }
.reorder-note { font-size: .9rem; color: var(--muted); margin: 0; }
.acard { position: relative; }
.acard .apos { position: absolute; top: .5rem; left: .5rem; z-index: 2; display: flex; align-items: center; gap: .15rem;
  background: color-mix(in srgb, var(--plate) 92%, transparent); border-radius: 99px; padding: .15rem .25rem .15rem .55rem; box-shadow: var(--shadow); }
.acard .apos b { font: 600 .85rem/1 var(--display); font-variant-numeric: tabular-nums; min-width: 1.4rem; }
.acard .apos .move { appearance: none; border: 0; background: transparent; color: var(--muted); width: 1.6rem; height: 1.6rem; border-radius: 50%; cursor: pointer; font-size: .9rem; }
.acard .apos .move:hover { color: var(--ink); background: var(--steel); }
.acard .apos .move[disabled] { opacity: .3; cursor: default; background: none; }
td.handle-cell { width: 4.25rem; padding-right: 0; white-space: nowrap; }
.pos-num { font: 600 .85rem/1 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .35rem; }
.thumb-row .t.sortable-photo { cursor: grab; touch-action: none; }
.thumb-row .t .mk-main { left: 2px; right: auto; font-size: 12px; }

/* Cards in the same row share a height; keep their contents packed at the top
   so a card with an extra credit line doesn't push its neighbour's label down. */
.work, .pcard, .wmeta, .pmeta, .acard .abody { align-content: start; align-items: start; }
.work { grid-template-rows: auto auto; }

/* ---------- admin sign-in, team, idle ---------- */
.auth-wrap { padding-block: 3rem 4rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 1rem; justify-items: center; }
.auth-wrap .login { margin: 0; width: min(400px, 100%); }
.auth-wrap .login.wide { width: min(520px, 100%); }
.auth-wrap h2 { font-size: 1.6rem; }
.auth-demo { max-width: 520px; font-size: .9rem; background: var(--plate); border: 1px dashed var(--accent); padding: .65rem .85rem; border-radius: var(--r-sm); margin: 0; }
.linkish { appearance: none; border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; justify-self: start; }
.linkish:hover { color: var(--ink); }
.code-input { font: 600 1.5rem/1 var(--display); letter-spacing: .35em; text-align: center; max-width: 12rem; font-variant-numeric: tabular-nums; }
.enroll-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1.1rem; }
.enroll-steps li { display: grid; gap: .6rem; }
.qr { width: 200px; height: 200px; background: #fff; border-radius: var(--r-sm); padding: 10px; border: 1px solid var(--rule); }
.qr img, .qr svg { width: 100%; height: 100%; display: block; }
.small { font-size: .85rem; }
.form-msg.ok { color: var(--ok); }
.idle-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--ink); color: var(--steel); padding-bottom: env(safe-area-inset-bottom, 0px); }
.idle-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding-block: .85rem; }
.idle-bar .btn { background: var(--steel); color: var(--ink); border-color: var(--steel); }
.demo-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-left: .5rem; }
.demo-role { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; font-size: .9rem; }
.demo-role select { width: auto; padding: .25rem .4rem; font-size: .85rem; background: var(--accent-ink); color: var(--ink); }
.role-pill { margin-left: .35rem; }
.invite input { flex: 1 1 16rem; max-width: 22rem; }
.invite select { flex: 0 1 12rem; }
.ship-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ship-form select { width: auto; padding: .4rem; font-size: .9rem; }
.ship-form input { width: 11rem; padding: .4rem .5rem; font-size: .9rem; }

/* ---------- find my order ---------- */
.lookup-page { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem); }
.lookup-start { display: grid; gap: 1.25rem; max-width: 36rem; }
.lookup-intro { max-width: 34rem; }
.lookup-form { display: grid; gap: 1rem; }
.lookup-form .btn { justify-self: start; }
.lookup-results .section-head p { color: var(--muted); }
.ohead { font-size: 1.3rem; margin: 2rem 0 1rem; }
.ohead:first-child { margin-top: 0; }
.olist { display: grid; gap: 1rem; max-width: 46rem; }
.ocard { background: var(--plate); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1.25rem; display: grid; gap: .9rem; justify-items: start; }
.ocard > * { max-width: 100%; }
.ocard-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; width: 100%; }
.ocard-head .no { font: 700 .95rem/1 var(--display); color: var(--accent); }
.ocard-head h3 { flex: 1 1 14rem; min-width: 0; }
.ometa { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1rem; margin: 0; font-size: .95rem; }
.ometa dt { color: var(--muted); }
.ometa dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 30rem; }
.progress li { position: relative; display: grid; justify-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); text-align: center; padding-top: 1.1rem; }
.progress li::before { content: ""; position: absolute; top: 0; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--rule); background: var(--plate); z-index: 1; }
.progress li::after { content: ""; position: absolute; top: .35rem; left: -50%; width: 100%; height: 2px; background: var(--rule); }
.progress li:first-child::after { display: none; }
.progress li.done::before, .progress li.now::before { border-color: var(--accent); background: var(--accent); }
.progress li.done::after, .progress li.now::after { background: var(--accent); }
.progress li.now { color: var(--ink); font-weight: 600; }
.quote-box { display: grid; gap: .75rem; justify-items: start; }
.price-line b { font: 600 1.4rem/1 var(--display); margin-left: .35rem; }
.proof { max-width: min(100%, 22rem); border-radius: var(--r-sm); border: 1px solid var(--rule); }
.foot-contact + p { margin-top: .4rem; }

.person strong { font-weight: 600; }
.name-edit { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.name-edit input { width: 9rem; padding: .4rem .5rem; font-size: .92rem; }
.invite input#invite-first, .invite input#invite-last { flex: 1 1 9rem; max-width: 12rem; }

/* admin on phones: let wide tables scroll inside their box, keep the header on one line */
.admin-main > *, .admin-main { min-width: 0; }
@media (max-width: 600px) {
  .admin-label, #who { display: none; }
  #who-role { margin-left: auto; }
}
/* keep screen-reader-only labels inside scrolling tables from widening the page */
.table-wrap, .tabs { position: relative; }
@media (max-width: 600px) { .site-head .wrap { gap: .6rem; } #who-role { font-size: .72rem; padding: .28rem .45rem; } }
@media (max-width: 400px) { #who-role { display: none; } #sign-out { margin-left: auto; } }

/* ---------- FAQ & policies ---------- */
.policy-page { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5.5rem); }
.policy-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.policy-toc { position: sticky; top: calc(5rem + env(safe-area-inset-top, 0px)); display: grid; gap: .45rem; font-size: .95rem; }
.policy-toc a { color: var(--muted); text-decoration: none; }
.policy-toc a:hover { color: var(--ink); }
.toc-title { font: 600 .85rem/1 var(--display); color: var(--ink); margin-bottom: .25rem; }
.policy-body { max-width: 44rem; display: grid; gap: 1rem; min-width: 0; }
.lede-sm { font-size: 1.08rem; color: var(--ink); }
.policy-sec { display: grid; gap: .75rem; padding-top: 2rem; margin-top: 1rem; border-top: 1px solid var(--rule); scroll-margin-top: 5rem; }
.policy-sec h2 { font-size: 1.5rem; }
.policy-sec ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.policy-sec p, .policy-sec li { line-height: 1.65; }
.policy-sec a { color: var(--accent); }
.policy-sec details { background: var(--plate); border-radius: var(--r-md); padding: .85rem 1rem; box-shadow: var(--shadow); }
.policy-sec summary { cursor: pointer; font: 600 1.02rem/1.35 var(--display); list-style-position: inside; }
.policy-sec details p { margin-top: .6rem; color: var(--ink); }
@media (max-width: 820px) {
  .policy-layout { grid-template-columns: minmax(0, 1fr); }
  .policy-toc { position: static; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
  .toc-title { width: 100%; }
}

.agree { display: grid; gap: .6rem; padding-top: .25rem; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: start; font-weight: 400; font-size: .95rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--accent); }
.check a { color: var(--accent); }
@media (max-width: 720px) {
  a.cart-btn { display: none; }                 /* page shortcut buttons live in the menu on phones */
  .site-head .wrap { gap: .5rem; }
  .brand { font-size: 1.08rem; gap: .45rem; }
  .brand-mark { width: 30px; height: 30px; }
  button.cart-btn { margin-left: 0; padding: .5rem .65rem; }
}

.ico { width: 1.05rem; height: 1.05rem; display: none; flex: none; }
.menu-btn { display: none; align-items: center; gap: .4rem; }
@media (max-width: 720px) { .menu-btn { display: inline-flex; } .menu-btn .ico { display: block; } }
@media (max-width: 420px) {
  .menu-label, .cart-label { display: none; }
  .cart-btn .ico { display: block; }
  .menu-btn { padding: .5rem .55rem; }
}
@media (max-width: 350px) { .brand { font-size: 1rem; } .brand-mark { width: 26px; height: 26px; } }

/* ---------- shipping ---------- */
.sumline { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: -.4rem; }
.ship-nudge { margin: 0; font-size: .88rem; color: var(--ok); }
.ship-grid { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; gap: .6rem 1rem; align-items: end; }
.ship-grid .lbl { font-weight: 600; }
.ship-grid .lbl .sub { font-weight: 400; }
.ship-grid input[type=number] { width: 100%; }
.ship-example { font-size: .92rem; background: var(--plate); border: 1px solid var(--rule); border-radius: 6px; padding: .7rem .85rem; margin: .25rem 0 0; }
.ship-warn { border: 1px solid #b4541a; border-radius: 6px; padding: .6rem .85rem; margin: 0 0 1rem; font-size: .95rem; }
.qf-total { font-size: .92rem; margin: .1rem 0 0; }
@media (max-width: 480px) { .ship-grid { grid-template-columns: minmax(0, 1fr) 6.5rem; } }

/* ---------- roles and permissions ---------- */
.ro .edit-only { display: none !important; }
.ro-note { margin: 0 0 1rem; padding: .55rem .85rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); font-size: .92rem; color: var(--muted); }
.team-h { font: 600 1.1rem/1.2 var(--display); margin: 1.75rem 0 .75rem; }
.team-h-row { display: flex; align-items: center; gap: 1rem; margin: 1.75rem 0 .25rem; }
.team-h-row .team-h { margin: 0; }
.role-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.role-card { background: var(--plate); border: 1px solid var(--rule); border-radius: var(--r-md); padding: .85rem 1rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.role-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.role-head .spacer { flex: 1; }
.perm-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.perm-chip { font-size: .8rem; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.perm-chip.edit { border-color: var(--ok); color: var(--ok); }
#r-dialog { width: min(40rem, calc(100vw - 2rem)); }
#r-form > label { display: grid; gap: .3rem; margin-bottom: .75rem; }
.perm-grid { display: grid; gap: .1rem; margin: .5rem 0; }
.perm-row { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: .7rem 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; min-width: 0; }
.perm-row legend { float: left; padding: 0; display: grid; gap: .1rem; }
.perm-row legend .sub { font-size: .85rem; color: var(--muted); }
.perm-sub { grid-column: 1 / -1; font-size: .92rem; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--rule); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.seg span { display: block; padding: .4rem .75rem; font-size: .9rem; }
.seg input:checked + span { background: var(--ink); color: var(--steel); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.seg input:disabled + span { opacity: .35; }
.seg label:has(input:disabled) { cursor: not-allowed; }
#t-rows select:disabled { opacity: .75; }
@media (max-width: 560px) {
  .perm-row { grid-template-columns: 1fr; }
}
.perm-row .seg { justify-self: start; }

/* ---------- about page ---------- */
.about-hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); }
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.about-hero .page-title { margin: .2rem 0 1rem; max-width: 16ch; }
.about-hero .lede { max-width: 38rem; }
.about-photo { margin: 0; display: grid; gap: .5rem; min-width: 0; }
.about-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--rule); box-shadow: var(--shadow); background: var(--plate); }
.about-photo figcaption { font-size: .88rem; color: var(--muted); }
.about-body, .about-band { padding-block: clamp(2rem, 5vw, 3.5rem); }
.about-band { background: var(--plate); border-block: 1px solid var(--rule); }
.about-cols { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.about-text { max-width: 42rem; }
.about-text h2, .about-h { font: 600 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--display); margin: 0 0 .75rem; }
.about-text h2:not(:first-child) { margin-top: 2rem; }
.about-text p { line-height: 1.65; margin: 0 0 1rem; }
.about-facts { position: sticky; top: 5.5rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); padding: 1rem 1.15rem; }
.about-facts dl { margin: 0; display: grid; gap: .2rem; }
.about-facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .6rem; }
.about-facts dt:first-child { margin-top: 0; }
.about-facts dd { margin: 0; }
.about-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.about-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.about-steps li { counter-increment: step; display: grid; gap: .35rem; align-content: start; padding: 1rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); }
.about-steps li::before { content: counter(step); font: 700 1.4rem/1 var(--display); color: var(--accent); }
.about-steps b { font: 600 1.05rem/1.2 var(--display); }
.about-steps span { color: var(--muted); line-height: 1.5; }
.about-note { margin: 1rem 0 0; }
.about-milestones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.about-ms { display: grid; gap: .6rem; color: inherit; text-decoration: none; min-width: 0; }
.about-ms img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--rule); }
.about-ms span { color: var(--muted); }
.about-ms b { display: block; color: var(--ink); font: 600 1.05rem/1.3 var(--display); }
.about-ms:hover b { color: var(--accent); }
.about-ms-note { margin-top: 1.25rem; }
.about-social { margin-top: 1.25rem; }
@media (max-width: 860px) {
  .about-hero-grid, .about-split, .about-cols { grid-template-columns: minmax(0, 1fr); }
  .about-facts { position: static; }
  .about-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .about-steps, .about-milestones { grid-template-columns: minmax(0, 1fr); }
}
.about-hero .lede { font-size: 1.15rem; color: var(--muted); margin: 0; line-height: 1.55; }
.kicker { margin: 0; font: 600 .82rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- workshop log ---------- */
.log-page { padding-block: clamp(2rem, 5vw, 4rem); }
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.log-grid > .empty { grid-column: 1 / -1; }
.lcard { display: grid; grid-template-rows: auto 1fr; background: var(--plate); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--shadow); min-width: 0; transition: transform .15s ease; }
.lcard:hover { transform: translateY(-2px); }
.lcard:hover .ltitle { color: var(--accent); }
.limg { display: block; aspect-ratio: 16 / 10; background: var(--steel); overflow: hidden; }
.limg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbody { display: grid; gap: .5rem; padding: 1rem 1.1rem 1.15rem; align-content: start; }
.lmeta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); margin: 0; }
.ltitle { font: 600 1.2rem/1.25 var(--display); }
.lexcerpt { color: var(--muted); line-height: 1.55; }
.lmore { font-size: .9rem; font-weight: 600; color: var(--accent); }
.lcard.big { grid-column: 1 / -1; }
@media (min-width: 761px) {
  .lcard.big { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: none; }
  .lcard.big .limg { aspect-ratio: auto; min-height: 300px; }
  .lcard.big .lbody { align-content: center; padding: 1.5rem 1.75rem; }
  .lcard.big .ltitle { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .lcard { transition: none; } .lcard:hover { transform: none; } }
#log-latest .lcard.big { grid-column: auto; }

.post-page { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem); }
.post-wrap { max-width: 860px; }
.post-back { margin: 0 0 1.25rem; }
.post-back a { color: var(--muted); text-decoration: none; }
.post-back a:hover { color: var(--ink); }
.post-head .page-title { margin: .5rem 0 1.25rem; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.post-cover { display: block; width: 100%; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--plate); cursor: zoom-in; margin-bottom: 1.75rem; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.post-content { max-width: 42rem; font-size: 1.07rem; line-height: 1.7; }
.post-content > * { margin: 0 0 1.1rem; }
.post-content h2 { font: 600 1.45rem/1.25 var(--display); margin-top: 2rem; }
.post-content h3 { font: 600 1.2rem/1.3 var(--display); margin-top: 1.5rem; }
.post-content ul, .post-content ol { padding-left: 1.4rem; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote { margin-left: 0; padding: .25rem 0 .25rem 1.1rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.post-content blockquote p { margin: 0; }
.post-content a { color: var(--accent); }
.post-img { margin: 1.5rem 0; }
.post-img img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--rule); display: block; }
.post-img figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: .75rem; margin: 1.75rem 0; max-width: 42rem; }
.pg-item { padding: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--plate); aspect-ratio: 1; cursor: zoom-in; }
.pg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-links { display: grid; gap: .75rem; max-width: 42rem; margin: 1.5rem 0; }
.post-link { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; align-items: center; padding: .6rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); color: inherit; text-decoration: none; }
.post-link img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }
.post-link span { display: grid; gap: .15rem; color: var(--muted); }
.post-link b { color: var(--ink); font: 600 1rem/1.3 var(--display); }
.post-link:hover b { color: var(--accent); }
.post-follow { max-width: 42rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.photo-lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.photo-lb::backdrop { background: rgba(10, 12, 14, .9); }
.photo-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; place-items: center; gap: .75rem; padding: 1rem; }
.photo-lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.photo-lb #photo-lb-close { justify-self: end; color: #fff; }
.photo-lb-nav { display: flex; align-items: center; gap: 1rem; color: #fff; }
.photo-lb-nav .btn { color: #fff; border-color: rgba(255, 255, 255, .5); }

/* ---------- post editor ---------- */
#b-dialog { width: min(58rem, calc(100vw - 2rem)); }
.slug-row { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.slug-row .muted { font-size: .88rem; white-space: nowrap; }
.slug-row input { min-width: 0; flex: 1; }
.editor { display: grid; gap: .5rem; }
.editor-bar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .35rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--steel); }
.editor-bar [data-md] { font: inherit; font-size: .88rem; padding: .35rem .6rem; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink); cursor: pointer; }
.editor-bar [data-md]:hover:not(:disabled) { border-color: var(--rule); background: var(--plate); }
.editor-bar [data-md]:disabled { opacity: .4; cursor: default; }
.editor-bar .spacer { flex: 1; }
#bf-body { min-height: 18rem; font: 1rem/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; resize: vertical; }
.editor-preview { min-height: 18rem; padding: 1rem 1.15rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); max-width: none; overflow: auto; }
.editor-preview img { max-height: 360px; object-fit: contain; }
.thumb-row .t button[data-cover-rm], .thumb-row .t button[data-g-rm] { font-size: 14px; }

/* ---------- product links ---------- */
.product .art { display: block; }
.product h3 a, .line a.name { color: inherit; text-decoration: none; }
.product h3 a:hover, .line a.name:hover { color: var(--accent); text-decoration: underline; }

/* ---------- product page ---------- */
.product-page { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem); }
.pp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.pp-gallery { display: grid; gap: .75rem; min-width: 0; position: sticky; top: 5.5rem; }
.pp-main { display: block; width: 100%; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--plate); cursor: zoom-in; aspect-ratio: 1; }
.pp-main span, .pp-main img, .pp-main svg { display: block; width: 100%; height: 100%; }
.pp-main img { object-fit: contain; background: var(--steel); }
.pp-cap { margin: 0; }
.pp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; }
.pp-thumbs button { position: relative; padding: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: var(--plate); cursor: pointer; }
.pp-thumbs button[aria-current="true"] { border-color: var(--accent); }
.pp-thumbs img, .pp-thumbs svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-tag { position: absolute; left: 0; right: 0; bottom: 0; font-size: .68rem; font-weight: 600; text-align: center; padding: .15rem 0; background: rgba(20, 24, 28, .78); color: #fff; }
.pp-info { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.pp-info .page-title { margin: 0; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); }
.pp-meta { margin: 0; color: var(--muted); }
.pp-price { margin: 0; display: flex; align-items: center; gap: .75rem; }
.pp-price .price { font: 700 1.6rem/1 var(--display); }
.pp-buy { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pp-buy .muted { flex-basis: 100%; margin: 0; }
.pp-ship, .pp-note { margin: 0; }
.pp-desc p { margin: 0 0 .75rem; line-height: 1.65; }
.pp-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem 1.25rem; margin: 0; padding: 1rem 0; border-block: 1px solid var(--rule); }
.pp-details dt { color: var(--muted); }
.pp-details dd { margin: 0; }
.pp-blank-link { font-size: inherit; color: var(--ink); }
.pp-care summary { cursor: pointer; font-weight: 600; }
.pp-care p { margin: .5rem 0 0; color: var(--muted); }
.lcard .price { font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
  .pp { grid-template-columns: minmax(0, 1fr); }
  .pp-gallery { position: static; }
}
.blank-row { display: grid; gap: .6rem; padding: .75rem; border: 1px dashed var(--rule); border-radius: var(--r-md); }
.blank-preview { display: flex; align-items: center; gap: .75rem; }
.blank-preview .t { width: 76px; height: 76px; flex: none; border-radius: var(--r-sm); overflow: hidden; background: var(--rule); }
.blank-preview .t img { width: 100%; height: 100%; object-fit: cover; }
.pp-ship { list-style: none; margin: 0; padding: .85rem 1rem; display: grid; gap: .45rem; font-size: .92rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--plate); }
.pp-ship .muted { display: block; font-size: .85rem; margin-top: .1rem; }

/* ---------- 404 and coming soon ---------- */
.notfound { padding-block: clamp(3rem, 8vw, 6rem); }
.notfound .page-title { margin: .4rem 0 1rem; max-width: 18ch; }
.notfound .lede { max-width: 38rem; color: var(--muted); font-size: 1.1rem; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.soon { min-height: 100vh; display: grid; place-items: center; padding: 2rem 16px; }
.soon-card { max-width: 36rem; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.soon-badge { width: min(220px, 55vw); color: var(--ink); }
.soon-badge svg { width: 100%; height: auto; display: block; }
.soon h1 { font: 700 clamp(2rem, 1.4rem + 3vw, 3.2rem)/1.1 var(--display); margin: 0; letter-spacing: -.02em; }
.soon .lede { color: var(--muted); font-size: 1.1rem; margin: 0; }
.soon .actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.soon .muted a { color: inherit; }
