:root {
  --pv-navy: #0F172A;
  --pv-slate: #334155;
  --pv-muted: #64748B;
  --pv-border: #E2E8F0;
  --pv-bg: #F8FAFC;
  --pv-card: #FFFFFF;
  --pv-blue: #1D4ED8;
  --pv-blue-hover: #1E40AF;
  --pv-blue-soft: #EFF6FF;
  --pv-blue-border: #BFDBFE;
  --pv-emerald: #059669;
  --pv-emerald-soft: #ECFDF5;
  --pv-emerald-border: #A7F3D0;
  --pv-amber: #D97706;
  --pv-amber-soft: #FFFBEB;
  --pv-amber-border: #FDE68A;
  --pv-red: #DC2626;
  --pv-red-soft: #FEF2F2;
  --pv-red-border: #FECACA;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--pv-bg);
  color: var(--pv-navy);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================================================================
   OFFLINE TRUST BAR
   ========================================================================= */
.trust-bar {
  border-bottom: 1px solid var(--pv-border);
  padding: 7px 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.trust-bar-online {
  background: #F1F5F9;
}

.trust-bar-offline {
  background: var(--pv-emerald-soft);
  border-bottom-color: var(--pv-emerald-border);
}

.trust-bar-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid var(--pv-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--pv-slate);
  text-align: center;
}

.trust-bar-offline .trust-pill {
  background: var(--pv-emerald);
  border-color: #047857;
  color: #FFFFFF;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pv-emerald);
  flex-shrink: 0;
}

.trust-bar-offline .trust-dot {
  background: #A7F3D0;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pv-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.header-inner {
  padding-top: 13px;
  padding-bottom: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pv-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--pv-muted);
}

.tier-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
}

.tier-free {
  background: #F1F5F9;
  color: var(--pv-slate);
  border: 1px solid #CBD5E1;
}

.tier-pro {
  background: var(--pv-emerald-soft);
  color: var(--pv-emerald);
  border: 1px solid var(--pv-emerald-border);
}

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

/* =========================================================================
   WORKSPACE, CARDS & BUTTONS
   ========================================================================= */
.main-workspace {
  padding-top: 20px;
  padding-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--pv-card);
  border: 1px solid var(--pv-border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  min-width: 0;
  max-width: 100%;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pane-head {
  margin-bottom: 10px;
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.card-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--pv-muted);
  line-height: 1.45;
}

.card-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 15px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 5px 9px;
  font-size: 11.5px;
  border-radius: 7px;
}

.btn-primary,
.btn-dark {
  background: var(--pv-navy);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled),
.btn-dark:hover:not(:disabled) {
  background: #1E293B;
}

.btn-blue {
  background: var(--pv-blue);
  color: #FFFFFF;
}

.btn-blue:hover:not(:disabled) {
  background: var(--pv-blue-hover);
}

.btn-amber {
  background: var(--pv-amber);
  color: #FFFFFF;
}

.btn-amber:hover:not(:disabled) {
  background: #B45309;
}

.btn-emerald {
  background: var(--pv-emerald);
  color: #FFFFFF;
}

.btn-emerald:hover:not(:disabled) {
  background: #047857;
}

.btn-outline {
  background: #FFFFFF;
  color: var(--pv-navy);
  border-color: #CBD5E1;
}

.btn-outline:hover:not(:disabled) {
  background: #F1F5F9;
}

.btn-danger-outline {
  background: #FFFFFF;
  color: var(--pv-red);
  border-color: var(--pv-red-border);
}

.btn-danger-outline:hover:not(:disabled) {
  background: var(--pv-red-soft);
}

.pro-chip {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  flex-shrink: 0;
}

.info-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--pv-slate);
  background: #F1F5F9;
  border: 1px solid var(--pv-border);
  border-radius: 9999px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* =========================================================================
   DROP ZONE & LOADED FILE BAR
   ========================================================================= */
.drop-zone {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.drop-zone:hover,
.drop-zone.drag-active {
  border-color: var(--pv-blue);
  background: var(--pv-blue-soft);
}

.drop-zone:focus-visible {
  outline: 2px solid var(--pv-blue);
  outline-offset: 2px;
}

.drop-zone.drop-zone-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.drop-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 5px;
}

.drop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pv-navy);
}

.drop-hint {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--pv-muted);
}

.loaded-file-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pv-blue-border);
  background: var(--pv-blue-soft);
}

.loaded-file-info {
  min-width: 0;
  flex: 1 1 240px;
}

.loaded-file-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--pv-navy);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.loaded-file-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--pv-slate);
}

.alert-banner {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.alert-banner > div:first-child {
  min-width: 0;
  flex: 1 1 260px;
}

.alert-warning {
  background: var(--pv-amber-soft);
  border: 1px solid var(--pv-amber-border);
  color: #78350F;
}

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

/* =========================================================================
   2-COLUMN BLUEPRINT WORKSPACE
   ========================================================================= */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1020px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--pv-border);
}

.seg-btn {
  appearance: none;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--pv-slate);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.seg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seg-btn.active {
  background: #FFFFFF;
  color: var(--pv-navy);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.mode-note {
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #F1F5F9;
  border: 1px solid var(--pv-border);
  font-size: 11.5px;
  color: var(--pv-slate);
}

.region-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.draw-tool-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-tool {
  padding: 6px 10px;
  font-size: 11.5px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--pv-slate);
}

.btn-tool-r1.active {
  background: #DBEAFE;
  border-color: #2563EB;
  color: #1E3A8A;
}

.btn-tool-r2.active {
  background: #D1FAE5;
  border-color: #059669;
  color: #065F46;
}

.preview-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.page-nav,
.zoom-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.page-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pv-slate);
  min-width: 74px;
  text-align: center;
}

.preview-stage {
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  background: #CBD5E1;
  padding: 12px;
  min-height: 280px;
  max-height: 520px;
  display: flex;
  overflow: auto;
}

.preview-empty {
  margin: auto;
  font-size: 12.5px;
  color: var(--pv-slate);
  text-align: center;
  max-width: 400px;
}

.blueprint-stage-wrap {
  display: flex;
  margin: auto;
  max-width: 100%;
}

.blueprint-stage-wrap.zoomed {
  max-width: none;
  flex: 0 0 auto;
}

.blueprint-canvas-wrap {
  position: relative;
  display: inline-block;
  margin: auto;
  line-height: 0;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
  user-select: none;
}

.blueprint-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.blueprint-canvas-wrap.zoomed .blueprint-canvas {
  max-width: none;
}

.blueprint-interaction-layer {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}

.blueprint-interaction-layer.locked {
  cursor: not-allowed;
  pointer-events: none;
}

.region-box {
  position: absolute;
  pointer-events: none;
  border-radius: 3px;
}

.region-r1 {
  border: 2px solid #2563EB;
  background: rgba(37, 99, 235, 0.14);
}

.region-r2 {
  border: 2px solid #059669;
  background: rgba(5, 150, 105, 0.14);
}

.region-rubber {
  position: absolute;
  pointer-events: none;
  border: 2px dashed #D97706;
  background: rgba(217, 119, 6, 0.16);
  border-radius: 3px;
}

.region-tag {
  position: absolute;
  left: 0;
  top: -17px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 3px;
  color: #FFFFFF;
  white-space: nowrap;
}

.region-tag-r1 {
  background: #2563EB;
}

.region-tag-r2 {
  background: #059669;
}

.coords-strip {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coord-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.coord-r1 {
  background: #DBEAFE;
  color: #1E40AF;
}

.coord-r2 {
  background: #D1FAE5;
  color: #065F46;
}

.naming-options-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--pv-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.region2-naming-group {
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  padding: 9px 11px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sep-subrow {
  padding-left: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 480px) {
  .sep-subrow {
    padding-left: 0;
  }
}

.sep-status-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--pv-muted);
}

.field-control-pro-locked {
  border-color: var(--pv-amber-border);
  background: var(--pv-amber-soft);
  color: #92400E;
  cursor: pointer;
}

.field-label-inline {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pv-slate);
}

.field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pv-slate);
}

.field-control {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pv-navy);
  background: #FFFFFF;
}

.field-control-xs {
  width: auto;
  max-width: 100%;
  padding: 5px 8px;
  font-size: 11.5px;
}

.field-control:focus {
  outline: 2px solid var(--pv-blue);
  border-color: var(--pv-blue);
}

.field-control:disabled {
  background: #F1F5F9;
  color: var(--pv-muted);
  cursor: not-allowed;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--pv-slate);
  cursor: pointer;
}

.presets-box {
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  padding: 10px;
  background: #F8FAFC;
}

.presets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.presets-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pv-navy);
}

.presets-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.presets-controls select,
.presets-controls input {
  flex: 1 1 130px;
  min-width: 0;
}

/* =========================================================================
   RIGHT PANE: ALL-PAGE EXTRACTION TABLE
   ========================================================================= */
.stats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #F1F5F9;
  color: var(--pv-slate);
  border: 1px solid var(--pv-border);
}

.stat-warn {
  background: var(--pv-red-soft);
  color: var(--pv-red);
  border-color: var(--pv-red-border);
}

.stat-dup {
  background: var(--pv-amber-soft);
  color: #92400E;
  border-color: var(--pv-amber-border);
}

.stat-out {
  background: var(--pv-blue-soft);
  color: var(--pv-blue);
  border-color: var(--pv-blue-border);
}

.table-empty {
  padding: 40px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--pv-muted);
  border: 1px dashed var(--pv-border);
  border-radius: 10px;
  background: #F8FAFC;
}

.preview-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 760px;
  overflow: auto;
  border: 1px solid var(--pv-border);
  border-radius: 10px;
}

.preview-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.preview-table th,
.preview-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--pv-border);
  vertical-align: middle;
}

.preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F1F5F9;
  font-weight: 800;
  color: var(--pv-navy);
  white-space: nowrap;
}

.preview-table tbody tr.row-scan {
  background: #FEF2F2;
}

.preview-table tbody tr.row-dup {
  background: #FFFBEB;
}

.preview-table tbody tr.row-over-free {
  opacity: 0.72;
}

.col-page-btn {
  appearance: none;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--pv-blue);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
}

.col-page-btn:hover {
  background: var(--pv-blue-soft);
}

.inline-filename-input {
  width: 100%;
  min-width: 155px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 4px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--pv-navy);
  background: #FFFFFF;
}

.inline-filename-input:focus {
  outline: 2px solid var(--pv-blue);
  border-color: var(--pv-blue);
}

.inline-filename-input:disabled {
  background: #F1F5F9;
  color: var(--pv-muted);
}

.row-status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.status-ok {
  background: var(--pv-emerald-soft);
  color: #065F46;
  border: 1px solid var(--pv-emerald-border);
}

.status-scan {
  background: var(--pv-red-soft);
  color: #991B1B;
  border: 1px solid var(--pv-red-border);
}

.status-dup {
  background: var(--pv-amber-soft);
  color: #92400E;
  border: 1px solid var(--pv-amber-border);
}

.status-edited {
  background: var(--pv-blue-soft);
  color: #1E40AF;
  border: 1px solid var(--pv-blue-border);
}

.status-warn {
  background: var(--pv-amber-soft);
  color: #92400E;
  border: 1px solid var(--pv-amber-border);
}

/* =========================================================================
   COMPETITOR COMPARISON TABLE & ACTION BAR
   ========================================================================= */
.compare-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--pv-border);
  border-radius: 10px;
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  background: #FFFFFF;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pv-border);
  vertical-align: top;
  line-height: 1.45;
  color: var(--pv-slate);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table thead th {
  background: #F1F5F9;
  color: var(--pv-navy);
  font-weight: 800;
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--pv-navy);
  background: #F8FAFC;
  width: 20%;
}

.compare-table thead th.col-pv {
  background: var(--pv-blue);
  color: #FFFFFF;
}

.compare-table tbody td.col-pv {
  background: var(--pv-blue-soft);
  color: #1E3A8A;
  font-weight: 700;
}

.compare-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--pv-muted);
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-title {
  font-size: 14px;
  font-weight: 800;
}

.action-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--pv-muted);
}

.progress-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--pv-border);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pv-slate);
  margin-bottom: 6px;
}

.progress-track {
  height: 9px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--pv-blue);
  transition: width 0.15s ease;
}

.results-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--pv-border);
}

.result-main-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pv-emerald-border);
  background: var(--pv-emerald-soft);
}

.result-main-card > div {
  min-width: 0;
  flex: 1 1 220px;
}

.result-item-name {
  font-size: 13px;
  font-weight: 800;
  color: #065F46;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-item-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #047857;
}

.output-entries {
  margin: 10px 0 0;
  padding-left: 18px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--pv-slate);
  line-height: 1.55;
}

.result-memory-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--pv-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  background: #F8FAFC;
  overflow: hidden;
}

.faq-item[open] {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

.faq-q {
  list-style: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pv-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  font-size: 16px;
  font-weight: 800;
  color: var(--pv-blue);
  flex-shrink: 0;
}

.faq-item[open] .faq-q::after {
  content: "\2212";
}

.faq-a {
  padding: 0 14px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--pv-slate);
}

.faq-a a,
.app-footer a,
.modal-footnote a {
  color: var(--pv-blue);
  font-weight: 700;
}

.app-footer {
  border-top: 1px solid var(--pv-border);
  background: #FFFFFF;
  font-size: 12px;
  color: var(--pv-muted);
}

.footer-inner {
  padding: 15px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--pv-border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}

.modal-head {
  background: var(--pv-navy);
  color: #FFFFFF;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.35);
  color: #BFDBFE;
  border: 1px solid rgba(147, 197, 253, 0.45);
  margin-bottom: 8px;
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.modal-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #CBD5E1;
}

.modal-close {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: #FFFFFF;
}

.modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pro-features {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pv-slate);
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-cta {
  width: 100%;
  padding: 12px 16px;
}

.checkout-note {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--pv-muted);
}

.checkout-feedback {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--pv-amber-soft);
  border: 1px solid var(--pv-amber-border);
  color: #92400E;
  font-size: 12px;
  font-weight: 600;
}

.license-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pv-muted);
}

.license-divider::before,
.license-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pv-border);
}

.license-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.license-input-row {
  display: flex;
  gap: 8px;
}

@media (max-width: 480px) {
  .license-input-row {
    flex-direction: column;
  }
}

.license-feedback {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.license-feedback-ok {
  background: var(--pv-emerald-soft);
  border: 1px solid var(--pv-emerald-border);
  color: #065F46;
}

.license-feedback-warn {
  background: var(--pv-amber-soft);
  border: 1px solid var(--pv-amber-border);
  color: #92400E;
}

.license-feedback-error {
  background: var(--pv-red-soft);
  border: 1px solid var(--pv-red-border);
  color: #991B1B;
}

.pro-active-box {
  background: var(--pv-emerald-soft);
  border: 1px solid var(--pv-emerald-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pro-active-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #065F46;
}

.pro-active-key {
  font-size: 12px;
  color: #047857;
}

.license-key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #FFFFFF;
  border: 1px solid var(--pv-emerald-border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--pv-navy);
  font-weight: 700;
}

.pro-active-note {
  margin: 0;
  font-size: 11.5px;
  color: #047857;
}

.modal-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-footnote {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--pv-muted);
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  background: var(--pv-navy);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  border-left: 4px solid #10B981;
}

.toast-warning {
  border-left-color: #F59E0B;
}

.toast-error {
  border-left-color: #EF4444;
}
