:root {
    --bg: #FAF8F2;
    --bg-gradient-end: #F5E6D0;
    --text: #3D3028;
    --text-muted: #8B7355;
    --text-body: #4A3F35;
    --border: #E8DDD0;
    --accent: #3D3028;
    --accent-contrast: #FAF8F2;
    --radius: 999px;
    --max-content: 680px;
    --max-site: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.body-home {
    background: linear-gradient(135deg, var(--bg), var(--bg-gradient-end));
}

main {
    flex: 1;
}

/* --- Site header --- */
.site-header {
    padding: 1.25rem 1.5rem;
}
.site-header-inner {
    max-width: var(--max-site);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.site-nav {
    display: flex;
    gap: 1.25rem;
}
.site-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }

/* --- Home hero --- */
.hero {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.hero-inner {
    max-width: 480px;
}
.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.hero .tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.app-store-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: var(--accent-contrast);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(61, 48, 40, 0.15);
}
.app-store-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(61, 48, 40, 0.22);
}
.app-store-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* --- Content page (blog/release listing, privacy, etc.) --- */
.page {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.page-description {
    font-size: 1rem;
    color: var(--text-muted);
}

/* --- Post listing --- */
.post-list {
    list-style: none;
}
.post-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list a {
    display: block;
    color: var(--text);
    text-decoration: none;
}
.post-list a:hover h3 { color: var(--text-muted); }
.post-list time {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}
.post-list h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    transition: color 0.15s ease;
    letter-spacing: -0.01em;
}
.post-list .post-excerpt {
    font-size: 0.95rem;
    color: var(--text-body);
}
.post-list-empty {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Single post --- */
.post {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.post-header h1 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.post-header time {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.post-content {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.8;
}
.post-content h2 {
    font-size: 1.25rem;
    color: var(--text);
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}
.post-content h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.post-content li { margin-bottom: 0.35rem; }
.post-content strong { color: var(--text); font-weight: 600; }
.post-content code {
    background: rgba(61, 48, 40, 0.06);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.post-content pre {
    background: rgba(61, 48, 40, 0.06);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.25rem 0;
}
.post-content pre code {
    background: none;
    padding: 0;
}
.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    color: var(--text-muted);
    margin: 1.25rem 0;
    font-style: normal;
}
.post-content a {
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.post-content a:hover { border-bottom-color: var(--text); }
.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
}
.post-content figure {
    margin: 1.75rem auto;
    max-width: 440px;
}
.post-content figure img {
    margin: 0;
    width: 100%;
}
.post-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.post-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}
.post-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.post-nav a:hover { color: var(--text); }

/* --- Privacy list item typography --- */
.page-content h2 {
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.page-content p, .page-content li {
    font-size: 0.95rem;
    color: var(--text-body);
}
.page-content ul {
    padding-left: 1.2rem;
    margin-top: 0.3rem;
    margin-bottom: 1rem;
}
.page-content li { margin-bottom: 0.3rem; }
.page-content p { margin-bottom: 0.75rem; }
.page-content strong { color: var(--text); font-weight: 600; }
.page-content .date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Site footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}
.site-footer-inner {
    max-width: var(--max-site);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.site-footer a:hover { border-bottom-color: var(--text-muted); }

body.body-home .site-footer {
    border-top: none;
    background: transparent;
}

/* --- Responsive --- */
@media (max-width: 520px) {
    .hero h1 { font-size: 1.85rem; }
    .hero .tagline { font-size: 1rem; }
    .site-nav { gap: 0.9rem; }
    .site-nav a { font-size: 0.85rem; }
}
