/* Player app. Ported from the approved prototype (docs/mockups/prototype.html). */
/* ---- Start page layout: 8-pt spacing grid, iOS/Material type scale, safe areas ---- */
:root { --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; }
.start {
  min-height: 100dvh; box-sizing: border-box; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + clamp(16px, 5vh, 48px)) max(var(--s3), env(safe-area-inset-right))
           calc(env(safe-area-inset-bottom) + clamp(16px, 6vh, 64px)) max(var(--s3), env(safe-area-inset-left));
}
.start-head { text-align: center; margin-bottom: clamp(16px, 3.5vh, 32px); }
.start-head h1 { margin: 0; font: 500 30px/1.2 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; text-wrap: balance; max-width: 360px; margin-inline: auto; letter-spacing: -.01em; color: var(--ink, #2E2A22); }

.start-card { background: var(--surface, #FBF8F1); border: 1px solid var(--line, #E2D9C5); border-radius: 20px;
  padding: var(--s3); }
.start-card h2 { margin: 0 0 var(--s2); font: 600 12px/1 Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--olive, #6E7B4E); }
.start-card ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.start-card li { counter-increment: step; display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: start;
  font: 400 16px/1.45 Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; color: var(--ink, #2E2A22); }
.start-card li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  margin-top: 0; font: 600 12px/1 Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; color: var(--olive, #6E7B4E);
  background: #6E7B4E14; border: 1px solid #6E7B4E40; }

.start .journey-map { flex: 1 1 auto; min-height: 90px; max-height: 260px; margin: var(--s3) 0; display: flex; }
.start .journey-map svg { flex: 1; }

.start-cta { margin-top: auto; }
.start-cta .btn { width: 100%; height: 56px; min-height: 56px; border-radius: 28px; font: 600 17px/1 Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; letter-spacing: .01em; }
.start-cta .enjoy { margin: var(--s2) 0 0; text-align: center; font: italic 400 15px/1.3 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--olive, #6E7B4E); }

/* ---- start page map ---- */
.journey-map { margin: 26px auto 8px; max-width: 360px; opacity: .95; }
.journey-map .scenery { opacity: 0; animation: fade-in 1s ease 3.2s forwards; }
#trailMask { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 3s ease-in-out 3.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
#stops circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .45s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.xmark { opacity: 0; animation: fade-in .5s ease 6.4s forwards; }
.xmark path { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out 7s infinite; }
@keyframes pulse { 50% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .journey-map *, #trailMask { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
}

/* ---- envelope ---- */
#app.entering { animation: page-in .8s ease 2.75s both; }
@keyframes page-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.opening { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: var(--bg, #F4EFE4);
  pointer-events: none; animation: veil .5s ease 2.85s forwards; }
@keyframes veil { to { opacity: 0; visibility: hidden; } }

.env { position: relative; width: 280px; height: 180px; perspective: 900px; margin-top: 90px;
  transform-origin: 50% -30px;
  animation: env-in .5s ease-out both, zoom .75s cubic-bezier(.6,0,.4,1) 2.2s forwards; }
@keyframes env-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes zoom { to { transform: scale(5.5); opacity: 0; } }

.eback, .front, .flap { position: absolute; left: 0; right: 0; }
.eback { inset: 0; background: #D9CBB0; border-radius: 6px; box-shadow: 0 14px 30px #5d4a2a33; }
.front { inset: 0; background: #E8DCC5; border-radius: 6px; z-index: 3;
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 45%, #0000000d); }
.flap { top: 0; height: 112px; background: #EFE5D2; z-index: 4; transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 2px #0002);
  animation: flap-open .6s ease-in-out .9s forwards; }
@keyframes flap-open { 0% { transform: rotateX(0); z-index: 4; } 49% { z-index: 4; } 50% { z-index: 1; background: #DCCFB6; } 100% { transform: rotateX(180deg); z-index: 1; background: #DCCFB6; } }

.letter { position: absolute; left: 16px; right: 16px; top: 8px; height: 168px; z-index: 2; background: #FBF8F1;
  border-radius: 4px; border: 1px solid #E2D9C5; padding: 18px 18px; box-sizing: border-box;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) 1.45s forwards; }
@keyframes rise { to { transform: translateY(-120px); } }
.lt { font: 500 17px/1.25 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; text-align: center; color: #2E2A22; margin-bottom: 12px; text-wrap: balance; }
.ll { height: 5px; border-radius: 3px; background: #E2D9C5; margin: 9px 8px; }
.ll.short { width: 55%; margin: 9px auto; }

.wax { position: absolute; left: 50%; top: 112px; width: 46px; height: 46px; margin: -26px 0 0 -23px; z-index: 5;
  border-radius: 50% 46% 52% 48%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #B97556, #9A5B3F 55%, #7A4430);
  box-shadow: 0 3px 8px #7a443055, inset 0 -2px 4px #0003;
  animation: seal-off .35s ease-in .55s forwards; }
.wax span { font: 500 20px 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: #F3DCCB; }
@keyframes seal-off { to { transform: translateY(10px) scale(.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .opening { display: none; } #app.entering { animation: none; } }

/* ---- prototype screens ---- */

.start-cta .btn:disabled { opacity: .35; cursor: default; }
.start-cta .btn { transition: opacity .6s ease; }

.pmap { flex: 1 1 auto; min-height: 80px; max-height: 210px; margin: var(--s2) 0; display: flex; }
.pmap svg { flex: 1; }
.pmap circle { transform-box: fill-box; transform-origin: center; }
.pmap circle.now { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .35; } }
.pmap circle.earned { animation: earn .6s cubic-bezier(.3,1.6,.5,1) .3s both; }
@keyframes earn { from { transform: scale(0); } }

.tiles-mini { display: flex; justify-content: center; gap: 6px; margin-bottom: clamp(12px, 3vh, 32px); }
.tiles-mini span { width: 30px; height: 36px; border-radius: 8px; border: 1.5px dashed #CFC4AC; display: grid; place-items: center;
  font: 500 20px 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--terra, #9A5B3F); }
.tiles-mini span.f { border: 1.5px solid var(--terra, #9A5B3F); background: var(--surface, #FBF8F1); }
.eb { font: 600 12px/1 Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--olive, #6E7B4E); margin-bottom: 10px; }
.ttl { font: 500 30px/1.15 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; margin: 0 0 var(--s3); }
.prose-card { background: var(--surface, #FBF8F1); border: 1px solid var(--line, #E2D9C5); border-radius: 20px; padding: var(--s3);
  font: 400 20px/1.5 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; }
.prose-card .sign { text-align: right; font-style: italic; font-size: 16px; color: var(--muted, #5d564a); margin-top: 10px; }
input.ans[type=text] { width: 100%; height: 54px; margin-top: var(--s3); border: 1.5px solid var(--olive, #6E7B4E); border-radius: 14px; background: #fff;
  padding: 0 16px; font: 400 17px Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; color: var(--ink, #2E2A22); outline: none; box-sizing: border-box; }
input.ans[type=text]:focus { box-shadow: 0 0 0 4px #6E7B4E22; }
.fb { min-height: 22px; margin-top: 10px; text-align: center; font-size: 14px; color: var(--terra, #9A5B3F); }
.shake { animation: shake .4s; } @keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.bigl { text-align: center; font: 500 120px/1 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--terra, #9A5B3F); margin: var(--s2) 0; animation: popin .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
.sub { text-align: center; color: var(--muted, #5d564a); font-size: 15px; margin: 0 0 var(--s3); }
.ghost { width: 100%; height: 48px; border-radius: 24px; border: 1.5px dashed var(--olive, #6E7B4E); background: transparent;
  color: var(--olive, #6E7B4E); font: 600 15px Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; margin-top: var(--s2); }
.linkbtn { background: none; border: 0; color: var(--olive, #6E7B4E); font: 600 14px Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; text-decoration: underline; padding: 10px; display: block; margin: 6px auto 0; }
.ok-big { text-align: center; font: 500 32px/1.2 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--terra, #9A5B3F); margin: var(--s5) 0 var(--s2); }
.spark { position: fixed; pointer-events: none; color: var(--terra, #9A5B3F); font-size: 14px; animation: sp 1.2s ease-out forwards; z-index: 9; }
@keyframes sp { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
html { overflow-x: hidden; } body { overflow-x: clip; }
/* ---- the ending ---- */
.slots, .pool { display: flex; justify-content: center; gap: 6px; }
.slots { margin-top: var(--s2); }
.slot { width: 44px; height: 54px; border-radius: 10px; border: 1.5px dashed #CFC4AC; background: transparent; padding: 0;
  font: 500 30px 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--olive, #6E7B4E); box-shadow: none; }
.slot.f { border: 1.5px solid var(--olive, #6E7B4E); background: var(--surface, #FBF8F1); animation: slotpop .25s ease; }
.slot.win { background: var(--olive, #6E7B4E); color: #FBF8F1; transition: background .3s, color .3s; }
.pool { margin-top: var(--s3); }
.tile-l { width: 44px; height: 54px; border-radius: 10px; border: 0; padding: 0; background: var(--olive, #6E7B4E); color: #FBF8F1;
  font: 500 30px 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; box-shadow: 0 2px 0 #4f5a35; transition: opacity .2s, transform .2s; }
.tile-l.used { opacity: .15; transform: scale(.9); }
@keyframes slotpop { 50% { transform: scale(1.12); } }
.word-big { display: flex; justify-content: center; gap: 2px; margin: var(--s5) 0 var(--s3); }
.word-big span { font: 500 54px/1 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--olive, #6E7B4E); animation: popin .6s cubic-bezier(.3,1.5,.5,1) both; }
.prose-card.note.final { font-size: 28px; padding: 22px 18px; color: var(--ink, #2E2A22); animation: popin .8s ease 1.2s both; }
.pmap .px.xpulse path { transform-box: fill-box; transform-origin: center; animation: blink 1.4s ease-in-out infinite; }
@media (max-height: 780px) {
  .slot, .tile-l { width: 42px; height: 50px; font-size: 28px; }
  .word-big { margin: 24px 0 16px; } .word-big span { font-size: 48px; }
}


/* shorter screens (e.g. iPhone 11 in Safari with its toolbars, ~715px tall) */
@media (max-height: 780px) {
  .start-head h1 { font-size: 27px; }
  .start-card { padding: 18px; }
  .start-card h2 { margin-bottom: 12px; }
  .start-card ol { gap: 9px; }
  .start-card li { font-size: 15px; line-height: 1.4; }
  .ttl { font-size: 27px; margin-bottom: 14px; }
  .prose-card { padding: 16px 18px; font-size: 18px; }
  input.ans[type=text] { height: 48px; margin-top: 14px; }
  .fb { margin-top: 6px; min-height: 18px; }
  .bigl { font-size: 84px; margin: 4px 0 10px; }
  .ghost { height: 44px; margin-top: 12px; }
  .start-cta .btn { height: 52px; min-height: 52px; }
  .start-cta .enjoy { margin-top: 10px; }
  .ok-big { margin: 16px 0 8px; font-size: 28px; }
  .tiles-mini span { width: 28px; height: 34px; font-size: 19px; }
}

/* the map takes only the space that is left, and shrinks on short screens */
.start .journey-map, .pmap { position: relative; flex: 1 1 0; min-height: 90px; max-height: 260px; }
.start .journey-map svg, .pmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }

#app { position: relative; }
.back { position: absolute; top: calc(env(safe-area-inset-top) + 6px); left: 10px; z-index: 3; width: 44px; height: 44px;
  border: 0; border-radius: 22px; background: transparent; box-shadow: none; color: var(--olive, #6E7B4E); display: grid; place-items: center; cursor: pointer; }
.back:active { background: #6E7B4E1a; }

@keyframes mfade { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 340px; background: var(--surface, #FBF8F1); border-radius: 22px; padding: 24px; text-align: center;
  box-shadow: 0 20px 50px #0003; animation: mpop .25s cubic-bezier(.3,1.4,.5,1); }
@keyframes mpop { from { transform: scale(.92); opacity: 0; } }
.modal-card h3 { margin: 0 0 8px; font: 500 26px/1.2 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif; color: var(--ink, #2E2A22); }
.modal-card p { margin: 0 0 20px; color: var(--muted, #5d564a); font-size: 15px; line-height: 1.45; }
.modal-card .btn { width: 100%; height: 50px; border-radius: 25px; }

.compass { font-size: 0; margin: 4px 0 18px; }
.compass .needle { transform-origin: 0 0; animation: seek 2.2s cubic-bezier(.3,.6,.3,1) .2s both; }
@keyframes seek { 0% { transform: rotate(-140deg); } 35% { transform: rotate(40deg); } 55% { transform: rotate(-18deg); }
  72% { transform: rotate(8deg); } 86% { transform: rotate(-3deg); } 100% { transform: rotate(0); } }
@media (max-height: 780px) { .compass svg { width: 88px; height: 88px; } .compass { margin-bottom: 12px; } }

.prose-card.note { text-align: center; font-size: 19px; line-height: 1.55; padding: 22px 24px; text-wrap: balance; }
@media (max-height: 780px) { .prose-card.note { font-size: 18px; padding: 18px 20px; } }

input.ans[type=text].done { background: #6E7B4E0f; border-color: #6E7B4E80; color: var(--ink, #2E2A22); -webkit-text-fill-color: var(--ink, #2E2A22); opacity: 1; }
.solved { color: var(--olive, #6E7B4E); font-weight: 600; }

.detective { font-size: 0; margin: 4px 0 18px; }
.detective .lens { transform-box: view-box; transform-origin: 69px 84px; animation: search 4s ease-in-out .4s infinite; }
@keyframes search { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-9deg); } 60% { transform: rotate(4deg); } }
.detective .glint { animation: glint 4s ease-in-out .9s infinite; }
@keyframes glint { 0%,60% { transform: translateX(-14px); } 80%,100% { transform: translateX(18px); } }
.detective svg { animation: popin .7s cubic-bezier(.3,1.5,.5,1); }
@media (max-height: 780px) { .detective svg { width: 92px; height: 92px; } .detective { margin-bottom: 12px; } }

.flyer { font-size: 0; margin: 4px 0 18px; }
.flyer svg { animation: popin .7s cubic-bezier(.3,1.5,.5,1); }
.flyer .jet { animation: cruise 3.6s ease-in-out infinite; }
@keyframes cruise { 0%,100% { transform: translate(0,0); } 50% { transform: translate(3px,-4px); } }
.flyer .clouds { animation: drift 6s linear infinite; }
@keyframes drift { from { transform: translateX(6px); } to { transform: translateX(-6px); } }
@media (max-height: 780px) { .flyer svg { width: 92px; height: 92px; } .flyer { margin-bottom: 12px; } }

.scanner { position: fixed; inset: 0; z-index: 40; background: #1f1c17; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: mfade .25s ease; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.sc-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 14px; width: 44px; height: 44px; border-radius: 22px; border: 0;
  background: #00000055; color: #fff; font-size: 18px; z-index: 2; }
.sc-frame { position: relative; width: 64vw; max-width: 260px; aspect-ratio: 1; z-index: 1; border-radius: 18px; box-shadow: 0 0 0 100vmax #0000004d; }
.sc-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #F4EFE4; }
.sc-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.sc-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.sc-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.sc-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.sc-line { position: absolute; left: 10%; right: 10%; height: 2px; background: #B8924A; box-shadow: 0 0 12px #B8924A; animation: scanline 2s ease-in-out infinite; }
@keyframes scanline { 0%,100% { top: 12%; } 50% { top: 86%; } }
.scanner.hit .sc-frame i { border-color: #8fa060; }
.scanner.hit .sc-frame { animation: hit .5s ease; }
@keyframes hit { 50% { transform: scale(1.06); } }
.sc-text { position: relative; z-index: 1; color: #F4EFE4; font: 500 16px Manrope, -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; margin: 28px 24px 0; text-align: center; }

.theatre { font-size: 0; margin: 4px 0 18px; }
.theatre svg { animation: popin .7s cubic-bezier(.3,1.5,.5,1); }
.theatre .cur { transform-box: view-box; animation-duration: 1.4s; animation-timing-function: cubic-bezier(.5,0,.2,1); animation-delay: .5s; animation-fill-mode: both; }
.theatre .cur.l { transform-origin: 18px 26px; animation-name: openL; }
.theatre .cur.r { transform-origin: 102px 26px; animation-name: openR; }
@keyframes openL { from { transform: scaleX(1.55); } to { transform: scaleX(1); } }
@keyframes openR { from { transform: scaleX(1.55); } to { transform: scaleX(1); } }
.theatre .beam { opacity: 0; animation: beam 1s ease 1.4s forwards, flicker 4s ease-in-out 2.4s infinite; }
@keyframes beam { to { opacity: 1; } }
@keyframes flicker { 50% { opacity: .8; } }
.theatre .masks { opacity: 0; animation: beam .8s ease 1.6s forwards; }
@media (max-height: 780px) { .theatre svg { width: 96px; height: 96px; } .theatre { margin-bottom: 12px; } }

.cookieart { font-size: 0; margin: 4px 0 18px; }
.cookieart .ck { transform-box: view-box; transform-origin: 60px 62px; animation: ckin .8s cubic-bezier(.3,1.5,.5,1) both, wob 5s ease-in-out 1s infinite; }
@keyframes ckin { from { transform: scale(.3) rotate(-40deg); opacity: 0; } }
@keyframes wob { 50% { transform: rotate(4deg); } }
.cookieart .crumbs circle { animation: crumb 2.4s ease-in 1s infinite; }
.cookieart .crumbs circle:nth-child(2) { animation-delay: 1.4s; } .cookieart .crumbs circle:nth-child(3) { animation-delay: 1.9s; }
@keyframes crumb { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
@media (max-height: 780px) { .cookieart svg { width: 92px; height: 92px; } .cookieart { margin-bottom: 12px; } }

.spacup { font-size: 0; margin: 4px 0 18px; }
.spacup svg { animation: popin .7s cubic-bezier(.3,1.5,.5,1); }
.spacup .steam path { animation: steam 2.6s ease-in-out infinite; opacity: 0; }
.spacup .steam path:nth-child(2) { animation-delay: .6s; } .spacup .steam path:nth-child(3) { animation-delay: 1.2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (max-height: 780px) { .spacup svg { width: 92px; height: 92px; } .spacup { margin-bottom: 12px; } }

/* ---- small additions for the real app ---- */
.sheet { position: fixed; inset: 0; z-index: 30; background: #2E2A2259; display: grid; place-items: center; padding: 24px; animation: mfade .2s ease; }
.journey-map.still *, .journey-map.still #trailMask { animation: none !important; opacity: 1; }
.journey-map.still #trailMask { stroke-dashoffset: 0; }
.prose-card { white-space: pre-line; overflow-wrap: anywhere; }
.hintcard { font-size: 16px !important; margin-top: 12px; font-style: italic; }
.photo-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-align: center; box-sizing: border-box; padding: 0 16px; }
.photo-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.photo-btn:focus-within { box-shadow: 0 0 0 4px #6E7B4E22; }
.photo-btn img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; }
.quiet { text-align: center; color: var(--muted); font-size: 15px; margin: var(--s2) 0 0; }
.sc-text.bad { color: #F3CDBB; }
.skiptest { display: block; margin: 8px auto 0; }
.badge-test { position: fixed; right: 10px; bottom: 10px; z-index: 20; background: var(--terra); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 5px 9px; border-radius: 99px; border: 0; }
.message-page { margin: auto 0; text-align: center; }
.message-page h1 { font-size: 30px; }
/* album */
.wrap { max-width: 520px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 56px) 18px 64px; min-height: 100dvh; }
.album-item { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.album-item:first-of-type { border-top: 0; margin-top: 8px; padding-top: 0; }
.album-item .q { font-family: var(--serif); font-size: 19px; line-height: 1.5; margin: 10px 0 0; white-space: pre-line; }
.album-item .a { color: var(--olive); font-weight: 600; font-size: 15px; margin-top: 4px; }
.album-item .m { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 12px; text-align: center; font-family: var(--serif); font-size: 18px; line-height: 1.5; white-space: pre-line; }
.letterbadge { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--terra); color: var(--terra); font-family: var(--serif); font-size: 20px; margin-right: 10px; vertical-align: middle; }
.photo { width: 100%; border-radius: 14px; display: block; margin-top: 14px; border: 1px solid var(--line); }
.dl { display: grid; gap: 10px; margin-top: 28px; }
.albumword { text-align: center; font: 500 44px/1 var(--serif); color: var(--olive); margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media print { .dl, .badge-test, .back, .skiptest { display: none !important; } .wrap { padding: 0; } body { background: #fff; } .album-item { break-inside: avoid; } }
