/* bmi — 頁面樣式（/bmi.css） */
body.page-bmi {
  font-family: 'Microsoft JhengHei', Arial, sans-serif;
  background: var(--bg-main);
  min-height: 100vh;
}

/* 主欄高於常見側欄／錨定廣告底層，減少表單被蓋住；仍可能被最高層蓋板擋住，故搭配下方內距 */
body.page-bmi .bmi-main {
  position: relative;
  z-index: 5;
  isolation: isolate;
}

/* Main Content */
        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 1.5rem 1rem;
        }
        
        .card {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .card-title {
            font-size: 1.75rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 0.5rem;
            color: #1f2937;
            background: linear-gradient(135deg, #333 0%, #888 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .card-subtitle {
            text-align: center;
            color: #6b7280;
            font-size: 0.95rem;
            margin-bottom: 2rem;
        }
        
        .section-divider {
            border: none;
            border-top: 2px dashed #e5e7eb;
            margin: 2.5rem 0;
        }
        
        .input-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .input-row--bmi-hw {
            grid-template-columns: minmax(0, 1fr);
            width: 100%;
            max-width: 100%;
            justify-items: center;
        }

        .input-row--bmi-hw .input-group--bmi-field {
            margin-bottom: 0;
            width: 50%;
            max-width: 100%;
            min-width: 0;
            margin-left: auto;
            margin-right: auto;
            justify-self: center;
        }

        .input-row--bmi-hw .input-group--bmi-field .input-wrapper {
            width: 100%;
            max-width: none;
        }

        .input-group .input-group__label-bmi {
            display: block;
            font-size: 1rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.65rem;
            line-height: 1.45;
            text-align: center;
        }

        .input-row--bmi-hw .input-group--bmi-field input[type="number"] {
            font-size: 1.25rem;
            text-align: center;
        }

        @media (max-width: 520px) {
            .input-row--bmi-hw .input-group--bmi-field {
                width: 100%;
            }
        }

        @media (min-width: 1024px) {
            body.page-bmi .bmi-main .container {
                padding-left: clamp(1rem, 4vw, 2.5rem);
                padding-right: clamp(1.25rem, 10vw, 5rem);
            }
        }
        
        .input-group {
            margin-bottom: 1rem;
        }
        
        .input-group label {
            display: block;
            font-size: 0.95rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.5rem;
        }
        
        .input-wrapper {
            position: relative;
        }
        
        .input-group input[type="number"],
        .input-group input[type="text"] {
            width: 100%;
            padding: 0.75rem 3rem 0.75rem 1rem;
            font-size: 1.125rem;
            border: 2px solid #d1d5db;
            border-radius: 0.5rem;
            transition: all 0.3s;
            font-weight: 600;
            color: #1f2937;
        }
        
        .input-group input:focus {
            outline: none;
            border-color: #555;
            box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.12);
        }
        
        .input-icon {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 0.875rem;
            font-weight: 600;
            pointer-events: none;
        }
        
        .result-box {
            background: linear-gradient(135deg, rgba(51, 51, 51, 0.08) 0%, rgba(136, 136, 136, 0.08) 100%);
            border-radius: 0.75rem;
            padding: 1.5rem;
            margin-top: 1.5rem;
            border: 2px solid rgba(51, 51, 51, 0.2);
        }
        
        .result-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .result-row:last-child {
            border-bottom: none;
        }
        
        .result-label {
            font-size: 0.95rem;
            color: #4b5563;
            font-weight: 500;
        }
        
        .result-value {
            font-size: 1.25rem;
            font-weight: bold;
            color: #444;
        }
        
        .bmi-indicator {
            text-align: center;
            padding: 1.5rem;
            margin-top: 1rem;
            border-radius: 0.75rem;
            font-size: 1.125rem;
            font-weight: bold;
            transition: all 0.3s;
        }
        
        .bmi-underweight {
            background: #fef3c7;
            color: #92400e;
            border: 2px solid #fbbf24;
        }
        
        .bmi-normal {
            background: #d1fae5;
            color: #065f46;
            border: 2px solid #10b981;
        }
        
        .bmi-overweight {
            background: #fed7aa;
            color: #9a3412;
            border: 2px solid #f97316;
        }
        
        .bmi-obese {
            background: #fecaca;
            color: #991b1b;
            border: 2px solid #ef4444;
        }
        
        .bmi-extreme {
            background: #fce7f3;
            color: #831843;
            border: 2px solid #ec4899;
        }
        
        /* BMI Chart */
        .bmi-chart {
            margin: 2rem 0;
        }
        
        .bmi-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            background: white;
            border-radius: 0.5rem;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .bmi-table th,
        .bmi-table td {
            padding: 0.875rem;
            text-align: left;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .bmi-table th {
            background: linear-gradient(135deg, #333 0%, #888 100%);
            color: white;
            font-weight: 600;
            font-size: 0.95rem;
        }
        
        .bmi-table td {
            font-size: 0.9rem;
            color: #4b5563;
        }
        
        .bmi-table tr:last-child td {
            border-bottom: none;
        }
        
        .bmi-table tr:hover {
            background: #f9fafb;
        }
        
        /* Info Box */
        .info-box {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .info-box h3 {
            font-size: 1.5rem;
            font-weight: bold;
            color: #1f2937;
            margin-bottom: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, #333 0%, #888 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .info-content {
            color: #4b5563;
            line-height: 1.8;
        }
        
        .info-content h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            margin: 1.5rem 0 0.75rem 0;
        }
        
        .info-content p {
            margin-bottom: 1rem;
        }
        
        .info-content ul {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }
        
        .info-content li {
            margin: 0.5rem 0;
        }
        
        .info-content strong {
            color: #444;
            font-weight: 600;
        }
        
        .formula-box {
            background: #f9fafb;
            border-left: 4px solid #555;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
            font-family: 'Courier New', monospace;
        }
        
        .example-box {
            background: #eff6ff;
            border-left: 4px solid #3b82f6;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }
        
        .tip-box {
            background: #f0fdf4;
            border-left: 4px solid #10b981;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }
        
        .hero {
            text-align: center;
            padding: 2rem 1rem;
        }
        
        .hero img {
            max-width: 30px;
            height: auto;
            vertical-align: middle;
        }
        
        .hero a {
            display: inline-block;
            background: white;
            padding: 1rem 2rem;
            border-radius: 0.75rem;
            text-decoration: none;
            color: #444;
            font-weight: bold;
            font-size: 1.125rem;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: all 0.3s;
            margin-bottom: 2rem;
        }
        
        .hero a:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        .hero {
            text-align: center;
            color: white;
            margin-bottom: 3rem;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .calculator-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        

        .calculator-card {
            background: #eae6dd;
            border-radius: 15px;
            padding: 1rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .calculator-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.3);
        }
.calculator-card a {
    text-decoration: none; /* 去除底線 */
    font-weight: bold;     /* 粗體 */
    color: #222;           /* 顏色 #222 */
}
   .calculator-card h3 {
            color: #222;
            margin-bottom: 1rem;
            font-size: 1rem;
        }

        .calculator-card p {
            color: #666;
            line-height: 1;
        }

        .icon {
            font-size: 2rem;
            margin-bottom: 0rem;
        }
