:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --accent: #0f172a;
    --accent-soft: #eef2f8;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Pretendard", "Noto Sans KR", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 0 0, #ffffff 0, var(--bg) 42%);
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 72px;
    padding: 12px 0;
}

.brand {
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-right: 0;
}

.top-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #1f2937;
    border: 1px solid var(--line-strong);
    background: var(--surface-soft);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: all 0.18s ease;
}

.nav-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e4e9f2;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.nav-btn:hover {
    background: #e9eef8;
    transform: translateY(-1px);
    border-color: #b8c2d3;
}

.nav-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.nav-btn.active .nav-ico {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

main.shell {
    padding: 28px 0 34px;
}

.page-hero {
    max-width: 760px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.hero-sub {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.panel,
.tool-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 20px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.youtube-card {
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 16px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.youtube-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.tile-label {
    margin: 0;
    color: #6b7280;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.youtube-card h3 {
    margin: 10px 0 8px;
    font-size: 1.04rem;
}

.youtube-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 11px 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
    line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(18, 24, 38, 0.08);
}

.subjects-container {
    display: grid;
    gap: 10px;
    margin: 8px 0 16px;
}

.subject-row {
    display: grid;
    grid-template-columns: 1.8fr 0.9fr 0.9fr auto auto;
    gap: 8px;
    align-items: center;
}

.major-checkbox,
.salary-check {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #3b4452;
    font-size: 0.92rem;
    white-space: nowrap;
}

.major-checkbox input,
.salary-check input {
    width: auto;
}

.delete-subject-btn,
.calculator-actions button {
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.calculator-actions button {
    background: var(--accent);
    color: #fff;
}

.calculator-actions button:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.delete-subject-btn {
    background: var(--surface-soft);
    border-color: var(--line-strong);
    color: #334155;
}

.delete-subject-btn:hover {
    background: #edf2f7;
}

.result-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 16px;
}

.result-box p {
    margin: 7px 0;
    line-height: 1.5;
}

.result-box hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 12px 0;
}

.cover-letter-input {
    margin-bottom: 12px;
}

.salary-fields,
.interview-fields {
    display: grid;
    gap: 12px;
    margin: 8px 0 16px;
}

.interview-fields {
    grid-template-columns: 1fr 1fr;
}

.salary-field,
.interview-field {
    display: grid;
    gap: 6px;
}

.salary-note {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 14px 2px 0;
    line-height: 1.5;
}

.refiner-grid,
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.refiner-grid {
    margin-bottom: 14px;
}

.refiner-col h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.compare-preview {
    margin: 0;
    min-height: 132px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 10px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.interview-result + .interview-result {
    margin-top: 12px;
}

.question-list {
    margin: 8px 0 0;
    padding-left: 20px;
    line-height: 1.7;
}

.answer-template {
    margin-top: 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 12px;
    white-space: pre-wrap;
    line-height: 1.65;
}

@media (max-width: 920px) {
    .youtube-grid,
    .refiner-grid,
    .compare-grid,
    .interview-fields {
        grid-template-columns: 1fr;
    }

    .subject-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .shell {
        width: calc(100% - 20px);
    }

    .panel,
    .tool-card {
        padding: 16px;
    }

    .subject-row {
        grid-template-columns: 1fr;
    }

    .top-nav {
        grid-template-columns: 1fr 1fr;
    }
}
