/* ═══════════════════════════════════════════════════════════
   小程序上线助手 — 暗黑科技风主题
   ═══════════════════════════════════════════════════════════ */

/* ========== CSS Variables ========== */
:root {
  --bg: #0a0a14;
  --bg-secondary: #111122;
  --card: #151530;
  --card-hover: #1c1c3a;
  --card2: #0f0f24;
  --text: #e8e8f0;
  --text-secondary: #9494b8;
  --text-muted: #666688;
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.12);

  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.25);
  --pink: #ec4899;
  --pink-glow: rgba(236, 72, 153, 0.2);

  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.3);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", monospace;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-secondary: #ebebf5;
  --card: #ffffff;
  --card-hover: #f8f8fd;
  --card2: #f0f0f8;
  --text: #1a1a2e;
  --text-secondary: #666688;
  --text-muted: #9999bb;
  --border: rgba(0, 0, 0, 0.06);
  --border-active: rgba(0, 0, 0, 0.12);
  --accent-glow: rgba(124, 58, 237, 0.1);
  --pink-glow: rgba(236, 72, 153, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.08);
  --error-bg: rgba(239, 68, 68, 0.06);
  --warning-bg: rgba(245, 158, 11, 0.06);
  --info-bg: rgba(59, 130, 246, 0.06);
  --success-bg: rgba(16, 185, 129, 0.06);
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

/* ========== Background Effects ========== */
.bg-glow {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, var(--pink-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

.bg-particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}

.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent-light);
  border-radius: 50%;
  opacity: 0.15;
  animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.1; }
  25% { transform: translateY(-40px) translateX(15px); opacity: 0.25; }
  50% { transform: translateY(-20px) translateX(-10px); opacity: 0.15; }
  75% { transform: translateY(-60px) translateX(-20px); opacity: 0.2; }
}

/* ========== Global Header ========== */
.global-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .global-header {
  background: rgba(245, 245, 250, 0.85);
}

.header-logo {
  font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px;
}

.header-actions { display: flex; gap: 4px; }

.header-btn {
  width: 36px; height: 36px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}

.header-btn:hover { background: var(--card); color: var(--text); }

/* ========== Screen Container ========== */
.screen {
  display: none; position: relative; z-index: 1;
  min-height: 100dvh; padding: 72px 20px 40px;
  animation: screenIn 0.35s ease-out;
}

.screen.active {
  display: flex; flex-direction: column; align-items: center;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-wrap {
  width: 100%; max-width: 600px;
}

/* ========== Hero Screen ========== */
.hero-section { justify-content: center; text-align: center; }

.hero-icon {
  font-size: 72px; margin-bottom: 16px;
  animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-title {
  font-size: 32px; font-weight: 900; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-light), var(--pink), var(--accent-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.7;
}

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px;
}

.hero-tag {
  font-size: 12px; padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--card); color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-hero {
  display: block; width: 100%; max-width: 320px; margin: 0 auto 12px;
  padding: 16px 32px; border: none; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
  font-family: inherit;
}

.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124, 58, 237, 0.45); }
.btn-hero:active { transform: scale(0.97); }

.btn-hero-secondary {
  display: block; width: 100%; max-width: 320px; margin: 0 auto;
  padding: 12px 32px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); color: var(--text-secondary); font-size: 14px; cursor: pointer;
  transition: all var(--transition); font-family: inherit;
}

.btn-hero-secondary:hover { background: var(--card-hover); color: var(--text); border-color: var(--border-active); }

/* ========== Step Indicator ========== */
.steps {
  display: flex; align-items: center; justify-content: center; margin-bottom: 28px; gap: 0;
}

.step-item {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted);
  font-weight: 600; transition: color var(--transition);
}

.step-item.active { color: var(--accent-light); }
.step-item.done { color: var(--accent); }

.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; transition: all var(--transition);
}

.step-item.active .step-dot {
  background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}

.step-item.done .step-dot { background: var(--accent); color: #fff; }

.step-line {
  width: 48px; height: 2px; background: rgba(255, 255, 255, 0.06);
  margin: 0 8px; transition: background var(--transition);
}

.step-line.active { background: var(--accent); }

/* ========== Form ========== */
.form-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 28px 24px;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block; font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}

.form-label .required { color: var(--pink); margin-left: 2px; }

/* Category Grid */
.category-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}

@media (min-width: 500px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: var(--radius-md);
  background: var(--card2); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition); text-align: center;
}

.cat-item:hover { border-color: var(--border-active); background: var(--card-hover); transform: translateY(-1px); }

.cat-item.selected {
  border-color: var(--accent); background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 20px var(--accent-glow);
}

.cat-icon { font-size: 28px; }
.cat-name { font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.cat-item.selected .cat-name { color: var(--accent-light); }

/* Description textarea */
.desc-input {
  width: 100%; min-height: 120px; padding: 14px 16px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--card2); color: var(--text); font-size: 14px;
  font-family: inherit; line-height: 1.7; resize: vertical;
  outline: none; transition: border-color var(--transition);
}

.desc-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.desc-input::placeholder { color: var(--text-muted); }

.char-count { text-align: right; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.char-count.warn { color: var(--warning); }

/* Smart detection tags */
.smart-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 10px 0 0; min-height: 28px; font-size: 12px;
}

.smart-tag-label { color: var(--text-muted); }

.smart-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(124, 58, 237, 0.12); color: var(--accent-light);
  border: 1px solid rgba(124, 58, 237, 0.25); font-size: 11px; font-weight: 600;
}

/* UGC toggle */
.ugc-toggle { margin-top: 6px; }

.toggle-buttons { display: flex; gap: 8px; margin-top: 8px; }

.toggle-btn {
  flex: 1; padding: 10px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--card2);
  color: var(--text-secondary); font-size: 14px; cursor: pointer;
  text-align: center; transition: all var(--transition); font-family: inherit;
}

.toggle-btn:hover { border-color: var(--border-active); }
.toggle-btn.active { border-color: var(--accent); background: rgba(124, 58, 237, 0.12); color: var(--accent-light); font-weight: 700; }

/* Submit button */
.btn-submit {
  width: 100%; padding: 14px; margin-top: 6px;
  border: none; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.3);
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4); }
.btn-submit:active:not(:disabled) { transform: scale(0.97); }
.btn-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* ========== Loading Screen ========== */
.loading-section { justify-content: center; text-align: center; }

.loading-icon {
  font-size: 48px; margin-bottom: 24px;
  animation: heroFloat 2s ease-in-out infinite;
}

.loading-progress-wrap {
  width: 240px; height: 3px; background: rgba(255, 255, 255, 0.06);
  border-radius: 2px; margin: 24px auto; overflow: hidden;
}

.loading-progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  width: 0%; transition: width 0.4s ease;
}

.loading-text {
  font-size: 14px; color: var(--text-secondary); min-height: 20px; transition: opacity 0.3s;
}

/* ========== Results Screen ========== */
/* Result Banner */
.result-banner {
  text-align: center; padding: 24px; border-radius: var(--radius-lg); margin-bottom: 20px;
  border: 1px solid;
}

.result-banner.pass {
  background: var(--success-bg); border-color: rgba(16, 185, 129, 0.25);
}

.result-banner.warn {
  background: var(--warning-bg); border-color: var(--warning-border);
}

.result-banner.fail {
  background: var(--error-bg); border-color: var(--error-border);
}

.banner-emoji { font-size: 48px; margin-bottom: 8px; }
.banner-heading { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.banner-sub { font-size: 13px; color: var(--text-secondary); }

/* Stats Cards */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px;
}

.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 8px; text-align: center; cursor: pointer; transition: all var(--transition);
}

.stat-card:hover { border-color: var(--border-active); transform: translateY(-1px); }

.stat-card.active { border-color: var(--accent); }

.stat-num { display: block; font-size: 32px; font-weight: 900; line-height: 1; margin-bottom: 4px; }

.stat-card.error .stat-num { color: var(--error); }
.stat-card.warning .stat-num { color: var(--warning); }
.stat-card.info .stat-num { color: var(--info); }
.stat-card.total .stat-num { color: var(--accent-light); }

.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* Radar Chart */
.radar-section {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; margin-bottom: 20px;
}

.radar-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 16px; text-align: center; }

.radar-chart {
  display: block; width: 100%; max-width: 280px; margin: 0 auto;
}

/* Filter Tabs */
.filter-tabs {
  display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  flex-shrink: 0; padding: 7px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--card);
  color: var(--text-secondary); font-size: 12px; cursor: pointer;
  transition: all var(--transition); font-family: inherit; font-weight: 600;
}

.filter-tab:hover { border-color: var(--border-active); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.filter-tab .count { margin-left: 2px; opacity: 0.7; font-size: 10px; }

/* Expand Controls */
.expand-controls {
  display: flex; gap: 8px; margin-bottom: 14px;
}

.expand-btn {
  font-size: 12px; padding: 4px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
  font-family: inherit;
}

.expand-btn:hover { border-color: var(--border-active); color: var(--text); }

/* Check Card */
.check-list { display: flex; flex-direction: column; gap: 10px; }

.check-card {
  background: var(--card); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); border-left: 3px solid var(--info);
  transition: all var(--transition);
  animation: cardSlideIn 0.4s ease-out both;
}

.check-card.error { border-left-color: var(--error); }
.check-card.warning { border-left-color: var(--warning); }
.check-card.info { border-left-color: var(--info); }

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  display: flex; align-items: center; padding: 14px 16px; gap: 10px; cursor: pointer;
  user-select: none;
}

.severity-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full);
  flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.5px;
}

.severity-badge.error { background: var(--error-bg); color: var(--error); }
.severity-badge.warning { background: var(--warning-bg); color: var(--warning); }
.severity-badge.info { background: var(--info-bg); color: var(--info); }

.card-title {
  flex: 1; font-size: 13px; color: var(--text); font-weight: 600; line-height: 1.5;
}

.dimension-tag {
  font-size: 10px; padding: 2px 6px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04); color: var(--text-muted); flex-shrink: 0;
}

.expand-icon {
  font-size: 10px; color: var(--text-muted); flex-shrink: 0; transition: transform var(--transition);
}

.check-card.expanded .expand-icon { transform: rotate(180deg); }

.card-body {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
}

.check-card.expanded .card-body { max-height: 600px; }

.card-body-inner {
  padding: 0 16px 16px; border-top: 1px solid var(--border);
}

.body-row {
  margin-top: 14px; display: flex; gap: 8px; line-height: 1.6;
}

.body-label { font-size: 12px; color: var(--text); font-weight: 600; flex-shrink: 0; }

.body-text { font-size: 12px; color: var(--text-secondary); flex: 1; }

.card-actions {
  margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px;
}

.btn-confirm, .btn-detail {
  font-size: 12px; padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
  font-family: inherit; display: inline-flex; align-items: center; gap: 4px;
}

.btn-confirm:hover, .btn-detail:hover { border-color: var(--border-active); color: var(--text); }

.btn-confirm.confirmed {
  background: rgba(16, 185, 129, 0.1); border-color: var(--success); color: var(--success); font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center; padding: 60px 20px; display: none;
}

.empty-state.show { display: block; }

.empty-emoji { font-size: 56px; margin-bottom: 16px; }

.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

.empty-sub { font-size: 13px; color: var(--text-secondary); }

/* Action Bar */
.action-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-bottom: 20px;
}

.btn-action {
  flex: 1; min-width: 120px; padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 13px; cursor: pointer; transition: all var(--transition);
  font-family: inherit; font-weight: 600; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.btn-action:hover { border-color: var(--border-active); background: var(--card-hover); }

.btn-action.primary {
  background: linear-gradient(135deg, var(--accent), var(--pink)); border: none; color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-action.primary:hover { box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4); transform: translateY(-1px); }

/* ========== History Screen ========== */
.history-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
}

.history-header h2 { font-size: 18px; font-weight: 800; }

.btn-text {
  font-size: 13px; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}

.btn-text:hover { border-color: var(--border-active); color: var(--text); }
.btn-text.danger:hover { border-color: var(--error); color: var(--error); }

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

.history-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; cursor: pointer; transition: all var(--transition);
}

.history-card:hover { border-color: var(--border-active); background: var(--card-hover); transform: translateY(-1px); }

.history-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.history-category { font-size: 12px; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--card2); color: var(--accent-light); font-weight: 600; }

.history-time { font-size: 11px; color: var(--text-muted); }

.history-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.history-stats { display: flex; gap: 12px; font-size: 11px; }

.history-stat { display: flex; align-items: center; gap: 3px; font-weight: 600; }
.history-stat.e { color: var(--error); }
.history-stat.w { color: var(--warning); }
.history-stat.i { color: var(--info); }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; align-items: center; padding: 20px; gap: 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 1;
}

.modal-title { flex: 1; font-size: 15px; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}

.modal-close:hover { border-color: var(--border-active); color: var(--text); background: var(--card-hover); }

.modal-body { padding: 20px; }

.modal-section { margin-bottom: 16px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-section p, .modal-section a { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.modal-section a { color: var(--accent-light); text-decoration: none; }
.modal-section a:hover { text-decoration: underline; }

.modal-footer {
  padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px;
  position: sticky; bottom: 0; background: var(--card);
}

.modal-footer .btn-confirm { padding: 8px 20px; font-size: 13px; }

/* ========== Confetti Canvas ========== */
#confetti-canvas {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; display: none;
}

/* ========== Toast ========== */
#toast-container {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 400;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-full);
  background: var(--card); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-10px); transition: all 0.3s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.toast-success { border-color: rgba(16, 185, 129, 0.3); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-color: var(--error-border); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning { border-color: var(--warning-border); }
.toast-warning .toast-icon { color: var(--warning); }

/* ========== Footer ========== */
.app-footer {
  text-align: center; padding: 32px 20px; margin-top: 20px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
}

.app-footer a {
  color: var(--accent-light); text-decoration: none; font-weight: 600;
}

.app-footer a:hover { text-decoration: underline; }

/* ========== Responsive ========== */
@media (max-width: 420px) {
  .hero-title { font-size: 26px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .btn-action { min-width: 100px; font-size: 12px; }
  .action-bar { flex-direction: column; }
}

/* ========== Print Styles ========== */
@media print {
  .global-header, .bg-glow, .bg-particles, #confetti-canvas, #toast-container,
  .action-bar, .filter-tabs, .expand-controls, .card-actions, .btn-confirm, .btn-detail,
  .app-footer { display: none !important; }

  body { background: #fff; color: #000; font-size: 12px; }
  .screen { display: block !important; padding: 0; }
  .screen.active { display: block !important; }
  .screen-wrap { max-width: 100%; }

  .check-card { border: 1px solid #ccc; break-inside: avoid; margin-bottom: 8px; }
  .check-card.expanded .card-body { max-height: none !important; }
  .card-header { cursor: default; }
  .result-banner { border: 1px solid #ccc; }

  .stat-card { border: 1px solid #ccc; }
  .stat-card .stat-num { color: #000 !important; }

  .radar-section { border: 1px solid #ccc; }

  /* Show report header */
  body::before {
    content: '小程序上线助手 — 审核自查报告';
    display: block; font-size: 20px; font-weight: bold; margin-bottom: 16px; text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   v2 — Upload / Scan / Code Viewer
   ═══════════════════════════════════════════════════════════ */

/* ========== Hero Actions Row ========== */
.hero-actions-row {
  display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap;
}

.btn-hero-secondary {
  background: var(--card); color: var(--text-secondary); border: 1px solid var(--border);
  padding: 10px 22px; border-radius: var(--radius-full); font-size: 14px;
  cursor: pointer; transition: all var(--transition);
}
.btn-hero-secondary:hover {
  background: var(--card-hover); color: var(--text); border-color: var(--border-active);
}

/* ========== Screen Wrap Wide ========== */
.screen-wrap-wide {
  max-width: 1200px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 60px 40px; text-align: center; cursor: pointer;
  transition: all var(--transition); position: relative;
  background: var(--card2);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: rgba(124, 58, 237, 0.06);
  box-shadow: 0 0 40px var(--accent-glow);
}
.drop-zone.drag-over {
  border-color: var(--accent-light); background: rgba(124, 58, 237, 0.1);
}
.drop-icon { font-size: 52px; margin-bottom: 16px; }
.drop-title {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.drop-sub {
  font-size: 14px; color: var(--text-secondary); margin-bottom: 12px;
}
.drop-hint {
  font-size: 12px; color: var(--text-muted);
}

.file-input-hidden {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}

/* Security Notice */
.security-notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; margin: 16px 0;
  background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
}
.security-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.security-text strong {
  display: block; font-size: 14px; color: var(--success); margin-bottom: 4px;
}
.security-text p {
  font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 0;
}
.security-badge-inline {
  display: inline-block; padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full); font-size: 11px; color: var(--success);
}

/* File Info */
.file-info {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.file-info-icon { font-size: 24px; }
.file-info-text { flex: 1; }
.file-info-text span { display: block; }
.file-info-text span:first-child { font-weight: 600; color: var(--text); font-size: 14px; word-break: break-all; }
.file-info-text span:last-child { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.file-info .btn-text { flex-shrink: 0; }

/* Back to upload link */
.back-to-upload {
  display: block; margin-bottom: 16px; font-size: 13px; color: var(--accent-light);
  text-decoration: none; cursor: pointer; font-weight: 500;
}
.back-to-upload:hover { text-decoration: underline; }

/* ========== Scanning Screen ========== */
.scanning-status { padding: 40px 20px; }
.scanning-animation {
  position: relative; width: 80px; height: 80px; margin: 24px auto;
}
.scanning-ring {
  position: absolute; inset: 0;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
.scanning-pulse {
  position: absolute; inset: 8px;
  border: 2px solid rgba(124, 58, 237, 0.3); border-radius: 50%;
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}
.scanning-text {
  font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 20px;
}
.scanning-progress-wrap {
  width: 100%; max-width: 400px; height: 4px; margin: 0 auto 16px;
  background: var(--card); border-radius: var(--radius-full); overflow: hidden;
}
.scanning-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-full); transition: width 0.3s ease;
}
.scanning-sub { font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.scanning-icon { font-size: 40px; animation: bounce 1s ease infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========== Project Info Bar ========== */
.project-info-bar {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  padding: 10px 16px; margin-bottom: 12px;
  background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 12px; color: var(--text-secondary);
}
.project-info-bar span {
  display: inline-flex; align-items: center; gap: 4px;
}

/* ========== Split Pane ========== */
.split-pane {
  display: flex; gap: 0; margin-top: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; min-height: 500px; max-height: 70vh;
}

.split-left {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--card);
}
.split-left-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.split-left-header .expand-controls { gap: 6px; }
.split-left-header .expand-btn { padding: 3px 10px; font-size: 11px; }

.findings-list {
  display: block;
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
}

.split-right {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  border-left: 1px solid var(--border); background: #0d0d1a;
}
[data-theme="light"] .split-right { background: #f8f8fc; }
.split-right-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.code-viewer-filename {
  font-size: 12px; color: var(--text-muted);
  font-family: var(--font-mono); max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-viewer-container {
  flex: 1; overflow: hidden; position: relative;
}
.code-viewer-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: 14px; gap: 12px;
}
.placeholder-icon { font-size: 40px; opacity: 0.5; }

/* Finding Item */
.finding-item {
  display: flex; align-items: stretch; gap: 10px;
  width: 100%; min-width: 0; box-sizing: border-box;
  padding: 10px 12px; margin-bottom: 4px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  animation: cardSlideIn 0.35s ease both;
}
.finding-item:hover {
  background: var(--card-hover); border-color: var(--border-active);
}
.finding-item.active {
  background: rgba(124, 58, 237, 0.08); border-color: var(--accent);
}
.finding-item.confirmed { opacity: 0.6; }
.finding-left-bar {
  width: 3px; border-radius: 2px; flex-shrink: 0;
  background: var(--text-muted);
}
.finding-item.error .finding-left-bar { background: var(--error); }
.finding-item.warning .finding-left-bar { background: var(--warning); }
.finding-item.info .finding-left-bar { background: var(--info); }

.finding-content { flex: 1 1 auto; width: 0; min-width: 0; }
.finding-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  min-width: 0;
}
.finding-sev {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  flex-shrink: 0; text-transform: uppercase;
}
.finding-sev.error { background: var(--error-bg); color: var(--error); }
.finding-sev.warning { background: var(--warning-bg); color: var(--warning); }
.finding-sev.info { background: var(--info-bg); color: var(--info); }
.finding-title {
  min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4;
  overflow-wrap: anywhere;
}
.finding-count {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--border-active);
  border-radius: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.finding-meta {
  display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-muted);
  min-width: 0;
}
.finding-location {
  font-family: var(--font-mono); color: var(--accent-light); cursor: pointer;
  min-width: 0; overflow-wrap: anywhere;
}
.finding-location:hover { text-decoration: underline; }
.finding-suggestion {
  margin-top: 4px; font-size: 11px; color: var(--text-secondary); line-height: 1.5;
  overflow-wrap: anywhere;
}
.finding-occurrences {
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.finding-occurrence {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}
.finding-occurrence:hover {
  background: var(--card-hover);
  color: var(--text);
}
.finding-occurrence:nth-child(n+4) {
  display: none;
}
.finding-item.expanded .finding-occurrences {
  max-height: 260px;
  overflow-y: auto;
}
.finding-item.expanded .finding-occurrence {
  display: grid;
}
.occurrence-index {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}
.occurrence-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.occurrence-location {
  overflow: hidden;
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occurrence-title {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occurrence-arrow {
  color: var(--text-muted);
  text-align: center;
}
.occurrence-toggle {
  margin-top: 6px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--accent-light);
  font-size: 10px;
  cursor: pointer;
}
.occurrence-toggle:hover {
  text-decoration: underline;
}
.finding-actions {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0;
}
.confirm-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border-active); background: transparent;
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); font-family: var(--font-sans);
}
.confirm-dot.active {
  background: var(--success); border-color: var(--success); color: #fff;
}
.detail-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 2px 6px;
}
.detail-btn:hover { color: var(--accent-light); }

/* ========== Code Viewer ========== */
.code-snippet-view {
  margin: 0; padding: 16px;
  background: var(--card2); color: var(--text);
  font-size: 12px; font-family: var(--font-mono); line-height: 1.7;
  overflow: auto; white-space: pre; height: 100%;
}

.native-code-view {
  min-width: 100%;
  width: max-content;
  padding: 12px 0;
  color: var(--text-primary);
  font: 13px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.native-code-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 22px;
  white-space: pre;
}

.native-code-line.highlighted {
  background: rgba(239, 68, 68, 0.14);
  box-shadow: inset 3px 0 0 var(--error);
}

.native-code-number {
  padding-right: 14px;
  color: var(--text-muted);
  text-align: right;
  user-select: none;
}

.native-code-line code {
  padding-right: 24px;
  color: inherit;
  font: inherit;
}

/* Monaco highlight */
.monaco-highlight-line {
  background: rgba(239, 68, 68, 0.15) !important;
}
.monaco-highlight-glyph {
  background: var(--error); width: 4px !important;
  margin-left: 3px; border-radius: 2px;
}

/* Modal code */
.modal-code {
  background: var(--card2); color: var(--text);
  font-size: 12px; font-family: var(--font-mono); padding: 12px 16px;
  border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap;
  line-height: 1.6; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border);
}

/* ========== Packaging Guide ========== */
.pack-guide {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
}
.pack-guide-header {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 18px 0;
}
.pack-guide-title {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.pack-guide-sub {
  font-size: 12px; color: var(--text-muted);
}
.pack-guide-cols {
  display: flex; gap: 0; padding: 12px 18px;
}
.pack-col {
  flex: 1; min-width: 0;
}
.pack-col-title {
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.pack-mark { font-size: 14px; }
.pack-include .pack-col-title { color: #22c55e; }
.pack-exclude .pack-col-title { color: #ef4444; }

.pack-list {
  list-style: none; margin: 0; padding: 0;
}
.pack-list li {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; font-size: 12px; line-height: 1.6;
}
.pack-list .pack-icon {
  font-size: 13px; flex-shrink: 0; width: 22px; text-align: center;
}
.pack-list code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--card2); padding: 1px 6px;
  border-radius: 3px; color: var(--accent-light);
  flex-shrink: 0;
}
.pack-list .pack-desc {
  color: var(--text-muted); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pack-guide-tip {
  padding: 10px 18px 14px;
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  background: var(--card2);
}
.pack-guide-tip strong { color: var(--text); }

/* ========== Responsive Updates ========== */
@media (max-width: 768px) {
  .split-pane { flex-direction: column; max-height: none; }
  .split-right { border-left: none; border-top: 1px solid var(--border); min-height: 300px; }
  .screen-wrap-wide { max-width: 100%; }
  .drop-zone { padding: 40px 20px; }
  .hero-actions-row { flex-direction: column; align-items: center; }
  .pack-guide-cols { flex-direction: column; gap: 12px; }
  .pack-list .pack-desc { white-space: normal; }
}

@media (max-width: 420px) {
  .drop-title { font-size: 15px; }
  .finding-title { font-size: 12px; }
  .finding-actions { flex-direction: row; }
}

/* ==========================================================================
   v3 — Professional review workspace
   ========================================================================== */

:root {
  --bg: #0e1116;
  --bg-secondary: #12171e;
  --card: #151b23;
  --card-hover: #1a222c;
  --card2: #10151b;
  --text: #f2f5f7;
  --text-secondary: #a9b2bd;
  --text-muted: #6f7a86;
  --border: #252e38;
  --border-active: #394552;
  --accent: #2ebd85;
  --accent-light: #54d9a6;
  --accent-glow: rgba(46, 189, 133, 0.14);
  --pink: #2ebd85;
  --pink-glow: transparent;
  --error: #f97066;
  --error-bg: rgba(249, 112, 102, 0.1);
  --error-border: rgba(249, 112, 102, 0.28);
  --warning: #f7b955;
  --warning-bg: rgba(247, 185, 85, 0.1);
  --warning-border: rgba(247, 185, 85, 0.28);
  --info: #64b5f6;
  --info-bg: rgba(100, 181, 246, 0.1);
  --info-border: rgba(100, 181, 246, 0.28);
  --success: #32d583;
  --success-bg: rgba(50, 213, 131, 0.09);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 0 3px var(--accent-glow);
  --transition: 0.18s ease;
}

[data-theme="light"] {
  --bg: #f5f7f9;
  --bg-secondary: #eef1f4;
  --card: #ffffff;
  --card-hover: #f7f9fa;
  --card2: #f3f5f7;
  --text: #17202a;
  --text-secondary: #56616d;
  --text-muted: #89939e;
  --border: #dce2e7;
  --border-active: #bcc6cf;
  --accent: #168b63;
  --accent-light: #137957;
  --accent-glow: rgba(22, 139, 99, 0.12);
  --pink: #168b63;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  letter-spacing: 0;
}

button,
textarea,
input {
  letter-spacing: 0;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
textarea:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bg-glow,
.bg-particles {
  display: none;
}

.global-header {
  height: 64px;
  padding: 0 28px;
  background: rgba(14, 17, 22, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .global-header {
  background: rgba(255, 255, 255, 0.92);
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(50, 213, 131, 0.45);
  border-radius: 6px;
  background: rgba(50, 213, 131, 0.1);
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 800;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 13px;
  font-weight: 700;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.header-actions {
  align-items: center;
  gap: 8px;
}

.local-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(50, 213, 131, 0.1);
}

.header-btn {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.header-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.header-glyph {
  font-size: 17px;
  line-height: 1;
}

.header-btn:hover {
  border-color: var(--border);
  background: var(--card);
}

.header-btn-with-label {
  width: auto;
  padding: 0 10px;
  gap: 6px;
}

.screen {
  min-height: calc(100dvh - 64px);
  padding: 96px 24px 48px;
  animation: screenIn 0.24s ease-out;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-wrap {
  max-width: 760px;
}

.screen-wrap-wide {
  max-width: 1240px;
}

.upload-workspace {
  max-width: 900px;
}

.upload-workspace > .steps {
  margin-bottom: 16px;
}

.workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.workspace-heading h1 {
  margin: 6px 0 7px;
  color: var(--text);
  font-size: 25px;
  font-weight: 720;
  line-height: 1.25;
}

.workspace-heading p {
  color: var(--text-secondary);
  font-size: 13px;
}

.eyebrow {
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.rule-coverage {
  display: flex;
  flex-direction: column;
  min-width: 112px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.rule-coverage strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.rule-coverage span {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

.steps {
  justify-content: flex-start;
  margin-bottom: 24px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card2);
}

.step-item {
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
}

.step-item.active {
  color: var(--text);
}

.step-item.done {
  color: var(--success);
}

.step-dot {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 10px;
}

.step-item.active .step-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: none;
}

.step-item.done .step-dot {
  background: var(--success);
}

.step-line {
  flex: 0 1 72px;
  height: 1px;
  background: var(--border);
}

.drop-zone {
  display: flex;
  min-height: 278px;
  padding: 44px 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-active);
  border-radius: 8px;
  background: var(--card);
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  pointer-events: none;
  transition: border-color var(--transition);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--card-hover);
  box-shadow: none;
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  border-color: rgba(50, 213, 131, 0.16);
}

.drop-icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card2);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.drop-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.drop-title {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 680;
}

.drop-sub {
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 12px;
}

.drop-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.drop-hint span {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.pack-guide {
  margin: 12px 0;
  border-radius: 6px;
  background: var(--card);
}

.pack-guide-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.pack-guide-header::-webkit-details-marker {
  display: none;
}

.pack-guide-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pack-guide-title svg,
.pack-guide-chevron {
  width: 15px;
  height: 15px;
}

.pack-guide-title svg {
  color: var(--accent-light);
}

.pack-guide-sub {
  font-size: 11px;
}

.pack-guide-chevron {
  display: block;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--text-muted);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform var(--transition), color var(--transition);
}

.pack-guide[open] .pack-guide-chevron {
  color: var(--text-secondary);
  transform: rotate(45deg);
}

.pack-guide-cols {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.pack-col + .pack-col {
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.pack-col-title {
  color: var(--text) !important;
  font-size: 12px;
}

.pack-mark {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.pack-include .pack-mark {
  border-color: rgba(50, 213, 131, 0.3);
  color: var(--success);
}

.pack-exclude .pack-mark {
  border-color: rgba(249, 112, 102, 0.3);
  color: var(--error);
}

.pack-guide-tip {
  background: var(--card2);
  font-size: 11px;
}

.security-notice {
  margin: 12px 0;
  padding: 13px 15px;
  border-color: rgba(50, 213, 131, 0.18);
  border-radius: 6px;
  background: rgba(50, 213, 131, 0.05);
}

.security-icon {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(50, 213, 131, 0.28);
  border-radius: 50%;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.security-icon svg {
  width: 17px;
  height: 17px;
}

.security-text strong {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 12px;
}

.security-text p {
  color: var(--text-muted);
  font-size: 11px;
}

.file-info {
  margin-bottom: 12px;
  border-radius: 6px;
}

.btn-submit,
.btn-hero {
  border: 1px solid #3fd69b;
  border-radius: 6px;
  background: var(--accent);
  color: #07120e;
  box-shadow: none;
  font-weight: 720;
}

.btn-submit {
  min-height: 46px;
  margin-top: 12px;
  padding: 12px 18px;
  font-size: 13px;
}

.btn-submit:hover:not(:disabled),
.btn-hero:hover {
  background: var(--accent-light);
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  border-color: var(--border);
  background: var(--card);
  color: var(--text-muted);
  opacity: 1;
}

.hero-section {
  justify-content: center;
}

.hero-section .screen-wrap {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
}

.hero-icon {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  border: 1px solid rgba(50, 213, 131, 0.32);
  border-radius: 8px;
  background: rgba(50, 213, 131, 0.08);
  color: var(--accent-light);
  font-size: 25px;
  font-weight: 500;
  animation: none;
}

.hero-icon svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.6;
}

.hero-title {
  margin-bottom: 14px;
  background: none;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
  font-size: 38px;
  font-weight: 760;
}

.hero-subtitle {
  max-width: 610px;
  margin: 0 auto 28px;
  font-size: 14px;
  line-height: 1.8;
}

.hero-stats {
  margin-bottom: 32px;
  gap: 0;
}

.hero-tag {
  padding: 4px 18px;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
}

.hero-tag:last-child {
  border-right: 0;
}

.hero-tag strong {
  color: var(--text);
}

.btn-hero {
  display: inline-flex;
  width: auto;
  min-width: 230px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  font-size: 14px;
}

.btn-hero svg {
  width: 17px;
  height: 17px;
}

.hero-actions-row {
  margin-top: 12px;
}

.btn-hero-secondary,
.btn-text,
.expand-btn,
.btn-action,
.btn-confirm,
.btn-detail {
  border-radius: 5px;
  background: transparent;
}

.btn-hero-secondary {
  width: auto;
  margin: 0;
  padding: 8px 13px;
  border-color: transparent;
  font-size: 11px;
}

.form-card {
  padding: 28px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-label {
  font-size: 12px;
}

.cat-item {
  border-radius: 6px;
}

.cat-item:hover {
  transform: none;
}

.cat-item.selected,
.toggle-btn.active {
  border-color: var(--accent);
  background: rgba(50, 213, 131, 0.08);
  box-shadow: none;
}

.cat-item.selected .cat-name,
.smart-tag {
  color: var(--accent-light);
}

.desc-input {
  border-radius: 6px;
  background: var(--card2);
}

.desc-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.smart-tag {
  border-color: rgba(50, 213, 131, 0.22);
  border-radius: 4px;
  background: rgba(50, 213, 131, 0.08);
}

.toggle-btn {
  border-radius: 6px;
}

.result-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  padding: 18px 20px;
  text-align: left;
}

.banner-emoji {
  grid-row: 1 / 3;
  align-self: center;
  margin: 0;
  font-size: 28px;
}

.banner-heading {
  font-size: 15px;
}

.stats-row {
  gap: 8px;
}

.stat-card {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 6px;
  text-align: left;
}

.stat-card:hover {
  background: var(--card-hover);
  transform: none;
}

.stat-card.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.stat-num {
  margin: 0;
  font-size: 25px;
}

.stat-label {
  font-size: 10px;
}

.project-info-bar,
.radar-section,
.split-pane,
.check-card,
.history-card,
.modal-content {
  border-radius: 6px;
}

.radar-section {
  padding: 16px;
}

[data-theme="light"] .radar-section {
  border-color: var(--border-active);
  box-shadow: inset 0 0 0 1px rgba(23, 32, 42, 0.025);
}

.filter-tabs {
  border-bottom: 1px solid var(--border);
  gap: 18px;
  margin-bottom: 0;
  padding: 0;
}

.filter-tab {
  padding: 10px 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.filter-tab.active {
  border-color: var(--accent);
  background: transparent;
  color: var(--text);
}

.filter-tab:hover {
  border-color: var(--border-active);
}

.split-pane {
  margin-top: 12px;
  max-height: 72vh;
  box-shadow: var(--shadow-md);
}

.split-left-header,
.split-right-header {
  min-height: 44px;
  background: var(--card2);
}

.finding-item {
  border-radius: 4px;
}

.finding-item.active {
  border-color: rgba(50, 213, 131, 0.38);
  background: rgba(50, 213, 131, 0.07);
}

.finding-location {
  color: var(--accent-light);
}

.check-card:hover,
.history-card:hover {
  transform: none;
}

.severity-badge,
.finding-sev,
.dimension-tag {
  border-radius: 3px;
  letter-spacing: 0;
}

.action-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(21, 27, 35, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .action-bar {
  background: rgba(255, 255, 255, 0.94);
}

/* ========== Ads & Daily Quota ========== */
.quota-display {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.quota-display strong {
  margin: 0 2px;
  color: var(--success);
  font-size: 12px;
}

.quota-display:hover {
  border-color: var(--border-active);
  color: var(--text);
}

.quota-display.empty {
  border-color: rgba(255, 184, 77, 0.32);
  background: rgba(255, 184, 77, 0.06);
}

.quota-display.empty strong {
  color: var(--warning);
}

.ad-slot {
  --ad-accent: var(--accent-light);
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 76px;
  margin: 16px 0;
  padding: 14px 16px 14px 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  text-align: left;
}

.ad-slot::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--ad-accent);
  content: "";
}

.ad-label {
  align-self: flex-start;
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 8px;
}

.ad-copy {
  min-width: 0;
  flex: 1;
}

.ad-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--ad-accent);
  font-size: 9px;
  font-weight: 700;
}

.ad-copy strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.ad-copy p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
}

.ad-action {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.ad-action:not(:disabled):hover {
  border-color: var(--ad-accent);
  color: var(--text);
}

.ad-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.ad-clickable {
  cursor: pointer;
}

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

.ad-clickable:hover {
  border-color: color-mix(in srgb, var(--ad-accent) 55%, var(--border));
}

.ad-card-media {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: #eefbf9;
}

.ad-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-layout-card {
  border-color: #1d6d61;
  background: #102724;
  box-shadow: inset 0 0 0 1px rgba(16, 201, 165, 0.05);
}

[data-theme="light"] .ad-layout-card {
  border-color: #83cfc1;
  background: #e8f7f4;
  box-shadow: inset 0 0 0 1px rgba(0, 117, 96, 0.04);
}

.ad-layout-card .ad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(5, 14, 20, 0.72);
  color: rgba(255, 255, 255, 0.9);
}

.ad-layout-card .ad-action {
  border-color: color-mix(in srgb, var(--ad-accent) 35%, var(--border));
  color: var(--ad-accent);
}

.ad-layout-artwork,
.ad-layout-artwork-square {
  display: block;
  min-height: 0;
  padding: 0;
  border-color: var(--border);
  background: #f4f7ff;
}

.ad-layout-artwork::before,
.ad-layout-artwork-square::before {
  display: none;
}

.ad-artwork {
  display: block;
  width: 100%;
}

.ad-artwork img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-label-overlay {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.ad-slot-sidebar.ad-layout-artwork-square {
  display: flex;
  height: 250px;
  align-items: center;
  justify-content: center;
}

.ad-slot-sidebar.ad-layout-artwork-square .ad-artwork {
  width: auto;
  height: 100%;
}

.ad-slot-sidebar.ad-layout-artwork-square .ad-artwork img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

#ad-hero-banner {
  margin: 16px 0 18px;
}

#ad-upload-banner {
  margin: 0 0 16px;
}

#ad-selfcheck-banner {
  margin: 0 0 16px;
}

#ad-scanning-native {
  max-width: 520px;
  margin: 18px auto 12px;
}

#ad-results-sidebar {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background: var(--card2);
}

#ad-results-sidebar .ad-copy p {
  display: none;
}

#ad-results-sidebar .ad-action {
  display: none;
}

#ad-results-banner {
  margin: 0 0 16px;
}

.quota-modal-content {
  max-width: 540px;
}

.quota-modal-mark {
  padding: 4px 7px;
  border: 1px solid rgba(61, 220, 151, 0.3);
  border-radius: 3px;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.quota-summary {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.quota-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.quota-breakdown div {
  padding: 13px;
  background: var(--card2);
}

.quota-breakdown span,
.quota-breakdown strong {
  display: block;
}

.quota-breakdown span {
  color: var(--text-muted);
  font-size: 9px;
}

.quota-breakdown strong {
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 19px;
}

.reward-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 184, 77, 0.24);
  border-radius: 6px;
  background: rgba(255, 184, 77, 0.05);
}

.reward-option > div {
  min-width: 0;
  flex: 1;
}

.reward-option-label {
  display: block;
  margin-bottom: 3px;
  color: var(--warning);
  font-size: 9px;
  font-weight: 700;
}

.reward-option strong {
  color: var(--text);
  font-size: 13px;
}

.reward-option p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.55;
}

.quota-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 10px;
}

.ad-player-overlay {
  z-index: 240;
}

.ad-player-content {
  position: relative;
  width: min(460px, 100%);
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.ad-player-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.ad-player-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 8px;
}

.ad-player-creative {
  display: block;
  width: 100%;
  margin: 10px auto 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #eefbf9;
  cursor: pointer;
}

.ad-player-creative img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-player-content .ad-eyebrow {
  color: var(--warning);
}

.ad-player-content h3 {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 19px;
}

.ad-player-content > p {
  margin: 0 auto;
  max-width: 360px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.ad-player-timer {
  margin: 20px 0 14px;
  color: var(--text-muted);
  font-size: 10px;
}

.ad-player-timer > div {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--card2);
}

.ad-player-timer i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--warning);
  transition: width 0.2s linear;
}

.ad-player-cancel {
  margin-top: 12px;
}

.btn-action {
  min-height: 38px;
  padding: 9px 12px;
  background: var(--card2);
  font-size: 11px;
}

.btn-action.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #07120e;
  box-shadow: none;
}

.btn-action.primary:hover {
  background: var(--accent-light);
  box-shadow: none;
}

.modal-overlay {
  background: rgba(4, 7, 10, 0.72);
  backdrop-filter: blur(8px);
}

.modal-content {
  box-shadow: var(--shadow-lg);
}

.modal-close {
  border-radius: 5px;
}

.toast {
  border-radius: 6px;
}

.app-footer {
  margin-top: 0;
  padding: 24px 20px;
  background: var(--bg);
  font-size: 10px;
}

.footer-brand {
  margin-top: 4px;
}

.footer-brand span {
  color: var(--border-active);
}

.app-footer a {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .global-header {
    padding: 0 16px;
  }

  .local-status,
  .brand-copy small,
  .header-btn-with-label span:not(.header-glyph) {
    display: none;
  }

  .header-btn-with-label {
    width: 34px;
    padding: 0;
  }

  .screen {
    padding: 82px 16px 36px;
  }

  .workspace-heading {
    align-items: flex-start;
  }

  .rule-coverage {
    min-width: 84px;
    padding-left: 14px;
  }

  .steps {
    justify-content: center;
  }

  .step-line {
    flex-basis: 34px;
    margin: 0 5px;
  }

  .drop-zone {
    min-height: 240px;
    padding: 34px 18px;
  }

  .pack-col + .pack-col {
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .split-pane {
    max-height: none;
  }

  .action-bar {
    position: static;
  }
}

@media (max-width: 520px) {
  .workspace-heading {
    display: block;
  }

  .workspace-heading h1 {
    font-size: 22px;
  }

  .rule-coverage {
    display: none;
  }

  .steps {
    padding: 10px;
  }

  .step-item {
    gap: 5px;
    font-size: 10px;
  }

  .step-line {
    flex-basis: 18px;
    margin: 0 3px;
  }

  .pack-guide-header {
    grid-template-columns: 1fr auto;
  }

  .pack-guide-sub {
    display: none;
  }

  .security-notice {
    gap: 9px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-tag {
    width: 100%;
    border-width: 0 0 1px;
    padding: 8px;
  }

  .hero-tag:last-child {
    border-bottom: 0;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    min-height: 70px;
  }

  .form-card {
    padding: 20px 16px;
  }
}

/* ========== Dual-entry home ========== */
.hero-section {
  justify-content: flex-start;
  text-align: left;
}

.hero-section .home-wrap {
  max-width: 1040px;
}

.home-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.home-heading .hero-kicker {
  margin-bottom: 18px;
}

.home-heading .hero-title {
  margin: 0 0 14px;
  font-size: 38px;
  line-height: 1.25;
  text-align: left;
}

.home-heading .hero-subtitle {
  max-width: 650px;
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}

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

.entry-card {
  position: relative;
  display: flex;
  min-height: 370px;
  padding: 26px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.entry-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--border);
  transition: background var(--transition);
}

.entry-card:hover {
  border-color: var(--border-active);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.entry-card.entry-free::after,
.entry-card.entry-free:hover::after {
  background: var(--accent);
}

.entry-card.entry-scan:hover::after {
  background: var(--info);
}

.entry-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.entry-index {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.entry-badge {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.entry-badge.free {
  border-color: rgba(50, 213, 131, 0.28);
  background: rgba(50, 213, 131, 0.07);
  color: var(--accent-light);
}

.entry-icon {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card2);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.entry-free .entry-icon {
  border-color: rgba(50, 213, 131, 0.24);
  color: var(--accent-light);
  font-size: 16px;
}

.entry-scan .entry-icon {
  border-color: rgba(100, 181, 246, 0.24);
  color: var(--info);
}

.entry-card h2 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 20px;
  font-weight: 720;
  line-height: 1.3;
}

.entry-card > p {
  max-width: 390px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.entry-features {
  display: flex;
  margin: 20px 0 24px;
  padding: 18px 0 0;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--border);
  list-style: none;
}

.entry-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 11px;
}

.entry-features li span {
  color: var(--accent-light);
  font-size: 10px;
}

.entry-scan .entry-features li span {
  color: var(--info);
}

.entry-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 14px;
  border: 1px solid var(--border-active);
  border-radius: 5px;
  background: var(--card2);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.entry-action span {
  color: var(--text-muted);
  font-size: 15px;
}

.entry-action:hover {
  border-color: var(--info);
  background: rgba(100, 181, 246, 0.06);
}

.entry-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #07120e;
}

.entry-action.primary span {
  color: #07120e;
}

.entry-action.primary:hover {
  background: var(--accent-light);
}

.home-trust {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 14px 2px 0;
  color: var(--text-muted);
  font-size: 10px;
}

.home-trust strong {
  margin-right: 4px;
  color: var(--text-secondary);
}

.home-trust button {
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.home-trust button:hover {
  color: var(--accent-light);
}

.form-workspace {
  max-width: 760px;
}

.self-check-heading {
  margin-bottom: 24px;
}

.self-check-heading .rule-coverage {
  min-width: 128px;
}

.self-check-heading .rule-coverage strong {
  color: var(--accent-light);
  font-size: 18px;
}

@media (max-width: 760px) {
  .home-heading {
    margin-bottom: 24px;
  }

  .home-heading .hero-title {
    font-size: 30px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-card {
    min-height: 340px;
  }

  .home-trust {
    flex-wrap: wrap;
    gap: 10px 18px;
  }
}

@media (max-width: 480px) {
  .home-heading .hero-title {
    font-size: 27px;
  }

  .home-heading .hero-subtitle {
    font-size: 13px;
  }

  .entry-card {
    min-height: 330px;
    padding: 22px 20px;
  }

  .home-trust {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-trust button {
    margin-left: 0;
  }
}

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

@media (max-width: 680px) {
  .local-status {
    display: none;
  }

  .quota-display {
    padding: 5px 7px;
    font-size: 9px;
  }

  .ad-slot {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 9px;
  }

  .ad-label {
    order: 1;
  }

  .ad-copy {
    order: 3;
    flex-basis: 100%;
  }

  .ad-action {
    order: 2;
    margin-left: auto;
  }

  .ad-layout-card {
    align-items: center;
    flex-wrap: nowrap;
    gap: 11px;
    padding: 10px;
  }

  .ad-layout-card .ad-card-media {
    width: 72px;
    height: 72px;
  }

  .ad-layout-card .ad-copy {
    order: initial;
    flex-basis: auto;
  }

  .ad-layout-card .ad-copy p {
    display: none;
  }

  .ad-layout-card .ad-action {
    display: none;
  }

  .ad-layout-artwork,
  .ad-layout-artwork-square {
    flex-wrap: nowrap;
    gap: 0;
  }

  .quota-breakdown {
    grid-template-columns: 1fr;
  }

  .reward-option {
    align-items: stretch;
    flex-direction: column;
  }

  .reward-option .btn-confirm {
    width: 100%;
  }

  .ad-player-content {
    padding: 24px 18px 20px;
  }
}

@media print {
  .ad-slot,
  .quota-display,
  .quota-overlay,
  .ad-player-overlay {
    display: none !important;
  }
}
