:root {
  --white: #F4F3EE; --green: #1A2311; --ink: #1B2312; --olive: #343807;
  --berry: #751736; --blue: #BDD5E1; --ice: #F2F7F8;
  --border: #E3E2D8; --labelc: #8A8A7E; --text2: #54544A;
  --serif: "Cardo", Georgia, "Times New Roman", serif;
  --title: "Vincente", Georgia, "Times New Roman", serif;
  --h2: "Berlingske Serif Text", Georgia, serif;
  --caps: "Altivo", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { background: var(--white); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

.screen { min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }

.label { font-family: var(--caps); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--labelc); }
.centre { text-align: center; }
h1 { font-family: var(--title); font-weight: 600; font-size: 24px; line-height: 1.35; letter-spacing: 4px; text-transform: uppercase; margin: 14px 0 18px; }
h2 { font-family: var(--h2); font-weight: 300; font-style: italic; font-size: 22px; line-height: 1.4; }
.lede { color: var(--text2); margin-bottom: 30px; }
.monogram { width: 64px; margin-bottom: 18px; }
.wordmark { width: 190px; margin-bottom: 44px; }
hr { border: 0; border-top: 1px solid var(--green); width: 100%; margin: 30px 0; }

.field { display: block; width: 100%; text-align: left; margin-bottom: 26px; }
.field input { width: 100%; margin-top: 8px; padding: 13px 14px; font: inherit; color: var(--ink); background: #FBFBF7; border: 1px solid var(--border); border-radius: 3px; }
.field input::placeholder { color: var(--labelc); font-style: italic; }
.field input:focus { outline: none; border-color: var(--ink); }

.btn { font-family: var(--caps); font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; padding: 15px 18px; border-radius: 3px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); cursor: pointer; min-width: 124px; white-space: nowrap; }
.btn.outline { background: transparent; color: var(--ink); }
.link { background: none; border: 0; font: italic 15px var(--serif); color: var(--text2); cursor: pointer; padding: 12px; text-decoration: underline; text-underline-offset: 4px; }
.link:disabled { opacity: .3; cursor: default; }
button:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }

/* Deck */
.strip { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--green); margin-bottom: 18px; }
.strip img { height: 15px; }
/* Swiping page: Provence Blue band across the full width, same logo as the first page */
#deck { padding-top: 0; }
#deck .strip { background: var(--blue); border-bottom: 0; padding: 16px 0 14px; margin-bottom: 16px; box-shadow: 0 0 0 100vmax var(--blue); clip-path: inset(0 -100vmax); }
.lockup { flex-direction: column; align-items: center; gap: 7px; }
.lockup .mono { height: 30px; }
.lockup .word { height: 17px; }
#deck .link.small { color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 12px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink); font-family: var(--caps); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; box-shadow: 0 2px 10px rgba(27,35,18,.12); transition: transform .15s ease; white-space: nowrap; }
.pill:hover { transform: translateY(-1px); }
.pill svg { width: 15px; height: 15px; color: var(--berry); }
.pill b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--berry); color: var(--white); font: 400 11px/20px var(--serif); letter-spacing: 0; }
.pill b:empty { display: none; }
.plate { display: none; }
.keys { display: none; }

/* a · Prints (default): white-bordered prints in a loose pile on the linen page */
#deck .card { border: 7px solid #fff; border-radius: 3px; background: #fff; box-shadow: 0 10px 30px rgba(27,35,18,.20); }
#deck .card.under { transform: rotate(-4deg) scale(.96); }
#deck #stack::before { content: ""; position: absolute; inset: 0; background: #fff; border-radius: 3px; box-shadow: 0 6px 20px rgba(27,35,18,.14); transform: rotate(3deg) scale(.94); }
#deck.h-a .plate { display: block; position: absolute; left: 0; bottom: 24px; padding: 11px 20px 11px 16px; background: var(--berry); color: var(--white); pointer-events: none; }
#deck.h-a .plate em { display: block; font: italic 14px var(--h2); margin-bottom: 2px; }
#deck.h-a .plate strong { font: 600 clamp(20px, 6.4vw, 30px)/1.1 var(--title); letter-spacing: 5px; text-transform: uppercase; }
#deck.h-a .plate { max-width: 90%; }
#deck.h-a .plate strong { display: block; }
#deck.h-a .plate strong.t { font: 400 clamp(24px, 7.4vw, 34px)/1.1 var(--h2); letter-spacing: 0; text-transform: none; }
#deck.h-a .plate small { display: block; font: 12.5px/1.4 var(--serif); opacity: .88; margin-top: 5px; max-width: 30ch; }

/* b · Arch: blue page, picture in an arched window with a hairline echo */
#deck.h-b { max-width: none; background: var(--blue); }
.h-b > * { max-width: 472px; }
.h-b .strip { box-shadow: none !important; clip-path: none !important; border-bottom: 1px solid var(--ink) !important; }
.h-b .label { color: var(--ink); }
#deck.h-b #stack { margin: 22px 10px 26px; width: calc(100% - 20px); }
#deck.h-b #stack::before { display: none; }
#deck.h-b .card { border-radius: 999px 999px 4px 4px; border: 6px solid #fff; box-shadow: 0 0 0 7px var(--blue), 0 0 0 8px var(--ink); }
#deck.h-b .card.under { opacity: 0; }
.h-b .round { background: var(--white); border-color: var(--white); }
.h-b .round.love { background: var(--berry); border-color: var(--berry); }
.h-b .hint { color: var(--ink); opacity: .7; }
.h-b .stamp { top: 34%; }

/* c · Magazine: each picture is a cover, with the category set large on a berry block */
#deck.h-c #stack::before { display: none; }
#deck.h-c .card { border: 0; border-radius: 0; box-shadow: 0 14px 34px rgba(27,35,18,.22); }
#deck.h-c .card.under { transform: translate(10px, 10px); box-shadow: none; filter: brightness(.9); }
.h-c .label.centre { display: none; }
.h-c #stack { margin-top: 4px; }
.h-c .plate { display: block; position: absolute; left: 0; bottom: 26px; padding: 12px 20px 12px 18px; background: var(--berry); color: var(--white); pointer-events: none; }
.h-c .plate em { display: block; font: italic 15px var(--h2); margin-bottom: 2px; }
.h-c .plate strong { font: 600 clamp(22px, 7vw, 32px)/1.1 var(--title); letter-spacing: 5px; text-transform: uppercase; }
.h-c .round:not(.mini) { width: auto; height: 54px; flex: 1; border-radius: 3px; padding: 15px; gap: 10px; display: flex; justify-content: center; align-items: center; font-family: var(--caps); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; }
.h-c .round:not(.mini) svg { width: 20px; height: 20px; }
.h-c #pass::after { content: "Pass"; }
.h-c #keep::after { content: "Love"; }
.h-c .actions { gap: 10px; }
.h-c .round.mini { border-radius: 3px; height: 54px; }

/* d · Scrapbook: a taped polaroid on the atelier table, monogram watermark, wax-seal heart */
#deck.h-d { position: relative; }
#deck.h-d::before { content: ""; position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1080 / 1113; transform: translate(-50%, -46%); background: url(assets/atelier-l-monogram-dark.svg) center / contain no-repeat; opacity: .05; pointer-events: none; }
#deck.h-d #stack::before { display: none; }
#deck.h-d #stack { margin: 26px 14px 24px; width: calc(100% - 28px); }
#deck.h-d .card { overflow: visible; border: 0; border-radius: 1px; padding: 12px 12px 58px; background: #fff; box-shadow: 0 12px 30px rgba(27,35,18,.20); rotate: -1.6deg; }
#deck.h-d .card.under { transform: none; rotate: 2.4deg; }
#deck.h-d .card::before { content: ""; position: absolute; top: -13px; left: 50%; width: 92px; height: 28px; margin-left: -46px; background: rgba(189,213,225,.82); rotate: -3deg; z-index: 2; }
.h-d .plate { display: block; position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--ink); pointer-events: none; }
.h-d .plate em { font: italic 13px var(--h2); color: var(--labelc); margin-right: 8px; }
.h-d .plate strong { font: italic 400 21px var(--h2); }
.h-d .label.centre { display: none; }
.h-d .round.love { box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--berry), 0 6px 14px rgba(117,23,54,.35); }
.h-d #pass { border-style: dashed; }
.h-d .stamp { top: 26px; }
.h-d .stamp.keep { left: 26px; } .h-d .stamp.pass { right: 26px; }

#stack { position: relative; width: 100%; flex: 1; min-height: 300px; margin: 14px 0 20px; touch-action: pan-y; }
.card { position: absolute; inset: 0; border-radius: 4px; overflow: hidden; background: var(--border); border: 1px solid var(--border); user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.card.under { transform: scale(.96) translateY(10px); }
.card.settle { transition: transform .28s ease; }
.card.gone { transition: transform .32s ease, opacity .32s ease; opacity: 0; }
.stamp { position: absolute; top: 22px; width: 54px; height: 54px; padding: 14px; border-radius: 50%; opacity: 0; }
.stamp.keep { left: 22px; background: var(--berry); color: var(--white); }
.stamp.pass { right: 22px; background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
.actions { width: 100%; display: flex; justify-content: center; align-items: center; gap: 26px; }
.actions.stacked { flex-direction: column; margin-top: 34px; }
.hint { font-style: italic; font-size: 14px; color: var(--labelc); margin-top: 12px; }
.round { width: 68px; height: 68px; padding: 20px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: transform .15s ease; }
.round.love { background: var(--berry); border-color: var(--berry); color: var(--white); }
.round.mini { width: 44px; height: 44px; padding: 12px; border-color: var(--border); color: var(--text2); background: var(--white); }
.round.mini:disabled { opacity: .35; cursor: default; }
.round.hate { width: 54px; height: 54px; padding: 14px; background: var(--green); border-color: var(--green); color: var(--white); }
.round.fave { width: 54px; height: 54px; padding: 14px; background: var(--blue); border-color: var(--blue); color: var(--berry); }
.mini-spacer { width: 44px; flex: none; }
#deck .actions { gap: 16px; }
#deck .card { touch-action: none; }
.crack { stroke: var(--green); }
.stamp.hate { left: 50%; top: 22px; margin-left: -34px; width: 68px; height: 68px; padding: 16px; background: var(--green); color: var(--white); }
#burst.hate { background: var(--green); color: var(--white); padding: 34px 40px 52px; }
#burst.hate em { color: var(--blue); }
#burst.hate.go { animation: bloom-hate .7s ease forwards; }
@keyframes bloom-hate { 0% { transform: scale(.4) translateY(-30px); opacity: 0; } 35% { transform: scale(1.1); opacity: 1; } 65% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9) translateY(90px); opacity: 0; } }
.hint { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.hint .it { display: inline-flex; align-items: center; gap: 7px; line-height: 1; }
.hint .sym { display: grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 5px; border-radius: 50%; font-style: normal; box-sizing: border-box; }
.duo { display: contents; }
.hint .sym svg { width: 100%; height: 100%; display: block; }
.sym.love { background: var(--berry); color: var(--white); }
.sym.pass { background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
.sym.fave { background: var(--blue); color: var(--berry); }
.sym.hate { background: var(--green); color: var(--white); }
.chapter.hated .hategrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.chapter.hated figure { margin: 0; opacity: .8; filter: grayscale(.6); }
.chapter.hated img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.chapter.hated figcaption { font-size: 13px; color: var(--text2); font-style: italic; margin-top: 4px; }
.stamp.fave { left: 50%; top: auto; bottom: 110px; margin-left: -34px; width: 68px; height: 68px; padding: 16px; background: var(--blue); color: var(--berry); }

/* Bloom over the picture when a choice is made */
#burst { position: fixed; left: 50%; top: 46%; z-index: 15; width: 150px; height: 150px; margin: -75px 0 0 -75px; padding: 42px; border-radius: 50%; display: grid; place-items: center; pointer-events: none; opacity: 0; }
#burst svg { width: 100%; height: 100%; display: block; }
#burst.love { background: var(--berry); color: var(--white); }
#burst.pass { background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
#burst.fave { background: var(--blue); color: var(--berry); padding: 34px 40px 52px; }
#burst em { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font: 400 10.5px var(--caps); letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink); }
#burst.go { animation: bloom .7s cubic-bezier(.2,.9,.3,1.2) forwards; }
#burst.fave.go { animation: bloom-fave .75s cubic-bezier(.2,.9,.3,1.2) forwards; }
#burst.pass.go { animation: bloom-pass .6s ease forwards; }
@keyframes bloom { 0% { transform: scale(.3); opacity: 0; } 35% { transform: scale(1.12); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes bloom-fave { 0% { transform: scale(.3) rotate(-25deg) translateY(40px); opacity: 0; } 35% { transform: scale(1.15) rotate(6deg); opacity: 1; } 65% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1.2) translateY(-90px); opacity: 0; } }
@keyframes bloom-pass { 0% { transform: scale(.5); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 45% { transform: scale(1) translateX(-8px); } 60% { transform: scale(1) translateX(8px); opacity: 1; } 100% { transform: scale(.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #burst { display: none !important; } }
.round:active { transform: scale(.92); }
.round svg, .stamp svg { width: 100%; height: 100%; display: block; }
.btn.wide { width: 100%; }

/* Welcome — three light options */
#welcome { max-width: none; padding: 0; text-align: center; justify-content: center; }
#welcome .hero, #welcome .intro { width: 100%; max-width: 440px; padding: 0 28px; display: flex; flex-direction: column; align-items: center; }
#welcome .intro { padding-bottom: 36px; }
.fan { display: none; }
.for { margin: 0 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--green); width: 100%; }
.for h2 { font-size: clamp(38px, 11vw, 64px); line-height: 1.12; }
.previewbar { background: var(--ink); color: var(--white); text-align: center; font-size: 13px; padding: 7px 12px; font-style: italic; }
.previewbar a { color: var(--blue); margin-left: 10px; font-style: normal; }
.btn:disabled { opacity: .45; cursor: default; }
.viewer #edit, .viewer #again { display: none !important; }
/* a: linen — all white, hairline frame */
.w-a { background: var(--white); }
.w-a .hero { padding-top: 36px; }
.w-a .wordmark { margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--green); box-sizing: content-box; }
/* b: Provence blue block above a white page */
.w-b { justify-content: flex-start !important; }
.w-b .hero { max-width: none !important; background: var(--blue); padding: 64px 28px 44px !important; margin-bottom: 36px; }
.w-b .wordmark { margin-bottom: 0; }
.w-b.block-ice .hero { background: var(--ice); border-bottom: 1px solid var(--border); }
.w-b.block-berry .hero { background: var(--berry); }
.w-b.block-olive .hero { background: var(--olive); }
/* c: a fan of cards hints at what comes next */
.w-c .hero { padding-top: 30px !important; }
.w-c .monogram { display: none; }
.w-c .wordmark { order: -1; width: 150px; margin-bottom: 30px; }
.w-c .fan { display: block; position: relative; width: 190px; height: 250px; margin-bottom: 40px; }
.w-c .fan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; border: 5px solid #fff; box-shadow: 0 6px 22px rgba(26,35,17,.14); }
.w-c .fan img:nth-child(1) { transform: rotate(-9deg) translateX(-46px); }
.w-c .fan img:nth-child(2) { transform: rotate(8deg) translateX(46px); }
.w-c .fan img:nth-child(3) { transform: rotate(-1deg); }
.w-c .lede { margin-bottom: 22px; }

/* Desktop and wide tablets: picture in the middle, X on its left, heart on its right */
@media (min-width: 900px) and (min-height: 560px) {
  #deck { max-width: none; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto 1fr auto auto; column-gap: 44px; justify-items: center; align-items: center;
    grid-template-areas: "strip strip strip" "label label label" "pass stack keep" "undo duo ." "hint hint hint"; }
  #deck > * { max-width: none; }
  #deck .strip { grid-area: strip; width: 100%; max-width: 1100px; }
  #deck .label.centre { grid-area: label; }
  #deck .actions { display: contents; }
  #deck #stack { grid-area: stack; --h: clamp(380px, 62vh, 700px); height: var(--h); width: calc(var(--h) * .75); flex: none; margin: 18px 0; }
  #pass { grid-area: pass; justify-self: end; } #keep { grid-area: keep; justify-self: start; } #undo { grid-area: undo; justify-self: end; } #deck .duo { grid-area: duo; display: flex; gap: 18px; align-items: center; } .mini-spacer { display: none; }
  #deck .round:not(.mini):not(.fave):not(.hate) { width: 84px; height: 84px; padding: 26px; flex: none; }
  #deck .round.fave, #deck .round.hate { width: 62px; height: 62px; padding: 17px; }
  #deck.h-c .round:not(.mini) { width: 150px; height: 60px; padding: 15px; }
  #deck .hint { grid-area: hint; }
  .touch { display: none; } .keys { display: inline; }
  .pill { font-size: 11.5px; padding: 11px 18px 11px 15px; }
  .lockup .mono { height: 38px; } .lockup .word { height: 21px; }
  #result { max-width: 1040px; }
  .mosaic { grid-auto-rows: 230px; }
}
/* Short screens (small phones, landscape): keep the picture usable */
@media (max-height: 620px) { #deck .strip { padding: 10px 0 8px; margin-bottom: 8px; } .lockup .mono { height: 22px; } .hint { display: none; } .round:not(.mini) { width: 56px; height: 56px; padding: 16px; } .round.fave, .round.hate { width: 46px; height: 46px; padding: 12px; } #stack { min-height: 220px; margin: 8px 0 12px; } }

/* Result */
#result { max-width: 760px; }
.cover { text-align: center; padding-top: 22px; display: flex; flex-direction: column; align-items: center; }
.cover .wordmark { margin-bottom: 30px; }
.cover h1 { margin-bottom: 8px; }
#summary { width: 100%; text-align: center; }
#summary h2 { max-width: 30ch; margin: 0 auto 14px; }
#summary p.note { color: var(--text2); max-width: 46ch; margin: 0 auto 26px; }
.swatches { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 6px 0 26px; }
.swatch { text-align: center; }
.swatch i { display: flex; width: 96px; height: 54px; border: 1px solid var(--border); margin-bottom: 8px; }
.swatch i b { flex: 1; }
.tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); text-align: center; }
.tally div { padding: 14px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tally strong { display: block; font-weight: 400; font-size: 24px; font-family: var(--h2); }
#board { width: 100%; }
.chapter { margin-top: 34px; break-inside: avoid; }
.chapter > header { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--green); }
.chapter h3 { font-family: var(--title); font-weight: 600; font-size: 15px; letter-spacing: 4px; text-transform: uppercase; flex: 1; }
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(100px, 27vw, 200px); grid-auto-flow: dense; gap: 5px; }
.mosaic figure { position: relative; overflow: hidden; border-radius: 2px; background: var(--border); grid-column: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic .big { grid-column: span 4; grid-row: span 2; }
.flip .mosaic .big { grid-column: 3 / span 4; }
.mosaic .half { grid-column: span 3; }
.mosaic .tall { grid-row: span 2; }
.mosaic .wide { grid-column: span 6; grid-row: span 2; }
.mosaic .solo { grid-column: span 6; grid-row: span 3; }
.mosaic figcaption { position: absolute; left: 0; bottom: 0; padding: 3px 8px; background: var(--white); font-style: italic; font-size: 12px; color: var(--text2); border-top-right-radius: 2px; }
.link.small { font-size: 14px; padding: 4px 0; }
/* Favourites: a star on every mood board picture */
.star { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; padding: 7px; border-radius: 50%; border: 0; background: rgba(244,243,238,.9); color: transparent; cursor: pointer; box-shadow: 0 1px 6px rgba(26,35,17,.22); transition: transform .15s ease; }
.star svg { width: 100%; height: 100%; display: block; stroke: var(--ink); }
.star:active { transform: scale(.85); }
.fav .star { background: var(--berry); color: var(--white); }
.fav .star svg { stroke: var(--white); }
.editing .star { display: none; }
.viewer .star { pointer-events: none; }
.viewer figure:not(.fav) .star { display: none; }
.obsessed > header { border-bottom-color: var(--berry); }
.obsessed > header .label:first-child { width: 16px; height: 16px; color: var(--berry); }
.obsessed > header svg { width: 100%; height: 100%; display: block; }
.obsessed h3 { color: var(--berry); }
.obsessed .note, .starhint { font-style: italic; color: var(--text2); font-size: 15px; margin: 0 0 12px; }
.starhint { text-align: center; margin: 26px 0 -8px; }
#pop { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: var(--berry); color: var(--white); padding: 12px 22px; border-radius: 999px; font-family: var(--caps); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 24px rgba(117,23,54,.35); }
#pop.in { animation: pop .35s ease; }
@keyframes pop { from { transform: translateX(-50%) translateY(14px) scale(.9); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.plain { background: none; border: 0; padding: 0; cursor: pointer; display: flex; }
.backlink { align-self: flex-start; font-style: normal; text-decoration: none; font-family: var(--caps); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink); padding: 6px 0; }
.backlink span { font-size: 16px; letter-spacing: 0; margin-right: 6px; }
.remove { display: none; position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 8px; border-radius: 50%; border: 0; background: var(--white); color: var(--ink); cursor: pointer; box-shadow: 0 1px 6px rgba(26,35,17,.25); }
.remove svg { width: 100%; height: 100%; display: block; }
.editing .remove { display: block; }
.editing .mosaic figure { outline: 1px dashed var(--labelc); outline-offset: -1px; }
footer { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
footer img { width: 30px; }
@media (min-width: 640px) { h1 { font-size: 28px; } }

@media print {
  @page { margin: 16mm; }
  body { background: #fff; }
  .noprint, #welcome, #deck { display: none !important; }
  figure:not(.fav) .star { display: none; }
  #result { display: flex !important; max-width: none; min-height: 0; padding: 0; }
  .mosaic { grid-auto-rows: 42mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Phone: five buttons in one row, kept perfectly round */
#deck .round { flex: none; }
@media (max-width: 599px) {
  #deck .actions { gap: 8px; }
  #deck .round:not(.mini):not(.fave):not(.hate) { width: 62px; height: 62px; padding: 19px; }
  #deck .round.fave, #deck .round.hate { width: 50px; height: 50px; padding: 13px; }
  #deck .round.mini { width: 40px; height: 40px; padding: 11px; }
  #deck .mini-spacer { width: 40px; }
  .hint { gap: 8px 14px; font-size: 13px; }
}

/* + Add your own */
.strip-r { display: inline-flex; align-items: center; gap: 8px; }
.addown { position: relative; display: inline-grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; padding: 0; transition: transform .15s ease; }
.addown svg { width: 55%; height: 55%; }
.addown:hover { transform: translateY(-1px); }
.addown.sm { width: 36px; height: 36px; background: var(--white); color: var(--ink); box-shadow: 0 2px 10px rgba(27,35,18,.12); }
.addown.fab { position: fixed; right: 22px; bottom: 22px; z-index: 6; width: 56px; height: 56px; background: var(--berry); color: var(--white); box-shadow: 0 8px 22px rgba(117,23,54,.35); }
.addown::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); white-space: nowrap; background: var(--ink); color: var(--white); font: 10.5px var(--caps); letter-spacing: 2px; text-transform: uppercase; padding: 7px 11px; border-radius: 3px; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .15s ease, transform .15s ease; }
.addown.fab::after { top: auto; bottom: 50%; right: calc(100% + 10px); transform: translate(3px, 50%); }
.addown:hover::after, .addown:focus-visible::after { opacity: 1; transform: none; }
.addown.fab:hover::after, .addown.fab:focus-visible::after { transform: translate(0, 50%); }
#own-sheet { position: fixed; inset: 0; z-index: 20; background: rgba(27,35,18,.55); display: grid; place-items: center; padding: 18px; }
.own-card { position: relative; width: min(440px, 100%); background: var(--white); border-radius: 4px; padding: 30px 26px 22px; text-align: center; box-shadow: 0 20px 50px rgba(27,35,18,.3); }
.own-card h2 { margin: 4px 0 6px; }
.own-card .note { margin: 0 0 18px; }
.own-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 6px; }
.own-drop { display: block; border: 1px dashed var(--ink); border-radius: 3px; padding: 18px; cursor: pointer; background: #fff; }
.own-drop strong { display: block; font: 12px var(--caps); letter-spacing: 2.5px; text-transform: uppercase; }
.own-drop span { font-style: italic; font-size: 14px; color: var(--text2, #54544A); }
.own-drop:hover { border-color: var(--berry); }
.own-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-style: italic; color: var(--labelc, #8A8A7E); }
.own-or::before, .own-or::after { content: ""; flex: 1; border-top: 1px solid var(--border, #E3E2D8); }
.own-link { display: flex; gap: 8px; }
.own-link input, .own-note input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 11px 12px; border: 1px solid var(--border, #E3E2D8); border-radius: 3px; background: #fff; color: var(--ink); }
.own-link .btn { min-width: 0; padding: 0 18px; }
.own-note { display: flex; flex-direction: column; gap: 5px; text-align: left; margin-top: 16px; }
.own-msg { min-height: 1.4em; margin: 12px 0 0; font-style: italic; font-size: 14px; color: var(--berry); }
.own-card.busy { pointer-events: none; opacity: .7; }
.chapter.own figcaption { font-style: italic; }
#result[hidden] ~ .addown.fab { display: none; }
.chapter.own .srclink { position: absolute; left: 6px; top: 6px; background: var(--white); font: 9.5px var(--caps); letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 7px; border-radius: 2px; color: var(--ink); }

/* ---------- public version: See my results + the style reveal (studio option D) ---------- */
.results { display: flex; align-items: center; gap: 8px; margin: 14px auto 0; font: 11px var(--caps); letter-spacing: 2.2px; text-transform: uppercase; background: var(--berry); color: var(--white); border: 0; border-radius: 999px; padding: 13px 20px 13px 16px; box-shadow: 0 8px 20px rgba(117,23,54,.3); cursor: pointer; animation: nudge 2.6s ease-in-out infinite; }
.results svg { width: 14px; height: 14px; }
.results[hidden] { display: none; }
@keyframes nudge { 0%, 80%, 100% { transform: none; } 88% { transform: translateY(-4px); } 94% { transform: none; } }
#reveal { position: fixed; inset: 0; z-index: 30; background: var(--green); color: var(--white); overflow-y: auto; }
.rv-in { position: relative; max-width: 440px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; padding: 6vh 24px 30px; text-align: center; }
.rv-lead { font: italic 400 30px/1.2 var(--h2); margin: 0; opacity: 0; }
.rv-fan { position: relative; width: 300px; height: 230px; margin: 18px 0 0; }
.rv-fan img { position: absolute; left: 50%; top: 10px; width: 116px; height: 150px; margin-left: -58px; object-fit: cover; border: 5px solid #fff; box-shadow: 0 12px 28px rgba(0,0,0,.4); opacity: 0; }
.rv-heart { width: 62px; height: 62px; border-radius: 50%; background: var(--berry); display: grid; place-items: center; margin-top: -42px; position: relative; z-index: 2; opacity: 0; box-shadow: 0 0 0 6px rgba(244,243,238,.15); }
.rv-heart svg { width: 28px; height: 28px; color: var(--white); }
.rv-final { margin-top: 26px; width: 100%; }
.rv-k { font: 11px var(--caps); letter-spacing: 3px; text-transform: uppercase; color: var(--blue); margin: 0; opacity: 0; }
.rv-style { font: 600 clamp(22px, 7vw, 28px)/1.15 var(--title); letter-spacing: 4px; text-transform: uppercase; margin: 8px 0 8px; }
.rv-style span { display: inline-block; opacity: 0; }
.rv-line, .rv-acts, .rv-alt { opacity: 0; }
.rv-line { font: italic 16px/1.55 var(--h2); margin: 0 0 18px; }
.rv-acts { display: flex; flex-direction: column; gap: 10px; }
.rv-acts .btn { width: 100%; }
.btn.rv-cream { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn.rv-out { background: transparent; color: var(--white); border-color: var(--white); }
.link.rv-link { color: var(--blue); }
.rv-alt { font: italic 14px var(--serif); margin: 12px 0 0; color: var(--blue); }
#reveal.on .rv-fan img { animation: rvIn .9s cubic-bezier(.2,.9,.3,1.25) forwards; }
#reveal.on .rv-heart { animation: rvPop .7s 1.5s cubic-bezier(.3,1.6,.5,1) forwards; }
#reveal.on .rv-lead { animation: rvUp .7s 1.9s ease forwards; }
#reveal.on .rv-k { animation: rvUp .5s 2.2s ease forwards; }
#reveal.on .rv-style span { animation: rvUp .35s ease forwards; }
#reveal.on .rv-line, #reveal.on .rv-acts, #reveal.on .rv-alt { animation: rvUp .7s 3.2s ease forwards; }
@keyframes rvIn { from { opacity: 0; transform: translateX(var(--from)) translateY(40px) rotate(calc(var(--r) * 3)); } to { opacity: 1; transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--r)); } }
@keyframes rvPop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes rvUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #reveal.on * { animation-duration: .01s !important; animation-delay: 0s !important; } }
#book { position: fixed; inset: 0; z-index: 40; background: rgba(27,35,18,.6); display: grid; place-items: center; padding: 18px; overflow-y: auto; }
#book[hidden], #reveal[hidden] { display: none; }
.book-cta { margin-top: 10px; }
.hint[hidden] { display: none !important; }
#deck .results { grid-area: hint; }
