/* ==========================================================================
   House style: a party in a box.
   Loaded on every page. Tokens, header with bunting, footer, wobbly hand-drawn
   boxes, chunky buttons with confetti, theme cards, the theme page and the
   printable A4 sheets. Each theme page sets its own --t-* colours and --t-font.
   ========================================================================== */
:root {
  --paper: #FFF8EC; --ink: #2A1E4A; --muted: #5B5070; --pop: #C81E5B; --sun: #FFC93C; --mint: #3CC9A0; --sky: #4DA8F0; --coral: #FF7A6B; --lilac: #B48CF0; --pink: #FF9EC4;
  --draft: #FFF1C2; --draft-ink: #6B4A00; --focus: #1F5BD6;
  --f1: #FF7A6B; --f2: #FFC93C; --f3: #3CC9A0; --f4: #4DA8F0; --f5: #B48CF0; --f6: #FF9EC4;
  --t-bg: #FFF3D0; --t-ink: var(--ink); --t-muted: var(--muted); --t-btn: var(--pop); --t-btn-ink: #FFFFFF; --t-a: #FFE3EE; --t-b: #DDF6EE; --t-c: #E1EEFC; --t-soft: #FFFFFF;
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible Next', Verdana, system-ui, sans-serif;
  --t-font: var(--display); --t-scale: 1;
  --wobble: 26px 14px 30px 12px / 14px 28px 12px 30px;
  --wobble-s: 14px 10px 16px 9px / 10px 15px 9px 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; overflow-x: hidden; }
a { color: var(--pop); }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1160px; margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #FFFFFF; color: var(--ink); padding: 10px 14px; border: 3px solid var(--ink); border-radius: 12px; font-weight: 700; }
.skip:focus { left: 16px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.todo { background: var(--draft); color: var(--draft-ink); padding: 0 .3em; border-radius: 4px; font-weight: 700; }
.small { font-size: 14px; }

/* hand-drawn wobbly box */
.wob { border: 3px solid var(--ink); border-radius: var(--wobble); background: #FFFFFF; box-shadow: 5px 6px 0 var(--ink); }

/* ---------- Header, with a string of bunting ---------- */
.site { position: relative; color: var(--t-ink); }
.site .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 16px max(16px, env(safe-area-inset-left, 0px)) 6px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 27px; letter-spacing: -.01em; }
.logo svg { color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo .amp, .foot-brand .amp { color: var(--pop); }
.site nav ul { display: flex; gap: 6px 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-family: var(--display); font-weight: 600; font-size: 18px; }
.site nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: 10px 2px; }
.site nav a:hover, .site nav a[aria-current] { box-shadow: inset 0 -4px 0 var(--f2); }
.bunting-strip { display: block; width: 100%; height: 66px; color: var(--t-ink); }
.site .menu-btn { display: none; }
@media (max-width: 760px) {
  .logo { font-size: 20px; white-space: nowrap; }
  .logo svg { width: 36px; height: 40px; }
  .bunting-strip { height: 46px; }
  .js .site .inner { flex-wrap: nowrap; position: relative; }
  .js .site .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; margin: 0; border: 3px solid var(--ink); border-radius: var(--wobble-s); background: #FFFFFF; color: var(--ink); box-shadow: 0 4px 0 var(--ink); font: 600 17px/1 var(--display); cursor: pointer; flex: none; }
  .js .site .menu-btn[aria-expanded="true"] { background: var(--sun); }
  .site .bars { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
  .site .bars i { display: block; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .js .site nav { display: none; position: absolute; z-index: 40; top: calc(100% + 10px); left: 16px; right: 16px; padding: 8px 6px; background: #FFFFFF; border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 5px 6px 0 var(--ink); }
  .js .site nav.open { display: block; }
  .js .site nav ul { flex-direction: column; gap: 0; }
  .js .site nav a { display: block; padding: 13px 16px; font-size: 19px; border-radius: 10px; }
  .js .site nav a:hover, .js .site nav a[aria-current] { box-shadow: none; background: var(--sun); }
  .js .site nav li + li { border-top: 2px dashed #E3D9C6; }
}

/* ---------- Footer ---------- */
.site-foot { margin-top: 56px; padding: 34px 0 44px; border-top: 3px dashed var(--ink); color: var(--muted); font-size: 15px; }
.site-foot .inner { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-start; justify-content: space-between; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.foot-brand { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0 18px; list-style: none; margin: 0; padding: 0; }
.site-foot a { display: inline-block; padding: 12px 2px; color: var(--ink); font-weight: 700; }
.site-foot .small { flex-basis: 100%; }

/* ---------- Buttons, with confetti (house.js) ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 3px solid var(--t-ink); border-radius: 30px 24px 32px 22px / 24px 32px 22px 30px; background: var(--sun); color: var(--t-ink); font: 600 18px/1 var(--display); text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--t-ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 7px 0 var(--t-ink); color: var(--t-ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--t-ink); }
.btn.go, .btn.pop { background: var(--t-btn); color: var(--t-btn-ink); }
.btn.go:hover, .btn.pop:hover { color: var(--t-btn-ink); }
.btn.plain { background: #FFFFFF; }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.bit { position: absolute; left: -5px; top: -7px; width: 10px; height: 14px; border-radius: 3px; opacity: 0; animation: confetti 1100ms cubic-bezier(.15,.75,.35,1) forwards; }
.bit.round { border-radius: 50%; width: 11px; height: 11px; }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.6); } 55% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 100% { opacity: 0; transform: translate(var(--dx2), var(--dy2)) rotate(var(--r2)) scale(.9); } }
.bob { animation: bob 5.5s ease-in-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
.bob.b2 { animation-duration: 6.4s; animation-delay: -2s; }
.bob.b3 { animation-duration: 7.1s; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2.5deg); } }

/* ---------- Name bunting (on screen) ---------- */
.flags { display: flex; justify-content: center; padding-top: 4px; }
.flagrow { position: relative; display: inline-flex; gap: 4px; padding: 2px 6px 0; }
.flagrow .str { position: absolute; left: 0; top: 0; width: 100%; overflow: visible; }
.flagrow::before, .flagrow::after { content: ""; position: absolute; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--t-ink); }
.flagrow::before { left: -4px; } .flagrow::after { right: -4px; }
.flag { position: relative; width: 50px; height: 64px; flex: none; transform-origin: 50% 0; }
.flag::before { content: ""; position: absolute; inset: 0; background: var(--t-ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.flag i { position: absolute; left: 4px; right: 4px; top: 3px; bottom: 8px; background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.flag b { position: relative; display: block; text-align: center; padding-top: 5px; font: 400 calc(26px * var(--t-scale)) / 1 var(--t-font); color: var(--t-ink); }
.flag.age b { color: #FFFFFF; }
.ink .flag i { background: #FFFFFF; }
.ink .flag b { color: var(--t-ink); }

/* ---------- Hubs and plain pages ---------- */
.hub-hero { padding-block: 34px 8px; }
.hub-hero h1 { font-weight: 700; font-size: clamp(38px, 5vw, 56px); letter-spacing: -.02em; margin-top: 12px; }
.hub-hero p { font-size: 19px; max-width: 62ch; margin-top: 12px; color: var(--muted); }
.crumb { font-size: 15px; font-weight: 700; color: var(--muted); }
.crumb a { color: inherit; }
.hub-sec { padding-block: 26px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 28px; font-weight: 700; margin: 30px 0 8px; }
.prose p, .prose li { font-size: 18px; }
.prose p + p { margin-top: 12px; }
.plist { padding-left: 1.2em; } .plist li { margin: 6px 0; }
.faq-list { margin: 14px 0 0; display: flex; flex-direction: column; gap: 16px; max-width: 75ch; }
.faq-list dt { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.2; }
.faq-list dd { margin: 4px 0 0; }
.sec { padding-block: 52px 6px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; margin-bottom: 26px; }
.sec-head h2, .h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.sec-head p { color: var(--muted); max-width: 36em; }
.tag { align-self: flex-start; font: 600 14px/1 var(--display); padding: 6px 10px; border-radius: 999px; border: 2px solid var(--ink); background: #FFFFFF; color: var(--ink); }

/* ---------- Theme cards (homepage and hubs) ---------- */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 28px 24px; }
.tcard { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--t-ink); background: var(--t-bg); overflow: hidden; transition: transform .15s; padding-bottom: 20px; }
.tcard:hover { transform: translateY(-4px) rotate(-.6deg); color: var(--t-ink); }
.tcard .scene { position: relative; display: flex; align-items: center; justify-content: center; height: 200px; padding: 10px 10px 8px; overflow: hidden; border-bottom: 3px solid var(--ink); margin-bottom: 12px; }
.cut { position: absolute; border: 3px solid var(--ink); z-index: 0; }
.cut.c1 { left: -30px; right: 42%; bottom: -46px; height: 96px; background: var(--t-a); border-radius: 60% 40% 0 0 / 80% 70% 0 0; }
.cut.c2 { left: 38%; right: -40px; bottom: -50px; height: 108px; background: var(--t-b); border-radius: 55% 45% 0 0 / 90% 80% 0 0; }
.cut.c3 { left: 14%; right: 14%; bottom: -58px; height: 92px; background: var(--t-c); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.cut.sq { border-radius: 0; }
.tcard .pic { position: relative; z-index: 1; display: block; width: 100%; max-width: 230px; height: 182px; transition: transform .2s; }
.tcard:hover .pic { transform: scale(1.05) rotate(-2deg); }
.tcard .body { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; flex: 1; }
.tcard .name { font: 400 calc(32px * var(--t-scale)) / 1.1 var(--t-font); }
.tcard .what { font-size: 15.5px; }
.tcard .go { align-self: flex-start; margin-top: auto; font: 600 16px/1 var(--display); padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: var(--wobble-s); background: var(--t-btn); color: var(--t-btn-ink); }
.tcard .ages { align-self: flex-start; font: 600 13px/1 var(--display); padding: 5px 9px; border-radius: 999px; border: 2px solid var(--ink); background: #FFFFFF; color: var(--ink); }
.pat-stars .scene { background-image: radial-gradient(#FFFFFF 1.4px, transparent 1.8px), radial-gradient(#FFD23F 1.6px, transparent 2px), radial-gradient(#B9C0F0 1px, transparent 1.4px); background-size: 90px 70px, 130px 110px, 50px 60px; background-position: 10px 14px, 60px 40px, 30px 22px; }
.pat-halftone .scene { background-image: radial-gradient(rgba(200,16,46,.16) 2px, transparent 2.5px); background-size: 12px 12px; }
.pat-grid { background-image: linear-gradient(rgba(31,91,214,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(31,91,214,.12) 1px, transparent 1px); background-size: 16px 16px; }
.pat-snow .scene { background-image: radial-gradient(#FFFFFF 3px, transparent 3.6px), radial-gradient(#FFFFFF 2px, transparent 2.6px); background-size: 70px 60px, 110px 90px; background-position: 8px 10px, 40px 34px; }
.more-card { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; border: 3px dashed var(--ink); border-radius: var(--wobble); }
.more-card h3 { font-size: 26px; font-weight: 600; }
.more-card p { font-size: 15px; color: var(--muted); }
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 22px; }
.pcard { display: flex; flex-direction: column; gap: 8px; padding: 22px; text-decoration: none; color: var(--ink); }
.pcard:nth-child(3n+1) { background: #FFE3EE; } .pcard:nth-child(3n+2) { background: #FFF3D0; } .pcard:nth-child(3n) { background: #DDF6EE; }
.pcard:hover { transform: rotate(-.8deg); color: var(--ink); }
.pcard h3 { font-size: 22px; font-weight: 600; }
.pcard p { font-size: 16px; color: var(--muted); }
@media (max-width: 700px) {
  .tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .tcard { padding-bottom: 14px; }
  .tcard .scene { height: 132px; padding: 8px 6px 4px; }
  .tcard .pic { height: 116px; }
  .tcard .body { padding: 0 12px; gap: 6px; }
  .tcard .name { font-size: calc(23px * var(--t-scale)); }
  .tcard .what { display: none; }
  .tcard .go { font-size: 14px; padding: 12px; }
  .tcard .ages { font-size: 11px; }
  .cut.c1 { height: 64px; bottom: -34px; } .cut.c2 { height: 72px; bottom: -36px; } .cut.c3 { height: 60px; bottom: -40px; }
  .more-card { padding: 16px; } .more-card h3 { font-size: 21px; } .more-card p { font-size: 14px; }
}

/* ---------- Theme page ---------- */
.t-hero .crumb a { color: inherit; }
.t-hero { position: relative; background: var(--h-bg, var(--t-bg)); color: var(--h-ink, var(--t-ink)); padding-block: 26px 200px; overflow: hidden; border-top: 3px solid var(--t-ink); }
.t-hero .inner { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.t-hero .copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.t-hero .crumb { color: var(--h-muted, var(--t-muted)); }
.t-hero h1 { font: 400 calc(clamp(44px, 7vw, 80px) * var(--t-scale)) / 1.02 var(--t-font); letter-spacing: .005em; }
.t-hero .lede { font-size: 20px; color: var(--h-muted, var(--t-muted)); max-width: 32em; }
.t-hero .hero-art { flex: 0 1 360px; min-width: 0; height: 270px; position: relative; }
.t-hero .hero-pic { width: 100%; height: 100%; }
.layer { position: absolute; left: -5%; right: -5%; border-top: 3px solid var(--h-ink, var(--t-ink)); z-index: 1; }
.layer.l1 { bottom: 60px; height: 110px; background: var(--t-a); border-radius: 40% 60% 0 0 / 100% 80% 0 0; }
.layer.l2 { bottom: 30px; height: 96px; background: var(--t-b); border-radius: 60% 40% 0 0 / 70% 100% 0 0; left: 30%; }
.layer.l3 { bottom: -10px; height: 76px; background: var(--t-c); border-radius: 50% 50% 0 0 / 100% 100% 0 0; right: 35%; }
.square .layer { border-radius: 0; }
.t-dark .t-hero { background-image: radial-gradient(#FFFFFF 1.4px, transparent 1.8px), radial-gradient(#FFD23F 1.6px, transparent 2px); background-size: 90px 70px, 130px 110px; }
.theme .wob { border-color: var(--t-ink); box-shadow: 5px 6px 0 var(--t-ink); }
.me { position: relative; z-index: 3; margin-top: -110px; padding: 24px; display: flex; flex-direction: column; gap: 16px; color: var(--t-ink); }
.me-head { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; justify-content: space-between; }
.me h2 { font-size: 28px; font-weight: 600; }
.me .note, .bands .hint { font-size: 15px; color: var(--t-muted); }
.fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-name, .f-date { grid-column: span 2; }
.field.big { grid-column: span 3; }
.field label { font-weight: 700; font-size: 15px; }
.field input, .field select { min-height: 50px; padding: 0 14px; border: 3px solid var(--t-ink); border-radius: var(--wobble-s); font: 600 19px var(--display); color: var(--t-ink); background: #FFFDF8; width: 100%; min-width: 0; }
.bands { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bands legend { float: left; font-weight: 700; font-size: 15px; margin-right: 4px; padding: 0; }
.seg { display: inline-flex; border: 3px solid var(--t-ink); border-radius: 16px 12px 18px 10px / 12px 17px 10px 18px; overflow: hidden; background: #FFFFFF; }
.seg label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; min-width: 92px; padding: 0 14px; font: 600 17px/1 var(--display); cursor: pointer; }
.seg label + label { border-left: 2.5px solid var(--t-ink); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg input:checked + span { color: var(--t-btn-ink); }
.seg label:has(input:checked) { background: var(--t-btn); color: var(--t-btn-ink); }
.seg label:focus-within { outline: 3px solid var(--focus); outline-offset: -5px; }
.me-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.switch { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; min-height: 44px; }
.switch input { width: 54px; height: 30px; appearance: none; -webkit-appearance: none; border: 3px solid var(--t-ink); border-radius: 999px; background: #FFFFFF; position: relative; cursor: pointer; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--t-ink); transition: left .15s; }
.switch input:checked { background: var(--t-a); }
.switch input:checked::after { left: 27px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 30px 26px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 20px; color: var(--t-ink); }
.card h3 { font-size: 24px; font-weight: 600; }
.card .what { font-size: 15px; color: var(--t-muted); }
.card .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.stage { position: relative; height: 270px; border-radius: 14px; background: var(--t-soft); border: 2px dashed var(--t-muted); display: grid; place-items: center; overflow: hidden; }
.stage .thumb { width: 230px; height: 230px; display: grid; place-items: center; pointer-events: none; }
.stage .thumb .sheet { transform: scale(var(--s, .2)); transform-origin: 50% 50%; flex: none; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 22px; }
.game { padding: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--t-ink); }
.game h3 { font-size: 22px; font-weight: 600; }
.game p { font-size: 15px; color: var(--t-muted); }
.game .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 600 13px/1 var(--display); padding: 6px 10px; border-radius: 999px; border: 2px solid var(--t-ink); background: var(--t-soft); }
.team { padding: 10px 12px; border-radius: 12px; background: #FFF3D0; border: 2px solid var(--t-ink); font-size: 14px; color: var(--t-ink) !important; }
.team a { color: inherit; font-weight: 700; }
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.crew { padding: 22px; display: flex; flex-direction: column; gap: 10px; background: #FFF3D0; color: var(--t-ink); }
.crew h2, .learn h2 { font-size: 24px; font-weight: 600; }
.crew ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.crew li a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; border: 2.5px solid var(--t-ink); border-radius: var(--wobble-s); background: #FFFFFF; color: var(--t-ink); font: 600 16px var(--display); text-decoration: none; }
.from { font-size: 14px; color: var(--t-muted); }
.learn { padding: 22px; display: flex; gap: 16px; align-items: center; background: #E1EEFC; color: var(--t-ink); }
.learn > svg { flex: none; }
.learn a { color: var(--t-ink); font-weight: 700; }
/* Placeholder for theme supply links (affiliate), not used yet: shown only with ?slots in the address */
.slot { display: none; margin-top: 30px; padding: 18px 20px; border: 3px dashed #8A8F99; border-radius: 16px; color: #4A4E57; background: repeating-linear-gradient(-45deg, #FAFAF7 0 12px, #F1F1EC 12px 24px); }
.show-slots .slot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.mini-themes { display: flex; flex-wrap: wrap; gap: 14px; }
.mini-theme { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 3px solid var(--ink); border-radius: var(--wobble-s); background: var(--t-bg); color: var(--t-ink); text-decoration: none; font: 400 calc(21px * var(--t-scale)) / 1 var(--t-font); box-shadow: 0 4px 0 var(--ink); }
.mini-theme .mini-pic { width: 56px; height: 47px; flex: none; }
.mini-theme:hover { transform: rotate(-1deg); color: var(--t-ink); }
@media (max-width: 700px) {
  .t-hero .hero-art { height: 190px; flex-basis: 100%; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field { grid-column: auto; }
  .field.big, .f-name, .f-date { grid-column: span 2; }
  .f-time { order: 2; } .f-date { order: 3; } .field.big { order: 4; }
  .field input, .field select { font-size: 17px; }
  .seg { display: flex; width: 100%; }
  .seg label { min-width: 0; padding: 0 10px; flex: 1; }
  .flag { width: 34px; height: 46px; }
  .flag b { font-size: calc(19px * var(--t-scale)); }
}

/* ---------- Preview dialog: the full A4 sheets ---------- */
.viewer { width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 7px 0 var(--ink); background: #EFE9DC; }
.viewer::backdrop { background: rgba(42,30,74,.55); }
.viewer .bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; background: #FFFFFF; border-bottom: 3px solid var(--ink); }
.viewer .bar h2 { font-size: 22px; font-weight: 600; }
.viewer .pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px; }
.viewer .pages .page-frame { width: calc(var(--pw) * var(--s)); height: calc(var(--ph) * var(--s)); }
.viewer .pages .sheet { transform: scale(var(--s)); transform-origin: 0 0; box-shadow: 0 4px 18px rgba(0,0,0,.18); }

/* ==========================================================================
   The printable sheets. A4 portrait is 794 × 1123 CSS px, landscape 1123 × 794.
   Everything inside is sized for paper; home printers lose about 4mm at each
   edge, so nothing important sits within 30px of the edge.
   ========================================================================== */
.sheet { position: relative; width: 794px; height: 1123px; overflow: hidden; background: #FFFFFF; color: var(--t-ink); font-family: var(--body); font-size: 16px; line-height: 1.35; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet.wide { width: 1123px; height: 794px; }
.sheet .foot { position: absolute; left: 34px; right: 34px; bottom: 18px; display: flex; justify-content: space-between; font-size: 12px; color: #555; }
.sheet .foot b { font-family: var(--display); font-weight: 600; }
.sheet .tf { font-family: var(--t-font); font-weight: 400; }
.sheet .df { font-family: var(--display); font-weight: 600; }
.sheet .pic svg, .sheet svg.pic { display: block; }
.sheet .cutgrid { position: absolute; left: 28px; right: 28px; top: 28px; bottom: 50px; display: grid; }
.sheet .cell { position: relative; padding: 9px; border: 0 dashed #9AA0A6; }
.sheet .cell.r { border-right-width: 2px; } .sheet .cell.b { border-bottom-width: 2px; }
.sheet .boxy { position: relative; height: 100%; overflow: hidden; border: 2.5px solid var(--t-ink); border-radius: 20px 12px 24px 10px / 12px 22px 10px 24px; background: var(--t-bg); }
.sheet .boxy.white { background: #FFFFFF; }
.sheet .hill { position: absolute; border-top: 2.5px solid var(--t-ink); }
.sheet .hill.h1 { left: -10px; right: 40%; bottom: -30px; height: 58px; background: var(--t-a); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.sheet .hill.h2 { left: 46%; right: -30px; bottom: -38px; height: 54px; background: var(--t-b); border-radius: 60% 40% 0 0 / 100% 90% 0 0; }
.sheet .line { display: inline-block; border-bottom: 2px dotted var(--t-ink); min-width: 160px; height: 1.1em; vertical-align: bottom; }
.sheet .rule { display: block; border-bottom: 2px solid #C9C4B8; height: 34px; }
/* ink-saver: line art only. Fills go white, outlines and words stay. */
.ink .sheet .boxy, .ink .sheet .hill, .ink .sheet .fill { background: #FFFFFF !important; }
.ink .sheet svg [fill]:not([fill="none"]):not(.keep), .ink .sheet svg .f { fill: #FFFFFF !important; }
.ink .sheet .tint { color: var(--t-ink) !important; }
.ink .mini-art svg [fill]:not([fill="none"]):not(.keep) { fill: #FFFFFF !important; }

/* ==========================================================================
   Printing: house.js copies the chosen sheets into #print-root
   ========================================================================== */
#print-root { display: none; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #FFFFFF !important; margin: 0 !important; padding: 0 !important; }
  body.printing > :not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  #print-root .sheet { position: relative !important; transform: none !important; box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  /* A4 is 1122.5 x 793.7 CSS px: clip half a pixel so a sheet never spills onto a blank page */
  #print-root .sheet { width: 793px !important; height: 1122px !important; overflow: hidden !important; }
  #print-root.wide .sheet { width: 1122px !important; height: 793px !important; }
  #print-root .sheet:last-child { break-after: auto; page-break-after: auto; }
  .site .menu-btn, .consent { display: none !important; }
}

/* ---------- Cookie choice (scripts/consent.js): Accept and Reject look the same ---------- */
.consent { position: fixed; z-index: 60; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: #FFFFFF; color: var(--ink); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 5px 6px 0 var(--ink); }
.consent p { flex: 1 1 260px; font-size: 15px; line-height: 1.45; }
.consent-btns { display: flex; gap: 10px; }
.consent-btn { min-height: 46px; padding: 0 18px; border: 3px solid var(--ink); border-radius: var(--wobble-s); background: #FFFFFF; color: var(--ink); box-shadow: 0 4px 0 var(--ink); font: 600 16px/1 var(--display); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .bob, .bit { animation: none !important; }
  .burst { display: none !important; }
  .btn, .tcard, .tcard .pic, .pcard, .switch input::after, .site .bars i { transition: none !important; }
  .btn:hover, .tcard:hover, .pcard:hover, .mini-theme:hover { transform: none; }
}
