/* localUp side panel. Same tokens and rules as the app (docs/ux/home.md, "Design system rules"). */
:root {
  --shop: #8b1a2b; --shop-soft: #f6e8ea; --gold: #f5c518;
  --paper: #f7f4ef; --card: #ffffff; --sunk: #f0ebe3; --line: #e8e2d8; --hair: rgba(28,25,23,.08);
  --ink: #1c1917; --ink-2: #44403c; --muted: #78716c; --good: #1f9d55; --warn: #9a5b00; --bad: #b3261e;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* older names, still used by the sticker page */
  --bg: var(--card); --surface: var(--sunk); --text: var(--ink); --accent: var(--shop); --radius: 12px;
  color-scheme: light;
}
/* Light first, always; dark only when the owner picks it (Profile → App settings). */
:root[data-theme="dark"] {
  --shop: #c0354b; --shop-soft: #3a1d22; --paper: #121110; --card: #1c1a18; --sunk: #262321; --line: #302c29; --hair: rgba(255,255,255,.07);
  --ink: #f5f1ea; --ink-2: #d6d0c8; --muted: #a39d96; --good: #3fbf78; --warn: #e0a64a; --bad: #f08a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--paper); }
body {
  margin: 0; color: var(--ink);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
p { margin: 0; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.logo { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.logo svg { width: 28px; height: 28px; }
.logo span { font: 700 19px/1 "Sora", var(--font); letter-spacing: -.045em; color: var(--ink); }
.logo span em { font-style: normal; color: var(--shop); }
#biz { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

main { padding: 6px 16px 24px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
body.has-tabs main { padding-bottom: 96px; }

/* ---------- type ---------- */
h1 { font: 700 30px/1.15 var(--font); letter-spacing: -.03em; margin: 4px 0 2px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.35; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.warn { color: var(--warn); font-size: 13px; }
.bad { color: var(--bad); font-size: 13px; }
.toast { font-size: 13px; color: var(--good); }

/* ---------- sections: white panels, hairline, radius 20, no shadow ---------- */
.block, section {
  background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 18px;
  display: grid; gap: 10px; min-width: 0;
}
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- buttons ---------- */
button {
  font: inherit; color: var(--ink); cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14.5px;
  transition: transform .12s ease;
}
button:active:not(:disabled) { transform: scale(.97); }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--shop); outline-offset: 2px; }
/* the one primary per screen: solid shop colour, 50 px, radius 14, no glow */
button.primary { background: var(--shop); border-color: var(--shop); color: #fff; width: 100%; min-height: 50px; border-radius: 14px; font-size: 15.5px; }
/* row actions: text in shop colour, never filled */
button.act { border: 0; background: none; color: var(--shop); min-height: 36px; padding: 0 8px; font-size: 14px; }
button.text { border: 0; background: none; color: var(--muted); padding: 0 8px; min-height: 40px; font-weight: 500; }
button.text:hover { color: var(--ink); }
button:disabled { opacity: .5; cursor: default; }

input, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }

.seg { display: flex; gap: 4px; background: var(--sunk); padding: 4px; border-radius: 14px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); min-height: 38px; border-radius: 10px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(28,25,23,.08); }

/* ---------- start ---------- */
.drop {
  border: 1.5px dashed var(--line); border-radius: 16px; padding: 28px 12px; background: var(--card);
  text-align: center; cursor: pointer; display: grid; gap: 4px;
}
.drop.over { border-color: var(--shop); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.thumbs button { position: absolute; top: 3px; right: 3px; min-height: 24px; padding: 0 7px; border-radius: 12px; font-size: 12px; }

/* ---------- check details ---------- */
.row { display: grid; gap: 4px; min-width: 0; }
.row label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.row label .guess { color: var(--warn); }

/* ---------- lists ---------- */
.list { display: grid; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair); }
.list li:first-child { border-top: 0; }
.list li span:last-child { color: var(--muted); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }

details { min-width: 0; }
details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 4px 0; }
details[open] summary { margin-bottom: 8px; }
.items > details { border-top: 1px solid var(--hair); padding: 8px 0 4px; }
.items > details:first-child { border-top: 0; }
.items > details summary { color: var(--ink); font-size: 14.5px; }
.items > details > :not(summary) + :not(summary) { margin-top: 8px; }
.quote { font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--line); padding-left: 10px; }
.owner-reply { font-size: 13.5px; color: var(--muted); white-space: pre-line; }
.owner-reply b { color: var(--good); font-weight: 600; }
p, li span, summary { overflow-wrap: anywhere; }

/* ---------- working ---------- */
.working { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.bar { height: 4px; background: var(--sunk); border-radius: 2px; overflow: hidden; }
.bar::after { content: ""; display: block; height: 100%; width: 35%; background: var(--shop); border-radius: 2px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---------- tabs: same pill nav as the app ---------- */
nav.tabs {
  position: fixed; z-index: 10; left: 10px; right: 10px; bottom: 10px; height: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 4px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--hair); box-shadow: 0 12px 32px rgba(28,25,23,.14);
}
nav.tabs button { border: 0; background: none; min-height: 0; padding: 0; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
nav.tabs .pill { width: 52px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background-color .2s ease; }
nav.tabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav.tabs [aria-current] { color: var(--ink); font-weight: 700; }
nav.tabs [aria-current] .pill { background: var(--shop-soft); color: var(--shop); }

@media (prefers-reduced-motion: reduce) {
  .bar::after { animation: none; width: 100%; opacity: .4; }
  button { transition: none; }
}

/* status lines take no room until they say something */
.toast:empty, .warn:empty, .bad:empty, .muted:empty { display: none; }

/* ---------- On Google now ---------- */
.sug { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--hair); }
.sug:first-child { border-top: 0; padding-top: 2px; }
.sug-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sug-text .clamp { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Rank: now next to suggested ---------- */
.cmp { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 10px; align-items: baseline; }
.cmp > .muted { font-size: 13px; }
.cmp .now { color: var(--muted); }
.cmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cmp li.add { color: var(--ink); font-weight: 600; }
.cmp li .muted { font-weight: 400; }
.cmp .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.cmp .clamp[aria-expanded="true"] { display: block; }
.why ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-foot .toast, .card-foot .warn { flex: 1; }
.card-foot button { margin-left: auto; }
nav.tabs[hidden] { display: none; }
.group-head { font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.row-split { display: inline-flex; justify-content: space-between; gap: 12px; width: calc(100% - 18px); color: var(--ink); }
.list li.ahead { display: grid; gap: 2px; justify-content: stretch; }
.list li.ahead span:last-child { white-space: normal; }
.cmp p { white-space: pre-line; }
/* services: keep / rename / remove / add */
.svc { display: grid; gap: 0; }
.svc-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--hair); }
.svc-row:first-of-type { border-top: 0; }
.svc-row p { font-size: 14px; }
.svc-row p.muted { font-size: 12.5px; }
.svc-v { font-size: 12.5px; font-weight: 650; color: var(--muted); padding-top: 1px; }
.v-add .svc-v, .v-rename .svc-v { color: var(--shop); }
.v-remove .svc-v { color: var(--bad); }
.v-remove p:first-child { text-decoration: line-through; text-decoration-color: var(--muted); }
.v-maybe .svc-v { color: var(--warn); }
.list.steps li { padding: 6px 0; }
.list.steps li span:first-child { color: var(--muted); }
.list.steps li.done span:first-child, .list.steps li.now span:first-child { color: var(--ink); }
.list.steps li.now span:last-child { color: var(--ink-2); max-width: 60%; text-align: right; white-space: normal; }
.list.notes li span:last-child { white-space: normal; color: var(--ink-2); font-size: 14px; line-height: 1.45; }

/* guided audit: the one thing to do now */
.guide-ask { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* Ask */
.thread { display: grid; gap: 14px; }
.msg { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.msg p { margin: 0; }
.msg .muted { margin-top: 4px; }
.msg.you { justify-self: end; max-width: 88%; background: var(--sunk); border-radius: 12px; padding: 10px 12px; color: var(--ink-2); max-height: 220px; overflow: auto; }
.thinking { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.facts summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.facts li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.facts li button { min-height: 32px; }
.draft { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; }
.draft p { white-space: pre-wrap; color: var(--ink); }
.draft button { justify-self: start; }
