/* ===========================================================
   Studio — Pottery Tracker  ·  prototype styles
   Warm stoneware / clay palette, mobile-first, responsive
   =========================================================== */

:root {
  --clay:        #1f5c99;   /* blue accent (matches the app icon) */
  --clay-dark:   #163f6b;
  --clay-soft:   #dbeaf8;   /* soft blue tint / wash */
  --stone:       #eef2f7;   /* page bg */
  --stone-2:     #f6f9fc;   /* card bg */
  --ink:         #1e2733;   /* text */
  --ink-soft:    #5d6976;   /* secondary text */
  --line:        #dde4ec;   /* hairlines */
  --line-2:      #c8d3e0;
  --white:       #fdfeff;
  --good:        #3a8a52;
  --warn:        #c2873b;
  --danger:      #c0492f;
  --shadow:      0 1px 3px rgba(30,50,80,.08), 0 6px 18px rgba(30,50,80,.06);
  --radius:      16px;
  --radius-sm:   10px;
  --tabbar-h:    0px;   /* nav moved to a top-left dropdown */
  --topbar-h:    56px;
  --maxw:        1240px;
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* default icon size — prevents unsized inline SVGs from ballooning to
   the 300x150 replaced-element default. Specific rules below override. */
svg { width: 18px; height: 18px; stroke: currentColor; fill: none;
      stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--stone);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(8px);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.01em;
  border: 0; background: none; color: inherit; cursor: pointer; padding: 6px 10px 6px 4px; border-radius: 10px; font-family: inherit; }
.brand:hover { background: var(--clay-soft); }
.brand-chev { display: inline-flex; color: var(--ink-soft); margin-left: -2px; }
.brand-chev svg { width: 18px; height: 18px; }

/* left sidebar (web only; hidden on mobile) */
.sidebar { display: none; }
.side-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none;
  padding: 11px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; font-family: inherit; text-align: left; }
.side-item svg { width: 21px; height: 21px; stroke: currentColor; }
.side-item:hover { background: var(--stone); color: var(--ink); }
.side-item.active { background: var(--clay-soft); color: var(--clay-dark); }
.side-item.active svg { stroke: var(--clay); }

/* nav dropdown */
.nav-pop {
  position: fixed; z-index: 60; min-width: 210px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(30,50,80,.18); padding: 6px; animation: navpop .14s ease;
}
@keyframes navpop { from { opacity: 0; transform: translateY(-6px); } }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none;
  padding: 11px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: inherit; text-align: left; }
.nav-item svg { width: 20px; height: 20px; stroke: var(--ink-soft); }
.nav-item:hover { background: var(--stone); }
.nav-item.active { background: var(--clay-soft); color: var(--clay-dark); }
.nav-item.active svg { stroke: var(--clay); }
.nav-item span:nth-child(2) { flex: 1; }
.nav-check { display: flex; color: var(--clay); }
.nav-check svg { width: 18px; height: 18px; stroke: var(--clay); stroke-width: 2.4; }
.brand-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6ba6dd, var(--clay));
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.18);
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Main view ---------- */
.view {
  max-width: var(--maxw); margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.tabbar-inner { max-width: var(--maxw); width: 100%; display: flex; }
.tab {
  flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-soft); font-size: 11px; font-weight: 600; padding: 6px 2px;
}
.tab svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--clay); }
.tab.active svg { stroke: var(--clay); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--white); color: var(--ink);
  border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform .04s ease, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--clay); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.btn-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); border-color: #e4c4bd; }

.fab {
  position: fixed; right: 18px; z-index: 25;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--clay); color: #fff; box-shadow: var(--shadow), 0 8px 22px rgba(168,90,62,.4);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fab svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; }
.fab:active { transform: scale(.94); }

/* ---------- Section headers / toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.section-title { font-size: 15px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin: 22px 2px 10px; }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; flex: 1; min-width: 160px;
}
.search input { border: 0; background: none; outline: none; font-size: 15px; width: 100%; color: var(--ink); }
.search svg { width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; }

/* ---------- Cards / list ---------- */
.grid { display: grid; gap: 12px; }
.grid-pieces { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

.card {
  background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .08s, box-shadow .15s;
}
.card:active { transform: scale(.985); }

.piece-thumb { aspect-ratio: 1; background: var(--clay-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.piece-thumb img { width: 100%; height: 100%; object-fit: cover; }
.piece-thumb .placeholder { color: var(--line-2); }
.piece-thumb .placeholder svg { width: 42px; height: 42px; stroke: var(--line-2); fill: none; stroke-width: 1.3; }
.piece-body { padding: 10px 12px 12px; }
.piece-name { font-weight: 700; font-size: 15px; margin: 0 0 4px; line-height: 1.2; }
.piece-meta { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }

/* list rows */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer;
}
.row:active { transform: scale(.99); }
.row-thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--clay-soft); flex: none; overflow: hidden; display:flex; align-items:center; justify-content:center; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 16px; }
.row-sub { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-trail { color: var(--ink-soft); font-size: 13px; text-align: right; flex: none; }
.row-trail svg { width: 18px; height: 18px; stroke: var(--line-2); fill:none; stroke-width:2; }

/* ---------- Status pill ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--clay-soft); color: var(--clay-dark); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill[data-stage="Idea"]     { background:#ece7e0; color:#7a6f63; }
.pill[data-stage="Formed"]   { background:#e7ddcf; color:#8a6d3b; }
.pill[data-stage="Trimmed"]  { background:#e2dccd; color:#7d703f; }
.pill[data-stage="Bisque"]   { background:#f0ddcb; color:#9a5a32; }
.pill[data-stage="Glazed"]   { background:#dbe5e2; color:#3e6b62; }
.pill[data-stage="Finished"] { background:#dfe9da; color:#46703f; }

/* sale status pills */
.pill[data-sale="For Sale"] { background:#dfe9da; color:#46703f; }
.pill[data-sale="Sold"]      { background:#e9d7d3; color:#a3463a; }
.pill[data-sale="Not for sale"]{ background:#ece7e0; color:#7a6f63; }
.pill[data-sale="Swapped"], .pill[data-sale="Gifted"] { background:#e6e0ef; color:#5b4f7a; }
.pill[data-sale="Archived"] { background:#e4e0db; color:#8a8178; }
.card-archived { opacity: .62; }

/* ---------- Stage tracker (piece status) ---------- */
.stage-list { background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stage-row { display: flex; align-items: flex-start; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.stage-row:last-child { border-bottom: 0; }
.stage-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; }
.stage-row.reached .stage-radio { border-color: var(--clay); }
.stage-row.current .stage-radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--clay); }
.stage-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.stage-name { font-weight: 600; font-size: 15px; cursor: pointer; }
.stage-row.current .stage-name { color: var(--clay-dark); font-weight: 800; }
.stage-date { font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.stage-date:hover { color: var(--clay); }
.stage-loc { align-self: flex-start; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--clay-dark); padding: 2px 0; }
.stage-loc.noloc { color: var(--ink-soft); font-weight: 500; }
/* future steps greyed out until reached */
.stage-row.future { color: var(--line-2); }
.stage-row.future .stage-radio { border-color: var(--line); }
.stage-row.future .stage-name { color: var(--line-2); }
/* sale-status section locked until finished */
.fields.locked { opacity: .5; }
.fields.locked .field { cursor: not-allowed; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 64px 24px; color: var(--ink-soft); }
.empty svg { width: 54px; height: 54px; stroke: var(--line-2); fill: none; stroke-width: 1.3; margin-bottom: 12px; }
.empty h3 { margin: 0 0 6px; color: var(--ink); }
.empty p { margin: 0 0 18px; font-size: 14px; }

/* ---------- Detail screen ---------- */
.detail { padding-bottom: 40px; }
.back { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--clay); font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px 2px; margin-bottom: 6px; }
.back svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }

.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
.photo-box {
  aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--line-2); background: var(--clay-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative;
}
.photo-box.filled { border-style: solid; border-color: var(--line); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .add { color: var(--clay); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.photo-box .add svg { width: 24px; height: 24px; stroke: var(--clay); fill: none; stroke-width: 1.7; }
.photo-box .remove { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color:#fff; border:0; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.photo-box .remove svg { width: 14px; height: 14px; stroke:#fff; stroke-width: 2.4; fill:none; }

/* field rows */
.fields { background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.field { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 52px; }
.field:last-child { border-bottom: 0; }
.field-label { font-size: 14px; color: var(--ink-soft); flex: none; width: 130px; font-weight: 600; }
.field-value { flex: 1; font-size: 15px; color: var(--ink); text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.field-value.placeholder { color: var(--line-2); }
.field-value .chev { color: var(--line-2); }
.field-value .chev svg { width: 17px; height: 17px; stroke: currentColor; fill:none; stroke-width: 2; vertical-align: middle; }
.field.stacked { flex-direction: column; align-items: stretch; }
.field.stacked .field-value { text-align: left; justify-content: flex-start; margin-top: 4px; }

.tag { display: inline-flex; align-items: center; background: var(--clay-soft); color: var(--clay-dark); border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600; }

/* inputs */
input[type=text], input[type=number], input[type=date], input[type=time], textarea, select {
  font-family: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(168,90,62,.12); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
label.lbl { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px; }

/* ---------- Radials / option lists ---------- */
.optlist { display: flex; flex-direction: column; gap: 2px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 16px;
}
.opt:last-child { border-bottom: 0; }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; }
.opt.sel .radio { border-color: var(--clay); }
.opt.sel .radio::after { content:""; width: 12px; height: 12px; border-radius: 50%; background: var(--clay); }
.opt .check { width: 22px; height: 22px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; border: 2px solid var(--line-2); border-radius: 6px; }
.opt .check svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 3; visibility: hidden; }
.opt.sel .check { background: var(--clay); border-color: var(--clay); }
.opt.sel .check svg { visibility: visible; }
.picker-note { font-size: 13px; color: var(--ink-soft); margin: 0 2px 12px; line-height: 1.5; }
.opt .opt-label { flex: 1; }
.opt .opt-date { font-size: 13px; color: var(--ink-soft); }
.opt-del { color: var(--danger); background: none; border: 0; cursor: pointer; padding: 4px; }
.opt-del svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Modal / sheet ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(40,28,20,.42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--stone); width: 100%; max-width: 560px;
  border-radius: 22px 22px 0 0; max-height: 92vh; display: flex; flex-direction: column;
  animation: slideup .22s cubic-bezier(.22,1,.36,1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slideup { from { transform: translateY(100%); } }
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .sheet { border-radius: 22px; max-height: 86vh; animation: pop .18s ease; }
  @keyframes pop { from { transform: scale(.96); opacity: 0; } }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-head .grip { position: absolute; }
.sheet-body { padding: 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
.x-btn { background: none; border: 0; cursor: pointer; color: var(--ink-soft); padding: 6px; display:flex; }
.x-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Segments (firing schedule) ---------- */
.seg-table { display: flex; flex-direction: column; gap: 8px; }
.seg-head, .seg-row { display: grid; grid-template-columns: 38px 1fr 1fr 1fr 34px; gap: 8px; align-items: center; }
.seg-head { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px; }
.seg-num { width: 32px; height: 32px; border-radius: 50%; background: var(--clay-soft); color: var(--clay-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.seg-row input { padding: 9px 8px; text-align: center; }
.seg-del { background:none; border:0; color: var(--danger); cursor: pointer; padding: 4px; }
.seg-del svg { width: 18px; height: 18px; stroke: currentColor; fill:none; stroke-width:2; }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--white); color: var(--clay); font-size: 20px; cursor: pointer; display:flex; align-items:center; justify-content:center; }
.stepper button:active { background: var(--clay-soft); }
.stepper .val { min-width: 34px; text-align: center; font-weight: 700; }

/* desktop dropdown variant of the single-select picker */
.sheet--dropdown { max-width: 380px; }
.menu { display: flex; flex-direction: column; gap: 1px; max-height: 52vh; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.menu-item:hover { background: var(--clay-soft); }
.menu-item.sel { background: var(--clay-soft); color: var(--clay-dark); font-weight: 700; }
.menu-label { flex: 1; }
.menu-check { color: var(--clay); display: flex; }
.menu-check svg { width: 18px; height: 18px; stroke-width: 2.4; visibility: hidden; }
.menu-item.sel .menu-check svg { visibility: visible; }

/* ---------- wheel picker (cone) ---------- */
.cone-toggle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cone-selects { display: flex; align-items: flex-end; gap: 12px; }
.cone-select-col { flex: 1; }
.cone-select-col select { font-size: 16px; }
.cone-selects .wheel-dash { padding-bottom: 8px; }
.batch-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.batch-grid .bg-row { display: contents; }
.batch-grid .bg-row > span { padding: 3px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.batch-grid .bg-row > span:last-child { text-align: right; font-weight: 700; }
.batch-grid .bg-row.add > span { color: var(--warn); }
.batch-grid .bg-row.tot > span { border-bottom: 0; font-weight: 800; padding-top: 6px; }
.wheels { display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.wheel-col { flex: 1; max-width: 160px; }
.wheel-cap { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.wheel-dash { font-size: 24px; color: var(--ink-soft); padding-bottom: 76px; }
.wheel {
  position: relative; overflow-y: scroll; scroll-snap-type: y mandatory;
  background: var(--white); border: 1px solid var(--line-2); border-radius: 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { display: flex; align-items: center; justify-content: center; scroll-snap-align: center;
  font-size: 17px; color: var(--ink-soft); font-weight: 600; cursor: pointer; }
.wheel-item.on { color: var(--clay); font-weight: 800; font-size: 19px; }
.wheel-band { position: absolute; left: 6px; right: 6px; pointer-events: none;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: rgba(168,90,62,.05); }

/* checkbox chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: var(--white); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
}
.chip.sel { background: var(--clay); border-color: var(--clay); color: #fff; }

/* segmented toggle */
.segmented { display: inline-flex; background: var(--clay-soft); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--clay-dark); cursor: pointer; display:flex; align-items:center; gap:6px; }
.segmented button svg { width: 16px; height: 16px; stroke: currentColor; fill:none; stroke-width: 2; }
.segmented button.active { background: var(--white); color: var(--clay); box-shadow: var(--shadow); }

/* materials database */
.mat-row { cursor: pointer; }
.mat-custom { background: var(--clay-soft); color: var(--clay-dark); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.ox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.ox-cell { display: flex; flex-direction: column; gap: 3px; }
.ox-cell label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ox-cell input { padding: 8px 9px; text-align: right; }
.ox-total { font-weight: 800; }

/* plaster calculator */
.plaster-ctrls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.plaster-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pm-card { background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.pm-name { font-weight: 800; font-size: 14px; color: var(--clay-dark); margin-bottom: 8px; }
.pm-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pm-row:last-child { border-bottom: 0; }
.pm-row span:last-child { font-weight: 700; }
.banner a { color: var(--clay-dark); font-weight: 700; }

/* in-app resource reader */
.reader { position: fixed; inset: 0; z-index: 70; background: var(--stone); display: flex; flex-direction: column; }
.reader-bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--white); border-bottom: 1px solid var(--line); }
.reader-bar .back { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--clay); font-weight: 600; font-size: 15px; cursor: pointer; }
.reader-bar .back svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }
.reader-title { flex: 1; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-load { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--ink-soft); }
.reader-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* shrinkage ruler */
.shrink-ruler { margin-top: 16px; }
.shrink-svg { width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sr-lab { font-size: 7px; fill: var(--ink); font-weight: 700; stroke: none; }
.sr-bar { stroke-width: 4; stroke-linecap: round; }
.sr-bar.wet { stroke: var(--clay); }
.sr-bar.fired { stroke: var(--good); }
.sr-tick { stroke: var(--line-2); stroke-width: 1; }

/* reminders */
.reminder-row { gap: 14px; }
.rm-check { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: var(--white); color: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.rm-check svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 3; }
.rm-check.on { background: var(--good); border-color: var(--good); color: #fff; }
.rm-isdone .row-title { text-decoration: line-through; color: var(--ink-soft); }
.rm-badge { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rm-badge.rm-over { background: #e9d7d3; color: #a3463a; }
.rm-badge.rm-due  { background: #f5ead8; color: #8a6320; }
.rm-badge.rm-soon { background: var(--clay-soft); color: var(--clay-dark); }
.rm-badge.rm-done { background: #dfe9da; color: #46703f; }

/* topbar gear (settings/account) */
.topbar-gear { border-color: var(--line); }
.topbar-gear svg { stroke: var(--ink-soft); }
.topbar-gear:hover svg { stroke: var(--clay); }

/* kiln log detailed form */
.klog-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.kl-field { display: flex; flex-direction: column; }
.kl-field.wide { grid-column: 1 / -1; }
.kl-field .lbl { margin: 0 0 5px; }
.kl-field textarea { min-height: 70px; }
.klog-form .wide { margin-top: 6px; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap button { flex: 1; white-space: nowrap; }
.seg-wrap .seg-add { color: var(--clay); font-weight: 700; flex: 0 0 auto; }
.time-pair, .time-trio { display: flex; align-items: center; gap: 6px; }
.time-trio select { flex: 1; }
.time-pair input { width: 100%; text-align: center; }
.time-pair .colon { color: var(--ink-soft); font-weight: 700; }
.result-anchors { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); margin-bottom: 4px; }
.result-scale { display: flex; gap: 6px; }
.result-scale button { flex: 1; height: 40px; border: 1px solid var(--line-2); background: var(--white); border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.result-scale button.on { background: var(--clay); border-color: var(--clay); color: #fff; }
@media (max-width: 640px) { .klog-form .form-grid { grid-template-columns: 1fr; } }

/* witness cone packs */
.cone-pack { background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.cp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cp-head .btn { flex: 1; justify-content: flex-start; }
.cone-pack select { font-size: 15px; }

/* kiln log table */
.klog-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--stone-2); box-shadow: var(--shadow); }
table.klog { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; }
table.klog th { background: var(--clay-soft); color: var(--clay-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 10px 12px; position: sticky; top: 0; white-space: nowrap; }
table.klog td { padding: 11px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
table.klog tr:active { background: var(--clay-soft); }
table.klog tr { cursor: pointer; }

/* glaze tile */
.glaze-tile .swatch { aspect-ratio: 1.3; display: flex; align-items: flex-end; padding: 10px; }
.glaze-tile .swatch .cone { background: rgba(255,255,255,.85); color: var(--ink); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.glaze-tile .gbody { padding: 10px 12px; }
.glaze-tile .gname { font-weight: 700; font-size: 14px; }
.glaze-tile .gmeta { font-size: 12px; color: var(--ink-soft); }
.glaze-tile .gvars { display: flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: var(--clay); }
.glaze-tile .gvars svg { width: 13px; height: 13px; stroke: var(--clay); flex: none; }
.glaze-tile .gvars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* UMF / ingredient list */
.ingredient { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.ingredient:last-child { border-bottom: 0; }
.ing-name { flex: 1; font-size: 15px; font-weight: 600; }
.ing-amt { width: 92px; }
.ing-amt input { text-align: right; }
.total-row { display: flex; justify-content: space-between; padding: 12px 4px; font-weight: 700; border-top: 2px solid var(--line-2); margin-top: 4px; }
.ing-flag { color: var(--warn); font-size: 12px; }
.ing-name { display: flex; align-items: center; gap: 6px; }
.ing-name-inp { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink); font-family: inherit; }
.ing-name-inp:focus { border-color: var(--clay); outline: none; }
.ing-add { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ing-add-n { width: 58px; text-align: center; padding: 7px; border: 1px solid var(--line-2); border-radius: 8px; font-family: inherit; font-size: 14px; background: var(--white); color: var(--ink); }

/* ---------- UMF panel ---------- */
.umf-panel { background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.umf-empty { display: flex; gap: 9px; align-items: center; color: var(--ink-soft); font-size: 13.5px; }
.umf-empty svg { width: 18px; height: 18px; flex: none; }
.umf-head { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; }
.umf-ratio { background: var(--clay-soft); border-radius: var(--radius-sm); padding: 10px 14px; text-align: center; flex: none; }
.umf-ratio-num { font-size: 24px; font-weight: 800; color: var(--clay-dark); line-height: 1; }
.umf-ratio-num span { font-size: 14px; font-weight: 600; }
.umf-ratio-lbl { font-size: 11px; font-weight: 700; color: var(--clay-dark); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.umf-balance { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.umf-balance > div { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.umf-balance > div:last-child { border-bottom: 0; }
.umf-b-val { font-weight: 800; font-size: 16px; }
.umf-b-lbl { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.umf-subhead { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 7px; }
.umf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 7px; }
.umf-cell { background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; text-align: center; }
.umf-cell.wide { background: var(--clay-soft); border-color: transparent; }
.umf-ox { display: block; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.umf-cell.wide .umf-ox { color: var(--clay-dark); }
.umf-val { display: block; font-size: 15px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.umf-warn { display: flex; gap: 8px; align-items: flex-start; background: #f5ead8; color: #8a6320; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-top: 12px; }
.umf-warn svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* Stull chart */
.stull { margin-top: 14px; }
.stull-svg { width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.st-frame { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.st-grid { stroke: var(--line); stroke-width: .5; }
.st-axl, .st-ayl { font-size: 12px; fill: var(--ink); text-anchor: middle; font-weight: 600; }
.st-ayl { text-anchor: end; }
.st-axt { font-size: 13px; fill: var(--ink); text-anchor: middle; font-weight: 800; }
.st-pt { fill: var(--clay); stroke: #fff; stroke-width: 2; }
.st-pt-ring { fill: none; stroke: var(--clay); stroke-width: 2; opacity: .35; }
.st-off { font-size: 10px; fill: var(--danger); text-anchor: middle; }
/* region map is rendered to a canvas in umf.js; these style the SVG overlay */
.st-gloss { fill: none; stroke: #2c2520; stroke-width: 2; stroke-dasharray: 6 5; stroke-linecap: round; opacity: .8; }
.st-zlabel { font-size: 13px; font-weight: 800; fill: rgba(38,28,22,.92); text-anchor: middle; letter-spacing: .3px;
  paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3.5px; stroke-linejoin: round; }
.st-gloss-lab { font-size: 11px; font-weight: 700; letter-spacing: .5px; }

/* predicted surface / transparency from the chemistry */
.umf-predict { margin-top: 14px; padding: 12px 14px; background: var(--clay-soft); border-radius: var(--radius-sm); }
.pred-head { font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--clay-dark); margin-bottom: 8px; }
.pred-row { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.pred-lbl { font-size: 12.5px; color: var(--ink-soft); width: 96px; flex: none; }
.pred-val { font-size: 14px; color: var(--ink); }
.pred-note { font-size: 11.5px; color: var(--ink-soft); font-style: italic; }
.pred-apply { margin-top: 10px; }
.pred-apply:disabled { opacity: .55; cursor: default; }
.row-ratio { font-size: 12px; font-weight: 700; color: var(--clay-dark); background: var(--clay-soft); padding: 2px 7px; border-radius: 999px; margin-right: 6px; }

/* "Can I make it?" availability highlighting */
.av-missing { opacity: .42; }
.av-sub { border: 2px solid var(--warn); }
.glaze-tile.av-sub { border-color: var(--warn); }
.avail-legend .avail-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 2px; }
.avail-legend .avail-dot.sub { border: 2px solid var(--warn); }

/* ---------- recipe editor: nudge / materials / additions ---------- */
.step-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.step-inp { width: 76px; text-align: center; padding: 7px 8px; }
.step-bar .btn { margin-left: auto; }
.ing-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--ink); margin: 4px 2px 8px; text-transform: uppercase; letter-spacing: .04em; }
.ing-pct { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); min-width: 52px; text-align: right; }
.ing-nudge { display: inline-flex; flex-direction: column; gap: 2px; }
.ing-nudge button { width: 30px; height: 19px; border: 1px solid var(--line-2); background: var(--white); color: var(--clay); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.ing-nudge button:active { background: var(--clay-soft); }
.ing-nudge svg { width: 15px; height: 15px; }
.total-row.grand { font-size: 16px; border-top-width: 3px; }
.recipe-actions { display: flex; gap: 10px; margin-top: 16px; }
.recipe-actions .btn { flex: 1; }

/* inventory rows */
.inv-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: 0; }
.inv-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.inv-head .inv-amt, .inv-head .inv-price { text-align: right; }
.inv-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.inv-amt { width: 100px; flex: none; }
.inv-price { width: 100px; flex: none; }
.inv-amt input, .inv-price input { text-align: right; padding: 8px 10px; }
.inv-del { width: 38px; flex: none; }
.inv-low { background: #e9d7d3; color: #a3463a; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.deduct-btn { margin-top: 10px; }
.bg-row.cost > span { font-weight: 800; border-bottom: 0; padding-top: 6px; color: var(--clay-dark); }
.cost-warn { color: var(--warn); cursor: help; }

/* mobile: nudge + normalize side by side in the step bar */
.step-bar .nudge-ctrl { display: flex; align-items: center; gap: 10px; }
.step-bar .nudge-ctrl + .btn { margin-left: auto; }

/* web full-page editor */
.editpage-grid { display: grid; grid-template-columns: minmax(420px, 1fr) 1.15fr; gap: 28px; align-items: start; }
.edit-left { position: sticky; top: 80px; }
.recipe-name-input { font-size: 22px; font-weight: 700; padding: 10px 12px; }
.nudge-panel { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 16px 0 6px; }
.nudge-panel .nudge-ctrl { display: flex; align-items: center; gap: 10px; }
.nudge-panel .btn { min-width: 120px; }
@media (max-width: 859px) {
  .editpage-grid { grid-template-columns: 1fr; }
  .edit-left { position: static; }
}

/* ---------- firing schedule full-page editor ---------- */
.fs-page { max-width: 680px; }
.fs-page .seg-table { margin-top: 6px; }

/* ---------- region tagging ---------- */
.mat-region-tag { font-size: 10px; font-weight: 700; color: var(--clay-dark); background: var(--clay-soft); padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.btn.btn-on { background: var(--clay); color: #fff; border-color: var(--clay); }

/* ---------- discover ---------- */
.disc-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; margin: 4px 0 14px; }
.disc-seg button { padding: 9px 18px; border: none; background: var(--white); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.disc-seg button.on { background: var(--clay); color: #fff; }
.disc-author { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.seg-row.static { display: grid; grid-template-columns: 28px 1fr 1fr 1fr 20px; align-items: center; padding: 7px 4px; }

/* ---------- Studio Pro ---------- */
.pro-tag { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--clay); padding: 2px 6px; border-radius: 5px; }
.nav-item .pro-tag { margin-left: auto; }
.plan-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--stone); color: var(--ink-soft); }
.plan-pill.pro { background: var(--clay); color: #fff; }
.pro-gate { max-width: 460px; margin: 40px auto; text-align: center; padding: 16px; }
.pro-badge-lg { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #fff; background: var(--clay); padding: 5px 14px; border-radius: 8px; }
.pro-gate h2 { font-size: 22px; margin: 16px 0 6px; }
.pro-gate > p { color: var(--ink-soft); margin: 0 0 18px; }
.pro-perks { list-style: none; padding: 0; margin: 0 auto 20px; max-width: 360px; text-align: left; }
.pro-perks li { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; font-size: 14px; }
.pro-perks li svg { width: 18px; height: 18px; stroke: var(--clay); flex: none; margin-top: 1px; }
.pro-gate .btn { display: block; width: 100%; margin: 8px 0; }

/* ---------- export: editable batch-size columns ---------- */
.batch-presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px; }
.chip-btn { border: 1px solid var(--line-2); background: var(--white); color: var(--clay-dark); border-radius: 999px; padding: 5px 13px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: var(--clay); background: var(--clay-soft); }
.batch-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.batch-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--clay-soft); color: var(--clay-dark); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.batch-chip i { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--clay); background: rgba(255,255,255,.6); border-radius: 999px; padding: 1px 6px; }
.batch-chip button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; background: rgba(0,0,0,.08); border-radius: 50%; cursor: pointer; color: var(--clay-dark); padding: 0; }
.batch-chip button svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.6; }
.batch-add { display: inline-flex; align-items: center; gap: 4px; }
.batch-add input { width: 78px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-family: inherit; font-size: 13.5px; background: var(--white); color: var(--ink); }
.batch-add button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line-2); background: var(--white); border-radius: 50%; cursor: pointer; color: var(--clay); }
.batch-add button svg { width: 15px; height: 15px; stroke: currentColor; }

/* ---------- recipe variations ---------- */
.var-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--stone-2); }
.var-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.var-head .var-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink); font-family: inherit; }
.var-head .var-name:focus { border-color: var(--clay); outline: none; }
.var-block .ingredient { padding: 7px 0; }

/* ---------- glaze test generator ---------- */
.st-gridpt { fill: var(--clay); stroke: #fff; stroke-width: 1.5; opacity: .92; }
.st-gridptn { fill: #fff; font-size: 9px; font-weight: 800; text-anchor: middle; stroke: none; }
.gt-flux-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gt-flux-row .gt-mat { flex: 1; min-width: 0; }
.gt-mat, .gt-flux-row input, .gt-ranges input { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink); font-family: inherit; font-size: 14px; }
.gt-mat:focus { border-color: var(--clay); outline: none; }
.gt-ranges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.gt-ranges .kl-field { flex: 1 1 200px; }
.gt-preview .gt-stull { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; }

/* ---------- price helper ---------- */
.price-out { margin-top: 16px; padding: 14px 16px; background: var(--clay-soft); border-radius: var(--radius-sm); }
.po-cost { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.po-cost b { font-size: 15px; }
.po-price { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.po-price span { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--clay-dark); }
.po-price b { font-size: 30px; font-weight: 800; color: var(--ink); }

/* ---------- cone chart ---------- */
.cone-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cone-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); padding: 4px 8px; border-bottom: 1px solid var(--line-2); }
.cone-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cone-table .r { text-align: right; }
.cone-table .muted { color: var(--ink-soft); }
.cone-table tr.cone-common td { background: var(--clay-soft); font-weight: 700; }

/* ---------- collapsible nav groups + sub-items ---------- */
.side-item .ni-label, .nav-item .ni-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item.side-sub { padding-left: 36px; font-size: 14px; }
.side-item.side-sub svg { width: 17px; height: 17px; opacity: .85; }
.nav-item.nav-sub { padding-left: 34px; }
.side-collapse { display: inline-flex; align-items: center; justify-content: center; margin-left: 2px; padding: 2px; border-radius: 6px; color: var(--ink-soft); }
.side-collapse svg { width: 16px; height: 16px; stroke: currentColor; }
.side-collapse:hover { background: var(--line); }
.side-item.side-group .ni-label, .nav-item.nav-group .ni-label { font-weight: 700; }

/* ---------- sidebar wordmark ---------- */
.side-brand { display: flex; align-items: center; gap: 9px; padding: 6px 12px 16px; font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.side-brand-dot { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #6ba6dd, var(--clay)); flex: none; }

/* ---------- books / finance ---------- */
.books-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 16px; }
.book-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.book-card .bc-lbl { font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-soft); }
.book-card .bc-val { font-size: 24px; font-weight: 800; margin-top: 4px; }
.book-card.income .bc-val { color: #3a8a52; }
.book-card.expense .bc-val { color: #b5532e; }
.book-card.net .bc-val.pos { color: #3a8a52; }
.book-card.net .bc-val.neg { color: var(--danger); }
.books-period { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; margin-bottom: 14px; }
.books-period button { padding: 8px 14px; border: none; background: var(--white); font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.books-period button.on { background: var(--clay); color: #fff; }
.books-periodbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.books-periodbar .books-period { margin-bottom: 0; }
.month-nav { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.mn-btn { width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--white); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--clay); }
.mn-btn:disabled { opacity: .4; cursor: default; }
.mn-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.mn-label { font-size: 14px; font-weight: 700; min-width: 128px; text-align: center; }
.receipt-slot { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--stone); overflow: hidden; position: relative; max-width: 220px; }
.receipt-slot img { width: 100%; max-height: 280px; object-fit: contain; display: block; background: #fff; }
.receipt-slot .appear-add { width: auto; height: auto; padding: 26px; }
.txn-tag { display: inline-flex; vertical-align: middle; margin-left: 3px; }
.txn-tag svg { width: 14px; height: 14px; stroke: var(--ink-soft); fill: none; }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--clay); flex: none; }
.txn-amt.income { color: #3a8a52; font-weight: 700; }
.txn-amt.expense { color: #b5532e; font-weight: 700; }
.txn-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--stone); padding: 1px 7px; border-radius: 999px; }
.cat-bar { height: 8px; border-radius: 999px; background: var(--stone); overflow: hidden; margin-top: 4px; }
.cat-bar > span { display: block; height: 100%; background: var(--clay); }

/* ---------- kilns ---------- */
.kiln-cost { font-size: 13px; font-weight: 700; color: var(--clay-dark); }
.kiln-cost.muted { color: var(--ink-soft); font-weight: 500; }
.kiln-estimate { margin-top: 14px; padding: 14px 16px; background: var(--clay-soft); border-radius: var(--radius-sm); text-align: center; }
.ke-head { font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--clay-dark); }
.ke-cost { font-size: 30px; font-weight: 800; color: var(--ink); margin: 2px 0; }
.ke-break { font-size: 12.5px; color: var(--ink-soft); }
.seg-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg-toggle button { padding: 9px 16px; border: none; background: var(--white); font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.seg-toggle button.on { background: var(--clay); color: #fff; }

/* ---------- recipe appearance (photo + swatch) + status ---------- */
.appear-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.appear-photo { width: 132px; height: 132px; flex: none; border-radius: var(--radius-sm); overflow: hidden; background: var(--stone); border: 1px solid var(--line); position: relative; }
.appear-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.appear-add { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.appear-add svg { width: 22px; height: 22px; stroke: var(--ink-soft); }
.appear-add:hover { background: var(--clay-soft); color: var(--clay-dark); }
.appear-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 8px; border: none; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.appear-x svg { width: 16px; height: 16px; stroke: #fff; }
.appear-swatch { flex: 1 1 180px; min-width: 160px; }
.sw-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sw-input { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); cursor: pointer; }
.sw-hex { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.status-pill { display: inline-block; vertical-align: middle; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; color: #fff; padding: 2px 7px; border-radius: 999px; }
.glaze-tile .swatch { position: relative; }
.glaze-tile .status-pill { position: absolute; top: 8px; right: 8px; }

/* ---------- compare: select-from-list mode ---------- */
.compare-bar { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; background: var(--clay-soft); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.compare-bar > svg { width: 18px; height: 18px; stroke: var(--clay-dark); flex: none; }
.cmp-count { font-size: 14px; color: var(--ink); }
.cmp-count b { color: var(--clay-dark); }
.glaze-tile { position: relative; }
.glaze-tile.selecting { cursor: pointer; }
.glaze-tile .sel-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; }
.glaze-tile .sel-check svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 3; }
.glaze-tile.selected { outline: 3px solid var(--clay); outline-offset: 1px; }
.glaze-tile.selected .sel-check { background: var(--clay); }
.row.selecting { cursor: pointer; }
.row .sel-check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; margin-right: 4px; color: #fff; }
.row .sel-check svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 3; visibility: visible; }
.row.selected { background: var(--clay-soft); }
.row.selected .sel-check { background: var(--clay); border-color: var(--clay); }

/* ---------- compare ---------- */
.cmp-track { display: flex; gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.cmp-col { flex: 1 1 300px; max-width: 420px; min-width: 260px; background: var(--stone-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.cmp-stull { margin-top: 12px; }
.cmp-stull .umf-subhead { display: none; }
.cmp-swatch { height: 56px; border-radius: 10px; margin-bottom: 10px; }
.cmp-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.cmp-sub { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; }
.cmp-ratio { background: var(--clay-soft); color: var(--clay-dark); border-radius: var(--radius-sm); padding: 8px; text-align: center; font-weight: 800; font-size: 18px; }
.cmp-ratio span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.cmp-recipe { margin: 12px 0; }
.cmp-ing { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.cmp-ing span:last-child { font-weight: 700; }
.cmp-ing.add { color: var(--warn); }
.cmp-vars { margin: 12px 0; }
.cmp-vars-h { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--clay-dark); margin-bottom: 6px; }
.cmp-vars-h svg { width: 13px; height: 13px; stroke: var(--clay); }
.cmp-var { background: var(--clay-soft); border-radius: 8px; padding: 6px 8px; margin-bottom: 5px; }
.cmp-var b { display: block; font-size: 12.5px; color: var(--clay-dark); }
.cmp-var span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }
.cmp-umf { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cmp-ox { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.cmp-ox span:first-child { color: var(--ink-soft); font-weight: 600; }
.cmp-ox span:last-child { font-weight: 800; }
.cmp-div { height: 1px; background: var(--line); margin: 6px 0; }
.cmp-open { margin-top: 12px; }
@media (min-width: 860px) {
  .cmp-track { flex-wrap: wrap; }
  .cmp-col { flex: 0 0 248px; }
}

/* note text */
.note-text { white-space: pre-wrap; font-size: 15px; line-height: 1.5; color: var(--ink); }

/* helper */
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.banner { background: var(--clay-soft); color: var(--clay-dark); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; }
.banner svg { width: 18px; height: 18px; stroke: currentColor; fill:none; stroke-width: 2; flex: none; margin-top: 1px; }

/* responsive: side nav on wide screens */
@media (min-width: 860px) {
  #app { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .sidebar { display: block; grid-column: 1; align-self: start; position: sticky; top: var(--topbar-h);
    border-right: 1px solid var(--line); background: var(--white); padding: 16px 12px;
    min-height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column; gap: 4px; }
  /* on web the brand is just a logo/title, not a dropdown trigger */
  .brand { cursor: default; pointer-events: none; }
  .brand-chev { display: none; }
  /* auto margins on a grid item shrink it; center with justify-self instead */
  .view { grid-column: 2; justify-self: center; width: 100%; max-width: var(--maxw); margin: 0; padding: 22px 28px 60px; }
  .fab { bottom: 28px; }
}
