: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; }

/* 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; }
}
