:root {
  --pink: #f05587;
  --pink-hot: #e63d74;
  --pink-hover: #f483a8;
  --pink-bg: #ffe1eb;
  --blue-bg: #e0f5ff;
  --purple-soft: #eee4f7;
  --yellow: #f0c14b;
  --ink: #5e6973;
  --ink-dark: #3d4650;
  --line: #f3d4de;
  --ok: #2bb673;
  --max: 1180px;
  --card-max: 283px;
  --pad: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Outfit", "DM Sans", system-ui, sans-serif;
  --shadow: 0 18px 44px rgba(240, 85, 135, 0.14);
  --shadow-soft: 0 10px 28px rgba(61, 70, 80, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: #d8cdd2 transparent; }
* { scrollbar-width: thin; scrollbar-color: #d8cdd2 transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #d8cdd2; border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--pink-hover); }
* { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button::-moz-focus-inner { border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
:focus, :focus-visible,
button:focus, button:focus-visible,
a:focus, a:focus-visible,
input:focus, input:focus-visible,
select:focus, select:focus-visible,
textarea:focus, textarea:focus-visible,
[tabindex]:focus, [tabindex]:focus-visible {
  outline: none;
  box-shadow: none;
}
[hidden] { display: none !important; }

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  background: #fff;
  color: var(--ink-dark);
  min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: #d8c4cc; }
input[type="color"] {
  width: 52px;
  height: 48px;
  padding: 4px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.wrap { width: min(var(--max), calc(100% - var(--pad) * 2)); margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 14px;
  background: var(--pink); color: #fff; font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 12px 26px rgba(240, 85, 135, 0.28);
  transition: transform .2s, background .2s;
}
.btn:hover { background: var(--pink-hot); transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--pink); box-shadow: none; }
.btn-ghost:hover { background: var(--pink-bg); transform: none; }
.btn-outline { background: #fff; color: var(--ink-dark); box-shadow: none; border: 1.5px solid var(--line); }
.btn-outline:hover { background: var(--pink-bg); transform: translateY(-2px); }
.btn-ok { background: var(--ok); box-shadow: 0 12px 26px rgba(43, 182, 115, 0.28); }
.btn-ok:hover { background: #23965f; }
.btn-warn { background: var(--yellow); color: #3d3010; box-shadow: 0 12px 26px rgba(201, 151, 18, 0.22); }
.btn-warn:hover { background: #d4a52a; }
.btn-sm { min-height: 42px; padding: 0 14px; border-radius: 12px; font-size: 0.86rem; box-shadow: none; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-dark); position: relative;
  flex: 0 0 auto;
}
.icon-btn:hover { background: rgba(255,255,255,.55); color: var(--pink); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--pink-bg); font-weight: 800; font-size: 0.86rem; color: var(--ink-dark);
  line-height: 1.2;
  border: 2px solid transparent;
}
.chip.is-on {
  background: #fff;
  color: var(--ink-dark);
  border-color: var(--pink);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

.kicker {
  font-family: var(--display); font-size: 0.72rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--pink);
  line-height: 1.3;
}

.delta {
  display: inline-flex; align-items: center;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink-dark);
}
.delta.is-under { color: #0d6b6e; }
.delta.is-mid { color: #d4891a; }
.delta.is-over { color: #e11d2e; }
.delta.is-flat { color: var(--ink); }
.hist-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.hist-stats .delta { gap: 5px; }
.hist-stats .delta svg { width: 16px; height: 16px; }
.hist-name { font-weight: 600; color: var(--ink-dark); }
.hist-dur {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: linear-gradient(180deg, var(--pink-bg) 0%, #ffd6e6 48%, #fff 100%);
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.login-card .brand-logo { height: 88px; width: auto; }
.login-card h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  color: var(--ink-dark);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.login-card p { font-weight: 600; }
.login-card .field, .login-card .btn { width: 100%; text-align: left; }

.field { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--ink-dark); text-align: left; }
.err { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--pink); text-align: left; width: 100%; }

.app-top {
  background: linear-gradient(180deg, var(--pink-bg) 0%, #ffd6e6 70%, #fff 100%);
}
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(240, 85, 135, 0.04);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.brand-box {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}
.brand {
  display: grid;
  place-items: center;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.brand img {
  height: 64px;
  width: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.admin-badge svg { width: 14px; height: 14px; }
.bar:has(.admin-badge) { min-height: 102px; }
.switch {
  justify-self: start;
  display: flex;
  align-items: center;
  background: #fff8fa;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  min-width: 0;
}
.switch button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  color: var(--ink-dark);
  line-height: 1;
}
.switch button svg { width: 18px; height: 18px; }
.switch button span { display: none; }
.switch button.is-on { background: var(--pink); color: #fff; }
.tools {
  display: flex; align-items: center; justify-content: flex-end;
  justify-self: end; gap: 2px;
}
.tool-ico.is-on { color: var(--pink); }

.page { flex: 1 0 auto; padding: 22px 0 88px; }
.page-head {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}
.page-head > div { min-width: 0; }
.page-head .btn { justify-self: start; }
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  color: var(--ink-dark);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 4px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -6px 0 22px;
}
.tabs button {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff8fa;
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.2;
  border: 1.5px solid var(--line);
}
.tabs button.is-on { background: var(--ink-dark); color: #fff; border-color: var(--ink-dark); }

.section { margin-bottom: 32px; }
.section-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.section-h h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--ink-dark);
  min-width: 0;
}
.section-h em { font-style: normal; font-size: 0.8rem; font-weight: 700; color: var(--ink); flex: 0 0 auto; }

.kanban {
  display: grid;
  gap: 14px;
}
.kanban-col {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 22px;
  border: 1.5px solid var(--line);
  background: #fff8fa;
}
.kanban-col.is-run {
  order: 1;
  background: linear-gradient(180deg, var(--pink-bg) 0%, #fff8fa 56px);
}
.kanban-col.is-queue {
  order: 2;
  background: linear-gradient(180deg, var(--purple-soft) 0%, #fff8fa 56px);
}
.kanban-col .section-h { margin: 0 2px 2px; }
.kanban-col .cards { grid-template-columns: 1fr; }
.kanban-col .empty { background: rgba(255,255,255,.72); padding: 28px 14px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.bin {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: visible;
  display: grid;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.bin:has(.more.is-on) { z-index: 5; }
.bin:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bin-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; padding: 12px 6px 0 16px;
}
.bin-top > div { min-width: 0; }
.bin-flavor {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--ink-dark);
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: break-word;
  padding-top: 6px;
}
.bin-swatch { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.bin-meta { font-size: 0.78rem; font-weight: 700; color: var(--ink); line-height: 1.35; margin-top: 2px; }
.bin-body { padding: 8px 16px 0; display: grid; gap: 4px; }
.bin-foot,
.hist-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 14px;
}
.bin-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-dark);
  line-height: 1.35;
  flex: 0 0 auto;
  margin: 0 0 4px;
}
.bin-who svg { width: 16px; height: 16px; }
.bin-acts {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.bin-acts .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
.empty {
  text-align: center;
  padding: 36px 16px;
  background: #fff8fa;
  border-radius: 20px;
  color: var(--ink);
  font-weight: 600;
}

.overlay {
  position: fixed; inset: 0; background: rgba(20, 14, 18, .4);
  opacity: 0; pointer-events: none; z-index: 40; transition: .2s;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 50;
  left: 50%; bottom: 0;
  width: min(640px, 100%);
  max-height: min(88dvh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  transform: translate(-50%, 12px);
  opacity: 0; pointer-events: none; transition: .2s;
}
.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.modal-h {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-h h3 { font-family: var(--display); color: var(--ink-dark); font-size: 1.1rem; line-height: 1.25; min-width: 0; overflow-wrap: break-word; }
.modal-h .icon-btn { margin: -4px -4px 0 0; }
.modal-b { padding: 16px 18px 22px; display: grid; gap: 16px; }
.modal-b > p { line-height: 1.45; }
.modal-f { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.modal-f .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }

.pin {
  display: grid;
  gap: 12px;
  width: min(280px, 100%);
  margin: 0 auto;
  outline: none;
  user-select: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.pin-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  font-size: 16px;
  caret-color: transparent;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.pin-input:focus,
.pin-input:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.pin-dots { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 18px; }
.pin-msg { min-height: 1.25em; text-align: center; }
.pin-msg .err { text-align: center; width: 100%; }
.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: transparent;
}
.pin-dot.is-on { background: var(--pink); border-color: var(--pink); }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(280px, 100%);
}
.pin-key {
  height: 64px;
  border-radius: 16px;
  background: #fff8fa;
  color: var(--ink-dark);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  border: 1.5px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.pin-key:focus,
.pin-key:focus-visible {
  outline: none;
  box-shadow: none;
}
.pin-key:active { background: var(--pink-bg); }
.pin-key-gap { visibility: hidden; pointer-events: none; border: 0; background: transparent; }
.pin-key-reset {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.pin-key-reset svg { width: 22px; height: 22px; }
.pin-key-reset:active { background: #fff8fa; }
.account-card .pin { padding-top: 4px; }

.more { position: relative; flex: 0 0 auto; }
.more-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 220px;
  display: grid;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.more-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 800;
  color: var(--ink-dark);
  text-align: left;
}
.more-list button:hover { background: var(--pink-bg); color: var(--pink); }
.more-list button svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
  flex: 0 0 auto;
}

.pick, [data-compose] { display: grid; gap: 10px; }
.compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.compose-head .kicker { margin: 0; }
.pick-box {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff8fa;
}
.flavors { display: flex; flex-wrap: wrap; gap: 8px; }
.compose-alt {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  border: 2px solid transparent;
}
.compose-alt:hover { background: #fff8fa; color: var(--ink-dark); }
.compose-alt.is-on {
  background: #fff;
  color: var(--ink-dark);
  border-color: var(--pink);
}
.bak-box {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: #fff8fa;
}
.mix-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mix-actions .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
[data-recipe] { display: grid; gap: 10px; }
.mix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
.mix-copy { min-width: 0; display: grid; gap: 4px; }
.mix-row strong {
  color: var(--ink-dark);
  font-size: 0.95rem;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: break-word;
}
.finish { gap: 18px; padding-bottom: 0; }
.modal-h .bin-who { margin-top: 4px; font-weight: 600; color: var(--ink); }
.time-units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.time-unit {
  display: grid;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff8fa;
  text-align: center;
}
.time-unit b {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.time-unit span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.time-unit.is-on {
  border-color: var(--pink);
  background: #fff;
}
.time-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.finish-list { display: grid; gap: 8px; }
.finish .mix-row { padding: 14px; border-radius: 16px; }
.finish .modal-f {
  position: sticky;
  bottom: 0;
  margin: 0 -18px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
}
.mix-row.is-on { border-color: var(--pink); }
.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.stepper-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-dark);
  display: grid;
  place-items: center;
}
.stepper-btn svg { width: 18px; height: 18px; }
.stepper-btn:hover { background: var(--pink-bg); color: var(--pink); }
.stepper-btn:disabled { opacity: .35; cursor: not-allowed; background: #fff; color: var(--ink); }
.stepper input {
  width: 64px;
  min-width: 64px;
  min-height: 40px;
  padding: 8px 4px;
  text-align: center;
  font-weight: 800;
  color: var(--ink-dark);
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { appearance: none; }

.list { display: grid; gap: 8px; }
.list + .btn,
.list + .add-row,
.list + form { margin-top: 14px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.row > div:first-child { min-width: 0; }
.row strong { color: var(--ink-dark); line-height: 1.3; overflow-wrap: break-word; }
.row .bin-meta { margin-top: 2px; }
.row.is-archived { opacity: .62; background: #fff8fa; }

.presets {
  display: grid;
  gap: 8px;
}
.preset {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-dark);
}
.preset strong { font-size: 0.95rem; line-height: 1.25; overflow-wrap: break-word; }
.preset-list {
  display: grid;
  gap: 2px;
}
.preset-list span {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-dark);
  overflow-wrap: break-word;
}
.preset:hover { background: var(--pink-bg); border-color: transparent; }
.preset.is-on {
  background: #fff;
  color: var(--ink-dark);
  border-color: var(--pink);
}
.row-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
.row-acts .icon-btn { width: 40px; height: 40px; }
.row-acts .icon-btn svg { width: 18px; height: 18px; }
.row-acts .btn { flex: 0 1 auto; }
.add-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; }
.add-row.color { grid-template-columns: minmax(0, 1fr) 52px; }
.add-row .btn { width: 100%; }

.stock-search { margin-bottom: 18px; }
.stock-load {
  display: grid;
  place-items: center;
  min-height: 240px;
}
.stock-load svg {
  width: 32px;
  height: 32px;
  color: var(--pink);
  animation: stock-spin .7s linear infinite;
}
@keyframes stock-spin { to { transform: rotate(360deg); } }
.stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, var(--card-max)));
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.stock-card {
  display: grid;
  width: 100%;
  max-width: var(--card-max);
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform .2s, box-shadow .2s;
  color: inherit;
}
.stock-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stock-card.is-out { opacity: .72; }
.stock-media {
  display: block;
  aspect-ratio: 1;
  background: var(--pink-bg);
  position: relative;
}
.stock-card:nth-child(even) .stock-media { background: var(--blue-bg); }
.stock-media img { width: 100%; height: 100%; object-fit: contain; }
.stock-oos {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #8d8490;
}
.stock-var {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--pink);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1.5px var(--pink), 0 6px 14px rgba(240, 85, 135, 0.16);
  pointer-events: none;
}
.stock-var svg { width: 16px; height: 16px; }
.stock-picks { display: grid; gap: 10px; }
.stock-pick {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.stock-pick:hover { background: var(--pink-bg); border-color: transparent; }
.stock-pick-attrs { display: grid; gap: 8px; }
.stock-attr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.stock-attr em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  min-width: 4.5rem;
}
.stock-pick-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.stock-pick-meta strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink-dark);
}
.stock-body { display: grid; gap: 3px; padding: 10px 10px 12px; }
.stock-body strong {
  font-size: 0.9rem;
  color: var(--ink-dark);
  line-height: 1.25;
  overflow-wrap: break-word;
}
.stock-body span { font-size: 0.72rem; color: var(--ink); font-weight: 600; }
.price { font-weight: 800; color: var(--pink); font-style: normal; }
.price s { color: #9aa3ad; font-weight: 600; margin-left: 6px; font-size: 0.86em; }

.account-card {
  display: grid;
  gap: 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}
.account-card h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink-dark);
  margin: 0;
}
.account-card > p { margin: 0; line-height: 1.45; }
.account-card .list + .btn,
.account-card .list + .add-row,
.account-card .list + form { margin-top: 0; }

.hist { display: grid; gap: 18px; }
.hist-day h3 {
  font-family: var(--display);
  color: var(--ink-dark);
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 8px;
}
.hist-item {
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  min-width: 0;
  position: relative;
  overflow: visible;
}
.hist-item:has(.more.is-on) { z-index: 5; }
.hist-item .bin-flavor { flex-wrap: wrap; font-weight: 600; }
.hist-item .bin-top { padding: 10px 4px 0 14px; }
.hist-item .bin-body { padding: 6px 14px 0; }
.hist-foot { padding: 10px 14px 12px; }

.maker-grid {
  display: grid;
  gap: 10px;
}
.maker-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.maker-card strong { color: var(--ink-dark); line-height: 1.3; overflow-wrap: break-word; }
.maker-table {
  display: grid;
  grid-template-columns: minmax(4.5rem, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 8px;
  align-items: baseline;
}
.maker-table .head {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.maker-table .lab {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.maker-table .delta { font-size: 1.05rem; }

.saver {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
.saver.is-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease;
}
.saver img {
  height: min(56vmin, 640px);
  width: auto;
}

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  background: var(--pink); color: #fff;
  padding: 12px 18px; border-radius: 999px;
  opacity: 0; z-index: 70; transition: .2s;
  pointer-events: none; font-weight: 700;
  box-shadow: 0 8px 22px rgba(240, 85, 135, 0.35);
  max-width: calc(100% - 24px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { text-align: center; padding: 40px 16px; font-weight: 700; }

@media (max-width: 420px) {
  :root { --pad: 12px; }
  .bar { min-height: 70px; gap: 6px; }
  .bar:has(.admin-badge) { min-height: 94px; }
  .brand img { height: 52px; }
  .switch button { width: 36px; height: 34px; }
  .icon-btn { width: 40px; height: 40px; }
  .login { padding: 20px 12px; }
  .login-card { padding: 22px 16px 18px; border-radius: 20px; }
  .page { padding: 16px 0 72px; }
  .page-head { margin-bottom: 16px; }
  .page-head .btn { width: 100%; justify-self: stretch; }
  .account-card { padding: 16px; }
  .bin-acts .btn { flex-basis: 100%; }
  .modal { max-height: min(92dvh, 100%); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-f .btn { flex-basis: 100%; }
}

@media (min-width: 520px) {
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .add-row .btn { width: auto; }
  .add-row.color { grid-template-columns: minmax(0, 1fr) 52px auto; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .row-acts { justify-content: flex-end; }
}

@media (min-width: 700px) {
  .switch button {
    display: inline-flex;
    width: auto;
    height: auto;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: nowrap;
  }
  .switch button svg { display: none; }
  .switch button span { display: inline; }
  .page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
  }
  .page-head .btn { width: auto; }
  .kanban {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 18px;
  }
  .kanban-col { min-height: 280px; }
  .kanban-col.is-queue { order: 1; }
  .kanban-col.is-run { order: 2; }
  .maker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar { min-height: 88px; }
  .bar:has(.admin-badge) { min-height: 114px; }
  .modal {
    top: 50%; bottom: auto;
    width: min(640px, calc(100% - 24px));
    border-radius: 22px;
    transform: translate(-50%, calc(-50% + 8px));
  }
  .modal.is-open { transform: translate(-50%, -50%); }
  .modal-f { justify-content: flex-end; }
  .modal-f .btn { flex: 0 1 auto; }
  .bin-acts .btn { flex: 0 1 auto; }
  .login-card { padding: 32px 28px 28px; }
}

@media (min-width: 760px) {
  .page-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); }
  .stock-grid { grid-template-columns: repeat(3, minmax(0, var(--card-max))); gap: 14px; }
}

@media (min-width: 980px) {
  :root { --pad: 28px; }
  .bar { min-height: 92px; }
  .bar:has(.admin-badge) { min-height: 120px; }
  .brand img { height: 80px; }
  .maker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-grid { grid-template-columns: repeat(4, minmax(0, var(--card-max))); gap: 16px; }
  .page { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .bin, .modal, .overlay, .toast, .stock-card, .saver.is-in { transition: none; }
  .stock-load svg { animation: none; }
}
