/* ============================================================================
   Localization Pressure Test — fake product demo
   Neutral, mature productivity-app styling. No gradients, no glassmorphism.
   ========================================================================== */
:root {
  --canvas-bg: #10131a; /* dark workspace — white product surfaces float on it */
  --panel: #ffffff;
  --ink: #14161b;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --line: #e9ebef;
  --line-strong: #d9dce2;
  /* ONE accent — the plugin's analysis language (selection, measurement, markers, relationships) */
  --accent: #3e63f0;
  --accent-soft: #eef1fe;
  --accent-ink: #2a46c4;
  --brand: var(--accent);
  --brand-soft: var(--accent-soft);
  --food: #ef4b39; /* the food app's own product brand — content, not the tool's language */
  --food-soft: #fdecea;
  --ok: #1f9d57; /* semantic success only (resolved / fixed) */
  --ok-soft: #e7f5ec;
  --danger: #d5352b;
  --shadow-sm: 0 1px 2px rgba(20, 22, 27, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 22, 27, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 22, 27, 0.14);
  --radius: 14px;
  /* problem types no longer carry competing colours — they resolve to the single accent */
  --t-overflow: var(--accent);
  --t-small: var(--accent);
  --t-clip: var(--accent);
  --t-font: var(--accent);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --indic: "Noto Sans", "Kohinoor Devanagari", "Devanagari Sangam MN", "Tamil Sangam MN",
    "Nirmala UI", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

#app { display: flex; flex-direction: column; height: 100vh; width: 100vw; }

/* ---- Desktop top bar ---------------------------------------------------- */
#topbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #161a23;
  border-bottom: 1px solid #232936;
  font-size: 12px;
  color: #8a93a3;
  z-index: 20;
}
.tb-left { display: flex; align-items: center; gap: 8px; }
.tb-logo { color: var(--food); font-size: 14px; }
.tb-file { color: #e6e9ef; font-weight: 600; }
.tb-sep { color: #545b6a; }
.tb-center {
  font-variant-numeric: tabular-nums;
  color: #9aa3b3;
  border: 1px solid #2a313f;
  border-radius: 6px;
  padding: 3px 8px;
}
.tb-right { display: flex; align-items: center; gap: 12px; }
.tb-share { color: var(--brand); font-weight: 600; }
.tb-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--food); color: #fff; font-weight: 600; font-size: 11px;
  display: grid; place-items: center;
}

/* ---- Workspace: canvas + plugin ---------------------------------------- */
#workspace { flex: 1; display: flex; min-height: 0; }

#canvas {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--canvas-bg);
  background-image: radial-gradient(circle, rgba(155, 166, 186, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
}
#world {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* ---- Artboards (mobile frames) ----------------------------------------- */
.artboard {
  position: absolute;
  width: 250px;
  transition: opacity 700ms ease, transform 700ms ease;
}
.artboard .ab-name {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.artboard.selected .ab-name { color: var(--brand); }
.artboard .ab-name .ab-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--faint); }
.artboard.selected .ab-name .ab-dot { background: var(--brand); }

.phone {
  position: relative;
  width: 250px;
  height: 512px;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.artboard.selected .phone {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.artboard.hidden { opacity: 0; transform: translateY(24px); pointer-events: none; }

/* selection handles */
.artboard.selected .handle {
  position: absolute; width: 7px; height: 7px; background: #fff;
  border: 1.5px solid var(--brand); border-radius: 1px; z-index: 5;
}
.handle.tl { top: 24px; left: -5px; }
.handle.tr { top: 24px; right: -5px; }
.handle.bl { bottom: -5px; left: -5px; }
.handle.br { bottom: -5px; right: -5px; }

/* issue annotation badge on a frame */
.ab-badge {
  position: absolute; top: 24px; right: 8px; z-index: 6;
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px 8px 3px 6px;
  box-shadow: var(--shadow-sm); font-size: 11px; font-weight: 600;
  transition: opacity 400ms ease, transform 400ms ease;
}
.ab-badge .dots { display: flex; gap: 3px; }
.ab-badge .d { width: 6px; height: 6px; border-radius: 50%; }
.ab-badge.gone { opacity: 0; transform: scale(0.8); }

/* spacing + alignment guides — tooling, so they speak the accent language */
.guide-v { position: absolute; width: 1px; background: rgba(62,99,240,0.4); z-index: 1; }
.spacing {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 4px;
}
.spacing .bar { height: 1px; background: var(--accent); flex: 1; }
.spacing .val {
  font-size: 10px; color: #fff; background: var(--accent);
  border-radius: 3px; padding: 1px 5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* export section wrapper */
#section {
  position: absolute; z-index: 0;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.55);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 600ms ease;
}
#section.show { opacity: 1; }
/* Fully hide export sections (incl. their title) until shown — no bleed-through. */
#section:not(.show), #section2:not(.show) { visibility: hidden; }
#section.show, #section2.show { visibility: visible; }
#section .sec-title {
  position: absolute; top: -30px; left: 4px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
#section .sec-pill {
  font-family: var(--indic);
  background: var(--ok-soft); color: var(--ok);
  border-radius: 6px; padding: 2px 8px; font-size: 12px;
}

/* reveal highlight overlay (placed inside a phone) — colour via --c */
.reveal-box, .hl-box {
  position: absolute; z-index: 10;
  --c: var(--t-overflow);
  border: 2px solid var(--c);
  border-radius: 8px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 16%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 4%, transparent); }
}
.reveal-tag, .hl-tag {
  position: absolute; z-index: 11;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 6px;
  white-space: nowrap; box-shadow: var(--shadow-md);
}
.reveal-tag::after, .hl-tag::after {
  content: ""; position: absolute; bottom: -4px; left: 14px;
  width: 8px; height: 8px; background: var(--ink); transform: rotate(45deg);
}

/* canvas component (Go to component target) */
#components { position: absolute; }
#components.hidden { display: none; }
.comp-name { font-size: 12px; color: var(--accent-ink); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.comp-frame {
  width: 260px; background: #fff; border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 16px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 12px;
}
#components.picked .comp-frame { outline: 2px solid var(--accent); outline-offset: 3px; }
.comp-frame .cf-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.comp-btn { background: var(--food); color: #fff; font-weight: 700; font-size: 13px; text-align: center; padding: 11px; border-radius: 10px; }
.comp-btn.ghost { background: #fff; color: var(--food); border: 1px solid var(--food); }
.picked-tag {
  position: absolute; top: -12px; left: 0; z-index: 12;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; opacity: 0; transition: opacity 300ms ease;
}
#components.picked .picked-tag { opacity: 1; }

/* green "resolved" badge for re-check on canvas */
.ab-badge.ok { color: var(--ok); }
.ab-badge.ok .chk { color: var(--ok); font-weight: 800; }

/* ============================================================================
   FOOD APP — mobile screen components
   ========================================================================== */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 12px; }
.screen.indic { font-family: var(--indic); }
.statusbar {
  flex: 0 0 26px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; font-size: 10px; font-weight: 600; color: var(--ink);
}
.statusbar .sb-dots { letter-spacing: 1px; }
.body { flex: 1; overflow: hidden; padding: 4px 12px 0; }
.navbar {
  flex: 0 0 42px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
  font-size: 15px; color: var(--faint);
}
.navbar .on { color: var(--food); }
.navbar i { font-style: normal; }

.muted { color: var(--muted); }
.sec-h { font-weight: 700; font-size: 13px; margin: 10px 0 8px; }
.scr-title { font-weight: 700; font-size: 16px; margin: 6px 2px 12px; }

/* home */
.loc { display: flex; flex-direction: column; gap: 1px; margin: 6px 2px 10px; }
.loc small { color: var(--food); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.loc b { font-size: 13px; }
.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 9px 10px; color: var(--muted); font-size: 12px;
  overflow: hidden; white-space: nowrap;
}
.cats { display: flex; gap: 10px; margin: 14px 0 4px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.cat-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--food-soft); display: grid; place-items: center; font-size: 18px; }
.cat span { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.rcard {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.rcard .thumb { height: 78px; background: #f1f3f6; display: grid; place-items: center; font-size: 34px; position: relative; }
.rcard .free {
  position: absolute; left: 8px; bottom: 8px; background: #fff; color: var(--ink);
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; box-shadow: var(--shadow-sm);
}
.rcard .rc-body { padding: 8px 10px 10px; }
.rcard .rc-top { display: flex; justify-content: space-between; align-items: center; }
.rcard .rc-name { font-weight: 700; font-size: 12.5px; }
.rating { background: var(--ok); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
.rcard .rc-meta { color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* restaurant */
.hero { height: 92px; background: #f1f3f6; display: grid; place-items: center; font-size: 44px; margin: 0 -12px 0; }
.rest-head { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.rest-head .rh-name { font-weight: 700; font-size: 15px; }
.rest-head .rh-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.rest-head .rating { margin-top: 6px; display: inline-block; }
.mtabs { display: flex; gap: 14px; padding: 10px 2px; font-size: 12px; color: var(--muted); }
.mtabs .on { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--food); padding-bottom: 4px; }
.item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item .it-l { flex: 1; min-width: 0; }
.item .it-tag { font-size: 9px; font-weight: 700; color: var(--food); text-transform: uppercase; letter-spacing: 0.4px; }
.item .it-name { font-weight: 600; font-size: 12.5px; margin: 2px 0; }
.item .it-price { color: var(--ink); font-size: 12px; }
.item .it-r { width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.item .it-thumb { width: 62px; height: 48px; border-radius: 10px; background: #f1f3f6; display: grid; place-items: center; font-size: 22px; }
.addbtn {
  border: 1px solid var(--food); color: var(--food); background: #fff;
  font-weight: 700; font-size: 11px; border-radius: 8px; padding: 4px 0;
  width: 62px; text-align: center; box-shadow: var(--shadow-sm);
  overflow: hidden; white-space: nowrap;
}

/* cart / bill */
.crow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crow .c-th { width: 40px; height: 40px; border-radius: 10px; background: #f1f3f6; display: grid; place-items: center; font-size: 20px; }
.crow .c-name { font-weight: 600; font-size: 12px; }
.crow .c-qty { color: var(--muted); font-size: 11px; }
.crow .c-price { margin-left: auto; font-weight: 600; font-size: 12px; }
.bill { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.bill .brow { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.bill .brow.total { color: var(--ink); font-weight: 700; font-size: 13px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.cta {
  margin-top: 14px; width: 100%; border: none; background: var(--food); color: #fff;
  font-weight: 700; font-size: 13px; padding: 12px; border-radius: 12px; box-shadow: var(--shadow-sm);
  font-family: inherit; white-space: nowrap; overflow: hidden;
}
.cta.fixed { width: 120px; margin-left: auto; margin-right: auto; display: block; text-overflow: clip; }
.cta.hug { display: inline-block; width: auto; margin-top: 14px; padding: 12px 22px; white-space: nowrap; overflow: visible; }

/* checkout */
.co-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.co-card .co-top { display: flex; justify-content: space-between; align-items: center; }
.co-card small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.co-card .co-change { color: var(--food); font-weight: 600; font-size: 11px; }
.co-card b { display: block; font-size: 12.5px; margin-top: 3px; }
.co-card .co-sub { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.35; }
/* Indic address: tight line-height clips the stacked vowel marks (line-clip bug). */
.screen.indic .co-sub.addr { line-height: 0.92; max-height: 22px; overflow: hidden; }
.co-sum .brow { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.co-sum .brow.total { color: var(--ink); font-weight: 700; }

/* orders */
.ocard { border: 1px solid var(--line); border-radius: 12px; padding: 11px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.ocard .o-top { display: flex; gap: 10px; align-items: center; }
.ocard .o-th { width: 38px; height: 38px; border-radius: 9px; background: #f1f3f6; display: grid; place-items: center; font-size: 19px; }
.ocard .o-name { font-weight: 700; font-size: 12.5px; }
.ocard .o-items { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; overflow: hidden; }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.way { background: #fff3e6; color: #b6741f; }
.ocard .o-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.ocard .o-foot-l { display: flex; align-items: center; gap: 8px; }
.otag { font-size: 9px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 6px; letter-spacing: 0.4px; }
.otag.tofu { color: #9aa1ab; letter-spacing: 1px; }
.reorder { border: 1px solid var(--food); color: var(--food); background: #fff; font-weight: 700; font-size: 11px; border-radius: 8px; padding: 5px 12px; }

/* profile */
.prof-head { display: flex; align-items: center; gap: 12px; padding: 8px 2px 14px; }
.avatar-lg { width: 46px; height: 46px; border-radius: 50%; background: var(--food); color: #fff; font-weight: 700; font-size: 18px; display: grid; place-items: center; }
.prof-head b { font-size: 14px; }
.prow { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.prow .p-r { color: var(--faint); }
.logout { margin-top: 16px; width: 100%; border: 1px solid var(--line-strong); background: #fff; color: var(--danger); font-weight: 700; font-size: 12.5px; padding: 11px; border-radius: 10px; font-family: inherit; }

/* ============================================================================
   PLUGIN PANEL
   ========================================================================== */
#plugin {
  flex: 0 0 320px;
  width: 320px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 15;
}
.pg-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.pg-head .pg-mark { width: 18px; height: 18px; border-radius: 5px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 11px; }
.pg-head .pg-title { font-size: 12px; font-weight: 600; }
.pg-head .pg-x { margin-left: auto; color: var(--faint); font-size: 14px; }
.pg-body { flex: 1; overflow-y: auto; padding: 14px; }
.pg-body::-webkit-scrollbar { width: 8px; }
.pg-body::-webkit-scrollbar-thumb { background: #dfe2e8; border-radius: 8px; }

.pg-anim { animation: fade 260ms ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* generate view */
.pv-title { font-size: 15px; font-weight: 600; }
.pv-sub { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 3px 0 18px; }
.pv-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--faint); margin: 0 0 8px; font-weight: 600; }
.opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; font-family: var(--indic); }
.opt.on { border-color: var(--brand); }
.opt .tick { width: 18px; height: 18px; flex: 0 0 auto; }
.opt .soon { margin-left: auto; font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.3px; font-family: var(--font); }
.field-gap { height: 10px; }
.btn {
  font-family: var(--font); font-weight: 600; font-size: 13px; line-height: 1;
  border-radius: 8px; border: 1px solid transparent; cursor: default; padding: 11px 16px;
}
.btn.primary { background: var(--brand); color: #fff; width: 100%; }
.btn.block { width: 100%; }
.btn.pulse {
  box-shadow: 0 0 0 4px rgba(45, 125, 246, 0.22);
  animation: btnpulse 1.2s ease-in-out infinite;
}
@keyframes btnpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45,125,246,0.0); }
  50% { box-shadow: 0 0 0 5px rgba(45,125,246,0.18); }
}
.pv-hint { font-size: 11px; color: var(--faint); text-align: center; margin-top: 10px; }

/* progress view */
.prog-title { font-size: 14px; font-weight: 600; }
.prog-sub { font-size: 12px; color: var(--muted); margin: 2px 0 16px; }
.prog-track { height: 6px; background: #eef0f3; border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.prog-fill { height: 100%; background: var(--brand); border-radius: 6px; width: 0; transition: width 700ms ease; }
.stage { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; }
.stage .mk { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 10px; border: 1.5px solid var(--line-strong); color: transparent; }
.stage.done .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.stage.active .mk { border-color: var(--brand); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.stage.done { color: var(--ink); }
.stage.active { color: var(--ink); font-weight: 600; }
.stage.pending { color: var(--faint); }
@keyframes spin { to { transform: rotate(360deg); } }

/* results view */
.res-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.res-title { font-size: 13px; font-weight: 600; }
.res-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.res-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.mini { font-size: 12px; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.mini.tonal { background: var(--brand-soft); color: var(--brand); }
.mini.ghost { color: var(--muted); }
.anchor-num { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.anchor-unit { font-size: 12px; color: var(--muted); margin-left: 6px; }
.anchor-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.toggle { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: #eef0f3; margin: 14px 0; }
.toggle button { flex: 1; font-family: var(--font); font-size: 11px; font-weight: 600; padding: 6px 8px; border-radius: 6px; border: none; background: transparent; color: var(--muted); }
.toggle button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.scard { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 8px; }
.scard .s-top { display: flex; align-items: baseline; gap: 8px; }
.scard .s-name { font-size: 14px; font-weight: 600; flex: 1; }
.scard .s-count { font-size: 11px; color: var(--muted); }
.scard .s-count b { color: var(--ink); }
.scard .s-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.scard .s-sum span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }

/* reveal detail */
.back { font-size: 11px; color: var(--brand); font-weight: 600; margin-bottom: 14px; display: inline-flex; gap: 4px; }
.rv-kicker { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.rv-title { font-size: 15px; font-weight: 600; margin: 6px 0 4px; }
.rv-layer { font-size: 12px; color: var(--muted); }
.rv-row { display: flex; gap: 8px; font-size: 12px; margin-top: 12px; }
.rv-row .k { width: 96px; color: var(--faint); flex: 0 0 auto; font-size: 11px; }
.rv-row .v { color: var(--ink); }
.rv-actions { margin-top: 18px; display: flex; gap: 8px; }
.mini.solid { background: var(--brand); color: #fff; }
.mini.line { border: 1px solid var(--line-strong); color: var(--ink); }

/* design system cards */
.dcard { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 8px; }
.dcard .d-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin: 6px 0 4px; }
.dcard .d-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.dcard .d-scope { font-size: 11px; color: var(--muted); margin: 8px 0; }
.dcard .d-rec { font-size: 12px; }
.dcard .d-rec b { color: var(--ink); }
.dcard .d-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.linklike { font-size: 11px; font-weight: 600; color: var(--brand); display: inline-flex; gap: 5px; align-items: center; }
.navfail { font-size: 11px; line-height: 1.45; margin-top: 10px; color: var(--danger); }

/* banners */
.banner { display: flex; gap: 10px; align-items: center; border-radius: 10px; padding: 11px 12px; margin-bottom: 14px; animation: fade 300ms ease-out; }
.banner.ok { background: var(--ok-soft); }
.banner .b-ic { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; }
.banner .b-t { font-size: 12px; font-weight: 600; }
.banner .b-m { font-size: 11px; color: var(--muted); margin-top: 1px; }

.counter { font-variant-numeric: tabular-nums; }

/* Film cut — cinematic fade, and hide the live zoom readout (a screen-recording tell). */
#film-fade { position: fixed; inset: 0; background: var(--canvas-bg); opacity: 0; z-index: 9999; pointer-events: none; transition: opacity 900ms ease; }
#film-fade.on { opacity: 1; }
.film-mode #tb-zoom { visibility: hidden; }

/* Subtle explanatory caption — small, neutral, lower hierarchy than the UI. */
#film-cap {
  position: fixed; left: calc((100% - 320px) / 2); transform: translateX(-50%);
  bottom: 54px; z-index: 60; pointer-events: none; text-align: center;
  opacity: 0; transition: opacity 460ms ease;
}
#film-cap.on { opacity: 1; }
#film-cap .cap-inner {
  display: inline-block; background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-radius: 12px; padding: 9px 16px;
}
#film-cap .c1 { font-size: 13px; font-weight: 500; color: var(--ink); letter-spacing: 0.1px; }
#film-cap.title .c1 { font-size: 15px; font-weight: 600; }
#film-cap .c2 { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 3px; }
#film-cap .num { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Evaluation "alive" cues — a soft scan sweep and gently breathing selection. */
#scan {
  position: absolute; top: 0; bottom: 0; width: 190px; z-index: 6; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(62, 99, 240, 0.07), transparent);
}
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(62, 99, 240, 0); } 50% { box-shadow: 0 0 0 3px rgba(62, 99, 240, 0.10); } }
.film-mode .artboard.selected .phone { animation: breathe 2.8s ease-in-out infinite; }

/* Pressure signature — under evaluation the localized layout strains, almost subconsciously… */
.artboard.under-pressure .phone { animation: strainPhone 2.6s ease-in-out infinite; }
@keyframes strainPhone {
  0%, 100% { transform: scaleY(1); }
  55% { transform: scaleY(1.007) translateY(-0.6px); }
}
/* …then, once fixed, it visibly returns to equilibrium. */
.artboard.relaxed .phone { animation: relaxPhone 720ms cubic-bezier(.22,.61,.36,1); }
@keyframes relaxPhone { from { transform: scaleY(1.007); } to { transform: scaleY(1); } }

/* language tabs (bilingual results) */
.lang-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 0 0 14px; }
.lang-tabs button {
  font-family: var(--indic); font-size: 13px; font-weight: 600;
  padding: 8px 2px; border: none; background: transparent; color: var(--faint);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.lang-tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }

/* before / after comparison */
#beforeafter { position: absolute; display: flex; gap: 44px; }
#beforeafter.hidden { display: none; }
.ba-col { display: flex; flex-direction: column; gap: 10px; }
.ba-tag {
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px;
  align-self: flex-start;
}
.ba-tag.bad { background: var(--food-soft); color: var(--food); }
.ba-tag.good { background: var(--ok-soft); color: var(--ok); }
.ba-col .phone { width: 250px; height: 512px; }

/* ── Delta Engine overlays — the geometry the plugin is measuring ────────── */
/* width dimension line (draws in left→right) */
.measure { position: absolute; z-index: 10; height: 12px; }
.measure .bar { position: absolute; top: 6px; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--accent); transform-origin: left; }
.measure .bar::before, .measure .bar::after { content: ""; position: absolute; top: -4px; width: 1.5px; height: 9px; background: var(--accent); }
.measure .bar::before { left: 0; } .measure .bar::after { right: 0; }
.measure .lbl { position: absolute; left: 50%; top: -7px; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.measure.draw .bar { animation: drawx 480ms cubic-bezier(.4,0,.2,1); }
@keyframes drawx { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* vertical growth arrow (frame grew taller) */
.grow { position: absolute; z-index: 10; display: flex; flex-direction: column; align-items: center; width: 12px; }
.grow .stem { width: 1.5px; flex: 1; background: var(--accent); transform-origin: top; }
.grow .head { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--accent); }
.grow .lbl { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); background: var(--accent); color: #fff; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.grow.draw .stem { animation: drawy 480ms cubic-bezier(.4,0,.2,1); }
@keyframes drawy { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* dashed baseline (original English bounds) */
.baseline { position: absolute; z-index: 8; border: 1.5px dashed rgba(20, 24, 45, 0.32); border-radius: 7px; }
.baseline .lbl { position: absolute; top: -15px; left: 0; font-size: 9px; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* pressure badge on an affected layer */
.pressure { position: absolute; z-index: 12; --c: var(--accent); background: var(--c); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* on-canvas recommendation chip — light, accent-led, premium */
.reco { position: absolute; z-index: 12; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); font-size: 10.5px; font-weight: 500; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line-strong); box-shadow: var(--shadow-md); white-space: nowrap; }
.reco::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.reco::after { content: ""; position: absolute; top: -5px; left: 16px; width: 8px; height: 8px; background: #fff; border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg); }

/* Gentle entrance — eases in, never overshoots or bounces. */
.pop { animation: pop 360ms cubic-bezier(.22,.61,.36,1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* frame-level resolved flash (re-check) */
.artboard.resolved .phone { animation: resolveFlash 900ms ease; }
@keyframes resolveFlash { 0% { box-shadow: var(--shadow-md); } 35% { box-shadow: 0 0 0 3px rgba(31,157,87,0.45), var(--shadow-md); } 100% { box-shadow: var(--shadow-md); } }

/* Capture mode — freeze decorative animation so screenshots are crisp & deterministic. */
.shot .pg-anim,
.shot .banner,
.shot .ab-badge,
.shot .reveal-box,
.shot .hl-box,
.shot .btn.pulse,
.shot .measure .bar,
.shot .grow .stem,
.shot .pop,
.shot .artboard.resolved .phone { animation: none !important; }
.shot .prog-fill { transition: none !important; }
