:root {
  color-scheme: light;
  --bg: #f4f1e9;
  --surface: #fffdf8;
  --surface-strong: #ebe6da;
  --ink: #17302a;
  --muted: #68756f;
  --line: #dcd7ca;
  --accent: #1f6657;
  --accent-soft: #dcebe6;
  --warm: #b9633f;
  --shadow: 0 18px 50px rgb(32 48 42 / 8%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header-wrap { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgb(220 215 202 / 85%); background: rgb(244 241 233 / 90%); backdrop-filter: blur(16px); }
.site-header { width: min(1180px, calc(100% - 2rem)); min-height: 76px; margin: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 760; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; font-size: .82rem; letter-spacing: .05em; }
.brand-name { letter-spacing: -.02em; }
.main-nav, .account-nav { display: flex; align-items: center; gap: 1.15rem; }
.main-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a, .account-nav a, .text-button { flex: 0 0 auto; border: 0; background: none; padding: .45rem 0; color: var(--muted); font: inherit; text-decoration: none; cursor: pointer; }
.main-nav a:hover, .account-nav a:hover, .text-button:hover { color: var(--ink); }
.account-nav form { margin: 0; }
.admin-link { padding: .55rem .9rem !important; border: 1px solid var(--line) !important; border-radius: 999px; background: var(--surface) !important; }

.home-hero { min-height: 510px; padding: clamp(5rem, 11vw, 9rem) 0 5rem; display: flex; flex-direction: column; justify-content: space-between; border-bottom: 1px solid var(--line); }
.home-hero > div { max-width: 880px; }
.home-hero h1, .page-hero h1, .entry-detail h1, .travel-detail h1 { max-width: 980px; margin: .45rem 0 1.25rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.2rem, 9vw, 7rem); font-weight: 500; line-height: .96; letter-spacing: -.055em; }
.home-hero h1 { font-size: clamp(3.4rem, 10vw, 7.8rem); }
.eyebrow, .card-kicker { margin: 0; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-copy, .lead { max-width: 720px; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.welcome-note { align-self: flex-end; margin: 2rem 0 0; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); }

.section-heading { padding: 4.5rem 0 2rem; display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.section-heading h2 { margin: .35rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 500; letter-spacing: -.04em; }
.quiet-link, .read-more { color: var(--accent); font-weight: 700; text-underline-offset: .22rem; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-bottom: 6rem; }
.category-card { min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 transparent; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-card:hover { transform: translateY(-4px); border-color: #c8c0af; box-shadow: var(--shadow); }
.category-card--travel { background: #183b33; color: #f7f2e8; border-color: #183b33; }
.category-card--diary { background: #ede2d3; }
.category-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 1.25rem; opacity: .82; }
.category-card h3 { margin: .25rem 0 .35rem; font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 500; letter-spacing: -.04em; }
.category-card p:last-child { max-width: 480px; margin: 0; color: inherit; opacity: .72; }
.category-card--travel .card-kicker { color: #a8d1c6; }

.page-hero { padding: clamp(4.5rem, 10vw, 8rem) 0 3.5rem; border-bottom: 1px solid var(--line); }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding: 3rem 0 6rem; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.card-cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 0; object-fit: cover; }
.card-content { padding: clamp(1.25rem, 3vw, 2rem); }
.post-card h2 { margin: .8rem 0 .6rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; letter-spacing: -.035em; }
.post-card h2 a { text-decoration: none; }
.post-card p, .meta { color: var(--muted); }
.meta { min-height: 25px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .84rem; }
.visibility-badge { display: inline-flex; align-items: center; width: fit-content; padding: .28rem .55rem; border-radius: 999px; background: var(--surface-strong); color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .02em; }
.visibility-public { background: #dcecdf; color: #2a6039; }
.visibility-members { background: #e5e5f2; color: #4c4c78; }
.visibility-admin { background: #f0ddd6; color: #8b432b; }

.travel-detail, .entry-detail { padding: clamp(4rem, 9vw, 7rem) 0 3rem; }
.back { display: inline-block; margin-bottom: 2.5rem; color: var(--muted); text-underline-offset: .2rem; }
.body-copy { max-width: 780px; margin-top: 2.5rem; font-size: 1.08rem; }
.prose p { margin: 0 0 1.35rem; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 3rem 0; }
figure { margin: 0; }
figure img, figure video { width: 100%; display: block; border-radius: 16px; background: #111; }
figcaption { margin-top: .45rem; color: var(--muted); font-size: .84rem; }

.timeline { max-width: 860px; padding: 3rem 0 6rem; }
.timeline-entry { display: grid; grid-template-columns: 90px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.timeline-entry time { display: flex; flex-direction: column; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timeline-entry time strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 500; line-height: 1; }
.timeline-entry time span { font-size: .72rem; }
.timeline-entry h2 { margin: .45rem 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.timeline-entry h2 a { text-decoration: none; }
.timeline-entry p { color: var(--muted); }

.comments, .login-card, .empty-state { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.comments { max-width: 780px; margin: 2rem 0 6rem; padding: clamp(1.25rem, 4vw, 2rem); }
.comments article { padding: 1rem 0; border-top: 1px solid var(--line); }
.comment-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.login-card { width: min(540px, 100%); margin: clamp(4rem, 10vw, 8rem) auto; padding: clamp(1.5rem, 5vw, 3rem); box-shadow: var(--shadow); }
.login-card h1 { margin: .5rem 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 7vw, 4.5rem); font-weight: 500; letter-spacing: -.05em; }
.login-card > p { color: var(--muted); }
.login-card label { display: block; margin-bottom: .3rem; font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 2.5rem; }
.empty-state h2 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }

input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: .85rem; background: #fff; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
button[type="submit"]:not(.text-button) { border: 0; border-radius: 999px; padding: .78rem 1.15rem; background: var(--accent); color: #fff; font-weight: 750; cursor: pointer; }
.error { color: #a1342d !important; }
.message { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--accent-soft); }
.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.footer-inner { min-height: 100px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

@media (max-width: 850px) {
  .site-header { grid-template-columns: auto 1fr; gap: 1rem; padding: .8rem 0; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; order: 3; padding-bottom: .15rem; }
  .account-nav { justify-self: end; }
  .category-grid, .post-grid, .media-grid { grid-template-columns: 1fr; }
  .home-hero { min-height: 440px; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .account-nav { gap: .65rem; }
  .home-hero h1, .page-hero h1, .entry-detail h1, .travel-detail h1 { font-size: clamp(2.9rem, 17vw, 5rem); }
  .section-heading, .footer-inner { align-items: flex-start; flex-direction: column; }
  .timeline-entry { grid-template-columns: 62px 1fr; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
