:root {
  --ink: #171717;
  --muted: #5d6470;
  --paper: #f8f8fb;
  --panel: #ffffff;
  --line: #dfe3ea;
  --green: #4ea72e;
  --green-dark: #2f7b17;
  --red: #ee1c20;
  --red-dark: #c61216;
  --gold: #fbbc04;
  --gold-deep: #d99a00;
  --blue: #1558d6;
  --blue-dark: #0d43a5;
  --mint: #edf7e7;
  --sky: #eef4ff;
  --rose: #fff0f0;
  --sun: #fff7d9;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #eef4ff 0, var(--paper) 220px);
  font-family: Arial, Helvetica, sans-serif;
}

body.app-booting {
  min-height: 100vh;
  background: #fff;
}

body.app-booting .login-screen,
body.app-booting .mode-landing,
body.app-booting .simple-camera-sheet,
body.app-booting .app-shell,
body.app-booting .global-finds-bar {
  visibility: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 0 36px;
}

.login-screen {
  min-height: 100vh;
  width: min(520px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 34px 0;
}

.login-panel {
  display: grid;
  gap: 18px;
  border: 2px solid rgba(223, 227, 234, 0.95);
  border-radius: 18px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(21, 88, 214, 0.08), rgba(255, 255, 255, 0) 46%),
    #fff;
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.12);
}

.login-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
}

.login-copy h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 0.95;
}

.login-copy p:not(.eyebrow),
.login-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.remembered-account {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(78, 167, 46, 0.22);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 13px;
  background: var(--mint);
}

.remembered-account span {
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.remembered-account strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.remembered-account p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.remembered-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-fields {
  display: grid;
  gap: 8px;
}

.login-fields label {
  font-weight: 800;
  font-size: 0.9rem;
}

.login-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfcff;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
}

.password-row input {
  border-radius: 8px 0 0 8px;
  border-right: 0;
}

.password-toggle {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
  color: var(--blue-dark);
  background: #fff;
  cursor: pointer;
}

.password-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.confirm-password-row {
  display: grid;
  gap: 8px;
}

.username-row {
  display: grid;
  gap: 8px;
}

.field-help {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.remember-me-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.remember-me-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.social-login-actions {
  display: grid;
  gap: 12px;
}

.social-login-button {
  min-height: 54px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
  font-size: 1rem;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.social-login-button:hover {
  background: #f8fafd;
  border-color: #c7d2e4;
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.08);
}

.social-login-button:active {
  transform: translateY(1px);
}

.social-login-button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
  transform: none;
}

.social-login-button:disabled:hover {
  background: #fff;
  border-color: #dadce0;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.social-login-button .social-login-mark {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.google-mark svg {
  width: 18px;
  height: 18px;
  display: block;
}

.apple-mark svg {
  width: 18px;
  height: 22px;
  fill: currentColor;
}

.apple-login-button {
  background: #050505;
  border-color: #050505;
  color: #fff;
}

.apple-login-button:hover {
  background: #1d1d1f;
  border-color: #1d1d1f;
}

.apple-login-button .apple-mark {
  color: #fff;
}

.apple-login-button:disabled,
.apple-login-button:disabled:hover {
  background: #f4f6fb;
  border-color: #d7deea;
  color: #657084;
}

.apple-login-button:disabled .apple-mark {
  color: #657084;
}

.landing-admin-card {
  border: 1px solid rgba(251, 188, 4, 0.42);
  border-radius: 999px;
  width: min(100%, 430px);
  margin: 10px auto 0;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #102247;
  background: linear-gradient(135deg, #fff7d9, #ffffff 52%, #eef4ff);
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(21, 88, 214, 0.14);
}

.landing-admin-card span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  background: var(--red);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.landing-admin-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.username-setup-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
}

.username-setup-card {
  width: min(100%, 430px);
  display: grid;
  gap: 12px;
  border: 2px solid rgba(21, 88, 214, 0.18);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.username-setup-card h2 {
  margin: 4px 0 8px;
  line-height: 1;
}

.username-setup-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.username-setup-card label {
  font-weight: 900;
}

.username-setup-card input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfcff;
}

.username-setup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.two-factor-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--sky);
}

.two-factor-box strong {
  color: var(--blue-dark);
  font-size: 0.9rem;
}

.two-factor-box p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.two-factor-box > span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #7a4b00;
  background: var(--sun);
  font-size: 0.72rem;
  font-weight: 900;
}

.two-factor-row {
  display: grid;
  gap: 8px;
}

.two-factor-row input {
  letter-spacing: 0.18em;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.two-factor-test-code {
  margin: 0;
  border: 1px dashed rgba(21, 88, 214, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--blue-dark);
  background: #f6f9ff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red-dark);
  font-weight: 800;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: center;
  margin-top: -4px;
}

.text-action {
  border: 0;
  padding: 4px 2px;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-action:disabled {
  color: var(--muted);
  cursor: wait;
}

.text-action.login-attention {
  color: var(--red-dark);
  text-decoration-thickness: 2px;
}

.login-actions .login-attention {
  border-color: rgba(78, 167, 46, 0.45);
  color: #13751f;
  background: linear-gradient(180deg, #f5fff4, #e7f8e7);
  box-shadow: 0 0 0 4px rgba(78, 167, 46, 0.12), 0 10px 22px rgba(78, 167, 46, 0.16);
}

.account-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.account-plan-pill {
  border: 1px solid rgba(20, 138, 75, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-dark);
  background: rgba(20, 138, 75, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.account-plan-pill.needs-upgrade {
  display: none;
  border-color: rgba(251, 188, 4, 0.42);
  color: #7a4b00;
  background: #fff7d9;
}

.account-plan-pill.expired {
  border-color: rgba(224, 49, 49, 0.22);
  color: var(--red-dark);
  background: rgba(224, 49, 49, 0.08);
}

.backend-sync-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.backend-sync-pill.cloud {
  border-color: rgba(20, 138, 75, 0.22);
  color: var(--green-dark);
  background: rgba(20, 138, 75, 0.08);
}

.backend-sync-pill.local {
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--blue-dark);
  background: #eef5ff;
}

.backend-sync-pill.warning {
  border-color: rgba(251, 188, 4, 0.42);
  color: #7a4b00;
  background: #fff7d9;
}

.logout-button {
  width: 100%;
  padding: 11px 12px;
  font-size: 0.9rem;
  border-color: rgba(220, 38, 38, 0.24);
  color: #b91c1c;
  background: #fff7f7;
}

.mode-landing {
  min-height: 100vh;
  width: min(940px, calc(100% - 18px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 10px 0 18px;
}

.landing-stage {
  position: relative;
  overflow: hidden;
  width: min(100%, 720px);
  min-height: min(100vh - 20px, 1040px);
  border: 1px solid rgba(223, 227, 234, 0.92);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 34px) clamp(16px, 4vw, 34px);
  background:
    radial-gradient(circle at 8% 0%, rgba(78, 167, 46, 0.18), transparent 28%),
    radial-gradient(circle at 95% 13%, rgba(21, 88, 214, 0.12), transparent 24%),
    linear-gradient(140deg, transparent 48%, rgba(78, 167, 46, 0.1) 49%, transparent 66%),
    linear-gradient(160deg, transparent 55%, rgba(238, 28, 32, 0.12) 56%, transparent 70%),
    #fff;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.1);
}

.reference-landing {
  align-content: start;
  padding: 0 0 max(10px, env(safe-area-inset-bottom));
}

.reference-landing .landing-stage {
  width: min(100%, 430px, calc((100svh - 18px) * 853 / 1545));
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 36px;
  padding: 8px 8px 10px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(31, 56, 102, 0.16);
  overflow: hidden;
}

.reference-landing .landing-stage::before,
.reference-landing .landing-stage::after,
.reference-landing .landing-stage-glow,
.reference-landing .brand-logo,
.reference-landing .landing-copy,
.reference-landing .landing-hero-art,
.reference-landing .landing-scan-note,
.reference-landing #landing-premium-link {
  display: none;
}

.reference-landing .landing-privacy-note {
  position: static;
  display: inline-flex;
  align-self: center;
  justify-self: center;
  margin: 8px auto 0;
  padding: 0 14px;
  font-size: 0.82rem;
}

.reference-landing .landing-privacy-note span {
  width: 18px;
}

.reference-landing .landing-privacy-note span::after {
  width: 5px;
  height: 9px;
  border-width: 0 2px 2px 0;
}

.landing-reference-art {
  display: none;
}

.reference-landing .landing-reference-art {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: min(51svh, 470px);
  border-radius: 28px 28px 10px 10px;
  object-fit: cover;
  object-position: top center;
}

.reference-landing .landing-stage-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
  margin: 6px 3.2% 0;
  padding: 18px 13px 18px;
  text-align: left;
  border-radius: 24px 24px 30px 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 22px rgba(31, 56, 102, 0.1), 0 16px 30px rgba(31, 56, 102, 0.12);
}

.reference-landing .landing-stage-content::after {
  content: none;
}

.reference-landing .mode-actions.single-action {
  position: absolute;
  left: 8.7%;
  right: 8.7%;
  top: 58%;
  width: auto;
  display: block;
}

.reference-landing .mode-choice-actions {
  position: static;
  width: 100%;
  display: contents;
  pointer-events: auto;
  z-index: 3;
}

.reference-landing .mode-choice-actions .mode-card {
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
}

.reference-landing .mode-choice-actions .mode-card::before {
  content: none;
}

.reference-landing .mode-choice-actions .mode-card-icon {
  display: none;
}

.reference-landing .mode-choice-actions span:not(.mode-card-badge) {
  display: none;
}

.reference-landing .mode-choice-actions strong {
  font-size: inherit;
}

.reference-landing .mode-choice-actions em {
  font-style: normal;
}

.reference-landing .mode-choice-actions b {
  line-height: 1;
}

.reference-landing .mode-choice-actions .research-mode-card {
  order: 2;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  height: clamp(74px, 17.8vw, 94px);
  display: flex;
  align-items: center;
  justify-content: center;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 18px;
  padding: 0 clamp(64px, 15vw, 78px);
  color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 44'%3E%3Cpath d='M22 6 40 22 22 38' fill='none' stroke='white' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44 6 62 22 44 38' fill='none' stroke='white' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right clamp(18px, 5vw, 30px) center / clamp(42px, 11vw, 64px) auto no-repeat,
    linear-gradient(180deg, #3c8cff 0%, #1766df 48%, #0848b7 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.42), inset 0 -4px 0 rgba(5, 44, 128, 0.26), 0 12px 20px rgba(21, 88, 214, 0.28);
  text-align: center;
  z-index: 4;
}

.reference-landing .mode-choice-actions .research-mode-card {
  opacity: 1;
}

.reference-landing .mode-choice-actions .research-mode-card::before {
  content: "\2039\2039";
  position: absolute;
  left: clamp(24px, 7vw, 38px);
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: clamp(2.05rem, 7.2vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.16em;
  line-height: 1;
  text-shadow: 0 4px 9px rgba(11, 61, 157, 0.3);
}

.reference-landing .mode-choice-actions .research-mode-card::after {
  content: "Quick Flip Pro";
  color: #fff;
  font-size: clamp(1.48rem, 6.15vw, 2.12rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.reference-landing .mode-choice-actions .mode-card-badge {
  display: none;
  place-items: center;
  position: static;
  width: 38px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 999px;
  padding: 0;
  color: #7a4b00;
  background: linear-gradient(135deg, #ffe58a, #fbbc04);
  font-size: 0.62rem;
  box-shadow: 0 6px 13px rgba(0, 0, 0, 0.16);
}

.reference-landing .mode-choice-actions .research-mode-card strong {
  grid-area: title;
  color: #fff;
  font-size: clamp(1.05rem, 4.3vw, 1.36rem);
  line-height: 1;
}

.reference-landing .mode-choice-actions .research-mode-card em {
  grid-area: sub;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.66rem, 2.15vw, 0.82rem);
  font-weight: 800;
  transform: none;
}

.reference-landing .mode-choice-actions .research-mode-card b {
  grid-area: arrow;
  color: #fff;
  background: transparent;
  font-size: 2.25rem;
  font-weight: 950;
  letter-spacing: -0.12em;
  text-indent: -0.08em;
  text-shadow: 0 4px 9px rgba(11, 61, 157, 0.35);
}

.reference-landing .primary-scan-card {
  min-height: clamp(58px, 16vw, 76px);
  height: clamp(58px, 16vw, 76px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: transparent;
  background: transparent;
  box-shadow: none;
}

.reference-landing .primary-scan-card svg,
.reference-landing .primary-scan-card strong,
.reference-landing .primary-scan-card b {
  opacity: 0;
}

.reference-landing .mode-choice-actions .primary-scan-card {
  order: 1;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  height: clamp(78px, 18.8vw, 100px);
  border: 0;
  border-radius: 22px;
  padding: 0 clamp(18px, 5vw, 30px);
  color: #fff;
  background: linear-gradient(180deg, #7de98f 0%, #25b642 43%, #0c8f2c 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.52), inset 0 -4px 0 rgba(4, 99, 33, 0.24), 0 14px 22px rgba(28, 166, 55, 0.26);
  z-index: 3;
}

.reference-landing .mode-choice-actions .primary-scan-card::after {
  content: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.72rem, 7.3vw, 2.46rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.reference-landing .mode-choice-actions .primary-scan-card::before {
  content: "";
  position: absolute;
  left: clamp(20px, 8.5vw, 42px);
  top: 50%;
  width: clamp(46px, 11vw, 60px);
  height: clamp(46px, 11vw, 60px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 54'%3E%3Cpath d='M20 13v28l22-14z' fill='white'/%3E%3C/svg%3E") center / 58% 58% no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.12) 48%, rgba(0, 105, 255, 0.42)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(20, 170, 68, 0.36));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 6px 12px rgba(4, 99, 33, 0.24);
  transform: translateY(-50%);
  pointer-events: none;
}

.reference-landing .mode-choice-actions .primary-scan-card .mode-card-icon {
  display: none;
}

.reference-landing .mode-choice-actions .primary-scan-card .mode-card-badge,
.reference-landing .mode-choice-actions .primary-scan-card::marker {
  display: none;
}

.reference-landing .mode-choice-actions .primary-scan-card::after,
.reference-landing .landing-dashboard-card p strong,
.reference-landing .mode-choice-actions .research-mode-card::after {
  text-shadow: 0 3px 8px rgba(17, 24, 39, 0.16);
}

.reference-landing .mode-choice-actions .primary-scan-card > span {
  display: none;
}

.reference-landing .mode-choice-actions .primary-scan-card > .primary-scan-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  gap: 3px;
  justify-items: center;
  color: #fff;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 3px 8px rgba(17, 24, 39, 0.16);
}

.reference-landing .mode-choice-actions .primary-scan-card > .primary-scan-copy strong {
  display: block;
  color: #fff;
  font-size: clamp(1.72rem, 7.3vw, 2.46rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.92;
  opacity: 1;
}

.reference-landing .mode-choice-actions .primary-scan-card > .primary-scan-copy small {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.58rem, 2.35vw, 0.84rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.reference-landing .mode-choice-actions .primary-scan-card svg,
.reference-landing .mode-choice-actions .primary-scan-card > strong,
.reference-landing .mode-choice-actions .primary-scan-card b {
  opacity: 0;
}

.reference-landing .mode-choice-actions .primary-scan-card .mode-card-icon {
  fill: var(--green);
}

.reference-landing .landing-dashboard-card {
  order: 0;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  height: clamp(72px, 17.2vw, 90px);
  border: 0;
  border-radius: 18px;
  padding: 0 clamp(18px, 5vw, 30px);
  color: #0f3f9b;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 20px rgba(31, 56, 102, 0.12);
  touch-action: manipulation;
  z-index: 4;
}

.reference-landing .landing-secondary-actions {
  order: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  z-index: 4;
}

.reference-landing .landing-secondary-actions .landing-dashboard-card {
  grid-template-columns: auto minmax(0, 1fr);
  height: 74px;
  border: 1px solid rgba(21, 88, 214, 0.12);
  border-radius: 16px;
  gap: 9px;
  padding: 8px 30px 8px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 8px 17px rgba(31, 56, 102, 0.1);
}

.reference-landing .landing-secondary-actions .landing-dashboard-card p strong {
  font-size: clamp(1rem, 4.2vw, 1.38rem);
}

.reference-landing .landing-secondary-actions .landing-dashboard-card b {
  right: clamp(10px, 3.2vw, 16px);
  font-size: clamp(1.35rem, 5vw, 1.95rem);
}

.reference-landing .landing-business-card {
  border-color: rgba(251, 188, 4, 0.52);
  background: linear-gradient(140deg, #fff8d6 0%, #f5fbff 54%, #f4ffe8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 17px rgba(251, 188, 4, 0.16);
}

.reference-landing .landing-business-card .retail-badge-icon {
  display: none;
}

.reference-landing .landing-admin-card {
  order: 4;
  width: 100%;
  margin-top: 0;
}

.reference-landing .landing-dashboard-card * {
  opacity: 1;
}

.reference-landing .landing-dashboard-card .dashboard-grid-icon {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  flex: 0 0 auto;
  gap: 4px;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  border-radius: 13px;
  padding: 8px;
  color: #1558d6;
  background: linear-gradient(150deg, #e8f0ff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 6px 14px rgba(21, 88, 214, 0.14);
}

.reference-landing .landing-dashboard-card .dashboard-grid-icon i {
  width: 8px;
  border-width: 2px;
  border-radius: 2px;
}

.reference-landing .landing-dashboard-card p {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: 100%;
  color: #111827;
  font-size: clamp(1.2rem, 5.3vw, 1.75rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.reference-landing .landing-dashboard-card p::before {
  content: none;
  position: absolute;
  left: 1.5%;
  color: #1558d6;
  font-size: clamp(1.3rem, 5.8vw, 1.9rem);
  line-height: 1;
}

.reference-landing .landing-dashboard-card p strong {
  color: inherit;
  font-size: inherit;
}

.reference-landing .landing-dashboard-card p strong + text,
.reference-landing .landing-dashboard-card p:not(strong) {
  color: inherit;
}

.reference-landing .landing-dashboard-card p {
  font-size: 0;
}

.reference-landing .landing-dashboard-card p strong {
  color: #0b3f99;
  font-size: clamp(1.42rem, 6vw, 2.08rem);
}

.reference-landing .landing-secondary-actions .landing-dashboard-card p {
  justify-content: center;
}

.reference-landing .landing-secondary-actions .landing-dashboard-card p.landing-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  color: #5b6470;
  font-size: 1rem;
  line-height: 1.05;
  text-align: left;
}

.reference-landing .landing-secondary-actions .landing-dashboard-card p.landing-card-copy strong {
  color: #0b3f99;
  font-size: 1.05rem;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(17, 24, 39, 0.1);
  white-space: nowrap;
}

.reference-landing .landing-secondary-actions .landing-dashboard-card p.landing-card-copy small {
  display: block;
  max-width: 100%;
  color: #667085;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-landing .landing-secondary-actions .landing-business-card .esp-lettermark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 7px 16px rgba(21, 88, 214, 0.12);
  font-size: 1.02rem;
}

.reference-landing .landing-secondary-actions .landing-business-card .esp-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #1f2937;
  font-size: 0.86rem;
  line-height: 0.95;
  text-shadow: none;
  white-space: normal;
}

.reference-landing .landing-secondary-actions .landing-business-card p.landing-card-copy small {
  color: #8a5b00;
  font-size: 0.58rem;
}

.reference-landing .landing-dashboard-card b {
  position: absolute;
  right: 8%;
  top: 50%;
  color: #111827;
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1;
  transform: translateY(-50%);
}

.reference-landing .landing-dashboard-card::before {
  content: none;
  position: absolute;
  inset: 0;
  border: 1px solid rgba(21, 88, 214, 0.2);
  border-radius: 18px;
  background: rgba(21, 88, 214, 0.14);
  pointer-events: none;
}

.reference-landing .landing-dashboard-card::after {
  content: none;
  position: absolute;
  left: 22%;
  right: 22%;
  top: 50%;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(21, 88, 214, 0.66);
  font-size: clamp(0.82rem, 3vw, 1rem);
  font-weight: 950;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(-12deg);
  box-shadow: 0 8px 18px rgba(21, 88, 214, 0.24);
  pointer-events: none;
}

.pro-dashboard-unlocked .reference-landing .landing-dashboard-card::before,
.pro-dashboard-unlocked .reference-landing .landing-dashboard-card::after {
  display: none;
}

.reference-landing .landing-utility-actions {
  display: none;
}

.reference-landing #landing-recent-link {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: transparent;
  background: transparent;
  box-shadow: none;
}

.reference-landing .landing-privacy-note {
  display: inline-flex;
  margin: 8px auto 0;
  padding: 0 12px;
  font-size: clamp(0.84rem, 3.35vw, 0.98rem);
  justify-content: center;
  text-align: center;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.tutorial-overlay.hidden {
  display: none;
}

.tutorial-prompt {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: rgba(15, 23, 42, 0.42);
}

.tutorial-prompt.hidden {
  display: none;
}

.tutorial-prompt-card {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
  border: 1px solid rgba(223, 227, 234, 0.95);
  border-radius: 16px;
  padding: 18px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
  -webkit-overflow-scrolling: touch;
}

.tutorial-prompt-card span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tutorial-prompt-card h2,
.tutorial-prompt-card p {
  margin: 0;
}

.tutorial-prompt-card p {
  color: var(--muted);
  line-height: 1.42;
}

.tutorial-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tutorial-prompt-actions button {
  flex: 1 1 140px;
}

.tutorial-highlight {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1201;
  border: 3px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), 0 0 26px rgba(251, 188, 4, 0.55);
  pointer-events: none;
}

.tutorial-highlight.hidden {
  display: none;
}

.tutorial-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1202;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  border: 4px solid var(--blue);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.32);
  transform: translate(-999px, -999px);
  pointer-events: none;
}

.tutorial-tooltip {
  position: fixed;
  z-index: 1203;
  display: grid;
  gap: 10px;
  max-width: calc(100vw - 28px);
  border: 1px solid rgba(223, 227, 234, 0.92);
  border-radius: 16px;
  padding: 16px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  box-shadow: 0 22px 52px rgba(17, 24, 39, 0.24);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.tutorial-tooltip span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tutorial-tooltip h2,
.tutorial-tooltip p {
  margin: 0;
}

.tutorial-tooltip p {
  color: var(--muted);
  line-height: 1.4;
}

.tutorial-actions,
.tutorial-launcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tutorial-launcher-button {
  flex: 1 1 130px;
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 10px;
  padding: 10px;
  color: var(--blue-dark);
  background: var(--sky);
  font-weight: 900;
  text-align: left;
}

.tutorial-launcher-button span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-stage::before {
  content: "";
  position: absolute;
  left: -14%;
  bottom: 33%;
  width: 64%;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(238, 28, 32, 0.86), rgba(21, 88, 214, 0.8), rgba(78, 167, 46, 0.85));
  opacity: 0.9;
  transform: rotate(-7deg);
}

.landing-stage::after {
  content: "";
  position: absolute;
  right: -24%;
  bottom: 32%;
  width: 68%;
  height: 104px;
  border-radius: 999px;
  background: rgba(78, 167, 46, 0.75);
  transform: rotate(-12deg);
}

.landing-stage-glow {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(21, 88, 214, 0.12) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(78, 167, 46, 0.1) 1px, transparent 1.5px);
  background-position: 10% 20%, 90% 74%;
  background-size: 14px 14px, 16px 16px;
  pointer-events: none;
}

.landing-stage-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2.2vw, 20px);
  text-align: center;
}

.brand-logo {
  width: clamp(118px, 30vw, 210px);
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
  filter: drop-shadow(0 10px 16px rgba(17, 24, 39, 0.12));
}

.simple-camera-sheet {
  min-height: 100vh;
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  align-content: start;
  padding: 12px 0 max(18px, env(safe-area-inset-bottom));
}

.simple-camera-sheet.options-mode {
  width: min(760px, calc(100% - 24px));
  padding-top: 16px;
}

.simple-camera-shell {
  display: grid;
  gap: 10px;
}

.simple-camera-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.simple-camera-head .eyebrow {
  margin: 0 0 2px;
}

.simple-camera-top-back {
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 88, 214, 0.12);
  font-size: 0.9rem;
  font-weight: 950;
  cursor: pointer;
}

.simple-camera-sheet.options-mode .simple-camera-shell {
  gap: 14px;
}

.simple-camera-shell .eyebrow {
  margin-bottom: -4px;
}

.simple-camera-sheet.options-mode .simple-camera-shell .eyebrow {
  margin: 0;
  color: var(--red);
  font-size: clamp(1rem, 4.5vw, 1.32rem);
  font-weight: 950;
  letter-spacing: 0.02em;
}

.simple-camera-shell h2 {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 2.2rem);
}

.simple-camera-sheet.options-mode .simple-camera-shell h2 {
  font-size: clamp(2.35rem, 11vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.simple-camera-shell .lede {
  margin: 0;
  font-size: 0.94rem;
}

.simple-camera-sheet.options-mode .simple-camera-shell .lede {
  max-width: 15ch;
  color: #374151;
  font-size: clamp(1.22rem, 6.1vw, 2rem);
  line-height: 1.3;
}

.construction-update-card {
  display: none;
}

.simple-camera-sheet.options-mode .construction-update-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(238, 28, 32, 0.38), rgba(21, 88, 214, 0.42), rgba(78, 167, 46, 0.34)) border-box;
  box-shadow:
    0 18px 36px rgba(17, 24, 39, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.construction-photo-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #eef4ff;
  overflow: hidden;
}

.construction-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0) 42%, rgba(17, 24, 39, 0.48) 100%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0) 44%);
  pointer-events: none;
}

.construction-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.construction-photo-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.2);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.construction-update-copy {
  display: grid;
  gap: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(21, 88, 214, 0.07), rgba(78, 167, 46, 0.05)),
    #fff;
}

.construction-kicker {
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--blue-dark);
  background: rgba(21, 88, 214, 0.1);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.construction-update-copy h3 {
  margin: 0;
  color: #111827;
  font-size: 1.22rem;
  line-height: 1.1;
}

.construction-update-copy p:not(.construction-kicker) {
  margin: 0;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.4;
}

.construction-update-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.construction-update-tags span {
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 999px;
  padding: 6px 9px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.construction-update-tags span:nth-child(1) {
  border-color: rgba(238, 28, 32, 0.2);
}

.construction-update-tags span:nth-child(2) {
  border-color: rgba(21, 88, 214, 0.22);
}

.construction-update-tags span:nth-child(3) {
  border-color: rgba(78, 167, 46, 0.24);
}

@media (min-width: 720px) {
  .simple-camera-sheet.options-mode .construction-update-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(244px, 0.9fr);
  }

  .construction-photo-wrap {
    height: 100%;
    min-height: 256px;
    aspect-ratio: auto;
  }

  .construction-update-copy {
    align-content: center;
    padding: 18px;
  }
}

@media (max-width: 719px) {
  .construction-update-copy {
    padding: 14px;
  }

  .construction-update-copy h3 {
    font-size: 1.08rem;
  }

  .construction-update-copy p:not(.construction-kicker) {
    font-size: 0.88rem;
  }

  .construction-update-tags span {
    font-size: 0.72rem;
  }
}

.simple-camera-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: #f5f8ff;
}

.simple-camera-mode-toggle button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.simple-camera-mode-toggle button.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(21, 88, 214, 0.2);
}

.simple-camera-mode-toggle button.scan-requested,
.secondary-action.scan-requested {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(21, 88, 214, 0.28);
}

.simple-camera-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101010;
  box-shadow: var(--shadow);
}

.simple-camera-frame.options-mode {
  display: none;
}

.simple-camera-sheet.options-mode .simple-camera-status {
  display: none;
}

.simple-camera-frame.barcode-mode::before {
  content: "";
  position: absolute;
  inset: 34% 5%;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.simple-camera-frame.barcode-mode::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 34%;
  z-index: 4;
  height: 32%;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    transparent 0,
    rgba(78, 167, 46, 0.08) 18%,
    rgba(78, 167, 46, 0.3) 50%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(78, 167, 46, 0.28) 56%,
    transparent 100%
  );
  box-shadow: 0 0 30px rgba(78, 167, 46, 0.55);
  animation: camera-barcode-sweep 1.05s ease-in-out infinite alternate;
  pointer-events: none;
}

.simple-camera-frame.barcode-mode video {
  aspect-ratio: 16 / 9;
}

.simple-camera-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #101010;
}

.simple-camera-scan-line {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 22%;
  z-index: 3;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(78, 167, 46, 0.85);
  animation: camera-scan-line 1.1s ease-in-out infinite alternate;
  pointer-events: none;
}

.simple-camera-frame.barcode-mode .simple-camera-scan-line {
  left: 6%;
  right: 6%;
  top: 34%;
  z-index: 5;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--green), #fff, var(--green), transparent);
  box-shadow: 0 0 26px rgba(78, 167, 46, 1);
  animation-name: camera-barcode-scan-line;
}

.simple-camera-scan-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(78, 167, 46, 0.34);
  border-radius: 8px;
  padding: 9px 10px;
  color: #fff;
  background: rgba(6, 24, 14, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
}

.simple-camera-frame.barcode-mode .simple-camera-scan-hud {
  display: flex;
}

.simple-camera-scan-hud strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.simple-camera-scan-hud strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(78, 167, 46, 0.95);
  animation: scanner-dot-pulse 0.85s ease-in-out infinite alternate;
}

.simple-camera-scan-hud span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: right;
}

.simple-camera-status {
  margin: -4px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.simple-camera-status[data-state="scanning"] {
  color: var(--blue-dark);
  background: #eef5ff;
}

.simple-camera-status[data-state="success"] {
  color: var(--green-dark);
  background: var(--mint);
}

.simple-camera-status[data-state="error"] {
  color: var(--red-dark);
  background: #fff0f0;
}

.simple-camera-manual-code {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: #f7faff;
  text-align: left;
}

.simple-camera-manual-code label {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.simple-camera-manual-code div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.simple-camera-manual-code input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

.simple-camera-manual-code .secondary-action {
  white-space: nowrap;
}

.simple-camera-actions {
  position: static;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(223, 227, 234, 0.92);
  border-radius: 10px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.1);
}

.simple-camera-sheet.options-mode .simple-camera-actions {
  grid-template-columns: 1fr;
  gap: 14px;
  border: 0;
  border-radius: 0;
  padding: 12px 4px 0;
  background: transparent;
  box-shadow: none;
}

.simple-camera-actions .primary-action {
  grid-column: 1 / -1;
}

.simple-camera-actions .secondary-action {
  width: 100%;
}

.simple-camera-sheet.options-mode .simple-camera-actions .primary-action,
.simple-camera-sheet.options-mode .simple-camera-actions .secondary-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(112px, 25vw, 172px);
  border: 0;
  border-radius: 20px;
  padding: 22px 24px 22px clamp(90px, 22vw, 150px);
  color: #fff;
  font-size: clamp(2rem, 9vw, 4rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.26), 0 1px 0 rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.44),
    inset 0 -6px 0 rgba(2, 6, 23, 0.14),
    0 16px 26px rgba(17, 24, 39, 0.18);
}

.simple-camera-sheet.options-mode .simple-camera-actions .primary-action::before,
.simple-camera-sheet.options-mode .simple-camera-actions .secondary-action::before {
  position: absolute;
  left: clamp(28px, 8vw, 58px);
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: clamp(2.45rem, 10vw, 4.2rem);
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

.simple-camera-sheet.options-mode #simple-camera-capture {
  background:
    linear-gradient(135deg, #fbbc04 0%, #ff7a1a 40%, #ee1c20 100%);
}

.simple-camera-sheet.options-mode #simple-camera-capture::before {
  content: "📷";
}

.simple-camera-sheet.options-mode #simple-camera-barcode-mode {
  background:
    linear-gradient(135deg, #93e828 0%, #22c55e 34%, #06b6d4 68%, #1558d6 100%);
}

.simple-camera-sheet.options-mode #simple-camera-barcode-mode::before {
  content: "▦";
  border: 5px solid rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: clamp(2.05rem, 8vw, 3.5rem);
}

.simple-camera-sheet.options-mode #simple-camera-choose-phone {
  background:
    linear-gradient(135deg, #ff7a1a 0%, #ee1c20 34%, #ce3ddc 68%, #8b5cf6 100%);
}

.simple-camera-sheet.options-mode #simple-camera-choose-phone::before {
  content: "▯";
  border: 5px solid rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: clamp(2.05rem, 8vw, 3.5rem);
}

.simple-camera-actions #simple-camera-cancel {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  min-height: 30px;
  border-color: transparent;
  padding: 5px 2px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.simple-camera-sheet.options-mode .simple-camera-actions #simple-camera-cancel {
  min-height: 40px;
  padding: 8px 4px;
  color: #374151;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 950;
  text-shadow: none;
}

.intro-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-self: stretch;
  text-align: left;
  position: relative;
  z-index: 1;
}

.intro-logo {
  width: min(100%, 430px);
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.09);
}

.intro-mode-logo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.intro-mode-logo img {
  width: clamp(56px, 17vw, 84px);
  aspect-ratio: 1004 / 783;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 8px 12px rgba(17, 24, 39, 0.1));
}

.intro-mode-logo strong {
  color: var(--blue);
  font-size: clamp(1.05rem, 4.6vw, 1.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro-mode-logo.simple-lockup strong {
  color: var(--red);
}

.intro-mode-logo.deep-lockup strong {
  color: var(--blue);
}

.intro-copy {
  display: grid;
  gap: 1px;
  justify-items: start;
  min-width: 0;
  margin-top: 0;
}

.intro-tagline {
  margin: 0;
  font-size: clamp(1rem, 5.2vw, 1.45rem);
  font-weight: 900;
  line-height: 1;
}

.intro-tagline span:nth-child(1) {
  color: var(--red);
}

.intro-tagline span:nth-child(2) {
  color: var(--blue);
}

.intro-tagline span:nth-child(3) {
  color: var(--green);
}

.intro-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.25;
}

.mode-pill {
  position: relative;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  border: 1px solid rgba(21, 88, 214, 0.15);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue-dark);
  background: var(--sky);
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-status {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, max-content) auto;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  gap: 7px;
}

.premium-mini-button {
  display: none;
  min-height: 26px;
  border: 1px solid rgba(251, 188, 4, 0.45);
  border-radius: 999px;
  padding: 4px 9px;
  color: #7a4b00;
  background: #fff7d9;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.settings-button {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(21, 88, 214, 0.18);
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.settings-button:hover {
  border-color: rgba(21, 88, 214, 0.34);
  background: #fff;
  transform: translateY(-1px);
}

.landing-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mode-landing h1 {
  max-width: 640px;
  margin-bottom: 0;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 0.98;
  color: #111827;
}

.mode-landing h1 span {
  display: inline-block;
}

.mode-landing h1 span:nth-child(1) {
  color: var(--red);
}

.mode-landing h1 span:nth-child(2) {
  color: var(--blue);
}

.mode-landing h1 span:nth-child(3) {
  color: var(--green);
}

.landing-subtitle {
  margin: 0;
  color: #5b6470;
  font-size: clamp(1.1rem, 3.5vw, 1.8rem);
  line-height: 1.35;
}

.landing-utility-actions {
  display: grid;
  justify-content: center;
  gap: 12px;
  width: min(100%, 520px);
}

.landing-utility-actions .secondary-action {
  min-height: 48px;
  border-color: #d8e1f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  font-size: 1rem;
  font-weight: 900;
}

.pricing-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.54);
}

.retail-panel {
  position: fixed;
  inset: 0;
  z-index: 1215;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.52);
}

.retail-panel-card {
  width: min(100%, 760px);
  max-height: min(90dvh, 860px);
  overflow: auto;
  display: grid;
  gap: 16px;
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(251, 188, 4, 0.14), transparent 34%),
    radial-gradient(circle at 100% 0, rgba(21, 88, 214, 0.12), transparent 30%),
    #fff;
  box-shadow: 0 28px 74px rgba(17, 24, 39, 0.32);
}

.retail-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.retail-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.96;
}

.retail-panel-head p:not(.eyebrow),
.retail-panel-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 3.8vw, 1.18rem);
  line-height: 1.35;
}

.retail-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.retail-mode-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 16px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
}

.retail-mode-card > span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #7a4b00;
  background: #fff3bd;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.retail-mode-card h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.35rem, 4.2vw, 1.9rem);
  line-height: 1;
}

.retail-mode-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.3;
}

.retail-slider {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  padding: 12px;
  background: #f5f8ff;
}

.retail-slider span,
.retail-slider strong {
  color: var(--blue-dark);
  font-weight: 950;
}

.retail-slider input {
  width: 100%;
  accent-color: var(--blue);
}

.retail-mode-card .primary-action {
  min-height: 52px;
}

.retail-pricing-result {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(251, 188, 4, 0.42);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7d6, #ffffff 56%, #eff5ff);
  box-shadow: 0 12px 30px rgba(251, 188, 4, 0.14);
}

.retail-pricing-result span {
  color: #8a5b00;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.retail-pricing-result strong {
  color: var(--blue-dark);
  font-size: clamp(2.1rem, 10vw, 3.3rem);
  line-height: 1;
}

.retail-pricing-result p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.retail-info-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(21, 88, 214, 0.2);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, #f6f9ff 0%, #ffffff 62%, #fff8df 100%);
  box-shadow: 0 14px 28px rgba(21, 88, 214, 0.1);
}

.retail-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.retail-info-head span {
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.retail-info-head .secondary-action {
  min-height: 38px;
  padding: 8px 14px;
}

.retail-info-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.05;
}

.retail-info-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.retail-info-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.retail-info-actions button,
.retail-info-new {
  min-height: 52px;
}

.retail-info-panel label {
  color: var(--ink);
  font-weight: 950;
}

.retail-info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.retail-info-row input {
  width: 100%;
  min-width: 0;
  border: 2px solid #d7e3fb;
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.retail-info-row .primary-action {
  min-width: 108px;
  padding-inline: 14px;
}

@media (max-width: 720px) {
  .retail-mode-grid {
    grid-template-columns: 1fr;
  }

  .retail-info-row {
    grid-template-columns: 1fr;
  }
}

.sync-status-panel {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.5);
}

.settings-panel,
.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 1230;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.5);
}

.sync-status-card {
  width: min(100%, 520px);
  display: grid;
  gap: 16px;
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
}

.settings-card,
.admin-card {
  width: min(100%, 760px);
  max-height: min(88vh, 860px);
  overflow: auto;
  display: grid;
  gap: 16px;
  border-radius: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(78, 167, 46, 0.12), transparent 34%),
    radial-gradient(circle at 100% 0, rgba(21, 88, 214, 0.1), transparent 30%),
    #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-section {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid rgba(223, 227, 234, 0.95);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}

.settings-section span {
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-section strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.settings-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.settings-data-section {
  grid-column: 1 / -1;
}

.settings-flip-rules-section {
  grid-column: 1 / -1;
}

.settings-flip-rules-section .flip-rules-grid {
  margin-top: 2px;
}

.settings-section .flip-rules-summary {
  margin-top: 0;
}

.sync-status-steps {
  display: grid;
  gap: 10px;
}

.sync-status-steps span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 0.9rem;
}

.sync-status-steps span.ready {
  border-color: rgba(78, 167, 46, 0.34);
  background: var(--mint);
}

.sync-status-steps span.blocked {
  border-color: rgba(238, 28, 32, 0.24);
  background: #fff0f0;
}

.sync-status-steps strong {
  display: inline-block;
  min-width: 62px;
  color: var(--blue-dark);
}

.pricing-panel {
  width: min(100%, 820px);
  max-height: min(92vh, 760px);
  overflow: auto;
  display: grid;
  gap: 18px;
  border-radius: 10px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(251, 188, 4, 0.16), rgba(255, 255, 255, 0) 36%),
    #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
}

.pricing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.pricing-head h2 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.pricing-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.beta-pause-banner {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(78, 167, 46, 0.42);
  border-radius: 10px;
  padding: 13px 14px;
  color: #11351d;
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.16), rgba(251, 188, 4, 0.18)),
    #f7fff6;
  box-shadow: 0 12px 24px rgba(78, 167, 46, 0.12);
}

.beta-pause-banner span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.beta-pause-banner strong {
  font-size: 1.18rem;
}

.beta-pause-banner p {
  margin: 0;
  color: #486150;
  line-height: 1.4;
}

.pricing-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.featured-plan {
  border-color: rgba(78, 167, 46, 0.42);
  box-shadow: 0 14px 30px rgba(78, 167, 46, 0.12);
}

.plan-label {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-dark);
  background: var(--sky);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.featured-plan .plan-label {
  color: var(--green-dark);
  background: var(--mint);
}

.choose-plan.active-plan {
  border-color: rgba(78, 167, 46, 0.45);
  color: var(--green-dark);
  background: var(--mint);
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.choose-plan.beta-paused-plan,
.choose-plan.beta-paused-plan:disabled {
  color: #6f4e00;
  background: #fff3be;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.plan-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.plan-card strong {
  font-size: 2rem;
}

.plan-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.pricing-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pricing-benefits span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: #303846;
  background: #fbfcff;
  font-size: 0.9rem;
  font-weight: 700;
}

.billing-status-strip {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(251, 188, 4, 0.48);
  border-radius: 8px;
  padding: 10px 12px;
  color: #6f4e00;
  background: #fff9df;
}

.billing-status-strip strong {
  font-size: 0.88rem;
}

.billing-status-strip span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.billing-status-strip.ready {
  border-color: rgba(78, 167, 46, 0.42);
  color: var(--green-dark);
  background: var(--mint);
}

.billing-status-strip.warning {
  border-color: rgba(245, 158, 11, 0.5);
  color: #805800;
  background: #fff7d9;
}

.landing-hero-art {
  display: block;
  width: min(100%, 680px);
  margin: -2px 0 -4px;
  filter: drop-shadow(0 18px 26px rgba(17, 24, 39, 0.08));
}

.mode-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 640px);
  align-items: center;
}

.mode-actions.single-action {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 620px);
}

.mode-card {
  position: relative;
  width: 100%;
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.09);
  cursor: pointer;
}

.mode-card-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  padding: 2px 7px;
  color: #7a4b00;
  background: var(--sun);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-logo {
  display: grid;
  justify-items: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  line-height: 1;
}

.mode-logo b {
  font-size: 0.78rem;
}

.mode-logo em {
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 950;
}

.input-launch-card {
  position: relative;
  overflow: hidden;
}

.input-launch-control {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.mode-card:hover {
  transform: translateY(-1px);
}

.mode-card.is-launching {
  transform: translateY(1px) scale(0.99);
  filter: brightness(1.08);
}

.mode-card strong {
  font-size: 1.08rem;
}

.mode-card-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.primary-scan-card {
  min-height: 112px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
  gap: 20px;
  border: 0;
  border-radius: 14px;
  padding: 20px clamp(18px, 5vw, 34px);
  text-align: left;
  box-shadow: 0 24px 34px rgba(78, 167, 46, 0.26);
}

.primary-scan-card .mode-card-icon {
  width: clamp(44px, 10vw, 62px);
  height: clamp(44px, 10vw, 62px);
  border-radius: 999px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.94);
  fill: var(--green);
}

.mode-card span {
  color: var(--muted);
  line-height: 1.35;
  max-width: 220px;
}

.mode-card .mode-logo {
  color: #fff;
  max-width: none;
}

.simple-card {
  color: #fff;
  background: linear-gradient(135deg, #31b63c, #24a735);
}

.simple-card span {
  color: rgba(255, 255, 255, 0.9);
}

.primary-scan-card strong {
  color: #fff;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1;
}

.primary-scan-card > b {
  color: #fff;
  font-size: clamp(2.5rem, 9vw, 4.2rem);
  line-height: 1;
}

.landing-scan-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: min(100%, 500px);
  text-align: left;
}

.landing-scan-note span {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 999px;
  color: var(--green);
  background: rgba(78, 167, 46, 0.12);
}

.landing-scan-note svg {
  width: 28px;
  fill: currentColor;
}

.landing-scan-note p {
  margin: 0;
  color: #5b6470;
  font-size: clamp(0.98rem, 2.4vw, 1.2rem);
  line-height: 1.35;
}

.landing-scan-note strong {
  display: block;
  color: #303846;
}

.landing-dashboard-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(100%, 620px);
  border: 2px solid #d7e3fb;
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  cursor: pointer;
}

.landing-dashboard-card span {
  color: var(--blue-dark);
}

.dashboard-grid-icon {
  display: grid;
  grid-template-columns: repeat(2, 15px);
  gap: 5px;
}

.dashboard-grid-icon i {
  display: block;
  width: 15px;
  aspect-ratio: 1;
  border: 3px solid currentColor;
  border-radius: 3px;
}

.landing-dashboard-card p {
  margin: 0;
  color: #5b6470;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  line-height: 1.35;
}

.landing-card-copy small {
  display: block;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
}

.esp-lettermark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  line-height: 1;
}

.esp-lettermark i {
  font-style: normal;
}

.esp-lettermark .esp-e {
  color: #ee1c20;
}

.esp-lettermark .esp-s {
  color: #1558d6;
}

.esp-lettermark .esp-p {
  color: #4ea72e;
}

.landing-dashboard-card strong {
  display: block;
  color: #1f2937;
  font-size: clamp(1.25rem, 3.4vw, 1.9rem);
}

.landing-dashboard-card b {
  color: #303846;
  font-size: 2.7rem;
  line-height: 1;
}

.landing-privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #5b6470;
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
}

.landing-privacy-note span,
.landing-privacy-note strong {
  color: var(--green);
  font-weight: 950;
}

.landing-privacy-note span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.landing-privacy-note span::after {
  content: "";
  width: 7px;
  height: 11px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(42deg) translateY(-1px);
}

.advanced-card {
  color: #fff;
  border-color: rgba(21, 88, 214, 0.34);
  background: var(--blue);
}

.advanced-card strong {
  color: #fff;
}

.advanced-card span {
  color: rgba(255, 255, 255, 0.9);
}

.mode-card .mode-card-badge {
  color: #7a4b00;
  line-height: 1;
  max-width: none;
}

.intro {
  padding: 0 0 6px;
}

.intro-bar {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 2px solid rgba(223, 227, 234, 0.95);
  border-radius: 14px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 5% 0, rgba(78, 167, 46, 0.15), transparent 34%),
    radial-gradient(circle at 105% 5%, rgba(21, 88, 214, 0.11), transparent 32%),
    linear-gradient(150deg, rgba(238, 28, 32, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}

.intro-bar::before,
.intro-bar::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.intro-bar::before {
  right: -58px;
  bottom: -28px;
  width: 170px;
  height: 54px;
  border-radius: 999px;
  background: rgba(78, 167, 46, 0.28);
  transform: rotate(-12deg);
}

.intro-bar::after {
  left: -44px;
  bottom: -24px;
  width: 160px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(238, 28, 32, 0.22), rgba(21, 88, 214, 0.2));
  transform: rotate(-9deg);
}

.toast {
  position: sticky;
  top: 10px;
  z-index: 10;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  border: 1px solid rgba(78, 167, 46, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--green-dark);
  background: linear-gradient(180deg, #f5fff1, #edf7e7);
  box-shadow: var(--shadow);
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
}

.toast button {
  border: 1px solid rgba(78, 167, 46, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--green-dark);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.mode-strip-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 8vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

h3 {
  margin-bottom: 10px;
}

.lede {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.flip-rules-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid rgba(21, 88, 214, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0, #f7fbff 100%);
  box-shadow: var(--shadow);
}

.flip-rules-card h2,
.flip-rules-card p {
  margin: 0;
}

.flip-rules-card h2 {
  font-size: 1rem;
}

.flip-rules-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.flip-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
  gap: 8px;
  align-items: stretch;
}

.flip-rules-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.flip-rule-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
}

.flip-rule-presets legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.flip-rule-presets label {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d9e3f5;
  border-radius: 7px;
  padding: 6px 4px;
  color: var(--blue-dark);
  background: #f8fbff;
  text-align: center;
  cursor: pointer;
}

.flip-rule-presets label.active {
  border-color: rgba(78, 167, 46, 0.72);
  color: var(--green-dark);
  background: #ecfdf5;
  box-shadow: 0 8px 20px rgba(78, 167, 46, 0.14);
}

.flip-rule-presets input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.flip-rule-presets span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.66rem, 1.45vw, 0.78rem);
  font-weight: 950;
  line-height: 1.05;
}

.flip-slider {
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.flip-slider span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flip-slider strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
}

.flip-slider input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.flip-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 var(--range-fill, 50%), #d9e3f5 var(--range-fill, 50%) 100%);
}

.flip-slider input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(21, 88, 214, 0.32);
  -webkit-appearance: none;
}

.flip-slider input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d9e3f5;
}

.flip-slider input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.flip-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(21, 88, 214, 0.32);
}

.flip-rules-summary {
  grid-column: 1 / -1;
}

.analysis-form,
.decision-panel,
.tracker,
.comps-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.analysis-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

body.has-scan-bottom-action {
  padding-bottom: 132px;
}

.scan-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(251, 188, 4, 0.14) 0, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #ffffff, #fbfcff);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.simple-mode .condition-grid {
  grid-template-columns: 1fr;
}

.form-row {
  display: grid;
  gap: 7px;
}

.checkbox-row {
  min-height: 44px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

label {
  font-weight: 700;
}

.field-label {
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(21, 88, 214, 0.2);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.add-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.add-info summary {
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.add-info .form-row {
  margin-top: 12px;
}

.compact-notes textarea {
  min-height: 84px;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scan-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(238, 28, 32, 0.94), rgba(251, 188, 4, 0.88) 48%, rgba(21, 88, 214, 0.94)),
    #111827;
}

.scan-splash.deep {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(21, 88, 214, 0.92) 46%, rgba(78, 167, 46, 0.9)),
    #111827;
}

.scan-splash-panel {
  width: min(100%, 430px);
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.scan-splash-mode {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
}

.scan-splash-orbit {
  position: relative;
  width: 148px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.16) 0 30%, transparent 31%),
    conic-gradient(from 0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.72), rgba(251, 188, 4, 0.72), rgba(78, 167, 46, 0.7), rgba(21, 88, 214, 0.55), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 0 16px rgba(255, 255, 255, 0.06),
    0 0 34px rgba(255, 255, 255, 0.24);
  animation: scan-orbit-spin 2.3s linear infinite;
}

.scan-splash-orbit::before {
  content: "";
  width: 76px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 0 15px rgba(255, 255, 255, 0.12),
    0 0 28px rgba(255, 255, 255, 0.28);
  animation: scan-core-pulse 1.45s ease-in-out infinite alternate;
}

.scan-splash-orbit::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 25%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff, var(--gold), transparent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.84);
  animation: scan-orbit-beam 1.05s ease-in-out infinite alternate;
}

.scan-splash-orbit span {
  position: absolute;
  width: 14px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.72);
  animation: scan-dot-pop 0.92s ease-in-out infinite alternate;
}

.scan-splash-orbit span:nth-child(1) {
  top: 10px;
}

.scan-splash-orbit span:nth-child(2) {
  right: 15px;
  bottom: 28px;
  animation-delay: 0.18s;
}

.scan-splash-orbit span:nth-child(3) {
  left: 16px;
  bottom: 26px;
  animation-delay: 0.36s;
}

.scan-splash-timer {
  font-size: clamp(4.4rem, 22vw, 7.4rem);
  line-height: 0.95;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.scan-splash h2 {
  margin: 0;
  font-size: clamp(1.45rem, 7vw, 2.35rem);
}

.scan-splash p {
  max-width: 31rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.4;
}

.scan-splash-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.scan-splash-steps span {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.14);
}

.scan-splash-ticker {
  position: relative;
  width: min(100%, 390px);
  height: 92px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.scan-splash-ticker span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  animation: scan-ticker-roll 9s linear infinite;
}

.scan-splash-ticker b {
  color: #fff;
  font-weight: 950;
}

body.scan-splash-open {
  overflow: hidden;
}

.live-scan-strip {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(238, 28, 32, 0.06), rgba(251, 188, 4, 0.08), rgba(78, 167, 46, 0.07), rgba(21, 88, 214, 0.06));
  min-height: 74px;
}

.scan-timer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  padding: 8px 10px 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.scan-timer span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scan-timer strong {
  color: var(--ink);
  font-size: 1.18rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.live-scan-track {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 7px 10px;
  animation: scan-ticker 8.5s linear infinite;
}

.live-scan-track span {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(90deg, #fffef8, #ffffff, #eef4ff, #ffffff);
  background-size: 220% 100%;
  animation: shimmer 0.9s linear infinite;
}

.photo-preview figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.photo-preview figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.09);
}

.simple-photo-overlay {
  position: absolute;
  inset: 8px auto auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}

.photo-top-overlay {
  z-index: 2;
}

.photo-top-overlay .photo-overlay-actions {
  display: flex;
  width: auto;
  gap: 8px;
}

.photo-top-overlay .simple-photo-action {
  width: auto;
  min-height: 36px;
  padding: 8px 11px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.scan-bottom-action {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 950;
  width: min(520px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  font-size: 1rem;
  box-shadow: 0 16px 34px rgba(21, 88, 214, 0.26);
}

body:not(.camera-active) .scan-bottom-action {
  position: static;
  width: 100%;
  margin: 12px 0 0;
}

body:not(.camera-active).has-scan-bottom-action {
  padding-bottom: 0;
}

.scan-bottom-action.hidden {
  display: none;
}

.photo-overlay-actions {
  display: grid;
  width: 100%;
  gap: 8px;
}

.photo-decision-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.simple-photo-action {
  position: relative;
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red) 0, #ff521d 54%, var(--gold) 100%);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.24);
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.secondary-photo-action {
  border: 1px solid var(--line);
  color: var(--blue-dark);
  background: #fff;
  box-shadow: none;
}

.simple-photo-action:disabled {
  opacity: 0.72;
  cursor: wait;
}

.simple-photo-overlay.scanning .simple-photo-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111827 0, var(--blue) 58%, var(--green) 100%);
}

.simple-photo-overlay.scanning .simple-photo-action::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.photo-actions .secondary-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.scan-utility-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.photo-actions .primary-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.photo-actions svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.primary-action,
.actions button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(21, 88, 214, 0.18);
}

.primary-action.disabled,
.secondary-action.disabled,
.primary-action:disabled,
.secondary-action:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.primary-action:hover,
.actions button:hover {
  background: var(--blue-dark);
}

.secondary-action {
  min-height: 40px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--blue-dark);
  background: linear-gradient(180deg, #ffffff 0, #f6f9ff 100%);
  font-weight: 700;
  cursor: pointer;
}

.secondary-action:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.secondary-action.scan-requested:hover {
  color: #fff;
  background: var(--blue-dark);
}

.decision-refresh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
}

.decision-refresh-actions span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.listing-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.listing-shortcuts.hidden {
  display: none;
}

.listing-shortcuts .primary-action,
.listing-shortcuts .secondary-action {
  width: 100%;
}

.listing-route-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 950;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.listing-route-button:focus-visible {
  outline: 3px solid rgba(21, 88, 214, 0.25);
  outline-offset: 2px;
}

.ebay-list-button {
  border-color: rgba(21, 88, 214, 0.22);
  color: #1f2937;
  background:
    linear-gradient(90deg, rgba(229, 50, 56, 0.12), rgba(0, 100, 210, 0.1), rgba(245, 175, 2, 0.12), rgba(134, 184, 23, 0.12)),
    #ffffff;
}

.marketplace-list-button {
  border-color: rgba(24, 119, 242, 0.24);
  color: #0f3f8f;
  background: linear-gradient(180deg, #f8fbff 0, #edf5ff 100%);
}

.estatesales-list-button {
  grid-column: 1 / -1;
  border-color: rgba(14, 116, 144, 0.28);
  color: #0f4f5f;
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 48%, #eef2ff 100%);
}

.save-listing-kit-button {
  grid-column: 1 / -1;
  border-color: rgba(22, 163, 74, 0.28);
  color: #0f3f2a;
  background: linear-gradient(135deg, #effdf4 0%, #ffffff 52%, #eef6ff 100%);
}

.save-kit-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #1558d6);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
}

.ebay-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.ebay-wordmark i {
  font-style: normal;
}

.ebay-wordmark i:nth-child(1) {
  color: #e53238;
}

.ebay-wordmark i:nth-child(2) {
  color: #0064d2;
}

.ebay-wordmark i:nth-child(3) {
  color: #f5af02;
}

.ebay-wordmark i:nth-child(4) {
  color: #86b817;
}

.marketplace-mark {
  display: inline-grid;
  width: 24px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1877f2;
  font-weight: 1000;
  line-height: 1;
}

.estatesales-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  font-size: 0.76rem;
  font-weight: 950;
}

.decision-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

#decision {
  display: grid;
  min-height: 92px;
  place-items: center;
  margin: 0 0 10px;
  border-radius: 8px;
  text-align: center;
  font-size: clamp(3rem, 12vw, 5.6rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.95;
}

#decision.buy {
  color: var(--green);
  background: rgba(78, 167, 46, 0.12);
  box-shadow: 0 0 0 1px rgba(78, 167, 46, 0.18), 0 18px 38px rgba(78, 167, 46, 0.24);
  animation: decision-flip-pop 1.2s ease-in-out infinite alternate;
}

#decision.skip {
  color: var(--red);
  background: rgba(238, 28, 32, 0.1);
  box-shadow: 0 0 0 1px rgba(238, 28, 32, 0.16);
}

#decision.sleeper {
  color: #b77900;
  font-size: clamp(2.8rem, 10vw, 4.4rem);
  font-weight: 900;
  background: #fff7d9;
  box-shadow: 0 0 0 1px rgba(251, 188, 4, 0.28);
}

#decision-copy {
  color: var(--muted);
  line-height: 1.45;
}

.identified-item {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  border: 1px solid rgba(21, 88, 214, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: #f6f9ff;
}

.identified-item.hidden {
  display: none;
}

.identified-item span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--blue-dark);
  background: var(--sky);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.identified-item strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.18;
}

.identified-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.identified-item.strong,
.identified-item.exact {
  border-color: rgba(78, 167, 46, 0.36);
  background: #f8fff5;
}

.identified-item.strong span,
.identified-item.exact span {
  color: var(--green-dark);
  background: var(--mint);
}

.identified-item.weak {
  border-color: rgba(238, 28, 32, 0.22);
  background: #fff7f4;
}

.identified-item.weak span {
  color: var(--red-dark);
  background: var(--rose);
}

.flip-calculator {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  border: 1px solid rgba(78, 167, 46, 0.2);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #f7fff4 0, #ffffff 100%);
}

.flip-calculator.hidden {
  display: none;
}

.flip-calculator label {
  color: var(--ink);
  font-weight: 900;
}

.flip-calculator-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(150px, 1.2fr);
  gap: 8px;
}

.flip-calculator-row input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 850;
}

.flip-calculator-row .primary-action {
  width: 100%;
}

#flip-calculator-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.simple-fix-item {
  border-top: 1px solid rgba(78, 167, 46, 0.18);
  padding-top: 8px;
}

.simple-fix-item.hidden {
  display: none;
}

.simple-fix-item summary {
  width: fit-content;
  color: var(--blue-dark);
  font-weight: 950;
  cursor: pointer;
}

.simple-fix-item label {
  display: block;
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.simple-fix-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.simple-fix-item-row input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.simple-fix-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .simple-fix-item-row {
    grid-template-columns: 1fr;
  }
}

.proof-meter {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.proof-meter-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #edf1f6;
  overflow: hidden;
}

.proof-meter-bar span {
  display: block;
  height: 100%;
  width: 28%;
  border-radius: 999px;
  transition: width 180ms ease;
}

.proof-meter strong {
  color: var(--muted);
  font-size: 0.88rem;
}

.proof-meter.weak .proof-meter-bar span {
  background: #7d8da1;
}

.proof-meter.weak strong {
  color: #526172;
}

.proof-meter.mixed .proof-meter-bar span {
  background: var(--blue);
}

.proof-meter.mixed strong {
  color: var(--blue-dark);
}

.proof-meter.strong .proof-meter-bar span {
  background: var(--green);
}

.proof-meter.strong strong {
  color: var(--green-dark);
}

.proof-meter.exact .proof-meter-bar {
  background: rgba(78, 167, 46, 0.16);
  box-shadow: inset 0 0 0 1px rgba(78, 167, 46, 0.14);
}

.proof-meter.exact .proof-meter-bar span {
  background: linear-gradient(90deg, var(--green), var(--gold), var(--green));
  background-size: 180% 100%;
  animation: shimmer 1.1s linear infinite;
}

.proof-meter.exact strong {
  color: var(--green-dark);
  font-weight: 950;
}

.counterfeit-warning {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  border: 1px solid #f2b14f;
  border-left: 5px solid #c47a00;
  border-radius: 8px;
  padding: 11px 12px;
  color: #4d3100;
  background: #fff7e6;
}

.counterfeit-warning strong {
  font-size: 0.94rem;
  color: #6d4200;
}

.counterfeit-warning p {
  margin: 0;
  line-height: 1.35;
}

.counterfeit-warning ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.38;
}

.counterfeit-warning span {
  color: #70502b;
  font-size: 0.78rem;
  font-weight: 700;
}

.source-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.source-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--sky);
  cursor: pointer;
}

.source-chip:hover {
  border-color: var(--blue);
}

.search-used {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  background: #fff;
  cursor: pointer;
}

.search-used:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.comp-card-focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 88, 214, 0.14);
}

.checked-at {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.checked-at .scan-timer {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.qf-fold {
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  background: #fff;
}

.qf-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--blue-dark);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.qf-fold summary::-webkit-details-marker {
  display: none;
}

.qf-fold summary::after {
  content: "v";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-blue);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.qf-fold[open] summary::after {
  transform: rotate(180deg);
}

.qf-fold summary span,
.qf-fold summary strong {
  min-width: 0;
}

.qf-fold summary span {
  color: var(--ink);
}

.qf-fold summary strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.result-detail-fold,
.reason-fold {
  margin-top: 10px;
}

.metric-detail-grid {
  padding: 0 12px 12px;
}

.reason-fold .recommendation {
  padding: 0 12px 12px;
}

.quick-jump {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-jump a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d7e3fb;
  border-radius: 999px;
  padding: 7px 8px;
  color: var(--blue-dark);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.recommendation ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.muted-deep-card {
  opacity: 0.68;
  background: #f8fafc;
}

.possible-matches {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.possible-matches h3 {
  margin-bottom: 0;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
}

.match-card p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.35;
}

.match-card span {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}

.actions button:last-child {
  background: linear-gradient(135deg, var(--blue) 0, #1a72f0 100%);
  box-shadow: 0 12px 24px rgba(21, 88, 214, 0.18);
}

.actions #new-scan {
  grid-column: 1 / -1;
  position: relative;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid rgba(21, 88, 214, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #1558d6 0, #1a72f0 52%, #4ea72e 100%);
  box-shadow: 0 16px 34px rgba(21, 88, 214, 0.24);
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  font-weight: 950;
}

.actions #new-scan::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.28) 46%, transparent 58% 100%);
  transform: translateX(-100%);
  animation: scan-another-sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

.actions #new-scan::after {
  content: "›";
  display: inline-grid;
  width: 26px;
  aspect-ratio: 1;
  place-items: center;
  margin-left: 10px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: -1px;
}

.actions #new-scan:hover {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #0d47b8 0, #1558d6 48%, #3e8e24 100%);
}

.actions button:nth-child(2) {
  background: linear-gradient(135deg, var(--green) 0, #63b941 100%);
  box-shadow: 0 12px 24px rgba(78, 167, 46, 0.18);
}

.actions button:nth-child(3) {
  background: linear-gradient(135deg, #7a4b00 0, #f59e0b 100%);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.18);
}

.buy-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.buy-form h3 {
  margin-bottom: 0;
}

.fee-estimate-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.listing-draft {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.listing-draft .section-heading {
  margin-bottom: 0;
}

.draft-block {
  display: grid;
  gap: 8px;
}

.draft-block textarea {
  min-height: 84px;
}

.marketplace-ai-handoff {
  display: grid;
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
}

.marketplace-ai-handoff h4 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 1rem;
}

.marketplace-ai-handoff p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.marketplace-ai-handoff ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.marketplace-ai-handoff li::marker {
  color: var(--blue-dark);
  font-weight: 900;
}

.marketplace-ai-handoff .marketplace-route-warning {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 9px 10px;
  color: #7c2d12;
  background: #fff7ed;
  font-weight: 850;
}

.listing-actions {
  display: grid;
  gap: 8px;
}

.listing-draft[data-platform="facebook"] #connect-ebay,
.listing-draft[data-platform="facebook"] #open-facebook-sell {
  display: none;
}

.listing-draft:not([data-platform="estatesales"]) #open-estatesales-sell,
.listing-draft[data-platform="estatesales"] #connect-ebay,
.listing-draft[data-platform="estatesales"] #open-ebay-sell,
.listing-draft[data-platform="estatesales"] #open-facebook-sell,
.listing-draft[data-platform="estatesales"] #open-facebook-manual,
.listing-draft[data-platform="estatesales"] [data-list-price-row],
.listing-draft[data-platform="estatesales"] [data-offer-floor-row] {
  display: none;
}

.listing-api-status {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.8rem 0 0;
  padding: 0.75rem 0.85rem;
}

.listing-api-status.hidden,
.listing-api-status:empty {
  display: none;
}

.listing-api-status[data-state="ready"] {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(240, 253, 244, 0.94);
  color: #166534;
}

.listing-api-status[data-state="warn"] {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(255, 251, 235, 0.94);
  color: #92400e;
}

.marketplace-manual-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.listing-photo-handoff {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.listing-photo-handoff.hidden {
  display: none;
}

.listing-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.listing-photo-head div {
  display: grid;
  gap: 3px;
}

.listing-photo-head strong {
  color: var(--ink);
}

.listing-photo-head span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 0.76rem;
  font-weight: 900;
}

.listing-photo-primary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.listing-photo-primary-actions .primary-action,
.listing-photo-primary-actions .secondary-action {
  min-height: 46px;
  width: 100%;
  margin: 0;
}

.listing-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.listing-photo-card {
  display: grid;
  gap: 5px;
  border: 0;
  padding: 0;
  color: var(--blue-dark);
  background: transparent;
  text-decoration: none;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.listing-photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.listing-photo-card.is-active img {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 88, 214, 0.14);
}

.listing-photo-preview {
  display: grid;
  gap: 8px;
}

.listing-photo-preview img {
  width: 100%;
  max-height: min(220px, 36vh);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.listing-photo-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.listing-photo-preview-actions > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.listing-photo-handoff p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.listing-photo-handoff .listing-share-help {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 9px 10px;
  color: #7c2d12;
  background: #fff7ed;
  font-weight: 800;
}

.listing-handoff-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .listing-photo-primary-actions {
    grid-template-columns: 1fr;
  }
}

#draft-title {
  min-height: 54px;
}

.hidden {
  display: none;
}

.dashboard-back-button {
  justify-self: start;
  margin: 12px 0 0;
  border: 1px solid rgba(21, 88, 214, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 9px 16px;
}

.dashboard-back-button::before {
  content: "‹";
  margin-right: 8px;
  font-size: 1.15em;
  line-height: 0;
}

body.simple-mode .advanced-only {
  display: none;
}

body.advanced-mode .simple-only {
  display: none;
}

body.simple-mode .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.simple-mode #new-scan {
  grid-column: 1 / -1;
}

body.simple-mode .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.simple-mode .decision-panel {
  position: static;
}

body.value-only .metric-profit,
body.value-only .metric-max-buy,
body.value-only .metric-photos,
body.value-only .metric-confidence,
body.value-only .recommendation {
  display: none;
}

body:not(.value-only) .value-action {
  display: none;
}

body.value-only .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.value-only .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.retail-pricing-mode .dashboard-tools-head,
body.retail-pricing-mode #scan-workspace-fold > summary,
body.retail-pricing-mode #dashboard-tools > details:not(#scan-workspace-fold),
body.retail-pricing-mode .workspace .advanced-only,
body.retail-pricing-mode .purchase-price-row,
body.retail-pricing-mode #decision-refresh-actions,
body.retail-pricing-mode #mode-switch,
body.retail-pricing-mode .proof-meter,
body.retail-pricing-mode #match-signal,
body.retail-pricing-mode #source-badges,
body.retail-pricing-mode #search-used,
body.retail-pricing-mode #scan-feedback,
body.retail-pricing-mode #possible-matches,
body.retail-pricing-mode .quick-jump,
body.retail-pricing-mode #listing-draft,
body.retail-pricing-mode #buy-form,
body.retail-pricing-mode .global-finds-bar {
  display: none !important;
}

body.retail-needs-info .decision-panel > .metric-grid,
body.retail-needs-info .result-detail-fold,
body.retail-needs-info .reason-fold,
body.retail-needs-info #listing-shortcuts,
body.retail-needs-info .actions {
  display: none !important;
}

body.retail-pricing-mode #flip-calculator {
  display: none !important;
}

body.retail-pricing-mode #dashboard-tools {
  gap: 0;
}

body.retail-pricing-mode #scan-workspace-fold {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.retail-pricing-mode .workspace {
  grid-template-columns: 1fr;
}

body.retail-pricing-mode .decision-panel {
  position: static;
}

body.retail-pricing-mode .decision-panel > div:first-child {
  display: grid;
  gap: 10px;
}

body.retail-pricing-mode #decision-copy {
  color: var(--muted);
}

body.retail-pricing-mode .metric-grid {
  grid-template-columns: 1fr;
}

body.retail-pricing-mode .metric-platform,
body.retail-pricing-mode .metric-profit,
body.retail-pricing-mode .metric-max-buy {
  display: none;
}

body.retail-pricing-mode .actions {
  grid-template-columns: 1fr;
}

body.retail-pricing-mode .actions button:not(#new-scan) {
  display: none;
}

body.retail-pricing-mode #new-scan {
  grid-column: 1 / -1;
}

body.retail-pricing-mode #listing-shortcuts {
  display: grid;
}

.dashboard-accordion {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.dashboard-tools-head {
  margin-bottom: 0;
}

.dashboard-fold {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.dashboard-fold[data-dashboard-theme="camera"] {
  --dashboard-gradient: linear-gradient(135deg, #ffb31a 0%, #ff6a1f 48%, #f01835 100%);
  --dashboard-accent: #ff8a1c;
  --dashboard-shadow: rgba(240, 73, 32, 0.24);
  --dashboard-border: rgba(240, 73, 32, 0.22);
  --dashboard-icon: "📷";
}

.dashboard-fold[data-dashboard-theme="reports"] {
  --dashboard-gradient: linear-gradient(135deg, #ffe06a 0%, #19b85f 44%, #0f73e8 100%);
  --dashboard-accent: #19a463;
  --dashboard-shadow: rgba(25, 164, 99, 0.24);
  --dashboard-border: rgba(25, 164, 99, 0.2);
  --dashboard-icon: "";
}

.dashboard-fold[data-dashboard-theme="lookup"] {
  --dashboard-gradient: linear-gradient(135deg, #1edb6d 0%, #09b8d8 48%, #0f62e6 100%);
  --dashboard-accent: #0f86df;
  --dashboard-shadow: rgba(15, 134, 223, 0.23);
  --dashboard-border: rgba(15, 134, 223, 0.2);
  --dashboard-icon: "";
}

.dashboard-fold[data-dashboard-theme="pricing"] {
  --dashboard-gradient: linear-gradient(135deg, #fee06a 0%, #43c850 45%, #0c83e8 100%);
  --dashboard-accent: #43b94b;
  --dashboard-shadow: rgba(67, 200, 80, 0.22);
  --dashboard-border: rgba(67, 200, 80, 0.2);
  --dashboard-icon: "$";
}

.dashboard-fold[data-dashboard-theme="inventory"] {
  --dashboard-gradient: linear-gradient(135deg, #3d96ff 0%, #1d5fd9 54%, #083fa9 100%);
  --dashboard-accent: #1d67dd;
  --dashboard-shadow: rgba(29, 95, 217, 0.24);
  --dashboard-border: rgba(29, 95, 217, 0.18);
  --dashboard-icon: "";
}

.dashboard-fold[data-dashboard-theme="logs"] {
  --dashboard-gradient: linear-gradient(135deg, #ffdc55 0%, #f59a16 48%, #b46a00 100%);
  --dashboard-accent: #e3920f;
  --dashboard-shadow: rgba(245, 154, 22, 0.24);
  --dashboard-border: rgba(245, 154, 22, 0.22);
  --dashboard-icon: "↻";
}

.dashboard-fold > summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  grid-template-rows: auto auto;
  gap: 5px 13px;
  align-items: center;
  justify-content: stretch;
  min-height: 88px;
  padding: 15px 16px;
  color: #fff;
  background: var(--dashboard-gradient, linear-gradient(135deg, var(--primary-blue), var(--blue-dark)));
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.14),
    0 12px 22px var(--dashboard-shadow, rgba(21, 88, 214, 0.22));
}

.dashboard-fold > summary::before {
  content: var(--dashboard-icon, "▦");
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 15px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 8px 16px rgba(15, 23, 42, 0.18);
  font-size: 1.45rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(15, 23, 42, 0.24);
}

.dashboard-fold[data-dashboard-theme="lookup"] > summary::before {
  content: "";
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(255, 59, 48, 0.95) 46% 54%, transparent 54%) center / 38px 34px no-repeat,
    linear-gradient(90deg, #fff 0 4px, transparent 4px 7px, #fff 7px 10px, transparent 10px 15px, #fff 15px 17px, transparent 17px 21px, #fff 21px 26px, transparent 26px 30px, #fff 30px 32px) center / 32px 25px no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
}

.dashboard-fold[data-dashboard-theme="reports"] > summary::before {
  content: "";
  background:
    linear-gradient(to top, #fff 0 42%, transparent 42%) 13px 25px / 7px 22px no-repeat,
    linear-gradient(to top, #fff 0 72%, transparent 72%) 23px 18px / 7px 29px no-repeat,
    linear-gradient(to top, #fff 0 100%, transparent 100%) 33px 12px / 7px 35px no-repeat,
    linear-gradient(135deg, transparent 0 31px, rgba(255, 255, 255, 0.9) 31px 37px, transparent 37px) center / 40px 40px no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
}

.dashboard-fold[data-dashboard-theme="inventory"] > summary::before {
  content: "";
  background:
    linear-gradient(#fff, #fff) center 14px / 30px 4px no-repeat,
    linear-gradient(#fff, #fff) center 25px / 30px 4px no-repeat,
    linear-gradient(#fff, #fff) center 36px / 30px 4px no-repeat,
    linear-gradient(90deg, transparent 0 17px, rgba(255, 255, 255, 0.82) 17px 21px, transparent 21px) center / 34px 34px no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
}

.dashboard-fold > summary::after {
  content: "›";
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(15, 23, 42, 0.22);
}

.dashboard-fold[open] > summary::after {
  transform: rotate(90deg);
}

.dashboard-fold > summary span {
  grid-column: 2;
  color: #fff;
  font-size: 1.18rem;
  line-height: 1.08;
  text-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.dashboard-fold > summary strong {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  text-align: left;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.dashboard-fold > section {
  margin: 0;
  border: 1px solid var(--dashboard-border, rgba(21, 88, 214, 0.16));
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: none;
}

.dashboard-fold > .compact-research-panel {
  padding: 16px;
}

.dashboard-fold > .tracker,
.dashboard-fold > .workspace,
.dashboard-fold > .category-deep-dive,
.dashboard-fold > .deep-dive-panel,
.dashboard-fold > .ai-ask-panel,
.dashboard-fold > .tips-panel {
  padding: 16px;
}

.tracker,
.comps-panel {
  margin-top: 18px;
  padding: 18px;
}

.compact-research-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.ai-ask-panel,
.deep-dive-panel,
.tips-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(21, 88, 214, 0.08), rgba(255, 255, 255, 0) 38%),
    #fff;
  box-shadow: var(--shadow);
}

.deep-dive-panel {
  background:
    linear-gradient(135deg, rgba(251, 188, 4, 0.12), rgba(255, 255, 255, 0) 38%),
    #fff;
}

.admin-card {
  width: min(100%, 900px);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-summary article,
.admin-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-summary span,
.admin-row span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-section-head,
.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.admin-section-head h3 {
  margin: 0;
}

.admin-section-head span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue);
  background: var(--sky);
  font-weight: 950;
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-row {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.admin-row-details {
  display: block;
}

.admin-row-details summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.admin-row-details summary::-webkit-details-marker {
  display: none;
}

.admin-row-details summary::after {
  content: "›";
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
  transition: transform 0.18s ease;
}

.admin-row-details[open] summary::after {
  transform: rotate(90deg);
}

.admin-row-detail-body {
  margin-top: 10px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(239, 246, 255, 0.72);
}

.admin-row-detail-body p {
  margin: 0 0 7px;
}

.admin-scan-title-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.admin-scan-title-list li {
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.admin-scan-title-list strong,
.admin-scan-title-list span {
  display: block;
  text-transform: none;
}

.admin-scan-title-list span {
  margin-top: 3px;
}

.admin-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-row strong {
  display: block;
  margin-top: 3px;
  line-height: 1.2;
}

.admin-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.admin-row small {
  min-width: 96px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tips-panel {
  background:
    linear-gradient(135deg, rgba(238, 28, 32, 0.07), rgba(255, 255, 255, 0) 38%),
    #fff;
}

.guide-lane {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.guide-lane article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  align-items: start;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 8px;
  padding: 11px;
  background: #f8fbff;
}

.guide-lane span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 25px;
  aspect-ratio: 1;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
}

.guide-lane strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.guide-lane p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.deep-dive-grid,
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.deep-card,
.tips-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.deep-card.strong {
  border-color: rgba(78, 167, 46, 0.42);
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.12), rgba(255, 255, 255, 0) 48%),
    #fff;
  box-shadow: 0 14px 28px rgba(78, 167, 46, 0.12);
}

.deep-card.exact {
  border-color: rgba(78, 167, 46, 0.58);
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.16), rgba(251, 188, 4, 0.12) 52%, rgba(255, 255, 255, 0) 78%),
    #fff;
  box-shadow: 0 18px 34px rgba(78, 167, 46, 0.16);
}

.deep-card.mixed {
  border-color: rgba(21, 88, 214, 0.3);
  background:
    linear-gradient(135deg, rgba(21, 88, 214, 0.09), rgba(255, 255, 255, 0) 48%),
    #fff;
}

.deep-card.weak {
  border-color: rgba(125, 141, 161, 0.32);
  background:
    linear-gradient(135deg, rgba(125, 141, 161, 0.08), rgba(255, 255, 255, 0) 48%),
    #fff;
}

.deep-card.celebrate {
  animation: exact-card-pop 720ms ease both;
}

.tips-grid .tip-feature {
  grid-column: span 2;
  border-color: rgba(21, 88, 214, 0.22);
  background:
    linear-gradient(135deg, rgba(21, 88, 214, 0.08), rgba(255, 255, 255, 0) 42%),
    #fff;
}

.deep-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.tips-grid article span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--red-dark);
  background: var(--rose);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.deep-card strong {
  font-size: 1.35rem;
}

.deep-card p,
.tips-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.tips-grid h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.18;
}

.tips-grid ul {
  margin: 2px 0 0;
  padding-left: 18px;
  color: #303846;
  font-size: 0.9rem;
  line-height: 1.42;
}

.tips-grid li + li {
  margin-top: 4px;
}

.inline-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manual-comps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.manual-comps-grid label {
  display: grid;
  gap: 4px;
}

.manual-comps-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.manual-comps-grid input {
  min-width: 0;
  width: 100%;
}

.manual-comps-actions {
  margin-top: 10px;
}

.manual-comps-actions .secondary-action {
  width: 100%;
}

.sold-proof-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.sold-proof-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--success);
}

.match-signal {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border: 1px solid rgba(125, 141, 161, 0.28);
  border-radius: 8px;
  padding: 10px;
  background: #f7f9fc;
}

.match-signal span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.match-signal strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.15;
}

.match-signal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.match-signal.weak {
  border-color: rgba(238, 28, 32, 0.22);
  background: #fff7f4;
}

.match-signal.weak span {
  color: var(--red-dark);
  background: var(--rose);
}

.match-signal.mixed {
  border-color: rgba(21, 88, 214, 0.25);
  background: #f6f9ff;
}

.match-signal.mixed span {
  color: var(--blue-dark);
  background: var(--sky);
}

.match-signal.strong,
.match-signal.exact {
  border-color: rgba(78, 167, 46, 0.36);
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.12), rgba(255, 255, 255, 0) 58%),
    #f8fff5;
}

.match-signal.strong span,
.match-signal.exact span {
  color: var(--green-dark);
  background: var(--mint);
}

.match-signal.exact {
  border-color: rgba(78, 167, 46, 0.52);
  box-shadow: 0 10px 24px rgba(78, 167, 46, 0.12);
}

.money-celebration {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1400;
  display: grid;
  min-height: min(66vh, 620px);
  place-items: center;
  padding: 18px;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 92%, rgba(251, 188, 4, 0.38), transparent 42%),
    radial-gradient(circle at 50% 82%, rgba(78, 167, 46, 0.24), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 249, 214, 0.72));
  animation: match-splash-in 180ms ease both;
}

.money-celebration.leaving {
  animation: match-splash-out 420ms ease both;
}

.money-celebration-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  border: 2px solid rgba(78, 167, 46, 0.5);
  border-radius: 10px;
  padding: 18px 20px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(251, 188, 4, 0.3), transparent 38%),
    linear-gradient(180deg, #ffffff, #efffe9);
  box-shadow: 0 18px 54px rgba(17, 24, 39, 0.18);
  animation: money-card-rise 560ms cubic-bezier(0.18, 0.9, 0.22, 1.18) both;
}

.money-celebration-card span {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.money-celebration-card strong {
  display: block;
  color: var(--green-dark);
  font-size: clamp(2.45rem, 12vw, 5rem);
  line-height: 0.95;
}

.money-celebration-card p {
  margin: 12px 0 0;
  color: #303846;
  line-height: 1.4;
}

.money-celebration.payday .money-celebration-card,
.money-celebration.jackpot .money-celebration-card {
  border-color: rgba(251, 188, 4, 0.72);
  background:
    radial-gradient(circle at 50% 0, rgba(251, 188, 4, 0.42), transparent 40%),
    linear-gradient(180deg, #ffffff, #fff8db);
}

.money-celebration.jackpot .money-celebration-card {
  transform-origin: 50% 100%;
  animation: jackpot-card-rise 760ms cubic-bezier(0.16, 0.98, 0.18, 1.16) both;
}

.money-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.money-rain span {
  position: absolute;
  bottom: -24%;
  left: var(--x);
  display: grid;
  place-items: center;
  width: var(--size, 34px);
  aspect-ratio: 1;
  border-radius: 999px;
  color: #663a00;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.98) 0 8%, transparent 9%),
    radial-gradient(circle at 42% 38%, #fff7bc 0 24%, #ffd857 25% 42%, #f3a900 43% 62%, #a76400 63% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 253, 214, 0.95),
    inset 0 0 0 5px rgba(255, 205, 54, 0.88),
    inset 0 0 0 9px rgba(150, 88, 0, 0.26),
    inset -8px -10px 18px rgba(101, 56, 0, 0.24),
    inset 7px 7px 14px rgba(255, 255, 255, 0.34),
    0 12px 24px rgba(88, 56, 0, 0.34);
  font-size: clamp(0.58rem, calc(var(--size, 34px) / 4), 0.95rem);
  font-weight: 950;
  animation: money-fountain 2750ms cubic-bezier(0.12, 0.72, 0.12, 1) both;
  animation-delay: var(--d);
}

.money-rain span::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: inherit;
  border: 2px dashed rgba(121, 70, 0, 0.52);
  opacity: 0.74;
}

.money-rain span i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid rgba(132, 78, 0, 0.42);
  font-style: normal;
  line-height: 1;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.68), transparent 30%),
    rgba(255, 236, 139, 0.7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.money-rain span:nth-child(2n) {
  width: calc(var(--size, 34px) * 0.72);
  color: #734700;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.95) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, #fff2a8 0 34%, #f5a400 35% 59%, #a56500 60% 100%);
}

.money-rain span:nth-child(3n) {
  width: calc(var(--size, 34px) * 1.18);
  color: #5b3600;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.95) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, #fff6bc 0 34%, #ffd13c 35% 57%, #b46f00 58% 100%);
}

.money-rain span:nth-child(5n) {
  width: calc(var(--size, 34px) * 1.38);
  filter: saturate(1.15);
}

.money-rain span:nth-child(7n) {
  width: calc(var(--size, 34px) * 0.56);
  opacity: 0.92;
}

.skip-warning {
  position: fixed;
  inset: 0;
  z-index: 1450;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 50%, rgba(127, 29, 29, 0.62), transparent 30%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.62));
  text-align: center;
  pointer-events: auto;
  animation: skip-warning-in 240ms cubic-bezier(0.2, 0.9, 0.22, 1.22) both;
}

.skip-warning > div:last-child {
  width: min(100%, 390px);
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  padding: 18px 18px 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(145deg, #111827, #7f1d1d 58%, #450a0a);
  box-shadow: 0 26px 74px rgba(17, 24, 39, 0.42);
}

.skip-warning.leaving {
  animation: skip-warning-out 360ms ease both;
}

.skip-warning-mark {
  display: grid;
  width: clamp(108px, 34vw, 176px);
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: -10px;
  border-radius: 999px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.13), transparent 54%),
    #111827;
  border: 4px solid rgba(255, 255, 255, 0.86);
  font-size: clamp(4.9rem, 25vw, 8.6rem);
  line-height: 1;
  box-shadow: 0 20px 46px rgba(17, 24, 39, 0.42);
  animation: skull-pop 420ms cubic-bezier(0.18, 0.9, 0.24, 1.3) both;
}

.skip-warning strong,
.skip-warning span {
  display: block;
}

.skip-warning strong {
  font-size: clamp(3rem, 18vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.skip-warning span {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 4.8vw, 1.45rem);
  font-weight: 800;
}

@keyframes exact-card-pop {
  0% {
    transform: scale(0.98);
  }

  45% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes decision-flip-pop {
  from {
    transform: scale(1);
    filter: saturate(1);
  }

  to {
    transform: scale(1.025);
    filter: saturate(1.18);
  }
}

@keyframes scan-another-sheen {
  0%,
  45% {
    transform: translateX(-110%);
  }

  70%,
  100% {
    transform: translateX(110%);
  }
}

@keyframes match-splash-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes match-splash-out {
  to {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

@keyframes money-card-rise {
  from {
    opacity: 0;
    transform: translateY(54px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes jackpot-card-rise {
  0% {
    opacity: 0;
    transform: translateY(64px) scale(0.88) rotate(-1deg);
  }

  55% {
    opacity: 1;
    transform: translateY(-6px) scale(1.06) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes money-fountain {
  from {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.58);
  }

  12% {
    opacity: 1;
    transform: translate3d(calc(var(--drift) * 0.25), -18vh, 0) rotate(calc(var(--spin) * 0.18)) scale(1.08);
  }

  48% {
    opacity: 1;
    transform: translate3d(calc(var(--drift) * -0.35), calc(var(--rise, 54vh) * -0.72), 0) rotate(calc(var(--spin) * 0.6)) scale(0.96);
  }

  76% {
    opacity: 1;
    transform: translate3d(var(--drift), calc(var(--rise, 54vh) * -1), 0) rotate(var(--spin)) scale(1.12);
  }

  to {
    opacity: 0;
    transform: translate3d(calc(var(--drift) * 1.25), calc((var(--rise, 54vh) + 16vh) * -1), 0) rotate(calc(var(--spin) * 1.22)) scale(0.82);
  }
}

@keyframes skip-warning-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  70% {
    opacity: 1;
    transform: scale(1.02);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes skip-warning-out {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

@keyframes skull-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.72) rotate(-8deg);
  }

  58% {
    opacity: 1;
    transform: translateY(-4px) scale(1.08) rotate(4deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.weekly-profit-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.monthly-listing-pulse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(78, 167, 46, 0.2);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.12), rgba(251, 188, 4, 0.1) 48%, rgba(255, 255, 255, 0) 76%),
    #fff;
}

.monthly-listing-pulse h3 {
  margin: 0 0 5px;
  color: var(--green-dark);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.05;
}

.monthly-listing-pulse p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.monthly-listing-main {
  min-width: 0;
}

.monthly-listing-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.monthly-listing-metrics span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.84rem;
}

.monthly-listing-metrics strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.25rem;
}

.weekly-profit-panel .section-heading {
  margin-bottom: 0;
  align-items: end;
}

.analytics-snapshot-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), #fff 38%),
    #fff;
}

.analytics-snapshot-panel .section-heading {
  margin-bottom: 8px;
  align-items: center;
}

.analytics-snapshot-head {
  gap: 10px;
}

.analytics-quick-view {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.analytics-profit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 5px;
}

.analytics-week-profit {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(78, 167, 46, 0.32);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--green-dark);
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  box-shadow: 0 8px 18px rgba(78, 167, 46, 0.12);
}

.analytics-week-profit b {
  color: #3d7d28;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.analytics-week-profit strong {
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 950;
}

.analytics-inline-total {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.25;
}

.analytics-panel-body {
  margin-top: 8px;
}

.analytics-snapshot-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-control button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
}

.segmented-control button.active {
  border-color: var(--green);
  background: #ecfdf5;
  color: var(--green-dark);
  font-weight: 800;
}

#analytics-metric {
  width: auto;
  min-width: 104px;
  min-height: 34px;
}

.compact-action {
  min-height: 34px;
  padding: 6px 10px;
}

.compact-action.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef6ff;
}

.analytics-snapshot-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.analytics-snapshot-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 0.76rem;
}

.analytics-snapshot-summary strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
}

.analytics-snapshot-summary span {
  display: flex;
  gap: 5px;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.analytics-snapshot-summary b {
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.analytics-snapshot-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-snapshot-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--chart-count, 7), minmax(0, 1fr));
  gap: 6px;
  min-height: 145px;
  overflow-x: hidden;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 8px 7px;
  background:
    repeating-linear-gradient(180deg, transparent 0 37px, rgba(148, 163, 184, 0.16) 38px),
    #fff;
}

.analytics-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 4px;
  min-height: 112px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 4px;
  background: rgba(248, 250, 252, 0.68);
  color: var(--ink);
  cursor: pointer;
}

.analytics-bar span {
  align-self: end;
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #1558d6, #4ea72e);
  box-shadow: 0 8px 18px rgba(21, 88, 214, 0.18);
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.analytics-bar:hover span,
.analytics-bar.active span {
  filter: saturate(1.2) brightness(1.04);
  transform: translateY(-2px);
}

.analytics-bar.active {
  border-color: rgba(21, 88, 214, 0.42);
  background: #eef6ff;
}

.analytics-bar strong,
.analytics-bar em {
  font-size: 0.68rem;
  font-style: normal;
  text-align: center;
}

#weekly-profit-total {
  font-size: 1.8rem;
  color: var(--green-dark);
}

.weekly-profit-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 170px;
  align-items: end;
}

.weekly-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 5px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 5px;
  color: var(--ink);
  background: #fbfcff;
  cursor: pointer;
}

.weekly-bar span {
  align-self: end;
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.weekly-bar strong,
.weekly-bar em {
  font-size: 0.74rem;
  font-style: normal;
  text-align: center;
}

.weekly-profit-items {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.weekly-profit-items p {
  margin: 4px 0 0;
  color: var(--muted);
}

.feedback-popup {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(18px, env(safe-area-inset-bottom, 0px));
  background: rgba(17, 24, 39, 0.5);
  -webkit-overflow-scrolling: touch;
}

.beta-report-trigger {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1100;
  width: min(420px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid rgba(21, 88, 214, 0.28);
  border-radius: 999px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(21, 88, 214, 0.18);
  backdrop-filter: blur(12px);
}

.simple-camera-sheet:not(.hidden) ~ .beta-report-trigger {
  display: none;
}

.feedback-popup.hidden,
.retail-panel.hidden,
.sync-status-panel.hidden,
.settings-panel.hidden,
.username-setup-panel.hidden,
.admin-panel.hidden,
.pricing-screen.hidden {
  display: none;
}

.feedback-panel {
  width: min(100%, 430px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.28);
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 104px;
}

.feedback-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px -18px 0;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(209, 216, 228, 0.72);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -14px 28px rgba(255, 255, 255, 0.88);
}

.feedback-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.scan-feedback {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.scan-feedback.qf-fold {
  gap: 0;
  padding: 0;
}

.scan-feedback.qf-fold[open] {
  padding-bottom: 12px;
}

.scan-feedback.qf-fold > :not(summary) {
  margin-right: 12px;
  margin-left: 12px;
}

.scan-feedback h3,
.scan-feedback p {
  margin: 0;
}

.scan-feedback p,
.scan-feedback-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.scan-feedback-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scan-feedback-options button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue-dark);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.scan-feedback-options button.active {
  border-color: rgba(78, 167, 46, 0.42);
  color: var(--green-dark);
  background: var(--mint);
}

.scan-feedback label {
  font-size: 0.84rem;
  font-weight: 900;
}

.scan-feedback input,
.scan-feedback textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  font: inherit;
  resize: vertical;
}

.category-deep-dive {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.08), rgba(255, 255, 255, 0) 38%),
    #fff;
  box-shadow: var(--shadow);
}

.category-heading {
  align-items: end;
  margin-bottom: 0;
}

.barcode-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.95fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.barcode-copy {
  display: grid;
  gap: 5px;
}

.barcode-copy span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-dark);
  background: rgba(21, 88, 214, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.barcode-copy strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.barcode-copy p,
.barcode-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.barcode-controls {
  display: grid;
  gap: 9px;
}

.barcode-scanner-visual {
  grid-column: 1 / -1;
  display: none;
  border: 1px solid rgba(21, 88, 214, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: #07111f;
}

.barcode-scanner-visual.active {
  display: block;
}

.barcode-frame {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(21, 88, 214, 0.18), rgba(78, 167, 46, 0.1));
}

.barcode-frame span {
  display: block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.barcode-frame span:nth-child(2) {
  opacity: 0.42;
}

.barcode-frame span:nth-child(3) {
  opacity: 0.88;
}

.barcode-frame span:nth-child(4) {
  opacity: 0.55;
}

.barcode-frame i {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(78, 167, 46, 0.9);
  animation: barcode-scan-line 1.05s ease-in-out infinite alternate;
}

.barcode-manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.barcode-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(21, 88, 214, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.barcode-status[data-state="success"] {
  border-color: rgba(78, 167, 46, 0.34);
  background: #f7fff5;
}

.barcode-status[data-state="error"] {
  border-color: rgba(238, 28, 32, 0.24);
  background: #fff8f8;
}

.barcode-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.barcode-result-actions a {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--blue-dark);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.category-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-fields .empty-state {
  grid-column: 1 / -1;
}

.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-fold {
  padding: 0;
}

.section-fold[open] {
  padding-bottom: 12px;
}

.section-fold > :not(summary) {
  margin-right: 12px;
  margin-left: 12px;
}

.section-fold > .deep-dive-grid,
.section-fold > .tips-grid {
  margin-top: 0;
}

.ai-ask-heading {
  margin-bottom: 0;
}

.ai-ask-form {
  display: grid;
  gap: 9px;
}

.ai-ask-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ai-question-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-question-chips button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue-dark);
  background: #f6f9ff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.ai-answer {
  display: grid;
  gap: 8px;
  min-height: 72px;
  border: 1px solid rgba(21, 88, 214, 0.14);
  border-radius: 8px;
  padding: 12px;
  color: #273142;
  background: #fbfcff;
}

.ai-answer p {
  margin: 0;
  line-height: 1.45;
}

.ai-answer span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.compact-research-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.compact-research-copy {
  display: grid;
  gap: 4px;
}

.compact-research-copy .eyebrow {
  margin-bottom: 0;
}

.compact-research-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.research-toggle {
  white-space: nowrap;
}

.research-tools-body {
  display: grid;
  gap: 10px;
}

.research-tools-actions {
  display: flex;
  justify-content: flex-end;
}

.tracker-summary {
  margin-bottom: 12px;
}

.tracker-summary .comps-summary {
  margin-bottom: 8px;
}

.tracker-summary .comps-metrics {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.tracker-summary .comps-metrics span {
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  justify-content: center;
  padding: 9px 10px;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.15;
}

.tracker-summary .comps-metrics strong {
  margin-bottom: 5px;
  font-size: clamp(1rem, 4vw, 1.28rem);
  line-height: 1.05;
}

.receipt-trip-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  border: 1px solid #dbe7ff;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 14px 28px rgba(20, 64, 140, 0.08);
}

.receipt-trip-head {
  margin-bottom: 0;
}

.receipt-trip-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.receipt-trip-actions #receipt-photo-button {
  grid-column: 1 / -1;
}

.receipt-photo-name {
  margin: 0;
  color: #5d6675;
  font-weight: 800;
}

.receipt-results {
  display: grid;
  gap: 12px;
}

.receipt-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.receipt-stat {
  display: flex;
  min-width: 0;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.receipt-stat b {
  color: #657083;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.receipt-stat strong {
  color: #101828;
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.receipt-items {
  display: grid;
  gap: 8px;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e3e9f5;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.receipt-item-row strong {
  display: block;
  color: #111827;
}

.receipt-item-row span {
  color: #667085;
  font-weight: 700;
}

.receipt-item-row b {
  color: #0f4aa8;
  white-space: nowrap;
}

.receipt-recommendations,
.receipt-warnings {
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  padding: 14px;
  background: #f4f8ff;
}

.receipt-warnings {
  border-color: #ffdf8b;
  background: #fff8e7;
}

.receipt-recommendations h4,
.receipt-warnings h4 {
  margin: 0 0 8px;
}

.receipt-recommendations ul,
.receipt-warnings ul {
  margin: 0;
  padding-left: 18px;
  color: #4b5563;
  font-weight: 700;
}

.receipt-export {
  justify-self: start;
}

.tracker-search {
  margin-bottom: 12px;
}

.tracker-range-filters,
.tracker-custom-range {
  margin-bottom: 12px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.tracker-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(135deg, var(--red) 0, #ff521d 100%);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -2px 0 14px;
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.export-panel span {
  display: block;
  margin-bottom: 3px;
  color: var(--blue-dark);
  font-weight: 900;
}

.export-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.export-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border: 1px solid #cfd9ea;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 92, 214, 0.08);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.restore-link {
  cursor: pointer;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.comps-summary {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.comp-search-row {
  margin-bottom: 0;
}

.compact-research-panel .comp-search-row label {
  font-size: 0.88rem;
}

.research-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.research-status span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.research-status .on {
  border-color: rgba(78, 167, 46, 0.25);
  color: var(--green-dark);
  background: var(--mint);
}

.research-status .pending {
  border-color: rgba(251, 188, 4, 0.34);
  color: #7a4b00;
  background: var(--sun);
}

.research-status .off {
  border-color: rgba(238, 28, 32, 0.18);
  color: #8b2e2e;
  background: var(--rose);
}

.comps-summary p {
  margin-bottom: 0;
}

.research-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.research-summary-actions .secondary-action {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.research-step-note {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.comps-loading {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
}

.comps-loading p {
  margin: 4px 0 0;
  line-height: 1.35;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  flex: 0 0 auto;
  animation: spin 0.8s linear infinite;
}

.small-spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.thinking-row {
  list-style: none;
  margin-left: -20px;
}

.scan-strip-item {
  list-style: none;
  margin-left: -20px;
}

.scan-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.scan-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 6px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(90deg, #fffef8, #ffffff, #eef4ff, #ffffff);
  background-size: 220% 100%;
  animation: shimmer 0.9s linear infinite;
}

.scan-strip span:nth-child(2) {
  animation-delay: 0.08s;
}

.scan-strip span:nth-child(3) {
  animation-delay: 0.16s;
}

.scan-strip span:nth-child(4) {
  animation-delay: 0.24s;
}

.scan-strip span:nth-child(5) {
  animation-delay: 0.32s;
}

.scan-strip span:nth-child(6) {
  animation-delay: 0.4s;
}

.scan-strip span:nth-child(7) {
  animation-delay: 0.48s;
}

.loading-list {
  display: grid;
  gap: 10px;
}

.loading-list span {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, #fffef8, #ffffff, #eef4ff, #ffffff);
  background-size: 220% 100%;
  animation: shimmer 1.1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@keyframes scan-photo-sweep {
  to {
    background-position: -220% 0, 0 0;
  }
}

@keyframes scan-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-core-pulse {
  from {
    transform: scale(0.92);
    opacity: 0.82;
  }

  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes scan-orbit-beam {
  from {
    transform: translateY(-26px);
    opacity: 0.7;
  }

  to {
    transform: translateY(34px);
    opacity: 1;
  }
}

@keyframes scan-dot-pop {
  from {
    transform: scale(0.72);
    opacity: 0.68;
  }

  to {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes scan-ticker-roll {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-672px);
  }
}

@keyframes barcode-scan-line {
  to {
    top: calc(100% - 15px);
  }
}

@keyframes camera-scan-line {
  to {
    top: 76%;
  }
}

@keyframes camera-barcode-scan-line {
  to {
    top: 64%;
  }
}

@keyframes camera-barcode-sweep {
  from {
    transform: translateY(-8%);
    opacity: 0.78;
  }

  to {
    transform: translateY(34%);
    opacity: 1;
  }
}

@keyframes scanner-dot-pulse {
  from {
    transform: scale(0.72);
    opacity: 0.65;
  }

  to {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes scan-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.comps-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.comps-metrics span {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
  color: var(--muted);
}

.comps-metrics strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.sold-proof-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0, rgba(255, 255, 255, 0) 48%),
    #f8fbff;
}

.sold-proof-callout.connected {
  border-color: rgba(78, 167, 46, 0.25);
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.14) 0, rgba(255, 255, 255, 0) 48%),
    #f8fff6;
}

.sold-proof-callout strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.sold-proof-callout p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.sold-proof-callout .secondary-action {
  flex: 0 0 auto;
}

.comps-results {
  display: grid;
  gap: 10px;
}

.closest-matches {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(78, 167, 46, 0.12) 0, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #ffffff 0, #f8fff6 100%);
}

.research-group {
  display: grid;
  gap: 10px;
}

.closest-matches h3 {
  margin-bottom: 0;
}

.research-group h3 {
  margin-bottom: 0;
}

.research-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.research-note.strong-note {
  color: #166534;
  font-weight: 800;
}

.comp-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.closest-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.comp-thumb,
.comp-thumb-empty {
  width: 74px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.comp-thumb {
  object-fit: cover;
}

.comp-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.comp-card h3 {
  margin: 6px 0 4px;
  font-size: 1.02rem;
}

.closest-card h3 {
  margin: 6px 0 4px;
  font-size: 1.02rem;
}

.comp-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.closest-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.comp-use-line {
  margin-top: 6px;
  color: #374151;
  font-size: 0.84rem;
  line-height: 1.35;
}

.match-reasons {
  margin-top: 8px;
  line-height: 1.4;
}

.comp-type {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 0.78rem;
  font-weight: 700;
}

.comp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comp-signal {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.comp-signal.sold {
  color: #0f5132;
  background: #d9f2e3;
}

.comp-signal.asking {
  color: #7a4b00;
  background: #fff0c4;
}

.comp-signal.visual {
  color: var(--blue-dark);
  background: #dfe9ff;
}

.comp-signal.retail {
  color: #724400;
  background: #f9dcc3;
}

.comp-signal.risk {
  color: #713f12;
  background: #ffedd5;
}

.comp-signal.local,
.comp-signal.neutral {
  color: #235d73;
  background: #dceff7;
}

.comp-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--muted);
  font-weight: 700;
}

.comp-actions a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--blue-dark);
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-weight: 700;
}

.status.buy {
  background: var(--green);
}

.status.skip {
  background: var(--red);
}

.status.sold {
  background: var(--blue);
}

.status.keep {
  color: #3c2700;
  background: #fbbc04;
}

.status.recent {
  background: #6b7280;
}

.flip-list {
  display: grid;
  gap: 12px;
}

.recent-items {
  display: grid;
  gap: 12px;
}

.quick-recent {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}

.recent-heading {
  align-items: end;
  margin-bottom: 10px;
}

.recent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.recent-actions .secondary-action {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  padding: 0;
}

.recent-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.055);
}

.recent-thumb {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f7fb;
  cursor: pointer;
}

.recent-thumb img,
.recent-thumb-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.recent-thumb:hover img,
.recent-thumb:hover .recent-thumb-empty {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 88, 214, 0.14);
}

.recent-thumb-action {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0.92;
}

.recent-thumb:hover .recent-thumb-action {
  background: var(--blue);
}

.recent-card h3 {
  display: -webkit-box;
  margin: 5px 0 3px;
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.recent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}

.recent-meta > span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.recent-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.recent-open-action,
.recent-delete-action {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.recent-delete-action {
  color: var(--red);
  background: #fff7f7;
  border-color: rgba(238, 28, 32, 0.24);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.flip-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcff 100%);
}

.flip-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.flip-thumb-button {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.flip-thumb-button .flip-thumb {
  display: block;
}

.flip-thumb-button span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.flip-thumb-button:hover .flip-thumb {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 88, 214, 0.14);
}

.flip-card h3 {
  margin: 8px 0 4px;
}

.flip-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.flip-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.flip-stats span {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
}

.flip-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.card-note {
  line-height: 1.45;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-footer {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 14px 0 max(18px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.app-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  font-weight: 800;
  letter-spacing: 0;
}

.app-footer-brand img {
  width: 72px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.app-footer a {
  color: var(--primary-blue);
  font-weight: 800;
  text-decoration: none;
}

.legal-footer {
  width: min(100% - 28px, 760px);
  margin: 0 auto 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.legal-page {
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: #f4f7fb;
  color: var(--ink);
}

.legal-document {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.1);
}

.legal-document h1 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.legal-document h2 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.legal-document p,
.legal-document li {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
}

.legal-document ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-updated {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  color: var(--primary-blue);
  font-weight: 900;
  text-decoration: none;
}

.stale-note {
  border-left: 4px solid var(--gold);
  padding-left: 10px;
  color: #9f6a00;
  font-weight: 700;
}

.text-action {
  border: 0;
  padding: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.global-finds-bar {
  position: static;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: start;
  width: min(1180px, calc(100% - 28px));
  min-height: 0;
  margin: 0 auto 14px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #111827;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(10px);
}

.login-screen:not(.hidden) ~ .global-finds-bar,
.mode-landing:not(.hidden) ~ .global-finds-bar,
.simple-camera-sheet:not(.hidden) ~ .global-finds-bar,
.app-shell.hidden ~ .global-finds-bar {
  display: none;
}

.global-finds-head {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  min-width: 0;
}

.global-finds-head strong {
  white-space: nowrap;
  color: var(--red-dark);
  font-size: 0.9rem;
}

.global-finds-tabs {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}

.global-finds-tabs button,
.global-finds-see-all,
.global-finds-refresh,
.member-topic-row button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--blue-dark);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.global-finds-see-all {
  color: #111827;
  text-decoration: underline;
}

.global-finds-refresh {
  color: var(--green-dark);
}

.global-finds-refresh:disabled {
  opacity: 0.62;
  cursor: wait;
}

.global-finds-tabs button.active {
  border-color: rgba(78, 167, 46, 0.4);
  color: var(--green-dark);
  background: var(--mint);
}

.global-finds-window {
  grid-column: 1 / -1;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  padding-bottom: 4px;
}

.global-finds-track {
  display: flex;
  gap: 12px;
  width: max-content;
}

.global-finds-track.is-empty {
  width: 100%;
}

.global-finds-empty {
  width: min(100%, 420px);
  margin: 0;
  border: 1px dashed rgba(21, 88, 214, 0.24);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 0.9rem;
  font-weight: 800;
}

.global-find {
  display: grid;
  gap: 8px;
  width: 148px;
  flex: 0 0 148px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0 10px;
  color: #303846;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  font-size: 0.83rem;
  text-align: left;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  cursor: pointer;
}

.global-find-media,
.global-find-avatar,
.global-find img {
  width: 100%;
  height: 112px;
  flex: 0 0 auto;
  border-radius: 8px 8px 0 0;
}

.global-find-media {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.global-find img {
  position: relative;
  z-index: 1;
  display: block;
  border: 1px solid rgba(17, 24, 39, 0.08);
  object-fit: cover;
  background: #eef4ff;
}

.global-find img[src=""],
.global-find img:not([src]) {
  display: none;
}

.global-find-avatar {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.26), transparent 30%),
    var(--avatar-color, var(--blue));
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
  font-size: 1.45rem;
  font-weight: 900;
}

.global-find-media .global-find-avatar {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.global-find-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0 10px;
}

.global-find-copy > span {
  display: -webkit-box;
  max-width: 128px;
  overflow: hidden;
  color: #303846;
  font-weight: 800;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.global-find strong {
  display: block;
  color: var(--green-dark);
  font-size: 0.9rem;
}

.global-find em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.member-mtd-strip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.member-mtd-strip span {
  display: grid;
  min-width: 82px;
  border: 1px solid rgba(21, 88, 214, 0.16);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  background: #f4f7ff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.member-mtd-strip strong {
  color: var(--blue-dark);
  font-size: 0.92rem;
}

.member-room-trigger {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.member-room-trigger:hover {
  background: var(--blue-dark);
}

.member-room-panel {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.38);
}

.member-room-panel.hidden {
  display: none;
}

.member-room-shell {
  width: min(100%, 980px);
  max-height: min(88vh, 760px);
  overflow: auto;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.24);
}

.member-mtd-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.member-mtd-summary span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  font-size: 0.78rem;
  font-weight: 800;
}

.member-mtd-summary strong {
  color: #111827;
  font-size: 1.22rem;
}

.member-room-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
  align-items: start;
}

.member-question-card,
.member-thread-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfcff;
}

.member-question-card {
  display: grid;
  gap: 10px;
}

.member-question-card label {
  font-size: 0.88rem;
  font-weight: 900;
}

.member-question-card textarea {
  min-height: 118px;
  resize: vertical;
}

.member-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-topic-row button {
  background: #fff;
}

.member-privacy-note {
  margin: 0;
  border: 1px solid rgba(21, 88, 214, 0.14);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--blue-dark);
  background: #eef4ff;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 800;
}

.member-thread-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.member-thread-head h3 {
  margin: 0;
}

.member-thread-head span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.member-thread-list {
  display: grid;
  gap: 10px;
}

.member-thread-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.member-thread-card p {
  margin: 0;
  color: #303846;
  line-height: 1.38;
}

.member-thread-meta,
.member-thread-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.member-thread-meta span,
.member-thread-footer span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-dark);
  background: #eef4ff;
  font-size: 0.72rem;
  font-weight: 900;
}

.member-thread-meta strong {
  color: #111827;
  font-size: 0.85rem;
}

.member-thread-meta em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
}

@keyframes finds-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    padding: 20px 0;
  }

  .mode-landing {
    width: min(100% - 10px, 720px);
    align-content: start;
    padding-top: 4px;
  }

  .landing-stage {
    min-height: calc(100vh - 8px);
    padding: 22px 20px 24px;
    border-radius: 16px;
  }

  .landing-stage-content {
    gap: 14px;
  }

  .brand-logo {
    width: clamp(132px, 40vw, 185px);
  }

  .mode-landing h1 {
    font-size: clamp(2.8rem, 11vw, 4.1rem);
  }

  .landing-hero-art {
    width: min(112%, 680px);
    margin: -6px -5% -6px;
  }

  .primary-scan-card {
    min-height: 88px;
    gap: 14px;
    padding: 16px 18px;
  }

  .primary-scan-card strong {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .landing-dashboard-card {
    padding: 15px 16px;
  }

  .landing-utility-actions {
    width: min(100%, 360px);
  }

  .workspace,
  .form-grid,
  .photo-actions,
  .scan-utility-actions,
  .remembered-actions,
  .login-actions,
  .mode-actions,
  .plan-grid,
  .pricing-benefits,
  .category-fields,
  .barcode-tool,
  .barcode-manual-row,
  .guide-lane,
  .deep-dive-grid,
  .tips-grid,
  .analytics-snapshot-summary,
  .weekly-profit-chart,
  .intro-bar,
  .flip-rules-card,
  .flip-rules-grid,
  .mode-strip-actions,
  .compact-research-head,
  .monthly-listing-pulse,
  .listing-shortcuts,
  .flip-calculator-row,
  .ai-ask-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-summary,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-row {
    display: grid;
  }

  .admin-row small {
    min-width: 0;
    text-align: left;
  }

  .intro-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .intro-copy {
    justify-items: center;
  }

  .mode-status {
    justify-content: center;
  }

  body {
    padding-bottom: 0;
  }

  body.has-scan-bottom-action {
    padding-bottom: 132px;
  }

  body:not(.camera-active).has-scan-bottom-action {
    padding-bottom: 0;
  }

  .global-finds-bar {
    grid-template-columns: 1fr;
    gap: 6px;
    width: min(100% - 20px, 720px);
    min-height: 0;
    padding: 8px 10px;
  }

  .global-finds-head {
    justify-content: space-between;
  }

  .member-mtd-strip {
    justify-content: space-between;
  }

  .member-mtd-strip span {
    flex: 1;
    min-width: 0;
  }

  .member-mtd-summary,
  .member-room-grid {
    grid-template-columns: 1fr;
  }

  .member-room-panel {
    padding: 10px;
  }

  .member-room-shell {
    max-height: 90vh;
    padding: 16px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    max-height: 92vh;
    padding: 14px;
  }

  .tracker .section-heading {
    align-items: start;
  }

  .export-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 11px;
  }

  .export-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .export-link {
    width: 100%;
    white-space: normal;
  }

  .mode-pill {
    width: fit-content;
  }

  .tips-grid .tip-feature {
    grid-column: span 1;
  }

  .pricing-panel {
    padding: 16px;
  }

  .weekly-profit-chart {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    overflow-x: auto;
  }

  .intro-bar {
    justify-items: center;
    gap: 5px;
    padding: 9px 10px 11px;
  }

  .intro-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    text-align: center;
  }

  .intro-logo {
    width: min(100%, 430px);
  }

  .intro-tagline {
    font-size: clamp(1.25rem, 5.2vw, 1.75rem);
  }

  .intro-subtitle {
    font-size: 0.9rem;
  }

  .decision-panel {
    position: static;
    gap: 12px;
    padding: 14px;
  }

  .metric-grid,
  body.simple-mode .metric-grid,
  body.value-only .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric {
    min-height: 76px;
    padding: 10px;
  }

  .metric span {
    font-size: 0.76rem;
  }

  .metric strong {
    margin-top: 5px;
    font-size: clamp(1.05rem, 6vw, 1.45rem);
  }

  .flip-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comps-metrics,
  .comp-card,
  .closest-card,
  .match-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .tracker-summary .comps-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-summary .comps-metrics span {
    min-height: 58px;
    padding: 8px;
  }

  .receipt-trip-actions,
  .receipt-summary-grid {
    grid-template-columns: 1fr;
  }

  .receipt-item-row {
    grid-template-columns: 1fr;
  }

  .sold-proof-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .sold-proof-callout .secondary-action {
    width: 100%;
  }

  .tracker-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-jump {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .comp-thumb,
  .comp-thumb-empty {
    width: 58px;
  }

  .comp-actions {
    grid-column: 1 / -1;
    justify-items: start;
  }
}
