:root {
  --bg: #0f0e0c;
  --surface: #171613;
  --surface-2: #1f1d19;
  --surface-3: #27241f;
  --border: #2b2823;
  --border-strong: #3a362f;
  --text: #ede8df;
  --text-2: #b9b2a4;
  --muted: #8a8375;
  --accent: #e6a23c;
  --accent-strong: #f0b454;
  --accent-ink: #1a1206;
  --good: #7bc96f;
  --ok: #e6c84a;
  --risky: #e8955a;
  --bad: #e06c5c;

  --b-420: #7bc96f;
  --b-zodiac: #9b8cf6;
  --b-spacetea: #4fd1c5;
  --b-alfakher: #e07a5f;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font-body);
  --catalog-w: 360px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 18px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.muted { color: var(--muted); font-size: 13px; }
[hidden] { display: none !important; }

/* Background smoke: three soft blobs drifting slowly behind everything. */
.smoke { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.smoke i {
  position: absolute; display: block; border-radius: 50%;
  width: 70vmax; height: 70vmax; left: -20vmax; top: -10vmax;
  background: radial-gradient(closest-side, rgba(237, 232, 223, 0.11), rgba(237, 232, 223, 0.045) 45%, transparent 72%);
  animation: drift 48s ease-in-out infinite alternate;
  will-change: transform;
}
.smoke i:nth-child(2) {
  width: 60vmax; height: 60vmax; left: 45vw; top: 20vh;
  background: radial-gradient(closest-side, rgba(230, 162, 60, 0.075), rgba(230, 162, 60, 0.02) 50%, transparent 72%);
  animation-duration: 64s; animation-delay: -20s;
}
.smoke i:nth-child(3) {
  width: 55vmax; height: 55vmax; left: 20vw; top: 55vh;
  animation-duration: 56s; animation-delay: -40s; animation-direction: alternate-reverse;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(12vw, -8vh, 0) scale(1.12); }
  66%  { transform: translate3d(-6vw, 10vh, 0) scale(0.94); }
  100% { transform: translate3d(10vw, 6vh, 0) scale(1.06); }
}
.topbar, .layout, .cube-bar, .toast { position: relative; z-index: 1; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--accent);
  color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius-s); z-index: 100;
}
.skip:focus { left: 8px; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; height: 56px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 30px; width: auto; display: block; margin: -2px 0; }
.brand-tag { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.share-btn:hover { background: var(--surface-3); }
.share-btn svg { width: 18px; height: 18px; }

/* Share dialog */
.share {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-l); padding: 20px; width: min(92vw, 360px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.share::backdrop { background: rgba(0, 0, 0, .6); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.share-head h2 { font-size: 16px; }
.share-qr {
  background: #fff; border-radius: var(--radius-m); padding: 12px; display: grid; place-items: center;
  aspect-ratio: 1; width: 100%;
}
.share-qr svg { width: 100%; height: 100%; display: block; }
.share-hint { margin: 12px 0 10px; font-size: 13px; }
.share-link { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 8px 10px; margin-bottom: 12px; overflow-wrap: anywhere; }
.share-link code { font: 500 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions .btn { flex: 1; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.lang button {
  background: none; border: 0; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600;
  color: var(--muted); letter-spacing: 0.02em;
}
.lang button.is-active { background: var(--surface-3); color: var(--text); }
.tab {
  background: none; border: 0; padding: 6px 12px; border-radius: var(--radius-s);
  color: var(--text-2); font-weight: 500; white-space: nowrap;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.is-active { background: var(--surface-3); color: var(--text); }
.tab-mobile, .mobile-only { display: none; }
.count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--border-strong); font-size: 11px; line-height: 18px;
  text-align: center; color: var(--text-2);
}

/* Layout: one column */
.layout { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.view { display: none; }
.view.is-active { display: block; }

/* Picker under the cube */
.picker { display: flex; flex-direction: column; gap: 16px; }
.picker-title { font-size: 18px; }
#view-mixes { display: none; flex-direction: column; gap: 16px; }
#view-mixes.is-active { display: flex; }
.filters {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 14px;
}
.filter-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; }
.filter-label { color: var(--muted); font-size: 13px; }
.block-title { font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; }
.list-search { margin-bottom: 10px; }
.empty.small { padding: 8px 0; text-align: left; font-size: 13px; }
#thirdBlock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mix-search { margin-bottom: 16px; }

/* Search */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 0 10px; height: 38px; color: var(--muted);
}
.search:focus-within { border-color: var(--border-strong); color: var(--text-2); }
.search input {
  flex: 1; background: none; border: 0; color: var(--text); font: inherit; min-width: 0;
}
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); }
.search kbd {
  font: 500 11px/1 var(--font-body); color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 3px 5px;
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; font-size: 13px; color: var(--text-2); line-height: 1.4;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }

/* Flavor list */
.flavor-list { display: flex; flex-direction: column; gap: 4px; }
.flavor {
  width: 100%; text-align: left; border: 1px solid transparent; background: none;
  border-radius: var(--radius-m); padding: 8px 10px;
  display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center;
}
.flavor:hover { background: var(--surface); border-color: var(--border); }
.flavor.is-in-cube { background: var(--surface-2); border-color: var(--border-strong); }
.flavor-bar { width: 4px; height: 100%; min-height: 28px; border-radius: 2px; background: var(--brand-c, var(--muted)); }
.flavor-name { font-weight: 500; display: block; }
.flavor-meta { color: var(--muted); font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.flavor-meta .orig { color: var(--text-2); }
.flavor-add { color: var(--muted); font-size: 18px; line-height: 1; }
.flavor-score {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1;
  font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; white-space: nowrap;
}
.flavor-score.is-est { color: var(--text-2); font-weight: 600; }
.flavor-note { display: block; color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.flavor.is-mix { background: var(--surface); border-color: var(--border); }
.list-sub { font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 4px 4px; }
.list-sub.muted { font-weight: 400; }
.flavor-score.is-rated { color: var(--accent); }
.flavor.is-in-cube .flavor-add { color: var(--accent); }

.tagdots { display: inline-flex; gap: 3px; }
.tagdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); display: inline-block; }

/* Cube */
.cube {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 20px; margin-bottom: 24px;
}
.cube-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cube-actions { display: flex; gap: 8px; }

.slots { display: grid; grid-template-columns: repeat(var(--slots, 2), minmax(0, 1fr)); gap: 12px; }
.slot {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 14px; min-height: 120px; display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.slot.is-empty {
  border-style: dashed; align-items: center; justify-content: center; color: var(--muted);
  font-size: 13px; text-align: center;
}
.slot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.slot-brand { font-size: 12px; color: var(--brand-c, var(--muted)); font-weight: 500; }
.slot-name { font-weight: 600; font-family: var(--font-display); font-size: 15px; line-height: 1.3; }
.slot-remove {
  background: none; border: 0; color: var(--muted); width: 24px; height: 24px; border-radius: 6px;
  font-size: 18px; line-height: 1; flex: none;
}
.slot-remove:hover { background: var(--surface-3); color: var(--text); }
.slot-share {
  margin-top: auto; align-self: flex-end;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

.verdict {
  margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  min-height: 56px;
}
.verdict-hint { color: var(--muted); grid-column: 1 / -1; }
.score {
  display: flex; align-items: baseline; gap: 6px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1;
  color: var(--tone, var(--text));
}
.score small { font-size: 13px; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.verdict-text .label { font-weight: 600; color: var(--tone, var(--text)); }
.verdict-strength {
  margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px; vertical-align: middle;
}
.verdict-text .why { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* Suggestions */
.suggest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.suggest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sugg {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.sugg:hover { border-color: var(--border-strong); }
.sugg-name { font-weight: 500; }
.sugg-brand { font-size: 12px; color: var(--brand-c, var(--muted)); }
.sugg-why { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
.sugg-btn > .sugg-why:last-of-type { padding-right: 32px; }
.sugg-score {
  grid-row: 1 / 3; font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--tone); text-align: right;
}
/* Whole-card buttons */
.sugg-btn {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  position: relative; padding-right: 14px; padding-bottom: 14px;
  transition: border-color .12s, background-color .12s, transform .12s;
}
.sugg-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.sugg-btn:active { transform: scale(0.995); }
.sugg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sugg-cta {
  position: absolute; right: 10px; bottom: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  color: var(--text-2); font-size: 16px; line-height: 1; font-weight: 600;
  transition: background-color .12s, color .12s, border-color .12s;
}
.sugg-btn:hover .sugg-cta { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sugg-btn .mix-ratings { padding-right: 32px; }

/* Picker */
.pick {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 20px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px;
}
.pick h2 { font-size: 18px; }
.pick-row { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 12px; }
.pick-label { color: var(--muted); font-size: 13px; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 3px; gap: 3px;
}
.seg button {
  background: none; border: 0; border-radius: 8px; padding: 8px 10px; min-height: 40px;
  color: var(--text-2); font-weight: 500; font-size: 14px;
}
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.pick-results-title { margin-bottom: 12px; }
.sugg-badge {
  font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px;
  margin-left: 6px; vertical-align: middle; white-space: nowrap;
}
.sugg-parts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--text-2); }
.sugg-parts span b { color: var(--text); font-weight: 500; }

/* Filters: search + toggle on one row, strength/taste collapsible */
.filters-top { display: flex; gap: 8px; align-items: center; }
.filters-top .search { flex: 1; }

/* Compact mix cards */
.mix-cards { display: flex; flex-direction: column; gap: 8px; }
.mix-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  display: flex; flex-direction: column; position: relative;
}
.mix-card:hover { border-color: var(--border-strong); }
.mix-main {
  width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; border-radius: var(--radius-m);
}
.mix-main:hover { background: var(--surface-2); }
.mix-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 28px; }
.mix-meta { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.mix-head .mix-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.mix-rate { font-family: var(--font-display); font-weight: 700; color: var(--accent); white-space: nowrap; font-size: 15px; }
.mix-rate.is-none { color: var(--muted); font-weight: 500; font-size: 12px; }
.mix-order { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.mix-order span { overflow-wrap: anywhere; }
.mix-order .pct { white-space: nowrap; }
.mix-order b { color: var(--text); font-weight: 500; }
.mix-order .pct { color: var(--accent); font-weight: 600; }
.icon-btn {
  background: none; border: 0; color: var(--muted); border-radius: 6px; padding: 6px 8px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.fav-btn { font-size: 16px; line-height: 1; position: absolute; top: 6px; right: 6px; padding: 6px; }
.mix-card.is-recommended .fav-btn { top: 26px; }
.fav-btn.is-on { color: var(--accent); }
.mix-main .mix-note { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* Shokurymo recommends: a warm edge, an ember, a quiet glow */
.mix-card.is-recommended {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 1px rgba(230, 162, 60, .18), 0 10px 30px rgba(230, 162, 60, .10);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 70%);
}
.mix-reco {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.mix-reco-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px 2px rgba(230, 162, 60, .55);
  animation: ember 2.8s ease-in-out infinite;
}
@keyframes ember {
  0%, 100% { box-shadow: 0 0 6px 2px rgba(230, 162, 60, .55); }
  50% { box-shadow: 0 0 10px 4px rgba(230, 162, 60, .85); }
}
.flavor.is-recommended {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 60%);
}
.flavor-reco {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent);
}
@media (prefers-reduced-motion: reduce) { .mix-reco-dot { animation: none; } }

/* Mobile cube bar */
.cube-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius-m);
  padding: 10px 12px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.cube-bar b { color: var(--accent); }

/* Mixes */
.mixes-head { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.mixes-head h2 { margin-right: auto; }
.mix-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mix {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.mix-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mix-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.mix-source { font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.mix-parts { display: flex; flex-direction: column; gap: 4px; }
.mix-part { display: grid; grid-template-columns: 4px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.mix-part .bar { width: 4px; height: 18px; border-radius: 2px; background: var(--brand-c, var(--muted)); }
.mix-part .pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.mix-part .brand { color: var(--muted); font-size: 12px; margin-left: 4px; }
.mix-note { color: var(--text-2); font-size: 13px; }
.mix-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.mix-score { font-size: 13px; color: var(--muted); }
.mix-score b { color: var(--tone, var(--text)); }
.mix-actions { display: flex; gap: 6px; }

.mix-ratings { display: flex; flex-direction: column; gap: 4px; grid-column: 1 / -1; }
.mix-rating { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.mix-rating-by { color: var(--muted); white-space: nowrap; }
.mix-rating-score { font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-rating-note { color: var(--text-2); }

.stars { display: inline-flex; gap: 2px; }
.stars button {
  background: none; border: 0; padding: 0 1px; color: var(--border-strong); font-size: 18px; line-height: 1;
}
.stars button.is-on { color: var(--accent); }
.stars button:hover { color: var(--accent-strong); }
.stars-label { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* Buttons */
.btn {
  border-radius: var(--radius-s); padding: 7px 12px; font-weight: 500; font-size: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 4px 9px; font-size: 13px; }

.empty { color: var(--muted); padding: 24px 0; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-m); font-size: 14px; opacity: 0;
  pointer-events: none; transition: opacity .18s, transform .18s; z-index: 50;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 900px) {
  .layout { padding: 16px 16px 48px; }
  .tab-mobile { display: inline-block; }
  .mobile-only { display: inline-flex; }
  .chip { padding: 7px 12px; white-space: nowrap; }
  /* Brand chips: two rows that scroll sideways together */
  #brandChips, #mBrandChips {
    display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; gap: 6px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -14px; padding: 2px 14px; scrollbar-width: none; justify-content: start;
  }
  #brandChips::-webkit-scrollbar, #mBrandChips::-webkit-scrollbar { display: none; }
  .flavor { padding: 10px 10px; }
  .filter-row { grid-template-columns: 1fr; gap: 6px; }

  .slots { grid-template-columns: 1fr; }
  .slot.is-empty { min-height: 64px; }
  .topbar { padding: 0 16px; }
  .brand-tag { display: none; }
  .topbar-right { margin-left: auto; }
  /* Tabs: a compact pill floating at the bottom centre, always visible; the list scrolls under it */
  .layout { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabs {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
    background: color-mix(in srgb, var(--surface-3) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  }
  .tab { border-radius: 999px; padding: 8px 18px; font-size: 14px; text-align: center; min-width: 84px; }
  .tab.is-active { background: var(--accent); color: var(--accent-ink); }
  .toast { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .seg button { min-height: 44px; font-size: 13px; padding: 8px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
  .smoke i { animation: none; }
}

/* Language switch hidden for now (Ukrainian is the default; EN stays reachable via localStorage) */
.lang { display: none; }
