:root {
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fff7ed;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}
.nav-logo img { width: 28px; height: 28px; border-radius: 6px; }
.nav-badge {
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #fed7aa;
}
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.15s; }
.nav-link:hover { color: var(--accent); }
.btn-nav {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background 0.15s, transform 0.1s;
}
.btn-nav:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* HERO */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1c2a3a 100%);
    color: white;
    padding: 60px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(249,115,22,0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 4s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
@keyframes glow { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.7;transform:scale(1.1)} }
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(249,115,22,0.15);
    border: 1px solid rgba(249,115,22,0.4);
    color: #fdba74;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    color: white;
}
.hero-sub-title {
    font-size: 1.1rem;
    color: #fdba74;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-desc {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 0;
}
.hero-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.hero-tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 20px;
}

/* MAIN */
.main { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }

/* CARD */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.section-h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.section-tag {
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.06em;
}

/* RULE SELECTOR */
.rule-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.rule-btn {
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.3;
}
.rule-btn:hover { border-color: var(--accent); color: var(--accent); }
.rule-btn.active { border-color: var(--accent); background: var(--accent); color: white; }
.rule-sub { display: block; font-size: 0.65rem; font-weight: 400; opacity: 0.85; margin-top: 2px; }

/* CALC INPUTS */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.input-block label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
    background: white;
}
.input-wrap input[type=number] {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    padding: 12px 16px;
    width: 0;
    -moz-appearance: textfield;
}
.input-wrap input[type=number]::-webkit-inner-spin-button,
.input-wrap input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.unit-label { font-size: 1rem; font-weight: 600; color: var(--text-muted); padding: 0 16px 0 0; }
.slider-row { margin-top: 8px; }
.slider-row input[type=range] { width: 100%; accent-color: var(--accent); height: 4px; cursor: pointer; }
.slider-hints { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* RESULT */
.result-box {
    border-radius: var(--radius-sm);
    padding: 24px 28px;
    border: 2px solid var(--border);
    transition: all 0.35s ease;
    background: var(--bg);
}
.result-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.result-temp-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.result-temp-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.3s;
}
.result-chips { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 160px; }
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    transition: all 0.3s;
    width: fit-content;
    border: 1.5px solid transparent;
}
.level-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rest-info { font-size: 0.88rem; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.rest-info::before { content: '⏱'; }

/* LEVEL GUIDE */
.level-guide { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 20px; }
.level-item { border-radius: var(--radius-sm); padding: 14px; border: 2px solid; transition: transform 0.15s; }
.level-item:hover { transform: translateY(-2px); }
.level-item.safe { background: #eff6ff; border-color: #bfdbfe; }
.level-item.watch { background: #fefce8; border-color: #fde68a; }
.level-item.warn { background: #fff7ed; border-color: #fed7aa; }
.level-item.danger { background: #fef2f2; border-color: #fecaca; }
.level-name { font-size: 0.95rem; font-weight: 800; margin-bottom: 2px; }
.safe .level-name { color: #1d4ed8; }
.watch .level-name { color: #b45309; }
.warn .level-name { color: #c2410c; }
.danger .level-name { color: #b91c1c; }
.level-range { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 6px; }
.level-action { font-size: 0.73rem; color: var(--text); line-height: 1.5; }

/* INFO GRID */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-item { background: var(--bg); border-radius: var(--radius-sm); padding: 20px; border: 1px solid var(--border); }
.info-icon { font-size: 1.5rem; margin-bottom: 8px; }
.info-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.info-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* TABLE */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.78rem; min-width: 480px; }
th { background: #f1f5f9; color: var(--text-muted); font-weight: 700; padding: 8px 10px; text-align: center; border: 1px solid var(--border); white-space: nowrap; font-size: 0.72rem; }
td { padding: 6px 10px; text-align: center; border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
td.row-header { background: #f8fafc; color: var(--text-muted); font-family: 'Noto Sans KR', sans-serif; font-weight: 700; font-size: 0.72rem; }
td.lv-safe-cell { background: #eff6ff; color: #1d4ed8; }
td.lv-watch-cell { background: #fefce8; color: #b45309; }
td.lv-warn-cell { background: #fff7ed; color: #c2410c; }
td.lv-danger-cell { background: #fef2f2; color: #b91c1c; font-weight: 700; }
td.highlighted { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
.table-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
    width: 100%; background: none; border: none; text-align: left;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem; font-weight: 700; color: var(--text);
    padding: 18px 0; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: color 0.15s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .arrow { font-size: 1rem; transition: transform 0.25s; flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 0 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }
.faq-a-inner strong { color: var(--text); }
.faq-a-inner ul { margin: 10px 0 0 20px; line-height: 2.1; }

/* APP CTA */
.app-cta {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.app-cta::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(249,115,22,0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.app-cta-inner { position: relative; z-index: 1; }
.app-cta h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.app-cta p { color: #94a3b8; font-size: 0.9rem; margin-bottom: 24px; }
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1rem;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(249,115,22,0.4);
}
.btn-download:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(249,115,22,0.5); }
.app-features { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.app-feature { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #94a3b8; }
.app-feature::before { content: '✓'; color: #4ade80; font-weight: 700; }

/* SOURCE NOTE */
.source-note {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.9;
}
.source-note a { color: #3b82f6; text-decoration: none; }
.source-note a:hover { text-decoration: underline; }

/* FOOTER */
footer {
    background: #0f172a;
    color: #64748b;
    text-align: center;
    padding: 28px 24px;
    font-size: 0.82rem;
    line-height: 1.9;
}
footer a { color: #94a3b8; text-decoration: none; }
footer a:hover { color: white; }

@media (max-width: 600px) {
    .calc-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .level-guide { grid-template-columns: repeat(2,1fr); }
    .nav-link { display: none; }
    .hero { padding: 44px 16px 60px; }
    .main { padding: 28px 16px 60px; }
    .card { padding: 22px 18px; }
    .result-temp-val { font-size: 2.6rem; }
}
