/* Art in Miniature: the postcard checker, the postcard's journey, prize stamps, the table, the envelope */

/* ---------- shared bits ---------- */
.page-miniature { --felt: #1A2620; }
.perf { --hole: 5px; --tile: 16px; background: radial-gradient(circle at 50% 50%, transparent var(--hole), var(--paper) calc(var(--hole) + .5px)) calc(var(--tile) / -2) calc(var(--tile) / -2) / var(--tile) var(--tile); }

/* ---------- opener: will your postcard fit? ---------- */
.fit { padding: calc(var(--head-h) + clamp(16px, 3vh, 32px)) 0 clamp(36px, 6vh, 64px); min-height: 85svh; overflow: clip; }
.fit::before { content: ""; position: absolute; inset: 0; background: radial-gradient(55% 70% at 100% 30%, rgba(143, 160, 138, .3), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(43, 75, 216, .06), transparent 70%); pointer-events: none; }
.fit-grid { position: relative; display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1fr); grid-template-areas: "head stage" "panel stage"; grid-template-rows: auto 1fr; column-gap: clamp(32px, 4.4vw, 72px); row-gap: 18px; align-items: start; }
.fit-head { grid-area: head; }
.fit-panel { grid-area: panel; }
.fit-stage { grid-area: stage; align-self: center; position: relative; }
.fit-h1 { font-size: clamp(2.4rem, 4.4vw, 4.2rem); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 12px; display: flow-root; }
.fit-h1 .brushed { font-weight: 500; }
.fit-lede { margin: 0; }

/* the form */
.fit-form { display: grid; gap: 12px; margin-bottom: 16px; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld-l { font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.fit-dims { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 12px; align-items: start; }
.stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; height: 54px; background: var(--paper); border: 2px solid var(--ink); }
.st-btn { display: grid; place-items: center; background: none; border: 0; cursor: pointer; transition: background-color .25s, color .25s; }
.st-btn:hover { background: var(--ink); color: var(--mount); }
.st-btn:active { transform: scale(.94); }
.st-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.st-val { display: flex; align-items: center; justify-content: center; gap: 4px; border-inline: 1px solid var(--mount-2); min-width: 0; }
.st-val input { width: 100%; min-width: 44px; height: 100%; align-self: stretch; max-width: 4.2ch; border: 0; background: none; text-align: right; font-family: var(--display); font-size: 1.65rem; font-weight: 560; font-variant-numeric: tabular-nums; color: var(--ink); padding: 0; -moz-appearance: textfield; appearance: textfield; }
.fld-count .st-val input { max-width: none; width: 44px; text-align: center; }
.st-val input::-webkit-outer-spin-button, .st-val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-val input:focus { outline: none; }
.st-val:focus-within { box-shadow: inset 0 0 0 3px var(--pollen); }
.st-unit { font-size: .95rem; color: var(--ink-soft); }
.fld-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; cursor: pointer; margin: -6px 0 -12px; }
.fld-range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--cobalt) var(--fill, 30%), rgba(19, 25, 21, .25) var(--fill, 30%)); }
.fld-range::-moz-range-track { height: 2px; background: rgba(19, 25, 21, .25); }
.fld-range::-moz-range-progress { height: 2px; background: var(--cobalt); }
.fld-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; background: var(--cobalt); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--cobalt); transition: transform .2s; }
.fld-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 0; background: var(--cobalt); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--cobalt); }
.fld-range:active::-webkit-slider-thumb { transform: scale(1.2); }
.fld-range:focus-visible { outline: 3px solid var(--pollen); outline-offset: 2px; }
.swap { width: 48px; height: 54px; margin-top: 26px; display: grid; place-items: center; background: var(--ink); color: var(--mount); border: 0; cursor: pointer; transition: background-color .25s; }
.swap:hover { background: var(--cobalt); }
.swap svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; transition: transform .5s var(--ease); }
.swap.is-turned svg { transform: rotate(90deg); }
.fit-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fp-l { font-size: .9rem; color: var(--ink-soft); margin-right: 4px; }
.fp { min-height: 44px; padding: 8px 14px; background: transparent; border: 1px solid rgba(19, 25, 21, .35); cursor: pointer; font-size: .95rem; font-weight: 600; transition: background-color .25s, border-color .25s, color .25s; }
.fp:hover, .fp[aria-pressed="true"] { background: var(--ink); color: var(--mount); border-color: var(--ink); }
.fit-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.fld-medium select { -webkit-appearance: none; appearance: none; width: 100%; height: 54px; padding: 0 48px 0 16px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 6.5l6 6 6-6' fill='none' stroke='%23131915' stroke-width='2'/%3E%3C/svg%3E") right 18px center / 18px no-repeat; font: 500 1rem var(--body); color: var(--ink); cursor: pointer; }
.fld-medium select:focus-visible { outline: 3px solid var(--pollen); outline-offset: 2px; }
.fit-note { margin: 0; padding: 9px 14px; background: rgba(255, 255, 255, .55); border-left: 3px solid var(--sage-deep); font-size: .95rem; line-height: 1.45; color: var(--ink-soft); transition: border-color .3s, background-color .3s; }
.fit-note.is-warn { border-left-color: var(--cobalt); background: rgba(43, 75, 216, .08); color: var(--ink); font-weight: 500; }
.fit-links { display: flex; flex-wrap: wrap; gap: 12px; }
.fit-nojs { display: none; list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid rgba(19, 25, 21, .15); }
.fit-nojs li { padding: 10px 0; border-bottom: 1px solid rgba(19, 25, 21, .15); }
.no-js .fit-form { display: none; }
.no-js .fit-nojs { display: block; }
.no-js .flip-btn, .no-js .mat-count { display: none; }

/* the mat */
.mat { position: relative; height: clamp(440px, calc(86svh - var(--head-h) - 64px), 680px); container-type: size; background: var(--wall); overflow: clip; box-shadow: 0 40px 70px -40px rgba(19, 25, 21, .8), inset 0 0 0 1px rgba(238, 240, 234, .06); --u: calc(100cqmin / 26); }
.mat::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 40%, rgba(143, 160, 138, .12), transparent 70%); pointer-events: none; }
.mat-grid, .mat-over { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.g-minor { stroke: rgba(143, 160, 138, .2); stroke-width: 1; fill: none; }
.g-major { stroke: rgba(143, 160, 138, .42); stroke-width: 1; fill: none; }
.mat-light { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(360px circle at var(--lx, 70%) var(--ly, 30%), rgba(255, 246, 220, .12), transparent 70%); }
.mat-over { z-index: 4; transition: opacity .35s var(--ease); }
.mat.is-flipped .mat-over { opacity: 0; }
.guide { fill: none; stroke-width: 1.6; }
.guide-max { stroke: var(--pollen); stroke-dasharray: 7 5; }
.guide-min { stroke: var(--mount); stroke-dasharray: 3 4; opacity: .9; }
.hatch-over { fill: url(#hatch-over); }
.hatch-under { fill: url(#hatch-under); }
.h-over { fill: var(--pollen); }
.h-under { fill: var(--mount); opacity: .55; }
.dim-line { fill: none; stroke: rgba(238, 240, 234, .85); stroke-width: 1.2; }
.dim-t { fill: var(--mount); font-family: var(--body); font-weight: 600; font-size: .62px; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: var(--wall); stroke-width: .2px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }

.fc-wrap { --u: calc(100cqmin / 26); position: absolute; z-index: 3; left: calc(50% - var(--w) * var(--u) / 2); top: calc(50% - var(--h) * var(--u) / 2); width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.fc, .fc-extra { position: absolute; inset: 0; }
.fc { perspective: 1600px; }
.fc-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.fc-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; box-shadow: 0 2px 0 rgba(255, 255, 255, .5) inset, 0 22px 34px -16px rgba(0, 0, 0, .7), 0 6px 10px -4px rgba(0, 0, 0, .35); }
.fc-front { background: #fff; }
.fc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease); }
.fc-img-l { opacity: 0; }
.mat.is-land .fc-img-l { opacity: 1; }
.mat.is-land .fc-img-p { opacity: 0; }
.fc-back { transform: rotateY(180deg); background: var(--paper); container-type: size; padding: 0; display: flex; flex-direction: column; visibility: hidden; }
.fc-back > p, .fc-back > ul { margin-inline: 8cqmin; }
.fc-back > :first-child { margin-top: 8cqmin; }
.fc-back > :last-child { margin-bottom: 7cqmin; }
.mat.is-flipped .fc-back { visibility: visible; }
.fc-back::before { content: ""; position: absolute; top: 6cqmin; bottom: 6cqmin; right: 34%; width: 1px; background: rgba(19, 25, 21, .18); }
.mat:not(.is-land) .fc-back::before { display: none; }
.pb-h { margin: 0 0 3cqmin; font-size: 6.4cqmin; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cobalt); line-height: 1.2; }
.pb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6cqmin; }
.pb-list li { display: flex; align-items: center; gap: 3cqmin; font-family: var(--display); font-style: italic; font-size: 9cqmin; line-height: 1.25; border-bottom: 1px solid rgba(19, 25, 21, .2); padding-bottom: 1.2cqmin; }
.pb-box { flex: none; width: 7cqmin; height: 7cqmin; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.pb-box svg { width: 100%; height: 100%; fill: none; stroke: var(--cobalt); stroke-width: 2.6; }
.pb-note { margin: auto 0 0; padding-top: 3cqmin; font-size: 6cqmin; line-height: 1.3; color: var(--ink-soft); }
.mat.is-land .pb-list, .mat.is-land .pb-h, .mat.is-land .pb-note { width: 58%; }
.mat.is-land .pb-list li { font-size: 6.6cqmin; }
.mat.is-land .pb-h { font-size: 5.4cqmin; }
.mat.is-land .pb-note { font-size: 4.8cqmin; }
.mat.is-land .pb-box { width: 5.6cqmin; height: 5.6cqmin; }
.fc-extra { background: #fff; box-shadow: 0 16px 26px -14px rgba(0, 0, 0, .7); opacity: 0; }
.fc-extra::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(231, 194, 91, .25), rgba(143, 160, 138, .4)); }
.fc-extra[data-extra="2"]::after { background: linear-gradient(135deg, rgba(43, 75, 216, .25), rgba(238, 240, 234, .5)); }
.fc-extra[data-extra="3"]::after { background: linear-gradient(135deg, rgba(143, 160, 138, .5), rgba(231, 194, 91, .2)); }

.mat-status { position: absolute; z-index: 6; left: 16px; top: 16px; margin: 0; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 172px); padding: 10px 14px 10px 10px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.3; box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .7); transition: background-color .35s var(--ease); }
.ms-icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; background: var(--cobalt); color: #fff; transition: background-color .35s; }
.ms-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; grid-area: 1 / 1; }
.mat-status .i-no { display: none; }
.mat-status.is-no { background: var(--pollen); }
.mat-status.is-no .ms-icon { background: var(--ink); }
.mat-status.is-no .i-ok { display: none; }
.mat-status.is-no .i-no { display: block; }
.mat-count { position: absolute; z-index: 6; left: 16px; top: 72px; margin: 0; max-width: calc(100% - 172px); padding: 6px 10px; background: rgba(29, 42, 36, .78); color: var(--mount); font-size: .95rem; line-height: 1.3; }
.mat-count.is-over { background: var(--pollen); color: var(--ink); font-weight: 600; }

.stamp { position: absolute; z-index: 5; right: 18px; top: 18px; width: 144px; height: 160px; padding: 9px; --hole: 4.5px; --tile: 16px; background: radial-gradient(circle at 50% 50%, transparent var(--hole), var(--paper) calc(var(--hole) + .5px)) -8px -8px / 16px 16px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); transform: rotate(4deg); }
.stamp-in { position: relative; height: 100%; background: var(--paper); border: 1px solid rgba(19, 25, 21, .2); display: grid; align-content: center; justify-items: center; text-align: center; padding: 6px; outline: 2px solid var(--cobalt); outline-offset: -6px; }
.stamp-big { font-family: var(--display); font-size: 3.1rem; line-height: .95; font-weight: 600; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.stamp-closed { font-size: 1.7rem; }
.stamp-t { font-size: .875rem; font-weight: 600; line-height: 1.2; margin-top: 2px; }
.stamp-d { font-size: .875rem; line-height: 1.15; color: var(--ink-soft); margin-top: 4px; }
.stamp-mark { position: absolute; left: -54px; top: 14px; width: 120px; height: 40px; overflow: visible; pointer-events: none; }
.stamp-mark path { fill: none; stroke: rgba(238, 240, 234, .55); stroke-width: 1.6; mix-blend-mode: difference; }

.wf-wait .flip-btn, .wf-wait .mat-key, .wf-wait .mat-status, .wf-wait .mat-count { opacity: 0; }
.flip-btn { position: absolute; z-index: 6; right: 16px; bottom: 16px; width: 176px; justify-content: center; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 18px 10px 14px; background: var(--paper); color: var(--ink); border: 0; cursor: pointer; font-weight: 700; font-size: 1rem; box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .7); transition: background-color .3s, color .3s; }
.flip-btn:hover, .flip-btn[aria-pressed="true"] { background: var(--cobalt); color: #fff; }
.flip-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .6s var(--ease); }
.flip-btn[aria-pressed="true"] svg { transform: rotate(180deg); }
.mat-key { position: absolute; z-index: 5; left: 16px; bottom: 16px; right: 190px; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .875rem; line-height: 1.3; color: rgba(238, 240, 234, .8); }
.mat-key span { display: inline-block; width: 22px; height: 0; border-top: 2px dashed var(--mount); margin-left: 6px; }
.mat-key span:first-child { margin-left: 0; }
.mat-key .mk-max { border-top-color: var(--pollen); }
.mat-key .mk-sq { width: 12px; height: 12px; border: 1px solid rgba(143, 160, 138, .8); }

/* ---------- how to enter: the journey ---------- */
.enter { overflow-x: clip; }
.enter::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 80% 50%, rgba(143, 160, 138, .14), transparent 70%); pointer-events: none; }
.enter-pin { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--head-h) + 12px) 0 28px; }
.enter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-areas: "copy stage"; gap: clamp(32px, 4.4vw, 80px); align-items: center; }
.enter-copy { grid-area: copy; }
.enter-copy .h2 { margin-bottom: clamp(18px, 3vh, 30px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(12px, 2vh, 20px); counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; transition: opacity .5s var(--ease); }
.js .step:not(.is-on) { opacity: .4; }
.step { counter-increment: step; }
.step::before { content: counter(step); width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(238, 240, 234, .45); font-family: var(--display); font-size: 1.35rem; font-weight: 600; transition: background-color .4s, color .4s, border-color .4s; position: relative; z-index: 1; background: var(--wall); }
.step.is-on::before { background: var(--pollen); color: var(--ink); border-color: var(--pollen); }
.step-b h3 { font-size: clamp(1.3rem, 1.6vw, 1.6rem); margin: 6px 0 6px; }
.step-b p { margin: 0; font-size: 1rem; line-height: 1.55; color: rgba(238, 240, 234, .84); }
.step-bar { position: absolute; left: 21px; top: 48px; bottom: calc(-1 * clamp(12px, 2vh, 20px) + 4px); width: 1px; background: rgba(238, 240, 234, .18); }
.step:last-child .step-bar { display: none; }
.step-bar i { position: absolute; inset: 0; background: var(--pollen); transform-origin: top; transform: scaleY(var(--p, 0)); }

.enter-stage { grid-area: stage; position: relative; height: min(calc(100svh - var(--head-h) - 72px), 700px); min-height: 420px; container-type: size; overflow: clip; background-color: var(--wall-2);
  background-image: linear-gradient(rgba(143, 160, 138, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 160, 138, .12) 1px, transparent 1px);
  background-size: 28px 28px; background-position: center; box-shadow: inset 0 0 0 1px rgba(238, 240, 234, .08), 0 40px 70px -40px rgba(0, 0, 0, .7); }
.js-light { position: absolute; inset: 0; background: radial-gradient(50% 45% at var(--lx, 50%) var(--ly, 40%), rgba(255, 246, 220, .12), transparent 70%); pointer-events: none; }
.jc, .env { --u: min(1cqw, 1.45cqh); }
.jc { position: absolute; z-index: 3; left: 50%; top: 50%; width: calc(60 * var(--u)); height: calc(40 * var(--u)); margin: calc(-20 * var(--u)) 0 0 calc(-30 * var(--u)); perspective: 1400px; }
.jc-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.jc-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .75); }
.jc-front { background: #fff; }
.jc-paint { position: absolute; inset: 0; display: block; }
.jc-paint img { width: 100%; height: 100%; object-fit: cover; animation: jc-breathe 9s ease-in-out infinite alternate; }
@keyframes jc-breathe { from { transform: scale(1); } to { transform: scale(1.07) translateX(-1.5%); } }
.js-cap { position: absolute; z-index: 8; left: 18px; top: 16px; right: 18px; margin: 0; display: flex; align-items: center; gap: 14px; font-size: .9375rem; color: rgba(238, 240, 234, .85); }
.js-cap strong { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.3rem; color: var(--mount); white-space: nowrap; }
.js-cap-bar { flex: 1; height: 2px; background: rgba(238, 240, 234, .16); position: relative; overflow: hidden; }
.js-cap-bar i { position: absolute; inset: 0; background: var(--pollen); transform-origin: left; transform: scaleX(var(--p, 0)); }
.js-cap-n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.reduce .js-cap, .no-js .js-cap { display: none; }
.jc-back { transform: rotateY(180deg); background: var(--paper); padding: calc(3 * var(--u)) calc(4 * var(--u)); display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); width: 100%; }
.jb-line { position: relative; display: flex; align-items: flex-end; border-bottom: 1px solid rgba(19, 25, 21, .25); width: 66%; padding-bottom: calc(.5 * var(--u)); }
.jb-w { font-family: var(--display); font-style: italic; font-size: max(14px, calc(3.7 * var(--u))); line-height: 1; color: #1b2f8f; white-space: nowrap; }
.jb-sig svg { height: calc(5.4 * var(--u)); width: auto; overflow: visible; }
.jb-sig path { fill: none; stroke: #1b2f8f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.env { position: absolute; left: 50%; top: 50%; width: calc(76 * var(--u)); height: calc(50.6 * var(--u)); margin: calc(-16 * var(--u)) 0 0 calc(-38 * var(--u)); pointer-events: none; }
.env > * { position: absolute; left: 0; width: 100%; }
.env-inside { z-index: 1; top: 0; height: 100%; background: linear-gradient(180deg, #b9c2b4, #cfd5ca); box-shadow: 0 28px 40px -20px rgba(0, 0, 0, .7); }
.env-flap { z-index: 2; top: 0; height: 54%; background: linear-gradient(180deg, #dfe3da, #c9d0c4); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; }
.env-pocket { z-index: 4; top: 0; height: 100%; background: linear-gradient(160deg, transparent 49.6%, rgba(19, 25, 21, .08) 50%, transparent 50.4%) , linear-gradient(20deg, transparent 49.6%, rgba(19, 25, 21, .08) 50%, transparent 50.4%), linear-gradient(180deg, #eef0ea, #e3e7de); clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.env-frontside { z-index: 6; top: 0; height: 100%; background: var(--paper); box-shadow: 0 28px 40px -20px rgba(0, 0, 0, .7); }
.ef-stamp { position: absolute; right: 5%; top: 8%; width: round(down, calc(16 * var(--u)), 8px); height: round(down, calc(19 * var(--u)), 8px); padding: 5px; --hole: 2.5px; background: radial-gradient(circle at 50% 50%, transparent var(--hole), #fff calc(var(--hole) + .5px)) -4px -4px / 8px 8px; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .3)); }
.ef-stamp-in { display: block; width: 100%; height: 100%; overflow: hidden; background: #fff; }
.ef-stamp-in img { width: 100%; height: 100%; object-fit: cover; }
.ef-mark { position: absolute; right: 13%; top: 10%; width: calc(38 * var(--u)); height: auto; overflow: visible; }
.ef-mark path, .ef-mark rect { fill: none; stroke: rgba(19, 25, 21, .6); stroke-width: 2; }
.ef-mark text { fill: rgba(19, 25, 21, .7); font: 700 11px var(--body); letter-spacing: .06em; text-anchor: middle; }
.ef-addr { position: absolute; left: 28%; top: 46%; display: grid; gap: calc(.7 * var(--u)); font-family: var(--display); font-style: italic; font-size: max(14px, calc(3.5 * var(--u))); line-height: 1.1; color: #1b2f8f; }
.ef-addr span { border-bottom: 1px solid rgba(19, 25, 21, .18); padding-bottom: 2px; white-space: nowrap; }

/* ---------- prizes: stamps ---------- */
.prizes { padding-block: clamp(64px, 9vh, 112px); overflow: clip; }
.prizes::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 20% 0%, rgba(255, 255, 255, .2), transparent 70%), linear-gradient(0deg, rgba(19, 25, 21, .14), transparent 30%); pointer-events: none; }
.prize-head { position: relative; }
.prize-head .lede { color: var(--ink); }
.stamps { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.pz { container-type: inline-size; }
.pz-stamp { perspective: 900px; margin-bottom: 18px; }
.pz-perf { --hole: 6px; width: round(down, 100cqw, 18px); height: round(down, 76cqw, 18px); padding: 14px; background: radial-gradient(circle at 50% 50%, transparent var(--hole), var(--paper) calc(var(--hole) + .5px)) -9px -9px / 18px 18px; filter: drop-shadow(0 22px 22px rgba(19, 25, 21, .32)); position: relative; transform-origin: 50% 0; }
.pz-1 .pz-perf { rotate: -2.5deg; }
.pz-2 .pz-perf { rotate: 1.8deg; }
.pz-3 .pz-perf { rotate: -1.2deg; }
.pz-pic { position: absolute; inset: 14px; overflow: hidden; background: var(--wall); }
.pz-pic img { width: 100%; height: 118%; object-fit: cover; transform: translateY(var(--py, -8%)); }
.pz-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 25, 21, .55), transparent 45%, transparent 60%, rgba(19, 25, 21, .4)); }
.pz-wall { background: linear-gradient(180deg, #5f725a 0%, #6F8169 78%, #3e4a3a 78%, #2f382c 100%); }
.pz-wall::after { background: linear-gradient(180deg, rgba(19, 25, 21, .45), transparent 40%); }
.pw-light { position: absolute; left: 50%; top: -10%; width: 90%; height: 100%; translate: -50% 0; background: radial-gradient(50% 55% at 50% 0%, rgba(255, 244, 214, .5), transparent 75%); }
.pw-frame { position: absolute; left: 50%; top: 22%; width: 40%; aspect-ratio: 3 / 4; translate: -50% 0; padding: 7%; background: var(--paper); border: 3px solid #23201b; box-shadow: 0 16px 22px -12px rgba(0, 0, 0, .6); z-index: 1; }
.pw-card { display: grid; place-items: center; width: 100%; height: 100%; border: 1.5px dashed rgba(19, 25, 21, .45); font-family: var(--display); font-style: italic; font-size: clamp(.9rem, 1.1vw, 1.1rem); line-height: 1.15; text-align: center; color: var(--ink-soft); padding: 4px; }
.pw-label { position: absolute; left: calc(50% + 24%); top: 58%; width: 9%; height: 6%; background: var(--paper); z-index: 1; box-shadow: 0 4px 6px -3px rgba(0, 0, 0, .4); }
.pz-val { position: absolute; left: 30px; top: 22px; z-index: 1; font-family: var(--display); font-size: clamp(2.6rem, 4.2vw, 4rem); line-height: 1; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.pz-val-word { font-size: clamp(1.7rem, 2.4vw, 2.2rem); font-style: italic; max-width: 70%; line-height: 1.05; }
.pz-place { position: absolute; right: 28px; bottom: 24px; z-index: 1; padding: 4px 10px; background: var(--pollen); color: var(--ink); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.pz h3 { font-size: clamp(1.3rem, 1.6vw, 1.6rem); margin-bottom: 6px; }
.pz p { margin: 0; color: var(--ink); font-size: 1rem; }
.pz-mark { position: absolute; left: 0; right: 0; top: 46%; width: 100%; height: 60px; z-index: 2; pointer-events: none; overflow: visible; }
.pz-mark path { fill: none; stroke: rgba(19, 25, 21, .32); stroke-width: 2; vector-effect: non-scaling-stroke; }
.prizes .wrap { position: relative; }
.vote-facts { position: relative; z-index: 1; margin: clamp(28px, 4vh, 48px) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.vote-facts div { position: relative; padding-top: 14px; }
.vote-facts div::before, .send-who::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink); transform: scaleX(var(--rule, 1)); transform-origin: left; }
.vote-facts dt { font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.vote-facts dd { margin: 0; font-family: var(--display); font-size: clamp(1.15rem, 1.45vw, 1.4rem); line-height: 1.25; }

/* ---------- last year's postcards: the table ---------- */
.deal { padding-block: clamp(56px, 8vh, 96px); overflow: clip; }
.deal-head { position: relative; z-index: 2; margin-bottom: clamp(20px, 3vh, 32px); }
.deal-side { display: flex; align-items: flex-end; gap: 20px; }
.deal-side .lede { margin: 0; flex: 1; }
.deal-again { flex: none; background: transparent; }
.ptable { --L: clamp(150px, 14vw, 224px); position: relative; height: min(62vh, 600px); min-height: 420px; background: radial-gradient(70% 80% at var(--lx, 50%) var(--ly, 30%), rgba(143, 160, 138, .2), transparent 70%), var(--felt);
  box-shadow: inset 0 0 0 1px rgba(238, 240, 234, .08), inset 0 30px 80px -40px rgba(0, 0, 0, .6); overflow: clip; touch-action: pan-y; }
.ptable::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px); pointer-events: none; }
.tc { position: absolute; left: 50%; top: 50%; margin: 0; cursor: grab; touch-action: none; }
.tc:active { cursor: grabbing; }
.tc-l { width: var(--L); }
.tc-p { width: calc(var(--L) * var(--ar)); }
.tc-in { display: block; background: #fff; padding: 6px; box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 18px 28px -14px rgba(0, 0, 0, .75); transition: box-shadow .35s var(--ease); }
.tc-ph { display: block; position: relative; overflow: hidden; aspect-ratio: var(--ar); }
.tc-ph img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.tc.is-lifted .tc-in { box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 40px 50px -18px rgba(0, 0, 0, .8); }
.tc:focus-visible { outline: 3px solid var(--pollen); outline-offset: 4px; }
.pt-hint { position: absolute; right: 18px; bottom: 14px; margin: 0; font-size: .9rem; color: rgba(238, 240, 234, .7); pointer-events: none; }
.no-js .ptable, .reduce .ptable { height: auto; min-height: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; padding: 24px; align-items: center; }
.no-js .tc, .reduce .tc { position: relative; left: auto; top: auto; width: 100%; cursor: default; }
.no-js .tc:nth-child(odd), .reduce .tc:nth-child(odd) { rotate: -2deg; }
.no-js .tc:nth-child(even), .reduce .tc:nth-child(even) { rotate: 1.5deg; }
.no-js .pt-hint, .reduce .pt-hint, .no-js .deal-again, .reduce .deal-again { display: none; }

/* ---------- where to send it ---------- */
.send { padding-block: clamp(64px, 10vh, 120px); overflow: clip; }
.send::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 85% 50%, rgba(143, 160, 138, .32), transparent 70%); pointer-events: none; }
.send-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.send-copy .h2 { margin-bottom: 16px; }
.send-copy .lede { margin-bottom: 24px; }
.send-who { position: relative; padding-top: 16px; margin-bottom: 26px; }
.send-who h3 { font-size: 1.35rem; margin-bottom: 6px; }
.send-who p { margin: 0; color: var(--ink-soft); }
.send-env-wrap { perspective: 1200px; padding: 9% 0 2%; }
.send-env { position: relative; display: block; width: min(100%, calc(var(--media-cap) * 1.3)); aspect-ratio: 1.5; margin-inline: auto; }
.send-paper { position: absolute; inset: 0; z-index: 1; background: var(--paper); box-shadow: 0 2px 0 #fff inset, 0 40px 60px -30px rgba(19, 25, 21, .55), 0 12px 18px -10px rgba(19, 25, 21, .25);
  background-image: linear-gradient(90deg, transparent 0 18px, rgba(43, 75, 216, .9) 18px 30px, transparent 30px 44px, rgba(231, 194, 91, .95) 44px 56px, transparent 56px); background-size: 74px 8px; background-repeat: repeat-x; background-position: 0 100%; }
.send-peek { position: absolute; z-index: 0; left: 8%; top: -30%; width: 34%; background: #fff; padding: 6px; box-shadow: 0 16px 26px -14px rgba(0, 0, 0, .55); rotate: -7deg; }
.send-peek img { width: 100%; aspect-ratio: 1000 / 1366; object-fit: cover; }
.se-stamp { position: absolute; z-index: 2; right: 5%; top: 8%; width: round(down, 19%, 10px); aspect-ratio: auto; height: round(down, calc(19% * 1.5 * 1.18), 10px); padding: 7px; --hole: 3px; background: radial-gradient(circle at 50% 50%, transparent var(--hole), #fff calc(var(--hole) + .5px)) -5px -5px / 10px 10px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.se-mark { position: absolute; z-index: 3; right: 15%; top: 10%; width: 40%; height: auto; overflow: visible; }
.se-mark path, .se-mark rect { fill: none; stroke: rgba(19, 25, 21, .55); stroke-width: 2; }
.se-mark text { fill: rgba(19, 25, 21, .7); font: 700 11px var(--body); letter-spacing: .06em; text-anchor: middle; }
.se-addr { position: absolute; z-index: 2; left: 30%; top: 44%; display: grid; gap: .3em; font-family: var(--display); font-style: italic; font-size: clamp(1.15rem, 1.9vw, 1.75rem); line-height: 1.1; color: #1b2f8f; }
.se-addr span { display: block; border-bottom: 1px solid rgba(19, 25, 21, .2); padding-bottom: .12em; white-space: nowrap; }
.se-note { position: absolute; z-index: 2; left: 6%; top: 12%; font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding: 4px 8px; border: 1.5px solid var(--ink-soft); rotate: -3deg; }

/* ---------- motion start states (only when motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .jc-paint { -webkit-mask: url("../img/brush-mask.png") 0 0 / 2400% 100% no-repeat; mask: url("../img/brush-mask.png") 0 0 / 2400% 100% no-repeat; }
  .js .env-frontside { visibility: hidden; }
  .js .env-inside, .js .env-flap, .js .env-pocket { visibility: hidden; }
}
.reduce .env, .no-js .env { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .fit-dims { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 8px; }
  .swap { width: 44px; }
}
@media (max-width: 900px) {
  .fit { min-height: 0; }
  .fit-grid { grid-template-columns: 1fr; grid-template-areas: "head" "stage" "panel"; grid-template-rows: auto; row-gap: 18px; }
  .mat { height: min(100vw - 2 * var(--gut), 460px); }
  .stamp { width: 96px; height: 112px; padding: 7px; right: 10px; top: 10px; }
  .stamp-big { font-size: 2.2rem; }
  .stamp-t { font-size: .875rem; }
  .stamp-d { display: none; }
  .stamp-mark { width: 90px; left: -20px; top: 34px; }
  .mat-status { position: relative; left: auto; top: auto; display: flex; max-width: none; width: 100%; font-size: .9375rem; padding: 10px 12px 10px 10px; box-shadow: none; border-bottom: 1px solid var(--mount-2); }
  .mat-count { position: relative; left: auto; top: auto; display: block; max-width: none; font-size: .9375rem; background: var(--wall-2); padding: 8px 12px; }
  .stamp-mark { top: 2px; }
  .flip-btn { right: 10px; bottom: 10px; width: 164px; min-height: 46px; padding: 8px 12px; font-size: .9375rem; }
  .mat-key { display: none; }
  .fit-row { grid-template-columns: 1fr; }

  .enter-pin { padding-top: calc(var(--head-h) + 8px); padding-bottom: 16px; }
  .enter-grid { grid-template-columns: 1fr; grid-template-areas: "h" "stage" "steps"; gap: 14px; }
  .enter-copy { display: contents; }
  .enter-copy .h2 { grid-area: h; margin: 0; }
  .steps { grid-area: steps; }
  .enter-stage { height: 34svh; min-height: 230px; }
  .js-cap { display: none; }
  .ef-mark text, .se-mark text { display: none; }
  .step-b p { font-size: .9375rem; line-height: 1.5; }

  .stamps { grid-template-columns: 1fr; gap: 40px; max-width: 460px; }
  .pz-mark { display: none; }
  .vote-facts { grid-template-columns: 1fr; gap: 14px; }

  .deal-side { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ptable { --L: clamp(92px, 25vw, 132px); height: 70svh; min-height: 460px; max-height: 600px; }
  .no-js .ptable, .reduce .ptable { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }

  .send-grid { grid-template-columns: 1fr; }
  .send-env-wrap { padding-top: 16%; }
  .se-addr { font-size: clamp(.95rem, 4.2vw, 1.3rem); left: 26%; }
  .se-note { display: none; }
}
/* phones: the journey shows one step at a time while it is pinned */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .steps { display: grid; grid-template-areas: "s"; }
  .js .step { grid-area: s; }
  .js .step:not(.is-on) { opacity: 0; visibility: hidden; }
  .js .step-bar { display: none; }
}
@media (max-width: 520px) {
  .fit-dims { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 6px; }
  .swap { width: 40px; }
  .stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .st-val input { font-size: 1.35rem; }
  .st-unit { font-size: .875rem; }
}

/* no-JS and reduced motion: the journey is a plain list beside the finished card */
.no-js .enter-pin, .reduce .enter-pin { min-height: 0; padding-block: clamp(64px, 10vh, 112px); }
.reduce .step:not(.is-on), .no-js .step:not(.is-on) { opacity: 1; }
.reduce .step-bar i, .no-js .step-bar i { transform: none; }
