/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #3D3A35;
    background-color: #FEFAE0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg {
    max-width: 100%;
    height: auto;
}

a {
    color: #BC6C25;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #8B4A1B;
    text-decoration: underline;
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ===== Header ===== */
.site-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E9E0D1;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #3D3A35;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: #3D3A35;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6B6356;
}

.nav-links a:hover {
    color: #BC6C25;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #FAEDCD 0%, #FEFAE0 40%, #CCD5AE 100%);
    padding: 3rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid #E9E0D1;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #3D3A35;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.subtitle {
    font-size: 1.1rem;
    color: #6B6356;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Calculator Section ===== */
.calculator-section {
    padding: 2.5rem 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E9E0D1;
}

.calculator-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #3D3A35;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #3D3A35;
}

.form-group select {
    padding: 0.65rem 0.75rem;
    border: 1.5px solid #D4C5B2;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #FEFAE0;
    color: #3D3A35;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B6356' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.form-group select:focus {
    outline: none;
    border-color: #BC6C25;
    box-shadow: 0 0 0 3px rgba(188, 108, 37, 0.15);
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background-color: #BC6C25;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background-color: #8B4A1B;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ===== Result Panel ===== */
.calc-result {
    background-color: #FAEDCD;
    border-radius: 12px;
    padding: 2rem;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E9E0D1;
}

.result-placeholder {
    text-align: center;
    color: #6B6356;
}

.result-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.result-placeholder p {
    font-size: 0.95rem;
    max-width: 220px;
}

.result-active {
    text-align: center;
    width: 100%;
}

.weight-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.weight-number {
    font-size: 4rem;
    font-weight: 800;
    color: #BC6C25;
    line-height: 1;
    letter-spacing: -0.03em;
}

.weight-unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6B6356;
}

.weight-secondary {
    font-size: 1rem;
    color: #6B6356;
    margin-bottom: 1.25rem;
}

.result-details {
    text-align: left;
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #E9E0D1;
}

.result-details p {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: #3D3A35;
}

.result-details p:last-child {
    margin-bottom: 0;
}

.result-note {
    font-size: 0.8rem;
    color: #8B7355;
    font-style: italic;
    line-height: 1.5;
}

/* ===== Info Section ===== */
.info-section {
    padding: 2.5rem 0;
    background-color: #FEFAE0;
}

.info-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #3D3A35;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #E9E0D1;
    transition: box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #BC6C25;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: #4A4540;
    line-height: 1.6;
}

/* ===== Tips Section ===== */
.tips-section {
    padding: 2.5rem 0 3.5rem;
    background-color: #FFFFFF;
    border-top: 1px solid #E9E0D1;
}

.tips-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #3D3A35;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tips-list li {
    padding: 0.75rem 1rem;
    background-color: #FAEDCD;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #3D3A35;
    line-height: 1.55;
    border-left: 4px solid #D4A373;
}

.tips-list li strong {
    color: #BC6C25;
}

/* ===== Footer ===== */
.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    background-color: #3D3A35;
    color: #CCD5AE;
    text-align: center;
    font-size: 0.85rem;
}

.site-footer a {
    color: #FAEDCD;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #FFFFFF;
}

/* ===== Privacy / Terms Pages ===== */
.legal-page {
    padding: 3rem 0;
    background-color: #FFFFFF;
    min-height: 60vh;
}

.legal-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #3D3A35;
}

.legal-content {
    max-width: 720px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A4540;
}

/* ===== How-to Page ===== */
.howto-page {
    padding: 3rem 0;
    background-color: #FEFAE0;
}

.howto-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #3D3A35;
}

.howto-page .subtitle {
    margin-bottom: 2rem;
    text-align: left;
    max-width: 100%;
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.howto-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #E9E0D1;
}

.howto-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #BC6C25;
    margin-bottom: 0.5rem;
}

.howto-card p, .howto-card ul {
    font-size: 0.9rem;
    color: #4A4540;
    line-height: 1.6;
}

.howto-card ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.howto-card li {
    margin-bottom: 0.4rem;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 600;
    color: #BC6C25;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .weight-number {
        font-size: 3rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .howto-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 2rem 0 1.5rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .calc-result {
        padding: 1.25rem;
    }

    .weight-number {
        font-size: 2.5rem;
    }
}



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