/* ============================================================
   Roadlife.rocks — Rustic Cabin Design System
   Homey, hand-crafted, nature-inspired. Like a well-worn trail
   journal crossed with a cozy cabin wall full of polaroids.
   ============================================================ */

:root {
  /* earthy palette */
  --bark: #3e2f23;
  --bark-dark: #2c211a;
  --wood: #6b4f3a;
  --wood-light: #8f6f52;
  --forest: #3d5a3f;
  --forest-deep: #2a4130;
  --moss: #6b7f5c;
  --sage: #a8b89a;
  --terracotta: #c4643b;
  --amber: #d9a441;
  --parchment: #f6f0e3;
  --paper: #fdf9ef;
  --paper-dark: #efe6d2;
  --ink: #3a3128;
  --ink-soft: #6b5f4f;
  --stitch: #b8a888;
  --shadow: 0 3px 14px rgba(62, 47, 35, 0.18);
  --shadow-lift: 0 8px 24px rgba(62, 47, 35, 0.28);
  --radius: 6px;             /* rustic = barely rounded */
  --radius-sm: 4px;
  --font-head: 'Bitter', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-hand: 'Caveat', cursive;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--parchment);
  /* subtle handmade paper texture */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(217, 164, 65, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(61, 90, 63, 0.05) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(62,47,35,0.008) 3px, rgba(62,47,35,0.008) 4px);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 17px;
}

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 20px; position: relative; z-index: 1; }

/* app shell: top bar + side panel + content */
.app-shell {
  display: flex;
  align-items: stretch;
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
  z-index: 1;
}
.content-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   Nature backdrop — images fold over each other as you scroll.
   Fixed layers; scroll JS drives clip-path reveals. A parchment
   veil keeps every word perfectly readable.
   ============================================================ */
.bg-stack {
  position: fixed; inset: 0;
  z-index: 0; overflow: hidden;
  pointer-events: none;
}
.bg-layer {
  position: absolute; inset: -4%;            /* bleed for parallax drift */
  background-size: cover; background-position: center;
  will-change: clip-path, transform, opacity;
  /* default: only first layer visible; JS reveals the rest */
}
/* two landscapes: mountains on top, desert sunset folds in as you scroll */
.bg-layer:nth-child(1) { z-index: 1; }
.bg-layer:nth-child(2) { z-index: 2; clip-path: inset(100% 0 0 0); }
.bg-veil {
  position: absolute; inset: 0; z-index: 6;
  /* gentle warm haze: photos clearly visible, paper cards carry the text */
  background:
    radial-gradient(ellipse at 50% 20%, rgba(246, 240, 227, 0.10) 0%, rgba(246, 240, 227, 0.30) 78%),
    linear-gradient(180deg, rgba(246,240,227,0.16) 0%, rgba(246,240,227,0.38) 100%);
}
body { background-color: var(--parchment); }   /* fallback behind photos */
.navbar { position: sticky; top: 0; z-index: 1000; }
.footer, .flash-container { position: relative; z-index: 10; }
.flash-container { z-index: 1001; }
/* content surfaces stay opaque for readability */
.card, .form-card, .post-item, .comment, .filter-bar, .table-wrap,
.stat-card, .map-legend, .checklist-item, .notice, .alert-banner,
.weather-day {
  /* already paper-backed; re-affirm opacity */
  background-blend-mode: normal;
}
/* hero becomes translucent so the mountains show through */
.hero {
  background:
    linear-gradient(160deg, rgba(42, 65, 48, 0.82) 0%, rgba(61, 90, 63, 0.78) 55%, rgba(107, 127, 92, 0.72) 100%);
  backdrop-filter: blur(2px);
}
@media (max-width: 640px) {
  .bg-veil { background: linear-gradient(180deg, rgba(246,240,227,0.6) 0%, rgba(246,240,227,0.78) 100%); }
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--bark); letter-spacing: -0.02em; }

a { color: var(--forest); }
a:hover { color: var(--terracotta); }

/* ---------- Top bar — slim trailhead sign ---------- */
.navbar {
  background: linear-gradient(180deg, var(--wood) 0%, var(--bark) 85%, var(--bark-dark) 100%);
  box-shadow: 0 3px 12px rgba(44, 33, 26, 0.4);
  border-bottom: 4px solid var(--amber);
}
.navbar::after {  /* carved notch effect */
  content: ''; display: block; height: 5px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 12px, transparent 12px 24px);
  opacity: 0.55;
}
.nav-inner {
  width: 100%; margin: 0 auto; padding: 0 16px 0 12px;
  display: flex; align-items: center; gap: 12px; min-height: 58px;
}
.brand {
  font-family: var(--font-hand);
  font-size: 1.85rem; font-weight: 700; color: #f3e8d2; text-decoration: none;
  white-space: nowrap; text-shadow: 1px 2px 0 rgba(0,0,0,0.35);
  transform: rotate(-1.5deg); display: inline-block;
  flex-shrink: 0;
}
.brand:hover { transform: rotate(0deg) scale(1.04); color: #fff; }

.sidebar-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.18); border: 1px solid rgba(243,232,210,0.22);
  color: #f3e8d2; font-size: 1.25rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.sidebar-toggle:hover { background: rgba(217, 164, 65, 0.28); }
.sidebar-toggle:active { transform: scale(0.96); }

.nav-primary {
  display: flex; align-items: center; gap: 4px;
  margin-left: 4px; flex-wrap: wrap;
}
.nav-account {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.nav-pill {
  color: rgba(243, 232, 210, 0.9); text-decoration: none;
  padding: 7px 12px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; font-family: var(--font-head);
  border: 1px solid transparent; transition: all 0.18s; white-space: nowrap;
}
.nav-pill:hover,
.nav-pill.is-active {
  background: rgba(217, 164, 65, 0.28); color: #fff;
  border-color: rgba(217, 164, 65, 0.45);
}
.nav-user {
  display: flex; align-items: center; gap: 8px;
  color: #f3e8d2; text-decoration: none; font-family: var(--font-head);
  font-weight: 600; font-size: 0.9rem; padding: 4px 10px 4px 4px;
  border-radius: 999px; border: 1px solid transparent; transition: all 0.18s;
}
.nav-user:hover, .nav-user.is-active {
  background: rgba(217, 164, 65, 0.22); border-color: rgba(217, 164, 65, 0.4); color: #fff;
}
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--amber); display: block;
}
.nav-avatar-fallback {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: rgba(0,0,0,0.2);
  border: 2px solid var(--amber); font-size: 0.95rem;
}
.nav-user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Side panel — cabin trail board ---------- */
.sidebar {
  --sidebar-w: 248px;
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 67px;
  align-self: flex-start;
  height: calc(100vh - 67px);
  z-index: 40;
  transition: width 0.22s ease, flex-basis 0.22s ease, transform 0.22s ease;
}
.sidebar-inner {
  height: 100%;
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(62,47,35,0.97) 0%, rgba(44,33,26,0.98) 100%);
  border-right: 3px solid var(--amber);
  box-shadow: 4px 0 18px rgba(44, 33, 26, 0.22);
  color: #f3e8d2;
  overflow: hidden;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(217, 164, 65, 0.28);
}
.sidebar-kicker {
  font-family: var(--font-hand); font-size: 1.35rem; color: var(--amber);
  letter-spacing: 0.02em;
}
.sidebar-collapse {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid rgba(243,232,210,0.25); background: rgba(0,0,0,0.18);
  color: #f3e8d2; cursor: pointer; font-size: 1rem; line-height: 1;
  transition: background 0.15s;
}
.sidebar-collapse:hover { background: rgba(217, 164, 65, 0.28); }
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 10px 10px 18px;
  scrollbar-width: thin; scrollbar-color: rgba(217,164,65,0.45) transparent;
}
.sidebar-section { margin-bottom: 14px; }
.sidebar-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.1px;
  color: rgba(217, 164, 65, 0.85); font-weight: 700; font-family: var(--font-head);
  padding: 6px 10px 6px; opacity: 0.95;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  color: rgba(243, 232, 210, 0.9); text-decoration: none;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent; transition: all 0.15s; margin-bottom: 2px;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(217, 164, 65, 0.18); color: #fff;
  border-color: rgba(217, 164, 65, 0.28);
}
.sidebar-link.is-active {
  background: linear-gradient(90deg, rgba(196,100,59,0.35), rgba(217,164,65,0.18));
  color: #fff;
  border-color: rgba(217, 164, 65, 0.45);
  box-shadow: inset 3px 0 0 var(--amber);
}
.sidebar-ico {
  width: 1.5rem; text-align: center; flex-shrink: 0; font-size: 1.05rem;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.25));
}
.sidebar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-note {
  font-size: 0.82rem; line-height: 1.45; color: rgba(243,232,210,0.72);
  padding: 0 10px 10px; font-style: italic;
}
.sidebar-cta .btn-ghost {
  color: #f3e8d2; border-color: rgba(243,232,210,0.45);
}
.sidebar-cta .btn-ghost:hover { background: rgba(217,164,65,0.25); color: #fff; }
.sidebar-cta .btn { margin-left: 10px; margin-right: 10px; width: calc(100% - 20px); }
.sidebar-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(217, 164, 65, 0.22);
  font-family: var(--font-hand); font-size: 1.05rem;
  color: rgba(243,232,210,0.7); text-align: center;
}
.sidebar-backdrop {
  display: none;
}

/* Collapsed rail (desktop) — icons only */
body.sidebar-collapsed .sidebar {
  --sidebar-w: 72px;
}
body.sidebar-collapsed .sidebar-kicker,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-note,
body.sidebar-collapsed .sidebar-cta .btn,
body.sidebar-collapsed .sidebar-foot span {
  display: none;
}
body.sidebar-collapsed .sidebar-head { justify-content: center; padding: 12px 8px; }
body.sidebar-collapsed .sidebar-collapse { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-nav { padding: 10px 8px 18px; }
body.sidebar-collapsed .sidebar-link {
  justify-content: center; padding: 10px 8px;
}
body.sidebar-collapsed .sidebar-link::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--bark-dark); color: #f3e8d2; font-size: 0.78rem;
  padding: 5px 9px; border-radius: 4px; border: 1px solid rgba(217,164,65,0.45);
  white-space: nowrap; opacity: 0; pointer-events: none;
  box-shadow: var(--shadow); transition: opacity 0.12s;
  z-index: 50;
}
body.sidebar-collapsed .sidebar-link:hover::after { opacity: 1; }
body.sidebar-collapsed .sidebar-foot { padding: 10px 6px; }
body.sidebar-collapsed .sidebar-foot::after { content: '🌲'; opacity: 0.7; }

/* Mobile: drawer over content */
@media (max-width: 960px) {
  .nav-primary { display: none; }
  .nav-user-name { display: none; }
  /* drop app-shell's stacking context so the drawer (z 1100) rises above the
     backdrop (z 1050) — otherwise the backdrop covers the open drawer and
     swallows every tap on the nav links */
  .app-shell { z-index: auto; }
  .sidebar {
    position: fixed; left: 0; top: 67px; bottom: 0; height: auto;
    width: min(288px, 86vw); flex-basis: auto;
    transform: translateX(-105%);
    z-index: 1100;
    box-shadow: none;
  }
  .sidebar-inner { box-shadow: 8px 0 28px rgba(0,0,0,0.35); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-collapsed .sidebar { --sidebar-w: min(288px, 86vw); width: min(288px, 86vw); }
  body.sidebar-collapsed .sidebar-kicker,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .sidebar-text,
  body.sidebar-collapsed .sidebar-note,
  body.sidebar-collapsed .sidebar-cta .btn,
  body.sidebar-collapsed .sidebar-foot span { display: initial; }
  body.sidebar-collapsed .sidebar-text { display: inline; }
  body.sidebar-collapsed .sidebar-label { display: block; }
  body.sidebar-collapsed .sidebar-kicker { display: inline; }
  body.sidebar-collapsed .sidebar-link { justify-content: flex-start; padding: 8px 10px; }
  body.sidebar-collapsed .sidebar-link::after { display: none; }
  body.sidebar-collapsed .sidebar-collapse { transform: none; }
  body.sidebar-collapsed .sidebar-foot::after { content: none; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 67px 0 0 0;
    background: rgba(28, 20, 14, 0.45); z-index: 1050;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1; pointer-events: auto;
  }
  .sidebar-backdrop[hidden] { display: none; }
  body.sidebar-open .sidebar-backdrop[hidden] { display: block; }
}

@media (max-width: 480px) {
  .brand { font-size: 1.55rem; }
  .nav-inner { gap: 8px; padding: 0 10px; }
}

/* legacy class hooks kept harmless */
.nav-links { display: none; }
.nav-toggle { display: none; }

/* ---------- Buttons — carved wood & forest tones ---------- */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius); border: none;
  font-weight: 700; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  font-family: var(--font-head);
  transition: all 0.2s; text-align: center;
}
.btn-primary {
  background: linear-gradient(180deg, var(--terracotta), #a94f2c);
  color: #fdf3e3; box-shadow: 0 3px 0 #7d3a1f, var(--shadow);
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #7d3a1f, var(--shadow-lift); color: #fff; }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 0 #7d3a1f; }
.btn-secondary {
  background: linear-gradient(180deg, var(--forest), var(--forest-deep));
  color: #eef3e6; box-shadow: 0 3px 0 #1c2e21, var(--shadow);
}
.btn-secondary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 5px 0 #1c2e21, var(--shadow-lift); }
.btn-ghost {
  background: transparent; color: var(--forest);
  border: 2px dashed var(--moss);   /* stitched look */
}
.btn-ghost:hover { background: var(--forest); color: #fff; border-style: solid; }
.navbar .btn-ghost { color: #f3e8d2; border-color: rgba(243,232,210,0.5); }
.navbar .btn-ghost:hover { background: rgba(217,164,65,0.25); }
.navbar .btn-primary { box-shadow: 0 3px 0 #7d3a1f; }
.btn-sm { padding: 5px 14px; font-size: 0.83rem; }
.btn-danger { background: #a03e2e; color: #fff; box-shadow: 0 3px 0 #6e2a1e; }
.btn-block { width: 100%; }

/* ---------- Hero — the cabin porch welcome ---------- */
.hero {
  background:
    linear-gradient(160deg, rgba(42, 65, 48, 0.92) 0%, rgba(61, 90, 63, 0.88) 55%, rgba(107, 127, 92, 0.85) 100%),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,0.02) 12px, rgba(255,255,255,0.02) 24px);
  border-radius: var(--radius); padding: 58px 42px; margin-bottom: 40px;
  color: #f6f0e3; text-align: center; position: relative; overflow: hidden;
  border: 1px solid rgba(42,65,48,0.6);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.2), var(--shadow);
}
.hero::before {  /* pine treeline silhouette */
  content: '🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲';
  position: absolute; bottom: -12px; left: 0; right: 0;
  font-size: 2.2rem; letter-spacing: 6px; opacity: 0.18;
  white-space: nowrap; overflow: hidden;
}
.hero::after {
  content: '🦌'; position: absolute; font-size: 3rem; opacity: 0.2;
  top: 18px; right: 30px; transform: rotate(8deg);
}
.hero h1 {
  font-family: var(--font-hand);
  font-size: 3.4rem; font-weight: 700; color: #fdf6e3;
  margin-bottom: 10px; text-shadow: 2px 3px 0 rgba(0,0,0,0.25);
  letter-spacing: 0;
}
.hero p { font-size: 1.15rem; opacity: 0.94; max-width: 620px; margin: 0 auto 26px; font-style: italic; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn-ghost { color: #f6f0e3; border-color: rgba(246,240,227,0.7); }
.hero .btn-ghost:hover { background: var(--amber); border-color: var(--amber); color: var(--bark); border-style: solid; }

/* ---------- Cards — paper pinned to the cabin wall ---------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
/* two-pane splits — collapse to one column on narrow screens (replacing
   inline styles that media queries could not override) */
.split-even { grid-template-columns: 1fr 1fr; gap: 28px; }
.split-2-1 { grid-template-columns: 2fr 1fr; gap: 24px; }
.split-side { grid-template-columns: 300px 1fr; gap: 28px; }
@media (max-width: 720px) {
  .split-even, .split-2-1, .split-side { grid-template-columns: 1fr; }
}

.grid-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.card {
  background: var(--paper);
  border-radius: 3px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.25s ease;
  border: 1px solid var(--paper-dark);
  position: relative;
}
/* scrapbook: every 3rd card tilts a touch, like hand-pinned */
.grid-3 .card:nth-child(3n+1), .grid-4 .card:nth-child(odd) { transform: rotate(-0.6deg); }
.grid-3 .card:nth-child(3n+2), .grid-4 .card:nth-child(even) { transform: rotate(0.5deg); }
.card:hover {
  transform: rotate(0deg) translateY(-5px) !important;
  box-shadow: var(--shadow-lift);
  z-index: 2;
}
.card-body { padding: 20px; }
.card-title {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 6px;
  font-family: var(--font-head); color: var(--bark);
}
.card-title a { color: var(--bark); text-decoration: none; border-bottom: 2px solid transparent; }
.card-title a:hover { color: var(--terracotta); border-bottom-color: var(--amber); }
.card-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; font-style: italic; }
.card-text { font-size: 0.95rem; color: #55483a; }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-actions {
  padding: 12px 20px; border-top: 2px dashed var(--paper-dark);
  display: flex; gap: 8px; flex-wrap: wrap;
  background: rgba(239, 230, 210, 0.4);
}

/* ---------- Badges — little kraft-paper tags ---------- */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 3px; font-size: 0.72rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  font-family: var(--font-head);
  border: 1px solid transparent;
  transform: rotate(-1deg);
}
.badge-free, .badge-campsite { background: #e3ecd9; color: var(--forest-deep); border-color: var(--sage); }
.badge-free_camping { background: #d2e2c4; color: var(--forest-deep); border-color: var(--moss); }
.badge-paid { background: #f4e5c3; color: #8a6414; border-color: var(--amber); }
.badge-donation { background: #dcebf0; color: #2e5e6e; border-color: #9fc3cf; }
.badge-attraction { background: #f2dcd2; color: #8a3d22; border-color: var(--terracotta); }
.badge-water { background: #d6e6f4; color: #2b5673; border-color: #a3c4dd; }
.badge-shower { background: #e6ddf0; color: #50386e; border-color: #bfa9d6; }
.badge-dump_station, .badge-other { background: #e8e2d5; color: #5c5240; border-color: var(--stitch); }
.badge-host_stay { background: #f7e3cf; color: #8a4b08; border-color: #dba86f; }
.badge-laundry { background: #dcebdd; color: #2f5236; border-color: #a5c9ab; }
.badge-hike, .badge-viewpoint { background: #e0ead2; color: #4a6136; border-color: #b4c794; }

.stars { color: var(--amber); font-size: 1rem; letter-spacing: 2px; text-shadow: 0 1px 0 rgba(0,0,0,0.1); }
.safety { color: var(--forest); font-size: 0.85rem; font-weight: 700; }

/* ---------- Sections ---------- */
.section { margin-bottom: 44px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
  border-bottom: 3px double var(--stitch);   /* hand-ruled line */
  padding-bottom: 10px;
}
.section-header h2 { font-size: 1.6rem; }
.section-header h2 .emoji { margin-right: 8px; }

/* ---------- Forms — pages from the trail journal ---------- */
.form-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px; max-width: 560px; margin: 0 auto;
  border: 1px solid var(--paper-dark);
  border-top: 5px solid var(--amber);    /* like a journal bookmark ribbon */
}
.form-card.wide { max-width: 780px; }
.form-card h1 { font-family: var(--font-hand); font-size: 2.2rem; color: var(--bark); }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem;
  font-family: var(--font-head); color: var(--wood);
  text-transform: uppercase; letter-spacing: 0.6px; font-size: 0.78rem;
}
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
.form-group input[type=number], .form-group input[type=date], .form-group input[type=file],
.form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px;
  border: none; border-bottom: 2px solid var(--stitch);   /* ruled journal line */
  border-radius: 0;
  font-size: 1rem; font-family: var(--font-body);
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
  color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-bottom-color: var(--terracotta);
  background: rgba(217, 164, 65, 0.06);
}
.form-group textarea {
  min-height: 130px; resize: vertical;
  /* lined notebook paper */
  background-image: repeating-linear-gradient(transparent, transparent 30px, rgba(107, 79, 58, 0.14) 30px, rgba(107, 79, 58, 0.14) 31px);
  line-height: 31px; padding-top: 8px;
}
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; font-style: italic; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--paper-dark); border-radius: 3px; cursor: pointer; font-size: 0.88rem;
  border: 1px dashed var(--stitch);
  transition: all 0.15s;
}
.checkbox-pill:hover { background: var(--sage); color: #fff; }
.checkbox-pill input { accent-color: var(--forest); }

/* ---------- Flash messages — notes pinned to the door ---------- */
.flash-container { max-width: 1180px; margin: 18px auto 0; padding: 0 20px; }
.flash {
  padding: 13px 18px; border-radius: 3px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-family: var(--font-head);
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow);
  border-left: 5px solid;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px) rotate(-1deg); } to { opacity: 1; } }
.flash button { background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.6; }
.flash-success { background: #e3ecd9; color: var(--forest-deep); border-left-color: var(--forest); }
.flash-error { background: #f2dcd2; color: #7d2e1a; border-left-color: var(--terracotta); }
.flash-warning { background: #f4e5c3; color: #7a5a10; border-left-color: var(--amber); }
.flash-info { background: #dcebf0; color: #2e5e6e; border-left-color: #5b93a8; }

/* ---------- Filters ---------- */
.filter-bar {
  background: var(--paper); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 26px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end;
  border: 1px solid var(--paper-dark);
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ---------- Map — framed like a wall map ---------- */
.map-container {
  height: 560px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  border: 10px solid var(--wood);            /* wooden picture frame */
  outline: 1px solid var(--bark-dark);
}
.leaflet-popup-content { font-family: var(--font-body); }
.map-legend {
  background: var(--paper); border-radius: var(--radius-sm); padding: 13px 16px;
  margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem;
  border: 1px dashed var(--stitch);
}
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; border: 1px solid rgba(0,0,0,0.2); }

/* ---------- Weather — the porch thermometer ---------- */
.weather-strip { display: flex; gap: 12px; overflow-x: auto; padding: 10px 2px; }
.weather-day {
  background: var(--paper); border-radius: var(--radius-sm);
  padding: 14px; min-width: 104px; text-align: center; flex-shrink: 0;
  border: 1px solid var(--paper-dark);
  box-shadow: 0 2px 8px rgba(62,47,35,0.1);
  border-top: 4px solid var(--sage);
}
.weather-day .w-icon { font-size: 1.8rem; }
.weather-day .w-temp { font-weight: 800; margin-top: 6px; font-family: var(--font-head); color: var(--bark); }
.weather-day .w-low { color: var(--ink-soft); font-size: 0.85rem; }
.weather-day .w-date { font-size: 0.78rem; color: var(--ink-soft); font-style: italic; }
.weather-current {
  background: linear-gradient(150deg, var(--forest), var(--forest-deep));
  color: #eef3e6; border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 20px;
  border: 1px solid var(--forest-deep); box-shadow: var(--shadow);
}
.weather-current .big-icon { font-size: 3.5rem; }
.weather-current .big-temp { font-size: 2.7rem; font-weight: 800; font-family: var(--font-head); }
.alert-banner {
  background: #f4e5c3; border-left: 6px solid var(--amber); padding: 15px 18px;
  border-radius: 3px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.alert-banner.severe { background: #f2dcd2; border-left-color: var(--terracotta); }

/* ---------- Forum — the community corkboard ---------- */
.cat-icon { font-size: 2rem; }
.post-item {
  background: var(--paper); border-radius: 3px; padding: 16px 20px;
  box-shadow: var(--shadow); margin-bottom: 14px; display: flex; gap: 16px; align-items: center;
  transition: all 0.2s;
  border: 1px solid var(--paper-dark);
  border-left: 5px solid var(--sage);   /* pinned note edge */
}
.post-item:nth-child(even) { border-left-color: var(--amber); }
.post-item:nth-child(3n) { border-left-color: var(--terracotta); }
.post-item:hover { transform: translateX(5px); box-shadow: var(--shadow-lift); }
.post-item .post-title { font-weight: 800; font-size: 1.05rem; font-family: var(--font-head); }
.post-item .post-title a { color: var(--bark); text-decoration: none; }
.post-item .post-title a:hover { color: var(--terracotta); }
.post-stats { margin-left: auto; display: flex; gap: 16px; color: var(--ink-soft); font-size: 0.88rem; white-space: nowrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--amber); }
.avatar-placeholder {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(140deg, var(--wood-light), var(--wood));
  display: flex; align-items: center; justify-content: center; color: #f6f0e3;
  font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
  font-family: var(--font-head);
  border: 2px solid var(--bark);
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.comment {
  background: rgba(239, 230, 210, 0.55); border-radius: 3px; padding: 14px 16px;
  margin-bottom: 10px; display: flex; gap: 12px;
  border-left: 3px solid var(--stitch);
}

/* ---------- Photo galleries — polaroids with washi tape ---------- */
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 18px 0; }
.media-gallery figure, .media-gallery img, .media-gallery video {
  position: relative;
}
.media-gallery img, .media-gallery video {
  width: 100%; display: block;
  border: 8px solid #fff;                 /* polaroid frame */
  border-bottom-width: 26px;
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(62,47,35,0.25);
  transition: transform 0.25s ease;
}
.media-gallery figure:nth-child(odd) img, .media-gallery img:nth-child(odd) { transform: rotate(-1.3deg); }
.media-gallery figure:nth-child(even) img, .media-gallery img:nth-child(even) { transform: rotate(1.1deg); }
.media-gallery img:hover, .media-gallery video:hover { transform: rotate(0deg) scale(1.04); z-index: 3; position: relative; }
.media-gallery figure::before {           /* washi tape strip */
  content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 76px; height: 22px;
  background: rgba(217, 164, 65, 0.55);
  border-left: 1px dashed rgba(255,255,255,0.6);
  border-right: 1px dashed rgba(255,255,255,0.6);
  z-index: 4;
}
.media-gallery figcaption {
  font-family: var(--font-hand); font-size: 1.15rem; color: var(--ink-soft);
  text-align: center; margin-top: -20px; position: relative; z-index: 2;
}

/* ---------- Diary ---------- */
.diary-entry-card { position: relative; }
.privacy-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--bark); color: #f6f0e3;
  padding: 3px 11px; border-radius: 3px; font-size: 0.72rem;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.6px;
  transform: rotate(2deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.mood-badge { font-size: 1.4rem; margin-right: 6px; }
/* diary pages look like journal paper */
.diary-entry-card .card-body p.card-text,
.card-body p[style*='pre-wrap'] {
  background-image: repeating-linear-gradient(transparent, transparent 30px, rgba(107,79,58,0.1) 30px, rgba(107,79,58,0.1) 31px);
  line-height: 31px;
}

/* ---------- Checklist — the fridge-door list ---------- */
.checklist-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--paper); border-radius: 3px; margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(62,47,35,0.1); transition: all 0.2s;
  border: 1px solid var(--paper-dark);
  border-left: 4px solid var(--amber);
}
.checklist-item.done { opacity: 0.55; border-left-color: var(--moss); }
.checklist-item.done .item-text { text-decoration: line-through; font-style: italic; }
.check-btn {
  width: 26px; height: 26px; border-radius: 3px;     /* square journal checkboxes */
  border: 2px solid var(--forest);
  background: #fff; cursor: pointer; flex-shrink: 0; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hand); font-weight: 700; color: var(--forest);
}
.checklist-item.done .check-btn { background: var(--forest); color: #fff; }
.icon-btn {
  background: none; border: none; cursor: pointer; font-size: 0.95rem;
  padding: 2px 6px; opacity: 0.65; transition: opacity 0.15s, transform 0.15s;
}
.icon-btn:hover { opacity: 1; transform: scale(1.15); }
.del-btn { color: #d9534f; }
.edit-item-form {
  background: var(--paper); border: 1px dashed var(--stitch); border-radius: 3px;
  padding: 10px 16px; margin: -4px 0 8px 40px;
  box-shadow: 0 2px 8px rgba(62,47,35,0.08);
}
.edit-item-form form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.edit-item-form input[type="text"] {
  flex: 2; min-width: 180px; padding: 8px 10px;
  border: 2px solid var(--paper-dark); border-radius: 8px; font-family: inherit;
}
.edit-item-form input[type="date"] {
  padding: 8px 10px; border: 2px solid var(--paper-dark); border-radius: 8px; font-family: inherit;
}
.edit-item-form input:focus { border-color: var(--forest); outline: none; }

/* ---------- Checklist item details & tags ---------- */
.item-desc {
  font-size: 0.88rem; color: var(--bark-light); margin-top: 3px; line-height: 1.4;
}
.checklist-item.done .item-desc { text-decoration: line-through; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.25); white-space: nowrap;
  box-shadow: 0 1px 3px rgba(62,47,35,0.2);
}
.tag-chip-sm { padding: 1px 8px; font-size: 0.72rem; }
.tag-del {
  background: none; border: none; color: #fff; cursor: pointer; font-size: 0.72rem;
  padding: 0; margin-left: 2px; opacity: 0.8; line-height: 1;
}
.tag-del:hover { opacity: 1; transform: scale(1.2); }
.tag-picker {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 10px; background: rgba(139,105,20,0.05);
  border: 1px dashed var(--stitch); border-radius: 8px;
}
.tag-check { cursor: pointer; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-option {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; border: 2px solid transparent;
  transition: all 0.15s; user-select: none;
}
.tag-check input:not(:checked) + .tag-option {
  background: transparent !important; color: var(--bark-light);
  border-style: dashed; opacity: 0.75;
}
.tag-check input:checked + .tag-option { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.tag-check:hover .tag-option { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(62,47,35,0.2); }
.new-tag-row {
  display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap;
}
.new-tag-row input[type="text"] {
  flex: 1; min-width: 140px; padding: 6px 10px;
  border: 2px solid var(--paper-dark); border-radius: 8px; font-family: inherit; font-size: 0.85rem;
}
.new-tag-row input[type="color"] {
  width: 36px; height: 32px; padding: 2px; border: 2px solid var(--paper-dark);
  border-radius: 8px; background: var(--paper); cursor: pointer;
}
.new-tag-row .card-meta { flex-basis: 100%; }

.progress-bar {
  height: 12px; background: var(--paper-dark); border-radius: 8px; overflow: hidden; margin: 12px 0;
  border: 1px solid var(--stitch);
}
.progress-fill {
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--forest), var(--forest) 10px, var(--moss) 10px, var(--moss) 20px);
  border-radius: 8px; transition: width 0.4s ease;
}

/* ---------- new sections: stats, expenses, maintenance, guides, meetups ---------- */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-card {
  flex: 1; min-width: 150px; text-align: center; padding: 16px 10px;
  background: var(--paper); border: 1px solid var(--paper-dark); border-radius: 3px;
  box-shadow: 0 2px 8px rgba(62,47,35,0.1); border-top: 4px solid var(--amber);
}
.stat-num { font-family: var(--font-hand); font-size: 1.9rem; font-weight: 700; color: var(--forest); }
.stat-label { font-size: 0.8rem; color: var(--bark-light, #8a7561); margin-top: 2px; }

.cat-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cat-bar-label { width: 160px; flex-shrink: 0; font-size: 0.9rem; }
.cat-bar-track { flex: 1; height: 12px; background: var(--paper-dark); border-radius: 6px; overflow: hidden; }
.cat-bar-fill {
  height: 100%; border-radius: 6px;
  background: repeating-linear-gradient(45deg, var(--forest), var(--forest) 8px, var(--moss) 8px, var(--moss) 16px);
}
.cat-bar-amount { width: 80px; text-align: right; font-weight: 700; font-size: 0.9rem; }

.expense-row, .maint-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  background: var(--paper); border: 1px solid var(--paper-dark); border-radius: 3px;
  margin-bottom: 8px; box-shadow: 0 2px 8px rgba(62,47,35,0.08);
  border-left: 4px solid var(--terracotta, #c96f4a);
}
.expense-cat, .maint-type { width: 170px; flex-shrink: 0; font-size: 0.9rem; font-weight: 600; }
.expense-note, .maint-desc { flex: 1; }
.expense-amount, .maint-cost { font-weight: 700; color: var(--forest); }
.expense-form, .maint-form select, .expense-form select {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.expense-form input, .expense-form select, .maint-form input, .maint-form select {
  padding: 9px 10px; border: 2px solid var(--paper-dark); border-radius: 8px; font-family: inherit;
}
.expense-form input:focus, .maint-form input:focus { border-color: var(--forest); outline: none; }

.upcoming-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--stitch);
}
.upcoming-row:last-child { border-bottom: none; }
.overdue-banner {
  background: #f8e8e3; border: 1px solid #d9a08c; border-left: 4px solid #c0392b;
  border-radius: 3px; padding: 12px 16px; margin-bottom: 16px; color: #8c3a2b;
}

.form-label { display: block; font-weight: 600; margin: 14px 0 5px; }
.card-body input[type="text"], .card-body input[type="date"], .card-body input[type="time"],
.card-body input[type="number"], .card-body textarea {
  width: 100%; padding: 10px; border: 2px solid var(--paper-dark); border-radius: 8px; font-family: inherit;
}
.card-body input:focus, .card-body textarea:focus { border-color: var(--forest); outline: none; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guide-grid-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.guide-card {
  display: block; text-decoration: none; color: inherit; padding: 22px;
  transition: transform 0.15s, box-shadow 0.15s; border-top: 4px solid var(--moss);
}
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(62,47,35,0.18); }
.guide-icon { font-size: 2rem; margin-bottom: 8px; }
.guide-card h3 { margin-bottom: 6px; }
.guide-cta { display: inline-block; margin-top: 10px; color: var(--forest); font-weight: 700; font-size: 0.9rem; }
.guide-body p { margin-bottom: 14px; line-height: 1.65; }

.meetup-card { display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 12px; }
.meetup-date-badge {
  width: 62px; flex-shrink: 0; text-align: center; padding: 8px 4px;
  background: var(--forest); color: #fff; border-radius: 8px;
}
.meetup-month { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.meetup-day { display: block; font-family: var(--font-hand); font-size: 1.7rem; font-weight: 700; line-height: 1; }
.meetup-actions { flex-shrink: 0; }
.past-meetup { opacity: 0.6; }

/* ---------- Itinerary — the trail map timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px;
  width: 0;
  border-left: 3px dashed var(--wood-light);   /* dotted trail path */
}
.timeline-stop { position: relative; margin-bottom: 20px; }
.timeline-stop::before {
  content: ''; position: absolute; left: -31px; top: 6px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--paper); border: 4px solid var(--terracotta);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.timeline-stop:nth-child(even)::before { border-color: var(--forest); }

/* ---------- Tables — ledger book ---------- */
.table-wrap {
  overflow-x: auto; background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--paper-dark);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px dashed var(--paper-dark); }
th {
  background: rgba(239, 230, 210, 0.6); font-weight: 800; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--font-head);
  color: var(--wood); border-bottom: 2px solid var(--stitch);
}
tr:hover td { background: rgba(217, 164, 65, 0.06); }

/* ---------- Footer — the cabin door at night ---------- */
.footer {
  background: linear-gradient(180deg, var(--bark) 0%, var(--bark-dark) 100%);
  color: rgba(246, 240, 227, 0.85);
  padding: 36px 20px 30px; margin-top: 70px;
  border-top: 4px solid var(--amber);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer strong { font-family: var(--font-hand); font-size: 1.5rem; color: #f3e8d2; font-weight: 700; }
.footer a { color: var(--amber); text-decoration: none; }
.footer a:hover { color: var(--terracotta); }
.footer-note { font-size: 0.88rem; opacity: 0.75; margin-top: 8px; font-style: italic; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 64px 20px; color: var(--ink-soft); }
.empty-state .big-emoji { font-size: 4rem; display: block; margin-bottom: 16px; }
.empty-state p, .empty-state { font-style: italic; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 20px 0; }
.stat-card {
  background: var(--paper); border-radius: 3px; padding: 18px;
  text-align: center; box-shadow: var(--shadow);
  border: 1px solid var(--paper-dark);
  border-top: 4px solid var(--sage);
}
.stat-card:nth-child(even) { border-top-color: var(--amber); }
.stat-card:nth-child(3n) { border-top-color: var(--terracotta); }
.stat-card .stat-num { font-size: 2.1rem; font-weight: 800; color: var(--forest); font-family: var(--font-head); }
.stat-card .stat-label { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.8px; }
.notice {
  background: #dcebf0; border-radius: 3px; padding: 15px 18px;
  margin-bottom: 18px; font-size: 0.95rem;
  border-left: 5px solid #5b93a8;
  box-shadow: var(--shadow);
}
.notice code {
  background: rgba(0,0,0,0.08); padding: 2px 7px; border-radius: 3px;
  font-size: 0.88em;
}
.confetti { position: fixed; pointer-events: none; z-index: 9999; }

/* hand-written pull-quote style for guidelines etc */
.card-body h1 { font-family: var(--font-hand); font-size: 2.4rem; }
.card-body h3 { color: var(--wood); }

@media (max-width: 640px) {
  .hero { padding: 40px 22px; }
  .hero h1 { font-size: 2.4rem; }
  .map-container { height: 420px; border-width: 6px; }
  .form-card { padding: 24px 20px; }
  body { font-size: 16px; }
}

/* Maintenance form: small captions above date inputs */
.date-field { display: flex; flex-direction: column; justify-content: flex-end; }
.date-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.date-field-opt { font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Fuel log: MPG badge + receipt icon */
.mpg-badge { display: inline-block; background: var(--moss, #6b7f4f); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; margin-left: 8px; }
.fuel-row a { text-decoration: none; font-size: 1.05rem; }

/* Gas prices: estimate badge + sortable headers */
.est-tag { display: inline-block; background: var(--paper-dark, #e8e0d5); color: var(--ink-soft, #8a7a5e); font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 8px; margin-left: 6px; vertical-align: middle; cursor: help; }
th.sortable:hover { background: rgba(139, 105, 20, 0.08); }
.sort-arrow { font-size: 0.8rem; opacity: 0.55; }

/* Cook mode: step checkboxes + timer */
.cook-step { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid var(--paper-dark); border-radius: 8px; margin-bottom: 6px; background: var(--paper); cursor: pointer; transition: opacity 0.15s ease, background 0.15s ease; }
.cook-step:hover { background: var(--paper-dark); }
.cook-step-check { margin-top: 5px; width: 17px; height: 17px; accent-color: var(--moss); flex-shrink: 0; cursor: pointer; }
.cook-step-num { flex-shrink: 0; background: var(--moss); color: #fff; font-size: 0.72rem; font-weight: 700; min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.cook-step-text p { margin: 0 0 2px; font-size: 0.95rem; line-height: 1.5; }
.cook-step-done .cook-step-text { text-decoration: line-through; opacity: 0.55; }
.cook-step-done .cook-step-num { background: var(--ink-soft); }
.cook-timer { text-align: center; border-top: 1px dashed var(--paper-dark); margin-top: 14px; padding-top: 12px; }
.timer-display { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2.1rem; font-weight: 700; color: var(--bark); letter-spacing: 0.06em; margin-bottom: 8px; }

/* Cooking log entries */
.cook-entry { display: flex; gap: 14px; align-items: flex-start; }
.cook-entry-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--paper-dark); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.cook-entry-notes { background: var(--paper-dark); border-radius: 8px; padding: 8px 12px; margin-top: 6px; font-size: 0.9rem; white-space: pre-wrap; }

/* ---------- Recipe page: ingredients sidebar + method column ---------- */
.recipe-layout { display: grid; grid-template-columns: minmax(0, 350px) minmax(0, 1fr); gap: 24px; align-items: start; }
.recipe-side, .recipe-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.recipe-main .card, .recipe-side .card { width: 100%; }
.recipe-photo { width: 100%; height: 200px; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .recipe-layout { grid-template-columns: 1fr; }
  .recipe-photo { height: 230px; }
}

/* compact ingredient rows in the sidebar (no heavy expense-row chrome) */
.recipe-side .expense-row { padding: 6px 10px; margin-bottom: 4px; border-left: none; box-shadow: none; gap: 8px; font-size: 0.93rem; }
.recipe-side .expense-row strong { margin-left: auto; white-space: nowrap; color: var(--forest); }

/* tighter cook steps on the wider method column */
.recipe-main .cook-step { padding: 10px 14px; margin-bottom: 8px; }
.recipe-main .cook-step-text p { font-size: 1rem; line-height: 1.55; }

/* inline editing on recipe pages */
.inline-editor-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.inline-editor-status { font-size: 0.85rem; font-style: italic; color: var(--ink-soft); }
.inline-edit-toggle { font-size: 0.78rem; padding: 3px 10px; }
.inline-editor-hint { margin: 0 0 10px; font-size: 0.82rem; font-style: italic; color: var(--ink-soft); }

/* draggable reorder rows (ingredients + method editors) */
.reorder-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.reorder-row { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--paper-dark); border-radius: 8px; padding: 6px 8px; }
.reorder-row.dragging { opacity: 0.45; }
.reorder-handle { cursor: grab; color: var(--ink-soft); font-size: 1.05rem; padding: 2px 4px; user-select: none; flex-shrink: 0; touch-action: none; }
.reorder-handle:active { cursor: grabbing; }
.reorder-field { flex: 1; min-width: 0; font-size: 0.93rem; font-family: inherit; }
.reorder-row textarea.reorder-field { resize: vertical; line-height: 1.45; }
.reorder-btn { flex-shrink: 0; border: 1px solid var(--paper-dark); background: var(--paper-dark); border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 0.85rem; color: var(--ink); }
.reorder-btn:hover { background: var(--amber, #d9a441); }

/* ============================================================
   TODAY'S PAGE - the daily journal
   A field ledger: kraft board, stitched tabs, a rubber date
   stamp, ruled paper. Rustic surface, modern behaviour.
   ============================================================ */
.journal-wrap { max-width: 820px; margin: 0 auto; }

/* ---------------------------------------------- masthead */
.jrn-masthead {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding: 26px 28px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0)) ,
    repeating-linear-gradient(90deg, transparent, transparent 26px, rgba(62,47,35,0.03) 26px, rgba(62,47,35,0.03) 27px),
    var(--paper);
  border: 1px solid var(--stitch);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
  position: relative;
}
.jrn-masthead::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0;
  border-bottom: 2px dashed rgba(184,168,136,0.7);
}
.jrn-title {
  font-family: var(--font-head); font-size: 2.1rem; line-height: 1.15;
  color: var(--bark); margin: 2px 0 6px;
}
.jrn-sub { font-size: 0.95rem; color: var(--ink-soft); font-style: italic; max-width: 46ch; }
.jrn-mast-right { text-align: center; flex-shrink: 0; }

/* rubber date stamp */
.jrn-stamp-ring {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 92px; height: 92px; border-radius: 50%;
  border: 3px double var(--terracotta);
  color: var(--terracotta); transform: rotate(-7deg);
  opacity: 0.88; background: rgba(196,100,59,0.04);
}
.jrn-stamp-day { font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1; }
.jrn-stamp-mon { font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; }
.jrn-logged { margin-top: 10px; font-size: 0.78rem; color: var(--ink-soft); }
.jrn-logged span { display: block; letter-spacing: 0.5px; text-transform: uppercase; font-size: 0.66rem; }

/* ---------------------------------------------- conditions strip */
.jrn-context {
  padding: 16px 28px 18px;
  background: linear-gradient(180deg, #efe6d2, #e9dfc8);
  border: 1px solid var(--stitch); border-top: none;
  box-shadow: var(--shadow);
}
.jrn-ctx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.jrn-ctx-label {
  font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--wood);
}
.jrn-ctx-btn {
  font-family: var(--font-body); font-size: 0.8rem; cursor: pointer;
  background: var(--paper); color: var(--wood);
  border: 1px dashed var(--wood-light); border-radius: 999px;
  padding: 4px 14px; transition: all 0.18s;
}
.jrn-ctx-btn:hover { background: var(--forest); color: #fff; border-color: var(--forest); border-style: solid; }
.jrn-ctx-btn:disabled { opacity: 0.6; }
.jrn-ctx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.jrn-ctx-item { display: flex; flex-direction: column; gap: 1px; }
.jrn-ctx-item .ck {
  font-size: 0.63rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--wood-light);
}
.jrn-ctx-item .cv { font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.jrn-ctx-note { margin-top: 12px; font-size: 0.75rem; color: var(--ink-soft); font-style: italic; }

/* ---------------------------------------------- resurfaced memory */
.jrn-memory {
  background: #f4ead4; border: 1px solid var(--amber);
  border-left: 5px solid var(--amber);
  padding: 14px 20px; margin-top: 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.jrn-mem-closed { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jrn-mem-icon { font-size: 1.2rem; }
.jrn-mem-tease { flex: 1; font-family: var(--font-hand); font-size: 1.15rem; color: var(--bark); }
.jrn-mem-date {
  font-size: 0.72rem; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--wood); margin-bottom: 8px;
}
.jrn-mem-text {
  font-family: var(--font-body); font-style: italic; font-size: 1rem;
  color: var(--ink); border-left: 2px solid var(--stitch);
  padding-left: 14px; margin-bottom: 10px;
}
.jrn-mem-link { font-size: 0.85rem; color: var(--terracotta); text-decoration: none; font-weight: 600; }
.jrn-mem-link:hover { border-bottom: 1px solid var(--amber); }

/* ---------------------------------------------- fragment timeline */
.jrn-frags {
  margin-top: 18px; padding: 18px 24px 20px;
  background: var(--paper); border: 1px solid var(--stitch);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.jrn-frag-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.jrn-frag-head h3 {
  font-family: var(--font-head); font-size: 1.02rem; color: var(--bark);
  letter-spacing: 0.3px;
}
.jrn-frag-count {
  background: var(--forest); color: #fff; font-size: 0.7rem;
  min-width: 20px; text-align: center; border-radius: 999px; padding: 1px 7px;
}
.jrn-frag-list { list-style: none; margin: 0 0 10px; }
.jrn-frag-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0 7px 4px; border-bottom: 1px dotted rgba(184,168,136,0.6);
  position: relative;
}
.jrn-frag-list li.just-added { animation: jrnFade 0.5s ease; }
@keyframes jrnFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
.fr-time {
  font-family: var(--font-head); font-size: 0.78rem; color: var(--terracotta);
  font-weight: 700; flex-shrink: 0; min-width: 40px;
}
.fr-sym { color: var(--moss); flex-shrink: 0; font-size: 0.9rem; }
.fr-text { flex: 1; font-size: 0.95rem; color: var(--ink); }
.fr-del {
  background: none; border: none; color: var(--stitch); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 0 4px; opacity: 0;
  transition: opacity 0.15s;
}
.jrn-frag-list li:hover .fr-del { opacity: 1; }
.fr-del:hover { color: #a03e2e; }
.jrn-frag-empty { font-size: 0.88rem; color: var(--ink-soft); font-style: italic; margin-bottom: 12px; }
.jrn-frag-add { display: flex; gap: 8px; }
.jrn-frag-add input {
  flex: 1; font-family: var(--font-body); font-size: 0.92rem;
  padding: 9px 12px; color: var(--ink);
  background: #fffdf7; border: 1px solid var(--stitch);
  border-radius: var(--radius-sm);
}
.jrn-frag-add input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(107,127,92,0.15); }

/* ---------------------------------------------- style switcher (file tabs) */
.jrn-styles {
  display: flex; gap: 4px; margin: 24px 0 0; padding-left: 8px;
  flex-wrap: wrap;
}
.jrn-style {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 15px 8px; text-decoration: none;
  background: linear-gradient(180deg, #e6dcc6, #dbcfb4);
  border: 1px solid var(--stitch); border-bottom: none;
  border-radius: 7px 7px 0 0; color: var(--wood);
  position: relative; top: 2px; transition: all 0.16s;
}
.jrn-style:hover { background: linear-gradient(180deg, #efe6d2, #e4d9c0); top: 0; }
.jrn-style.is-on {
  background: var(--paper); color: var(--bark); top: 0;
  box-shadow: 0 -2px 8px rgba(62,47,35,0.08);
  border-bottom: 1px solid var(--paper);
  z-index: 2;
}
.js-emoji { font-size: 1.05rem; }
.js-name { font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; }
.js-min { font-size: 0.6rem; letter-spacing: 0.8px; text-transform: uppercase; opacity: 0.7; }
.jrn-style-blurb {
  background: var(--paper); border: 1px solid var(--stitch);
  padding: 12px 20px; font-size: 0.85rem; color: var(--ink-soft);
  border-radius: 0 var(--radius) 0 0; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.jrn-style-blurb strong { color: var(--forest-deep); font-family: var(--font-head); }

/* ---------------------------------------------- form cards */
.jrn-form { margin-top: 4px; }
.jrn-card {
  position: relative; background: var(--paper);
  border: 1px solid var(--stitch); border-radius: var(--radius);
  padding: 26px 26px 22px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.jrn-card-tab {
  position: absolute; top: -1px; left: 22px;
  transform: translateY(-50%);
  background: var(--forest); color: var(--parchment);
  font-family: var(--font-head); font-size: 0.66rem;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 13px; border-radius: 3px;
  box-shadow: 0 2px 5px rgba(62,47,35,0.22);
}
.jrn-card-main {
  border: 2px solid var(--wood-light);
  background:
    repeating-linear-gradient(180deg, transparent, transparent 31px, rgba(107,79,58,0.07) 31px, rgba(107,79,58,0.07) 32px),
    var(--paper);
}
.jrn-card-main .jrn-card-tab { background: var(--terracotta); }
.jrn-card-am .jrn-card-tab { background: var(--amber); color: var(--bark); }

/* the question */
.jrn-prompt-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.jrn-prompt {
  font-family: var(--font-head); font-size: 1.3rem; line-height: 1.4;
  color: var(--bark); flex: 1; letter-spacing: -0.2px;
}
.jrn-prompt-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.jrn-fw {
  font-size: 0.6rem; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--moss); background: #eef2e8; border: 1px solid var(--sage);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.jrn-reroll {
  background: none; border: 1px dashed var(--wood-light); color: var(--wood);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; line-height: 1; transition: all 0.2s;
}
.jrn-reroll:hover { background: var(--amber); color: var(--bark); border-style: solid; }
.jrn-reroll.spin { animation: jrnSpin 0.6s linear infinite; }
@keyframes jrnSpin { to { transform: rotate(360deg); } }

.jrn-q {
  display: block; font-family: var(--font-head); font-size: 1.12rem;
  color: var(--bark); margin-bottom: 10px;
}
.jrn-moment, .jrn-body {
  width: 100%; font-family: var(--font-body); font-size: 1.08rem;
  line-height: 32px; color: var(--ink);
  background: transparent; border: none; resize: vertical;
  padding: 0 2px;
}
.jrn-moment:focus, .jrn-body:focus { outline: none; }
.jrn-moment::placeholder, .jrn-body::placeholder { color: rgba(107,95,79,0.5); font-style: italic; }
.jrn-body {
  background:
    repeating-linear-gradient(180deg, transparent, transparent 31px, rgba(107,79,58,0.09) 31px, rgba(107,79,58,0.09) 32px);
  margin-top: 8px;
}
.jrn-moment-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed rgba(184,168,136,0.7); flex-wrap: wrap;
}
.jrn-meter { font-size: 0.75rem; color: var(--ink-soft); font-style: italic; transition: color 0.2s; }
.jrn-meter.good { color: var(--forest); font-weight: 600; font-style: normal; }
.jrn-fallback-toggle {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.8rem; color: var(--terracotta);
  border-bottom: 1px dotted var(--terracotta); padding: 0;
}
.jrn-fallback-toggle:hover { color: var(--bark); border-bottom-color: var(--bark); }
.jrn-fallback { margin-top: 14px; padding-top: 4px; }
.jrn-scene-hint {
  margin-top: 10px; padding: 9px 14px; font-size: 0.83rem;
  background: #f4ead4; border-left: 3px solid var(--amber);
  color: var(--ink-soft); font-style: italic; border-radius: 3px;
}

/* ---------------------------------------------- expansion drawers */
.jrn-exp {
  background: var(--paper); border: 1px solid var(--stitch);
  border-radius: var(--radius); margin-bottom: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.jrn-exp > summary {
  cursor: pointer; padding: 14px 22px; list-style: none;
  font-family: var(--font-head); font-size: 0.94rem; color: var(--wood);
  display: flex; align-items: center; gap: 9px;
  transition: background 0.15s;
}
.jrn-exp > summary::-webkit-details-marker { display: none; }
.jrn-exp > summary::after {
  content: "+"; margin-left: auto; font-size: 1.15rem;
  color: var(--wood-light); transition: transform 0.2s;
}
.jrn-exp[open] > summary::after { content: "\2212"; }
.jrn-exp > summary:hover { background: #f7f1e2; color: var(--bark); }
.jrn-exp > summary em {
  font-size: 0.72rem; color: var(--ink-soft); font-style: italic;
  font-family: var(--font-body); letter-spacing: 0.2px;
}
.exp-ico { font-size: 1rem; }
.jrn-exp > *:not(summary) { padding: 0 22px; }
.jrn-exp > *:not(summary):last-child { padding-bottom: 20px; }
.jrn-exp textarea { margin-bottom: 4px; }

/* ---------------------------------------------- lines & mini labels */
.jrn-line {
  width: 100%; font-family: var(--font-body); font-size: 0.98rem;
  color: var(--ink); background: transparent;
  border: none; border-bottom: 1px solid var(--stitch);
  padding: 7px 2px; margin-bottom: 14px; transition: border-color 0.18s;
}
.jrn-line:focus { outline: none; border-bottom: 2px solid var(--moss); }
.jrn-line::placeholder { color: rgba(107,95,79,0.45); font-style: italic; }
.jrn-line-sm { max-width: 220px; }
select.jrn-line { padding: 8px 2px; }
.jrn-mini-label {
  display: block; font-size: 0.68rem; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--wood-light);
  margin-bottom: 2px; font-family: var(--font-head);
}
.jrn-hint { text-transform: none; letter-spacing: 0; font-size: 0.72rem; font-style: italic; color: var(--ink-soft); }
.jrn-senses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.jrn-senses > div:last-child { grid-column: 1 / -1; }
.jrn-hl-status {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.83rem; color: var(--ink-soft); margin-top: 4px;
}
.jrn-hl-status label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.jrn-hl-status .hl-better { color: var(--terracotta); font-weight: 600; }

/* ---------------------------------------------- moods */
.jrn-moods { display: flex; flex-wrap: wrap; gap: 8px; }
.jrn-mood input { position: absolute; opacity: 0; width: 0; height: 0; }
.jrn-mood span {
  display: inline-block; padding: 7px 14px; cursor: pointer;
  font-size: 0.87rem; color: var(--ink-soft);
  background: #f4efe1; border: 1px solid var(--stitch);
  border-radius: 999px; transition: all 0.16s;
}
.jrn-mood span:hover { border-color: var(--moss); transform: translateY(-1px); }
.jrn-mood input:checked + span {
  background: var(--forest); color: var(--parchment);
  border-color: var(--forest-deep); font-weight: 600;
  box-shadow: 0 3px 0 var(--forest-deep);
}

/* ---------------------------------------------- subject tags */
.jrn-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.jrn-tag input { position: absolute; opacity: 0; width: 0; height: 0; }
.jrn-tag span {
  display: inline-block; padding: 4px 12px; cursor: pointer;
  font-size: 0.82rem; border-radius: 3px;
  color: var(--tc, var(--moss));
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--tc, var(--moss));
  transition: all 0.15s;
}
.jrn-tag-sug span { border-style: dashed; opacity: 0.75; }
.jrn-tag input:checked + span {
  background: var(--tc, var(--moss)); color: #fff;
  border-style: solid; opacity: 1; font-weight: 600;
}

/* ---------------------------------------------- photos */
.jrn-file { font-size: 0.88rem; margin-bottom: 12px; }
.jrn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.jrn-thumb {
  width: 78px; height: 78px; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.jrn-thumb-vid {
  display: flex; align-items: center; justify-content: center;
  background: var(--bark); color: var(--parchment);
  font-size: 0.6rem; padding: 4px; text-align: center; word-break: break-all;
}

/* ---------------------------------------------- privacy switch */
.jrn-card-privacy .jrn-card-tab { background: var(--wood); }
.jrn-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.jrn-switch input { position: absolute; opacity: 0; }
.jrn-switch-track {
  width: 48px; height: 26px; border-radius: 999px;
  background: var(--wood); border: 1px solid var(--bark-dark);
  position: relative; flex-shrink: 0; transition: background 0.2s;
}
.jrn-switch-knob {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.jrn-switch input:checked + .jrn-switch-track { background: var(--forest); }
.jrn-switch input:checked + .jrn-switch-track .jrn-switch-knob { transform: translateX(22px); }
.jrn-switch-label { font-size: 0.92rem; color: var(--ink-soft); font-weight: 600; }
.jrn-switch-label.is-public { color: var(--forest-deep); }
.jrn-seal { margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(184,168,136,0.7); }
.jrn-check { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }

/* ---------------------------------------------- actions */
.jrn-actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin: 22px 0 8px;
}
.jrn-save { font-size: 1.02rem; padding: 12px 30px; }
.jrn-autosave { font-size: 0.75rem; color: var(--moss); font-style: italic; margin-left: auto; }

/* ---------------------------------------------- gentle nudge */
.jrn-nudge {
  background: #f4ead4; border: 1px dashed var(--amber);
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 18px;
}
.jrn-nudge a { color: var(--terracotta); font-weight: 600; text-decoration: none; margin-left: 6px; }
.jrn-nudge a:hover { border-bottom: 1px solid var(--amber); }

/* ---------------------------------------------- trip grid */
.jrn-grid-wrap {
  background: var(--paper); border: 1px solid var(--stitch);
  border-radius: var(--radius); padding: 20px 24px 22px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.jrn-grid-head { margin-bottom: 14px; }
.jrn-grid-head h3 { font-family: var(--font-head); font-size: 1rem; color: var(--bark); }
.jrn-grid-head span { font-size: 0.78rem; color: var(--ink-soft); font-style: italic; }
.jrn-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.jrn-sq {
  width: 15px; height: 15px; border-radius: 2px;
  background: #e7ddc7; border: 1px solid rgba(184,168,136,0.8);
  transition: transform 0.12s;
}
.jrn-sq.on { background: var(--moss); border-color: var(--forest-deep); }
.jrn-sq:hover { transform: scale(1.35); z-index: 2; }

/* ---------------------------------------------- weekly gratitude */
.jrn-gratitude .jrn-grat-note {
  font-size: 0.82rem; color: var(--ink-soft); font-style: italic;
  padding-bottom: 12px;
}
.jrn-grat-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }

/* ---------------------------------------------- responsive */
@media (max-width: 720px) {
  .jrn-masthead { flex-direction: column; gap: 14px; padding: 20px; }
  .jrn-mast-right { display: flex; align-items: center; gap: 16px; }
  .jrn-logged { margin-top: 0; text-align: left; }
  .jrn-title { font-size: 1.7rem; }
  .jrn-context { padding: 14px 20px; }
  .jrn-ctx-grid { grid-template-columns: repeat(2, 1fr); }
  .jrn-styles { padding-left: 0; }
  .jrn-style { padding: 8px 11px; }
  .js-name { font-size: 0.74rem; }
  .jrn-card { padding: 22px 18px 18px; }
  .jrn-prompt { font-size: 1.12rem; }
  .jrn-senses, .jrn-grat-row { grid-template-columns: 1fr; }
  .jrn-exp > *:not(summary) { padding: 0 18px; }
  .jrn-autosave { margin-left: 0; width: 100%; }
  .jrn-frag-add { flex-direction: column; }
}

/* fragment symbol hints */
.jrn-frag-hints { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.fh-lead { font-size: 0.68rem; color: var(--ink-soft); font-style: italic; margin-right: 2px; }
.fh-chip {
  font-size: 0.7rem; color: var(--wood); background: #f4efe1;
  border: 1px solid var(--stitch); border-radius: 999px; padding: 2px 9px;
  display: inline-flex; align-items: center; gap: 5px;
}
.fh-chip b { color: var(--terracotta); font-weight: 700; }

/* ------------------------------ layout bar (replaces the old tab strip) */
.jrn-styles { display: none; }
.jrn-layout-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0 16px; padding: 12px 20px;
  background: #efe6d2; border: 1px solid var(--stitch);
  border-radius: 999px; box-shadow: var(--shadow);
}
.jl-label {
  font-family: var(--font-head); font-size: 0.68rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--wood);
}
.jl-select {
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  color: var(--bark); background: var(--paper);
  border: 1px solid var(--wood-light); border-radius: var(--radius-sm);
  padding: 6px 10px; cursor: pointer;
}
.jl-select:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(107,127,92,0.15); }
.jl-note { font-size: 0.75rem; color: var(--ink-soft); font-style: italic; margin-left: auto; }

/* the five ways to write - guide drawer */
.jrn-styles-list { padding-top: 6px; }
.jsl-row {
  display: flex; gap: 14px; padding: 12px 0; align-items: flex-start;
  border-bottom: 1px dotted rgba(184,168,136,0.6);
}
.jsl-row:last-of-type { border-bottom: none; }
.jsl-row.is-current { background: #f4efe1; border-radius: var(--radius-sm); padding: 12px 10px; }
.jsl-emoji { font-size: 1.3rem; flex-shrink: 0; }
.jsl-body { font-size: 0.9rem; color: var(--ink-soft); }
.jsl-body strong { font-family: var(--font-head); color: var(--bark); font-size: 0.98rem; }
.jsl-min { font-size: 0.66rem; letter-spacing: 1px; text-transform: uppercase; color: var(--moss); margin-left: 6px; }
.jsl-body em { color: var(--terracotta); }
.jsl-body p { margin: 4px 0 0; font-size: 0.86rem; }
.jsl-note {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed rgba(184,168,136,0.7);
  font-size: 0.82rem; color: var(--ink-soft); font-style: italic;
}
@media (max-width: 720px) {
  .jrn-layout-bar { border-radius: var(--radius); }
  .jl-note { margin-left: 0; width: 100%; }
}

/* diary page: community / my diary switcher */
.diary-tabs { display: flex; gap: 8px; margin: 0 0 18px; }
.diary-tab {
  display: inline-block; padding: 8px 18px;
  font-family: var(--font-head); font-size: 0.95rem; font-weight: 600;
  color: var(--ink-soft); background: var(--paper);
  border: 2px solid var(--stitch); border-radius: var(--radius);
  text-decoration: none; transition: all 0.15s ease;
}
.diary-tab:hover { border-color: var(--forest); color: var(--forest); }
.diary-tab.active {
  background: var(--forest); border-color: var(--forest); color: var(--paper);
  box-shadow: var(--shadow); cursor: default;
}

/* ============================================ quotes & goals (the fun batch) */
.hero-quote {
  margin: 22px auto 4px; max-width: 620px;
  padding: 14px 26px;
  border-top: 1px solid rgba(246,240,227,0.35);
  border-bottom: 1px solid rgba(246,240,227,0.35);
}
.hero-quote-text {
  font-family: var(--font-head); font-style: italic;
  font-size: 1.18rem; color: #f6f0e3; margin: 0;
}
.hero-quote-author {
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(246,240,227,0.75); margin: 6px 0 0;
}

.quote-card {
  background: var(--paper);
  border: 2px solid var(--stitch);
  border-left: 6px solid var(--terracotta);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 24px; margin-bottom: 30px;
}
.quote-mark {
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--moss);
  margin-bottom: 6px;
}
.quote-text {
  font-family: var(--font-head); font-style: italic;
  font-size: 1.22rem; color: var(--bark); margin: 0;
}
.quote-author {
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-soft); margin: 8px 0 0;
}

.goal-list { display: flex; flex-direction: column; gap: 8px; }
.goal-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--stitch);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.goal-row.goal-done { opacity: 0.62; }
.goal-row.goal-done .goal-title { text-decoration: line-through; }
.goal-check {
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; padding: 0 2px; line-height: 1;
}
.goal-emoji { font-size: 1.3rem; }
.goal-title {
  font-family: var(--font-head); font-size: 0.98rem;
  color: var(--bark); flex: 1; min-width: 180px;
}
.goal-del {
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 1.2rem; padding: 0 4px; line-height: 1;
}
.goal-del:hover { color: var(--terracotta); }

/* badge cards get a tiny bit more life */
.card[style*='text-align:center']:hover { transform: translateY(-3px); transition: transform 0.15s ease; }

/* ===== Instant forms UX ===== */
#wf-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--terracotta, #c0562f), #e8a15c);
  z-index: 9999; border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(192, 86, 47, 0.55);
  pointer-events: none; opacity: 0;
}
.wf-busy {
  opacity: 0.6 !important;
  position: relative; transition: opacity 0.15s ease;
}
.wf-morphed { animation: wf-settle 0.22s ease; }
@keyframes wf-settle {
  from { opacity: 0.55; transform: translateY(3px); }
  to   { opacity: 1;    transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wf-morphed { animation: none; }
}
