/* The fonts, served from the site itself (Latin and Latin Extended; one variable file covers every weight). */
@font-face { font-family: 'Dancing Script'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url(../fonts/dancing-script-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Dancing Script'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url(../fonts/dancing-script-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(../fonts/nunito-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(../fonts/nunito-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Demure prototype styles. Mobile-first. Palette: baby blue, blush pink, soft teal, warm ivory. */
:root {
  --ivory: #fff9f1;
  --ivory-2: #fbf1e4;
  --blue: #bfe0f5;
  --blue-soft: #e6f3fb;
  --blue-deep: #4f8fb8;
  --pink: #f8c9d1;
  --pink-soft: #fdeef1;
  --pink-deep: #c7637a;
  --teal: #2f8f8a;
  --teal-dark: #23706c;
  --teal-soft: #dff1ef;
  --ink: #2f3a40;
  --ink-2: #5a676e;
  --ink-3: #7d8a91;
  --line: #ece2d6;
  --white: #ffffff;
  --danger: #b4233c;
  --danger-soft: #fde7ea;
  --warning: #9a6200;
  --warning-soft: #fff3d9;
  --success: #1f7a52;
  --success-soft: #e2f5ec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(79, 143, 184, 0.10), 0 1px 3px rgba(47, 58, 64, 0.06);
  --shadow-lg: 0 16px 48px rgba(47, 58, 64, 0.16);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --script: 'Dancing Script', 'Brush Script MT', cursive;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--ivory);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.script { font-family: var(--script); color: var(--teal); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.center { text-align: center; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
main { min-height: calc(100vh - var(--header-h)); }
.page { padding-top: 20px; padding-bottom: 96px; }
@media (min-width: 900px) { .page { padding-top: 32px; padding-bottom: 64px; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 249, 241, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); height: var(--header-h);
}
.site-header .container { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.brand img { height: 40px; width: auto; mix-blend-mode: multiply; }
@media (max-width: 480px) { .site-header .tag { display: none; } .site-header .btn.sm span { display: none; } }
.brand .wordmark { white-space: nowrap; font-family: var(--script); font-size: 2rem; color: var(--teal); font-weight: 700; line-height: 1; margin-top: -4px; }
.nav-links { display: none; gap: 4px; margin-left: 16px; }
.nav-links a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.nav-links a:hover { background: var(--blue-soft); color: var(--ink); }
.nav-links a.active { background: var(--teal-soft); color: var(--teal-dark); }
.header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--ink); text-decoration: none;
}
.icon-btn:hover { background: var(--blue-soft); }
.icon-btn svg { width: 24px; height: 24px; }
.badge-count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--pink-deep); color: #fff; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* bottom nav (mobile customer) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom);
}
.kb-open .bottom-nav { display: none; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; text-decoration: none; color: var(--ink-3); font-size: .72rem; font-weight: 700; position: relative; }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.active { color: var(--teal-dark); }
.bottom-nav .badge-count { top: 4px; right: calc(50% - 22px); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--teal); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--white); color: var(--teal-dark); border-color: #b9dcd8; }
.btn.secondary:hover { background: var(--teal-soft); }
.btn.pink { background: var(--pink-deep); }
.btn.pink:hover { background: #ad4f66; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--blue-soft); color: var(--ink); }
.btn.danger { background: var(--white); color: var(--danger); border-color: #f1b8c2; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .9rem; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--white); transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 143, 138, .15); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 700; pointer-events: none; }
.input-group .input { padding-left: 42px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; }
.pill-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-weight: 700;
  color: var(--ink-2); cursor: pointer; text-decoration: none; font-size: .9rem; white-space: nowrap;
}
.pill:hover { border-color: #b9dcd8; }
.pill.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- cards ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card h2, .card h3 { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--ink); font-size: .92rem; }
.notice svg { flex: none; width: 22px; height: 22px; color: var(--blue-deep); margin-top: 1px; }
.notice.pink { background: var(--pink-soft); }
.notice.pink svg { color: var(--pink-deep); }
.notice.warning { background: var(--warning-soft); }
.notice.warning svg { color: var(--warning); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.tag.in { background: var(--success-soft); color: var(--success); }
.tag.low { background: var(--warning-soft); color: var(--warning); }
.tag.out { background: var(--danger-soft); color: var(--danger); }
.tag.partial { background: var(--warning-soft); color: var(--warning); }
.tag.neutral { background: var(--ivory-2); color: var(--ink-2); }
.tag.blue { background: var(--blue-soft); color: var(--blue-deep); }
.tag.pink { background: var(--pink-soft); color: var(--pink-deep); }
.tag.teal { background: var(--teal-soft); color: var(--teal-dark); }

/* ---------- auth ---------- */
.auth-wrap {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; overflow: hidden;
  background: radial-gradient(circle at 15% 10%, var(--blue-soft), transparent 45%), radial-gradient(circle at 90% 90%, var(--pink-soft), transparent 45%), var(--ivory);
}
.auth-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.auth-bg canvas { opacity: 0; animation: sceneIn 1.6s .2s ease forwards; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--white); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 28px 24px;
  animation: cardIn .7s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-card > * { animation: fadeUp .55s cubic-bezier(.22, 1, .36, 1) both; }
.auth-card > *:nth-child(1) { animation-delay: .15s; }
.auth-card > *:nth-child(2) { animation-delay: .22s; }
.auth-card > *:nth-child(3) { animation-delay: .29s; }
.auth-card form { animation-delay: .36s; }
.auth-card > *:nth-child(n+5) { animation-delay: .5s; }
.auth-card.auth-card-out { animation: cardOut .32s ease both; }
.auth-logo { display: flex; justify-content: center; }
.auth-logo { display: flex; flex-direction: column; align-items: center; }
.logo-anim { width: 240px; max-width: 100%; margin: 0 auto; }
.logo-anim img, .logo-anim canvas { width: 100%; display: block; }
.wordmark-lg { font-size: 2.2rem; line-height: 1; margin: -2px 0 8px; }
.auth-card .logo { animation: floaty 5s ease-in-out infinite; }
.auth-card h1 { text-align: center; font-size: 1.25rem; }
.auth-submit {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--teal), var(--teal-dark));
  background-size: 160% 100%;
  transition: background-position .3s, transform .15s, box-shadow .3s;
  box-shadow: 0 6px 18px rgba(47, 143, 138, .25);
}
.auth-submit:hover { background-position: 100% 0; box-shadow: 0 8px 24px rgba(47, 143, 138, .35); }
.auth-submit:active { transform: translateY(1px) scale(.99); }
.auth-submit::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg); animation: sheen 3.2s ease-in-out infinite;
}
.auth-card .form-error { animation: shake .35s ease; }
.demo-logins { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.demo-logins .row { gap: 8px; }
.auth-signup { margin-top: 16px; background: var(--pink-soft); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.loc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.loc-row:last-child { margin-bottom: 0; }
.demo-logins .btn { transition: transform .15s, box-shadow .15s; }
.demo-logins .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(79, 143, 184, .18); }
.contact-strip { margin-top: 16px; font-size: .82rem; color: var(--ink-2); text-align: center; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes cardOut { to { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes sceneIn { to { opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sheen { 0%, 55% { left: -60%; } 90%, 100% { left: 130%; } }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 28px 22px; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft) 70%, var(--ivory-2));
}
.hero .hero-inner { position: relative; z-index: 1; max-width: 520px; }
.hero-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .6; }
.hero-scene canvas { opacity: 0; animation: sceneIn 1.4s .15s ease forwards; }
.hero h1 { font-size: 1.7rem; }
.hero h1 .script { font-size: 2.4rem; display: block; line-height: 1; }
.hero .hero-art { width: 70%; max-width: 380px; margin: 16px auto 0; mix-blend-mode: multiply; }
.hero .hero-art img { width: 100%; display: block; }
@media (min-width: 800px) {
  .hero { padding: 48px 48px; display: flex; align-items: center; }
  .hero h1 { font-size: 2.1rem; }
  .hero h1 .script { font-size: 3.4rem; }
  .hero .hero-art { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); width: 40%; margin: 0; z-index: 1; }
}
.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
.cat-card {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--white); box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.cat-card .cat-name { font-weight: 800; font-size: 1.05rem; }
.cat-card .cat-blurb { font-size: .82rem; color: var(--ink-2); }
.cat-card .cat-icon { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; margin-bottom: 6px; }
.info-strip { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .info-strip { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card .thumb { aspect-ratio: 4 / 5; background: var(--ivory-2); position: relative; overflow: hidden; }
/* the photo fills a fixed frame whatever its own shape, so every card is the same height and titles line up */
.product-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .thumb .tag { position: absolute; left: 8px; top: 8px; }
.product-card .body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .name { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.product-card .cat { font-size: .75rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-card .price { font-weight: 800; color: var(--teal-dark); font-size: 1.05rem; margin-top: auto; }
.product-card.is-out .thumb img { opacity: .55; filter: grayscale(.3); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 220px; }
.toolbar select { width: auto; min-width: 150px; }

/* ---------- product detail ---------- */
.pd { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .pd { grid-template-columns: 1.1fr 1fr; gap: 40px; } }
.pd-gallery .main-img { border-radius: 20px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--ivory-2); box-shadow: var(--shadow); }
.pd-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs button { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; flex: none; background: none; }
.pd-thumbs button.active { border-color: var(--teal); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info .price { font-size: 1.6rem; font-weight: 800; color: var(--teal-dark); margin: 4px 0 12px; }
.option-row { display: flex; flex-wrap: wrap; gap: 8px; }
.option {
  min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-weight: 700;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.option small { font-weight: 600; font-size: .7rem; color: var(--ink-3); }
.option.active { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.option.out { color: var(--ink-3); text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); }
.qty button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 1.2rem; font-weight: 800; color: var(--teal-dark); border-radius: 999px; }
.qty button:hover { background: var(--teal-soft); }
.qty input { width: 44px; text-align: center; border: 0; background: none; font-weight: 800; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.breadcrumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 12px; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- budget ---------- */
.budget-layout { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .budget-layout { grid-template-columns: 1fr 360px; align-items: start; } .budget-summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }
.cart-item .ci-top { display: flex; justify-content: space-between; gap: 8px; }
.cart-item .ci-name { font-weight: 700; text-decoration: none; color: var(--ink); }
.cart-item .ci-math { font-size: .85rem; color: var(--ink-2); }
.cart-item .ci-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.cart-item .ci-sub { font-weight: 800; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 1.25rem; font-weight: 800; color: var(--teal-dark); }
.budget-meter { height: 12px; background: var(--ivory-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.budget-meter > div { height: 100%; background: linear-gradient(90deg, var(--teal), #5fb7b1); border-radius: 999px; transition: width .3s; }
.budget-meter.over > div { background: linear-gradient(90deg, var(--pink-deep), #e38a9e); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty img { width: 160px; margin: 0 auto 12px; opacity: .9; mix-blend-mode: multiply; }
.empty h3 { color: var(--ink); }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--header-h)); }
@media (min-width: 1000px) { .admin-shell { grid-template-columns: 240px 1fr; } }
.admin-side {
  display: none; background: var(--white); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
@media (min-width: 1000px) { .admin-side { display: block; } }
.admin-side.open { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 50; height: auto; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 700; margin-bottom: 2px; }
.admin-side a svg { width: 20px; height: 20px; flex: none; }
.admin-side a:hover { background: var(--blue-soft); color: var(--ink); }
.admin-side a.active { background: var(--teal-soft); color: var(--teal-dark); }
.admin-side .badge-count { position: static; margin-left: auto; }
.admin-side .side-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; padding: 14px 12px 6px; }
.admin-main { padding: 20px 16px 80px; min-width: 0; }
@media (min-width: 1000px) { .admin-main { padding: 28px 32px 64px; } }
.admin-main .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-main .page-head h1 { margin: 0; }
.admin-menu-btn { display: inline-flex; }
@media (min-width: 1000px) { .admin-menu-btn { display: none; } }
/* Dashboard: tab strips wrap onto a second line rather than scrolling sideways; toolbars stack on phones. */
.admin-main .pill-tabs, .modal .pill-tabs { flex-wrap: wrap; overflow: visible; }
.admin-main .page-head > .row, .admin-main .page-head > div:last-child { flex-wrap: wrap; }
.admin-main { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .admin-main .toolbar > select, .admin-main .toolbar select.input { flex: 1 1 100%; min-width: 0; width: 100%; }
  .admin-main .page-head .btn { flex: 1 1 auto; }
}
.admin-side.open { box-shadow: var(--shadow-lg); }
body:has(.admin-side.open) { overflow: hidden; }

.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--white); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .k-label { font-size: .78rem; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.kpi .k-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .k-sub { font-size: .78rem; color: var(--ink-3); }
.kpi.accent-blue { border-top: 4px solid var(--blue); }
.kpi.accent-pink { border-top: 4px solid var(--pink); }
.kpi.accent-teal { border-top: 4px solid #8fd0c8; }
.kpi .k-num { display: inline-flex; width: 22px; height: 22px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: .72rem; align-items: center; justify-content: center; margin-right: 4px; }
.delta { font-size: .78rem; font-weight: 800; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 800; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; background: var(--white); }
.table th.num { text-align: right; }
.table .cell-product { min-width: 180px; }
@media (max-width: 1440px) { .table th, .table td { padding-left: 8px; padding-right: 8px; } }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fffdf9; }
.table tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }
.table .thumb-sm { width: 44px; min-width: 44px; max-width: none; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.sale-item { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.table tr.voided td { color: var(--ink-3); text-decoration: line-through; }
.table tr.clickable { cursor: pointer; }

/* Stacked tables (js/ui.js fitTables): a table too wide for its space becomes one card per row. */
.table.stacked, .table.stacked tbody, .table.stacked tfoot { display: block; }
.table.stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.table.stacked tbody { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding: 4px; }
.table.stacked tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); min-width: 0; }
.table.stacked tr:hover td { background: none; }
.table.stacked td {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 8px; width: 100%; min-width: 0; padding: 5px 0;
  border: 0; border-top: 1px dashed var(--line); text-align: right; white-space: normal; overflow-wrap: anywhere;
}
.table.stacked td::before { content: attr(data-label); flex: none; max-width: 45%; margin-right: auto; text-align: left; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.table.stacked td[data-label=""] { justify-content: flex-start; flex-wrap: wrap; text-align: left; }
.table.stacked td[data-label=""]::before { content: none; }
.table.stacked td:empty { display: none; }
/* the card's title: the photo and the name share the first line */
.table.stacked td.cell-thumb { width: auto; border-top: 0; padding: 0 0 6px; }
.table.stacked td.cell-thumb + td, .table.stacked tr > td:first-child:not(.cell-thumb) { border-top: 0; }
.table.stacked td.cell-product { display: block; flex: 1 1 0; width: auto; min-width: 0; text-align: left; border-top: 0; padding: 0 0 6px; }
.table.stacked td.cell-product::before { content: none; }
.table.stacked td.cell-thumb + td.cell-product { padding-top: 0; }
.table.stacked .thumb-sm { width: 56px; min-width: 56px; height: 56px; }
.table.stacked td .btn { flex: none; }
.table.stacked td > .input, .table.stacked td > select { flex: 1 1 auto; width: auto; min-width: 0; max-width: 60%; }
.table.stacked td > .sale-item:first-child, .table.stacked td > .small:first-child { min-width: 0; }
.table.stacked tfoot { margin-top: 10px; }
.table.stacked tfoot tr { display: flex; flex-wrap: wrap; background: var(--ivory-2); border-color: transparent; }
.table.stacked tfoot td { border-top: 0; }
.table.stacked tfoot td:empty { display: none; }
.table.stacked tr.voided { opacity: .7; }

.action-list { list-style: none; padding: 0; margin: 0; }
.action-list li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.action-list li a:hover { background: var(--ivory); }
.action-list .dot { width: 10px; height: 10px; border-radius: 999px; flex: none; }
.dot.danger { background: var(--danger); } .dot.warning { background: #e3a21a; } .dot.info { background: var(--blue-deep); }

.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.quick-actions a { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 800; }
.quick-actions a:hover { box-shadow: var(--shadow-lg); }
.quick-actions .qa-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.quick-actions .qa-icon svg { width: 22px; height: 22px; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-chart .bar > div { width: 100%; max-width: 48px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #8fd0c8, var(--teal)); min-height: 2px; }
.bar-chart .bar.current > div { background: linear-gradient(180deg, var(--pink), var(--pink-deep)); }
.bar-chart .bar span { font-size: .7rem; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .88rem; }
.hbar .track { height: 10px; background: var(--ivory-2); border-radius: 999px; overflow: hidden; }
.hbar .track > div { height: 100%; background: var(--blue-deep); border-radius: 999px; opacity: .7; }

.question-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .question-grid { grid-template-columns: repeat(5, 1fr); } }
.question { background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.question .q { font-size: .8rem; font-weight: 800; color: var(--pink-deep); margin-bottom: 6px; }
.question .a { font-size: 1.1rem; font-weight: 800; }
.question .s { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }

.sale-line { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--ivory); }
@media (min-width: 720px) { .sale-line { grid-template-columns: 2fr 1.2fr 90px 130px auto; align-items: end; } }

.image-editor { display: flex; gap: 10px; flex-wrap: wrap; }
.image-editor .img-tile { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.image-editor .img-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-editor .img-tile .img-actions { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; background: rgba(255, 255, 255, .88); }
.image-editor .img-tile .img-actions button { border: 0; background: none; cursor: pointer; padding: 4px 6px; font-weight: 800; font-size: .8rem; }
.image-editor .img-tile .primary-flag { position: absolute; top: 4px; left: 4px; }
.image-editor .add-tile { width: 96px; height: 96px; border-radius: 12px; border: 2px dashed #b9dcd8; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--teal-dark); font-weight: 800; font-size: .8rem; cursor: pointer; background: var(--teal-soft); }
.variant-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.variant-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--blue-soft); font-weight: 700; font-size: .88rem; }
.variant-chip button { border: 0; background: none; cursor: pointer; width: 24px; height: 24px; border-radius: 999px; font-weight: 800; color: var(--ink-2); }
.variant-chip button:hover { background: #fff; }
.variant-chip button.chip-photo { width: auto; padding: 0 8px; display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; color: var(--teal-dark); background: #fff; }
.variant-chip button.chip-photo:disabled { opacity: .5; cursor: default; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(47, 58, 64, .45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 24px; } }
.modal { background: var(--white); width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); animation: rise .2s; scroll-padding: 72px 0 96px; }
.modal.wide { max-width: 860px; }
@media (min-width: 640px) { .modal { border-radius: 24px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-body { padding: 6px 20px 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--white); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
@media (min-width: 900px) { .toast-wrap { bottom: 24px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; display: flex; gap: 10px; align-items: center; animation: rise .2s; }
.toast.error { background: var(--danger); }
.toast-wrap { pointer-events: none; } /* never block the page underneath */
.toast a { pointer-events: auto; }
.toast a { color: #bfe0f5; font-weight: 800; margin-left: auto; }

.demo-banner { background: var(--ink); color: #fff; font-size: .78rem; text-align: center; padding: 6px 12px; }
.demo-banner a, .demo-banner button { color: var(--blue); background: none; border: 0; cursor: pointer; font-weight: 800; text-decoration: underline; padding: 0; font-size: inherit; }
.demo-banner.live { background: var(--teal); }
.demo-banner.live button { color: #fff; }


/* ---------- printable documents ---------- */
.doc-preview { background: #e9e5df; padding: 16px; border-radius: var(--radius); }
.doc { background: #fff; color: var(--ink); max-width: 820px; margin: 0 auto; padding: 32px 36px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc .doc-letterhead { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.doc .doc-logo { display: block; height: 58px; width: auto; }
.doc .dm { font-family: var(--script); font-size: 32px; color: var(--teal); line-height: 1; font-weight: 700; }
.doc .dm-sub { margin-top: 5px; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.doc .doc-contact { font-style: normal; text-align: right; font-size: 10px; line-height: 1.55; color: var(--ink-2); max-width: 270px; }
.doc .doc-contact-line { margin-top: 2px; color: var(--teal-dark); font-weight: 700; }
.doc .doc-rule { height: 4px; margin-top: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--teal) 0 64%, var(--pink) 64% 82%, var(--blue) 82%); }
.doc .doc-titlebar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; padding: 12px 16px; background: var(--ivory); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.doc .doc-kind { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-deep); }
.doc h1 { font-size: 21px; margin: 2px 0 0; color: var(--ink); letter-spacing: -.01em; }
.doc .doc-meta { display: flex; gap: 20px; margin: 0; font-size: 10.5px; text-align: right; }
.doc .doc-meta dt { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.doc .doc-meta dd { margin: 0; font-weight: 700; white-space: nowrap; }
.doc .doc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 6px; }
.doc .kpi { padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; break-inside: avoid; }
.doc .kpi:nth-child(2) { border-left-color: var(--blue-deep); }
.doc .kpi:nth-child(3) { border-left-color: var(--pink-deep); }
.doc .kpi:nth-child(4) { border-left-color: var(--teal-dark); }
.doc .kpi span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.doc .kpi strong { display: block; margin-top: 2px; font-size: 17px; }
.doc .kpi small { display: block; font-size: 10px; color: var(--ink-2); }
.doc h2 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-dark); }
.doc h2::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.doc h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.doc table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.doc th { text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-dark); background: var(--teal-soft); padding: 6px 8px; }
.doc td { border-bottom: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
.doc tbody tr:nth-child(even) td { background: #fffcf8; }
.doc tfoot td { font-weight: 800; border-top: 2px solid var(--teal); border-bottom: 0; background: var(--pink-soft); }
.doc .metric-table td:first-child { width: 28px; color: var(--ink-3); font-weight: 700; }
.doc .note { font-size: 10.5px; color: var(--ink-2); }
.doc .doc-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 10px; border-top: 2px solid var(--teal); font-size: 10px; color: var(--ink-2); }
.doc.public .doc-foot span:last-child { color: var(--pink-deep); font-weight: 700; }
.doc .catalogue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.doc .catalogue-grid .ci { border: 1px solid var(--line); border-radius: 10px; padding: 8px; break-inside: avoid; }
.doc .catalogue-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; margin-bottom: 6px; background: var(--ivory); }
@media screen and (max-width: 640px) {
  .doc { padding: 18px 14px; overflow-x: auto; }
  .doc .doc-letterhead { grid-template-columns: auto 1fr; }
  .doc .doc-contact { grid-column: 1 / -1; text-align: left; max-width: none; }
  .doc .doc-titlebar { flex-direction: column; align-items: flex-start; }
  .doc .doc-meta { text-align: left; }
  .doc .catalogue-grid { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  @page { size: A4; margin: 14mm 12mm 16mm;
    @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 9px Nunito, sans-serif; color: #7d8a91; }
    @bottom-left { content: "Confidential: internal business record"; font: 9px Nunito, sans-serif; color: #7d8a91; } }
  @page public { @bottom-left { content: "Prices in Guyana dollars (G$)"; } }
  body { background: #fff; }
  body * { visibility: hidden; }
  body > :not(#print-root) { display: none !important; }
  #print-root, #print-root * { visibility: visible; }
  #print-root .doc { box-shadow: none; padding: 0; max-width: none; }
  #print-root .doc.public { page: public; }
  .doc tr, .doc .ci { break-inside: avoid; }
  .doc h2 { break-after: avoid; }
}
#print-root { display: none; }
@media print { #print-root { display: block; } }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-card > *, .auth-card .logo, .auth-submit::after,
  .auth-bg canvas, .hero-scene canvas, .auth-card .form-error { animation: none !important; }
  .product-card .thumb img { transition: none; }
}
@media (max-width: 600px) { .brand { gap: 4px; } .brand img { height: 30px; } .brand .wordmark { font-size: 1.2rem; white-space: normal; max-width: 6.5em; line-height: .95; } }

/* ---------- what's new, notifications, getting the app (js/updates.js) ---------- */
.dot-badge { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink-deep); box-shadow: 0 0 0 2px var(--white); }
.updates-layout { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .updates-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.update-list { display: flex; flex-direction: column; }
.update-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.update-item:last-child { border-bottom: 0; }
a.update-item:hover { background: var(--ivory); }
.update-thumb { width: 64px; height: 64px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--blue-soft); }
.update-thumb.icon { display: flex; align-items: center; justify-content: center; color: var(--pink-deep); background: var(--pink-soft); }
.update-thumb.icon svg { width: 28px; height: 28px; }
.update-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card.highlight { box-shadow: 0 0 0 2px var(--teal), var(--shadow); }
.install-steps { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.inline-ic { width: 20px; height: 20px; vertical-align: -4px; color: var(--blue-deep); }
.install-nudge {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 45; display: flex; gap: 10px; align-items: center;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px 6px 10px 10px; max-width: 520px; margin: 0 auto;
}
.install-nudge img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.install-nudge > div { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.install-nudge .btn { flex: none; }
@media (min-width: 900px) { .install-nudge { bottom: 24px; } }
.refresh-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 210; display: flex; gap: 10px; align-items: center;
  background: var(--white); border-radius: 999px; box-shadow: var(--shadow-lg); padding: 6px 6px 6px 16px; width: max-content; max-width: calc(100% - 24px); font-size: .9rem; font-weight: 700;
}
.refresh-banner svg { color: var(--pink-deep); vertical-align: -3px; }
.progress { height: 8px; border-radius: 999px; background: var(--ivory-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--teal); transition: width .2s; }
@media (max-width: 420px) { .header-actions .icon-btn[href^="#/catalogue"] { display: none; } }
.app-promo {
  display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--pink-soft), var(--white) 55%, var(--blue-soft)); border: 1px solid var(--line);
}
.app-promo img { width: 84px; height: 84px; border-radius: 20px; flex: none; box-shadow: var(--shadow); }
.app-promo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-promo-text h2 { margin: 0; }
.app-promo-text p { margin: 0 0 8px; }
@media (max-width: 600px) { .app-promo { flex-direction: column; align-items: flex-start; } .app-promo img { width: 64px; height: 64px; border-radius: 16px; } }
/* Header: labels stay on one line. */
.header-actions .btn { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1180px) { .nav-links a { padding: 8px 9px; } }
/* Mid-size screens: the full menu and the name both fit when the name goes on two lines, as on phones. */
@media (min-width: 900px) and (max-width: 1180px) { .site-header .brand .wordmark { font-size: 1.45rem; white-space: normal; max-width: 6.5em; line-height: .95; } }
/* Settings > Business details */
.input-addon { display: flex; align-items: stretch; }
.input-addon > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--ivory-2); color: var(--ink-2); font-weight: 700; }
.input-addon > .input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; padding-left: 12px; }
.loc-edit { padding: 14px; }
.loc-edit .field + .field { margin-top: 10px; }
.loc-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; margin-top: 10px; }
.loc-coords .btn { justify-self: start; }
@media (min-width: 900px) { .loc-coords { grid-template-columns: 160px 160px auto auto; } }

/* ---------- web till (#/till): iPad, PC and phone ---------- */
.till { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--ivory); }
.till-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--white); flex: none; }
.till-head .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; }
.till-head .brand img { height: 36px; width: auto; }
.till-head .wordmark { font-family: var(--script); color: var(--teal-dark); font-size: 1.5rem; }
.till-user { color: var(--ink-2); }
.till-sync { font-size: .8rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.till-sync.ok { background: var(--success-soft); color: var(--success); }
.till-sync.wait { background: var(--warning-soft); color: var(--warning); }
.till-sync.off { background: var(--danger-soft); color: var(--danger); }
.till-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
.till-items { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 14px 16px 0; gap: 10px; }
.till-search { display: flex; gap: 8px; }
.till-search .input-group { flex: 1; min-width: 0; }
.till-search .input { min-width: 0; width: 100%; }
.till-search .input { font-size: 1.1rem; height: 50px; }
.till-search .btn { height: 50px; }
.till-cats { flex: none; }
.till-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 10px; align-content: start; padding-bottom: 90px; }
.till-card > * { flex: none; }
.till-card { display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
.till-card:active { transform: scale(.98); }
.till-card img, .till-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; color: var(--blue-deep); margin-bottom: 4px; }
.till-card .nm { font-weight: 800; font-size: .92rem; line-height: 1.2; }
.till-card .pr { color: var(--teal-dark); font-weight: 800; }
.till-card .stk { font-size: .75rem; color: var(--ink-3); }
.till-card.out { opacity: .55; }
.till-cart { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-left: 1px solid var(--line); background: var(--white); overflow-y: auto; }
.till-cart-head { display: flex; align-items: center; gap: 8px; }
.till-cart-head h2 { margin: 0 auto 0 0; font-size: 1.2rem; }
.till-cart-close { display: none; }
.till-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.till-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.till-qty { display: flex; align-items: center; gap: 4px; }
.till-qty span { min-width: 22px; text-align: center; font-weight: 800; }
.till-qty .icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 99px; font-size: 1.1rem; }
.till-hint { padding: 18px 0; text-align: center; }
.till-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; padding-top: 4px; }
.till-total strong { font-size: 1.6rem; color: var(--teal-dark); }
.till-pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.till-pay .btn { padding-left: 6px; padding-right: 6px; }
.till-customer summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: 4px 0; }
.till-charge { width: 100%; height: 56px; font-size: 1.1rem; margin-top: auto; }
.till-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.till-options .btn { flex-direction: column; height: auto; padding: 12px; gap: 2px; }
.till-cartbar { display: none; }
.till-empty { max-width: 460px; margin: 15vh auto; padding: 0 16px; text-align: center; }
.cam-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-guide { position: absolute; left: 8%; right: 8%; top: 25%; bottom: 25%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
/* Phones: the items fill the screen; the sale opens from a bar at the bottom. */
@media (max-width: 760px) {
  .till-head { padding: 8px 12px; gap: 6px; }
  .till-head .btn span, .till-user { display: none; }
  .till-body { grid-template-columns: minmax(0, 1fr); }
  .till-items { padding: 10px 12px 0; }
  .till-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .till-search .btn span { display: none; }
  .till-cart { position: fixed; inset: 0; z-index: 60; border-left: 0; transform: translateY(100%); transition: transform .2s; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .till.cart-open .till-cart { transform: none; }
  .till-cart-close { display: inline-flex; }
  .till-cartbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border: 0; border-radius: 99px; background: var(--teal); color: #fff; font: inherit; font-weight: 800; box-shadow: var(--shadow-lg); cursor: pointer; }
  .till-cartbar[hidden] { display: none; }
}
.till-kbd { height: 50px; width: 50px; padding: 0; flex: none; }
.till-kbd[hidden] { display: none; }
.till-kbd.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.till-code { font-size: 1.35em; letter-spacing: 1px; font-weight: 800; margin: 2px 0 6px; word-break: break-all; }
.till-picklist { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow-y: auto; margin-top: 10px; }
.till-pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.till-pick:hover, .till-pick:focus-visible { border-color: var(--teal); }
.cam-type { display: flex; gap: 8px; margin-top: 10px; }
.cam-type[hidden] { display: none; }
.cam-type .input { flex: 1; min-width: 0; }
/* A modal whose title sits in the middle (the close button keeps its place on the right). */
.modal.title-centered .modal-head h2 { flex: 1; text-align: center; padding-left: 40px; }

/* ---------- colours, sizes, quantities and marks on products ---------- */
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.swatch .dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1.5px var(--line); position: relative; }
.swatch.active .dot { box-shadow: 0 0 0 2.5px var(--teal); }
.swatch.out .dot::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); transform: rotate(45deg); }
.swatch.out { color: var(--ink-3); }
.mini-swatches { display: flex; gap: 4px; margin-top: 2px; }
.mini-swatches i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); display: inline-block; }
.option.unavailable { opacity: .45; }
.qty-left { font-weight: 800; color: var(--teal-dark); }
.qty-left.low { color: var(--warning); }
.qty-left.out { color: var(--danger); }
.product-card .marks { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.tag.new { background: var(--pink-deep); color: var(--white); }
.tag.fresh { background: var(--teal); color: var(--white); }
.tag.sale { background: var(--danger, #c0392b); color: var(--white); }
.price s.was, s.was { color: var(--muted, #8a8a8a); font-weight: 600; font-size: .8em; margin-left: 4px; }
.stars { color: #e3a008; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line); }
.rating-line { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-2); }

/* ---------- reviews ---------- */
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.review .who { font-weight: 700; font-size: .9rem; }
.review .reply { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--teal-soft); font-size: .9rem; }
.star-input { display: flex; gap: 4px; }
.star-input button { background: none; border: 0; padding: 2px; cursor: pointer; font-size: 1.9rem; line-height: 1; color: var(--line); }
.star-input button.on { color: #e3a008; }
.flag { background: var(--danger-soft); color: var(--danger); }
.review-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--white); }
.review-card + .review-card { margin-top: 10px; }

/* ---------- messages ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 170px); min-height: 360px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--ivory); }
.bubble { max-width: min(78%, 460px); padding: 10px 12px; border-radius: 16px; background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.06); white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--teal-soft); border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .meta { display: block; margin-top: 4px; font-size: .7rem; color: var(--ink-3); }
.bubble.deleted { font-style: italic; color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bubble .link-btn { border: 0; background: none; padding: 0 0 0 6px; font: inherit; color: var(--pink-deep); font-weight: 700; cursor: pointer; text-decoration: underline; }
.item-card { display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 6px; border-radius: 12px; background: var(--ivory-2); text-decoration: none; color: inherit; white-space: normal; }
.item-card img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.item-card .t { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.chat-compose { border-top: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-compose .row { flex-wrap: nowrap; }
.chat-compose textarea { resize: none; min-height: 44px; max-height: 140px; flex: 1; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--ivory-2); font-size: .82rem; font-weight: 700; max-width: 100%; }
.attach-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.conv-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.conv-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow-y: auto; max-height: calc(100vh - var(--header-h) - 120px); }
.conv-list a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.conv-list a.active { background: var(--teal-soft); }
.conv-list a .snip { font-size: .82rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.conv-list a.unread .name { font-weight: 800; }
.pick-list { max-height: 50vh; max-height: 50dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pick-list button { text-align: left; border: 1px solid var(--line); background: var(--white); cursor: pointer; font: inherit; }
@media (max-width: 899px) {
  .conv-layout { grid-template-columns: 1fr; }
  .conv-layout.has-thread .conv-list { display: none; }
  .conv-layout:not(.has-thread) .conv-thread { display: none; }
  .chat { height: calc(100vh - var(--header-h) - 200px); }
}

/* ---------- chat emojis (js/emoji.js) ---------- */
.emo { display: inline-block; vertical-align: -6px; line-height: 0; }
.emo svg { overflow: visible; }
.emo-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; padding: 8px; max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); background: var(--white); }
.emo-picker button { background: none; border: 0; border-radius: 12px; padding: 4px; cursor: pointer; min-height: 48px; }
.emo-picker button:hover, .emo-picker button:focus-visible { background: var(--pink-soft); }
.bubble .emo { margin: 0 1px; }
@keyframes emo-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(10deg); } }
@keyframes emo-ears { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes emo-ears-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
@keyframes emo-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes emo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes emo-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-5deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
@keyframes emo-float { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }
@keyframes emo-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(.98); } 45% { transform: scale(1.08); } }
@keyframes emo-twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .5; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@keyframes emo-lid { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 70% { transform: translateY(-6px) rotate(-6deg); } 85% { transform: translateY(-2px) rotate(3deg); } }
@keyframes emo-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 60% { transform: translateY(1px); } }
@keyframes emo-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes emo-wiggle { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(8deg) scale(1.05); } }
@keyframes emo-pop { 0% { transform: scale(.8); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes emo-draw { 0% { stroke-dashoffset: 40; } 40%, 100% { stroke-dashoffset: 0; } }
@keyframes emo-spin { to { transform: rotate(360deg); } }
@keyframes emo-drop { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
@keyframes emo-dots { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes emo-z { 0% { transform: translate(0, 4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translate(4px, -6px); opacity: 0; } }
.emo .e-ear-l { transform-origin: 22px 30px; animation: emo-ears 2.4s ease-in-out infinite; }
.emo .e-ear-r { transform-origin: 42px 30px; animation: emo-ears-r 2.4s ease-in-out infinite; }
.emo .e-eyes { transform-origin: 32px 28px; animation: emo-blink 4s infinite; }
.emo .e-trunk.wave { transform-origin: 35px 33px; animation: emo-wave 1.2s ease-in-out infinite; }
.emo-thanks .e-body, .emo-love .e-body { animation: emo-bob 1.6s ease-in-out infinite; }
.emo-laugh .e-body { transform-origin: 32px 40px; animation: emo-shake .9s ease-in-out infinite; }
.emo-wow .e-body { animation: emo-pop 1.4s ease-in-out infinite; transform-origin: 32px 32px; }
.emo-sleep .e-body { animation: emo-bob 3s ease-in-out infinite; }
.emo .float-1 { animation: emo-float 2.2s ease-in infinite; }
.emo .float-2 { animation: emo-float 2.2s ease-in .7s infinite; }
.emo .float-3 { animation: emo-float 2.2s ease-in 1.4s infinite; }
.emo .beat { animation: emo-beat 1.3s ease-in-out infinite; }
.emo .twinkle { animation: emo-twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.emo .twinkle.d1 { animation-delay: .3s; } .emo .twinkle.d2 { animation-delay: .6s; } .emo .twinkle.d3 { animation-delay: .9s; }
.emo .lid { transform-origin: 32px 27px; animation: emo-lid 2s ease-in-out infinite; }
.emo .bounce { animation: emo-bounce 1.2s ease-in-out infinite; }
.emo .sway { animation: emo-sway 2s ease-in-out infinite; }
.emo .wiggle { animation: emo-wiggle 1.5s ease-in-out infinite; }
.emo .pop { animation: emo-pop 1.6s ease-in-out infinite; }
.emo .tick { stroke-dasharray: 40; animation: emo-draw 1.6s ease-out infinite; }
.emo .spin { animation: emo-spin 6s linear infinite; }
.emo .drop { animation: emo-drop 1.8s ease-in infinite; }
.emo .tear-l, .emo .tear-r { animation: emo-drop 1s ease-in infinite; }
.emo .dot { animation: emo-dots 1.5s ease-in-out infinite; }
.emo .dot.d2 { animation-delay: .25s; } .emo .dot.d3 { animation-delay: .5s; }
.emo .z { animation: emo-z 2.4s ease-out infinite; } .emo .z2 { animation-delay: 1.2s; }
@keyframes emo-flap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.55); } }
@keyframes emo-flicker { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.85, 1.12); } }
@keyframes emo-drive { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(1px, -1px); } 75% { transform: translate(-1px, -.5px); } }
.emo-wink .e-body, .emo-blush .e-body, .emo-kiss .e-body, .emo-yum .e-body, .emo-please .e-body { animation: emo-bob 1.6s ease-in-out infinite; }
.emo-phew .e-body { animation: emo-bob 3s ease-in-out infinite; }
.emo-cool .e-body, .emo-confused .e-body { transform-origin: 32px 46px; animation: emo-sway 2.4s ease-in-out infinite; }
.emo-party .e-body, .emo-party .hat, .emo-yay .e-body { animation: emo-bounce 1.2s ease-in-out infinite; }
.emo-cry .e-body, .emo-silly .e-body { transform-origin: 32px 40px; animation: emo-shake .9s ease-in-out infinite; }
.emo-oops .e-body { transform-origin: 32px 40px; animation: emo-shake 1.4s ease-in-out infinite; }
.emo-starry .e-body { transform-origin: 32px 32px; animation: emo-pop 1.4s ease-in-out infinite; }
.emo .bob { animation: emo-bob 1.6s ease-in-out infinite; }
.emo .q { animation: emo-bounce 1.2s ease-in-out infinite; }
.emo .b-eyes { transform-origin: 32px 29px; animation: emo-blink 4s infinite; }
.emo .hand { animation: emo-spin 4s linear infinite; }
.emo .flame { animation: emo-flicker .5s ease-in-out infinite; }
.emo .wing-l, .emo .wing-r { animation: emo-flap .9s ease-in-out infinite; }
.emo .rattle, .emo .buzz { animation: emo-shake 1s ease-in-out infinite; }
.emo .drive { animation: emo-drive .4s linear infinite; }
.emo-sun .spin { animation-duration: 10s; }
.emo-picker-group { grid-column: 1 / -1; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 6px 4px 0; }
@media (prefers-reduced-motion: reduce) { .emo *, .emo { animation: none !important; } }

/* The message box: emojis show as pictures while typing (js/emoji.js editor). */
.chat-input { flex: 1; min-height: 44px; max-height: 140px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.45; padding-top: 10px; padding-bottom: 10px; cursor: text; }
.chat-input:focus { outline: none; }
.chat-input[data-empty]::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; }
.chat-input .emo { vertical-align: -5px; margin: 0 1px; }

/* Emojis while typing: suggestions for the word being typed, otherwise recently used (js/emoji.js strip). */
.emo-strip { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; min-height: 40px; }
.emo-strip::-webkit-scrollbar { display: none; }
.emo-strip-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-right: 6px; flex: none; }
.emo-strip[data-mode="suggest"] .emo-strip-label { color: var(--pink-deep); }
.emo-strip button { flex: none; background: none; border: 0; border-radius: 12px; padding: 3px; min-width: 40px; min-height: 40px; cursor: pointer; }
.emo-strip button:hover, .emo-strip button:focus-visible { background: var(--pink-soft); }
.emo-strip[data-mode="suggest"] button { background: var(--pink-soft); }
/* Reports > Overview: top sellers by colour and pattern */
.top-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.top-opt { position: relative; display: flex; flex-direction: column; gap: 6px; }
.top-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--blue-soft); }
.top-opt .rank { position: absolute; top: 6px; left: 6px; min-width: 26px; height: 26px; border-radius: 99px; background: var(--teal); color: #fff; font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.top-opt .t { display: flex; flex-direction: column; line-height: 1.25; }

/* Photo cropper */
.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; line-height: 0; background: #222; border-radius: 8px; overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; max-height: 58vh; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; touch-action: none; }
.crop-box i { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid var(--teal-dark, #2a7f7a); border-radius: 50%; }
.crop-box i[data-h="nw"] { left: -12px; top: -12px; cursor: nwse-resize; } .crop-box i[data-h="ne"] { right: -12px; top: -12px; cursor: nesw-resize; }
.crop-box i[data-h="sw"] { left: -12px; bottom: -12px; cursor: nesw-resize; } .crop-box i[data-h="se"] { right: -12px; bottom: -12px; cursor: nwse-resize; }

/* Seasonal themes (js/seasons.js): the colours come from variables, so only the greeting banner and the falling decorations need styles */
.season-ribbon { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 40px 7px 14px; position: relative; background: var(--teal); color: #fff; font-weight: 700; font-size: .88rem; text-align: center; line-height: 1.3; }
.season-ribbon .season-emoji { font-size: 1.05rem; }
.season-ribbon .season-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; font-size: .8rem; line-height: 1; }
.season-ribbon .season-x:hover { background: rgba(255, 255, 255, .32); }
.season-fall { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.season-fall span { position: absolute; top: -10%; opacity: .55; animation: seasonFall linear infinite; will-change: transform; }
@keyframes seasonFall { 0% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(14px, 60vh, 0) rotate(90deg); } 100% { transform: translate3d(-8px, 120vh, 0) rotate(200deg); } }
@media (prefers-reduced-motion: reduce) { .season-fall { display: none; } }

/* Themes page in the owner dashboard */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-tile { display: block; cursor: pointer; }
.theme-tile input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--white); height: 100%; }
.theme-tile input:checked + .theme-card { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.theme-tile input:focus-visible + .theme-card { outline: 3px solid var(--teal); outline-offset: 2px; }
.theme-swatch { display: flex; height: 22px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.theme-swatch i { flex: 1; }
.theme-name { font-weight: 800; font-size: .92rem; }
.card-head .tag { white-space: normal; text-align: left; }
