@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #ffffff; --bg2: #f8fbf5; --surface: rgba(255, 255, 255, .9); --surface-solid: #ffffff;
  --line: #e3e9cb; --line-strong: #b4d089;
  --ink: #20261a; --muted: #6a7462; --accent: #6f9f4a; --accent-ink: #305318;
  --tone1: #96cc76; --tone2: #6f9f4a; --tone3: #416b28;
  --btn: linear-gradient(135deg, #c7dd4a, #96cc76); --btn-hover: linear-gradient(135deg, #d3e66b, #a7d68a);
  --chip: #f4f9ef; --glow: rgba(111, 159, 74, .22); --danger: #b42318;
  --tile-a: #ffffff; --tile-b: #f3f8ef; --aurora1: rgba(177, 212, 128, .17); --aurora2: rgba(215, 231, 164, .15);
  --rose: #e2a792; --white: #dfe2e6; --yellow: #e0b65a;
  --shadow: 0 14px 34px -22px rgba(50, 80, 31, .28);
  --serif: Outfit, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: Manrope, system-ui, -apple-system, "Segoe UI", "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent !important; }
*::before, *::after { -webkit-tap-highlight-color: transparent !important; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent !important; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans); overflow-x: hidden; transition: background .6s var(--ease), color .6s var(--ease);
  -webkit-tap-highlight-color: transparent !important;
}
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--th-gold-tint-2, #d4e57a); color: var(--ink); }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); }
.aurora i:nth-child(1) { width: 60vw; height: 60vw; left: -18vw; top: -26vw; background: var(--aurora1); animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 50vw; height: 50vw; right: -20vw; top: 8vh; background: var(--aurora2); animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40vw; height: 40vw; left: 30vw; bottom: -30vw; background: var(--aurora1); animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(12vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-14vw, 16vh) scale(.9); } }
#sparkles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--tone3), var(--tone1), var(--tone2)); box-shadow: 0 0 12px var(--glow); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.brand b { font: 500 17px/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; }
.brand small { display: block; font-size: 10px; letter-spacing: .32em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), border-color .3s;
}
.icon-btn:hover { transform: rotate(25deg) scale(1.06); border-color: var(--line-strong); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 28px 80px; }
@media (max-width: 560px) { .wrap { padding: 0 16px 80px; } }
.hero { text-align: center; padding: 64px 0 34px; transition: padding .8s var(--ease); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--tone2); opacity: 0; animation: up .9s var(--ease) .1s forwards;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--tone2)); }
.eyebrow::after { transform: scaleX(-1); }
.hero h1 {
  font: 300 clamp(38px, 6vw, 72px)/1.05 var(--serif); margin: 18px auto 14px; max-width: 900px; letter-spacing: -.03em;
  opacity: 0; animation: up 1s var(--ease) .2s forwards; transition: font-size .8s var(--ease), margin .8s var(--ease);
}
.hero h1 em {
  font-style: normal; font-weight: 500; background: linear-gradient(100deg, var(--tone3) 0%, var(--tone1) 25%, var(--tone2) 45%, var(--tone1) 60%, var(--tone3) 80%, var(--tone1) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }
.hero p.lead { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 16.5px; opacity: 0; animation: up 1s var(--ease) .35s forwards; transition: opacity .5s, max-height .8s var(--ease), margin .8s; max-height: 80px; }
.langs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.langs span { color: var(--ink); font-weight: 600; }
@keyframes up { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

body.searched .hero { padding: 18px 0 18px; }
body.searched .hero h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 8px auto 0; }
body.searched .hero p.lead, body.searched .eyebrow { max-height: 0; opacity: 0 !important; margin: 0; overflow: hidden; animation: none; }
body.searched .eyebrow { display: none; }

/* ---------- search ---------- */
.search {
  position: relative; display: flex; gap: 10px; align-items: flex-end; max-width: 860px; margin: 0 auto;
  padding: 8px 8px 8px 22px; border-radius: 22px; background: var(--surface); backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; animation: up 1s var(--ease) .5s forwards; transition: box-shadow .5s, transform .5s var(--ease);
}
.search::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--tone3) 68%, var(--tone1) 76%, var(--tone2) 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rot 7s linear infinite; opacity: .55; transition: opacity .4s;
}
.search:focus-within { box-shadow: var(--shadow), 0 0 0 6px var(--chip), 0 0 60px -10px var(--glow); transform: translateY(-2px); }
.search:focus-within::before, .search.busy::before { opacity: 1; }
.search.busy::before { animation-duration: 1.1s; }
.search.shake { opacity: 1; animation: shake .5s; }
@keyframes rot { to { --ang: 360deg; } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.search textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 160px; padding: 13px 4px; border: 0; outline: 0;
  background: transparent; color: var(--ink); font: 500 17px/1.45 var(--sans);
}
.search textarea::placeholder { color: var(--muted); opacity: .85; }

/* suggestions while typing, like a search engine's: the collection's words + your own history */
.search { z-index: 25; }   /* the list drops over the content below: above the type / metal picks (20), under the top bar (30) */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; margin: 0; padding: 6px 0; list-style: none;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 20px; text-align: left;
  box-shadow: 0 26px 50px -26px rgba(50, 80, 31, .38); animation: pop .22s var(--ease);
}
.sg {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 6px 14px 6px 20px;
  cursor: pointer; font: 400 15px/1.35 var(--sans); color: var(--ink);
}
.sg::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tone2); opacity: 0; }
.sg:hover, .sg[aria-selected="true"] { background: var(--chip); }
.sg[aria-selected="true"]::before { opacity: 1; }
.sg > svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.sg .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg .t b { font-weight: 700; }
.sg .n { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sg .del { flex: none; border: 0; background: none; padding: 4px 8px; border-radius: 8px; font: 600 12px var(--sans); color: var(--muted); }
.sg .del:hover { color: var(--danger); background: var(--surface-solid); }
@media (hover: hover) { .sg .del { opacity: 0; } .sg:hover .del, .sg[aria-selected="true"] .del { opacity: 1; } }
.sg-label { padding: 8px 20px 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .suggest { border-radius: 16px; } .sg { gap: 12px; padding-left: 16px; font-size: 14.5px; } }
button { font: inherit; cursor: pointer; color: var(--ink); }
button:focus-visible, select:focus-visible, .card:focus-visible, a:focus-visible { outline: 2px solid var(--tone2); outline-offset: 3px; }
.primary {
  position: relative; overflow: hidden; border: 0; border-radius: 16px; padding: 0 28px; height: 50px; flex: none;
  font-weight: 700; letter-spacing: .06em; color: var(--btn-ink, #1d2f10);
  background: var(--btn); background-size: 180% 180%; border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .35s var(--ease), box-shadow .35s, background-position .6s;
  display: inline-flex; align-items: center; gap: 8px;
}
.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(var(--th-sheen-rgb, 255, 255, 255), .6), transparent); animation: sheen 4.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.primary:hover { transform: translateY(-2px); background: var(--btn-hover); box-shadow: 0 14px 28px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .8); color: var(--btn-ink, #1d2f10); }
.primary:active { transform: translateY(0) scale(.97); }
.primary:disabled { cursor: progress; }
.primary svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.primary:hover svg { transform: translateX(3px); }
.ripple { position: absolute; border-radius: 50%; background: rgba(var(--th-sheen-rgb, 255, 255, 255), .55); transform: scale(0); animation: ripple .7s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 0; max-width: 900px; transition: opacity .5s, max-height .7s var(--ease), margin .7s; max-height: 200px; }
.examples button {
  border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(8px); font-size: 13px; padding: 7px 14px;
  border-radius: 999px; color: var(--ink); opacity: 0; animation: up .7s var(--ease) forwards; animation-delay: calc(.65s + var(--i) * 70ms);
  transition: transform .35s var(--ease), border-color .3s, background .3s, color .3s;
}
.examples button:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--chip); color: var(--tone2); }
.examples button { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; }
.examples button .ex-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.examples button svg { width: 14px; height: 14px; flex: none; color: var(--tone2); }
.examples .ex-label { flex-basis: 100%; text-align: center; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); opacity: 0; animation: up .7s var(--ease) .6s forwards; }
body.searched .examples { max-height: 0; opacity: 0; margin: 0; overflow: hidden; pointer-events: none; }

.offline-note { max-width: 860px; margin: 14px auto 0; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--chip); color: var(--accent-ink); font-size: 13px; text-align: center; }

/* ---------- AI search / Manual search ---------- */
.modes { display: flex; justify-content: center; margin: 0 auto 14px; }
.modes .seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(12px); opacity: 0; animation: up 1s var(--ease) .45s forwards; }
.modes button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; border-radius: 999px;
  padding: 8px 16px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; transition: background .3s, color .3s; }
.modes button svg { width: 15px; height: 15px; flex: none; }
.modes button:hover { color: var(--accent-ink); }
.modes button[aria-selected="true"] { background: var(--btn); color: var(--btn-ink, #1d2f10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
body.manual #form, body.manual .browse-row, body.manual #examples { display: none !important; }
.manual-panel { max-width: 860px; margin: 0 auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); animation: up .6s var(--ease) both; }
.m-bar { padding: 14px 22px 0; }
.m-tip { font-size: 12px; color: var(--muted); }
.m-tip b { color: var(--ink); font-weight: 600; }
.m-groups { padding: 14px 22px 10px; min-height: 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px 16px; }
/* one field: label + trigger + list. The single 0-min column means a long summary can never push the field past its cell */
.md { position: relative; min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.md.open { z-index: 31; }
.md-label { font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-btn { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; height: 42px; padding: 0 12px 0 14px; overflow: hidden;
  text-align: left; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--th-paper, var(--surface-solid)); color: var(--ink); font: 500 13.5px var(--sans);
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
.md-btn:hover { border-color: var(--gold-line, var(--line-strong)); }
.md-btn:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint, transparent); }
.md.open .md-btn { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint, transparent); }
.md.has .md-btn { border-color: var(--gold-line, var(--line-strong)); background: color-mix(in srgb, var(--gold-tint, transparent) 45%, var(--th-paper, var(--surface-solid))); }
.md.has.open .md-btn, .md.has .md-btn:hover { border-color: var(--gold); }
.md-btn .md-val { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-btn .md-val.any { color: var(--muted); }
.md-btn .md-val s { color: var(--danger); text-decoration: none; }
.md-btn .md-cnt { flex: none; font: 700 11px var(--sans); font-variant-numeric: tabular-nums; min-width: 22px; height: 20px; line-height: 20px; text-align: center; padding: 0 7px;
  border-radius: 999px; background: var(--gold); color: var(--th-on-fill, #fff); }
.md-btn svg { width: 11px; height: 11px; flex: none; color: var(--muted); transition: transform .2s; }
.md.open .md-btn svg { transform: rotate(180deg); color: var(--gold); }
/* the open list: exactly the field's width, floating over the fields below */
.md-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); box-sizing: border-box; max-height: 340px; overflow: auto; overscroll-behavior: contain; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--th-paper, var(--surface-solid));
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .35), 0 2px 8px -2px rgba(0, 0, 0, .12); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  animation: md-in .16s cubic-bezier(.23, 1, .32, 1); transform-origin: top center; }
@keyframes md-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .md-panel { animation: none; } }
.md-panel[hidden] { display: none; }
.md-top { position: sticky; top: -6px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -6px 4px; padding: 9px 14px 8px;
  border-bottom: 1px solid var(--line); background: var(--th-paper, var(--surface-solid)); font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.md-top button { border: 0; background: transparent; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; font: 600 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--gold); cursor: pointer; }
.md-top button:hover { text-decoration: underline; text-underline-offset: 3px; }
.md-row { position: relative; display: flex; align-items: center; border-radius: 9px; transition: background-color .12s; }
.md-row + .md-row { margin-top: 1px; }
.md-row:hover { background: var(--bg2, var(--chip)); }
.md-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 36px; border: 0; border-radius: 9px; background: transparent; padding: 7px 10px; cursor: pointer;
  font: 500 13.5px var(--sans); color: var(--ink); text-align: left; }
.md-main:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.md-main:disabled { opacity: .38; cursor: not-allowed; }
.md-box { flex: none; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; transition: background-color .12s, border-color .12s; }
.md-row:hover .md-box { border-color: var(--gold-line, var(--line-strong)); }
.md-row[aria-selected="true"] .md-box { background: var(--gold, #71a54e); border-color: var(--gold, #71a54e); }
.md-row[aria-selected="true"] .md-box::after { content: ""; width: 8px; height: 4px; border: solid var(--th-on-fill, #fff); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.md-row[aria-selected="true"] .md-lab { font-weight: 600; color: var(--ink); }
.md-lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-n { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* "Leave out" sits over the count on hover, so labels keep the full width */
.md-av { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 1px solid var(--line-strong); background: var(--th-paper, var(--surface-solid)); border-radius: 999px;
  padding: 3px 10px; font: 600 11.5px var(--sans); color: var(--muted); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .12s, color .12s, border-color .12s; }
.md-row:hover .md-av, .md-row:focus-within .md-av, .md-row[data-avoided="true"] .md-av { opacity: 1; pointer-events: auto; }
.md-row:has(.md-av):hover .md-n, .md-row:has(.md-av):focus-within .md-n { visibility: hidden; }
.md-av:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.md-row[data-avoided="true"] .md-av { color: var(--danger); }
.md-row[data-avoided="true"] .md-lab { color: var(--danger); text-decoration: line-through; }
@media (hover: none) { .md-av { position: static; transform: none; opacity: 1; pointer-events: auto; margin-right: 6px; flex: none; } .md-row:has(.md-av) .md-n { visibility: visible; } }
/* small screens: a tick fills and its check pops in place, instead of the whole open list fading in again */
@media (max-width: 560px) {
  .md-panel.md-stay { animation: none; }
  .md-box { transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.23, 1, .32, 1); }
  .md-box::after { content: ""; width: 8px; height: 4px; border: solid var(--th-on-fill, #fff); border-width: 0 0 2px 2px; opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px) scale(.3); transition: transform .24s cubic-bezier(.34, 1.56, .64, 1), opacity .14s ease; }
  .md-row[aria-selected="true"] .md-box::after { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); }
  .md-main:active .md-box { transform: scale(.88); }
  .md-lab { transition: color .2s ease; }
}
@media (max-width: 560px) and (prefers-reduced-motion: reduce) { .md-box, .md-box::after, .md-lab { transition: none; } }
.md-hint { padding: 6px 10px 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.md-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 10px 6px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.md-custom input { width: 72px; height: 32px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--th-paper, #fff); color: var(--ink); padding: 0 8px; font: 500 13px var(--sans); }
.md-custom input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint, transparent); }
.md-group-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 4px; font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.md-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 22px 12px; font-size: 11.5px; color: var(--muted); }
.m-legend .ai { width: 10px; height: 10px; color: var(--tone2); vertical-align: -1px; }
.m-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 22px;
  border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; background: color-mix(in srgb, var(--surface-solid) 94%, transparent); backdrop-filter: blur(12px); }
.m-read { flex: 1 1 260px; min-width: 0; font-size: 13px; color: var(--muted); }
.m-read q { color: var(--ink); font-weight: 600; }
.m-read .m-q { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.5; }
.m-read .linkish { color: var(--tone2); padding: 2px 4px; }
.m-read .linkish:hover { color: var(--accent-ink); }
.m-read .m-q + .linkish { margin: 2px 0 0 -4px; }
.m-warn { display: block; margin-top: 4px; color: var(--danger); font-size: 12.5px; }
.m-foot .primary { flex: none; }
.m-foot .primary .m-n { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(var(--th-paper-rgb, 255, 255, 255), .6); }
.m-foot .primary:disabled { cursor: not-allowed; opacity: .55; transform: none; }
@media (max-width: 560px) {
  .m-bar { padding: 12px 16px 0; } .m-groups { padding: 10px 16px 6px; grid-template-columns: minmax(0, 1fr); } .m-legend { padding: 0 16px 12px; }
  .md-panel { max-height: 260px; }
  .m-foot { gap: 6px 10px; padding: 10px 16px; }
  .m-read { flex-basis: 100%; font-size: 12px; line-height: 1.4; }
  .m-foot .primary { flex: 1; justify-content: center; height: 44px; }
}

/* ---------- "Browse all categories": the collection without a prompt ---------- */
.browse-row { display: flex; justify-content: center; margin-top: 14px; }
.browse-btn { background: var(--surface); backdrop-filter: blur(8px); }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 18px; min-width: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden; text-align: center; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s;
}
.cat-tile:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow), 0 30px 60px -30px var(--glow); }
.cat-tile .img { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 10px; background: var(--th-paper, #fff); }
.cat-tile img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--ease), opacity .35s; pointer-events: none; }
.cat-tile:hover img { transform: scale(1.07); }
.cat-tile .name { font: 500 21px/1.2 var(--serif); letter-spacing: -.01em; }
.cat-tile .count { font-size: 12.5px; color: var(--muted); }
.cat-tile .go { margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent-ink); }

/* ---------- designs from other brands (listed by the team at /brand-import) ---------- */
/* brand photos fill the same square as a shop grid would, so every brand card has one height */
.card.bcard .img { background: var(--th-paper-2, #f5f5f4); }
.card.bcard .img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.bcard .img .from-badge { position: absolute; z-index: 2; left: 10px; top: 10px; max-width: calc(100% - 66px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; color: var(--accent-ink);
  background: rgba(var(--th-paper-rgb, 255, 255, 255), .88); border: 0; border-left: 2px solid var(--accent); padding: 2px 7px; border-radius: 3px;
  pointer-events: none; user-select: none; cursor: default; }
/* a brand design found by a search: its match label first, the brand under it */
.bcard .img .match ~ .from-badge { top: 42px; }
.bcard .img .new-badge { position: absolute; z-index: 2; right: 10px; bottom: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--th-on-fill, #fff);
  background: var(--tone2); padding: 3px 10px; border-radius: 999px; box-shadow: 0 6px 14px -6px var(--glow); }
.bcard.is-new .tilt { border-color: var(--tone2); box-shadow: 0 0 0 2px var(--tone2), 0 24px 50px -24px var(--glow); }
.bprices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bprices:has(> :only-child) { grid-template-columns: 1fr; }
.bprices div { border: 1px solid var(--line); border-radius: 12px; padding: 6px 9px; min-width: 0; }
.bprices span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bprices b { font: 500 15px/1.3 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.bprices > div:only-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px; }
.bprices > div:only-child span { font-size: 11px; font-weight: 600; }
.bprices > div:only-child b { font-size: 15px; }
.bprices .ours { border-color: var(--tone2); background: linear-gradient(160deg, var(--th-paper-2, #f7fcf3), var(--chip)); }
.bprices .ours b { color: var(--accent-ink); }
.bbtns { display: grid; gap: 6px; margin-top: auto; }
.seller-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--th-paper, #fff); color: var(--ink); text-decoration: none; font: 700 12.5px var(--sans); letter-spacing: .03em; white-space: nowrap; transition: background .3s, border-color .3s; }
.seller-btn:hover { background: var(--chip); border-color: var(--line-strong); }
.cat-tile.brands .name::after { content: " ↗"; font-size: .7em; color: var(--tone2); }

/* ---------- interpretation ---------- */
.understood {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; margin: 26px 0 4px; font-size: 13.5px; color: var(--muted); min-height: 36px;
}
.understood > * { animation: pop .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.9); } }
.ai-label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--tone2); margin-right: 4px; }
.ai-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone2); box-shadow: 0 0 0 0 var(--glow); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ai-label.smart {
  font-weight: 700; background: linear-gradient(100deg, var(--tone3), var(--tone1) 40%, var(--tone2) 60%, var(--tone3));
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite;
}
.understood .tag { background: var(--chip); border: 1px solid var(--line); color: var(--ink); padding: 5px 12px; border-radius: 999px; }
.understood .tag.neg { text-decoration: line-through; text-decoration-color: var(--danger); opacity: .8; }
.understood .fix { font-style: italic; }
.understood .read { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--ink); background: var(--surface); }
.understood .read b { font-weight: 600; color: var(--tone2); }
.pick { position: relative; z-index: 20; }
.pick.open { z-index: 60; }
.pick-btn {
  display: inline-flex; align-items: center; gap: 10px; font: 600 13.5px var(--sans); color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px 6px 14px;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.pick-btn:hover, .pick.open .pick-btn { box-shadow: 0 0 0 4px var(--chip); background: var(--surface-solid); }
.pick-btn svg { width: 10px; height: 6px; color: var(--tone2); transition: transform .35s var(--ease); }
.pick.open .pick-btn svg { transform: rotate(180deg); }
.pick-list {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 24px 50px -20px rgba(50, 80, 31, .35); transform-origin: 20% 0; animation: pickIn .28s var(--ease);
}
@keyframes pickIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.pick-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px;
  font: 500 13.5px var(--sans); color: var(--ink); cursor: pointer; outline: none; transition: background .2s, color .2s;
}
.pick-list li:hover, .pick-list li:focus { background: var(--chip); color: var(--accent-ink); }
.pick-list li[aria-selected="true"] { font-weight: 700; color: var(--btn-ink, #1d2f10); background: var(--btn); }
.pick-list li .tick { width: 14px; height: 14px; color: var(--tone2); opacity: 0; }
.pick-list li[aria-selected="true"] .tick { opacity: 1; }
.pick-list li.any { color: var(--muted); }
.pick-list li.any + li { margin-top: 5px; position: relative; }
.pick-list li.any + li::before { content: ""; position: absolute; left: 10px; right: 10px; top: -3px; height: 1px; background: var(--line); }
.understood.thinking { color: var(--muted); }
.dots i { display: inline-block; width: 5px; height: 5px; margin: 0 2px; border-radius: 50%; background: var(--tone2); animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 40% { transform: translateY(-6px); opacity: .5; } }

.statline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 13.5px; color: var(--muted); margin: 6px 0 0; min-height: 22px; }
.statline b { font: 500 20px/1 var(--serif); color: var(--tone2); font-variant-numeric: tabular-nums; }
.statline.error { color: var(--danger); }
.statline .note { color: var(--ink); opacity: .85; }

.banner {
  display: flex; align-items: center; gap: 16px; margin: 20px 0 4px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(12px); animation: pop .6s var(--ease);
}
.banner img { width: 60px; height: 60px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, var(--tile-a), var(--tile-b)); object-fit: contain; padding: 4px; box-shadow: 0 0 0 2px var(--tone2); }
.banner strong { font: 500 18px var(--serif); color: var(--tone2); }
.banner .sub { font-size: 13px; color: var(--muted); }
.banner .grow { flex: 1; }
.ghost {
  border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600;
  transition: background .3s, color .3s, transform .35s var(--ease);
}
.ghost svg { width: 16px; height: 16px; flex: none; color: var(--tone2); }
button.ghost:has(svg) { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-ink); }
.info .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cta-sticky { display: contents; }
.cta-sticky .cta-short { display: none; }
.ghost.bomq { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-ink); text-decoration: none; }
.info .est-btn { margin-top: 10px; }   /* sits under the Metal picker: the estimate is for the metal chosen there */
.info .est-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); max-width: 46ch; }
/* Design detail dialog only: the buttons sit in labeled sections (Price, Buy & try on, Explore), each a grid of equal-size, equal-weight buttons.
   On phones the buy / try-on pair keeps its filled look in the pinned bottom bar (see the max-width: 640px block). */
dialog#dlg .d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
dialog#dlg .d-grid :is(.ghost, .primary) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-width: 0; height: 42px; margin: 0; padding: 0 14px; text-decoration: none; }
dialog#dlg .d-grid :is(.ghost, .primary) span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
dialog#dlg .d-grid .ghost { color: var(--accent-ink); }
dialog#dlg .d-grid .ghost svg { color: var(--tone2); }
@media (min-width: 641px) {
  dialog#dlg .d-grid .primary { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--th-paper, #fff); color: var(--accent-ink); font: 600 13.5px var(--sans); }
  dialog#dlg .d-grid .primary svg { color: var(--tone2); transform: none; }
  dialog#dlg .d-grid .primary:hover { background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); }
}
body.staff dialog#dlg .d-sec-buy { display: none; }   /* staff have no buy / try-on buttons (see .staff-tools), so the section would be empty */
.ghost:hover { background: var(--btn-hover); color: var(--btn-ink, #1d2f10); transform: translateY(-2px); }

/* ---------- grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 20px; margin-top: 22px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { min-width: 0; cursor: pointer; outline: none; border-radius: 22px; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(34px) scale(.96); filter: blur(8px); } }
.tilt {
  position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease), border-color .4s, box-shadow .5s; will-change: transform;
}
.card:hover .tilt { transition: transform .12s linear, border-color .4s, box-shadow .5s; border-color: var(--line-strong); box-shadow: var(--shadow), 0 30px 60px -30px var(--glow); }
.card:focus-visible .tilt { border-color: var(--tone2); }
.tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; 
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(239, 246, 212, .5), transparent 45%);
}
.card:hover .tilt::after { opacity: 1; }
/* catalogue pictures are the dataset's own renders, unchanged (2600 px PNG): shown whole on white,
   scaled only by the browser to fit, and faded in once fully loaded instead of painting top to bottom */
.card .img {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: var(--th-paper, #fff);
}
.card .img img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none;
  transition: transform .8s var(--ease), opacity .35s, filter .35s;
}
.card .img img:not(.ready), .cat-tile img:not(.ready) { opacity: 0; }
.card:hover .img img { transform: scale(1.04); }
.card .img img.swap { opacity: 0; filter: blur(6px); transform: scale(.94); }
.card .body { position: relative; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .id { font: 500 17px/1.25 var(--serif); letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.card .sub { display: none !important; }
.card .tags, .card .shares, .card .row { display: none !important; }
.card .buy-btn { margin-top: auto; }
.more-like {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink); transition: all .35s var(--ease); white-space: nowrap;
}
.more-like svg { width: 13px; height: 13px; transition: transform .5s var(--ease); pointer-events: none; }
.more-like:hover { border-color: var(--tone2); color: var(--tone2); }
.more-like:hover svg { transform: rotate(180deg); }
.card .row-btns { display: flex; gap: 5px; }
.more-like.web-like { padding: 6px 10px; }
.more-like.web-like:hover svg { transform: none; }

/* "Proceed to buy": opens the design's buy page (gold weight, stones, size) */
.buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--btn); color: var(--btn-ink, #1d2f10); text-decoration: none;
  font: 700 13px var(--sans); letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 8px 18px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .35s var(--ease), box-shadow .35s, background .3s;
}
.buy-btn:hover { transform: translateY(-2px); background: var(--btn-hover); box-shadow: 0 14px 26px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .8); color: var(--btn-ink, #1d2f10); }
.buy-btn svg, a.primary svg { width: 16px; height: 16px; flex: none; pointer-events: none; }
a.primary { text-decoration: none; }

/* "Try on" (on the user's own saved photo) and "Live" (camera) chips on the card image */
.chips { position: absolute; z-index: 3; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tryon-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); color: var(--accent-ink); border-radius: 999px;
  padding: 6px 12px 6px 10px; font: 700 12px var(--sans); box-shadow: 0 6px 16px -8px rgba(50, 80, 31, .45);
  backdrop-filter: blur(6px); transition: transform .35s var(--ease), background .3s;
}
.tryon-chip:hover { transform: translateY(-2px); background: var(--btn-hover); color: var(--btn-ink, #1d2f10); }
.tryon-chip svg { width: 14px; height: 14px; pointer-events: none; }
.try .stage { aspect-ratio: var(--ar, 3 / 4); max-height: calc(100vh - 34px); }
.try a.ghost { color: var(--accent-ink); display: inline-flex; align-items: center; }
.try .info a:not(.ghost):not(.primary) { color: var(--accent); }
.try .stage img, .try .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: none; cursor: default; }
.try .stage .busy { position: absolute; inset: 0; display: grid; place-items: center; color: #d4e57a; font-weight: 600; background: rgba(0, 0, 0, .35); }
.try .actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* "On phone": QR code of this page or of the design being tried on */
dialog.phone { width: min(400px, calc(100vw - 24px)); }
.phone-card { position: relative; padding: 26px 24px 22px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.phone-card h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .24em; color: var(--tone2); margin: 0; font-weight: 700; }
.phone-card h2 { font: 400 24px/1.15 var(--serif); margin: 0; padding: 0 30px; font-variant-numeric: lining-nums; }
/* always a white tile with black squares, also in dark mode, so phone cameras can read it */
.phone-card .qr { width: 250px; height: 250px; display: grid; place-items: center; background: #fff; color: #111; padding: 8px; border-radius: 18px; border: 1px solid var(--line); color-scheme: light; }
.phone-card .qr svg { width: 100%; height: 100%; display: block; background: #fff; }
.phone-card .qr svg path, .phone-card .qr svg rect:not([fill="none"]) { fill: #000; }
.phone-card .qr .statline.error { color: #b42318; }
.phone-card .url { font-size: 12px; color: var(--muted); word-break: break-all; }
.phone-card .close { position: absolute; top: 14px; right: 14px; }
/* "Chat with our expert": opens a chat about this design, answered by the team */
dialog.expert { width: min(460px, calc(100vw - 24px)); }
.expert .phone-card { justify-items: stretch; text-align: left; }
.expert .phone-card h2, .expert .phone-card h3 { padding: 0 34px 0 0; }
.expert .pick { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--th-paper, #fff); }
.expert .pick img { width: 60px; height: 60px; object-fit: contain; border-radius: 10px; flex: none; }
.expert .pick b { display: block; font-size: 14px; }
.expert .pick small { color: var(--muted); font-size: 12px; }
.expert label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.expert label small { font-weight: 400; color: var(--muted); }
.expert .field { display: grid; gap: 5px; }
.expert .field > label { display: block; }
.expert .field > label small { display: block; margin-top: 2px; }
.expert textarea, .expert input { font: 14px/1.45 var(--sans); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: var(--th-paper, #fff); color: var(--ink); resize: vertical; }
.expert .send { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.expert .ok { padding: 12px 14px; border-radius: 12px; background: var(--th-ok-bg, #ecfdf3); color: var(--th-ok-text, #067647); font-size: 13.5px; }
.expert .bad { color: var(--danger); font-size: 13px; }
/* Staff (admins, jewelers) don't buy: the buyer's buttons give way to listing tools
   (edit the details customers see, hide, delete). body.staff is set once the account is known. */
.staff-tools { display: none; }
body.staff.admin .staff-tools { display: flex; gap: 6px; flex-wrap: wrap; }   /* listing tools: admins only */
body.staff .buy-btn, body.staff [data-buy-d], body.staff .tryon-chip, body.staff [data-tryon-d], body.staff [data-live-d], body.staff [data-expert-d],
body.staff [data-est-expert], body.staff [data-est-order], body.staff .seller-btn, body.staff #tonBtn, body.staff #tonPanel { display: none !important; }
.staff-tools button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: var(--r, 10px); border: 1px solid var(--line-strong); background: var(--th-paper, #fff); color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease; }
.staff-tools button:hover { border-color: var(--gold, #4e7a2e); }
.staff-tools button:active { transform: scale(.97); }
.staff-tools button:disabled { opacity: .5; cursor: not-allowed; }
.staff-tools .warn { color: var(--danger); }
.staff-tools .warn:hover { border-color: var(--danger); }
.card .staff-tools { margin-top: auto; }
.bbtns .staff-tools { margin-top: 0; }
.detail .staff-tools { margin-top: -4px; }
/* catalogue cards (2026-11-19): Edit / Hide as icon buttons side by side in one short row */
body.staff.admin .staff-tools.ico { flex-wrap: nowrap; }
.staff-tools.ico button { flex: 1 1 0; min-width: 0; height: 32px; padding: 0; }
.staff-tools.ico button svg { flex: none; }
.detail .l-about { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.ledit .status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ledit .status b { color: var(--ink); }
.ledit .reset { border: 0; background: none; padding: 0; color: var(--accent-ink, var(--gold)); font: 600 12.5px var(--sans); text-decoration: underline; cursor: pointer; justify-self: start; }
.df-toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; max-width: min(520px, calc(100vw - 32px));
  background: var(--ink); color: var(--th-on-ink, #fff); padding: 11px 16px; border-radius: 12px; font: 500 14px/1.4 var(--sans); box-shadow: 0 12px 28px -10px rgba(41, 37, 36, .45);
  transition: opacity 200ms ease, transform 200ms ease; }
.df-toast.on { opacity: 1; transform: translate(-50%, 0); }
.df-toast.bad { background: var(--danger); }
/* "Get BOM quotation from AI": a read-only estimate, the same every time it is opened */
dialog.est { width: min(520px, calc(100vw - 24px)); }
.est .price { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--th-gold-tint, #f1f6de); border: 1px solid var(--line-strong); }
.est .price small { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.est .price b { font: 500 32px/1.15 var(--serif); }
.est .price span { font-size: 13px; color: var(--muted); }
.est table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.est th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 0 6px; }
.est td { padding: 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.est td.n { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.est td small { display: block; color: var(--muted); font-size: 12px; }
.est tr.tot td { font-weight: 700; border-top: 1.5px solid var(--line-strong); }
.est .wts { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.est .estmat { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; flex-wrap: wrap; }
.est .estmat button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.est .estmat button[aria-pressed="true"] { background: var(--th-gold-tint, #e9f2c2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.est .wts b { color: var(--ink); font-weight: 600; }
.est .warn { font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 12px; background: var(--th-warn-bg, #fffaeb); border: 1px solid var(--th-warn-line, #fedf89); color: var(--th-warn-text, #93370d); }
.est .send .primary, .est .send .est-order { height: 44px; }
.est .est-order { padding: 0 18px; font-size: 14px; }
.est .busy { display: grid; justify-items: center; gap: 10px; padding: 26px 0; text-align: center; color: var(--muted); font-size: 14px; }
.est .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--tone2); animation: estspin 1s linear infinite; }
@keyframes estspin { to { transform: rotate(360deg); } }
/* already on a phone: nothing to scan */
@media (pointer: coarse) and (max-width: 760px) { #phoneBtn, #tryPhone { display: none; } }
/* wide result frame: the photo fills the screen, controls in one slim bar below */
dialog.try.wide { width: min(1040px, calc(100vw - 48px)); height: min(660px, calc(100dvh - 48px)); max-height: none; max-width: none; }
.tryw { display: flex; flex-direction: column; height: 100%; }
.tstage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(120% 100% at 50% 40%, #242820, #10130e); }
.tframe { position: absolute; left: 0; top: 0; transition: left .5s var(--ease), top .5s var(--ease), width .5s var(--ease), height .5s var(--ease); }
.tframe.instant { transition: none; }
.tframe img, .tframe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
/* right-click / long-press "save image" would save only the transparent jewellery layer */
.tframe canvas { pointer-events: none; }
.tstage .busy { position: absolute; inset: 0; display: grid; place-items: center; color: #d4e57a; font-weight: 600; background: rgba(0, 0, 0, .35); z-index: 2; }
.tstage .close { position: absolute; top: 14px; right: 14px; z-index: 5; background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); }
.tview { position: absolute; left: 14px; bottom: 14px; z-index: 4; display: flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: rgba(16, 19, 14, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tview button { border: 0; border-radius: 999px; padding: 7px 14px; font: 700 12.5px var(--sans); color: rgba(255, 255, 255, .8); background: transparent; transition: background .3s, color .3s; }
.tview button.on { background: rgba(var(--th-paper-rgb, 255, 255, 255), .95); color: var(--th-ink, #20261a); }
.tview.tlook { left: auto; right: 14px; }
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 14px 22px; border-top: 1px solid var(--line); }
.tbar h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .24em; color: var(--tone2); margin: 0 0 4px; font-weight: 700; }
.tbar h2 { font: 400 24px/1.1 var(--serif); letter-spacing: -.02em; margin: 0; font-variant-numeric: lining-nums; }
.tbar .actions { margin-left: auto; }
.tbar .muted { flex-basis: 100%; margin: 0; font-size: 12.5px; }
.tbar a:not(.ghost):not(.primary) { color: var(--accent); }
@media (max-width: 760px) {
  dialog.try.wide { width: min(720px, calc(100vw - 16px)); height: min(92dvh, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; border: 1px solid var(--line-strong); margin: auto; }
  .tbar { padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); gap: 10px 14px; }
  .tbar h2 { font-size: 20px; }
  .tbar .actions { margin-left: 0; }
}
/* try-on on ready-made models */
.mt { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; position: relative; }
.mt-loading { grid-column: 1 / -1; display: grid; place-items: center; gap: 12px; align-content: center; }
.mt-side { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 18px; border-right: 1px solid var(--line); overflow: auto; background: var(--bg2); }
.mt-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mt-head h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .24em; color: var(--tone2); margin: 0 0 4px; font-weight: 700; }
.mt-head h2 { font: 400 23px/1.15 var(--serif); letter-spacing: -.02em; margin: 0; }
.mt-label { font: 700 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.mt-product { flex: 1 1 auto; min-height: 150px; max-height: 360px; border: 1px solid var(--line); border-radius: 18px; background: var(--th-paper, #fff); display: grid; place-items: center; overflow: hidden; }
.mt-product img { max-width: 78%; max-height: 82%; object-fit: contain; }
.mt-sel { border: 1px solid var(--line); border-radius: 18px; background: var(--th-paper, #fff); padding: 10px; display: flex; gap: 12px; align-items: center; min-height: 88px; }
/* the three metals in one row */
.mt-side .metals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mt-side .metals button { justify-content: center; padding: 8px 6px; font-size: 12.5px; white-space: nowrap; min-width: 0; }
.mt-empty { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: center; width: 100%; }
.mt-empty b, .mt-selinfo b { display: block; font-size: 15px; }
.mt-empty .muted, .mt-selinfo .muted { display: block; font-size: 12.5px; margin-top: 2px; }
.mt-ph { width: 64px; height: 76px; flex: none; border: 1.5px dashed var(--line-strong); border-radius: 12px; display: grid; place-items: center; color: var(--tone2); background: var(--chip); }
.mt-ph svg { width: 20px; height: 20px; }
.mt-stack { position: relative; width: 84px; height: 96px; flex: none; }
.mt-stack img { position: absolute; top: 0; left: calc(var(--i) * 8px); width: 68px; height: 96px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.mt-total { position: absolute; left: 4px; top: 4px; z-index: 3; font: 700 10.5px var(--sans); color: #fff; background: rgba(23, 27, 19, .72); border-radius: 6px; padding: 2px 6px; }
.mt-selbtns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ghost.sm { padding: 6px 12px; font-size: 12.5px; }
.mt-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 10px; }
.mt-go { justify-content: center; padding: 13px; font-size: 15px; }
.mt-go:disabled, #mtDone:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.mt-note { font-size: 12px; margin: 0; }
.mt-main { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 22px 26px; }
.mt-pickhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-right: 8px; }
.mt-pickhead h2 { font: 500 26px/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.mt-tabs { display: flex; gap: 26px; align-items: center; margin: 16px 0 6px; flex-wrap: wrap; }
.mt-tabs [role=tab] { border: 0; background: none; padding: 4px 0; font: 600 16px var(--sans); color: var(--muted); border-bottom: 2px solid transparent; }
.mt-tabs [role=tab][aria-selected=true] { color: var(--ink); border-color: var(--tone2); }
.mt-tabs select { margin-left: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--chip); padding: 9px 12px; font: 500 13.5px var(--sans); color: var(--ink); }
.mt-hint { font-size: 12.5px; margin: 0 0 12px; }
.mt-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.mt-tile { position: relative; aspect-ratio: 3 / 4; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0; background: var(--chip); transition: transform .3s var(--ease), border-color .2s; }
.mt-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.mt-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-tile.on { border-color: var(--tone2); box-shadow: 0 0 0 3px var(--glow); }
.mt-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--sans);
  background: rgba(var(--th-paper-rgb, 255, 255, 255), .85); color: transparent; border: 1.5px solid rgba(0, 0, 0, .15); }
.mt-tile.on .mt-check { background: var(--tone2); color: var(--th-on-fill, #fff); border-color: var(--tone2); }
.mt-cap { position: absolute; left: 8px; bottom: 8px; font: 600 11px var(--sans); color: #fff; background: rgba(23, 27, 19, .6); padding: 3px 8px; border-radius: 999px; }
.mt-del { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--th-paper-rgb, 255, 255, 255), .9); color: var(--danger); }
.mt-del svg { width: 15px; height: 15px; }
.mt-up { border-style: dashed; display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; text-align: center; color: var(--ink); }
.mt-up svg { width: 38px; height: 38px; color: var(--tone2); }
.mt-up b { font-size: 16px; }
.mt-up .muted { font-size: 12.5px; }
.mt-pickfoot { position: sticky; bottom: -22px; margin: auto -26px -22px; margin-top: auto; padding: 14px 26px; display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
/* results: each picture as tall as the panel allows, side by side; more scroll sideways */
.mt-main.is-results { overflow: hidden; }
.mt-results { flex: 1; min-height: 320px; display: flex; gap: 20px; margin-top: 14px; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 8px; scroll-snap-type: x proximity; container-type: size; }
.mt-card { margin: 0; display: flex; flex-direction: column; gap: 8px; flex: none; height: 100%; scroll-snap-align: start;
  width: calc((100cqh - 74px) * .8); }   /* the picture 4:5 (the model photos' shape), as tall as the panel; 74px = date + buttons */
.mt-card figcaption { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-img { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--chip); flex: 1 1 auto; min-height: 0; width: 100%; }
.mt-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.mt-img.wait img { filter: saturate(.8) brightness(.9); cursor: default; }
.mt-wait { position: absolute; inset: auto 10px 10px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); font-size: 13px; font-weight: 600; }
.mt-wait .statline { margin: 0; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--tone2); animation: mtspin 1s linear infinite; flex: none; }
@keyframes mtspin { to { transform: rotate(360deg); } }
.mt-acts { display: flex; align-items: center; gap: 8px; }
.mt-acts .icon-btn.sm { width: 36px; height: 36px; }
.mt-acts .icon-btn svg { width: 16px; height: 16px; }
.mt-acts .icon-btn:first-of-type { margin-left: auto; }
.mt-kind { font-size: 12px; }
/* model picker: a click starts the AI on that model */
.mt-go-on { display: none !important; }
.mt-tile.starting { border-color: var(--tone2); }
.mt-tile:disabled { opacity: .55; cursor: not-allowed; }
/* try-on pictures made in the background: chip while some are being made, notices when ready */
.mt-bgnote { font-size: 12.5px; margin: 8px 0 0; }
.trybg-chip { position: fixed; left: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-solid);
  color: var(--ink); font: 600 13px var(--sans); box-shadow: var(--shadow); cursor: pointer; }
.trybg-notes { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.trybg-note { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 16px;
  border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); box-shadow: var(--shadow);
  font-size: 13.5px; animation: up .4s var(--ease); }
.trybg-note span { flex: 1; }
.trybg-note.bad { border-color: var(--th-danger-line, #f2b8b5); }
.trybg-note .primary.sm { padding: 7px 14px; font-size: 12.5px; }
.trybg-note .x { border: 0; background: none; color: var(--muted); padding: 4px 6px; }
@media (max-width: 760px) { .trybg-chip { left: 12px; bottom: 12px; } .trybg-notes { right: 12px; left: 12px; bottom: 64px; max-width: none; } }
/* full-size view: the whole picture always fits (flex gives the image a definite box to fit in;
   in a grid cell max-height: 100% had nothing to measure and a tall photo ran off the bottom) */
.mt-zoom { position: fixed; inset: 0; z-index: 10; background: rgba(15, 18, 12, .94); display: flex; align-items: center;
  justify-content: center; padding: 56px 20px 20px; box-sizing: border-box; cursor: zoom-out; }
.mt-zoom img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; cursor: default; }
.mt-zoom .icon-btn { position: absolute; top: 14px; right: 14px; background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); }
@media (max-width: 860px) {
  .mt { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .mt-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .mt-product { aspect-ratio: 16 / 9; }
  .mt-main { padding: 18px 16px; overflow: visible; }
  .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mt-pickfoot { margin: 16px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); bottom: 0; }
  dialog.try.wide { overflow: auto; }
  .mt-main.is-results { overflow: visible; }
  .mt-results { flex-direction: column; overflow: visible; min-height: 0; }
  .mt-card { height: auto; width: 100%; }
  .mt-img { flex: none; width: 100%; aspect-ratio: 4 / 5; }
  .mt-product { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
}
.try .need { text-align: center; padding: 30px 20px; color: var(--muted); display: grid; gap: 12px; place-items: center; }
.try .need .big { font-size: 56px; }

.swatches { display: flex; gap: 7px; }
.sw {
  width: 20px; height: 20px; border-radius: 50%; padding: 0; border: 2px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--line-strong);
  transition: transform .35s var(--ease), box-shadow .3s; position: relative;
}
.sw:hover { transform: scale(1.2); }
.sw.on { box-shadow: 0 0 0 2px var(--tone2), 0 0 12px var(--glow); }
.sw.rose_gold { background: linear-gradient(135deg, #f6d0c2, var(--rose) 50%, #b87562); }
.sw.white_gold { background: linear-gradient(135deg, #ffffff, var(--white) 50%, #9fa5ad); }
.sw.yellow_gold { background: linear-gradient(135deg, #fbe7a6, var(--yellow) 50%, #a9792a); }
/* silver 925 / platinum 950: white metals, told apart from white gold by their symbol */
.sw.silver { background: linear-gradient(135deg, #ffffff, #cfd4da 50%, #8f969e); }
.sw.platinum { background: linear-gradient(135deg, #eef0f3, #a9aeb5 50%, #666c74); }
.sw.silver::after, .sw.platinum::after { position: absolute; inset: 0; display: grid; place-items: center; font: 800 7.5px/1 system-ui, sans-serif; letter-spacing: -.02em; }
.sw.silver::after { content: "Ag"; color: #4b5158; }
.sw.platinum::after { content: "Pt"; color: #fff; }

.skeleton { pointer-events: none; }
.skeleton .img { background: linear-gradient(100deg, var(--chip) 30%, color-mix(in srgb, var(--tone2) 22%, transparent) 50%, var(--chip) 70%); background-size: 300% 100%; animation: sh 1.6s infinite linear; }
.skeleton .img::after { display: none; }
.skeleton .img svg { width: 42px; height: 42px; color: var(--tone2); opacity: .7; animation: float 2s ease-in-out infinite; }
.skeleton .body div { height: 12px; border-radius: 6px; background: var(--chip); }
@keyframes sh { to { background-position: -300% 0; } }
@keyframes float { 50% { transform: translateY(-8px) rotate(8deg); opacity: 1; } }

.more { display: flex; justify-content: center; margin-top: 34px; }
.more button { position: relative; overflow: hidden; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 10px; }
.empty svg { width: 70px; height: 70px; color: var(--tone2); margin-bottom: 10px; }
.empty svg path { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.8s var(--ease) forwards; }
.empty h3 { font: 400 24px var(--serif); color: var(--ink); margin: 0 0 4px; }
/* a search that isn't about jewellery: say so, and offer real searches instead */
.empty.refused { padding: 48px 16px 56px; }
.empty.refused h3 { overflow-wrap: anywhere; }
.empty.refused p { max-width: 520px; margin: 8px auto 18px; line-height: 1.5; }
.empty.refused .try { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty.refused .ghost svg { width: 18px; height: 18px; margin: 0; }   /* not the panel's big icon size */
.empty.refused .try button {
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; padding: 7px 14px; border-radius: 999px; color: var(--ink);
  transition: transform .35s var(--ease), border-color .3s, background .3s, color .3s;
}
.empty.refused .try button:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--chip); color: var(--tone2); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 20; opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .4s, transform .5s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- detail dialog ---------- */
dialog {
  width: min(1060px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: 26px; background: var(--surface-solid); color: var(--ink); overflow: hidden; box-shadow: 0 40px 100px -30px rgba(50, 80, 31, .3);
}
dialog[open] { animation: dlgIn .6s var(--ease); }
dialog.closing { animation: dlgOut .28s ease-in forwards; }
dialog::backdrop { background: rgba(244, 249, 239, .74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
dialog[open]::backdrop { animation: fade .5s ease; }
dialog.closing::backdrop { animation: fade .28s reverse forwards; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }
.detail { display: grid; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } dialog { overflow: auto; } }
/* Laptop/desktop design details: image left (pinned), details right; the whole card scrolls under the cursor */
@media (min-width: 761px) {
  dialog#dlg { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  dialog#dlg .detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  dialog#dlg .stage-dots { display: none; }
  dialog#dlg .stage { position: sticky; top: 0; max-height: calc(100vh - 34px); }
  dialog#dlg .info { max-height: none; overflow: visible; }
}
dialog#dlg:has(.page-loader) { display: grid; place-items: center; }
dialog#dlg .page-loader { min-height: 480px; height: 100%; width: 100%; display: grid; place-items: center; padding: 0 20px; box-sizing: border-box; }
.stage {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(110% 90% at 50% 35%, var(--tile-a), var(--tile-b));
}
.stage img, .stage video { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; animation: stageIn .6s var(--ease); cursor: pointer; }
@keyframes stageIn { from { opacity: 0; transform: scale(.94); filter: blur(10px); } }
.stage a, .stage .zoom-pill {
  position: absolute; right: 14px; bottom: 14px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: rgba(var(--th-paper-rgb, 255, 255, 255), .9); border: 1px solid var(--line-strong);
  padding: 5px 12px; border-radius: 999px; text-decoration: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .3s var(--ease); cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.stage a:hover, .stage .zoom-pill:hover { transform: translateY(-2px); }

/* Product detail dialog: lock the page behind it so the cursor/wheel can't scroll it through the backdrop */
body.dialog-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* In-app Fullscreen Photo Lightbox (Adaptive Light / Dark theme) */
body.photo-open {
  overflow: hidden !important;
  touch-action: none !important;
}
body.photo-open dialog#dlg {
  visibility: hidden !important;
}
dialog#photoDlg.photo-viewer {
  position: fixed !important; inset: 0 !important;
  width: 100vw !important; max-width: 100vw !important;
  height: 100% !important; height: 100dvh !important; max-height: 100dvh !important;
  margin: 0 !important; border: none !important; border-radius: 0 !important; padding: 0 !important;
  background: var(--surface-solid, #ffffff) !important;
  color: var(--ink, #20261a); overflow: hidden; box-shadow: none; z-index: 99999 !important;
  display: flex !important; flex-direction: column !important; justify-content: space-between !important; outline: none;
}
dialog#photoDlg:not([open]) { display: none !important; }
dialog#photoDlg::backdrop { background: rgba(0, 0, 0, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pv-header {
  position: absolute; top: 0; left: 0; right: 0; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; z-index: 20; pointer-events: auto;
}
.pv-badge {
  font-size: 13px; font-weight: 600; color: var(--accent-ink, #305318);
  background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); border: 1px solid var(--line-strong, #b4d089);
  padding: 4px 13px; border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  letter-spacing: .04em; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.pv-close {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong, #b4d089); background: rgba(var(--th-paper-rgb, 255, 255, 255), .88);
  color: var(--ink, #20261a); display: inline-grid; place-items: center; cursor: pointer;
  transition: all .2s ease; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.pv-close:hover { background: var(--th-paper, #fff); transform: scale(1.05); }
.pv-body {
  flex: 1; width: 100%; height: 100%; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.pv-body img {
  max-width: 94vw; max-height: 80dvh; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .14));
  transform-origin: center center;
  will-change: transform;
}
.pv-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong, #b4d089); background: rgba(var(--th-paper-rgb, 255, 255, 255), .9);
  color: var(--ink, #20261a); display: inline-grid; place-items: center; cursor: pointer;
  z-index: 15; transition: all .25s ease; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.pv-nav:hover {
  background: var(--chip, #f8fbf5); border-color: var(--gold, #6f9f4a);
  transform: translateY(-50%) scale(1.08);
}
.pv-prev { left: 18px; }
.pv-next { right: 18px; }
@media (max-width: 760px) {
  .pv-nav { display: none; }
}
.pv-footer {
  position: absolute; bottom: 18px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 20; pointer-events: auto;
}
.pv-dots { display: flex; gap: 7px; align-items: center; }
.pv-dot {
  width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0;
  background: var(--line-strong, #b4d089); transition: all .25s ease; cursor: pointer;
}
.pv-dot.on {
  width: 22px; border-radius: 4px; background: var(--tone2, var(--gold, #6f9f4a));
  box-shadow: 0 0 10px rgba(111, 159, 74, .45);
}
.info { position: relative; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; overflow: auto; max-height: calc(100vh - 32px); }
.info.first > * { animation: up .6s var(--ease) both; }
.info.first > *:nth-child(2) { animation-delay: .06s; } .info.first > *:nth-child(3) { animation-delay: .12s; }
.info.first > *:nth-child(4) { animation-delay: .18s; } .info.first > *:nth-child(5) { animation-delay: .24s; }
.info.first > *:nth-child(6) { animation-delay: .3s; } .info.first > *:nth-child(7) { animation-delay: .36s; }
.info h2 { font: 400 30px/1.1 var(--serif); letter-spacing: -.02em; margin: 0; padding-right: 44px; }
.info .close { position: absolute; top: 16px; right: 16px; z-index: 5; }
.info h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .24em; color: var(--tone2); margin: 0 0 8px; font-weight: 700; }
.muted { color: var(--muted); font-size: 13.5px; }
.strip { display: flex; gap: 8px; flex-wrap: wrap; }
.strip button {
  padding: 0; width: 66px; height: 66px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--tile-a), var(--tile-b)); transition: transform .35s var(--ease), box-shadow .3s;
}
.strip button:hover { transform: translateY(-3px); }
.strip button.on { box-shadow: 0 0 0 2px var(--tone2), 0 8px 20px -8px var(--glow); }
.strip img { width: 100%; height: 100%; object-fit: contain; }
.strip .vid { font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.metals { display: flex; gap: 8px; flex-wrap: wrap; }
.metals button {
  display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; padding: 7px 14px 7px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; transition: all .35s var(--ease);
}
.metals button:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.metals button.on { border-color: var(--tone2); background: var(--chip); }
.metals .sw { width: 18px; height: 18px; pointer-events: none; }
/* the design detail dialog's "Metal" / "Metal color" rows only (#dlg): icon-only circular swatches, every screen size, with the pick's name shown beside the heading instead of in the button */
dialog#dlg .metals { gap: 10px; }
dialog#dlg .metals button {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center;
}
.metal-color-h { margin-top: 14px; }   /* "Metal color" repeats the "Metal" h3 styling but follows the material row inside the same wrapping div, so it needs its own top gap */
dialog#dlg .info h3 .metal-sel { display: inline; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); margin-left: 6px; }   /* the selected metal's name, shown beside its heading now that the icons carry no text */
.facts { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; word-break: break-word; border-top: 1px solid var(--line); padding-top: 14px; }

/* the font shorthand resets this, so set it after */
.card .id, .info h2, .banner strong, .statline b { font-variant-numeric: lining-nums; }


/* ---------- animated logo: cycles through every category (ring, earrings, pendant, necklace, bracelet) ---------- */
.logo { width: 44px; height: 44px; overflow: visible; flex: none; }
.logo .lg-items { transform-box: view-box; transform-origin: 24px 26px; }
.logo .lg-item { opacity: 0; transform-box: view-box; transform-origin: 24px 26px; animation: lgCycle 15s infinite; }
.logo .i1 { animation-delay: 3s; } .logo .i2 { animation-delay: 6s; } .logo .i3 { animation-delay: 9s; } .logo .i4 { animation-delay: 12s; }
.logo .lg-item .d { stroke-dasharray: 100; stroke-dashoffset: 100; animation: lgTrace 15s infinite; animation-delay: inherit; }
.logo .lg-item .g { transform-box: fill-box; transform-origin: center; animation: lgGem 15s infinite; animation-delay: inherit; }
.logo .lg-spark { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: lgSpark 3s ease-in-out 1.2s infinite; }
.logo .lg-spark.s2 { animation-delay: 2s; }
@keyframes lgCycle { 0% { opacity: 0; transform: scale(.7) rotate(-10deg); } 3% { opacity: 1; transform: none; } 17% { opacity: 1; transform: none; } 20% { opacity: 0; transform: scale(1.15) rotate(8deg); } 100% { opacity: 0; } }
@keyframes lgTrace { 0% { stroke-dashoffset: 100; } 9% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes lgGem { 0%, 5% { opacity: 0; transform: scale(.2); } 10% { opacity: 1; transform: scale(1.12); } 12%, 100% { opacity: 1; transform: none; } }
@keyframes lgSpark { 0%, 50%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 70% { transform: scale(1.15) rotate(90deg); opacity: 1; } 85% { transform: scale(.6) rotate(140deg); opacity: .6; } }
@keyframes lgFlip { 50% { transform: scaleX(.12); } }
.brand:hover .logo .lg-items, .logo-wrap:hover .logo .lg-items { animation: lgFlip 1s cubic-bezier(.4, 0, .2, 1); }
@media (prefers-reduced-motion: reduce) {
  .logo .lg-item, .logo .lg-item .d, .logo .lg-item .g { animation: none !important; }
  .logo .lg-item .d { stroke-dashoffset: 0; }
  .logo .i0 { opacity: 1; }
}

/* ---------- layout: sidebar + main ---------- */
.shell { position: relative; z-index: 1; display: flex; align-items: flex-start; }
.shell > .wrap { flex: 1; min-width: 0; }

/* ---------- search history sidebar ---------- */
.history {
  position: sticky; top: 69px; height: calc(100vh - 69px); width: 320px; flex: none; overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line); transition: width .55s var(--ease);
}
.history.collapsed { width: 68px; }
.h-inner { width: 320px; height: 100%; display: flex; flex-direction: column; transition: opacity .3s, transform .5s var(--ease); }
.history.collapsed .h-inner { opacity: 0; transform: translateX(-30px); pointer-events: none; visibility: hidden; }
.h-rail {
  position: absolute; inset: 0 auto 0 0; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 18px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.history.collapsed .h-rail { opacity: 1; pointer-events: auto; transition-delay: .25s; }
.h-rail .count { font-size: 11px; font-weight: 700; color: var(--tone2); }
.h-rail .vlabel { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.fold svg { transition: transform .5s var(--ease); }
.history.collapsed .fold svg { transform: rotate(180deg); }
.h-head { padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.h-head .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-head h2 { font: 400 22px/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.h-head h2 em { font-style: normal; font-weight: 500; color: var(--tone2); }
.h-head .sub { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.h-head .sub svg { width: 12px; height: 12px; color: var(--tone2); }
.h-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.h-filter { flex: 1; min-width: 0; height: 36px; border-radius: 12px; border: 1px solid var(--line); padding: 0 12px; font: 500 13px var(--sans); color: var(--ink); background: var(--bg2); outline: none; transition: border-color .3s, box-shadow .3s; }
.h-filter:focus { border-color: var(--tone2); box-shadow: 0 0 0 4px var(--chip); }
.linkish { border: 0; background: none; font: 600 12.5px var(--sans); color: var(--muted); padding: 6px 4px; border-radius: 8px; white-space: nowrap; }
.linkish:hover { color: var(--danger); }
.h-list { flex: 1; overflow: auto; padding: 6px 10px 24px; overscroll-behavior: contain; }
.h-group { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--tone2); font-weight: 700; margin: 16px 10px 6px; }
.h-item {
  position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 11px; align-items: center; width: 100%; text-align: left;
  padding: 9px; border-radius: 16px; border: 1px solid transparent; cursor: pointer; outline: none;
  animation: hIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); transition: background .3s, border-color .3s, transform .35s var(--ease);
}
@keyframes hIn { from { opacity: 0; transform: translateX(-20px); } }
.h-item:hover, .h-item:focus-visible { background: var(--chip); border-color: var(--line); transform: translateX(3px); }
.h-item.active { background: var(--chip); border-color: var(--line-strong); }
.h-item.active::before { content: ""; position: absolute; left: -10px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--tone2); }
.h-item.gone { animation: hOut .35s ease-in forwards; }
@keyframes hOut { to { opacity: 0; transform: translateX(-40px); } }
.h-thumb { width: 48px; height: 48px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, var(--tile-a), var(--tile-b)); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.h-thumb img { width: 88%; height: 88%; object-fit: contain; }
.h-thumb svg { width: 22px; height: 22px; color: var(--tone2); opacity: .6; }
.h-q { font: 600 13px/1.35 var(--sans); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.h-meta b { color: var(--tone2); font-weight: 600; }
.h-del { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; opacity: 0; transition: opacity .25s, background .25s, color .25s; }
.h-del svg { width: 13px; height: 13px; pointer-events: none; }
.h-item:hover .h-del, .h-del:focus-visible { opacity: 1; }
.h-del:hover { background: var(--bg); color: var(--danger); }
@media (hover: none) { .h-del { opacity: .7; } }
.h-empty { text-align: center; color: var(--muted); padding: 50px 22px; font-size: 13px; animation: pop .5s var(--ease); }
.h-empty svg { width: 50px; height: 50px; color: var(--tone2); opacity: .55; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
.h-empty h3 { font: 400 19px var(--serif); color: var(--ink); margin: 0 0 6px; }
.h-skel { height: 66px; border-radius: 16px; margin: 6px 0; background: linear-gradient(100deg, var(--chip) 30%, color-mix(in srgb, var(--tone2) 14%, transparent) 50%, var(--chip) 70%); background-size: 300% 100%; animation: sh 1.6s infinite linear; }
.saved-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--chip); border: 1px solid var(--line-strong); padding: 3px 10px; border-radius: 999px; }
.saved-pill svg { width: 12px; height: 12px; }

.top-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font: 600 13px var(--sans); color: var(--ink);
  transition: border-color .3s, transform .35s var(--ease), background .3s;
}
.top-btn:hover, .top-btn[aria-pressed="true"] { border-color: var(--line-strong); background: var(--chip); transform: translateY(-1px); }
.top-btn svg { width: 17px; height: 17px; color: var(--tone2); }
.top-btn .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; display: grid; place-items: center; background: var(--btn); border: 1px solid var(--line-strong); color: var(--btn-ink, #1d2f10); }
.top-btn .badge[hidden] { display: none !important; }
.top-btn .badge.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
#histBtn { display: none; }
.scrim { position: fixed; inset: 0; z-index: 44; background: rgba(50, 80, 31, .14); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .4s; }

/* ---------- search by photo ---------- */
.photo-btn {
  align-self: center; flex: none; width: 46px; height: 46px; border-radius: 14px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface-solid); color: var(--tone2);
  transition: transform .35s var(--ease), border-color .3s, background .3s;
}
.photo-btn:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--chip); }
.photo-btn svg { width: 22px; height: 22px; pointer-events: none; }
.photo-chip { position: relative; align-self: center; flex: none; width: 50px; height: 50px; animation: pop .45s var(--ease); }
.photo-chip img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 2px var(--tone2); display: block; background: var(--tile-b); }
.photo-chip .x {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink);
}
.photo-chip .x svg { width: 11px; height: 11px; pointer-events: none; }
.search.has-photo { padding-left: 12px; }
.drop-hint {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; display: none; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent); border: 2px dashed var(--tone2);
  font-weight: 700; color: var(--accent-ink);
}
.search.dropping .drop-hint { display: grid; }
.browse-row { gap: 10px; flex-wrap: wrap; }

/* Design DNA: what the AI read from the photo */
.dna {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 22px; align-items: start; margin: 22px 0 0; padding: 16px;
  border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .6s var(--ease);
}
.dna-photo { position: relative; display: inline-block; line-height: 0; border-radius: 16px; overflow: hidden; background: var(--tile-b); box-shadow: 0 0 0 1px var(--line); }
.dna-photo img { display: block; max-width: 220px; max-height: 220px; width: auto; height: auto; }
.dna-box { position: absolute; border: 2px solid var(--tone1); border-radius: 8px; box-shadow: 0 0 0 999px rgba(32, 38, 26, .3); animation: pop .6s var(--ease) .1s both; }
.dna-photo .scan {
  position: absolute; left: 0; right: 0; top: -35%; height: 35%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(193, 222, 138, .6), transparent); animation: scan 1.5s ease-in-out infinite;
}
@keyframes scan { to { top: 100%; } }
.dna-info { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.dna-info > * { animation: pop .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.dna-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.dna-head strong { font: 500 24px/1.2 var(--serif); letter-spacing: -.01em; }
.dna-head .sub { font-size: 13px; color: var(--muted); }
.dna-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.dna-row > .k { width: 104px; flex: none; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.trait {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 600 12.5px var(--sans);
  border: 1px solid var(--line); background: var(--chip); color: var(--ink); transition: transform .3s var(--ease), border-color .3s, background .3s;
}
button.trait:hover { transform: translateY(-1px); border-color: var(--tone2); color: var(--accent-ink); }
.trait .plus { font-weight: 800; color: var(--tone2); }
.trait.on { background: var(--btn); border-color: var(--line-strong); color: var(--btn-ink, #1d2f10); }
.trait .dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.dna-hint { font-size: 12px; color: var(--muted); }
.same {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 14px;
  background: var(--btn); border: 1px solid var(--line-strong); max-width: 520px; color: var(--btn-ink, #1d2f10);
}
.same img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: var(--th-paper, #fff); flex: none; }
.same .grow { flex: 1; min-width: 0; }
.same strong { font: 500 16px var(--serif); color: var(--accent-ink); }
.same .sub { font-size: 12px; color: var(--accent-ink); opacity: .8; }
.same .ghost { background: var(--surface-solid); }
@media (max-width: 640px) {
  .dna { grid-template-columns: 1fr; }
  .dna-photo { justify-self: center; }
  .dna-photo img { max-width: 100%; max-height: 240px; }
  .dna-row > .k { width: 100%; }
  .photo-btn { width: 42px; height: 42px; }
}
/* how close a photo-search result is */
.match {
  position: absolute; z-index: 3; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; pointer-events: none;
  font: 700 11px var(--sans); letter-spacing: .03em; background: rgba(var(--th-paper-rgb, 255, 255, 255), .92); border: 1px solid var(--line); color: var(--muted);
}
.match.m-same { background: var(--btn); border-color: var(--line-strong); color: var(--btn-ink, #1d2f10); }
.match.m-very_close { border-color: var(--line-strong); color: var(--accent-ink); }
.card .shares { font-size: 11.5px; color: var(--accent-ink); margin: -2px 0 8px; }

/* ---------- hearts ---------- */
.heart {
  position: absolute; z-index: 3; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--line); background: rgba(var(--th-paper-rgb, 255, 255, 255), .88); color: var(--muted);
  backdrop-filter: blur(6px); transition: transform .35s var(--ease), color .3s, border-color .3s, opacity .3s;
}
.heart svg { width: 18px; height: 18px; pointer-events: none; transition: transform .35s var(--ease); }
.heart svg path { fill: transparent; transition: fill .3s; }
.heart:hover { transform: scale(1.1); color: var(--tone2); border-color: var(--line-strong); }
.heart.on { color: var(--tone2); border-color: var(--line-strong); }
.heart.on svg path { fill: currentColor; }
.heart.pop svg { animation: heartPop .6s var(--ease); }
@keyframes heartPop { 30% { transform: scale(1.45); } 60% { transform: scale(.9); } }
.heart .burst { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--tone1); animation: burst .6s ease-out forwards; pointer-events: none; }
@keyframes burst { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.card .heart { opacity: 0; }
.card:hover .heart, .card .heart.on, .card .heart:focus-visible { opacity: 1; }
@media (hover: none) { .card .heart { opacity: 1; } }
.stage .heart { opacity: 1 !important; z-index: 10; top: 14px; right: 14px; width: 38px; height: 38px; }
.fav-toggle { display: inline-flex; align-items: center; gap: 8px; }
.fav-toggle .heart { position: static; }
.share-fab { position: absolute; z-index: 10; top: 60px; right: 14px; width: 38px; height: 38px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--line); background: rgba(var(--th-paper-rgb, 255, 255, 255), .88); color: var(--muted);
  backdrop-filter: blur(6px); transition: transform .35s var(--ease), color .3s, border-color .3s; }
.share-fab svg { width: 17px; height: 17px; pointer-events: none; }
.share-fab:hover { transform: scale(1.1); color: var(--tone2); border-color: var(--line-strong); }

/* ---------- favourites gallery ---------- */
.favs { padding-top: 10px; animation: pop .6s var(--ease); }
.favs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 18px 0 16px; }
.favs-head h2 { font: 300 36px/1.05 var(--serif); letter-spacing: -.02em; margin: 6px 0 0; }
.favs-head h2 em { font-style: normal; font-weight: 500; color: var(--tone2); }
.favs-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 14px; }
.tile {
  position: relative; border-radius: 22px; overflow: hidden; cursor: pointer; outline: none; border: 1px solid var(--line);
  background: radial-gradient(110% 90% at 50% 35%, var(--tile-a), var(--tile-b)); box-shadow: var(--shadow);
  animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); transition: transform .5s var(--ease), box-shadow .5s, border-color .4s;
}
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.tall { grid-row: span 2; }
.tile.wide { grid-column: span 2; }
.tile img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; transition: transform .9s var(--ease); }
.tile:hover, .tile:focus-visible { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow), 0 26px 50px -26px var(--glow); }
.tile:hover img { transform: scale(1.07); }
.tile .cap {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 9px 12px; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(var(--th-paper-rgb, 255, 255, 255), .86); backdrop-filter: blur(8px); border: 1px solid var(--line);
  transform: translateY(14px); opacity: 0; transition: transform .45s var(--ease), opacity .35s;
}
.tile:hover .cap, .tile:focus-visible .cap { transform: none; opacity: 1; }
.tile .cap b { font: 500 14px var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .cap span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tile .heart { opacity: 1; }
.tile.gone { animation: tileOut .4s ease-in forwards; }
@keyframes tileOut { to { opacity: 0; transform: scale(.85); } }
@media (hover: none) { .tile .cap { transform: none; opacity: 1; } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 10px; } .tile.wide, .tile.big { grid-column: span 2; } }
/* phone: stack name over type · metal so neither gets squeezed out of the caption */
@media (max-width: 560px) {
  .tile .cap { flex-direction: column; align-items: stretch; justify-content: center; gap: 1px; padding: 7px 10px; }
  .tile .cap b { font-size: 13px; min-width: 0; }
  .tile .cap span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 900px) {
  .history { position: fixed; z-index: 46; top: 61px; left: 0; right: auto; height: calc(100dvh - 61px); height: calc(100vh - 61px); width: min(285px, 72vw); max-width: 72vw; border-radius: 0 18px 18px 0; border-right: 1px solid var(--line); transform: translateX(-105%); transition: transform .32s cubic-bezier(.23, 1, .32, 1); box-shadow: 14px 0 36px -10px rgba(41, 37, 36, .22); }
  .history.mobile-open { transform: none; }
  .shell { z-index: auto; }   /* let the drawer stack above the page backdrop */
  .history .h-inner { width: 100%; opacity: 1 !important; transform: none !important; visibility: visible !important; pointer-events: auto !important; }
  .h-rail { display: none; }
  #histBtn { display: inline-flex; }
  .scrim { position: fixed; top: 61px; left: 0; right: 0; bottom: 0; height: calc(100dvh - 61px); height: calc(100vh - 61px); z-index: 44; background: rgba(41, 37, 36, .35); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
  .scrim.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) { .top-btn span:not(.badge) { display: none; } .top-btn { padding: 0 11px; } }
@media (max-width: 900px) { :is(#tonBtn, #histBtn, #phoneBtn) span:not(.badge) { display: none; } :is(#tonBtn, #histBtn, #phoneBtn) { padding: 0 11px; } .brand small { display: none; } .brand b, .top-btn { white-space: nowrap; } }   /* tablet top bar: icons, the rest keep words */
@media (max-width: 560px) {
  .brand > div { display: none; } .top-actions { gap: 5px; }
  /* phones: counts sit on the button's corner, so every button fits (412px Pixel was 40px over) */
  .top-btn { position: relative; padding: 0 10px !important; }
  .top-btn .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; border-radius: 999px; box-shadow: 0 0 0 2px var(--th-paper, #fff); }
}   /* phones: logo mark only, every top button stays on screen */
@media (max-width: 560px) { .topbar { padding: 12px 16px; } .brand small { display: none; } .brand b { font-size: 14px; letter-spacing: .12em; white-space: nowrap; } .top-actions { gap: 6px; } }

@media (max-width: 560px) {
  .hero { padding-top: 34px; }
  #go span { display: none; }   /* the search button only: dialog buttons keep their words */
  .card .id { font-size: 13.5px; line-height: 1.3; }
  .card .body { padding: 10px 11px 12px; }
  .more-like span { display: none; }
  .more-like, .more-like.web-like { padding: 6px 8px; }   /* Similar + Web + three swatches fit a phone card */
  .card .row-btns { gap: 4px; }
  .card .swatches { gap: 5px; }
  .buy-btn { height: 38px; font-size: 12px; gap: 6px; letter-spacing: .02em; }
  .seller-btn { height: 36px; font-size: 12px; }
  .banner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  #sparkles { display: none; }
}

/* ---------- "From the web" panel (demo): other shops' products, like Google's product view ---------- */
.webpanel {
  position: sticky; top: 69px; height: calc(100vh - 69px); width: 0; flex: none; overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid transparent; transition: width .5s var(--ease), border-color .3s;
}
body.web-open .webpanel { width: 400px; border-color: var(--line); }
.wp-inner { width: 400px; height: 100%; display: flex; flex-direction: column; }
.wp-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.wp-head .grow { flex: 1; min-width: 0; }
.wp-kicker { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tone2); display: flex; align-items: center; gap: 6px; }
.wp-kicker svg { width: 14px; height: 14px; }
.wp-title { font: 400 18px/1.3 var(--serif); color: var(--ink); margin-top: 3px; overflow-wrap: anywhere; }
.wp-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wp-where { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wp-where button { font: 600 12px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 11px; cursor: pointer; min-height: 28px; }
.wp-where button:hover { color: var(--ink); }
.wp-where button[aria-pressed="true"] { color: var(--btn-ink, #1d2f10); background: var(--btn); border-color: var(--accent-ink); }
.wp-where button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.wp-sec { font: 600 13px var(--sans); color: var(--ink); margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
/* "Across the whole web": a starred Pro bar at the top of the panel, uses credits (server: weblens.py) */
.wp-pro { font: 700 9.5px var(--sans); letter-spacing: .08em; color: var(--btn-ink, #1d2f10); background: var(--btn); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.wp-lens { border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 10px 10px 12px; background: var(--surface-solid); margin-bottom: 14px; }
.wl-row { display: flex; align-items: center; gap: 10px; }
.wl-row .st { color: var(--accent); font-size: 16px; line-height: 1; flex: none; }
.wl-row .grow { flex: 1; min-width: 0; }
.wl-t { font: 600 13px var(--sans); color: var(--ink); white-space: nowrap; }
.wl-s { font-size: 11.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-lens button { flex: none; font: 600 12px var(--sans); color: var(--btn-ink, #1d2f10); background: var(--btn); border: 1px solid var(--accent-ink); border-radius: 999px; padding: 6px 12px; min-height: 32px; cursor: pointer; white-space: nowrap; }
.wp-lens button:hover:not(:disabled) { filter: brightness(.96); }
.wp-lens button:disabled { opacity: .45; cursor: default; }
.wp-lens button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.wl-err { margin: 8px 0 0; font-size: 12px; color: var(--ink); }
.wl-spin { width: 18px; height: 18px; flex: none; margin-right: 6px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: wlspin .8s linear infinite; }
@keyframes wlspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wl-spin { animation-duration: 2.4s; } }
.wl-grid { margin-bottom: 4px; }
.wp-lens + .wp-sec, .wl-grid + .wp-sec { margin-top: 18px; }
.wcountry { flex: none; margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.wp-body { flex: 1; overflow-y: auto; padding: 14px 18px 30px; overscroll-behavior: contain; }
.wp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.wp-note { font-size: 13px; color: var(--muted); padding: 30px 6px; text-align: center; }
.wp-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-solid); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.wp-btn:hover { border-color: var(--line-strong); background: var(--chip); }
.wp-btn:disabled { opacity: .35; cursor: default; }
.wp-btn svg { width: 16px; height: 16px; }

/* every picture in the same square frame: shown whole (contain), never cropped or squashed;
   a soft blurred copy of the same picture fills the space around it */
.wframe { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--th-paper-2, #f3f6f0); padding: 0; cursor: pointer; isolation: isolate; }
.wframe::before { content: ""; position: absolute; inset: -14%; z-index: -1; background: var(--src) center / cover no-repeat; filter: blur(22px) saturate(1.1); opacity: .55; }
.wframe img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .5s var(--ease); }
.wcard:hover .wframe img { transform: scale(1.03); }
.wcard .wframe:focus-visible { outline: 2px solid var(--tone2); outline-offset: 2px; }
.wmeta { padding: 8px 2px 0; display: grid; gap: 2px; min-width: 0; }
.wshop { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
.wshop span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfav { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 10px var(--sans); color: #fff; }
.wnew { flex: none; font: 700 10px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--btn-ink, #1d2f10); background: var(--btn); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.wname { font-size: 13.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wprice { font-weight: 700; font-size: 14px; color: var(--ink); }
.wmat { font-size: 11.5px; color: var(--muted); }
.wurl { font-size: 12px; color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wurl:hover { text-decoration: underline; }

.wprev .wp-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wprev .wp-nav .grow { flex: 1; }
.wprev h3 { font: 500 17px/1.35 var(--serif); margin: 4px 0 10px; color: var(--ink); }
.wprev .wframe { border-radius: 16px; cursor: default; }
.wprev .wfacts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 12px 0; }
.wprev .wfacts .wprice { font-size: 18px; }
.wprev .wactions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wprev .wactions a, .wprev .wactions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 999px; font: 600 14px var(--sans); text-decoration: none; cursor: pointer; }
.wprev .wactions a { background: var(--btn); border: 1px solid var(--line-strong); color: var(--btn-ink, #1d2f10); }
.wprev .wactions button { background: var(--surface-solid); border: 1px solid var(--line); color: var(--ink); }
.wprev .wactions svg { width: 16px; height: 16px; }
.wprev .wurl { display: block; margin: 10px 2px 0; }
.wprev h4 { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 24px 0 12px; }

.web-fab { position: fixed; right: 18px; bottom: 76px; z-index: 35; display: none; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-solid); box-shadow: var(--shadow); font: 600 13px var(--sans); color: var(--ink); cursor: pointer; }
.web-fab svg { width: 17px; height: 17px; color: var(--tone2); }
.web-fab.show { display: inline-flex; }
body.web-open .web-fab { display: none; }

@media (max-width: 1199px) {
  .webpanel { position: fixed; z-index: 46; top: 61px; right: 0; left: auto; height: calc(100dvh - 61px); height: calc(100vh - 61px); width: min(300px, 75vw) !important; max-width: 75vw !important; border-radius: 18px 0 0 18px; transform: translateX(105%); transition: transform .32s cubic-bezier(.23, 1, .32, 1); box-shadow: -14px 0 36px -10px rgba(41, 37, 36, .22); border-left: 1px solid var(--line); border-top: none; border-bottom: none; border-right: none; }
  body.web-open .webpanel { transform: none; }
  .wp-inner { width: 100%; }
}
@media (max-width: 760px) { #webBtn { display: none; } }   /* phones use the floating button; the top bar has no room */
@media (max-width: 560px) { .wp-head { padding: 14px 16px 10px; } .wp-body { padding: 12px 16px 30px; } }

/* ======================================================================================
   Panel design system (2026-10-10): the catalogue now shares the jeweler panel's type,
   colours and controls. One family (Geist), a warm stone ground with white surfaces, gold
   only for actions, selection and progress, 150-200 ms motion that shows a change of state.
   The rules above keep the layout; this layer sets the look and wins by coming last.
   ====================================================================================== */
:root {
  --bg: #f5f5f4; --bg2: #fafaf9; --surface: #ffffff; --surface-solid: #ffffff;
  --line: #e7e5e4; --line-strong: #d6d3d1;
  --ink: #292524; --muted: #6b6560; --accent: #4e7a2e; --accent-ink: #47702a;
  --tone1: #79b451; --tone2: #4e7a2e; --tone3: #3f6624;
  --btn: linear-gradient(135deg, #c7dd4a, #96cc76); --btn-hover: linear-gradient(135deg, #d3e66b, #a7d68a); --chip: #f5f5f4; --glow: rgba(78, 122, 46, .16);
  --gold: #4e7a2e; --gold-hover: #3f6624; --gold-line: #cddba7; --gold-tint: #eff6e9;
  --tile-a: #ffffff; --tile-b: #ffffff;
  --shadow: 0 1px 2px rgba(41, 37, 36, .05);
  --lift: 0 10px 24px -16px rgba(41, 37, 36, .28);
  --menu-shadow: 0 16px 36px -16px rgba(41, 37, 36, .3);
  --serif: Geist, system-ui, -apple-system, "Segoe UI", "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif;
  --sans: var(--serif);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --r: 10px; --r-card: 14px;
}
body { font-size: 14.5px; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; caret-color: var(--gold); transition: none; }
::selection { background: var(--gold-tint); color: var(--ink); }
button:focus-visible, select:focus-visible, .card:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.progress { display: none; }
h1, h2, h3 { text-wrap: balance; }
/* headings: one family, weight steps instead of thin display type */
.hero h1, .info h2, .favs-head h2, .h-head h2, .cat-tile .name, .card .id, .banner strong, .dna-head strong, .tbar h2, .mt-head h2,
.mt-pickhead h2, .phone-card h2, .wp-title, .wprev h3, .empty h3, .h-empty h3, .statline b, .bprices b, .same strong, .tile .cap b {
  font-family: var(--sans); font-weight: 600; letter-spacing: -.015em;
}
.hero h1 em, .favs-head h2 em, .h-head h2 em { font-style: normal; font-weight: 600; color: var(--accent-ink); background: none; -webkit-background-clip: border-box; background-clip: border-box; animation: none; }
/* small labels: sentence case, no wide tracking */
.ai-label, .sg-label, .examples .ex-label, .h-group, .h-rail .vlabel, .info h3, .phone-card h3, .tbar h3, .mt-head h3, .mt-label,
.wp-kicker, .wprev h4, .dna-row > .k, .bprices span, .bcard .img .from-badge {
  text-transform: none; letter-spacing: 0;
}
.sg-label, .examples .ex-label, .h-group, .wprev h4, .dna-row > .k, .mt-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.info h3, .phone-card h3, .tbar h3, .mt-head h3 { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- top bar: a plain white bar, as in the panel ---------- */
.topbar, .topbar.scrolled { height: 61px; padding: 0 24px; background: var(--th-paper, #fff); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand b { font: 600 15px/1.2 var(--sans); letter-spacing: -.01em; text-transform: none; }
.brand small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; margin-top: 2px; }
/* Staff: this page is the admin panel's "Design Finder" section, not an app nested inside it. The admin sidebar sits
   on the left as its icon rail (ui/admin-rail.js sets html.df-railed before the first paint) with the gold ring as
   the logo, so the top bar reads like the admin one: "Design Finder / Admin panel", no second logo. */
.brand .sub-staff { display: none; }
@media (min-width: 721px) { html.df-railed .topbar .brand .logo { display: none; } }
@media (min-width: 901px) { html.df-railed .brand .sub-cust { display: none; } html.df-railed .brand .sub-staff { display: block; } }
.logo { width: 34px; height: 34px; }
.top-actions { gap: 8px; }
.top-btn { height: 38px; padding: 0 14px 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--th-paper, #fff); font: 600 13.5px var(--sans); color: var(--ink);
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease); }
.top-btn:hover { background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); transform: none; }
.top-btn[aria-pressed="true"] { background: var(--gold-tint); border-color: var(--gold-line); color: var(--accent-ink); transform: none; }
.top-btn:active { transform: scale(.97); }
.top-btn svg { color: var(--muted); }
.top-btn[aria-pressed="true"] svg { color: var(--gold); }
.top-btn .badge { background: var(--gold); border: 0; color: var(--th-on-fill, #fff); font-weight: 700; }
/* "On phone" and "Favourites": icon-only square buttons, like the theme (mode) button */
:is(#phoneBtn, #favBtn) { flex: none; width: 40px; height: 40px; padding: 0 !important; justify-content: center; border-radius: 999px;
  border: 1px solid var(--th-gold-line, #cddba7); background: var(--th-paper, #fff); color: var(--th-gold-text, #47702a);
  transition: border-color 150ms ease, background-color 300ms ease, transform 150ms cubic-bezier(.23, 1, .32, 1); }
:is(#phoneBtn, #favBtn):hover { border-color: var(--gold, #4e7a2e); background: var(--th-paper, #fff); }
:is(#phoneBtn, #favBtn):active { transform: scale(.94); }
:is(#phoneBtn, #favBtn):focus-visible { outline: 2px solid var(--gold, #4e7a2e); outline-offset: 2px; }
:is(#phoneBtn, #favBtn) svg { width: 18px; height: 18px; color: currentColor; }
#favBtn[aria-pressed="true"] { background: var(--gold-tint); border-color: var(--gold, #4e7a2e); }
:is(#phoneBtn, #favBtn) span:not(.badge) { display: none; }
#favBtn .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; border-radius: 999px; box-shadow: 0 0 0 2px var(--th-paper, #fff); }
.icon-btn { border-radius: var(--r); border-color: var(--line-strong); background: var(--th-paper, #fff); backdrop-filter: none; transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease); }
.icon-btn:hover { transform: none; background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); }
.icon-btn:active { transform: scale(.95); }
@media (min-width: 901px) { .history, .webpanel { top: 61px; height: calc(100vh - 61px); } }

/* ---------- page head and search ---------- */
.hero, .modes, .browse-row, .examples, .offline-note, .search, .manual-panel { max-width: 860px; margin-left: 0; margin-right: auto; }
.hero p.lead, .examples, .hero, .hero h1 { transition: none; }
.hero { text-align: left; padding: 40px 0 20px; }
.hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; max-width: none; opacity: 1; animation: none; transition: none; }
.hero p.lead { margin: 0; max-width: 68ch; font-size: 15px; color: var(--muted); opacity: 1; animation: none; }
.langs span { font-weight: 600; }
body.searched .hero { padding: 20px 0 14px; }
body.searched .hero h1 { font-size: 20px; margin: 0; }
.modes { justify-content: flex-start; margin-bottom: 12px; }
.modes .seg { opacity: 1; animation: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--th-paper, #fff); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.modes button { border-radius: 9px; height: 32px; padding: 0 12px; font: 600 13px var(--sans); color: var(--muted); transition: background-color 150ms ease, color 150ms ease; }
.modes button:hover { color: var(--ink); background: var(--bg2); }
.modes button[aria-selected="true"] { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); color: var(--btn-ink, #1d2f10); box-shadow: inset 0 0 0 1px var(--gold-line); }

.search { opacity: 1; animation: none; padding: 6px 6px 6px 16px; border-radius: var(--r-card); background: var(--th-paper, #fff); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); backdrop-filter: none; -webkit-backdrop-filter: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.search::before { display: none; }
.search:focus-within { transform: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.search #q:focus, .search #q:focus-visible { outline: none; }   /* the box's own gold border shows focus; no second frame inside */
.search.busy { border-color: var(--gold); }
.search textarea { font: 500 16px/1.45 var(--sans); min-height: 46px; padding: 11px 4px; overflow: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.search textarea::-webkit-scrollbar { display: none; width: 0; height: 0; }
.search textarea::placeholder { color: var(--th-muted, #8f8882); opacity: 1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.photo-btn { width: 44px; height: 44px; border-radius: var(--r); border-color: var(--line-strong); background: var(--th-paper, #fff); color: var(--muted); transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease); }
.photo-btn:hover { transform: none; background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); color: var(--ink); }
.photo-btn:active { transform: scale(.95); }
/* voice search: listening = red ring that grows with the voice; working = spinner */
.mic-btn { position: relative; }
.mic-btn[hidden] { display: none; }
.mic-btn .stop-i, .mic-btn .spin-i { display: none; }
.mic-btn::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 calc(2px + var(--lvl, 0) * 9px) color-mix(in srgb, var(--danger) 28%, transparent); transition: box-shadow 90ms linear, opacity 150ms; }
.mic-btn.listening { color: var(--th-on-fill, #fff); background: var(--danger); border-color: var(--danger); }
.mic-btn.listening:hover { color: var(--th-on-fill, #fff); background: var(--danger); border-color: var(--danger); }
.mic-btn.listening::after { opacity: 1; }
.mic-btn.listening .mic-i, .mic-btn.working .mic-i { display: none; }
.mic-btn.listening .stop-i { display: block; }
.mic-btn.working .spin-i { display: block; animation: mic-spin .8s linear infinite; }
.mic-btn.working { color: var(--gold, var(--tone2)); pointer-events: none; }
@keyframes mic-spin { to { transform: rotate(360deg); } }
.search.listening textarea { color: var(--muted); font-style: italic; }
@media (prefers-reduced-motion: reduce) { .mic-btn::after { transition: none; } .mic-btn.working .spin-i { animation-duration: 2.4s; } }
.photo-chip img { border-radius: 8px; box-shadow: 0 0 0 2px var(--gold); }
.drop-hint { border-color: var(--gold); color: var(--accent-ink); }

.primary, a.primary { height: 44px; padding: 0 18px; border-radius: var(--r); border: 0; background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); color: var(--btn-ink, #1d2f10); font: 600 14px var(--sans); letter-spacing: 0;
  box-shadow: none; transition: background-color 150ms ease, transform 150ms var(--ease); }
.primary::after { display: none; }
.primary:hover { background: var(--btn-fill-hover, linear-gradient(135deg, #d3e66b, #a7d68a)); transform: none; box-shadow: none; }
.primary:active { transform: scale(.97); }
.primary:hover svg { transform: none; }
.primary:disabled { opacity: .45; }
.m-foot .primary .m-n { background: rgba(255, 255, 255, .22); color: #fff; }
.ripple { display: none; }
.ghost { border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--th-paper, #fff); color: var(--ink); font: 600 13.5px var(--sans); padding: 0 14px; height: 38px;
  display: inline-flex; align-items: center; gap: 7px; transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease); }
.ghost:hover { background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); color: var(--ink); transform: none; }
.ghost:active { transform: scale(.97); }
.ghost svg { color: var(--muted); }
button.ghost:has(svg) { color: var(--ink); }
.ghost.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.linkish { font: 600 13px var(--sans); }

.suggest { border-radius: 12px; border-color: var(--line); box-shadow: var(--menu-shadow); animation: none; }
.sg { font-size: 14.5px; }
.sg::before { display: none; }
.sg:hover, .sg[aria-selected="true"] { background: var(--gold-tint); }
.sg .del { font: 600 12px var(--sans); }

.examples button, .empty.refused .try button { opacity: 1; animation: none; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--th-paper, #fff); backdrop-filter: none;
  height: 34px; padding: 0 12px; font-size: 13px; color: var(--ink); transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.examples button:hover, .empty.refused .try button:hover { transform: none; background: var(--gold-tint); border-color: var(--gold-line); color: var(--accent-ink); }
.examples button svg { color: var(--muted); }
.examples { justify-content: flex-start; margin-top: 14px; }
.examples .ex-label { text-align: left; opacity: 1; animation: none; }
.browse-row { justify-content: flex-start; margin-top: 12px; }
/* related searches under the result count: made from what this search's best matches have (/api/suggest) */
.related { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 2px; }
.related[hidden] { display: none; }
.related .rl-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.related button { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 12px;
  border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--th-paper, #fff); color: var(--ink);
  font: 500 13px var(--sans); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.related button:hover, .related button:focus-visible { background: var(--gold-tint); border-color: var(--gold-line); color: var(--accent-ink); }
.related button svg { width: 14px; height: 14px; flex: none; color: var(--muted); pointer-events: none; }
.related button .rl-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related button .rl-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.offline-note { border-radius: var(--r); border-color: var(--gold-line); background: var(--gold-tint); text-align: left; }

/* ---------- manual search ---------- */
.manual-panel { border-radius: var(--r-card); background: var(--th-paper, #fff); border-color: var(--line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; }
.m-foot { border-radius: 0 0 var(--r-card) var(--r-card); background: var(--th-paper, #fff); backdrop-filter: none; }
.m-read .linkish { color: var(--accent-ink); }

/* ---------- what the AI understood ---------- */
.understood > *, .dna-info > * { animation: none; }
.ai-label { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.ai-label::before { animation: none; box-shadow: none; background: var(--gold); }
.ai-label.smart { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--accent-ink); animation: none; }
.understood .tag { border-radius: 8px; background: var(--th-paper, #fff); border-color: var(--line-strong); padding: 4px 10px; }
.pick-btn { border-radius: var(--r); border-color: var(--line-strong); background: var(--th-paper, #fff); height: 34px; padding: 0 10px 0 12px; font: 600 13.5px var(--sans); transition: border-color 150ms ease, box-shadow 150ms ease; }
.pick-btn:hover, .pick.open .pick-btn { box-shadow: 0 0 0 3px var(--gold-tint); border-color: var(--gold); background: var(--th-paper, #fff); }
.pick-btn svg { color: var(--muted); }
.pick-list { border-radius: 12px; border-color: var(--line); box-shadow: var(--menu-shadow); animation: none; transform-origin: top left; }
.pick-list li { border-radius: 8px; font: 500 13.5px var(--sans); }
.pick-list li:hover, .pick-list li:focus { background: var(--bg2); color: var(--ink); }
.pick-list li[aria-selected="true"] { background: var(--gold-tint); color: var(--accent-ink); font-weight: 600; }
.pick-list li .tick { color: var(--gold); }
.statline b { font-size: 18px; color: var(--ink); }
.banner { border-radius: var(--r-card); background: var(--th-paper, #fff); backdrop-filter: none; animation: none; }
.banner img { border-radius: var(--r); box-shadow: none; border: 1px solid var(--line); background: var(--th-paper, #fff); }
.banner strong { font-size: 16px; color: var(--ink); }
/* "All categories", "Rings", "From other brands": a page heading, not a boxed bar */
.banner.headline { background: none; border: 0; box-shadow: none; padding: 6px 2px 2px; margin: 26px 0 10px; align-items: flex-end; }
.banner.headline .bh { margin: 0; font: 600 28px/1.15 var(--serif); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: lining-nums; }
.banner.headline .sub { font-size: 14px; margin-top: 4px; }

/* ---------- result cards: flat, a border on hover, no tilt ---------- */
.grid { gap: 16px; }
.card { border-radius: var(--r-card); animation: cardIn 180ms ease-out both; animation-delay: 0s; }
@keyframes cardIn { from { opacity: 0; } }
.tilt { border-radius: var(--r-card); background: var(--th-paper, #fff); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  transform: none !important; transition: border-color 150ms ease, box-shadow 150ms ease; will-change: auto; }
.card:hover .tilt { border-color: var(--line-strong); box-shadow: var(--lift); transition: border-color 150ms ease, box-shadow 150ms ease; }
.card:focus-visible .tilt { border-color: var(--gold); }
.tilt::after { display: none; }
.card:hover .img img { transform: none; }
.card .img { border-bottom: 1px solid var(--line); }
.card .body { padding: 12px 14px 14px; gap: 8px; }
.card .id { font-size: 15px; }
.card .sub { display: none !important; }
.card .tags span { border-radius: 6px; background: var(--bg2); border-color: var(--line); color: var(--ink-2, var(--th-ink-2, #44403c)); font-size: 11.5px; }
.more-like { border-radius: 8px; border-color: var(--line-strong); background: var(--th-paper, #fff); height: 32px; padding: 0 10px; font: 600 12.5px var(--sans); transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.more-like:hover { border-color: var(--gold-line); background: var(--gold-tint); color: var(--accent-ink); }
.more-like:hover svg { transform: none; }
.buy-btn { height: 38px; border-radius: var(--r); border: 0; background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); color: var(--btn-ink, #1d2f10); font: 600 13.5px var(--sans); letter-spacing: 0; box-shadow: none;
  transition: background-color 150ms ease, transform 150ms var(--ease); }
.buy-btn:hover { background: var(--btn-fill-hover, linear-gradient(135deg, #d3e66b, #a7d68a)); transform: none; box-shadow: none; }
.buy-btn:active { transform: scale(.97); }
.tryon-chip { border-radius: 8px; border-color: var(--line-strong); background: rgba(var(--th-paper-rgb, 255, 255, 255), .96); color: var(--ink); font: 600 12px var(--sans); box-shadow: 0 1px 2px rgba(41, 37, 36, .08); backdrop-filter: none;
  transition: background-color 150ms ease, border-color 150ms ease; }
.tryon-chip:hover { transform: none; background: var(--gold-tint); border-color: var(--gold-line); color: var(--accent-ink); }
.heart { border-color: var(--line-strong); background: rgba(var(--th-paper-rgb, 255, 255, 255), .96); backdrop-filter: none; transition: color 150ms ease, border-color 150ms ease, opacity 150ms ease, transform 150ms var(--ease); }
.heart:hover { transform: none; color: var(--gold); }
.heart:active { transform: scale(.92); }
.heart.on { color: var(--gold); }
.match { border-radius: 6px; font: 600 11.5px var(--sans); letter-spacing: 0; }
.match.m-same { background: var(--gold); border-color: var(--gold); color: var(--th-on-fill, #fff); }
.sw.on { box-shadow: 0 0 0 2px var(--gold); }
.sw:hover { transform: none; }
.skeleton .img { background: var(--bg2); animation: none; }
.skeleton .img svg { display: none; }
.skeleton .body div { background: var(--line); animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { 50% { opacity: .45; } }
.empty svg { color: var(--line-strong); }
.empty svg path { animation: none; stroke-dashoffset: 0; }
.empty h3 { font-size: 18px; }
.to-top { border-radius: var(--r); }

/* category tiles and brand designs */
.cat-tile { border-radius: var(--r-card); box-shadow: none; background: var(--th-paper, #fff); animation: cardIn 180ms ease-out both; transition: border-color 150ms ease, box-shadow 150ms ease; }
.cat-tile:hover { transform: none; border-color: var(--line-strong); box-shadow: var(--lift); }
.cat-tile:hover img { transform: none; }
.cat-tile .img { border-bottom: 1px solid var(--line); }
.cat-tile .name { font-size: 16px; }
.cat-tile .go { font-weight: 600; letter-spacing: 0; color: var(--accent-ink); }
.cat-tile.brands .name::after { content: none; }
.bcard .img .from-badge { border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(var(--th-paper-rgb, 255, 255, 255), .96); padding: 2px 7px; }
.bcard .img .new-badge { border-radius: 6px; background: var(--gold); box-shadow: none; font-weight: 600; letter-spacing: 0; }
.bcard.is-new .tilt { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.bprices div { border-radius: 8px; }
.bprices span { font-size: 10.5px; font-weight: 600; }
.bprices > div:only-child span { font-size: 11px; }
.bprices .ours { border-color: var(--gold-line); background: var(--gold-tint); }
.seller-btn { border-radius: var(--r); border-color: var(--line-strong); font: 600 13px var(--sans); letter-spacing: 0; transition: background-color 150ms ease, border-color 150ms ease; }
.seller-btn:hover { background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); }

/* ---------- design details and try-on dialogs ---------- */
dialog { border-radius: 16px; border-color: var(--line); box-shadow: 0 30px 80px -30px rgba(41, 37, 36, .4); }
dialog[open] { animation: dlgIn2 200ms var(--ease); }
dialog.closing { animation: dlgOut 160ms ease-out forwards; }
@keyframes dlgIn2 { from { opacity: 0; transform: scale(.97); } }
dialog::backdrop { background: rgba(41, 37, 36, .38); backdrop-filter: none; -webkit-backdrop-filter: none; }
.stage { background: var(--th-paper, #fff); }
.stage img, .stage video { animation: none; }
.stage a { border-radius: 8px; border-color: var(--line-strong); color: var(--ink); backdrop-filter: none; }
.stage a:hover { transform: none; background: var(--gold-tint); }
.info { gap: 16px; }
.info.first > * { animation: none; }
.info h2 { font-size: 22px; }
.strip button { border-radius: var(--r); background: var(--th-paper, #fff); transition: box-shadow 150ms ease; }
.strip button:hover { transform: none; border-color: var(--line-strong); }
.strip button.on { box-shadow: 0 0 0 2px var(--gold); }
.metals button { border-radius: var(--r); border-color: var(--line-strong); background: var(--th-paper, #fff); height: 36px; padding: 0 12px 0 8px; transition: background-color 150ms ease, border-color 150ms ease; }
.metals button:hover { transform: none; background: var(--bg2); }
.metals button.on { border-color: var(--gold); background: var(--gold-tint); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--gold); }
.tview { border-radius: 10px; }
.tview button { border-radius: 8px; font: 600 12.5px var(--sans); }
.mt-side { background: var(--bg2); }
.mt-tabs [role=tab][aria-selected=true] { border-color: var(--gold); }
.mt-tile, .mt-img, .mt-product, .mt-sel { border-radius: 12px; }
.mt-tile:hover { transform: none; }
.mt-tile.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.mt-tile.on .mt-check { background: var(--gold); border-color: var(--gold); }
.phone-card .qr { border-radius: 12px; }

/* ---------- search history ---------- */
.history { background: var(--th-paper, #fff); backdrop-filter: none; -webkit-backdrop-filter: none; }
.h-head h2 { font-size: 17px; }
.h-head h2 em { color: inherit; }
.h-filter { border-radius: var(--r); background: var(--th-paper, #fff); border-color: var(--line-strong); height: 36px; }
.h-filter:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.h-group { margin: 16px 10px 6px; }
.h-item { border-radius: var(--r); animation: none; transition: background-color 150ms ease, border-color 150ms ease; }
.h-item:hover, .h-item:focus-visible { transform: none; background: var(--bg2); border-color: var(--line); }
.h-item.active { background: var(--gold-tint); border-color: var(--gold-line); }
.h-item.active::before { display: none; }
.h-thumb { border-radius: 8px; background: var(--th-paper, #fff); }
.h-thumb svg { color: var(--muted); }
.h-meta b { color: var(--accent-ink); }
.h-empty svg { color: var(--line-strong); animation: none; }
.h-empty h3 { font-size: 16px; }
.h-skel { border-radius: var(--r); background: var(--bg2); animation: skel 1.2s ease-in-out infinite; }
.saved-pill { border-radius: 6px; border-color: var(--gold-line); background: var(--gold-tint); }
.h-rail .count { color: var(--accent-ink); }
.scrim { background: rgba(41, 37, 36, .28); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- photo search: design DNA ---------- */
.dna { border-radius: var(--r-card); background: var(--th-paper, #fff); box-shadow: none; animation: none; }
.dna-photo { border-radius: var(--r); }
.dna-box { border-color: var(--gold); animation: none; }
.dna-head strong { font-size: 20px; }
.trait { border-radius: 8px; border-color: var(--line-strong); background: var(--th-paper, #fff); font: 600 12.5px var(--sans); transition: background-color 150ms ease, border-color 150ms ease; }
button.trait:hover { transform: none; border-color: var(--gold-line); background: var(--gold-tint); }
.trait .plus { color: var(--gold); }
.trait.on { background: var(--gold-tint); border-color: var(--gold); color: var(--accent-ink); }
.same { border-radius: 12px; background: var(--gold-tint); border-color: var(--gold-line); }
.same img { border-radius: 8px; }
.same strong { font-size: 15px; }

/* ---------- favourites ---------- */
.favs { animation: none; }
.favs-head h2 { font-size: 24px; margin: 0; }
.tile { border-radius: var(--r-card); background: var(--th-paper, #fff); box-shadow: none; animation: cardIn 180ms ease-out both; transition: border-color 150ms ease, box-shadow 150ms ease; }
.tile:hover, .tile:focus-visible { transform: none; border-color: var(--line-strong); box-shadow: var(--lift); }
.tile:hover img { transform: none; }
.tile .cap { border-radius: var(--r); background: rgba(var(--th-paper-rgb, 255, 255, 255), .96); backdrop-filter: none; }

/* ---------- "From the web" panel ---------- */
/* switched off for the first release unless the server says so (WEB_PANEL=1): body gets .web-on */
body:not(.web-on) :is(#webBtn, #webPanel, #webFab, .web-like, [data-web-d]) { display: none !important; }
.webpanel { background: var(--th-paper, #fff); backdrop-filter: none; -webkit-backdrop-filter: none; }
.wp-kicker { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.wp-title { font-size: 16px; }
.wp-btn { border-radius: var(--r); border-color: var(--line-strong); }
.wp-btn:hover { background: var(--bg2); border-color: var(--th-line-2, #b8b3ae); }
.wframe { border-radius: var(--r); background: var(--th-paper, #fff); }
.wcard:hover .wframe img { transform: none; }
.wnew { border-radius: 6px; background: var(--gold-tint); border-color: var(--gold-line); }
.wprev .wframe { border-radius: 12px; }
.wprev .wactions a, .wprev .wactions button { border-radius: var(--r); font: 600 14px var(--sans); }
.wprev .wactions a { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); border: 0; color: var(--btn-ink, #1d2f10); }
.wprev .wactions a:hover { background: var(--btn-fill-hover, linear-gradient(135deg, #d3e66b, #a7d68a)); }
.web-fab { border-radius: var(--r); box-shadow: var(--menu-shadow); }

@media (max-width: 340px) { .top-actions { gap: 4px; } }   /* the narrowest phones: the bell fits with the gutter kept */
@media (max-width: 560px) {
  .topbar, .topbar.scrolled { padding: 0 12px; }
  .brand b { font-size: 14px; letter-spacing: -.01em; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
  body.searched .hero h1 { font-size: 18px; }
  .hero p.lead { font-size: 13.5px; line-height: 1.45; max-height: none; }
  .langs { font-size: 12px; }
  .modes button { font-size: 12.5px; padding: 0 10px; height: 32px; }
  .grid { gap: 10px; }
}

@media (max-width: 640px) {
  /* Search history on mobile: brand off-canvas side drawer sitting below topbar */
  .history {
    position: fixed !important;
    top: 61px !important;
    left: 0 !important;
    right: auto !important;
    width: min(240px, 68vw) !important;
    max-width: 68vw !important;
    height: calc(100dvh - 61px) !important;
    height: calc(100vh - 61px) !important;
    border-radius: 0 18px 18px 0 !important;
    border-right: 1px solid var(--line) !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    box-shadow: 14px 0 36px -10px rgba(41, 37, 36, .22) !important;
    z-index: 46 !important;
    transform: translateX(-105%) !important;
    transition: transform .32s cubic-bezier(.23, 1, .32, 1) !important;
  }
  .history.mobile-open {
    transform: none !important;
  }
  .history .h-inner {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }
  .h-head {
    padding: 10px 12px 8px !important;
    background: var(--surface, #fff);
  }
  .h-head .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .h-head h2 {
    font-size: 15px;
    line-height: 1.2;
    margin: 0;
  }
  .h-tools {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
  }
  .h-filter {
    height: 33px;
    font-size: 12px;
    border-radius: 9px;
    flex: 1;
    min-width: 0;
    padding: 0 9px;
  }
  .linkish {
    font-size: 10.5px;
    padding: 3px 2px;
  }
  .h-list {
    padding: 6px 8px max(24px, env(safe-area-inset-bottom, 20px)) !important;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .h-item {
    grid-template-columns: 34px minmax(0, 1fr) 22px !important;
    gap: 7px !important;
    padding: 6px 7px !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .h-thumb {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
  }
  .h-q {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }
  .h-meta {
    font-size: 10px !important;
    margin-top: 1px !important;
  }
  .h-del {
    opacity: 0.7 !important;
    width: 22px !important;
    height: 22px !important;
  }
  .h-del:active {
    opacity: 1 !important;
    color: var(--danger) !important;
  }

  /* Right-hand side panels (try-on pictures and web panel) on mobile */
  .tonpanel, .webpanel {
    position: fixed !important;
    top: 61px !important;
    right: 0 !important;
    left: auto !important;
    width: min(280px, 72vw) !important;
    max-width: 72vw !important;
    height: calc(100dvh - 61px) !important;
    height: calc(100vh - 61px) !important;
    border-radius: 18px 0 0 18px !important;
    border-left: 1px solid var(--line) !important;
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
    box-shadow: -14px 0 36px -10px rgba(41, 37, 36, .22) !important;
    z-index: 46 !important;
    transform: translateX(105%) !important;
    transition: transform .32s cubic-bezier(.23, 1, .32, 1) !important;
  }
  .tonpanel.mobile-open, body.web-open .webpanel {
    transform: none !important;
  }
  .tp-inner, .wp-inner {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }
  .tp-head, .wp-head {
    padding: 12px 14px 10px !important;
  }

  /* Scrim below topbar */
  .scrim {
    top: 61px !important;
    height: calc(100dvh - 61px) !important;
    height: calc(100vh - 61px) !important;
    z-index: 44 !important;
  }

  /* Popups/Dialogs do not cover the whole screen; floating card with margins */
  dialog {
    width: min(580px, calc(100vw - 20px)) !important;
    max-height: calc(100dvh - 28px) !important;
    border-radius: 18px !important;
    margin: auto !important;
  }
  dialog.phone {
    width: min(400px, calc(100vw - 24px)) !important;
  }
  dialog.expert {
    width: min(460px, calc(100vw - 24px)) !important;
  }
  /* "AI estimate" card: a full-screen sheet on mobile instead of a small card floating
     over the still-open design-details dialog behind it (the two used to show through
     each other, and scrolling the price table chained into the dialog behind it). */
  dialog.est {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    background: var(--surface-solid) !important;
  }

  /* Design Details card view on mobile: full page type view like modern selling websites */
  dialog#dlg {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    inset: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    background: var(--surface-solid, #fff) !important;
    box-shadow: none !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }
  dialog#dlg:has(.page-loader) {
    display: grid !important;
    place-items: center !important;
  }
  dialog#dlg .page-loader {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    height: 100% !important;
    width: 100% !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }
  dialog#dlg .detail {
    grid-template-columns: 1fr !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  dialog#dlg .stage {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    position: relative !important;
    flex: none !important;
    background: radial-gradient(110% 90% at 50% 35%, var(--tile-a), var(--tile-b)) !important;
    touch-action: pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
  }
  dialog#dlg .stage img {
    cursor: default !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    pointer-events: none !important;
  }
  dialog#dlg .stage a {
    pointer-events: auto !important;
  }
  dialog#dlg .stage-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 0 6px !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    z-index: 2;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  dialog#dlg .stage-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: all .25s ease;
  }
  dialog#dlg .stage-dot.on {
    width: 18px;
    border-radius: 4px;
    background: var(--tone2, var(--gold));
  }
  dialog#dlg .info {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 20px 18px 48px !important;
    gap: 18px !important;
  }
  dialog#dlg .strip button {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
  }
  dialog#dlg .strip img {
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  dialog#dlg .info .close {
    position: fixed !important;
    top: 14px !important;
    left: 14px !important;
    right: auto !important;
    z-index: 60 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(var(--th-paper-rgb, 255, 255, 255), .88) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid var(--line-strong) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14) !important;
    color: var(--ink) !important;
    display: inline-grid !important;
    place-items: center !important;
  }
  dialog#dlg .stage .heart {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 10 !important;
    width: 40px !important;
    height: 40px !important;
  }
  dialog#dlg .stage .share-fab {
    top: 62px !important;
    right: 14px !important;
    width: 40px !important;
    height: 40px !important;
  }
  dialog#dlg .info h2 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    padding-right: 0 !important;
    margin: 4px 0 0 !important;
    letter-spacing: -.01em !important;
  }
  dialog#dlg .info h3 {
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .14em !important;
    margin: 0 0 6px !important;
    color: var(--tone2, var(--gold)) !important;
  }
  dialog#dlg .metals {
    flex-wrap: nowrap !important;
  }
  dialog#dlg .strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 4px 6px !important;
    margin: -4px -4px 0 !important;
    scrollbar-width: none !important;
  }
  dialog#dlg .strip::-webkit-scrollbar {
    display: none !important;
  }
  dialog#dlg .strip button {
    flex: 0 0 60px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 12px !important;
  }
  dialog#dlg .strip button.on {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px var(--gold) !important;
  }
  body.staff.admin dialog#dlg .staff-tools {   /* admins only, like .staff-tools above (was dialog#dlg .staff-tools: showed to everyone on phones) */
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 2px 0 4px !important;
  }
  dialog#dlg .staff-tools button {
    height: 38px !important;
    font-size: 13px !important;
  }
  dialog#dlg .staff-tools button[data-l="delete"] {
    flex-basis: 100% !important;
  }
  dialog#dlg .actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 4px !important;
  }
  dialog#dlg .actions .primary {
    height: 46px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
  }
  dialog#dlg .actions .ghost {
    height: 42px !important;
    font-size: 13.5px !important;
    border-radius: 12px !important;
  }
  /* Pin "Proceed to buy" / "Try it on me" to the bottom of the screen on mobile, like a seller-site CTA bar; the rest of the sheet keeps scrolling underneath. */
  dialog#dlg .info { padding-bottom: 100px !important; }
  dialog#dlg .cta-sticky {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 55 !important;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) !important;
    background: var(--surface-solid, #fff) !important;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .1) !important;
  }
  dialog#dlg .cta-sticky .primary {
    flex: 1 1 0 !important;
    justify-content: center !important;
    padding: 0 14px !important;
  }
  dialog#dlg .cta-sticky .cta-full {
    display: none !important;
  }
  dialog#dlg .cta-sticky .cta-short {
    display: inline !important;
  }
  /* 2026-11-04: "Request quotation" is longer than the old "Buy now"; smaller text and padding keep it on one line in the bar */
  dialog#dlg .cta-sticky [data-buy-d] {
    font-size: 12.5px !important;
    padding: 0 6px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }
  @media (max-width: 359px) {
    dialog#dlg .cta-sticky [data-buy-d] {
      font-size: 11px !important;
      padding: 0 4px !important;
      letter-spacing: 0 !important;
    }
  }
  /* "Try it on me" next to it: the same text size as "Request quotation" */
  dialog#dlg .cta-sticky [data-tryon-d] { font-size: 12.5px !important; white-space: nowrap !important; }
  @media (max-width: 359px) {
    dialog#dlg .cta-sticky [data-tryon-d] { font-size: 11px !important; letter-spacing: 0 !important; }
  }

  /* Mobile Search Bar: proper height, compact mic/camera/enter buttons, visible single-line placeholder without internal scrollbar */
  .search {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 46px !important;
    padding: 4px 6px 4px 13px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
  .search textarea {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 0 !important;
    min-height: 24px !important;
    max-height: 80px !important;
    height: 24px !important;
    padding: 2px 2px !important;
    font: 500 13px/1.35 var(--sans) !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    resize: none !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .search textarea::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .search textarea::placeholder {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    color: var(--th-muted, #8f8882) !important;
  }
  .search .photo-btn, .search .mic-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 8px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
  }
  .search #go {
    width: 34px !important;
    height: 32px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
  }
  .search #go span {
    display: none !important;
  }
  .search .photo-btn svg, .search .mic-btn svg, .search #go svg {
    width: 16px !important;
    height: 16px !important;
  }
  .search .photo-chip {
    width: 32px !important;
    height: 32px !important;
  }
  .search .photo-chip img {
    border-radius: 6px !important;
  }

  /* Mobile Typography Hierarchy */
  .browse-pill, .chip { font-size: 12px; }
  .examples .ex-label { font-size: 10px; }
  .ex-btn { font-size: 12px; }
  .statline { font-size: 12px; }
  .ai-label { font-size: 10px; }

  /* Cards & Grid in 2-column mobile layout */
  .card .id { font-size: 13.5px !important; line-height: 1.3 !important; font-weight: 600 !important; }
  .card .sub { display: none !important; }
  .card .tags span { font-size: 10px !important; padding: 2px 7px !important; }
  .more-like { font-size: 11px !important; }
  .buy-btn { font-size: 11.5px !important; }
  .tryon-chip { font-size: 10.5px !important; }
  .cat-tile .name { font-size: 14.5px !important; }
  .cat-tile .count { font-size: 11.5px !important; }
  .cat-tile .go { font-size: 11.5px !important; }

  /* Modals & Dialogs Typography */
  .info { padding: 16px 16px 20px !important; }
  .info h2 { font-size: 19px !important; line-height: 1.25 !important; }
  .info h3 { font-size: 10px !important; letter-spacing: .18em !important; }
  .info .muted { font-size: 12.5px !important; line-height: 1.45 !important; }
  .facts { font-size: 11.5px !important; line-height: 1.45 !important; }
  .detail .l-about { font-size: 12.5px !important; line-height: 1.5 !important; }
  .metals button { font-size: 12px !important; }
  .banner strong { font-size: 15px !important; }
  .banner.headline .bh { font-size: 22px; }
  .banner.headline { margin: 18px 0 8px; }
  .banner .sub { font-size: 12px !important; }
  .phone-card h2 { font-size: 18px !important; line-height: 1.25 !important; }
  .phone-card h3 { font-size: 10px !important; }
  .phone-card .url { font-size: 11.5px !important; }
  .tbar h2 { font-size: 18px !important; }
  .tbar h3 { font-size: 10px !important; }
  .tbar .muted { font-size: 11.5px !important; }
  .expert label { font-size: 12px !important; }
  .expert .pick b { font-size: 13px !important; }
  .expert .pick small { font-size: 11px !important; }
  .est table { font-size: 12px !important; }
  .est th { font-size: 10.5px !important; }
  .est td small { font-size: 11px !important; }
  .est .price b { font-size: 18px !important; }
  .est .price span { font-size: 12px !important; }
  .est .wts { font-size: 12px !important; }
  .est .warn { font-size: 11.5px !important; line-height: 1.45 !important; }
}
body.drawer-open {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) { .card, .cat-tile, .tile { animation: none; } }
/* ---------- try-on pictures panel: the right-hand partner of the search history ----------
   Folds to a slim rail (count + the latest pictures as small squares); open, a scrollable
   grid of square pictures by day. Pictures still being made show the "AI at work" tile;
   any picture opens a full preview that scrolls between them. Phones: a drawer. */
.tonpanel {
  position: sticky; top: 61px; height: calc(100vh - 61px); width: 300px; flex: none; overflow: hidden;
  background: var(--th-paper, #fff); border-left: 1px solid var(--line); transition: width .55s var(--ease);
}
.tonpanel.collapsed { width: 68px; }
.tp-inner { width: 300px; height: 100%; display: flex; flex-direction: column; transition: opacity .3s, transform .5s var(--ease); }
.tonpanel.collapsed .tp-inner { opacity: 0; transform: translateX(30px); pointer-events: none; visibility: hidden; }
.tp-rail {
  position: absolute; inset: 0 0 0 auto; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 18px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.tonpanel.collapsed .tp-rail { opacity: 1; pointer-events: auto; transition-delay: .25s; }
.tp-rail .tp-ico { color: var(--accent-ink); display: grid; place-items: center; }
.tp-rail .tp-ico svg { width: 20px; height: 20px; }
.tp-rail .count { font-size: 11px; font-weight: 700; color: var(--accent-ink); }
.tp-rail .vlabel { writing-mode: vertical-rl; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tp-mini { display: grid; gap: 8px; margin-top: 4px; }
.tp-mini button { width: 42px; height: 42px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; position: relative;
  animation: tpPop .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: border-color .2s, translate .25s var(--ease); }
.tp-mini button:hover { border-color: var(--gold); translate: -2px 0; }
.tp-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-fold svg { transition: transform .5s var(--ease); }
.tonpanel.collapsed .tp-fold svg { transform: rotate(180deg); }

.tp-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.tp-head .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-head h2 { font: 600 17px/1.2 var(--sans); letter-spacing: -.015em; margin: 0; display: flex; align-items: center; gap: 8px; }
.tp-head h2 svg { width: 16px; height: 16px; color: var(--accent-ink); }
.tp-head .sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.tp-status { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 10px; border-radius: var(--r); background: var(--gold-tint); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; }
.tp-status .spin { width: 13px; height: 13px; }
.tp-list { flex: 1; overflow: auto; padding: 4px 14px 24px; overscroll-behavior: contain; scroll-behavior: smooth; }
.tp-group { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 2px 8px; }
.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-tile { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg2); cursor: pointer;
  transition: border-color .2s, box-shadow .3s, translate .35s var(--ease); }
.tp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale .6s var(--ease); }
.tp-tile:hover { border-color: var(--gold); box-shadow: var(--lift); translate: 0 -2px; }
.tp-tile:hover img { scale: 1.07; }
.tp-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tp-tile .tp-cap { position: absolute; inset: auto 0 0; padding: 14px 6px 5px; font-size: 10.5px; font-weight: 600; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62)); opacity: 0; translate: 0 6px; transition: opacity .25s, translate .3s var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-tile:hover .tp-cap, .tp-tile:focus-visible .tp-cap { opacity: 1; translate: 0 0; }
@media (hover: none) { .tp-tile .tp-cap { opacity: 1; translate: 0 0; } }
.tp-tile .tp-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
/* scroll reveal inside the panel, and new pictures arriving */
.tp-tile.tp-pre { opacity: 0; scale: .86; }
.tp-tile.tp-in { animation: tpPop .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes tpPop { from { opacity: 0; scale: .86; translate: 0 10px; } }
/* a picture that just finished "develops" out of the blur */
.tp-tile.tp-fresh img, .mt-card.fresh .mt-img img { animation: tpDevelop 1.4s var(--ease) both; }
.tp-tile.tp-fresh { animation: tpGlow 1.6s ease-out both; }
@keyframes tpDevelop { from { filter: blur(14px) saturate(0) brightness(1.25); scale: 1.12; } }
@keyframes tpGlow { 0% { box-shadow: 0 0 0 0 var(--glow, rgba(111, 159, 74, .5)); border-color: var(--gold); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- "the AI is at work" tile (panel and dialog) ---------- */
.ai-make { position: relative; isolation: isolate; }
.ai-make img { filter: blur(3px) saturate(.5) brightness(.95); scale: 1.06; }
.ai-make::before { content: ""; position: absolute; inset: -60%; z-index: -1; pointer-events: none;   /* behind the picture: only a 2px ring shows */
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--tone1, #bbd78b) 80%, var(--gold, #4e7a2e) 88%, transparent 96%);
  animation: tpSpin 2.6s linear infinite; }
.ai-make::after { content: ""; position: absolute; inset: 2px; z-index: 1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(var(--th-sheen-rgb, 255, 255, 255), .55) 50%, transparent 70%) 0 0 / 250% 100%,
              rgba(var(--th-paper-rgb, 255, 255, 255), .18);
  animation: tpSweep 2.2s ease-in-out infinite; }
.tp-tile.ai-make::after { inset: 2px; border-radius: 10px; }
.ai-make > img { position: relative; z-index: 0; }
.ai-make .ai-core { position: absolute; inset: 2px; z-index: 2; border-radius: 10px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--accent-ink); }
.ai-make .ai-core svg { width: 20px; height: 20px; filter: drop-shadow(0 0 6px var(--glow, rgba(111, 159, 74, .6))); animation: tpTwinkle 1.6s ease-in-out infinite; }
.ai-make .ai-core b { font: 700 10.5px var(--sans); color: var(--ink); background: rgba(var(--th-paper-rgb, 255, 255, 255), .88); padding: 1px 6px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tp-tile.ai-make { border-color: transparent; background: var(--th-paper, #fff); }
.tp-tile.ai-make > img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 10px; }
.tp-tile.ai-make.failed::before, .tp-tile.ai-make.failed::after { display: none; }
.tp-tile.ai-make.failed { border-color: var(--th-danger-line, #f2b8b5); }
.tp-tile.ai-make.failed .ai-core { color: var(--danger, #b91c1c); }
.tp-tile.ai-make.failed .ai-core svg { animation: none; filter: none; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes tpSpin { to { --ang: 360deg; } }
@keyframes tpSweep { 0% { background-position: 120% 0, 0 0; } 100% { background-position: -120% 0, 0 0; } }
@keyframes tpTwinkle { 50% { scale: .78; rotate: 45deg; opacity: .65; } }
/* the dialog's own waiting card wears the same look */
.mt-img.wait.ai-make { border-color: transparent; }
.mt-img.wait.ai-make > img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 14px; }
.mt-img.wait.ai-make::after { border-radius: 14px; }
.mt-img.wait.ai-make .mt-wait { z-index: 3; }

.tp-empty { text-align: center; padding: 40px 14px; color: var(--muted); font-size: 13px; }
.tp-empty .art { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: var(--gold-tint); color: var(--accent-ink); }
.tp-empty .art svg { width: 26px; height: 26px; animation: tpTwinkle 2.4s ease-in-out infinite; }
.tp-empty h3 { font-size: 15px; color: var(--ink); margin: 0 0 6px; font-weight: 600; }
#tonBtn { display: none; }

/* ---------- full preview: scroll between pictures ---------- */
.tp-view { width: min(1100px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 22px;
  background: var(--th-paper, #fff); color: var(--ink); overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .5); }
.tp-view[open] { display: flex; flex-direction: column; }
.tp-view::backdrop { background: rgba(15, 18, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tv-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.tv-info { flex: 1; min-width: 0; }
.tv-info b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-info span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-info.swap { animation: tvSwap .4s var(--ease); }
@keyframes tvSwap { from { opacity: 0; translate: 0 6px; } }
.tv-acts { display: flex; gap: 8px; align-items: center; }
.tv-acts .ghost.sm { height: 36px; }
.tv-stage { position: relative; flex: 1; min-height: 0; background: var(--bg2); }
.tv-track { height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.tv-track::-webkit-scrollbar { display: none; }
.tv-track:focus { outline: none; }
.tv-track:focus-visible { outline: none; }   /* arrows and swipes move it; a frame round the whole picture area only distracts */
.tv-slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; padding: 22px 70px; box-sizing: border-box; container-type: size; }
.tv-slide img { max-width: 100cqw; max-height: 100cqh; object-fit: contain; border-radius: 14px; box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .45); }
@supports (animation-timeline: view()) {
  .tv-slide img { animation: tvFocus linear both; animation-timeline: view(x); }
  @keyframes tvFocus { 0% { scale: .82; opacity: .25; filter: blur(4px); } 50% { scale: 1; opacity: 1; filter: none; } 100% { scale: .82; opacity: .25; filter: blur(4px); } }
}
.tv-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--th-paper, #fff); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--lift); transition: opacity .25s, scale .2s var(--ease); }
.tv-nav:hover { scale: 1.06; }
.tv-nav:disabled { opacity: 0; pointer-events: none; }
.tv-nav svg { width: 20px; height: 20px; }
.tv-nav.prev { left: 14px; } .tv-nav.next { right: 14px; }
.tv-count { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; z-index: 2; font: 600 12px var(--sans); color: var(--ink); background: rgba(var(--th-paper-rgb, 255, 255, 255), .9); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tv-strip { display: flex; gap: 8px; padding: 12px 16px 14px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; border-top: 1px solid var(--line); }
.tv-strip button { flex: none; width: 58px; height: 58px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--bg2); cursor: pointer; opacity: .6;
  transition: opacity .25s, border-color .25s, scale .3s var(--ease); }
.tv-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-strip button:hover { opacity: 1; }
.tv-strip button.on { opacity: 1; border-color: var(--gold); scale: 1.06; }

@media (max-width: 1200px) and (min-width: 901px) { .tonpanel:not(.collapsed) { width: 260px; } .tp-inner { width: 260px; } }
@media (max-width: 900px) {
  .tonpanel { position: fixed; z-index: 46; top: 61px; right: 0; left: auto; height: calc(100dvh - 61px); height: calc(100vh - 61px); width: min(285px, 72vw) !important; max-width: 72vw !important; border-radius: 18px 0 0 18px; transform: translateX(105%); transition: transform .32s cubic-bezier(.23, 1, .32, 1);
    box-shadow: -14px 0 36px -10px rgba(41, 37, 36, .22); border-left: 1px solid var(--line); border-top: none; border-bottom: none; border-right: none; }
  .tonpanel.mobile-open { transform: none; }
  .tonpanel.collapsed .tp-fold svg { transform: none; }   /* the drawer closes to the right */
  .tonpanel .tp-inner { width: 100%; opacity: 1 !important; transform: none !important; visibility: visible !important; pointer-events: auto !important; }
  .tp-rail { display: none; }
  body.has-tryons #tonBtn { display: inline-flex; }
}
@media (max-width: 640px) {
  .tp-view { width: min(720px, calc(100vw - 16px)); height: min(90dvh, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; margin: auto; }
  .tv-top { padding: 10px 10px 10px 16px; flex-wrap: wrap; }
  .tv-acts .ghost.sm span { display: none; }
  .tv-slide { padding: 12px; }
  .tv-nav { display: none; }
  .tv-strip button { width: 50px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-make::before, .ai-make::after, .ai-make .ai-core svg, .tp-empty .art svg { animation: none; }
  .tv-slide img { animation: none; }
  .tv-track, .tp-list, .tv-strip { scroll-behavior: auto; }
}
/* phones: headings scale with the screen (320px → 720px) instead of staying at one size;
   form fields at 16px so iPhones don't zoom the page when one is tapped */
@media (max-width: 720px) {
  .hero h1 { font-size: clamp(22px, 15.6px + 2vw, 30px); }
  body.searched .hero h1 { font-size: clamp(18px, 16.4px + .5vw, 20px); }
  .favs-head h2 { font-size: clamp(20px, 16.8px + 1vw, 24px); }
  .dna-head strong { font-size: clamp(17px, 14.6px + .75vw, 20px); }
  .info h2 { font-size: clamp(19px, 16.6px + .75vw, 22px) !important; }   /* !important: matches the phone rules above */
  dialog#dlg .info h2 { font-size: clamp(19px, 16.6px + .75vw, 22px) !important; }
  .tbar h2 { font-size: clamp(18px, 16.4px + .5vw, 20px) !important; }
  .banner.headline .bh { font-size: clamp(20px, 13.6px + 2vw, 28px); }
  .est .price b { font-size: clamp(18px, 13.2px + 1.5vw, 24px) !important; }
  .phone-card h2 { font-size: clamp(18px, 14.8px + 1vw, 22px) !important; }
  .mt-head h2 { font-size: clamp(19px, 15.8px + 1vw, 23px); }
  .mt-pickhead h2 { font-size: clamp(20px, 15.2px + 1.5vw, 26px); }
  input, select, textarea { font-size: 16px; }
  .h-filter { font-size: 16px; }
  .search textarea { font-size: 16px !important; }   /* the main search box: still fits its 24px line */
}

/* ---------- "Browse all categories" sits beside the search bar (home page only) ---------- */
.search-line { display: flex; align-items: center; gap: 12px; }
.search-line > .search { flex: 1 1 auto; min-width: 0; margin: 0; }
.search-line > .browse-row { flex: 0 0 auto; margin-top: 0; }
.search-line > .browse-row .browse-btn { white-space: nowrap; }
@media (max-width: 720px) {
  .search-line { flex-wrap: wrap; }
  .search-line > .search { flex-basis: 100%; }
  .search-line > .browse-row { margin-top: 0; }
}
/* the Categories button wears the search bar's border */
.search-line > .browse-row .browse-btn { border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: var(--shadow); transition: border-color 150ms ease, box-shadow 150ms ease; }
.search-line > .browse-row .browse-btn:hover, .search-line > .browse-row .browse-btn:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); outline: none; }
@media (max-width: 640px) { .search-line > .browse-row .browse-btn { border-radius: 16px; } }
/* the Categories button is as tall as the search bar */
.search-line { align-items: stretch; }
.search-line > .browse-row { display: flex; }
.search-line > .browse-row .browse-btn { height: auto; min-height: 60px; padding: 0 18px; }
@media (max-width: 640px) { .search-line > .browse-row .browse-btn { min-height: 46px; } }

/* ---------- design preview: angle thumbnails under the photo (2026-11-18) ---------- */
dialog#dlg .d-media { min-width: 0; }
dialog#dlg .d-angles { padding: 12px 16px 16px; }
@media (min-width: 761px) {
  dialog#dlg .d-media { position: sticky; top: 0; align-self: start; }   /* photo + angles stay in view while the details scroll */
  dialog#dlg .d-media .stage { position: relative; }
}
@media (max-width: 760px) {
  dialog#dlg .d-media { width: 100%; flex: none; }
  dialog#dlg .d-angles { padding: 8px 18px 0 !important; margin: 0 !important; }
}

/* ---------- design preview: "Request quotation" is the highlighted (gold) button on laptop/desktop too (2026-11-18) ---------- */
@media (min-width: 641px) {
  dialog#dlg .d-grid .primary[data-buy-d] { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); border-color: var(--gold); color: var(--btn-ink, #1d2f10); }
  dialog#dlg .d-grid .primary[data-buy-d] svg { color: currentColor; }
  dialog#dlg .d-grid .primary[data-buy-d]:hover { background: var(--btn-fill-hover, linear-gradient(135deg, #d3e66b, #a7d68a)); border-color: var(--gold-hover); }
}

/* ---------- design preview: "Chat with our expert" became the "Ask" button (see the button block below, 2026-11-18) ---------- */


/* ---------- design preview buttons (2026-11-18): Request quotation across the top; Try on (+ Live try-on beside it when the design has one) and Ask below ---------- */
@media (min-width: 641px) {
  dialog#dlg .d-sec-buy .d-grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "buy buy" "try ask"; gap: 10px; }
  dialog#dlg .d-sec-buy .d-grid:has([data-live-d]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "buy buy buy" "try live ask"; }
  dialog#dlg .d-sec-buy .d-grid:not(:has([data-tryon-d])) { grid-template-areas: "buy buy" "live ask"; }
  dialog#dlg .d-sec-buy .d-grid:not(:has([data-tryon-d])):not(:has([data-live-d])) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "buy" "ask"; }
  dialog#dlg .d-sec-buy [data-buy-d] { grid-area: buy; height: 52px; border-radius: 12px; font-size: 15px; }
  dialog#dlg .d-sec-buy [data-tryon-d] { grid-area: try; }
  dialog#dlg .d-sec-buy [data-live-d] { grid-area: live; }
  dialog#dlg .d-sec-buy .d-expert { grid-area: ask; width: auto; padding: 0 18px; color: var(--ink); }
  dialog#dlg .d-sec-buy .d-expert svg { color: currentColor; }
  dialog#dlg .d-sec-buy :is([data-tryon-d], [data-live-d]) { height: 48px; border-radius: 12px; border: 1px solid var(--gold); background: var(--gold-tint); color: var(--accent-ink); }
  dialog#dlg .d-sec-buy :is([data-tryon-d], [data-live-d]):hover { background: var(--gold-tint); border-color: var(--gold-hover); }
  dialog#dlg .d-sec-buy :is([data-tryon-d], [data-live-d]) svg { color: var(--tone2); }
  dialog#dlg .d-sec-buy .d-expert { height: 48px; border-radius: 12px; }
}
@media (max-width: 640px) {   /* phones: the bottom bar keeps Request quotation + Try on, with Ask as an icon */
  dialog#dlg .cta-sticky .d-expert { flex: 0 0 46px; width: 46px; height: 46px !important; padding: 0; border-radius: 12px !important; }
  dialog#dlg .cta-sticky .d-expert span { display: none; }
}


/* ---------- Home "All categories": small cards like the "My designs" tiles (2026-11-18, this view only) ---------- */
.grid:has(> .cat-tile) { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.grid > .cat-tile { align-items: stretch; gap: 0; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: 14px; box-shadow: none;
  background: var(--surface-solid, var(--th-paper, #fff)); transition: border-color .15s, box-shadow .2s, transform .2s; }
.grid > .cat-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--lift, var(--shadow)); }
.grid > .cat-tile .img { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.grid > .cat-tile .name { padding: 7px 10px 0; font: 600 12.5px/1.35 var(--sans) !important; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid > .cat-tile .count { padding: 0 10px 9px; font-size: 11.5px !important; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid > .cat-tile .go { display: none; }
@media (max-width: 560px) { .grid:has(> .cat-tile) { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; } }

/* ---------- design preview: close (×) button without a border (2026-11-18) ---------- */
dialog#dlg .info .close { border: 0 !important; }

/* ---------- design preview: "Explore More" → one "More like this" row (2026-11-18) ---------- */
dialog#dlg .d-more { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; margin: 0; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--th-paper, #fff); color: var(--ink); font: 500 15px var(--sans); text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
dialog#dlg .d-more:hover, dialog#dlg .d-more:focus-visible { border-color: var(--gold); outline: none; }
dialog#dlg .d-more-img { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
dialog#dlg .d-more-img img { width: 100%; height: 100%; object-fit: contain; }
dialog#dlg .d-more-t { flex: 1; min-width: 0; }
dialog#dlg .d-more-chev { flex: none; width: 18px; height: 18px; color: var(--ink); }
dialog#dlg .d-more + .d-grid { margin-top: 8px; }
/* phones: "Request quotation" on the catalogue cards one size smaller so it fits the button (2026-11-18) */
@media (max-width: 640px) {
  .card .buy-btn { font-size: 11px !important; gap: 4px; padding: 0 6px; letter-spacing: 0; min-width: 0; }
  .card .buy-btn svg { width: 13px; height: 13px; }
  .card .buy-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* phones: the card's "Request quotation" button reaches closer to the card edges (6px each side) and keeps
   less padding inside, so the whole text fits; the rest of the card keeps its padding (2026-11-18) */
@media (max-width: 640px) {
  .card .body > .buy-btn { margin: auto -8px 0; padding: 0 3px; }
}
/* phones: design preview bottom bar with less space between and around the buttons, so they grow; "Request quotation"
   gets the larger share so its whole text fits (2026-11-18). This popup's bar on phones only. */
@media (max-width: 640px) {
  dialog#dlg .cta-sticky { gap: 6px !important; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important; }
  dialog#dlg .cta-sticky [data-buy-d] { flex: 1.45 1 0 !important; min-width: 0; font-size: 12px !important; padding: 0 6px !important; gap: 5px !important; letter-spacing: 0 !important; }
  dialog#dlg .cta-sticky [data-tryon-d] { flex: 1 1 0 !important; min-width: 0; font-size: 12px !important; padding: 0 6px !important; gap: 5px !important; letter-spacing: 0 !important; }
  dialog#dlg .cta-sticky :is([data-buy-d], [data-tryon-d]) span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  dialog#dlg .cta-sticky :is([data-buy-d], [data-tryon-d]) svg { width: 14px; height: 14px; flex: none; }
}
/* "History" (shown up to 900px wide): the same round icon button as Favourites and the theme button beside it (2026-11-18) */
@media (max-width: 900px) {
  #histBtn { flex: none; width: 40px; height: 40px; padding: 0 !important; justify-content: center; border-radius: 999px;
    border: 1px solid var(--th-gold-line, #cddba7); background: var(--th-paper, #fff); color: var(--th-gold-text, #47702a);
    transition: border-color 150ms ease, background-color 300ms ease, transform 150ms cubic-bezier(.23, 1, .32, 1); }
  #histBtn:hover { border-color: var(--gold, #4e7a2e); background: var(--th-paper, #fff); }
  #histBtn:active { transform: scale(.94); }
  #histBtn:focus-visible { outline: 2px solid var(--gold, #4e7a2e); outline-offset: 2px; }
  #histBtn svg { width: 18px; height: 18px; color: currentColor; }
  #histBtn[aria-expanded="true"] { background: var(--gold-tint); border-color: var(--gold, #4e7a2e); }
}

/* ---------- close (×) buttons without a border (2026-11-19): design/try-on/info dialogs, viewer, web panel, full-res preview ---------- */
.icon-btn.close, .icon-btn[data-v="x"], .wp-btn#wpClose, .pv-close { border: 0 !important; }

/* ---------- finder: "AI Smart Filters" (2026-11-19). Only the #understood row on this page.
   The label is a heading on its own line; the filters under it share one height, text size and alignment. ---------- */
#understood { align-items: center; gap: 8px; }
#understood .ai-label.smart { flex: 0 0 100%; margin: 0 0 2px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
#understood .pick { display: inline-flex; }
#understood .pick-btn, #understood .tag, #understood .read { box-sizing: border-box; height: 32px; display: inline-flex; align-items: center; font-size: 13px; line-height: 1; }
#understood .pick-btn { padding: 0 10px 0 12px; }
#understood .tag { padding: 0 12px; }
#understood .read { height: auto; min-height: 32px; padding: 6px 12px; line-height: 1.35; }   /* a long "Read as …" may wrap */
@media (max-width: 480px) {
  #understood .ai-label.smart { font-size: 14px; }
}
/* phones: form fields in the page's own font (not the browser's default), placeholders and the chosen value in drop-downs
   at 14px, closer to the small field names above them (they were 16px and looked oversized), 2026-11-19. Typed text
   stays 16px so iPhones don't zoom. Fields with their own font or size rule keep it. Phones only. */
@media (max-width: 720px) {
  html body :is(input, select, textarea) { font-family: inherit; }
  html body :is(input, textarea)::placeholder { font-size: min(14px, 1em); }
  html body select:not([multiple]) { font-size: 14px; }
}

/* ---------- "From other brands" cards on phones (2026-11-19) ----------
   In the two-column grid the Seller / Ours from boxes were too narrow: prices ran into each other and
   "Ours from" was cut. On phones each box takes the card's full width, its label above the price. */
@media (max-width: 720px) {
  .bcard .bprices { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .bcard .bprices > div, .bcard .bprices > div:only-child { display: block; padding: 5px 9px; }
  .bcard .bprices span, .bcard .bprices > div:only-child span { font-size: 10.5px; line-height: 1.3; }
  .bcard .bprices b, .bcard .bprices > div:only-child b { display: block; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- AI generation tools, quick access (finder page only, 2026-11-23) ----------
   Desktop: icons under the history icon in the folded history rail. A fresh page: a card under the search bar,
   gone once anything is searched (body.searched) and in manual search (no search bar there). Buyers only. */
.h-ai { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); width: 40px; }
.h-ai-btn { width: 38px; height: 38px; color: var(--tone2); text-decoration: none; }
.h-ai-btn svg { width: 18px; height: 18px; }
.h-ai-btn:hover { transform: translateX(2px); border-color: var(--line-strong); }
.ai-card { margin: 22px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.aic-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aic-badge { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-tint); color: var(--accent-ink); }
.aic-badge svg { width: 17px; height: 17px; }
.aic-head h2 { font: 600 19px/1.15 var(--sans); margin: 0; letter-spacing: -.015em; }
.aic-head h2 em { font-style: normal; font-weight: 600; color: var(--accent-ink); }
.aic-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.aic-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.aic-tool { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid);
  color: var(--ink); text-decoration: none; transition: transform .35s var(--ease), border-color .3s, background .3s; }
.aic-tool:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--chip); }
.aic-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg2); color: var(--tone2); }
.aic-ico svg { width: 18px; height: 18px; }
.aic-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aic-t b { font-size: 14px; font-weight: 600; }
.aic-t small { font-size: 12px; line-height: 1.35; color: var(--muted); }
body.searched .ai-card, body.manual .ai-card, body.staff .ai-card, body.staff .h-ai { display: none !important; }
/* the suggested searches above the card: their 200px cap (made for the slide-closed on search, which this page turns off)
   let phones' one-chip-per-line list spill into the card. Uncapped until a search; body.searched still folds them to 0. */
body:not(.searched) .examples { max-height: none; }
@media (max-width: 560px) {
  .ai-card { padding: 16px; margin-top: 20px; border-radius: 16px; }
  .aic-head { gap: 12px; margin-bottom: 14px; }
  .aic-head h2 { font-size: 18px; }
  .aic-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .aic-tool { flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; }
  .aic-t small { font-size: 11.5px; }
}
@media (max-width: 340px) { .aic-tools { grid-template-columns: minmax(0, 1fr); } .aic-tool { flex-direction: row; } }
