/* Souvenir Value Scorer — styles.css */
:root {
  --green-900: #1B4332;
  --green-700: #2D6A4F;
  --green-500: #40916C;
  --green-300: #74C69D;
  --green-100: #D8F3DC;
  --green-50: #F0F4F1;
  --sand-700: #D4A373;
  --sand-500: #E9C46A;
  --sand-100: #FFF3E0;
  --red-600: #DC2626;
  --red-100: #FEE2E2;
  --amber-600: #D97706;
  --amber-100: #FEF3C7;
  --gray-900: #1a1a1a;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green-900);
}
.logo:hover { text-decoration: none; }
.nav {
  display: flex;
  gap: 1.5rem;
}
.nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-700);
}
.nav a:hover { color: var(--green-700); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.15rem;
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
  font-family: var(--font);
}
.btn-primary {
  background: var(--sand-700);
  color: var(--white);
  border-color: var(--sand-700);
}
.btn-primary:hover { background: #b8894f; border-color: #b8894f; text-decoration: none; }
.btn-secondary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn-secondary:hover { background: var(--green-900); border-color: var(--green-900); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); text-decoration: none; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }

/* Sections */
section { padding: 4rem 0; }
section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.section-desc {
  color: var(--gray-500);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Scorer Layout */
.scorer-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

/* Form */
.scorer-form {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .3rem;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: .6rem .8rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font);
  background: var(--white);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(64,145,108,.15);
}

/* Axes */
.axes {
  border: none;
  padding: 0;
  margin: 1.5rem 0;
}
.axes legend {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.axis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 1rem;
}
.axis-row:last-child { border-bottom: none; }
.axis-info label {
  font-weight: 600;
  font-size: .95rem;
  display: block;
}
.axis-hint {
  font-size: .8rem;
  color: var(--gray-500);
}
.axis-stars {
  display: flex;
  gap: .25rem;
  flex-shrink: 0;
}
.axis-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.axis-stars label {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  color: var(--gray-500);
}
.axis-stars input:checked + label {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--white);
}
.axis-stars label:hover {
  border-color: var(--green-500);
  background: var(--green-100);
}
.axis-stars input:focus-visible + label {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* Bag type */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .3rem;
}
.radio-group label {
  font-weight: 400;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}

/* Weight group */
.weight-group input { max-width: 160px; }

/* Form actions */
.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
}

/* Verdict Panel */
.verdict-panel {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  padding: 2rem;
  position: sticky;
  top: 80px;
}
.verdict-empty {
  text-align: center;
  color: var(--gray-500);
  padding: 2rem 0;
}
.verdict-empty svg { margin-bottom: 1rem; }
.verdict-badge {
  display: inline-block;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .75rem;
}
.badge-keep { background: #065F46; color: var(--white); }
.badge-maybe { background: var(--amber-600); color: var(--white); }
.badge-skip { background: var(--red-600); color: var(--white); }
.verdict-result h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.verdict-result p { color: var(--gray-700); margin-bottom: 1rem; }
.verdict-score-breakdown {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: 1.25rem;
}
.verdict-score-breakdown dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem .75rem;
}
.verdict-score-breakdown dt { font-weight: 600; }
.verdict-score-breakdown dd { text-align: right; }
.verdict-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Presets */
.section-presets { background: var(--gray-100); }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.preset-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}
.preset-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.preset-card p { font-size: .85rem; color: var(--gray-500); margin-bottom: 1rem; }
.preset-card dl {
  font-size: .85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .2rem .75rem;
  margin-bottom: 1rem;
}
.preset-card dt { font-weight: 600; }
.preset-card dd { text-align: right; color: var(--gray-700); }
.preset-apply { width: 100%; }

/* Guide */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.guide-block {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.guide-block h3 { font-size: 1rem; margin-bottom: .5rem; }
.guide-block p { font-size: .9rem; color: var(--gray-700); }
.guide-tips {
  background: var(--sand-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.guide-tips h3 { font-size: 1.1rem; margin-bottom: .75rem; }
.guide-tips ul { padding-left: 1.25rem; }
.guide-tips li { margin-bottom: .5rem; font-size: .9rem; }
.guide-tips li strong { color: var(--green-900); }

.print-card {
  background: var(--white);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.print-card h3 { margin-bottom: .25rem; }
.print-card p { color: var(--gray-500); font-size: .9rem; margin-bottom: 1rem; }

/* History */
.section-history { background: var(--gray-100); }
.history-list {
  display: grid;
  gap: .75rem;
}
.history-empty { color: var(--gray-500); font-style: italic; }
.history-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}
.history-item-info { flex: 1; min-width: 0; }
.history-item-name { font-weight: 600; font-size: .95rem; }
.history-item-meta { font-size: .8rem; color: var(--gray-500); }
.history-item-badge {
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.history-item-score {
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.history-item-delete {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 1.2rem;
  padding: .25rem;
  line-height: 1;
}
.history-item-delete:hover { color: var(--red-600); }

/* Footer */
.site-footer {
  background: var(--green-900);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1rem;
}
.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-nav a { color: rgba(255,255,255,.7); font-size: .85rem; }
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom a { color: rgba(255,255,255,.7); }

/* Print styles */
@media print {
  .site-header, .site-footer, .form-actions, .verdict-actions, .preset-apply, .btn, .section-history, .section-presets, .hero { display: none !important; }
  body { font-size: 12pt; }
  .scorer-form { box-shadow: none; border: 1px solid #ccc; }
  .verdict-panel { position: static; }
}

/* Responsive */
@media (max-width: 860px) {
  .scorer-layout { grid-template-columns: 1fr; }
  .verdict-panel { position: static; }
  .nav { gap: .75rem; }
  .nav a { font-size: .8rem; }
}
@media (max-width: 600px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.75rem; }
  section { padding: 2.5rem 0; }
  .axis-row { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .form-actions { flex-direction: column; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--green-900);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }



/* 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;
}
