/* App Idea Lab — candy game theme + Lucide icons */

:root {
  --cream: #f7f6f3;
  --bg: #f7f6f3;
  --bg-raised: #f0efec;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf9;
  --bg-overlay: #ffffff;

  --text: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;

  --accent: #2563eb;
  --accent-active: #1d4ed8;
  --accent-muted: #eff6ff;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #0284c7;

  --ink: #27272a;
  --ink-light: #71717a;
  --ink-grid: rgba(24, 24, 27, 0.08);

  --border: #e4e4e7;
  --border-active: #d4d4d8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 160ms;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* ── Reset ─────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.lucide-icon { width: 1em; height: 1em; vertical-align: -0.125em; }
.lucide-icon.category-icon { width: 18px; height: 18px; color: var(--accent); }

.category-section-compact .lucide-icon.category-icon {
  width: 14px;
  height: 14px;
}
.lucide-icon.badge-icon { width: 12px; height: 12px; margin-right: 2px; }
.lucide-icon.empty-icon { width: 36px; height: 36px; color: var(--accent); opacity: 0.7; display: block; margin: 0 auto 0.5rem; }

/* Header — single hero background like Pick10 */

.app-header {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.header-bg {
  display: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}

.header-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.header-mascot-wrap {
  display: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

.brand-text p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin: 0.1rem 0 0;
  line-height: 1.4;
}

.search-zone {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.search-bar {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color var(--duration), box-shadow var(--duration);
}

.search-bar input::placeholder { color: var(--text-tertiary); }

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.1);
}

.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 12px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration), transform var(--duration);
  height: 36px;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-bar button .lucide-icon { width: 14px; height: 14px; }

.btn-search {
  background: var(--accent);
  color: #fff;
}

.btn-search:hover { background: var(--accent-active); }
.btn-search:active { transform: scale(0.98); }

.btn-inspire {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border) !important;
}

.btn-inspire:hover {
  color: var(--text);
  border-color: var(--border-active) !important;
  background: var(--bg-card-hover);
}

/* ── Main Content ──────────────────────────── */

.main-content {
  max-width: none;
  margin: 0;
  padding: 1rem 0 2rem;
}

.page-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 1rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 0.75rem;
  align-items: start;
}

.page-center {
  min-width: 0;
}

.ad-side {
  position: sticky;
  top: 0.75rem;
  align-self: start;
}

.ad-side-inner {
  width: 160px;
  min-height: 600px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

.ad-label {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

@media (max-width: 1080px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 1rem;
  }
  .ad-side { display: none; }
}

/* ── Progress ──────────────────────────────── */

.progress-bar {
  display: none;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-overlay);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.progress-bar.active { display: block; }

.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-out);
}

.progress-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── Section Title ─────────────────────────── */

.section-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

/* ── Tips ──────────────────────────────────── */

.chart-tips {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  padding: 0.6rem 0.85rem;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

/* Category chips */

.category-section-compact {
  margin-bottom: 1rem;
}

.section-title-sm {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.category-panel-compact {
  padding: 0;
  background: transparent;
  border: none;
}

.category-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-card {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  min-height: auto;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--duration), background var(--duration), box-shadow var(--duration);
  box-shadow: var(--shadow-sm);
  position: relative;
  text-align: left;
}

.category-card::after { display: none; }

.category-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  transform: none;
  box-shadow: var(--shadow-sm);
}

.category-card.scanned {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.category-card .icon {
  width: 24px;
  height: 24px;
  margin: 0;
  background: var(--bg-raised);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
}

.category-card.scanned .icon {
  background: #fff;
}

.category-card .name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.category-card .score-badge {
  margin-top: 0;
  margin-left: 0.15rem;
  padding: 1px 5px;
  font-size: 0.62rem;
  font-weight: 600;
}

.score-high   { background: var(--success-bg); color: var(--success); }
.score-medium { background: var(--warning-bg); color: var(--warning); }
.score-low    { background: var(--danger-bg); color: var(--danger); }
.score-unknown { background: var(--bg-raised); color: var(--text-tertiary); }

/* ── Category Detail ───────────────────────── */

.category-detail {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  animation: slideUp 0.25s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

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

.category-detail.active { display: block; }

.detail-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
}

.detail-header h2 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.detail-header h2 .lucide-icon.title-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.btn-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 6px;
  transition: background var(--duration);
}

.btn-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
}

.btn-close:hover {
  background: var(--bg-card-hover);
  transform: none;
}

.detail-body-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  height: auto;
}

.detail-chart-col,
.detail-list-col {
  padding: 0.6rem 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detail-chart-col {
  border-right: none;
  border-bottom: 1px solid var(--border);
  background: #fafaf9;
  height: 280px;
  flex-shrink: 0;
}

.detail-list-col {
  height: 420px;
  flex-shrink: 0;
}

.detail-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.detail-col-head .section-title-sm {
  margin-bottom: 0;
}

.chart-legend-inline {
  margin-bottom: 0;
}

.detail-header {
  padding: 0.55rem 0.75rem;
}

.detail-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
}

.detail-meta .heat-tag {
  font-size: 0.68rem;
  padding: 1px 6px;
}

.chart-tips-inline {
  font-size: 0.68rem;
  padding: 0;
  margin-bottom: 0.5rem;
  background: transparent;
  color: var(--text-tertiary);
}

.chart-legend {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: #fff;
}

.legend-dot.high {
  background: var(--success);
  border-color: #15803d;
}

.legend-dot.medium {
  background: var(--warning);
  border-color: #b45309;
}

.legend-dot.low {
  background: #d4d4d8;
  border-color: #a1a1aa;
}

@media (max-width: 600px) {
  .detail-chart-col {
    height: 220px;
  }
  .detail-list-col {
    height: 320px;
  }
}

/* ── App List ──────────────────────────────── */

.app-list {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-active) transparent;
}

/* ── Chart Container ───────────────────────── */

.chart-container {
  position: relative;
}

.chart-container.manga-chart {
  flex: 1;
  min-height: 0;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 0.35rem;
}

.app-list-expanded {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.detail-col-head-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.detail-col-head-stack .chart-tips-inline {
  line-height: 1.45;
  margin-bottom: 0.15rem;
}

.app-list-body {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  background: var(--bg-raised);
}

.app-list::-webkit-scrollbar { width: 4px; }
.app-list::-webkit-scrollbar-track { background: transparent; }
.app-list::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 2px; }

.app-item {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto 44px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--duration);
  background: var(--bg-raised);
}

.app-item:last-child { border-bottom: none; }

.app-item:hover { background: #ebeae6; }

.app-item-valuable {
  background: rgba(240, 253, 244, 0.6);
}

.app-item-valuable:hover {
  background: #e8f5ec;
}

.ref-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: #15803d;
  background: #fff;
  border: 1px solid var(--success-border);
  padding: 0 5px;
  border-radius: var(--radius-pill);
}

.btn-app-detail-link {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 0;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.btn-app-detail-link:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
}

.app-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.ref-badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  color: #1a5c2e;
  background: rgba(93, 184, 114, 0.25);
  border: 1px solid var(--success);
  padding: 0 4px;
  border-radius: 3px;
}

.btn-app-detail-link {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

.btn-app-detail-link:hover {
  background: var(--accent-muted);
}

.app-item .rank {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  flex-shrink: 0;
}

.app-item .app-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: none;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.app-item .app-info { flex: 1; min-width: 0; }

.app-item .app-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-item .app-meta {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}

.app-item .app-score {
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
  min-width: 2rem;
  text-align: right;
  font-family: var(--font-mono);
}

.app-item .app-score.score-high   { color: #16a34a; }
.app-item .app-score.score-medium { color: #ca8a04; }
.app-item .app-score.score-low    { color: #dc2626; }
.app-item .app-score.score-unknown { color: var(--text-tertiary); }

/* ── App Detail ────────────────────────────── */

.app-detail {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  overflow: hidden;
  animation: slideUp 0.25s var(--ease-out);
  box-shadow: var(--shadow);
}

.app-detail.active { display: block; }

/* ── App Detail Modal ──────────────────────── */

body.modal-open {
  overflow: hidden;
}

.app-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 1rem;
}

.app-detail-modal.open {
  display: flex;
}

.app-detail-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 19, 0.48);
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s var(--ease-out);
}

.app-detail-modal-hint {
  position: fixed;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(20, 20, 19, 0.35);
  border-radius: var(--radius-pill);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.app-detail-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  margin: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.28s var(--ease-out);
  -webkit-overflow-scrolling: touch;
}

.app-detail-modal .app-detail {
  display: block;
  margin-bottom: 0;
}

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

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

.app-detail-header {
  padding: 1.75rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.app-icon-frame {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
}

.app-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.app-detail-info { flex: 1; }

.app-detail-info h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.app-detail-info .developer {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.app-detail-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.05rem;
}

.app-detail-body { padding: 1.5rem; }

/* ── Score Breakdown ───────────────────────── */

.score-breakdown {
  padding: 1.15rem 1.35rem;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

.score-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.score-breakdown-header .total-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.score-breakdown-header .total-score {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--accent);
}

.score-breakdown-header .total-max {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.score-dim {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
}

.score-dim + .score-dim { border-top: 1px solid var(--border); }

.score-dim .dim-label {
  width: 56px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.score-dim .dim-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.score-dim .dim-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s var(--ease-out);
}

.dim-bar-fill.demand { background: var(--info); }
.dim-bar-fill.quality { background: var(--accent); }
.dim-bar-fill.freshness { background: var(--success); }
.dim-bar-fill.pain          { background: var(--danger); }
.dim-bar-fill.monetization  { background: var(--warning); }

.score-dim .dim-value {
  width: 36px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.score-dim .dim-hint {
  width: 100px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-align: right;
  flex-shrink: 0;
}

/* ── Report Header ─────────────────────────── */

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.report-label {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.report-date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ── Radar Chart ───────────────────────────── */

.radar-chart-container {
  max-width: 260px;
  margin: 0 auto 1rem;
}

/* ── Report Row (two-column layout) ────────── */

.report-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.report-row .analysis-card {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .report-row { grid-template-columns: 1fr; }
}

/* ── Verdict Banner ────────────────────────── */

.verdict-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.verdict-badge {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  flex-shrink: 0;
}

.verdict-reason {
  font-size: 0.88rem;
  line-height: 1.5;
}

.verdict-reason strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* ── Analysis Card (shared) ────────────────── */

.analysis-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* ── Revenue Section ───────────────────────── */

.revenue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.revenue-item {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.revenue-item .revenue-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.revenue-item .revenue-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.1rem;
}

.revenue-item .revenue-value.highlight {
  color: var(--success);
}

.recommendation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border-radius: var(--radius);
}

/* ── MVP Section ───────────────────────────── */

.mvp-group {
  margin-bottom: 0.65rem;
}

.mvp-group:last-child { margin-bottom: 0; }

.mvp-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
}

.mvp-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mvp-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
}

.mvp-tag.must { background: var(--success-bg); color: var(--success); }
.mvp-tag.baseline { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.mvp-tag.nice { background: var(--warning-bg); color: var(--warning); }

/* ── Persona Section ───────────────────────── */

.persona-summary {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.persona-detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Feature Gap Section ───────────────────── */

.feature-gap-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .feature-gap-columns { grid-template-columns: 1fr; }
}

.feature-gap-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.feature-gap-group-label.complaints { color: var(--danger); }
.feature-gap-group-label.requests { color: var(--success); }

.feature-gap-list {
  list-style: none;
  padding: 0;
}

.feature-gap-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-gap-item:last-child { border-bottom: none; }

.feature-gap-item .gap-rank {
  width: 22px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.feature-gap-item .gap-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  text-transform: capitalize;
}

.feature-gap-item .gap-count {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* ── Sentiment Section ─────────────────────── */

.sentiment-summary {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.sentiment-summary .trend-icon {
  margin-right: 0.3rem;
}

.sentiment-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Risk & Strategy Section ───────────────── */

.risk-section, .strategy-section {
  margin-bottom: 0.85rem;
}

.risk-section:last-child, .strategy-section:last-child { margin-bottom: 0; }

.risk-group-label, .strategy-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
}

.risk-list, .strategy-list {
  list-style: none;
  padding: 0;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.risk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.risk-dot.high   { background: var(--danger); }
.risk-dot.medium { background: var(--warning); }
.risk-dot.low    { background: var(--text-tertiary); }

.risk-text { color: var(--text-secondary); }

.strategy-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.strategy-item:last-child { border-bottom: none; }

.strategy-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 0.3rem;
}

.strategy-tag.high   { background: var(--success-bg); color: var(--success); }
.strategy-tag.medium { background: var(--warning-bg); color: var(--warning); }

.strategy-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.2rem;
}

/* ── Insight Section ───────────────────────── */

.insight-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.insight-box h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.insight-item {
  padding: 0.65rem 0;
}

.insight-item + .insight-item {
  border-top: 1px solid var(--border);
}

.insight-item .insight-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.3rem;
}

.insight-label.market    { background: var(--success-bg); color: var(--success); }
.insight-label.quality   { background: var(--danger-bg); color: var(--danger); }
.insight-label.maintenance { background: var(--warning-bg); color: var(--warning); }
.insight-label.pricing   { background: #eef3f8; color: var(--info); }
.insight-label.pain      { background: var(--bg-card); color: var(--accent); }
.insight-label.competition { background: var(--bg-raised); color: var(--text-secondary); }
.insight-label.heat       { background: #fdf5ec; color: #c27803; }

.insight-item .insight-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.15rem;
}

.insight-item .insight-detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Reviews ───────────────────────────────── */

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.btn-translate-all {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent-muted);
  border-radius: var(--radius);
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration);
}

.btn-translate-all:hover {
  background: var(--success-bg);
  border-color: var(--accent);
}

.review-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.keyword-tag {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.review-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
}

.review-item:last-child { border-bottom: none; }

.review-item .review-stars {
  color: var(--warning);
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.review-item .review-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.review-item .review-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.review-item .review-original {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
  font-style: italic;
}

.btn-translate {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 2px 0;
  margin-top: 0.2rem;
  transition: color var(--duration);
}

.btn-translate:hover { color: var(--accent-active); text-decoration: underline; }

.review-translation {
  font-size: 0.82rem;
  color: var(--text);
  margin-top: 0.3rem;
  line-height: 1.6;
}

.review-translation::before {
  content: "[译] ";
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
}

/* ── App Store Button ──────────────────────── */

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--duration) var(--ease-out);
}

.btn-appstore:hover { background: var(--accent-active); }

/* ── Empty State ───────────────────────────── */

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.empty-state .emoji { display: none; }

/* ── Loading Skeleton ──────────────────────── */

.skeleton {
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-card) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 768px) {
  .app-header { padding: 1rem 0.75rem 0.85rem; }
  .header-hero {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .header-mascot-wrap {
    order: -1;
    justify-content: center;
    padding-bottom: 0;
  }
  .header-mascot {
    width: min(140px, 42vw);
  }
  .brand-row { justify-content: center; }
  .brand-text { text-align: center; }
  .brand-text h1 { font-size: 1.2rem; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input { flex: 1 1 100%; }
  .search-bar button { flex: 1; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .app-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .app-detail-stats { justify-content: center; }
  .app-detail-modal {
    padding: 0;
    align-items: stretch;
  }
  .app-detail-modal-panel {
    max-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .main-content { padding: 1rem 0.75rem 3rem; }
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .category-card { padding: 0.85rem 0.5rem; }
  .detail-body { padding: 1rem; }
  .score-dim .dim-hint { display: none; }
}

.dim-bar-fill.heat { background: linear-gradient(90deg, #5b8fb9, #4f6ef7); }

/* Brand & commercial layout */

.section-desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin: -0.25rem 0 0.75rem;
}

.heat-badge { margin-top: 0.45rem; text-align: center; }

.detail-meta { margin-top: 0.35rem; font-size: 0.85rem; color: var(--text-secondary); }
.detail-meta .meta-sep { margin: 0 0.35rem; }
.hidden { display: none !important; }

.heat-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.heat-tag.heat-hot { background: #faf0f0; color: #c64545; }
.heat-tag.heat-warm { background: #fdf5ec; color: #e8a55a; }
.heat-tag.heat-cold { background: #eef4f8; color: #5b8fb9; }
.category-card .heat-tag { margin-top: 0.35rem; font-size: 0.68rem; }

.disclaimer { margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-tertiary); }

.ad-slot { min-height: 0; text-align: center; margin: 0 auto; padding: 0; }
.ad-slot.ad-detail { min-height: 0; margin-bottom: 1rem; }
.propeller-ad { width: 100%; min-height: 90px; }
.ad-side-inner .propeller-ad { min-height: 250px; }
body:not(.adsense-active) .ad-slot ins.adsbygoogle { display: none !important; }
body.adsense-active .ad-slot .propeller-ad { display: none; }

.support-float {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 252px;
  padding: 1.25rem 1rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.support-float-left { left: 16px; }
.support-float-right { right: 16px; }

.support-mascot {
  width: 72px;
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
}

.support-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.support-qr {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
  display: block;
}

.support-hint {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.support-hint code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--bg-raised);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.support-mobile {
  display: none;
  max-width: 960px;
  margin: 1rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (max-width: 1400px) {
  .support-float { display: none; }
  .support-mobile { display: block; }
}

.support-sidebar,
.support-section,
.footer-support-link {
  display: none;
}

.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: 0.75rem 1rem; }

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-inner nav { display: flex; gap: 1rem; }
.footer-inner nav a { color: var(--accent); text-decoration: none; }
.footer-inner nav a:hover { text-decoration: underline; }
.footer-note { flex-basis: 100%; font-size: 0.75rem; color: var(--text-tertiary); }

.legal-page { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal-page h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1rem; }
.legal-page h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal-page p, .legal-page li { color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.7; }
.legal-page a { color: var(--accent); }

.legal-body {
  background: var(--bg);
  min-height: 100vh;
}
