/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #2e2c2b;
  background: #faf7f2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: #8b5e3c; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: #6b3f1f; }

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 3px solid #e6d7c3;
  padding: 1.5rem 0 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.logo { font-size: 2rem; font-weight: 700; color: #5a3e2b; margin-bottom: 0.25rem; }
.tagline { font-size: 1.1rem; color: #6e5c4b; margin-bottom: 1rem; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}
.site-nav a { font-weight: 500; color: #5a3e2b; }

/* Main Sections */
section { padding: 3rem 0; }
section:nth-of-type(even) { background: #fff; }
h2 {
  font-size: 1.8rem;
  color: #5a3e2b;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: #d4b896;
  border-radius: 2px;
}

/* Converter Form */
.converter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.form-group { flex: 1 1 250px; }
label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: #5a3e2b; }
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d4b896;
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  color: #2e2c2b;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a3e2b' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}
select:focus { outline: none; border-color: #8b5e3c; box-shadow: 0 0 0 3px rgba(139,94,60,0.2); }
.btn-primary {
  padding: 0.75rem 2rem;
  background: #8b5e3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-primary:hover, .btn-primary:focus { background: #6b3f1f; outline: none; }

/* Result Card */
.result-card {
  background: #fdf8f2;
  border: 1px solid #e6d7c3;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.result-card.visible { display: block; }
.result-card h3 { font-size: 1.5rem; color: #5a3e2b; margin-bottom: 0.75rem; }
.result-card ul { list-style: none; padding: 0; }
.result-card li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e6d7c3;
  display: flex;
  gap: 0.5rem;
}
.result-card li:last-child { border-bottom: none; }
.result-card .detail-label { font-weight: 600; min-width: 150px; color: #5a3e2b; }

/* Chart Table */
.chart-intro { margin-bottom: 1.5rem; color: #4a3b2f; }
.table-responsive { overflow-x: auto; margin-bottom: 1rem; }
.weight-chart {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.weight-chart th {
  background: #8b5e3c;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.weight-chart td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e6d7c3;
  vertical-align: top;
}
.weight-chart tbody tr:hover { background: #fdf8f2; }
.chart-note { font-style: italic; color: #6e5c4b; font-size: 0.9rem; }

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.tip-card {
  background: #fdf8f2;
  border: 1px solid #e6d7c3;
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tip-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.tip-card h3 { font-size: 1.2rem; color: #5a3e2b; margin-bottom: 0.5rem; }
.tip-card p { color: #4a3b2f; font-size: 0.95rem; }

/* Footer */
.site-footer {
  background: #5a3e2b;
  color: #e6d7c3;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .logo { font-size: 1.6rem; }
  h2 { font-size: 1.5rem; }
  .converter-form { flex-direction: column; align-items: stretch; }
  .btn-primary { width: 100%; }
  .result-card { padding: 1rem; }
  .result-card li { flex-direction: column; }
  .weight-chart th, .weight-chart td { padding: 0.5rem; font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .site-nav ul { gap: 1rem; }
  section { padding: 2rem 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;
}

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
