/* ==========================================================
   QuikSquaQuirkprty — Pause & Bloom
   Playful slow-living travel journal design system
   Palette: terracotta, sage, marigold, paper cream (no blue)
   ========================================================== */

:root {
  --primary: #C96E50;
  --primary-strong: #A9553B;
  --sage: #718568;
  --sage-strong: #55674D;
  --accent: #E7B94F;
  --bg: #F7F0E5;
  --surface: #FFFCF6;
  --dark: #39352D;
  --text: #332F29;
  --muted: #8B8276;
  --muted-strong: #6A6257;
  --highlight: #D6DDAF;
  --border: #E4D8C8;
  --coral: #D9A3A0;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(57, 53, 45, .12);
  --shadow-lift: 0 18px 40px rgba(57, 53, 45, .18);
  --display: "Cooper Black", "Recoleta", "Bookman Old Style", "Iowan Old Style", Georgia, serif;
  --hand: "Segoe Print", "Bradley Hand", "Marker Felt", "Chalkboard SE", "Comic Sans MS", cursive;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(139, 130, 118, .08) 1px, transparent 1px),
    radial-gradient(rgba(201, 110, 80, .05) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 7px;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(57,53,45,.55); border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -60px; background: var(--dark); color: var(--surface); padding: .6rem 1rem; border-radius: 10px; z-index: 1000; }
.skip:focus { top: 1rem; color: var(--surface); }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.section-tight { padding: 2.5rem 0; }
.eyebrow { font-family: var(--hand); color: var(--primary-strong); font-size: 1.15rem; margin: 0 0 .3rem; display: inline-block; transform: rotate(-2deg); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head p { color: var(--muted-strong); }
.lead { font-size: 1.2rem; color: var(--muted-strong); }

/* ---------- Header (non-sticky, scrolls away) ---------- */
.site-header { position: relative; z-index: 50; background: var(--surface); border-bottom: 2px dashed var(--border); }
.nav-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--hand); font-size: .85rem; color: var(--sage-strong); }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--surface); font-family: var(--display); font-size: 1rem; border: 3px dashed var(--accent); transform: rotate(-8deg); flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a { display: block; padding: .45rem .7rem; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .93rem; transition: background .2s, transform .2s; }
.site-nav a:hover { background: var(--highlight); transform: translateY(-1px); }
.site-nav a[aria-current="page"] { background: var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: var(--dark); color: var(--surface); border: 0; border-radius: 999px; padding: .55rem 1rem; font: 600 .95rem var(--body); cursor: pointer; }
.saved-btn { background: var(--surface); border: 2px solid var(--primary); color: var(--primary-strong); border-radius: 999px; padding: .45rem .9rem; font: 700 .9rem var(--body); cursor: pointer; transition: transform .2s, background .2s; }
.saved-btn:hover { background: var(--primary); color: var(--surface); transform: rotate(-2deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-block; }
  .site-nav { order: 5; width: 100%; margin: 0; max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .site-nav.open { max-height: 600px; }
  .site-nav ul { flex-direction: column; padding: .5rem 0 1rem; }
  .site-nav a { padding: .7rem 1rem; font-size: 1.05rem; }
  .saved-btn { order: 4; }
}

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.2rem; border-radius: 999px; font: 700 .95rem var(--body); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; line-height: 1.2; text-align: center; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-primary:hover { background: var(--text); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--accent); color: var(--text); }
.btn-sage { background: var(--sage-strong); color: #fff; }
.btn-sage:hover { background: var(--text); color: #fff; }
.btn-light { background: var(--surface); color: var(--text); }
.btn-small { padding: .45rem .85rem; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { border: 2px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .45rem 1rem; font: 600 .92rem var(--body); cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.chip:hover { transform: translateY(-2px) rotate(-1deg); border-color: var(--accent); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--accent); border-color: var(--text); }
.chip[aria-pressed="true"]::before, .chip.is-active::before { content: "✓ "; }
.chip-dark { background: rgba(255,252,246,.08); color: var(--surface); border-color: rgba(255,252,246,.35); }
.chip-dark[aria-pressed="true"] { color: var(--text); }

/* ---------- Hero: The Open-Ended Adventure ---------- */
.hero-adventure { position: relative; overflow: hidden; background: var(--dark); color: var(--surface); padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 8vw, 6rem); border-radius: 0 0 48px 48px; isolation: isolate; }
.hero-adventure::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,252,246,.06) 1px, transparent 1px); background-size: 18px 18px; z-index: -1; }
.hero-content { position: relative; z-index: 3; max-width: 640px; }
.hero-content h1 { color: var(--surface); }
.hero-content .lead { color: #E9DFD0; }
.hero-content .eyebrow { color: var(--accent); }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: inline-block; animation: lineUp .9s cubic-bezier(.2,.8,.2,1) both; }
.reveal-line:nth-child(2) > span { animation-delay: .15s; }
.reveal-line:nth-child(3) > span { animation-delay: .3s; }
.hl-marigold { color: var(--accent); }
.hl-scribble { position: relative; white-space: nowrap; }
.hl-scribble::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.05em; height: .18em; background: var(--primary); border-radius: 50%; opacity: .85; z-index: -1; transform: rotate(-1.5deg); }
@keyframes lineUp { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }

.search-bar { display: flex; gap: .5rem; background: var(--surface); padding: .45rem; border-radius: 999px; box-shadow: var(--shadow); margin: 1.6rem 0 1.1rem; max-width: 560px; }
.search-bar input { flex: 1; border: 0; background: transparent; font: 500 1rem var(--body); padding: .6rem 1rem; color: var(--text); min-width: 0; }
.search-bar input::placeholder { color: var(--muted-strong); }
.search-bar input:focus-visible { box-shadow: none; outline-offset: 0; }
.hero-note { font-size: .85rem; color: #D9CFC0; margin-top: 1rem; }

.hero-collage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.collage-item { position: absolute; transform: translate3d(calc(var(--mx, 0) * var(--d, 10) * 1px), calc((var(--my, 0) * var(--d, 10) + var(--sy, 0) * var(--d, 10) * .012) * 1px), 0); transition: transform .3s ease-out; }
.collage-inner { transform: rotate(var(--r, 0deg)); animation: floaty 9s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes floaty { 0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); } 50% { transform: rotate(calc(var(--r, 0deg) + 1.5deg)) translateY(-12px); } }
.collage-photo { background: var(--surface); padding: 10px 10px 34px; border-radius: 6px; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.collage-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 3px; background: linear-gradient(135deg, var(--border), var(--highlight)); }
.collage-photo figcaption { font-family: var(--hand); color: var(--text); font-size: .9rem; text-align: center; margin-top: 6px; }
.c-photo-a { top: 7%; right: 4%; width: min(24vw, 300px); --r: 5deg; }
.c-photo-b { bottom: 6%; right: 23%; width: min(18vw, 230px); --r: -7deg; --delay: -3s; }
.c-photo-c { top: 12%; right: 29%; width: min(14vw, 180px); --r: -3deg; --delay: -5s; }
.c-postcard { top: 58%; right: 2%; width: 220px; --r: 8deg; --delay: -2s; }
.postcard { background: #FBF2E2; color: var(--text); border-radius: 8px; padding: .9rem 1rem; box-shadow: 0 16px 30px rgba(0,0,0,.3); font-family: var(--hand); font-size: .92rem; border-left: 6px solid var(--primary); }
.postcard strong { display: block; font-family: var(--display); font-size: 1rem; }
.c-stamp { top: 4%; right: 46%; width: 110px; --r: 0deg; }
.stamp-spin { animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.c-activity-1 { top: 70%; right: 44%; --r: -6deg; --delay: -4s; }
.c-activity-2 { top: 40%; right: 47%; --r: 4deg; --delay: -6s; }
.activity-card { background: var(--accent); color: var(--text); padding: .5rem .9rem; border-radius: 14px; font-weight: 700; font-size: .85rem; box-shadow: 0 10px 20px rgba(0,0,0,.25); white-space: nowrap; }
.activity-card.sage { background: var(--highlight); }
.activity-card.coral { background: var(--coral); }
.c-route { inset: 0; }
.c-route svg { width: 100%; height: 100%; }
.route-path { stroke-dasharray: 8 12; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -600; } }
.paper-cut { position: absolute; border-radius: 40% 60% 55% 45%; opacity: .16; }
.paper-cut.one { width: 260px; height: 220px; background: var(--primary); bottom: -60px; left: -40px; animation: drift 18s ease-in-out infinite; }
.paper-cut.two { width: 180px; height: 160px; background: var(--sage); top: -40px; left: 38%; animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(30px, -20px) rotate(12deg); } }

@media (max-width: 1000px) {
  .hero-collage { opacity: .35; }
  .c-photo-c, .c-activity-2, .c-stamp { display: none; }
  .c-photo-a { width: 40vw; right: -6%; }
  .c-photo-b { width: 30vw; right: 2%; bottom: 2%; }
}
@media (max-width: 640px) {
  .hero-collage { opacity: .22; }
  .c-postcard, .c-activity-1 { display: none; }
  .search-bar { border-radius: 20px; flex-direction: column; }
  .search-bar .btn { width: 100%; }
}

/* ---------- Light page hero ---------- */
.page-hero { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 0; overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.page-hero-collage { position: relative; min-height: 320px; }
.page-hero-collage figure { position: absolute; margin: 0; background: var(--surface); padding: 10px 10px 30px; box-shadow: var(--shadow-lift); border-radius: 6px; }
.page-hero-collage figure img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: linear-gradient(135deg, var(--border), var(--highlight)); }
.page-hero-collage figcaption { font-family: var(--hand); font-size: .9rem; text-align: center; padding-top: 4px; }
.page-hero-collage .ph-a { width: 72%; top: 0; right: 0; transform: rotate(4deg); }
.page-hero-collage .ph-b { width: 58%; bottom: 0; left: 0; transform: rotate(-5deg); }
.page-hero-collage .ph-stamp { position: absolute; width: 96px; left: 44%; top: 38%; z-index: 2; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-collage { min-height: 260px; }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.resource-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.resource-card:nth-child(3n+1) { transform: rotate(-.6deg); }
.resource-card:nth-child(3n+2) { transform: rotate(.5deg); }
.resource-card:hover { transform: translateY(-6px) rotate(0); box-shadow: var(--shadow-lift); }
.card-photo { position: relative; margin: 0; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, var(--border), var(--highlight)); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.resource-card:hover .card-photo img { transform: scale(1.05); }
.stamp-label { position: absolute; top: 12px; left: 12px; background: var(--surface); color: var(--text); border: 2px dashed currentColor; border-radius: 8px; padding: .2rem .6rem; font: 700 .75rem var(--body); text-transform: uppercase; letter-spacing: .06em; transform: rotate(-4deg); }
.card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-strong); font-weight: 700; margin-bottom: .3rem; }
.card-body h3 { margin-bottom: .45rem; }
.card-body p { font-size: .97rem; }
.card-meta { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.card-meta li { font-size: .8rem; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .6rem; }
.card-actions { margin-top: auto; display: flex; gap: .55rem; flex-wrap: wrap; }
.card-actions .btn { flex: 1 1 auto; }
.save-toggle { align-self: flex-start; background: transparent; border: 2px dashed var(--muted); border-radius: 999px; padding: .3rem .8rem; font: 700 .8rem var(--body); cursor: pointer; margin-bottom: .9rem; color: var(--text); transition: background .2s, transform .2s; }
.save-toggle:hover { transform: rotate(-2deg); }
.save-toggle[aria-pressed="true"] { background: var(--accent); border-style: solid; border-color: var(--text); }

.cat-slow-travel .stamp-label { color: var(--primary-strong); }
.cat-learning .stamp-label { color: var(--sage-strong); }
.cat-creative .stamp-label { color: #8E4E4A; }
.cat-growth .stamp-label { color: #5B6630; }
.cat-financial .stamp-label { color: #7A5A12; }
.cat-career .stamp-label { color: var(--dark); }
.cat-slow-travel { border-top: 6px solid var(--primary); }
.cat-learning { border-top: 6px solid var(--sage); }
.cat-creative { border-top: 6px solid var(--coral); }
.cat-growth { border-top: 6px solid var(--highlight); }
.cat-financial { border-top: 6px solid var(--accent); }
.cat-career { border-top: 6px solid var(--dark); }

.empty-state { display: none; text-align: center; background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); padding: 2.5rem 1.5rem; }
.empty-state.show { display: block; }
.result-count { font-weight: 700; color: var(--muted-strong); margin-bottom: 1rem; }

/* ---------- Panels, notes, badges ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: var(--shadow); }
.panel-dark { background: var(--dark); color: var(--surface); border-color: transparent; }
.panel-dark h2, .panel-dark h3 { color: var(--surface); }
.panel-dark a { color: var(--accent); }
.panel-sage { background: #EEF1DE; border-color: var(--highlight); }
.sticky-note { background: #F8E3A6; padding: 1.2rem 1.3rem; border-radius: 4px 18px 6px 14px; box-shadow: 0 10px 22px rgba(57,53,45,.15); transform: rotate(-1.2deg); font-size: .98rem; }
.sticky-note.coral { background: #F2D3CF; transform: rotate(1deg); }
.sticky-note.pistachio { background: var(--highlight); transform: rotate(.6deg); }
.sticky-note h3 { font-family: var(--hand); font-size: 1.2rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font: 700 .75rem var(--body); text-transform: uppercase; letter-spacing: .06em; border-radius: 999px; padding: .25rem .65rem; border: 2px solid currentColor; }
.badge-verified { color: var(--sage-strong); background: #EEF1DE; }
.badge-estimate { color: #7A5A12; background: #FBF0D2; }
.badge-editorial { color: #8E4E4A; background: #F7E4E2; }
.notice { border-left: 6px solid var(--accent); background: #FBF4E2; padding: 1rem 1.2rem; border-radius: 0 14px 14px 0; font-size: .95rem; }
.notice-terracotta { border-color: var(--primary); background: #F8E8E1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .two-col, .three-col { grid-template-columns: 1fr; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .45rem 0 .45rem 2rem; position: relative; border-bottom: 1px dashed var(--border); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: .45rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--highlight); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.panel-dark .check-list li { border-color: rgba(255,252,246,.15); }
.panel-dark .check-list li::before { background: var(--accent); color: var(--text); }

/* ---------- Featured experience ---------- */
.featured-exp { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.featured-photo { position: relative; }
.featured-photo figure { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lift); transform: rotate(-2deg); background: linear-gradient(135deg, var(--border), var(--highlight)); }
.featured-photo img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; }
.featured-photo .sticky-note { position: absolute; right: -10px; bottom: -24px; max-width: 230px; }
.fact-list { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: .6rem; }
.fact-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .7rem 1rem; font-size: .95rem; }
.fact-list .badge { margin-right: .4rem; }
@media (max-width: 860px) { .featured-exp { grid-template-columns: 1fr; } .featured-photo .sticky-note { position: relative; right: auto; bottom: auto; margin-top: -30px; margin-left: 1rem; } }

/* image wipe reveal */
.wipe { position: relative; }
.wipe::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: right; transform: scaleX(1); transition: transform .9s cubic-bezier(.7,0,.2,1); z-index: 2; pointer-events: none; }
.wipe.in::after { transform: scaleX(0); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.resource-card.reveal.in:nth-child(3n+1) { transform: rotate(-.6deg); }
.resource-card.reveal.in:nth-child(3n+2) { transform: rotate(.5deg); }
.resource-card.reveal.in:hover { transform: translateY(-6px); }

/* ---------- Forms & planners ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .field legend, .fieldset-label { font-weight: 700; font-size: .92rem; }
.field small { color: var(--muted-strong); font-size: .8rem; }
input[type="text"], input[type="number"], input[type="search"], input[type="date"], input[type="email"], select, textarea {
  width: 100%; padding: .65rem .85rem; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); font: 500 1rem var(--body); color: var(--text);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--text); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.option-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.option-pill { position: relative; }
.option-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-pill span { display: inline-block; padding: .45rem .95rem; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; transition: transform .2s, background .2s; }
.option-pill span:hover { transform: translateY(-2px); }
.option-pill input:checked + span { background: var(--accent); border-color: var(--text); }
.option-pill input:checked + span::before { content: "✓ "; }
.option-pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(57,53,45,.5); }
.panel-dark .option-pill span { background: rgba(255,252,246,.08); color: var(--surface); border-color: rgba(255,252,246,.35); }
.panel-dark .option-pill input:checked + span { background: var(--accent); color: var(--text); }
.panel-dark select, .panel-dark input[type="number"] { background: #4A453C; color: var(--surface); border-color: #6A6257; }
.result-box { margin-top: 1.6rem; background: var(--bg); border: 2px dashed var(--border); border-radius: 22px; padding: 1.4rem; color: var(--text); }
.panel-dark .result-box { background: #45403A; border-color: #6A6257; color: var(--surface); }
.panel-dark .result-box h3, .panel-dark .result-box h4 { color: var(--surface); }
.result-box h3 { margin-bottom: .4rem; }
.phase-bar { display: flex; height: 38px; border-radius: 999px; overflow: hidden; margin: 1rem 0; border: 2px solid var(--text); }
.phase-bar div { display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; }
.phase-prep { background: var(--highlight); }
.phase-core { background: var(--accent); }
.phase-return { background: var(--coral); }
.mini-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.mini-links a { background: var(--surface); color: var(--text); border: 2px solid var(--text); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 700; text-decoration: none; }
.mini-links a:hover { background: var(--accent); }

.progress { height: 22px; border-radius: 999px; background: var(--border); overflow: hidden; border: 2px solid var(--text); position: relative; }
.progress-fill { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--sage), var(--sage) 10px, var(--highlight) 10px, var(--highlight) 20px); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.progress-fill.is-gap { background: repeating-linear-gradient(45deg, var(--primary), var(--primary) 10px, var(--coral) 10px, var(--coral) 20px); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; }
.stat span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-strong); font-weight: 700; }
.stat strong { font-family: var(--display); font-size: 1.45rem; }
.alloc-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; border: 2px solid var(--text); margin: .5rem 0 .4rem; }
.alloc-bar div { transition: width .6s ease; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .85rem; list-style: none; padding: 0; margin: 0; }
.alloc-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--text); }
.c-ess { background: var(--sage); }
.c-disc { background: var(--accent); }
.c-tran { background: var(--coral); }
.c-unex { background: var(--primary); }

table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; font-size: .95rem; }
.data-table th, .data-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { background: var(--highlight); font-weight: 700; }
.table-scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }

/* ---------- Listings layout ---------- */
.listing-layout { display: grid; grid-template-columns: 290px 1fr; gap: 2rem; align-items: start; }
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 1.3rem; box-shadow: var(--shadow); display: grid; gap: .9rem; }
.filter-panel h2 { font-size: 1.3rem; margin: 0; }
.listing-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .listing-layout { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.inspo-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 170px; gap: 1rem; }
.inspo-grid figure { margin: 0; position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(135deg, var(--border), var(--highlight)); }
.inspo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.inspo-grid figure:hover img { transform: scale(1.06); }
.inspo-grid figcaption { position: absolute; left: 10px; bottom: 10px; background: var(--surface); padding: .25rem .7rem; border-radius: 8px; font-family: var(--hand); font-size: .95rem; transform: rotate(-2deg); }
.inspo-grid .g1 { grid-column: span 3; grid-row: span 2; }
.inspo-grid .g2 { grid-column: span 3; }
.inspo-grid .g3 { grid-column: span 2; }
.inspo-grid .g4 { grid-column: span 1; }
.inspo-grid .g5 { grid-column: span 2; }
.inspo-grid .g6 { grid-column: span 4; }
@media (max-width: 760px) {
  .inspo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .inspo-grid figure { grid-column: span 1 !important; grid-row: span 1 !important; }
  .inspo-grid .g1 { grid-column: span 2 !important; grid-row: span 2 !important; }
}
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.detail-gallery figure { margin: 0; background: var(--surface); padding: 10px 10px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.detail-gallery figure:nth-child(odd) { transform: rotate(-1.5deg); }
.detail-gallery figure:nth-child(even) { transform: rotate(1.2deg); }
.detail-gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: linear-gradient(135deg, var(--border), var(--highlight)); }
.detail-gallery figcaption { font-size: .8rem; color: var(--muted-strong); padding-top: .4rem; }

/* ---------- Steps / timeline ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sage-strong); color: #fff; display: grid; place-items: center; font-family: var(--display); }
.steps.terracotta li::before { background: var(--primary-strong); }
.panel-dark .steps li { background: #45403A; border-color: #5A544A; }

.timeline-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.timeline-col { background: var(--surface); border-radius: 22px; padding: 1.1rem; border: 1px solid var(--border); position: relative; }
.timeline-col h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
.timeline-col h3 .phase-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text); }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.task { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: .6rem .7rem; display: grid; grid-template-columns: auto 1fr; gap: .3rem .6rem; align-items: start; animation: popIn .35s ease both; }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.task input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--sage-strong); }
.task.done .task-title { text-decoration: line-through; color: var(--muted-strong); }
.task-date { font-size: .78rem; color: var(--muted-strong); }
.task-tools { grid-column: 2; display: flex; gap: .4rem; }
.task-tools button { font: 600 .78rem var(--body); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .2rem .55rem; cursor: pointer; color: var(--text); }
.task-tools button:hover { background: var(--highlight); }
@media (max-width: 900px) { .timeline-board { grid-template-columns: 1fr; } }

/* ---------- Detail page ---------- */
.detail-hero { position: relative; border-radius: 0 0 40px 40px; overflow: hidden; background: var(--dark); color: var(--surface); }
.detail-hero img { width: 100%; height: clamp(280px, 48vw, 520px); object-fit: cover; opacity: .55; }
.detail-hero-text { position: absolute; inset: auto 0 0 0; padding: 2rem 0 2.5rem; background: linear-gradient(transparent, rgba(57,53,45,.92)); }
.detail-hero-text h1 { color: var(--surface); font-size: clamp(2rem, 4.5vw, 3.4rem); }
.detail-hero-text p { color: #EFE6D7; max-width: 720px; }
.detail-layout { display: grid; grid-template-columns: 1fr 330px; gap: 2.2rem; align-items: start; }
.facts-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.3rem; box-shadow: var(--shadow); }
.facts-card dl { margin: 0; display: grid; gap: .7rem; }
.facts-card dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted-strong); }
.facts-card dd { margin: 0; font-size: .95rem; }
.detail-section { margin-bottom: 2.4rem; }
.source-list { font-size: .92rem; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

/* ---------- Guide ---------- */
.toc { background: var(--surface); border: 2px dashed var(--border); border-radius: 22px; padding: 1.2rem 1.4rem; }
.toc ol { columns: 2; column-gap: 2rem; margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; break-inside: avoid; }
@media (max-width: 700px) { .toc ol { columns: 1; } }
.guide-article { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: 1.4rem; }
.guide-article h2 { font-size: 1.6rem; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 2rem; font-size: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #E9DFD0; margin-top: 4rem; padding: 3.5rem 0 2rem; border-radius: 48px 48px 0 0; }
.site-footer a { color: var(--accent); }
.site-footer h2 { color: var(--surface); font-size: 1.1rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-grid .link-btn { color: var(--accent); }
.brand-light { color: var(--surface); }
.brand-light small { color: var(--highlight); }
.footer-contact { font-size: .92rem; }
.footer-notices { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px dashed rgba(255,252,246,.25); font-size: .85rem; color: #D9CFC0; }
.copyright { margin-top: 1rem; color: #CFC4B4; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Cookie banner & dialog ---------- */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 900; max-width: 640px; margin-left: auto; background: var(--surface); border: 2px solid var(--text); border-radius: 22px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow-lift); animation: popIn .4s ease both; }
.cookie-banner h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.cookie-banner p { font-size: .9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-prefs { display: none; margin: .8rem 0; padding: .8rem; background: var(--bg); border-radius: 14px; font-size: .9rem; }
.cookie-prefs.show { display: block; }
.cookie-prefs label { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; }
.cookie-prefs input { accent-color: var(--sage-strong); width: 18px; height: 18px; margin-top: 3px; }

.saved-dialog { border: 2px solid var(--text); border-radius: 24px; padding: 0; max-width: 520px; width: calc(100% - 2rem); background: var(--surface); color: var(--text); }
.saved-dialog::backdrop { background: rgba(57,53,45,.6); }
.saved-dialog-inner { padding: 1.4rem; }
.saved-dialog ul { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.saved-dialog li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--bg); border-radius: 14px; padding: .6rem .8rem; }
.saved-dialog .close-x { float: right; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--text); line-height: 1; }

.stamp-svg text { font-family: var(--body); font-weight: 700; letter-spacing: 2px; }
.img-fallback { object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .wipe::after { display: none; }
}