/* ScreenBalance Styles */
:root {
  --primary: #4a7c59;
  --primary-light: #6b9a76;
  --secondary: #8d9f87;
  --accent: #d4a59a;
  --background: #f8f5f0;
  --surface: #ffffff;
  --text: #2d2d2d;
  --text-light: #666;
  --border: #e0dcd5;
  --success: #5a8f63;
  --warning: #c99462;
  --danger: #b75e5e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  padding-top: 60px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.main-nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.main-nav a:hover { color: var(--primary); }

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.hero h2 { font-size: 2.5rem; margin-bottom: 12px; }
.tagline { font-size: 1.2rem; opacity: 0.9; }

.tracker-section, .insights-section, .guide-section, .export-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.category-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.category-card:hover { border-color: var(--primary); }
.category-card.active { border-color: var(--primary); background: #f0f7f0; }

.card-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.card-label { font-weight: 600; display: block; margin-bottom: 4px; }
.card-time { color: var(--primary); font-weight: 500; }

.satisfaction-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.satisfaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.sat-item label { display: block; margin-bottom: 8px; font-weight: 500; }
.sat-item input[type="range"] { width: 100%; }

.action-buttons {
  text-align: center;
  margin: 30px 0;
}

.btn-primary, .btn-secondary, .btn-outline, .btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  margin: 0 8px;
  transition: background 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }

.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d0cbc0; }

.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.insight-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.insight-card h3 { margin-bottom: 12px; color: var(--primary); }

.balance-score { font-size: 3rem; font-weight: 700; color: var(--primary); text-align: center; }
.score-label { text-align: center; color: var(--text-light); margin-top: 8px; }

.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 150px;
  margin: 20px 0;
  padding: 20px 0;
  border-bottom: 2px solid var(--border);
}

.chart-bar {
  width: 40px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.chart-bar span { position: absolute; bottom: -25px; font-size: 0.8rem; color: var(--text-light); }

.guide-content h3 { margin: 24px 0 12px; color: var(--primary); }
.guide-content ol, .guide-content ul { margin-left: 20px; }
.guide-content li { margin-bottom: 8px; }

.export-buttons { margin-top: 20px; }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}

.footer-nav a { margin: 0 12px; color: var(--text-light); text-decoration: none; }
.footer-nav a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .main-nav a { margin-left: 12px; }
  .hero h2 { font-size: 1.8rem; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .satisfaction-grid { grid-template-columns: 1fr; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
