/* ==========================================================================
   ValueLens (バリューレンズ) - Modern Responsive Design System
   Supports Dark Mode (Default) & Light Mode via [data-theme="light"]
   ========================================================================== */

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-card: rgba(30, 41, 59, 0.72);
  --bg-card-solid: #1e293b;
  --bg-input: rgba(15, 23, 42, 0.85);
  --bg-hover: rgba(51, 65, 85, 0.55);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-focus: #6366f1;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --rank-s-bg: rgba(16, 185, 129, 0.16);
  --rank-s-border: #10b981;
  --rank-s-text: #34d399;

  --rank-a-bg: rgba(59, 130, 246, 0.16);
  --rank-a-border: #3b82f6;
  --rank-a-text: #60a5fa;

  --rank-b-bg: rgba(245, 158, 11, 0.16);
  --rank-b-border: #f59e0b;
  --rank-b-text: #fbbf24;

  --rank-c-bg: rgba(249, 115, 22, 0.16);
  --rank-c-border: #f97316;
  --rank-c-text: #fb923c;

  --rank-d-bg: rgba(244, 63, 94, 0.16);
  --rank-d-border: #f43f5e;
  --rank-d-text: #fb7185;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-solid: #ffffff;
  --bg-input: #f8fafc;
  --bg-hover: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-subtle: rgba(100, 116, 139, 0.22);
  --border-focus: #4f46e5;

  --rank-s-bg: rgba(16, 185, 129, 0.12);
  --rank-s-border: #059669;
  --rank-s-text: #047857;

  --rank-a-bg: rgba(59, 130, 246, 0.12);
  --rank-a-border: #2563eb;
  --rank-a-text: #1d4ed8;

  --rank-b-bg: rgba(245, 158, 11, 0.12);
  --rank-b-border: #d97706;
  --rank-b-text: #b45309;

  --rank-c-bg: rgba(249, 115, 22, 0.12);
  --rank-c-border: #ea580c;
  --rank-c-text: #c2410c;

  --rank-d-bg: rgba(244, 63, 94, 0.12);
  --rank-d-border: #e11d48;
  --rank-d-text: #be123c;

  --shadow-card: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: 'Inter', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', 'Meiryo', sans-serif;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(at 12% 8%, rgba(99, 102, 241, 0.14) 0px, transparent 45%),
    radial-gradient(at 88% 12%, rgba(6, 182, 212, 0.12) 0px, transparent 45%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Header & Live Status Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}

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

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Header Quick Metrics Pills */
.header-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.metric-pill:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.metric-pill .pill-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.metric-pill .pill-value {
  font-weight: 700;
  color: var(--accent-secondary);
}

.metric-pill.piggy-pill .pill-value {
  color: var(--accent-emerald);
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

/* Main Navigation Tabs */
.nav-tabs-bar {
  max-width: 1360px;
  margin: 16px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tab-btn {
  padding: 11px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.tab-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

/* Container & Layout */
.main-container {
  max-width: 1360px;
  margin: 18px auto 60px;
  padding: 0 20px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.22s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Preset Showcase Strip */
.preset-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.preset-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.preset-title {
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.cat-pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill.active,
.cat-pill:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  max-height: 195px;
  overflow-y: auto;
  padding-right: 4px;
}

.preset-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preset-card:hover,
.preset-card.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.preset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 700;
  font-size: 0.83rem;
  color: var(--text-primary);
}

.preset-price-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-secondary);
  white-space: nowrap;
}

.preset-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Main Simulator Two-Column Grid */
.simulator-grid {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px) {
  .simulator-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Form Controls */
.Segmented-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.seg-btn {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.seg-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

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

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.label-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 400;
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-input,
.num-input,
.select-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.18s ease;
}

.text-input:focus,
.num-input:focus,
.select-input:focus {
  border-color: var(--border-focus);
}

.unit-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.range-slider {
  width: 100%;
  margin-top: 7px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.chip-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.inline-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Satisfaction Star Buttons */
.star-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.star-btn {
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.star-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

/* Advanced Settings Accordion */
.advanced-details {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.advanced-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 12px;
  user-select: none;
}

/* Right Dashboard Results Area */
.results-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Verdict Hero Card */
.verdict-hero {
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.verdict-hero.rank-s { background: var(--rank-s-bg); border-color: var(--rank-s-border); }
.verdict-hero.rank-a { background: var(--rank-a-bg); border-color: var(--rank-a-border); }
.verdict-hero.rank-b { background: var(--rank-b-bg); border-color: var(--rank-b-border); }
.verdict-hero.rank-c { background: var(--rank-c-bg); border-color: var(--rank-c-border); }
.verdict-hero.rank-d { background: var(--rank-d-bg); border-color: var(--rank-d-border); }

.verdict-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.verdict-rank-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rank-circle {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.55);
  border: 2px solid currentColor;
  flex-shrink: 0;
}

[data-theme="light"] .rank-circle {
  background: rgba(255, 255, 255, 0.85);
}

.rank-circle .rank-letter {
  font-size: 2rem;
  line-height: 1;
}

.rank-circle .rank-score {
  font-size: 0.7rem;
  opacity: 0.9;
}

.verdict-headline {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.verdict-subline {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.verdict-reasons {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 16px;
  font-size: 0.86rem;
}

.verdict-reasons li {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

[data-theme="light"] .verdict-reasons li {
  background: rgba(255, 255, 255, 0.75);
}

/* Action CTA Bar inside Verdict Card */
.verdict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.action-btn {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.action-btn.btn-cool {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-secondary);
  color: var(--text-primary);
}

.action-btn.btn-cool:hover {
  background: var(--accent-secondary);
  color: #090d16;
}

.action-btn.btn-skip-save {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.action-btn.btn-skip-save:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.action-btn.btn-buy-decide {
  background: var(--bg-input);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.action-btn.btn-buy-decide:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.action-btn.btn-share {
  margin-left: auto;
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* 4-Lens Cards Grid */
.lenses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.lens-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lens-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.lens-big-number {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lens-big-number .accent-cyan { color: var(--accent-secondary); }
.lens-big-number .accent-rose { color: var(--accent-rose); }
.lens-big-number .accent-emerald { color: var(--accent-emerald); }
.lens-big-number .accent-purple { color: var(--accent-purple); }

.lens-sub-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.sub-metric-item .sm-label {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.sub-metric-item .sm-val {
  font-weight: 700;
  color: var(--text-secondary);
}

.benchmark-banner {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Progress / Gauge Bars */
.gauge-track {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

/* Chart Card */
.chart-canvas-wrap {
  width: 100%;
  height: 245px;
  position: relative;
}

.chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Smart Decision & Monetization Links Box */
.smart-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.smart-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.smart-link-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.12);
}

/* A/B Comparison Tab Layout */
.ab-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .ab-columns {
    grid-template-columns: 1fr;
  }
}

.ab-winner-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.18));
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}

/* Piggy Bank & Cooling Box Tab */
.saver-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.cooling-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cooling-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.timer-pill {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  color: var(--accent-secondary);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.timer-pill.ready {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

/* Modal Overlay (SNS Share Card) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.share-preview-canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin: 14px 0;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-msg {
  background: var(--bg-card-solid);
  border-left: 4px solid var(--accent-emerald);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.86rem;
  font-weight: 700;
  animation: fadeIn 0.2s ease;
}


/* ==========================================================================
   Sprint 3 & 4 Additions: Bias Checker, Family Pitch, Sub Studio, Mobile Bar
   ========================================================================== */

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

.bias-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.bias-box-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-rose);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pitch-textarea {
  width: 100%;
  min-height: 108px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.55;
  resize: vertical;
  margin: 10px 0;
}

.sub-audit-row {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1.6fr;
  gap: 12px;
  align-items: center;
  transition: all 0.18s ease;
}

.sub-audit-row.inactive {
  opacity: 0.48;
}

.sub-audit-row.status-cut_immediately {
  border-left: 4px solid var(--accent-rose);
}

.sub-audit-row.status-keep_god {
  border-left: 4px solid var(--accent-emerald);
}

.sub-audit-row.status-review {
  border-left: 4px solid var(--accent-amber);
}

@media (max-width: 900px) {
  .sub-audit-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Sticky Live Bar (shown on <=1040px when on main simulator tab) */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 250;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--accent-primary);
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.45);
}

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

@media (max-width: 1040px) {
  .mobile-sticky-bar.visible-mobile {
    display: flex;
  }
  body {
    padding-bottom: 68px;
  }
}

@media print {
  .app-header,
  .nav-tabs-bar,
  .preset-section,
  .verdict-actions,
  .mobile-sticky-bar {
    display: none !important;
  }
  .simulator-grid {
    grid-template-columns: 1fr !important;
  }
}
