/* =========================================================
   MeshMutt — clean shop layout on a faded wireframe grid
   Palette borrowed from OnlyFluffs: lavender → periwinkle → sky
   ========================================================= */
:root {
  --bg: #faf9fc;
  --surface: #ffffff;
  --surface-2: #f6f4fb;
  --line: #e7e4ef;
  --line-2: #d6d2e3;
  --ink: #141418;
  --ink-2: #4b4a57;
  --dim: #8b89a0;
  --lav: #d79cf5;
  --peri: #8e8bf7;
  --sky: #5fc8f3;
  --accent: #7d79f2;
  --accent-soft: #eeedfe;
  --fluff: linear-gradient(100deg, var(--lav), var(--peri) 55%, var(--sky));
  --danger: #d23b4f;
  --grid: rgba(126, 121, 242, 0.07);
  --radius: 10px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --btn-bg: #141418;
  --btn-fg: #ffffff;
  --shadow: #141418;
  --shadow-hover: #8e8bf7;
  --header-bg: rgba(250, 249, 252, 0.86);
  --check-a: #f0eef7;
  --check-b: #ffffff;
  --thumb-bg: #ffffff;
  color-scheme: light;
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  --bg: #0e0d14;
  --surface: #16151f;
  --surface-2: #1c1b27;
  --line: #2a2839;
  --line-2: #3b3852;
  --ink: #f1effa;
  --ink-2: #c3c0d8;
  --dim: #8b88a6;
  --accent: #aaa7ff;
  --accent-soft: #24223d;
  --grid: rgba(142, 139, 247, 0.075);
  --danger: #ff6b7f;
  --btn-bg: #f1effa;
  --btn-fg: #141418;
  --shadow: #8e8bf7;
  --shadow-hover: #5fc8f3;
  --header-bg: rgba(14, 13, 20, 0.85);
  --check-a: #23222f;
  --check-b: #1a1924;
  --thumb-bg: #ffffff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0d14; --surface: #16151f; --surface-2: #1c1b27; --line: #2a2839; --line-2: #3b3852;
    --ink: #f1effa; --ink-2: #c3c0d8; --dim: #8b88a6; --accent: #aaa7ff; --accent-soft: #24223d;
    --grid: rgba(142, 139, 247, 0.075); --danger: #ff6b7f;
    --btn-bg: #f1effa; --btn-fg: #141418; --shadow: #8e8bf7; --shadow-hover: #5fc8f3;
    --header-bg: rgba(14, 13, 20, 0.85); --check-a: #23222f; --check-b: #1a1924;
    color-scheme: dark;
  }
}
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px;
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.theme-toggle:hover { border-color: var(--ink); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: rgba(142, 139, 247, 0.3); }
html, body { margin: 0; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 2rem; margin: 0.2em 0 0.35em; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.8rem; }
code, .mono { font-family: var(--mono); }

/* ---------- Header / footer ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--fluff); opacity: 0.55; }
.top nav { display: flex; gap: 0.5rem; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.025em; }
.brand img { width: 38px; height: 38px; }
.brand small { font: 500 0.66rem/1 var(--mono); color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 0.25rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem); }
.narrow { max-width: 660px; margin-inline: auto; }
.center { display: flex; justify-content: center; margin: 1.8rem 0; }
.foot {
  max-width: 1240px; margin: 2rem auto 0; padding: 1.4rem clamp(1rem, 4vw, 2.5rem) 2.2rem;
  border-top: 1px solid var(--line); color: var(--dim);
  font: 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: 0 0 1.4rem; padding: 2.6rem 2rem 2.4rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/mesh-bg.svg") right top / cover no-repeat;
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); max-width: 20ch; }
.hero p { color: var(--ink-2); margin: 0; max-width: 46ch; }
.hero-count {
  position: relative; display: inline-flex; align-items: baseline; gap: 0.45rem; margin-top: 1.1rem;
  font: 500 0.78rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.45rem 0.85rem;
}
.hero-count strong { font: 700 1.05rem/1 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.eyebrow { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.fluff-text { background: var(--fluff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Text helpers ---------- */
.dim { color: var(--dim); }
.small { font-size: 0.85rem; }
.error { color: var(--danger); }
.empty { color: var(--dim); text-align: center; padding: 3.5rem 0; font-family: var(--mono); font-size: 0.85rem; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.link:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.62rem 1.05rem; border-radius: 8px; border: 1.5px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 0.9rem/1 var(--sans); cursor: pointer; white-space: nowrap;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow-hover); }
.btn:active { transform: none; box-shadow: 1px 1px 0 var(--shadow); }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn.fluff { background: var(--fluff); color: #fff; border-color: var(--shadow); text-shadow: 0 1px 0 rgba(20, 20, 24, 0.25); }
.btn.fluff:hover { box-shadow: 3px 3px 0 var(--shadow); }
/* Teal "submit" button — sits next to the lavender/sky gradient */
.btn.mint { background: linear-gradient(100deg, #46e3c4, #2bc7d4); color: #0c2226; border-color: var(--shadow); font-weight: 600; }
.btn.mint:hover { background: linear-gradient(100deg, #5aebcf, #3fd2de); box-shadow: 3px 3px 0 var(--shadow); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: 2px 2px 0 var(--line-2); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn.danger { background: var(--surface); border-color: #f0c5cc; color: var(--danger); box-shadow: none; }
.btn.danger:hover { border-color: var(--danger); box-shadow: 2px 2px 0 var(--danger); }
.btn.small { padding: 0.42rem 0.75rem; font-size: 0.82rem; }

input, select, textarea {
  width: 100%; padding: 0.62rem 0.75rem; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit;
}
input::placeholder, textarea::placeholder { color: #aeacbf; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--peri); box-shadow: 0 0 0 3px rgba(142, 139, 247, 0.2); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--peri); margin: 0.2rem 0 0; flex: none; }

/* ---------- Gallery controls ---------- */
.controls { display: flex; gap: 0.6rem; margin: 0 0 0.9rem; }
.controls input { flex: 1; }
.controls select { width: auto; }
.chips { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.1rem 0.1rem 0.5rem; scrollbar-width: thin; }
.chip {
  flex: none; padding: 0.42rem 0.8rem; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font: 500 0.85rem var(--sans); cursor: pointer;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); box-shadow: 2px 2px 0 var(--shadow-hover); }
.tagbar { margin: 0.5rem 0; color: var(--dim); font-size: 0.9rem; }
.tag {
  display: inline-block; font: 0.78rem var(--mono); color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 0.12rem 0.5rem; border-radius: 5px; margin: 0 0.25rem 0.35rem 0;
}
a.tag:hover { border-color: var(--peri); color: var(--accent); }

/* ---------- Category sidebar ---------- */
.browse { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.sidebar {
  position: sticky; top: 5rem; display: flex; flex-direction: column;
  max-height: min(30rem, calc(100vh - 6.5rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.5rem 0.5rem;
}
.side-title { flex: none; font: 600 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin: 0 0 0.5rem 0.45rem; }
.sidebar .chips { flex-direction: column; gap: 0.15rem; overflow-y: auto; overscroll-behavior: contain; padding: 0 0.2rem 0 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sidebar .chips::-webkit-scrollbar { width: 6px; }
.sidebar .chips::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
.sidebar .chip { width: 100%; text-align: left; background: transparent; border-color: transparent; }
.sidebar .chip:hover { background: var(--surface-2); border-color: var(--line); }
.sidebar .chip.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.sidebar, .results { min-width: 0; }
.cat-select { display: none; }
.results .grid { margin-top: 0.4rem; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-top: 1.1rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--shadow-hover); transform: translate(-2px, -2px); }
.thumb {
  position: relative; height: 136px; display: grid; place-items: center; overflow: hidden;
  background-color: var(--surface-2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 14px 14px; background-position: center;
  border-bottom: 1px solid var(--line);
}
/* IMVU catalog images are only 100x80, so show them at their real size (sharp, never stretched) */
.thumb img, .mesh-preview img, .admin-thumb img {
  width: 100px; height: 80px; object-fit: contain;
  border-radius: 4px; box-shadow: 0 4px 14px -6px rgba(20, 20, 24, 0.45);
}
.noimg { color: var(--dim); font: 0.8rem var(--mono); }
.badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  font: 500 0.64rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--fluff); color: #fff; padding: 0.32rem 0.48rem; border-radius: 5px;
  box-shadow: 1.5px 1.5px 0 #141418;
}
.badge.right { left: auto; right: 0.5rem; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; }
.badge.inline { position: static; display: inline-block; }
.meta { padding: 0.7rem 0.8rem 0.85rem; display: flex; flex-direction: column; gap: 0.15rem; }
.title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 0.84rem; color: var(--ink-2); }
.meta .sub.dim { font: 0.74rem var(--mono); color: var(--dim); }

/* Gallery pages */
.pager { display: flex; justify-content: center; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin: 1.8rem 0 0.5rem; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 0.6rem; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font: 500 0.9rem var(--sans);
}
.page-btn:hover:not(:disabled) { border-color: var(--ink); }
.page-btn.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); box-shadow: 2px 2px 0 var(--shadow-hover); }
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-gap { color: var(--dim); padding: 0 0.2rem; }
.grid { transition: opacity 0.15s; }

/* ---------- Mesh page ---------- */
.mesh-grid { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 2.2rem; align-items: start; }
.mesh-preview {
  height: 220px; display: grid; place-items: center; overflow: hidden;
  background-color: var(--surface-2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 14px 14px; background-position: center;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mesh-info > * { margin-top: 0.75rem; }
.mesh-info h1 { margin-top: 0.4rem; }
.pid {
  display: flex; align-items: center; gap: 0.7rem; width: fit-content;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.5rem 0.45rem 0.8rem;
}
.pid span { font: 500 0.68rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.pid code { font-size: 1.02rem; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.notes {
  white-space: pre-wrap; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem;
}
.uvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.uv { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.uv img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 18px 18px;
  border-bottom: 1px solid var(--line);
}
.uv figcaption { padding: 0.65rem; display: flex; justify-content: center; }

/* Variants / add-ons strips */
/* related rows wrap onto new lines instead of scrolling sideways */
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0.75rem; padding: 0.1rem; }
.mini {
  min-width: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.84rem;
  transition: border-color 0.15s;
}
.mini:hover { border-color: var(--ink); }
.mini.current { border-color: var(--peri); box-shadow: 0 0 0 2px var(--peri); }
.mini .thumb { height: 104px; }
.mini span { display: block; padding: 0.4rem 0.55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.05rem; margin-top: 1.3rem; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form small { font-weight: 400; color: var(--dim); font-size: 0.82rem; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.8rem); }
.form-sub { display: flex; flex-direction: column; gap: 1rem; padding: 0.9rem; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; }
.check { flex-direction: row !important; align-items: flex-start; gap: 0.55rem !important; font-weight: 400 !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.preview-box { width: fit-content; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; line-height: 0; }
.preview-box img { display: block; width: auto; height: auto; max-width: 220px; max-height: 220px; }
.uv-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.uv-item { position: relative; width: 110px; font: 0.72rem var(--mono); color: var(--dim); word-break: break-all; }
.uv-item img { width: 110px; height: 110px; object-fit: contain; background: var(--thumb-bg); border: 1px solid var(--line); border-radius: 8px; }
.uv-item.bad { color: var(--danger); }
.uv-count { flex-basis: 100%; margin: 0.2rem 0 0; }
.done { text-align: center; padding: 3rem 0; }
.done p { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* Feature checkboxes + pills */
.features { border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem 0.9rem; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.features legend { padding: 0 0.35rem; font-weight: 500; font-size: 0.9rem; }
.features.rel { flex-direction: column; gap: 0.45rem; }
.features .form-sub { margin-top: 0.4rem; }
.features .form-sub label { font-weight: 500; }
.extra-link { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.6rem; }
.extra-link-row { display: flex; gap: 0.5rem; }
#addLink { align-self: flex-start; }
.variant-fits { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem; border: 1px dashed var(--line-2); border-radius: 8px; }
.lookup a { color: inherit; }
.feature-checks { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.admin-fields .feature-checks label { flex-direction: row; align-items: center; gap: 0.35rem; font: 0.85rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.cat-checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line-2); padding: 0.35rem 0.55rem; border-radius: 5px; }

/* IMVU lookup status on the submit form */
.lookup { margin: -0.4rem 0 0; font: 0.82rem var(--mono); color: var(--dim); }
.lookup.ok { color: #23966a; }
.lookup.warn { color: #b7791f; }
.lookup.bad { color: var(--danger); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 1rem; }
.tabs button { background: none; border: 1px solid transparent; color: var(--ink-2); font: 500 0.88rem var(--sans); padding: 0.4rem 0.75rem; border-radius: 8px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.tabs b { font: 500 0.75rem var(--mono); color: var(--accent); margin-left: 0.25rem; }
.admin-list { display: flex; flex-direction: column; gap: 1rem; }
.admin-row {
  display: grid; grid-template-columns: 140px 1fr 170px; gap: 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
}
.admin-thumb { height: 110px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; align-self: start; }
/* single UV image with a delete button (admin) */
.uv-thumb { position: relative; display: inline-block; }
.uv-del {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--danger);
  font-size: 0.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.add-uv { align-self: flex-start; cursor: pointer; }
.uv-del:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.admin-fields { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.admin-fields label { display: flex; flex-direction: column; gap: 0.2rem; font: 500 0.66rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.admin-fields input, .admin-fields select, .admin-fields textarea { padding: 0.45rem 0.6rem; font: 0.9rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.admin-uvs { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.admin-uvs img { width: 76px; height: 76px; object-fit: contain; background: var(--thumb-bg); border: 1px solid var(--line); border-radius: 8px; }
.admin-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.cat-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.row-form { display: flex; gap: 0.5rem; align-items: center; }
.row-form input[type=number] { width: 90px; }
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--btn-bg); color: var(--btn-fg); padding: 0.6rem 1rem; border-radius: 8px;
  font: 500 0.85rem var(--sans); box-shadow: 3px 3px 0 var(--shadow-hover);
}
.toast.bad { background: var(--danger); color: #fff; box-shadow: 3px 3px 0 var(--shadow); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .mesh-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-thumb { max-width: 160px; }
  .three { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
  .controls { flex-wrap: wrap; }
  .browse { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { display: none; }
  .cat-select { display: block; }
  .controls input { flex: 1 1 100%; }
  .controls select { flex: 1 1 0; min-width: 0; }
  .hero { padding: 1.8rem 1.2rem; }
  .brand small { display: none; }
}
.of-link { text-decoration: underline; text-decoration-color: rgba(142, 139, 247, 0.4); text-underline-offset: 3px; }
.of-link:hover { text-decoration-color: var(--peri); }

/* Phones: 3 meshes per row */
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
  .thumb { height: 100px; }
  .meta { padding: 0.45rem 0.5rem 0.55rem; }
  .title { font-size: 0.8rem; }
  .sub { font-size: 0.72rem; }
  .meta .sub.dim { font-size: 0.64rem; }
  .badge { font-size: 0.52rem; padding: 0.22rem 0.32rem; top: 0.3rem; }
  .badge.right { right: 0.3rem; }
}

/* Admin: storage meters */
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.meter { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; }
.meter-top { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-2); margin-bottom: 0.5rem; }
.meter-top > span:first-child { font: 600 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.meter-top b { color: var(--ink); }
.meter-bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #d79cf5, #8e8bf7, #5fc8f3); }
.meter.warn .meter-bar i { background: linear-gradient(90deg, #f5a35f, #f56f6f); }

.auto-note { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--ink-2); background: var(--accent-soft); border: 1px solid var(--line-2); border-radius: 8px; padding: 0.45rem 0.65rem; }

/* Contact button */
.btn.contact { display: inline-flex; align-items: center; gap: 0.4rem; }
.btn.contact svg { flex: none; }
@media (max-width: 560px) {
  .btn.contact span { display: none; }
  .btn.contact { padding-inline: 0.6rem; }
}
@media (max-width: 560px) {
  .wide-only { display: none; }
  .top nav { gap: 0.4rem; }
}
