/* Retro Photo Maker: light-table palette, cyanotype ink, film-black strips. Lora is self-hosted (SIL Open Font License). */
@font-face { font-family: "Lora"; src: url("/assets/fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --table: #e6edef;
  --table-2: #d5dfe2;
  --paper: #fbfcfb;
  --ink: #123a5e;
  --ink-soft: #37566f;
  --film: #16181b;
  --amber: #e5a823;
  --rust: #b93a29;
  --line: rgba(18, 58, 94, 0.2);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--table); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.65;
  font-feature-settings: "kern", "liga";
}
img, canvas, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; font-family: var(--ui); }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-style: italic; font-weight: 700; font-size: 1.6rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--ui); font-size: 1rem; }
.nav a { text-decoration: none; padding: 9px 18px; border-radius: 999px; border: 2px solid transparent; color: var(--ink); font-weight: 600; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* intro */
.intro { padding: 44px 0 26px; }
.intro h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -0.022em; margin: 0 0 18px; max-width: 18ch; font-weight: 700; }
.intro .lead { max-width: 58ch; font-size: 1.2rem; color: var(--ink-soft); margin: 0; }
.crumbs { font-family: var(--ui); font-size: 0.9rem; margin: 0 0 14px; color: var(--ink-soft); }
.crumbs a { color: inherit; }

/* the bench: viewer + controls + film strip */
.bench { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); grid-template-areas: "view side" "reel reel" "prints prints"; }
.viewer-col { grid-area: view; padding: 18px 18px 22px; border-right: 1px solid var(--line); min-width: 0; }
.reel { grid-area: reel; min-width: 0; }
.prints { grid-area: prints; }
.side-col { grid-area: side; min-width: 0; }
.linkbtn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.counter { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; min-height: 4.6rem; }
.counter .year { font-style: italic; font-weight: 700; font-size: clamp(3.2rem, 8vw, 5.4rem); line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.counter .era-name { font-family: var(--ui); font-size: 1rem; color: var(--ink-soft); }
.viewer { position: relative; background: var(--table-2); border: 1px solid var(--line); min-height: 220px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; padding: 14px; overflow: hidden; }
.viewer canvas#out { display: block; width: auto; height: auto; max-width: 100%; max-height: 68vh; background: #fff; }
.viewer.drop { outline: 3px dashed var(--ink); outline-offset: -8px; }
.viewer.shutter::after { content: ""; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: shutter 0.45s ease-out forwards; }
.viewer.shutter canvas#out { animation: develop 0.5s ease-out; }
@keyframes shutter { 0% { opacity: 0.85; } 100% { opacity: 0; } }
@keyframes develop { 0% { filter: blur(3px) brightness(1.35); transform: scale(1.015); } 100% { filter: none; transform: none; } }
.sample-note { font-family: var(--ui); font-size: 0.9rem; margin: 10px 0 0; color: var(--ink-soft); }
.msg { font-family: var(--ui); font-size: 0.95rem; color: var(--rust); margin: 8px 0 0; min-height: 1.3em; }

.side-col { padding: 18px; display: flex; flex-direction: column; gap: 18px; font-family: var(--ui); font-size: 0.97rem; }
.side-col h2 { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 8px; letter-spacing: -0.005em; }
.btn { appearance: none; font: 600 0.97rem var(--ui); border-radius: 3px; padding: 11px 16px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-align: center; }
.btn:hover { background: var(--table); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #0b2a46; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field span, .lbl { font-size: 0.88rem; color: var(--ink-soft); }
.field input, select, .birth input { font: inherit; padding: 10px 11px; border: 1px solid var(--ink-soft); border-radius: 3px; background: #fff; color: var(--ink); width: 100%; }
.birth { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.birth .lbl { grid-column: 1 / -1; }
.birth-msg { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; color: var(--ink-soft); min-height: 1.3em; }
.check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.privacy-line { font-size: 0.88rem; color: var(--ink-soft); margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }

/* film strip timeline */
.reel { background: var(--film); padding: 0 0 6px; position: relative; }
.reel-head { display: flex; align-items: center; gap: 16px; padding: 14px 18px 6px; color: #d9d5c8; font-family: var(--ui); font-size: 0.9rem; }
.reel-head label { flex: none; }
#era-range { flex: 1; appearance: none; background: transparent; height: 28px; margin: 0; }
#era-range::-webkit-slider-runnable-track { height: 4px; background: #5b5f66; border-radius: 2px; }
#era-range::-moz-range-track { height: 4px; background: #5b5f66; border-radius: 2px; }
#era-range::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; margin-top: -9px; background: var(--amber); border: 3px solid var(--film); border-radius: 50%; box-shadow: 0 0 0 2px var(--amber); }
#era-range::-moz-range-thumb { width: 16px; height: 16px; background: var(--amber); border: 3px solid var(--film); border-radius: 50%; box-shadow: 0 0 0 2px var(--amber); }
#era-range:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 26px 18px 26px; position: relative; scrollbar-color: #5b5f66 var(--film); }
.strip::before, .strip::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; background: repeating-linear-gradient(90deg, #d8d0bc 0 11px, transparent 11px 28px); opacity: 0.85; pointer-events: none; }
.strip::before { top: 8px; }
.strip::after { bottom: 8px; }
.frame-chip { flex: 1 0 112px; max-width: 170px; scroll-snap-align: center; background: #000; border: 3px solid transparent; padding: 0; cursor: pointer; text-align: center; color: #cfcabb; font: 600 0.95rem var(--ui); border-radius: 2px; }
.frame-chip canvas { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #2a2d31; }
.frame-chip .y { display: block; padding: 7px 0 8px; font-variant-numeric: tabular-nums; }
.frame-chip:hover { border-color: #6d7179; }
.frame-chip[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.frame-chip:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* region specials */
.prints { padding: 22px 18px 26px; border-top: 1px solid var(--line); }
.prints h2 { margin: 0 0 4px; font-size: 1.3rem; }
.prints > p { margin: 0 0 16px; font-family: var(--ui); font-size: 0.95rem; color: var(--ink-soft); }
.print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.print { appearance: none; text-align: left; background: var(--paper); border: 1px solid var(--line); border-bottom: 4px solid var(--line); padding: 10px 10px 14px; cursor: pointer; font-family: var(--ui); color: var(--ink); border-radius: 2px; display: block; }
.print:hover { border-color: var(--ink-soft); }
.print[aria-pressed="true"] { border-color: var(--ink); border-bottom-color: var(--amber); }
.print-img { display: block; aspect-ratio: 1; background: var(--table-2); margin-bottom: 10px; }
.print-img canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.print-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.print-year { display: block; font-style: italic; font-family: var(--serif); color: var(--rust); font-size: 0.95rem; margin-bottom: 4px; }
.print-desc { display: block; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }

/* page content */
main { display: block; }
.section { padding: 56px 0 8px; }
.section h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 16px; max-width: 24ch; }
.prose { max-width: 66ch; }
.prose p, .prose li { margin: 0 0 1em; }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 980px; }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 12px; }
.steps li::before { content: counter(step); display: block; font-style: italic; font-weight: 700; font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.steps strong { display: block; font-size: 1.15rem; }
.steps span { font-size: 1rem; color: var(--ink-soft); }
.regions { list-style: none; margin: 0; padding: 0; max-width: 900px; border-top: 1px solid var(--line); }
.regions a { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: 6px 24px; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.regions a:hover { background: var(--paper); }
.regions .rn { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; }
.regions .rd { color: var(--ink-soft); font-size: 1rem; }
.eras { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 28px; max-width: 1000px; }
.eras li { border-top: 1px solid var(--line); padding-top: 10px; font-size: 1rem; color: var(--ink-soft); }
.eras b { display: block; color: var(--ink); font-size: 1.1rem; }
.eras i { color: var(--rust); font-weight: 700; margin-right: 6px; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; max-width: 1000px; margin: 0; }
.examples figure { margin: 0; }
.examples img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--table-2); }
.examples figcaption { font-family: var(--ui); font-size: 0.88rem; color: var(--ink-soft); margin-top: 6px; }
details { border-top: 1px solid var(--line); padding: 14px 0; max-width: 66ch; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style-position: outside; }
details p { margin: 10px 0 0; color: var(--ink-soft); }
.req { max-width: 560px; display: grid; gap: 12px; margin-top: 12px; font-family: var(--ui); }
.req .row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.cross { font-family: var(--ui); font-size: 0.97rem; max-width: 66ch; }
.cross a { margin-right: 14px; }

/* footer */
.site-foot { margin-top: 72px; background: var(--film); color: #d9d5c8; font-family: var(--ui); font-size: 0.93rem; }
.site-foot .wrap { padding-top: 28px; padding-bottom: 34px; display: grid; gap: 14px; }
.site-foot a { color: #f1ede0; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot p { margin: 0; max-width: 70ch; color: #b8b3a4; }

@media (max-width: 880px) {
  body { font-size: 1.05rem; }
  .bench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "view" "reel" "side" "prints"; }
  .viewer-col { border-right: 0; }
  .side-col { border-top: 1px solid var(--line); }
  .regions a { grid-template-columns: 1fr; }
  .intro { padding-top: 30px; }
  .req .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .viewer.shutter::after, .viewer.shutter canvas#out { animation: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- colour layer ---------- */
:root {
  --sun: #ffb703; --coral: #ff5a6e; --teal: #12a594; --violet: #7a4dff; --sky: #27a9ef; --leaf: #6fba2c; --rose: #ff8fb1;
  --era-daguerre: #9a7448; --era-silent: #7d8791; --era-kodachrome: #e0432f; --era-polaroid: #f08a24; --era-vhs: #d63fa6;
  --era-disposable: #e6b800; --era-digicam: #2a6df4; --era-filter: #ff6f91; --era-future: #10c4d8;
}
body {
  background:
    radial-gradient(900px 460px at 6% -4%, #ffe0a8 0, transparent 72%),
    radial-gradient(820px 460px at 96% 2%, #ffc2da 0, transparent 72%),
    radial-gradient(1000px 640px at 55% 38%, #d4efff 0, transparent 74%),
    radial-gradient(800px 520px at 8% 78%, #dff7ea 0, transparent 72%),
    #f6fbfc;
  background-attachment: scroll;
}
.site-head { background: rgba(251, 252, 251, 0.92); border-bottom: 0; position: relative; }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--sun), var(--coral), var(--violet), var(--sky), var(--teal), var(--leaf)); }
.site-head .wrap { padding-bottom: 16px; }
.nav a:nth-child(1) { --tab: var(--coral); --tab-bg: #ffe3dc; --tab-dk: #d63a50; }
.nav a:nth-child(2) { --tab: var(--violet); --tab-bg: #ece4ff; --tab-dk: #6a3ae6; }
.nav a:nth-child(3) { --tab: var(--teal); --tab-bg: #d9f3ee; --tab-dk: #0b7f72; }
.nav a:nth-child(4) { --tab: var(--sky); --tab-bg: #dcecff; --tab-dk: #1273b8; }
.nav a:nth-child(5) { --tab: var(--sun); --tab-bg: #fff0c4; --tab-dk: #ffb703; }
.nav a { background: var(--tab-bg); border-color: transparent; }
.nav a:hover { background: #fff; border-color: var(--tab); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(30, 30, 50, 0.14); }
.nav a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.nav a[aria-current="page"] { background: var(--tab-dk); color: #fff; border-color: var(--tab-dk); box-shadow: 0 4px 12px rgba(30, 30, 50, 0.25); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
.nav a[aria-current="page"]:hover { transform: none; background: var(--tab-dk); }
.nav a:nth-child(5)[aria-current="page"] { color: var(--ink); text-shadow: none; }
.viewer.loading canvas#out { visibility: hidden; }
.viewer.loading { background: linear-gradient(110deg, #ffe8cc 30%, #fff3e4 45%, #ffd5e5 60%, #d6ebff 80%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; min-height: 320px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .viewer.loading { animation: none; } .nav a { transition: none; } }
.intro { position: relative; }
.intro::before {
  content: ""; position: absolute; right: 0; top: 18px; width: 360px; height: 270px; pointer-events: none; mix-blend-mode: multiply;
  background:
    radial-gradient(circle at 38% 38%, rgba(255, 206, 0, 0.9) 0 66px, transparent 67px),
    radial-gradient(circle at 63% 38%, rgba(255, 70, 170, 0.78) 0 66px, transparent 67px),
    radial-gradient(circle at 50% 66%, rgba(0, 196, 235, 0.78) 0 66px, transparent 67px);
}
.intro > * { position: relative; }
.bench { border-color: rgba(18, 58, 94, 0.28); box-shadow: 0 10px 0 -4px rgba(122, 77, 255, 0.18); }
.viewer { background: linear-gradient(135deg, #ffe8cc, #ffd5e5 52%, #d6ebff); }
.counter .year {
  color: var(--ink);
  background: linear-gradient(100deg, var(--coral) 0%, var(--violet) 55%, var(--sky) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: 0.08em;
}
.btn.primary { background: linear-gradient(135deg, #1b4f8f, #6a3fd6); border-color: transparent; }
.btn.primary:hover { background: linear-gradient(135deg, #123a6e, #5530b8); }
.btn:not(.primary) { border-color: var(--violet); color: #3a2a9c; }
.btn:not(.primary):hover { background: #f1ebff; }
#era-range::-webkit-slider-thumb { background: var(--sun); }
.frame-chip .y { border-bottom: 4px solid var(--ec, var(--amber)); }
.frame-chip[aria-pressed="true"] { border-color: var(--ec, var(--amber)); color: #fff; }
.side-col h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--coral); }
.prints h2, .section h2 { color: var(--ink); }
.section h2::before { content: ""; display: block; width: 56px; height: 7px; border-radius: 4px; margin-bottom: 14px; background: var(--bar, var(--coral)); }
.wrap > .section:nth-of-type(5n+1) { --bar: var(--coral); }
.wrap > .section:nth-of-type(5n+2) { --bar: var(--sun); }
.wrap > .section:nth-of-type(5n+3) { --bar: var(--teal); }
.wrap > .section:nth-of-type(5n+4) { --bar: var(--violet); }
.wrap > .section:nth-of-type(5n) { --bar: var(--sky); }
.steps li:nth-child(1) { border-top-color: var(--coral); } .steps li:nth-child(1)::before { color: var(--coral); }
.steps li:nth-child(2) { border-top-color: var(--sun); }   .steps li:nth-child(2)::before { color: #d49000; }
.steps li:nth-child(3) { border-top-color: var(--teal); }  .steps li:nth-child(3)::before { color: var(--teal); }
.steps li:nth-child(4) { border-top-color: var(--violet); } .steps li:nth-child(4)::before { color: var(--violet); }
.regions { border-top: 0; display: grid; gap: 12px; }
.regions a { border: 0; border-left: 10px solid var(--rc, var(--coral)); background: var(--rbg, #fff); padding: 18px 18px 18px 20px; border-radius: 0 6px 6px 0; }
.regions a:hover { filter: saturate(1.2) brightness(0.98); background: var(--rbg, #fff); }
.regions .rn { color: var(--rd, var(--ink)); }
.regions a.t-portraits, .chips a.t-portraits { --rc: #ff5a6e; --rbg: #ffe8ec; --rd: #b02640; }
.regions a.t-screen, .chips a.t-screen { --rc: #7a4dff; --rbg: #eee8ff; --rd: #4a29b5; }
.regions a.t-cinema, .chips a.t-cinema { --rc: #f2a100; --rbg: #fff1d4; --rd: #8a5600; }
.regions a.t-travel, .chips a.t-travel { --rc: #12a594; --rbg: #def7f2; --rd: #0b6e63; }
.regions a.t-snapshots, .chips a.t-snapshots { --rc: #27a9ef; --rbg: #def2fd; --rd: #0b5f8c; }
.regions a.t-decades, .chips a.t-decades { --rc: #6fba2c; --rbg: #ecf7dc; --rd: #3d6e0e; }
.sec-lead { max-width: 64ch; color: var(--ink-soft); margin: 0 0 14px; }
.eras li { border-top: 4px solid var(--ec, var(--line)); background: rgba(255, 255, 255, 0.55); padding: 10px 12px 12px; border-radius: 0 0 6px 6px; }
.eras i { color: var(--ec); font-size: 1.05rem; }
.eras .e-daguerre { --ec: var(--era-daguerre); } .eras .e-silent { --ec: var(--era-silent); } .eras .e-kodachrome { --ec: var(--era-kodachrome); }
.eras .e-polaroid { --ec: var(--era-polaroid); } .eras .e-vhs { --ec: var(--era-vhs); } .eras .e-disposable { --ec: #c49a00; }
.eras .e-digicam { --ec: var(--era-digicam); } .eras .e-filter { --ec: #e0426a; } .eras .e-future { --ec: #0a9fb0; }
.print { background: #fff; border-bottom-width: 5px; }
.print.c0 { border-bottom-color: var(--coral); } .print.c1 { border-bottom-color: var(--sun); }
.print.c2 { border-bottom-color: var(--teal); } .print.c3 { border-bottom-color: var(--violet); }
.print[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(122, 77, 255, 0.28); }
.print-year { color: var(--coral); }
.prints { background: linear-gradient(180deg, #fffaf0, #fff); }
details { background: rgba(255, 255, 255, 0.5); border: 0; border-left: 6px solid var(--bar2, var(--coral)); padding: 14px 16px; margin-bottom: 8px; border-radius: 0 6px 6px 0; }
details:last-of-type { border-bottom: 0; }
details:nth-of-type(4n+1) { --bar2: var(--coral); } details:nth-of-type(4n+2) { --bar2: var(--sun); }
details:nth-of-type(4n+3) { --bar2: var(--teal); } details:nth-of-type(4n) { --bar2: var(--violet); }
details[open] { background: #fff; }
.examples img { border-radius: 6px; border: 3px solid #fff; box-shadow: 0 6px 0 -2px rgba(255, 90, 110, 0.25); }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; max-width: 1000px; list-style: none; margin: 0; padding: 0; }
.tips li { background: #fff; border-radius: 6px; padding: 14px 16px; border-top: 5px solid var(--tc, var(--coral)); font-size: 1rem; color: var(--ink-soft); }
.tips li b { display: block; color: var(--ink); font-size: 1.08rem; margin-bottom: 2px; }
.tips li:nth-child(4n+1) { --tc: var(--coral); } .tips li:nth-child(4n+2) { --tc: var(--sun); }
.tips li:nth-child(4n+3) { --tc: var(--teal); } .tips li:nth-child(4n) { --tc: var(--violet); }
.era-entry { border-left: 10px solid var(--ec); background: rgba(255, 255, 255, 0.7); padding: 8px 22px 6px; margin: 0 0 22px; border-radius: 0 8px 8px 0; max-width: 78ch; }
.era-entry h2 { margin-top: 10px; }
.era-entry h2::before { display: none; }
.era-entry .when { font-style: italic; color: var(--ec); font-weight: 700; font-size: 1.05rem; display: block; margin-bottom: -4px; }
.era-entry h3 { font-size: 1rem; margin: 0.9em 0 0.1em; color: var(--ink-soft); }
.era-entry p { margin: 0 0 0.7em; }
.site-foot { background: linear-gradient(180deg, var(--film), #0e0f12); border-top: 6px solid; border-image: linear-gradient(90deg, var(--sun), var(--coral), var(--violet), var(--sky), var(--teal), var(--leaf)) 1; }
@media (max-width: 880px) { .intro::before { display: none; } }
.print { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.print-img { background: linear-gradient(135deg, #fff0dc, #ffe1ec 50%, #dcefff); border-radius: 4px; overflow: hidden; }

.regions a.t-celebrations, .chips a.t-celebrations { --rc: #c0306b; --rbg: #ffe6f0; --rd: #8f1a4c; }
.regions a.t-music, .chips a.t-music { --rc: #e9272f; --rbg: #ffe9e6; --rd: #a8161c; }
.regions a.t-games, .chips a.t-games { --rc: #2f9e44; --rbg: #e3f7e6; --rd: #1b6e2c; }
.regions .rl { display: block; margin-top: 8px; font-family: var(--ui); font-size: 0.86rem; font-weight: 600; color: var(--rd, var(--ink)); }
.themes-links { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.prose .regions { max-width: 920px; margin-bottom: 28px; }

.print[hidden] { display: none; }
.theme-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.theme-tab { appearance: none; font-family: var(--ui); font-size: 0.92rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--violet); background: #fff; color: #3a2a9c; cursor: pointer; }
.theme-tab:hover { background: #f1ebff; }
.theme-tab[aria-pressed="true"] { background: linear-gradient(135deg, #1b4f8f, #6a3fd6); border-color: transparent; color: #fff; }
.tab-note { font-family: var(--ui); font-size: 0.95rem; color: var(--ink-soft); margin: 0 0 16px; max-width: 80ch; }
.tab-note a { font-weight: 600; }
.lbl { }
@media (max-width: 880px) { .theme-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; } .theme-tab { flex: 0 0 auto; } }

.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sample-row .lbl { margin: 0; }
.sample-row .btn-row { margin: 0; flex-wrap: wrap; gap: 8px; }
.btn.small { padding: 7px 14px; font-size: 0.9rem; min-height: 0; }
.btn[aria-pressed="true"] { background: #f1ebff; border-color: var(--violet); }

.upload-row { margin-bottom: 0; }
.sample-row { margin: 14px 0 6px; padding-bottom: 4px; }
.side-col { gap: 18px; }
@media (max-width: 1100px) { .sample-row .lbl { flex-basis: 100%; } }

.sample-row { background: #f1ebff; border: 2px solid #cdbdff; border-radius: 10px; padding: 12px 14px 14px; margin: 16px 0 8px; display: block; }
.sample-row .sample-lbl { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: #3a2a9c; margin: 0 0 10px; }
.sample-row .btn-row { margin: 0; }
.sample-row .btn.small { background: #fff; }
.sample-row .btn.small[aria-pressed="true"] { background: linear-gradient(135deg, #1b4f8f, #6a3fd6); border-color: transparent; color: #fff; }
@media (max-width: 1100px) { .sample-row .lbl { flex-basis: auto; } }

.upload-box { background: linear-gradient(135deg, #fff1e0, #ffe3ec); border: 2px solid #ffb4c4; border-radius: 10px; padding: 14px; text-align: center; }
.upload-box .btn { width: 100%; font-size: 1.08rem; padding: 14px 16px; }
.upload-box .hint { display: block; margin-top: 8px; font-family: var(--ui); font-size: 0.86rem; color: var(--ink-soft); }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.25rem; color: #6a3fd6; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #cdbdff); }
.or-divider::after { background: linear-gradient(270deg, transparent, #cdbdff); }
.sample-row { margin: 0 0 8px; }
@media (max-width: 600px) { .nav { gap: 6px; } .nav a { padding: 7px 13px; font-size: 0.9rem; } }
.regions a.t-y2k, .chips a.t-y2k { --rc: #ff2fa3; --rbg: #ffe3f3; --rd: #a3116a; }
.regions a.t-film, .chips a.t-film { --rc: #c2570c; --rbg: #ffead6; --rd: #7a3506; }
.regions a.t-festivals, .chips a.t-festivals { --rc: #d4351c; --rbg: #ffe5df; --rd: #8f1f0e; }
.regions a.t-school, .chips a.t-school { --rc: #1e6fd9; --rbg: #e0eeff; --rd: #134a96; }

/* logo + wordmark */
.brand { gap: 12px; font-style: normal; }
.brand .logo-mark { width: 48px; height: 48px; transition: transform .2s ease; }
.brand:hover .logo-mark { transform: rotate(-5deg) scale(1.06); }
.brand .bw { display: flex; flex-direction: column; line-height: 1; }
.brand .bn { font-style: italic; font-weight: 700; font-size: 1.7rem; letter-spacing: -0.015em; }
.brand .bn b { font-weight: 700; padding-right: 0.06em; background: linear-gradient(100deg, var(--coral) 0%, var(--violet) 70%, var(--sky) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand small { font: 700 0.62rem var(--ui); letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink-soft); margin-top: 5px; }
@media (max-width: 520px) { .brand small { display: none; } .brand .logo-mark { width: 40px; height: 40px; } .brand .bn { font-size: 1.45rem; } }
@media (prefers-reduced-motion: reduce) { .brand .logo-mark { transition: none; } }

/* about page */
.prose:has(.tips) { max-width: 920px; }
.prose:has(.tips) > p, .prose:has(.tips) > h2 { max-width: 66ch; }
.prose .tips { margin: 6px 0 14px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.2; letter-spacing: -0.012em; margin: 1.7em 0 0.4em; }
.prose h2::before { content: ""; display: block; width: 44px; height: 6px; border-radius: 3px; margin-bottom: 10px; background: var(--hb, var(--coral)); }
.prose > h2:nth-of-type(5n+1) { --hb: var(--coral); } .prose > h2:nth-of-type(5n+2) { --hb: var(--sun); }
.prose > h2:nth-of-type(5n+3) { --hb: var(--teal); } .prose > h2:nth-of-type(5n+4) { --hb: var(--violet); } .prose > h2:nth-of-type(5n) { --hb: var(--sky); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.2em; padding: 0; list-style: none; max-width: 70ch; }
.chips li { margin: 0; }
.chips a { display: inline-block; font: 700 0.92rem var(--ui); text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--rc, var(--ink)); background: var(--rbg, #fff); color: var(--rd, var(--ink)); transition: transform .15s ease; }
.chips a:hover { background: #fff; transform: translateY(-2px); }
a.btn.go { display: inline-block; text-decoration: none; margin-top: 6px; padding: 13px 22px; font-size: 1.05rem; }
.prose .era-entry h2 { margin-top: 10px; }
.prose .era-entry h2::before { display: none; }
.prose ul.tips, .prose ul.chips { padding-left: 0; }
.prose ul.tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .prose ul.tips { grid-template-columns: 1fr; } }
