
:root {
    --panel-bg: rgba(255, 255, 255, 0.92);
    --ink: #111827;
    --muted: #5f6b7a;
    --line: rgba(255, 255, 255, 0.42);
    --soft: rgba(240, 247, 255, 0.88);
    --header-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.84)),
        rgba(255, 255, 255, 0.44);
    --control-bg: rgba(255, 255, 255, 0.74);
    --card-bg: rgba(255, 255, 255, 0.76);
    --field-bg: #ffffff;
    --field-line: rgba(17, 24, 39, 0.12);
    --card-line: rgba(17, 24, 39, 0.08);
    --accent: #0b6b58;
    --accent-dark: #084d40;
    --gold: #d97706;
    --score-bg: #fff7e8;
    --body-overlay: linear-gradient(115deg, rgba(5, 20, 34, 0.78), rgba(5, 20, 34, 0.2) 48%, rgba(5, 20, 34, 0.74));
    --shadow: 0 26px 70px rgba(6, 21, 36, 0.28);
    --font-family: Arial, "Noto Sans KR", sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --panel-bg: rgba(12, 20, 30, 0.9);
    --ink: #f3f7fb;
    --muted: #aab7c6;
    --line: rgba(255, 255, 255, 0.14);
    --soft: rgba(17, 34, 50, 0.88);
    --header-bg: linear-gradient(180deg, rgba(13, 27, 40, 0.24), rgba(13, 27, 40, 0.86)),
        rgba(18, 32, 46, 0.66);
    --control-bg: rgba(18, 32, 46, 0.74);
    --card-bg: rgba(18, 32, 46, 0.76);
    --field-bg: #0f1d2a;
    --field-line: rgba(255, 255, 255, 0.16);
    --card-line: rgba(255, 255, 255, 0.12);
    --accent: #33c2a0;
    --accent-dark: #1e9d80;
    --gold: #f5b84b;
    --score-bg: rgba(245, 184, 75, 0.16);
    --body-overlay: linear-gradient(115deg, rgba(3, 8, 13, 0.9), rgba(8, 19, 30, 0.62) 48%, rgba(3, 8, 13, 0.88));
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        var(--body-overlay),
        url("https://images.unsplash.com/photo-1474487548417-781cb71495f3?auto=format&fit=crop&w=1800&q=85") center / cover fixed;
    color: var(--ink);
    font-family: var(--font-family);
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 42px 18px;
}

.project-switcher {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.project-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: var(--panel-bg);
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(6, 21, 36, 0.12);
}

.project-link:hover,
.project-link.active {
    background: var(--accent);
    color: #ffffff;
}

.planner {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-bg);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.planner-header {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px;
    border-radius: 14px;
    background: var(--header-bg);
}

.page-nav {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 120px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-link,
.link-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    padding: 0 13px;
    background: var(--card-bg);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.nav-link:hover,
.link-button:hover,
.nav-link.active {
    background: var(--soft);
}

.planner-content {
    display: grid;
    gap: 14px;
}

.theme-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-grid;
    grid-template-columns: 20px auto;
    gap: 6px;
    align-items: center;
    min-height: 40px;
    border: 1px solid var(--card-line);
    border-radius: 999px;
    padding: 0 13px;
    background: var(--card-bg);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(6, 21, 36, 0.08);
}

.theme-toggle:hover {
    background: var(--soft);
}

.theme-icon {
    line-height: 1;
    font-size: 17px;
}

.theme-text {
    font-size: 13px;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    font-size: 48px;
    line-height: 1.2;
}

.summary {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.controls {
    align-self: start;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--card-line);
    border-radius: 14px;
    background: var(--control-bg);
}

.controls label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

input {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--field-line);
    border-radius: 12px;
    padding: 0 13px;
    color: var(--ink);
    background: var(--field-bg);
    font: inherit;
}

textarea {
    min-height: 118px;
    width: 100%;
    resize: vertical;
    border: 1px solid var(--field-line);
    border-radius: 12px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--field-bg);
    font: inherit;
    line-height: 1.5;
}

button {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 0 20px;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

button:hover {
    background: var(--accent-dark);
}

input:focus,
textarea:focus,
button:focus-visible {
    outline: 3px solid rgba(15, 107, 85, 0.22);
    outline-offset: 2px;
}

.best-pick {
    min-height: 190px;
    display: grid;
    align-items: center;
    margin-bottom: 14px;
    padding: 24px;
    border: 1px solid var(--card-line);
    border-radius: 16px;
    background: var(--soft);
}

.best-label {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.best-pick h2 {
    margin-bottom: 10px;
    font-size: 32px;
    line-height: 1.22;
}

.best-score {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
}

.best-reason {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.55;
}

.weather-note,
.loading {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.day-list {
    display: grid;
    gap: 10px;
}

.day-card {
    display: grid;
    grid-template-columns: 1fr 58px;
    gap: 16px;
    align-items: center;
    min-height: 92px;
    padding: 15px 16px;
    border: 1px solid var(--card-line);
    border-radius: 14px;
    background: var(--card-bg);
}

.day-card .date {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 800;
}

.day-card .reason,
.day-card .weather {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.day-card strong {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--score-bg);
    color: var(--gold);
    font-size: 17px;
}

.action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-button {
    min-height: 46px;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    padding: 0 18px;
}

.link-button:hover {
    background: var(--accent-dark);
}

.link-button.secondary {
    background: var(--card-bg);
    color: var(--ink);
}

.link-button.secondary:hover {
    background: var(--soft);
}

.contact-form {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--card-line);
    border-radius: 16px;
    background: var(--control-bg);
}

.contact-heading h2 {
    margin-bottom: 4px;
    font-size: 22px;
    line-height: 1.25;
}

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.contact-form button {
    justify-self: start;
}

.hidden-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.comments {
    min-height: 180px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--card-line);
    border-radius: 16px;
    background: var(--control-bg);
}

.comments-heading h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.25;
}

.comment-form {
    display: grid;
    gap: 10px;
}

.comment-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.comment-form textarea {
    min-height: 92px;
}

.comment-form button {
    justify-self: start;
}

.comment-form button:disabled {
    cursor: wait;
    opacity: 0.64;
}

.comment-status {
    min-height: 20px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.comment-status[data-state="error"] {
    color: #b91c1c;
}

.comment-status[data-state="ok"] {
    color: var(--accent);
}

.comment-list {
    display: grid;
    gap: 10px;
}

.comment-item {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--card-line);
    border-radius: 14px;
    background: var(--card-bg);
}

.comment-meta {
    display: flex;
    gap: 8px;
    align-items: baseline;
    justify-content: space-between;
}

.comment-meta strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.comment-meta time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
}

.comment-item p,
.empty-comments {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.standalone {
    align-self: start;
}

.animal-panel,
.animal-form,
.animal-result {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--card-line);
    border-radius: 16px;
    background: var(--control-bg);
}

.upload-box {
    display: grid;
    gap: 6px;
    border: 1px dashed var(--field-line);
    border-radius: 14px;
    padding: 18px;
    background: var(--field-bg);
    cursor: pointer;
}

.upload-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.upload-copy {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.upload-box input {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.preview-frame {
    min-height: 220px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--card-line);
    border-radius: 14px;
    background: var(--soft);
}

.preview-frame img {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: cover;
}

.animal-form fieldset {
    display: grid;
    gap: 9px;
    margin: 0;
    border: 0;
    padding: 0;
}

.animal-form legend {
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.animal-form label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.animal-form input[type="radio"] {
    min-height: auto;
    width: 16px;
}

.animal-result h2 {
    margin-bottom: 0;
    font-size: 30px;
    line-height: 1.22;
}

@media (max-width: 760px) {
    .app {
        padding: 18px 12px;
        align-items: flex-start;
    }

    .planner {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 16px;
    }

    .planner-header {
        min-height: 260px;
        padding: 22px;
        justify-content: flex-end;
    }

    .page-nav {
        position: static;
        margin-bottom: 56px;
    }

    h1 {
        font-size: 34px;
    }

    .input-row,
    .day-card,
    .form-grid,
    .project-switcher {
        grid-template-columns: 1fr;
    }

    .best-pick h2 {
        font-size: 25px;
    }

    .day-card strong {
        width: auto;
        height: 36px;
        border-radius: 8px;
    }
}
