:root {
    --bg: #effaf9;
    --surface: #ffffff;
    --surface-soft: #f8ffff;
    --text: #1f2526;
    --muted: #687879;
    --line: #cfe9e6;
    --primary: #0f7f82;
    --primary-dark: #0d5f62;
    --primary-soft: #d9f4f1;
    --accent: #4abeb8;
    --accent-strong: #20a7a0;
    --danger: #b95b5b;
    --danger-bg: #fff0f0;
    --warning-bg: #fff7e7;
    --warning-border: #f1c981;
    --shadow: 0 18px 46px rgba(31, 129, 130, 0.13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, rgba(74, 190, 184, 0.16), transparent 28%), var(--bg);
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(239, 250, 249, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { font-weight: 900; letter-spacing: 0.04em; font-size: 20px; }
.nav { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 700; }
.nav-button { padding: 8px 14px; border-radius: 999px; background: var(--primary); color: #fff; }

.hero { padding: 88px 20px 72px; }
.hero-inner, .section-inner, .timeline-hero, .timeline-wrap { max-width: 1080px; margin: 0 auto; }
.eyebrow { color: var(--accent-strong); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 900; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.12; letter-spacing: -0.04em; margin: 0 0 24px; }
.lead, .auth-lead { max-width: 760px; font-size: 18px; color: var(--muted); margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    border: 0;
    cursor: pointer;
}
.button.primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(15, 127, 130, 0.22); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.button.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #efc1c1; }

.section-inner { padding: 0 20px; }
.concept, .public-entries { padding: 40px 0 72px; }
.concept h2, .public-entries h2 { font-size: 30px; line-height: 1.3; margin: 0 0 24px; }
.concept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.concept-card, .entry-card, .empty-box, .auth-card, .stat-card, .detail-card, .private-note-box, .timeline-card, .timeline-cta-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.concept-card h3, .entry-card h3 { margin: 0 0 10px; font-size: 18px; }
.concept-card p, .short-comment { margin: 0; color: var(--muted); font-size: 15px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title-row h2 { margin: 0; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 14px; }
.entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.entry-meta span { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 800; }
.short-comment.muted { color: #9aa; }
.posted-by { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.empty-box { text-align: center; color: var(--muted); }
.empty-box.warning { background: var(--warning-bg); border-color: var(--warning-border); color: #7b4d00; }
.empty-box p { margin: 4px 0; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.auth-page, .dashboard-page, .detail-page, .timeline-page { min-height: calc(100vh - 72px); padding: 64px 20px 88px; }
.auth-card { max-width: 560px; margin: 0 auto; padding: 34px; }
.entry-form-card { max-width: 820px; }
.auth-title { margin: 0 0 14px; font-size: clamp(32px, 5vw, 54px); line-height: 1.18; letter-spacing: -0.04em; }
.form { display: grid; gap: 12px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-label { font-weight: 800; font-size: 14px; margin-top: 8px; }
.form-input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; font-size: 16px; background: #fff; color: var(--text); }
.textarea { padding-top: 12px; resize: vertical; }
.form-input:focus { outline: 3px solid rgba(74, 190, 184, 0.22); border-color: var(--accent); }
.form-help { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.form-submit { margin-top: 14px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.split-actions { justify-content: space-between; align-items: center; }
.auth-switch { margin: 24px 0 0; color: var(--muted); text-align: center; }
.auth-switch a, .section-title-row a, .mini-actions a { color: var(--primary-dark); font-weight: 800; }
.alert { border-radius: 18px; padding: 14px 16px; margin: 0 0 22px; }
.alert ul { margin: 0; padding-left: 20px; }
.alert.error { background: #fff0f0; border: 1px solid #f2b8b8; color: #8a1f1f; }

.dashboard-hero { max-width: 1080px; margin: 0 auto 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.stats-grid { max-width: 1080px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat-card { padding: 22px; }
.stat-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-card strong { font-size: 30px; line-height: 1; }
.dashboard-section { margin-top: 28px; }
.disabled { opacity: 0.55; pointer-events: none; }

.detail-page { max-width: 980px; margin: 0 auto; }
.detail-card { padding: 34px; }
.detail-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; margin-top: 24px; }
.detail-grid h2, .private-note-box h2 { font-size: 20px; margin: 0 0 12px; }
.detail-list { margin: 0; }
.detail-list dt { color: var(--muted); font-size: 13px; font-weight: 800; margin-top: 12px; }
.detail-list dd { margin: 2px 0 0; font-weight: 700; }
.detail-text { color: var(--muted); margin: 0 0 14px; }
.private-note-box { margin-top: 20px; background: var(--surface-soft); }
.private-note-box p { color: var(--muted); margin: 0; }
.mini-actions { margin-top: 14px; display: flex; gap: 14px; font-size: 14px; }

/* Timeline */
.timeline-hero { padding: 0 20px 32px; }
.timeline-wrap { padding: 0 20px; }
.timeline-month { margin: 0 0 42px; }
.timeline-month h2 { font-size: 24px; margin: 0 0 18px; color: var(--primary-dark); }
.timeline-list { position: relative; display: grid; gap: 18px; }
.timeline-list::before { content: ""; position: absolute; left: 135px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 120px 24px 1fr; gap: 14px; align-items: start; }
.timeline-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 4px solid var(--bg); margin-top: 8px; z-index: 1; }
.timeline-date { color: var(--muted); font-weight: 800; font-size: 13px; padding-top: 5px; text-align: right; }
.timeline-card h3 { font-size: 22px; line-height: 1.35; margin: 0 0 8px; }
.timeline-creator, .timeline-method { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.timeline-private-preview { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--surface-soft); border: 1px dashed var(--line); color: var(--muted); }
.timeline-private-preview strong { display: block; color: var(--primary-dark); margin-bottom: 4px; }
.timeline-private-preview p { margin: 0; }
.timeline-item.public .timeline-private-preview { display: none; }
.timeline-cta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.timeline-cta-card { display: block; }
.timeline-cta-card span { display: inline-flex; color: var(--primary-dark); font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.timeline-cta-card strong { display: block; font-size: 24px; margin-bottom: 8px; }
.timeline-cta-card p { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
    .header-inner { padding: 14px 16px; }
    .nav { gap: 10px; }
    .hero { padding: 64px 18px 56px; }
    .concept-grid, .entry-list, .stats-grid, .detail-grid, .form-grid.two, .form-grid.three, .timeline-cta-grid { grid-template-columns: 1fr; }
    .section-title-row, .dashboard-hero { display: block; }
    .section-title-row p { margin-top: 6px; }
    .auth-card, .detail-card { padding: 26px 20px; }
    .split-actions { align-items: flex-start; }
    .timeline-list::before { left: 7px; }
    .timeline-item { grid-template-columns: 16px 1fr; gap: 12px; }
    .timeline-date { grid-column: 2; text-align: left; padding-top: 0; }
    .timeline-dot { grid-row: 1 / span 2; margin-top: 4px; }
    .timeline-card { grid-column: 2; }
}
