/* Unlayered — highest author priority, beats all @layer blocks */
[hidden] { display: none !important; }

:root {
  --font-sans: "Poppins", system-ui, sans-serif;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --ink: #1A1F2B;
  --ink2: #2c3446;
  --ink3: #6b7a96;
  --ink4: #a3b0c5;
  --rust: #4682B4;
  --rust2: #3a74a6;
  --rust-bg: #e6eff5;
  --cream: #ffffff;
  --cream2: #F9F9F9;
  --cream3: #eff2f5;
  --sand: #dde3ea;
  --sand2: #c5ced9;
  --white: #ffffff;
  --color-success: #1a7f37;
  --color-success-bg: #ecfdf3;
  --color-error: #cf222e;
  --color-error-bg: #fff0f0;
  --color-warning: #bf6a02;
  --color-warning-bg: #fff8eb;
  --sidebar-w: 260px;
  --rp-header-h: 72px;
  --topnav-h: 56px;
  --bottomnav-h: 56px;
  --modal-w: 420px;
  --teal: #0e6f5e;
  --teal-d: rgba(14,111,94,0.08);
  --teal-m: rgba(14,111,94,0.18);
  --card-min-w: 220px;
  --radius-sm: 6px;
  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-modal: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(26, 26, 46, 0.07), 0 4px 14px rgba(26, 26, 46, 0.04);
  --shadow-modal: 0 8px 32px rgba(26, 26, 46, 0.14), 0 2px 8px rgba(26, 26, 46, 0.07);
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}

@layer base {
  *,
  *::before,
  *::after { box-sizing: border-box; }

  html { height: 100%; }

  body {
    margin: 0;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
  }

  /* Heading reset — remove browser default sizes/weights */
  h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }

  /* Anchor reset */
  a { color: inherit; text-decoration: inherit; }

  /* Image/media block */
  img, svg, video, canvas { display: block; max-width: 100%; }

  /* Form element font inheritance */
  button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
  }

  /* Button cursor */
  button, [role="button"] { cursor: pointer; }

  /* Remove default border on fieldset */
  fieldset { margin: 0; padding: 0; border: 0; }

  /* Prevent textarea resize on X axis */
  textarea { resize: vertical; }
}

@layer components {
  .app-shell { display: flex; flex: 1; min-height: 0; overflow: hidden; background: var(--cream); }
  .topnav { display: none; height: var(--topnav-h); padding: 0 22px; align-items: center; justify-content: space-between; background: var(--cream); border-bottom: 1px solid var(--sand); position: sticky; top: 0; z-index: 10; }
  .topnav--visible { display: flex; }
  .sidebar { display: none; flex-direction: column; width: var(--sidebar-w); min-width: var(--sidebar-w); background: var(--cream2); border-right: 1px solid var(--sand); overflow: hidden; }
  .app-shell--has-sidebar .sidebar { display: flex; }
  .sidebar--no-brand .sb-header { display: none; }
  .main-panel { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
  .main-panel turbo-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; }

  .sb-header { height: var(--rp-header-h); padding: 0 14px; border-bottom: 1px solid var(--sand); display: flex; align-items: center; justify-content: space-between; }
  .sb-logo { display: flex; align-items: center; }
  .sb-logo .logo-svg { height: 34px; width: auto; display: block; }
  .sb-add { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--sand2); background: transparent; cursor: pointer; color: var(--ink3); display: flex; align-items: center; justify-content: center; transition: all 0.14s; text-decoration: none; flex-shrink: 0; }
  .sb-add:hover { border-color: var(--ink); color: var(--ink); background: var(--cream); }
  .sb-body { flex: 1; overflow-y: auto; padding: 12px 8px; }
  .si-new { display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; border-radius: 7px; margin: 0 0 12px; color: var(--ink3); border: 1.5px dashed var(--sand2); transition: all 0.12s; text-decoration: none; }
  .si-new:hover { border-color: var(--rust); background: var(--rust-bg); color: var(--rust); }
  .si-new:hover .si-new-icon { color: var(--rust); }
  .si-new-icon { width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .si-new-label { font-size: 13px; font-weight: 500; }
  .si-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; text-decoration: none; border-radius: 7px; margin: 0 0 4px; color: inherit; border: 1px solid transparent; transition: background 0.1s; }
  .si-item:hover { background: rgba(0,0,0,0.04); }
  .si-item--active { background: var(--cream); border-color: var(--sand); }
  .si-thumb { width: 36px; height: 36px; border-radius: 6px; overflow: hidden; background: var(--sand); flex-shrink: 0; border: 1px solid var(--sand); }
  .si-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .si-thumb-placeholder { width: 100%; height: 100%; background: var(--cream3); }
  .si-meta { flex: 1; min-width: 0; }
  .si-title { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
  .si-sub { margin-top: 0; }
  .si-badge { display: inline-block; font-size: 11px; font-family: var(--font-mono); padding: 1px 5px; border-radius: var(--radius-pill); }
  .si-badge--hits { background: var(--rust-bg); color: var(--rust); }
  .si-badge--clean { background: var(--color-success-bg); color: var(--color-success); }
  .si-badge--scanning { background: var(--cream3); color: var(--ink3); }
  .si-badge--error { background: var(--color-error-bg); color: var(--color-error); }
  .si-dot { flex: 0 0 6px; width: 6px; height: 6px; aspect-ratio: 1; border-radius: 50%; align-self: center; }
  .si-dot--hits { background: var(--rust); }
  .si-dot--clean { background: var(--color-success); }
  .si-dot--scanning { background: var(--sand2); animation: blink-dot 1.4s infinite; }
  .si-dot--error { background: var(--color-error); }
  .sb-foot { padding: 16px 16px; min-height: 68px; border-top: 1px solid var(--sand); display: flex; align-items: center; justify-content: space-between; }
  .sb-foot-label { font-size: 13px; color: var(--ink4); text-transform: uppercase; letter-spacing: 0.05em; }

  .hero-panel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px 24px; min-height: 0; text-align: center; }
  .hero-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); }
  .hero-copy { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; justify-content: flex-start; align-items: center; }
  .hero-h1 { font-family: var(--font-display); font-size: clamp(26px, 5vw, 38px); font-weight: 700; margin: 0; line-height: 1.12; letter-spacing: -0.03em; max-width: 520px; }
  .hero-h1 em { color: var(--rust); font-style: italic; }
  .hero-sub { font-size: 15px; color: var(--ink3); margin: 0; max-width: 380px; line-height: 1.6; }
  .hero-panel form { width: 100%; max-width: 440px; margin-bottom: 18px; }
  .dropzone { width: 100%; border: 1.5px dashed var(--sand2); border-radius: 18px; padding: 38px 24px; display: flex; flex-direction: column; align-items: center; gap: 0; background: var(--cream2); cursor: pointer; transition: all 0.2s; }
  .dropzone:hover,
  .dropzone.dropzone--dragover { border-color: var(--rust); background: var(--rust-bg); }
  .dropzone:hover .drop-icon,
  .dropzone.dropzone--dragover .drop-icon { background: var(--rust-bg); border-color: rgba(200,90,42,0.25); color: var(--rust); }
  .drop-icon { width: 50px; height: 50px; border-radius: 13px; background: var(--cream); border: 1px solid var(--sand); display: flex; align-items: center; justify-content: center; color: var(--ink3); transition: all 0.2s; flex-shrink: 0; margin-bottom: 14px; }
  .dropzone-label { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
  .drop-browse { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  .dropzone-hint { font-size: 12px; color: var(--ink4); margin-top: 4px; }
  .dropzone .drop-icon,
  .dropzone .dropzone-label,
  .dropzone .dropzone-hint { pointer-events: none; }
  .dropzone .dz-message { display: none; }
  .dropzone--loading { position: relative; cursor: default; pointer-events: none; }
  .dropzone--loading .drop-icon,
  .dropzone--loading .dropzone-label,
  .dropzone--loading .dropzone-hint { opacity: 0; }
  .dz-spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; }
  .hero-error { font-size: 13px; color: var(--color-error); text-align: center; }
  .hero-error:empty { display: none; }
  .hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
  .trust-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink3); }
  .trust-item svg { color: var(--color-success); flex-shrink: 0; }

  .btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; background: var(--rust); color: var(--white); border: none; border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
  .btn-primary:hover { background: var(--rust2); }
  .btn-ghost { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; background: transparent; color: var(--rust); border: 1.5px solid var(--rust); border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
  .btn-ghost:hover { background: var(--rust-bg); }

  .rp-header { height: var(--rp-header-h); padding: 0 20px; border-bottom: 1px solid var(--sand); display: flex; align-items: center; gap: 14px; background: var(--white); flex-shrink: 0; }
  .rp-photo { width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream3); flex-shrink: 0; border: 1px solid var(--sand); }
  .rp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .rp-text { flex: 1; min-width: 0; }
  .rp-filename { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rp-meta { font-size: 13px; color: var(--ink3); margin-top: 2px; }
  .rp-chips { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
  .chip { font-family: var(--font-mono); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 5px; white-space: nowrap; letter-spacing: 0.02em; }
  .chip-red  { background: var(--rust-bg); color: var(--rust); border: 1px solid rgba(200,90,42,0.2); }
  .chip-teal { background: var(--teal-d); color: var(--teal); border: 1px solid var(--teal-m); }
  .chip-muted { background: var(--cream2); color: var(--ink3); border: 1px solid var(--sand); }
  /* legacy aliases – keep for scanning/error panels */
  .rp-header-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream3); }
  .rp-header-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .rp-header-title { font-size: 14px; font-weight: 600; }
  .rp-header-status { font-size: 12px; color: var(--ink3); margin-top: 2px; }
  .rp-header-status--error { color: var(--color-error); }

  .scanning-panel,
  .results-panel,
  .clean-panel,
  .error-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: var(--cream); }
  .scanning-body,
  .error-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 24px; text-align: center; }
  .clean-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; text-align: center; }
  .scanning-body { gap: 38px; }
  .scan-visual { position: relative; display: flex; align-items: center; justify-content: center; }
  .scan-ring { position: absolute; border-radius: 50%; border: 1px solid var(--rust); opacity: 0; animation: scan-ripple 2.8s ease-out infinite; }
  .scan-ring--2 { animation-delay: 0.94s; }
  .scan-ring--3 { animation-delay: 1.88s; }
  .scan-photo { width: 128px; height: 128px; border-radius: 20px; object-fit: cover; border: 2px solid var(--sand); position: relative; z-index: 1; display: block; }
  .scan-steps { display: flex; flex-direction: column; gap: 5px; width: 100%; max-width: 300px; }
  .scan-step { display: flex; align-items: center; gap: 11px; padding: 9px 13px; border-radius: 9px; }
  .scan-step--done { opacity: 0.42; }
  .scan-step--active { background: var(--cream2); border: 1px solid var(--sand); }
  .scan-step--wait { opacity: 0.25; }
  .step-pip { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .scan-step--done .step-pip { background: var(--ink2); }
  .scan-step--active .step-pip { background: var(--rust); animation: blink-dot 0.85s infinite; }
  .scan-step--wait .step-pip { background: var(--sand2); }
  .step-text { font-size: 14px; font-weight: 500; color: var(--ink3); }
  .scan-step--active .step-text { color: var(--rust); }
  .step-check { font-size: 13px; color: var(--ink2); margin-left: auto; }
  .scan-hint { display: flex; flex-direction: column; gap: 3px; text-align: center; max-width: 300px; }
  .scan-hint p { font-size: 13px; color: var(--ink4); line-height: 1.55; margin: 0; }
  .scan-hint p:first-child { color: var(--ink3); }

  /* ── Results body (scrollable) ── */
  .rp-body { flex: 1; overflow-y: auto; padding: 0 0 4px; }
  .section-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink3); padding: 10px 22px 6px; }
  .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 2px 22px 14px; }

  /* ── Violation cards ── */
  .vcard { background: var(--cream2); border: 1px solid var(--sand); border-radius: var(--radius-card); padding: 0; display: flex; flex-direction: column; overflow: hidden; transition: border-color var(--t-fast), box-shadow var(--t-fast); min-width: 0; contain: paint; }
  .vcard:hover { border-color: var(--sand2); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
  .vc-thumb-link { display: block; cursor: pointer; flex-shrink: 0; }
  .vc-thumb-link:hover .vc-thumb { opacity: 0.92; }
  .vc-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; border: none; border-bottom: 1px solid var(--sand); background: var(--cream3); transition: opacity var(--t-fast); }
  .vc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .vc-info { padding: 12px 12px 8px; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .vc-domain { font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vc-domain a { color: var(--ink); text-decoration: none; }
  .vc-domain a:hover { color: var(--rust); }
  .vc-meta { font-family: var(--font-mono); font-size: 12px; color: var(--rust); line-height: 1.4; flex-shrink: 0; display: none; }
  .vc-domain-link { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vc-domain-link:hover { color: var(--rust); }
  .vc-ext-icon { flex-shrink: 0; opacity: 0.4; color: var(--ink3); }
  .vc-domain-link:hover .vc-ext-icon { opacity: 0.7; color: var(--rust); }
  .vc-actions { display: flex; padding: 0 12px 12px; }
  .btn-claim { flex: 1; padding: 8px 12px; background: var(--rust); color: var(--white); border: none; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity var(--t-fast); display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; text-decoration: none; font-family: var(--font-sans); }
  .btn-claim:hover { opacity: 0.88; }
  .btn-ignore { padding: 0; background: none; border: none; color: var(--ink4); font-size: 12px; cursor: pointer; font-family: var(--font-sans); white-space: nowrap; transition: color var(--t-fast); flex-shrink: 0; }
  .btn-ignore:hover { color: var(--ink2); }

  /* ── Smart footer ── */
  .rp-footer { flex-shrink: 0; border-top: 1px solid var(--sand); background: var(--cream); }
  .footer-focus { padding: 12px 22px; min-height: 68px; display: flex; align-items: center; gap: 12px; }
  .footer-focus-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--rust-bg); border: 1px solid rgba(200,90,42,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--rust); }
  .footer-focus-text { flex: 1; min-width: 0; }
  .footer-focus-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 1px; }
  .footer-focus-sub { font-size: 13px; color: var(--ink3); }
  .footer-done { display: flex; align-items: center; justify-content: space-between; padding: 10px 22px; min-height: 68px; }
  .footer-done-text { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--teal); font-weight: 500; }
  .btn-next { font-size: 13px; font-weight: 600; padding: 8px 18px; background: var(--ink); color: var(--white); border: none; border-radius: 8px; cursor: pointer; transition: opacity var(--t-fast); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-family: var(--font-sans); white-space: nowrap; flex-shrink: 0; }
  .btn-next:hover { opacity: 0.82; }

  /* ── Handled cards ── */
  .handled-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; padding: 2px 22px 14px; }
  .hcard { background: var(--cream); border: 1px solid var(--sand); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; opacity: 0.62; transition: opacity var(--t-fast), border-color var(--t-fast); min-width: 0; contain: paint; }
  .hcard:hover { opacity: 0.9; border-color: var(--sand2); }
  .hc-thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; border: 1px solid var(--sand); background: var(--cream3); }
  .hc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .hc-info { flex: 1; min-width: 0; overflow-wrap: break-word; }
  .hc-domain { font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 1px; word-break: break-word; overflow-wrap: break-word; }
  .hc-domain.struck { text-decoration: line-through; color: var(--ink3); }
  .hc-status { font-family: var(--font-mono); font-size: 12px; }
  .hc-status.claimed { color: var(--teal); }
  .hc-status.ignored { color: var(--ink3); }
  .hc-btn { font-size: 12px; color: var(--ink3); background: none; border: 1px solid var(--sand2); border-radius: 5px; padding: 3px 8px; cursor: pointer; white-space: nowrap; transition: all var(--t-fast); flex-shrink: 0; font-family: var(--font-sans); }
  .hc-btn:hover { border-color: var(--ink3); color: var(--ink2); }

  .clean-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--teal-d); border: 1px solid var(--teal-m); display: flex; align-items: center; justify-content: center; color: var(--teal); margin-bottom: 4px; }
  .clean-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); }
  .clean-sub { font-size: 14px; color: var(--ink3); max-width: 300px; line-height: 1.6; margin: 0; }
  /* legacy aliases */
  .clean-headline { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0; }
  .clean-meta { margin-top: 16px; }
  .clean-timestamp { font-size: 13px; font-family: var(--font-mono); color: var(--ink4); }
  .error-msg { font-size: 15px; color: var(--ink3); }

  .scan-pill-link { display: contents; }
  .scan-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 13px; font-family: var(--font-mono); font-weight: 500; }
  .scan-pill--plenty { background: var(--cream3); color: var(--ink3); }
  .scan-pill--low { background: var(--color-warning-bg); color: var(--color-warning); }
  .scan-pill--empty { background: var(--color-error-bg); color: var(--color-error); }
  .pill-dot { width: 6px; height: 6px; border-radius: 50%; }
  .pill-dot--plenty { background: var(--color-success); }
  .pill-dot--low { background: var(--color-warning); }
  .pill-dot--empty { background: var(--color-error); }

  /* ─── Modal base ─── */
  .modal-dialog { position: fixed; inset: 0; margin: auto; border: 1px solid var(--sand); border-radius: 20px; box-shadow: 0 24px 72px rgba(26,16,9,0.18), 0 4px 16px rgba(26,16,9,0.06); max-width: var(--modal-w); width: calc(100vw - 28px); background: var(--cream); padding: 0; overflow: visible; }
  .modal-dialog::backdrop { background: rgba(26,16,9,0.48); backdrop-filter: blur(4px); }
  .modal-x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border: 1px solid var(--sand); background: transparent; color: var(--ink3); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all var(--t-fast); }
  .modal-x:hover { background: var(--cream2); border-color: var(--sand2); color: var(--ink); }

  /* ─── Claim modal ─── */
  .claim-modal { position: relative; display: flex; flex-direction: column; }
  .claim-header { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--sand); }
  .claim-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--sand); background: var(--cream2); }
  .claim-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .claim-header-text { flex: 1; min-width: 0; }
  .claim-eyebrow { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust); margin-bottom: 3px; }
  .claim-site-name { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .claim-site-desc { font-size: 13px; color: var(--ink3); margin: 0; }
  .claim-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 13px; }
  .claim-info-box { background: var(--cream2); border: 1px solid var(--sand); border-radius: var(--radius-btn); padding: 11px 14px; font-size: 12px; color: var(--ink2); line-height: 1.55; display: flex; gap: 10px; align-items: flex-start; }
  .claim-info-icon { color: var(--teal); flex-shrink: 0; margin-top: 1px; }
  .claim-info-text { margin: 0; }
  .claim-fields { display: flex; flex-direction: column; gap: 12px; }
  .field-group { display: flex; flex-direction: column; gap: 5px; }
  .field-label { font-size: 12px; font-weight: 600; color: var(--ink2); letter-spacing: 0.02em; }
  .field-input { width: 100%; padding: 9px 12px; border: 1px solid var(--sand); border-radius: var(--radius-btn); font-size: 13px; background: var(--white); color: var(--ink); outline: none; font-family: var(--font-sans); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
  .field-input::placeholder { color: var(--ink4); }
  .field-input:focus { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(26,16,9,0.07); }
  .field-input--error { border-color: var(--color-error); box-shadow: 0 0 0 2px rgba(198,40,40,0.08); }
  .field-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--ink3); line-height: 1.4; }
  .field-checkbox input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--rust); margin-top: 1px; flex-shrink: 0; }
  .field-checkbox--error { color: var(--color-error); }
  .field-checkbox--error input[type="checkbox"] { outline: 1px solid var(--color-error); outline-offset: 1px; border-radius: 3px; }
  .claim-errors { font-size: 13px; color: var(--color-error); background: var(--color-error-bg); padding: 8px 12px; border-radius: var(--radius-btn); }
  .claim-footer { padding: 0 22px 16px; display: flex; flex-direction: column; gap: 8px; }
  .claim-footer-actions { display: flex; gap: 8px; align-items: center; }
  .btn-cancel { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; background: transparent; color: var(--ink3); border: 1px solid var(--sand2); border-radius: var(--radius-btn); font-size: 13px; font-weight: 500; cursor: pointer; transition: all var(--t-fast); white-space: nowrap; }
  .btn-cancel:hover { border-color: var(--ink3); color: var(--ink2); }
  .btn-submit { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; background: var(--rust); color: var(--white); border: none; border-radius: var(--radius-btn); font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity var(--t-fast); }
  .btn-submit:hover { opacity: 0.88; }
  .claim-fee-note { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--ink3); }
  .claim-fee-note svg { color: var(--teal); flex-shrink: 0; }
  .claim-dmca-note { font-size: 12px; color: var(--ink3); margin-top: -8px; line-height: 1.4; }

  /* ─── Sales modal ─── */
  .sales-modal { position: relative; }
  .sales-body { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
  .sales-limit-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rust); background: var(--rust-bg); border: 1px solid rgba(200,90,42,0.2); padding: 4px 10px; border-radius: var(--radius-pill); }
  .sales-headline { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); margin: 0; }
  .sales-headline em { color: var(--rust); font-style: italic; }
  .sales-sub { font-size: 13px; color: var(--ink3); line-height: 1.55; max-width: 300px; margin: 0; }
  .sales-money-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--teal); background: var(--teal-d); border: 1px solid var(--teal-m); padding: 5px 12px; border-radius: var(--radius-pill); }
  .sales-scans-preview { display: flex; gap: 10px; margin: 0; align-items: center; justify-content: center; }
  .ssp-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 2px solid var(--sand); flex-shrink: 0; }
  .ssp-more { width: 40px; height: 40px; border-radius: 8px; background: var(--cream2); border: 1px solid var(--sand); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink3); flex-shrink: 0; }
  .sales-summary { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
  .sales-chip { font-family: var(--font-mono); font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: var(--radius-sm); white-space: nowrap; background: var(--cream2); color: var(--ink2); border: 1px solid var(--sand); }
  .sales-email-row { display: flex; flex-direction: column; width: 100%; gap: 8px; }
  .sales-body form { align-self: stretch; width: 100%; max-width: 340px; margin-left: auto; margin-right: auto; }
  .sales-email-input { width: 100%; padding: 11px 14px; background: var(--white); border: 1px solid var(--sand); border-radius: 9px; font-size: 13px; color: var(--ink); font-family: var(--font-sans); outline: none; transition: border-color var(--t-fast); }
  .sales-email-input::placeholder { color: var(--ink4); }
  .sales-email-input:focus { border-color: var(--rust); }
  .btn-unlock { width: 100%; padding: 12px 18px; background: var(--rust); color: var(--white); border: none; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity var(--t-fast); font-family: var(--font-sans); }
  .btn-unlock:hover { opacity: 0.88; }
  .sales-trust { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink3); }
  .sales-reset-time { margin: 0; font-size: 12px; color: var(--ink4); }
  .sales-reset-time:empty { display: none; }
  .sales-submit { width: 100%; }

  .bottomnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottomnav-h); background: var(--white); border-top: 1px solid var(--sand); align-items: center; justify-content: space-around; padding: 0 16px; z-index: 100; gap: 8px; }
  .bottomnav-region--hidden { display: none; }
  .bnav-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; background: transparent; border: none; cursor: pointer; color: var(--ink3); padding: 6px 12px; border-radius: var(--radius-sm); min-width: 56px; text-decoration: none; }
  .bnav-tab--active,
  .bnav-tab:hover { color: var(--rust); }
  .bnav-label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
  .history-sheet { position: fixed; bottom: var(--bottomnav-h); left: 0; right: 0; height: calc(100dvh - var(--bottomnav-h)); background: var(--cream2); z-index: 99; transform: translateY(100%); transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1); display: flex; flex-direction: column; overflow: hidden; }
  .history-sheet--open { transform: translateY(0); }
  .hsheet-header { height: var(--topnav-h); padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sand); background: var(--white); }
  .hsheet-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
  .hsheet-close { width: 28px; height: 28px; border: none; background: transparent; color: var(--ink3); cursor: pointer; border-radius: var(--radius-sm); }
  .hsheet-close:hover { background: var(--cream3); }
  .hsheet-body { flex: 1; overflow-y: auto; padding: 8px 0; }

  .sb-body,
  .rp-body,
  .hsheet-body { scrollbar-width: thin; scrollbar-color: var(--sand2) transparent; }
  .sb-body::-webkit-scrollbar,
  .rp-body::-webkit-scrollbar,
  .hsheet-body::-webkit-scrollbar { width: 4px; }
  .sb-body::-webkit-scrollbar-track,
  .rp-body::-webkit-scrollbar-track,
  .hsheet-body::-webkit-scrollbar-track { background: transparent; }
  .sb-body::-webkit-scrollbar-thumb,
  .rp-body::-webkit-scrollbar-thumb,
  .hsheet-body::-webkit-scrollbar-thumb { background: var(--sand2); border-radius: 99px; }
  .sb-body::-webkit-scrollbar-thumb:hover,
  .rp-body::-webkit-scrollbar-thumb:hover,
  .hsheet-body::-webkit-scrollbar-thumb:hover { background: var(--ink4); }
}

@layer utilities {
  @keyframes scan-ripple {
    0% { width: 148px; height: 148px; opacity: 0.55; }
    100% { width: 320px; height: 320px; opacity: 0; }
  }
  @keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
  }
  @media (prefers-reduced-motion: reduce) {
    .scan-ring { animation: none; opacity: 0.15; }
  }
  @media (max-width: 640px) {
    .sidebar { display: none !important; }
    #bottomnav-region { display: block; }
    .bottomnav { display: flex; padding-bottom: env(safe-area-inset-bottom); }
    .app-shell { flex-direction: column; }
    .main-panel { padding-bottom: var(--bottomnav-h); }
    .cards-grid, .handled-cards { grid-template-columns: 1fr; padding: 2px 14px 12px; max-width: none; }
    .section-label { padding: 10px 14px 6px; }
    .rp-header { padding: 0 14px; }
    .rp-chips { display: none; }
    .footer-focus { padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 10px; }
    .footer-done { padding: 8px 14px; }
    .footer-focus-icon { display: none; }
    .footer-focus .btn-next { width: 100%; justify-content: center; }
    .hero-panel { padding: 24px 16px 20px; }
    .hero-copy { margin-bottom: 24px; }
    .hero-panel form { margin-bottom: 14px; }
    .hero-h1 { font-size: 26px; }
    .hero-sub { font-size: 15px; }
    .dropzone { padding: 28px 18px; border-radius: 14px; }
    .hero-trust { column-gap: 14px; row-gap: 6px; }
    .topnav--visible { display: flex; }
  }
  @media (min-width: 641px) {
    #bottomnav-region { display: none; }
  }
  @media (min-width: 900px) {
    .cards-grid, .handled-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* Screen-reader only — visually hidden but accessible */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}
