/* A small, quiet keepsake. Warm paper, vermilion clay, faded ink. */
:root {
  --paper: #e8dbbf; --card: #f3e9d4; --ink: #554e42; --soft: #8c8272;
  --faint: #a29886; --line: #ddd4c1; --red: #a65545; --green: #788366;
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
  --roman: 'Cormorant Garamond', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  --ease: cubic-bezier(.22,.68,.25,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { color: var(--ink); background: var(--paper); font-family: var(--serif); font-weight: 400; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
img { user-select: none; -webkit-user-drag: none; }
::selection { background: #dac6a6; }
.paper { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.paper-tone { position: absolute; inset: 0; background: #e8dbbf; }
.paper-fibers { position: absolute; inset: 0; background: url('../assets/warm-paper.webp') center / 700px 700px repeat; opacity: .72; }
.paper-leak { position: absolute; inset: 0; background: linear-gradient(#a86e2412, #a86e2412), radial-gradient(ellipse at 28% 18%, #fff1d526, transparent 68%), radial-gradient(ellipse at 92% 96%, #9e733b18, transparent 55%); }
.paper-grain, .photo-grain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23847559' opacity='.35' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
.paper-grain { position: absolute; inset: 0; opacity: .065; mix-blend-mode: multiply; }
.paper-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 200px #8764390c; }
.app { position: fixed; inset: 0; }
.reel { position: absolute; inset: 0; height: 200%; transition: transform 1.1s cubic-bezier(.66,0,.2,1); }
.reel.lift { transform: translateY(-50%); }
.screen { position: relative; height: 50%; }
.screen-intro { display: flex; align-items: center; justify-content: flex-end; flex-direction: column; }
.intro-hint { position: absolute; bottom: 28%; width: 100%; text-align: center; color: var(--soft); font-size: 12px; letter-spacing: .25em; opacity: 0; transition: opacity 2s; }
.intro-hint.show { opacity: 1; }
.dish { width: 104px; height: 104px; margin-bottom: max(10.5vh, 48px); padding: 0; position: relative; border: 0; border-radius: 50%; background: none; isolation: isolate; transition: transform .65s var(--ease); }
.dish:hover { transform: translateY(-2px) rotate(-3deg); }
.dish-shadow { position: absolute; z-index: -1; inset: 29% 2% 14% 8%; border-radius: 50%; background: #785b3c26; filter: blur(9px); transform: translate(3px, 7px) scaleY(.8); transition: opacity .65s; }
.dish-target { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 1px #77513932); pointer-events: none; }
.dish-ripple { position: absolute; inset: 6%; border: 1px solid #ad75672b; border-radius: 50%; opacity: 0; pointer-events: none; }
.dish.tapped .dish-ripple { animation: ripple 1s ease-out; }
.dish.tapped .dish-target { animation: press .4s; }
@keyframes ripple { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.8); } }
@keyframes press { 50% { transform: scale(.94); } }
.screen-flow { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 0 28px; scrollbar-width: thin; scrollbar-color: #c6b99c transparent; }
.view { width: min(100%, 510px); margin: auto; padding: 22px 0; transition: opacity .3s; }
.view.leaving { opacity: 0; }
.panel { opacity: 0; transform: translateY(12px); transition: opacity .65s, transform .65s var(--ease); }
.panel.in { opacity: 1; transform: none; }
.panel h1:focus { outline: none; }
.verify-card { position: relative; padding: 20px 24px; }
.challenge-heading { padding: 23px 0 20px; }
.challenge-title { text-align: center; text-wrap: balance; font-weight: 400; font-size: 25px; letter-spacing: .06em; margin: 0 0 9px; line-height: 1.65; }
.stage { display: flex; flex-direction: column; gap: 17px; width: 100%; }
.photo-wrap { background: #f0e5cc; border: 1px solid #e4dccb; padding: 8px 8px 16px; transform: rotate(-.65deg); box-shadow: 1px 3px 8px #8169430d; }
.photo, .jigsaw { position: relative; width: 100%; overflow: hidden; background: #dbccb0; }
.photo-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grain { position: absolute; inset: 0; pointer-events: none; opacity: .16; mix-blend-mode: multiply; }
.slot { position: absolute; background: #554e4275; box-shadow: inset 0 1px 5px #352d3759; border: 1px dashed #fff4d8a1; border-radius: 2px; }
.tile { position: absolute; border: 1px solid #fff5d9; border-radius: 2px; box-shadow: 0 2px 8px #34281488; cursor: grab; touch-action: none; z-index: 2; }
.tile.grab { cursor: grabbing; }
.tile.set, .slot.filled { box-shadow: none; border-color: transparent; }
.slider-control { position: relative; height: 42px; background: #8c73410b; border: 1px solid #9b835336; border-radius: 3px; }
.slider-control input { position: relative; margin: 0; width: 100%; height: 40px; appearance: none; -webkit-appearance: none; background: transparent; cursor: grab; }
.slider-control input::-webkit-slider-thumb { appearance: none; width: 44px; height: 38px; border-radius: 2px; border: 0; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='38'%3E%3Cpath d='M16 19h12m-4-4 4 4-4 4' fill='none' stroke='%23f8efdf' stroke-width='1'/%3E%3C/svg%3E") center; box-shadow: 0 1px 3px #604a2922; }
.slider-control input::-moz-range-thumb { width: 42px; height: 36px; border: 0; border-radius: 2px; background: var(--red); }
.slider-control.solved { background: #e2e6d7; }
.challenge-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; }
.feedback { min-height: 22px; text-align: center; font-size: 12px; color: var(--red); line-height: 1.6; margin: 0; transition: opacity .3s; }
.feedback.good { color: #647552; }
.jigsaw { display: grid; grid-template-columns: repeat(var(--n),1fr); grid-template-rows: repeat(var(--n),1fr); gap: 2px; }
.jig-cell { min-width: 0; min-height: 0; padding: 0; border: 0; background-repeat: no-repeat; transition: opacity .2s, box-shadow .2s; }
.jig-cell.sel { opacity: .68; box-shadow: inset 0 0 0 2px #a65545; }
.nope { animation: nudge .45s; }
@keyframes nudge { 40% { transform: translateX(-3px); } 70% { transform: translateX(2px); } }
.tile-options { display: flex; gap: 15px; justify-content: center; padding: 4px 0; }
.tile-option { width: 66px; height: 66px; position: relative; padding: 0; border: 3px solid #fffbf1; border-radius: 1px; box-shadow: 0 0 0 1px var(--line), 1px 3px 5px #71583016; background-origin: padding-box; }
.tile-option.right { box-shadow: 0 0 0 2px var(--green); }
.tile-option:hover { outline: 1px solid #b79c76; outline-offset: 3px; }
.pick-grid { width: 100%; display: grid; grid-template-columns: repeat(var(--cols),1fr); gap: 10px; }
.pick-cell { min-width: 0; padding: 0; border: 1px solid var(--line); background: var(--card); border-radius: 2px; }
.photo-cell { border: 0; background: transparent; }
.photo-cell .photo-wrap { padding: 5px 5px 10px; }
.word-cell { padding: 20px 6px; }
.pick-cell.right, .pick-cell.on { outline: 2px solid var(--green); }
.scene { text-align: center; padding: 50px 10px; display: flex; align-items: center; flex-direction: column; }
.checking { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 0 24px; }
.ring { width: 26px; height: 26px; border: 1px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 2s linear infinite; }
.checking.done .ring { animation: none; border-color: #a2a78c; position: relative; }
.checking.done .ring::after { content: ''; position: absolute; width: 8px; height: 4px; top: 8px; left: 8px; border: solid #858c72; border-width: 0 0 1px 1px; transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.verdict { min-height: 110px; margin: 10px 0 24px; }
.verdict-line { font-size: 24px; line-height: 1.9; margin: 0; animation: appear 1s var(--ease); }
.verdict-line + .verdict-line { font-size: 15px; color: var(--soft); }
.go { display: inline-flex; gap: 24px; align-items: center; justify-content: center; min-height: 44px; min-width: 130px; border: 1px solid #b9aa91; border-radius: 2px; background: transparent; font-size: 12px; padding: 11px 24px; letter-spacing: .08em; transition: background .25s; }
.go::after { content: '⟶'; font-family: sans-serif; }
.go:hover { background: #e8dfcb; }
.go:disabled { opacity: .5; }
.name-q { font-weight: 400; font-size: 39px; letter-spacing: .12em; margin: 0 0 40px; }
.name-input { border: 0; border-bottom: 1px solid #bca98b; border-radius: 0; background: transparent; padding: 12px 4px; text-align: center; font-size: 22px; }
.name-input { width: min(275px, 100%); letter-spacing: .12em; }
.name-input::placeholder { font-size: 13px; letter-spacing: .12em; color: #a39988; }
.name-reply { min-height: 28px; line-height: 1.8; color: var(--red); font-size: 12px; margin: 20px 0; }
.reveal-line { max-width: 330px; font-size: 26px; font-weight: 400; line-height: 1.95; letter-spacing: .06em; margin: 0 0 36px; }
.reveal-buttons { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.reveal-no, .reveal-yes { min-height: 44px; border-radius: 2px; padding: 12px 22px; font-size: 12px; line-height: 1.8; max-width: 100%; }
.reveal-no { background: #f0ddbd; border: 1px solid #aa7856; color: #784b39; min-width: 78px; font-size: 14px; font-weight: 600; line-height: 1.5; word-break: break-all; box-shadow: 0 2px 0 #9c70473b, inset 0 1px 0 #fff6df99; transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.reveal-no:not(:disabled):active { transform: translateY(1px); box-shadow: inset 0 1px 3px #9c704733; }
@media (hover: hover) {
  .reveal-no:not(:disabled):hover { background: #e5c6a4; border-color: #8c5e41; }
}
.reveal-no.bump { animation: press .3s; }
.reveal-yes { flex-shrink: 0; white-space: nowrap; background: var(--red); color: #fff7e8; border: 1px solid var(--red); }
.reveal-after { min-height: 30px; margin: 28px 0 0; font-size: 22px; }
.answered { opacity: .45; }
body.to-garden .app { opacity: 0; transition: opacity 1.2s; }
.ending { position: fixed; inset: 0; animation: fade 2s; }
.garden { position: absolute; inset: 0; overflow: hidden; }
.garden-ephemera { position: absolute; inset: 0; z-index: 1; transition: opacity 1.2s ease; }
.garden-ephemera.is-fading { opacity: 0; pointer-events: none; }
.garden-words { position: absolute; z-index: 3; top: max(11%, 40px); width: 100%; text-align: center; padding: 0 24px; }
.g-date { font-size: 10px; letter-spacing: .2em; color: var(--soft); margin: 0 0 28px; }
.g-message { margin: 0 0 16px; font-size: clamp(17px, 4.5vw, 21px); font-weight: 400; line-height: 1.9; letter-spacing: .06em; }
.garden-pendulum { width: 46px; height: 80px; display: block; margin: 22px auto 10px; overflow: visible; }
.p-arm { transform-origin: 30px 6px; animation: swing 4s ease-in-out infinite; }
.p-rod { stroke: #a8997f; stroke-width: .7; }
.p-bob { fill: var(--red); }
.p-pivot { fill: #a8997f; }
@keyframes swing { 0%,100% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } }
.g-count { color: #82745e; font: 22px var(--roman); letter-spacing: .14em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.garden-memories { --print-size: clamp(74px, 21vw, 92px); position: absolute; z-index: 2; left: 50%; top: 59%; display: grid; grid-template-columns: repeat(3, var(--print-size)); grid-auto-rows: calc(var(--print-size) - 5px); transform: translate(-50%, -50%); opacity: 0; }
.garden-memories.is-ready { opacity: 1; animation: memories-in 1.6s .15s both; }
.memory-print { position: relative; width: var(--print-size); height: fit-content; margin: 0; padding: 5px 5px 14px; border: 1px solid #bfaa8166; border-radius: 1px; background: #f1e4c9 url('../assets/warm-paper.webp') center / 350px; box-shadow: 1px 3px 8px #624b3333, 0 1px 2px #624b3326; transform: translateY(var(--shift)) rotate(var(--tilt)); }
.memory-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #dfd0b2; filter: sepia(.13) saturate(.78) contrast(.94); }
.memory-print:nth-child(2)::before, .memory-print:nth-child(6)::before { content: ''; position: absolute; z-index: 1; width: 31px; height: 10px; top: -5px; left: 50%; transform: translateX(-50%) rotate(-8deg); background: #d5c18d9c; border: 1px solid #ad96552b; box-shadow: 0 1px 2px #8068440d; }
@keyframes memories-in { from { opacity: 0; transform: translate(-50%, -43%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.garden-field { position: absolute; width: min(100%, 1020px); height: min(30vh, 240px); bottom: 3%; left: 50%; transform: translate(-50%, 12px); overflow: visible; }
.g-flower, .g-grass { animation: sway var(--sway) ease-in-out var(--delay) infinite; }
@keyframes sway { 0%,100% { rotate: -1.8deg; } 50% { rotate: 1.8deg; } }
.mote { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #c0ab73; opacity: 0; animation: drift var(--duration) ease-in-out var(--delay) infinite; }
@keyframes drift { 10%,80% { opacity: .45; } to { transform: translate(20px,-80px); opacity: 0; } }
.garden-star { position: absolute; width: 60px; height: 1px; left: 17%; top: 29%; background: linear-gradient(90deg,transparent,#b89d67); rotate: 25deg; opacity: 0; animation: shooting 17s 7s infinite; }
@keyframes shooting { 0%,88% { opacity: 0; transform: translateX(0); } 91% { opacity: .65; } 99%,100% { opacity: 0; transform: translateX(200px); } }
.garden-relic { position: absolute; z-index: 4; left: 50%; bottom: max(8px, calc(3% - 16px)); width: 80px; height: 80px; padding: 0; border: 0; border-radius: 50%; background: none; isolation: isolate; transform: translateX(-50%) rotate(-9deg); }
.garden-relic.is-falling { animation: relic-fall 1.8s both; }
.garden-relic.is-wiggling { animation: relic-wiggle var(--tap-duration, .8s) ease-in-out; }
@keyframes relic-fall { 0% { opacity: 0; transform: translate(-50%, -42vh) rotate(16deg); } 12% { opacity: 1; } 68% { transform: translate(-50%, 0) rotate(-9deg); } 82% { transform: translate(-50%, -9px) rotate(-14deg); } 100% { transform: translate(-50%, 0) rotate(-9deg); } }
@keyframes relic-wiggle { 0%,100% { transform: translate(-50%, 0) rotate(-9deg); } 25% { transform: translate(calc(-50% + var(--tap-out-x)), var(--tap-out-y)) rotate(calc(-9deg + var(--tap-out-turn))); } 55% { transform: translate(calc(-50% + var(--tap-back-x)), var(--tap-back-y)) rotate(calc(-9deg + var(--tap-back-turn))); } 80% { transform: translate(calc(-50% + var(--tap-rest-x)), var(--tap-rest-y)) rotate(calc(-9deg + var(--tap-rest-turn))); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (min-width: 1000px) { .view { padding: 15px 0; } }
@media (max-width: 560px) {
  .screen-flow { padding: 0 21px; }
  .view { padding: 15px 0; }
  .verify-card { padding: 23px 21px 16px; }
  .challenge-heading { padding: 20px 0 18px; }
  .challenge-title { font-size: 23px; }
  .dish { width: 88px; height: 88px; margin-bottom: max(12vh, 48px); }
  .scene { padding: 35px 0; }
  .garden-field { bottom: 4%; height: 27vh; width: 150%; }
  .garden-relic { width: 70px; height: 70px; bottom: max(8px, calc(4% - 12px)); }
}
@media (max-height: 680px) {
  .view { padding: 10px 0; }
  .garden-words { top: 6%; }
  .g-date { margin-bottom: 16px; }
  .garden-pendulum { height: 55px; margin: 14px auto 6px; }
  .garden-field { height: 25vh; }
}
@media (max-height: 600px) {
  .garden-memories { --print-size: 74px; top: 61%; }
}
@media (max-height: 520px) {
  .garden-field { height: 14vh; bottom: 1%; }
  .garden-words { top: 20px; }
  .g-date { margin-bottom: 8px; }
  .g-message { margin-bottom: 0; font-size: 17px; }
  .garden-pendulum { height: 36px; margin: 8px auto 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .panel { transform: none; }
  .garden-star { display: none; }
}
/* Keep the entire little card in view on an ordinary laptop. */
body { line-height: 1.5; }
.view { max-width: 400px; padding-top: 12px; padding-bottom: 12px; }
.verify-card { padding: 23px 27px 15px; }
.challenge-heading { padding: 17px 0 16px; }
.challenge-title { font-size: 21px; line-height: 1.5; margin-bottom: 7px; }
.challenge-bottom { min-height: 42px; }
.feedback { min-height: 0; text-align: left; font-size: 10px; letter-spacing: .03em; color: var(--soft); }
.feedback.hint { color: var(--red); }
.feedback.good { color: var(--green); }
@media (max-width: 560px) {
  .verify-card { padding: 22px 20px 13px; }
  .challenge-title { font-size: 21px; }
  .feedback { font-size: 9px; }
}
