/*
 * Girboks mobile UI. Structure only: every colour, radius and font comes from
 * the active theme's custom properties (public/assets/css/themes/*.css).
 * Do not hardcode values here that a theme might want to change.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--sunken);
  color: var(--text);
  font: var(--weight-body) 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Shell: a phone-width column, centred on larger screens ─────────────── */
.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--grid-dot) 0.6px, transparent 1.1px);
  background-size: var(--grid-size) var(--grid-size);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 0 1px var(--line);
}
/* Landing pages use the full browser width (set wide = true in the template). */
.app--wide { max-width: none; box-shadow: none; }
.main { flex: 1; padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.app--bare .main { padding-bottom: 24px; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 6px 8px 6px 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar--back { padding-left: 4px; }
.topbar__title { flex: 1; font-size: 16px; font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--radius-m); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }

/* ── Type ───────────────────────────────────────────────────────────────── */
.h1 { font-size: 24px; line-height: 1.2; font-weight: var(--weight-strong); letter-spacing: -0.01em; }
.h2 { font-size: 17px; font-weight: var(--weight-strong); }
.meta { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--tight { gap: 6px; }
.cluster { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Panel: the Photoshop properties-panel unit ─────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; background: var(--raised); border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: var(--weight-strong); color: var(--muted);
}
/* Pager under a list: how many per page, and previous/next */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager__size, .pager__nav { display: flex; align-items: center; gap: 6px; }
.pager__opt { min-width: 38px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--raised); color: var(--text); font: inherit; cursor: pointer; }
.pager__opt[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: var(--weight-strong); }
.pager .icon-btn { width: 36px; height: 36px; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.panel__head .icon-btn { width: 36px; height: 36px; margin: -6px -8px -6px 0; }
.panel__body { padding: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-top: 1px solid var(--line); }
.panel__head + .row, .row:first-child { border-top: 0; }
.row__label { color: var(--muted); font-size: 14px; }
.friend__seen { display: block; }
.row__value { text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* Rows that are links or buttons */
.tap { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
.tap:first-child { border-top: 0; }
.tap:hover { background: var(--raised); }
.tap__main { flex: 1; min-width: 0; }
.tap__title { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap__sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tap--wrap { align-items: flex-start; cursor: default; }
.tap--wrap .tap__sub { white-space: normal; overflow: visible; text-overflow: clip; }
.tap__end { color: var(--faint); display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-m);
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--text);
  font-weight: var(--weight-strong); cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--raised-hover); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: none; border-color: transparent; color: var(--muted); }
.btn--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: progress; }

.fab {
  position: fixed; z-index: 6; right: max(16px, calc(50% - 240px + 16px)); bottom: calc(76px + env(safe-area-inset-bottom));
  height: 48px; padding: 0 20px 0 16px; border-radius: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  font-size: 16px; /* under 16px iOS Safari zooms the page on focus and leaves it panned sideways */
  background: var(--sunken); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  transition: border-color 0.12s;
}
.textarea { min-height: 112px; resize: vertical; }
/* iOS Safari draws date inputs natively: wider than a half-width grid column (spilling into the next field), taller,
   centred, and deaf to width/min-width. Without the native look they size like every other input. */
.input[type="date"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field__hint { font-size: 12px; color: var(--faint); }
.field__hint--end { text-align: right; }
.form-error { padding: 10px 12px; border-radius: var(--radius-s); background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Segmented control (radio group) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunken); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 2px; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 38px; padding: 0 8px; border-radius: 2px; color: var(--muted); font-size: 14px; text-align: center; }
.seg input:checked + span { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Small pieces ───────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--raised); color: var(--muted); }
.badge--ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge--accent { background: var(--accent-soft); color: var(--accent-hover); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Indonesian plate */
.plate {
  display: inline-block; padding: 3px 10px; background: var(--plate-bg); color: var(--plate-text);
  border: 1.5px solid var(--plate-line); border-radius: var(--radius-s);
  font-weight: 700; letter-spacing: 0.08em; font-size: 14px; white-space: nowrap; text-transform: uppercase;
}

/* Rating meter: five segments, filled by data-value. */
.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter i { width: 14px; height: 6px; border-radius: 1px; background: var(--line-strong); }
.meter[data-value="1"] i:nth-child(-n+1),
.meter[data-value="2"] i:nth-child(-n+2),
.meter[data-value="3"] i:nth-child(-n+3),
.meter[data-value="4"] i:nth-child(-n+4),
.meter[data-value="5"] i:nth-child(-n+5) { background: var(--accent); }
.meter--lg i { width: 22px; height: 8px; }

/* Rating input: the same five segments, selectable */
.rate { display: flex; gap: 6px; }
.rate label { flex: 1; position: relative; }
.rate input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rate span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--sunken); color: var(--muted); font-weight: 600; }
.rate input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.rate input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Patterns (theme-controlled) ────────────────────────────────────────── */
.pattern-checker {
  background-color: var(--sunken);
  background-image: conic-gradient(var(--checker-b) 25%, var(--checker-a) 0 50%, var(--checker-b) 0 75%, var(--checker-a) 0);
  background-size: calc(var(--checker-size) * 2) calc(var(--checker-size) * 2);
}
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 36px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }
.empty__title { font-weight: var(--weight-strong); }
.empty__text { color: var(--muted); font-size: 14px; max-width: 28ch; }

/* ── Home ───────────────────────────────────────────────────────────────── */
.soon { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.tier__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); }
.tier__price { font-size: 22px; font-weight: var(--weight-strong); letter-spacing: -0.01em; }
.tier__price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tier__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tier__list li { padding-left: 18px; position: relative; color: var(--muted); }
.tier__list li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge--live { background: var(--accent); color: var(--on-accent); }
.hero { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; }
.logo { display: block; color: var(--on-accent); flex: none; }
.logo__bg { fill: var(--accent); }
.logo__fill { fill: currentColor; }
.logo__acc { fill: var(--accent); }
.logo__acc-stroke { stroke: var(--accent); }
.logo__badge { fill: color-mix(in srgb, var(--accent) 68%, #000); }
.logo__pattern { color: var(--on-accent); }
.brand .logo { width: 24px; height: 24px; }
.soon .logo { width: 112px; height: 112px; filter: drop-shadow(0 8px 24px var(--accent-soft)); }
.soon__name { font-size: 15px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: -6px; }
.stage { padding: 14px; border-radius: var(--radius-l); border: 1px solid var(--line); }
.stage .panel { box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* ── Service history as layers ──────────────────────────────────────────── */
.layer { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
.layer:first-child { border-top: 0; }
.layer:hover { background: var(--raised); }
.layer__thumb { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--radius-s); border: 1px solid var(--line-strong); color: var(--accent-hover); }
.layer__main { flex: 1; min-width: 0; }
.layer__end { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.layer__end strong { display: block; color: var(--text); font-weight: 500; font-size: 14px; }
.layer--sample { cursor: default; }

/* ── Cards in lists ─────────────────────────────────────────────────────── */
.vehicle-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--raised); color: var(--muted); }
.review { padding: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.review:first-child { border-top: 0; }
.review__text { overflow-wrap: anywhere; white-space: pre-wrap; }

/* ── Messages ───────────────────────────────────────────────────────────── */
.thread-view { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: var(--radius-l); background: var(--raised); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble--me { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: var(--on-accent); border-bottom-right-radius: 3px; }
.bubble--them { align-self: flex-start; border-bottom-left-radius: 3px; }
.bubble__time { display: block; margin-top: 2px; font-size: 11px; opacity: 0.7; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.composer .textarea { min-height: 44px; height: 44px; max-height: 120px; resize: none; }

/* ── Tab bar ────────────────────────────────────────────────────────────── */
.tabbar {
  position: fixed; z-index: 7; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; color: var(--faint); font-size: 11px; font-weight: 500; }
.tab[aria-current="page"] { color: var(--accent-hover); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--accent); }

/* ── Bottom sheet (<dialog>) ────────────────────────────────────────────── */
.sheet { padding: 0; border: 0; background: transparent; color: var(--text); max-width: 480px; width: 100%; margin: auto auto 0; max-height: 92dvh; overflow: visible; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.6); }
.sheet[open] { animation: sheet-up 0.2s ease-out; }
.sheet__panel { background: var(--raised); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: var(--radius-l) var(--radius-l) 0 0; box-shadow: var(--shadow-sheet); max-height: 92dvh; overflow-y: auto; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
/* The panel scrolls (max-height + overflow); its children must not shrink to fit, or a .panel (overflow: hidden) is squashed and clipped instead. */
.sheet__panel > * { flex-shrink: 0; }
.sheet__grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); align-self: center; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toasts { position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(140px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: var(--radius-m); background: var(--raised-hover); border: 1px solid var(--line-strong); box-shadow: 0 6px 20px rgba(0,0,0,.5); font-size: 14px; max-width: calc(100% - 32px); }
.toast--error { border-color: var(--danger); }

/* ── Loading ────────────────────────────────────────────────────────────── */
.skel { height: 60px; border-radius: var(--radius-m); background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Utilities (no inline styles: the CSP forbids them) ─────────────────── */
.sprite { position: absolute; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app[data-page="thread"] .main { padding-bottom: 0; }
.app[data-page="thread"] .composer { margin: 0 -16px; }
.panel .empty { border: 0; border-radius: 0; }

/* ── Admin ──────────────────────────────────────────────────────────────── */
.secret { display: block; padding: 14px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 0.12em; background: var(--sunken); border: 1px dashed var(--line-strong); border-radius: var(--radius-s); overflow-wrap: anywhere; user-select: all; }
.note { padding: 10px 12px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--text); font-size: 14px; }

/* Photos on a service record */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
a.thumb { display: block; }
.album-card__title { font-weight: 600; color: var(--text); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-width: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb__del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; }
.thumb__label { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; background: rgba(0, 0, 0, 0.6); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb__vis { position: absolute; top: 4px; left: 4px; min-height: 0; padding: 2px 8px; font-size: 11px; border-radius: 10px; background: rgba(0, 0, 0, 0.6); color: #fff; border: 0; }
.thumb img.fade, .photo-editor__img.fade { opacity: 0; transition: opacity 0.25s ease; }
.thumb img.fade.is-loaded, .photo-editor__img.fade.is-loaded { opacity: 1; }
.thumb img[role=button] { cursor: pointer; }
.photo-editor__img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; background: rgba(0, 0, 0, 0.05); }

/* ── Photo viewer (<dialog>): a larger image with arrows; swipe or use the arrow keys for the next photo ── */
.pview { padding: 0; border: 0; background: transparent; color: var(--text); width: min(100% - 24px, 560px); max-height: 94dvh; margin: auto; overflow: visible; }
.pview::backdrop { background: rgba(0, 0, 0, 0.7); }
.pview[open] { animation: sheet-up 0.2s ease-out; }
.pview__panel { background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius-l); box-shadow: var(--shadow-sheet); max-height: 94dvh; overflow-y: auto; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.pview__head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.pview__count { padding-left: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pview__stage { position: relative; display: flex; justify-content: center; padding: 20px 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pview__stage .photo-editor__img { background: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)); }
.pview__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; }
.pview__nav:hover { background: rgba(0, 0, 0, 0.75); }
.pview__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pview__head .icon-btn, .sheet__head .icon-btn { border: 1px solid var(--line); }
/* Every close button (bottom sheets and the photo viewer) is outlined alike. The viewer focuses its close button on open and after arrow-key steps; a subtle border instead of the accent ring. */
.pview__head .icon-btn:focus-visible, .sheet__head .icon-btn:focus-visible { outline: none; border-color: var(--line-strong); }
.pview__nav--prev { left: 8px; }
.pview__nav--next { right: 8px; }
.thumb--pending img { opacity: 0.45; }
.photo-status { margin: 0; font-size: 13px; color: var(--text-muted, inherit); }
.photo-status--ok { color: var(--success, #3fb27f); }
.photo-status--error { color: var(--danger, #e5534b); }
.photo-confirm { margin: 0; padding: 10px 12px; border: 1px solid var(--danger, #e5534b); border-radius: var(--radius-s); background: rgba(229, 83, 75, 0.12); color: var(--danger, #e5534b); font-weight: 600; font-size: 14px; }
.thumb__del svg.i { width: 16px; height: 16px; }
.thumb__del--armed { background: var(--danger, #c0392b); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }

.inbox-heading { display: flex; align-items: center; gap: 8px; }
.badge-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.badge-count[hidden] { display: none; }

/* ── Points: level badge, progress, and the how-it-works tour ───────────────────────────────────────────────────── */
.level { display: flex; align-items: center; gap: 14px; padding: 14px; }
.level__badge { width: 84px; height: 84px; flex: none; display: block; }
.level__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.level__name { font-size: 18px; font-weight: var(--weight-strong); }
.level__bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.level__bar > span { display: block; height: 100%; background: var(--accent); }
.chip-level { display: flex; align-items: center; gap: 12px; }
.chip-level img { width: 44px; height: 44px; flex: none; }
.spacer { flex: 1; }

/* Tour: the sheet's panel holds hand-sketched art (pencil, note colour and soft fills come from the theme tokens) */
.tour { padding-top: 0; overflow-x: hidden; }
.tour-art { margin: 0 -16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tour-art svg { display: block; width: 100%; height: auto; }
.tour-art .ink, .tour-art .pn, .tour-art .nt { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tour-art .ink { stroke: var(--text); stroke-width: 2.2; }
.tour-art .pn { stroke: var(--muted); stroke-width: 2; }
.tour-art .nt { stroke: var(--accent); stroke-width: 2.4; }
.tour-art .f1 { fill: var(--accent-soft); }
.tour-art .f2 { fill: var(--raised); }
.tour-art .dash { stroke-dasharray: 4 4; opacity: 0.7; }
.tour-art text { font-family: "Segoe Print", "Bradley Hand", "Marker Felt", "Chalkboard SE", "Comic Sans MS", cursive; fill: var(--muted); font-size: 13px; }
.tour-art .lbl { fill: var(--text); font-size: 14px; }
.tour-art .sm { font-size: 12px; }
.tour-art .tiny { font-size: 10.5px; }
.tour-art .hand { fill: var(--text); font-size: 14px; }
.tour-art .nx { fill: var(--accent); font-size: 14px; }
.tour-art .big { fill: var(--text); font-size: 26px; font-weight: 700; }
.tour-art .dotc { fill: var(--muted); opacity: 0.2; }
.tour-text { min-height: 66px; color: var(--muted); }
.tour-dots { display: flex; gap: 8px; justify-content: center; align-items: center; }
.tour-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 5px; background: var(--line-strong); cursor: pointer; }
.tour-dots button[aria-current="true"] { width: 24px; background: var(--accent); }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-actions [hidden] { display: none; }
