:root {
    color-scheme: light;
    --bg-1: #081120;
    --bg-2: #112b44;
    --card: rgba(255, 255, 255, 0.92);
    --card-strong: rgba(255, 255, 255, 0.98);
    --text: #123047;
    --muted: #557089;
    --accent: #0ea5c6;
    --accent-2: #18b981;
    --accent-3: #f59e0b;
    --border: rgba(14, 165, 198, 0.16);
    --shadow: 0 25px 70px rgba(4, 18, 34, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(24, 185, 129, 0.35), transparent 28%),
        radial-gradient(circle at top right, rgba(14, 165, 198, 0.28), transparent 30%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
    padding: 28px 18px 40px;
}

.page-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.hero-card,
.story-card,
.note-card,
.list-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    padding: 34px 30px 30px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: auto -120px -140px auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(14, 165, 198, 0.22), transparent 70%);
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: 'Gowun Batang', serif;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.12;
    max-width: 12ch;
}

.hero-copy {
    margin: 18px 0 0;
    max-width: 62ch;
    font-size: 1.03rem;
    line-height: 1.9;
    color: var(--muted);
}

.connection-banner {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #8a5411;
    font-weight: 700;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr;
    gap: 20px;
}

.story-card,
.note-card,
.list-card {
    padding: 26px;
}

.story-card h2,
.note-card h2,
.list-card h2 {
    font-size: 1.75rem;
    margin-bottom: 18px;
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid rgba(17, 43, 68, 0.08);
}

.timeline-item:first-child {
    border-top: none;
    padding-top: 0;
}

.timeline-badge {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(14, 165, 198, 0.25);
}

.timeline-item h3 {
    font-size: 1.22rem;
    margin-bottom: 8px;
}

.timeline-item p,
.note-copy,
.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.note-form {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.note-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}

.note-form input,
.note-form textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(17, 43, 68, 0.15);
    background: var(--card-strong);
    color: var(--text);
    padding: 14px 15px;
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.note-form input:focus,
.note-form textarea:focus {
    border-color: rgba(14, 165, 198, 0.55);
    box-shadow: 0 0 0 4px rgba(14, 165, 198, 0.13);
}

.note-form button {
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(24, 185, 129, 0.22);
}

.note-form button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.inline-error {
    margin: 0;
    min-height: 1.4em;
    color: #bf3e36;
    font-weight: 700;
}

.section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.note-list {
    display: grid;
    gap: 14px;
}

.note-item {
    border-radius: 20px;
    border: 1px solid rgba(17, 43, 68, 0.1);
    background: rgba(255, 255, 255, 0.88);
    padding: 16px 16px 15px;
}

.note-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}

.note-author {
    font-weight: 800;
    color: var(--text);
}

.note-time {
    color: var(--muted);
    font-size: 0.92rem;
}

.note-message {
    margin: 0;
    line-height: 1.8;
    color: #24435f;
}

.empty-state {
    padding: 22px 18px;
    border-radius: 18px;
    border: 1px dashed rgba(14, 165, 198, 0.35);
    color: var(--muted);
    background: rgba(14, 165, 198, 0.06);
}

.error-panel {
    border-radius: 22px;
    background: rgba(191, 62, 54, 0.1);
    border: 1px solid rgba(191, 62, 54, 0.22);
    color: #8f2c27;
    padding: 22px;
    line-height: 1.8;
}

.error-panel strong {
    display: block;
    margin-bottom: 8px;
}

@media (max-width: 920px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 14px 10px 24px;
    }

    .hero-card,
    .story-card,
    .note-card,
    .list-card {
        border-radius: 22px;
        padding: 20px 16px;
    }

    .note-item-head {
        flex-direction: column;
    }
}