/* ============ PAPER TRAIL v3 · game-scrapbook ============ */
:root {
  --cream: #f4ecd9; --paper: #fbf7ee; --kraft: #c9a373; --wood: #b98a5a; --wood-2: #8f6538;
  --ink: #2f2620; --ink-2: #5d4c3e; --muted: #8b7a68; --line: rgba(60, 40, 20, .14);
  --rose: #e39c9c; --sage: #9fbf9a; --mustard: #e6c15c; --sky: #9cc3e0; --lilac: #c3a6d9; --coral: #ef8b7a; --red: #b83a2f;
  --accent: #b8523f;
  --shadow: 0 10px 30px -12px rgba(70, 45, 20, .35), 0 2px 6px rgba(70, 45, 20, .12);
  --nav-h: 74px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Nunito', system-ui, sans-serif; color: var(--ink); background: var(--cream); min-height: 100vh; line-height: 1.4; -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"), radial-gradient(ellipse at 20% 0%, #fff8e6 0%, transparent 55%), radial-gradient(ellipse at 100% 100%, #e8d8b8 0%, transparent 50%); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .8rem; } .center { text-align: center; }
.hand { font-family: 'Caveat', cursive; font-weight: 700; color: var(--ink-2); }
.display { font-family: 'Fraunces', serif; font-weight: 800; margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }

.tape { position: absolute; height: 24px; width: 100px; opacity: .85; pointer-events: none; mix-blend-mode: multiply; box-shadow: 0 1px 2px rgba(0,0,0,.12);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.45) 0 6px, rgba(255,255,255,0) 6px 12px), var(--tape, var(--rose)); }
.tape-top { top: -11px; left: 50%; transform: translateX(-50%) rotate(-2deg); }
.tape-a { top: -11px; left: 8%; transform: rotate(-8deg); --tape: var(--sage); }
.tape-b { top: -9px; right: 6%; transform: rotate(6deg); --tape: var(--mustard); width: 70px; }
.paper { background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); position: relative; }

/* ============ COVER · animated paper world ============ */
.cover { position: fixed; inset: 0; overflow: hidden; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(180deg, #fbefd9 0%, #f6dfc4 45%, #f1cfb0 70%, #e9c1a0 100%); }
.cover > * { will-change: transform; }
.sun { position: absolute; top: 6%; right: 10%; width: min(34vw, 240px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3c4, #f7d98a 60%, #f2c66b); box-shadow: 0 0 80px 30px rgba(247, 217, 138, .45); animation: sunbreath 9s ease-in-out infinite; transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px)); }
@keyframes sunbreath { 0%,100% { box-shadow: 0 0 80px 30px rgba(247,217,138,.4);} 50% { box-shadow: 0 0 110px 44px rgba(247,217,138,.6);} }
.clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: .85; filter: drop-shadow(0 6px 10px rgba(120,80,40,.12)); animation: drift linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud.c1 { width: 180px; height: 54px; top: 14%; left: -200px; animation-duration: 70s; }
.cloud.c1::before { width: 80px; height: 80px; left: 30px; top: -40px; } .cloud.c1::after { width: 60px; height: 60px; left: 90px; top: -26px; }
.cloud.c2 { width: 130px; height: 40px; top: 30%; left: -160px; animation-duration: 95s; animation-delay: -40s; opacity: .7; }
.cloud.c2::before { width: 60px; height: 60px; left: 24px; top: -30px; } .cloud.c2::after { width: 44px; height: 44px; left: 68px; top: -18px; }
.cloud.c3 { width: 220px; height: 60px; top: 6%; left: -240px; animation-duration: 120s; animation-delay: -80s; opacity: .6; }
.cloud.c3::before { width: 90px; height: 90px; left: 40px; top: -44px; } .cloud.c3::after { width: 70px; height: 70px; left: 120px; top: -30px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 300px)); } }

.sky { position: absolute; inset: 0; pointer-events: none; }
.fly { position: absolute; left: 0; top: var(--y); animation: flyacross var(--dur) linear infinite; animation-delay: var(--delay); opacity: var(--op, 1); filter: blur(var(--blur, 0)) drop-shadow(0 8px 10px rgba(90,50,20,.18)); }
.fly.rtl { animation-name: flyacross-rtl; }
@keyframes flyacross { from { transform: translateX(-20vw); } to { transform: translateX(110vw); } }
@keyframes flyacross-rtl { from { transform: translateX(110vw) scaleX(-1); } to { transform: translateX(-20vw) scaleX(-1); } }
.fly .bob { animation: flybob var(--bob, 4s) ease-in-out infinite; }
@keyframes flybob { 0%,100% { transform: translateY(0) rotate(-4deg);} 50% { transform: translateY(-22px) rotate(5deg);} }
.fly svg { display: block; width: var(--s); height: var(--s); animation: flap var(--flap, 1.1s) ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes flap { 0%,100% { transform: scaleY(1);} 50% { transform: scaleY(.82);} }
.fly.glide svg { animation: none; }
.star { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); animation: twinkle var(--dur) ease-in-out infinite; animation-delay: var(--delay); pointer-events: none; }
.star svg { width: 100%; height: 100%; display: block; }
@keyframes twinkle { 0%,100% { transform: scale(.7) rotate(-10deg); opacity: .35;} 50% { transform: scale(1.1) rotate(12deg); opacity: 1;} }
.speck { position: absolute; left: var(--x); top: var(--y); width: 8px; height: 10px; border-radius: 2px; background: var(--c); opacity: .6; animation: fall var(--dur) linear infinite; animation-delay: var(--delay); }
@keyframes fall { 0% { transform: translateY(-10vh) rotate(0);} 100% { transform: translateY(110vh) rotate(720deg);} }

.hills { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; }
.hill { position: absolute; left: -2%; width: 104%; bottom: 0; height: 100%; }
.hill.h1 path { fill: #b9cfa8; } .hill.h1 { transform: translate(calc(var(--mx, 0) * 10px), 0); }
.hill.h2 path { fill: #9fbf9a; } .hill.h2 { bottom: -4%; transform: translate(calc(var(--mx, 0) * 18px), 0); }
.sea { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; pointer-events: none; }
.wave { position: absolute; left: 0; right: 0; height: 100%; background-repeat: repeat-x; background-size: 320px 100%; }
.wave.w1 { bottom: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 120' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C60,10 100,70 160,40 C220,10 260,70 320,40 L320,120 L0,120 Z' fill='%23a9cfe0'/%3E%3C/svg%3E"); animation: wavemove 12s linear infinite; opacity: .95; }
.wave.w2 { bottom: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 120' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C60,20 100,80 160,50 C220,20 260,80 320,50 L320,120 L0,120 Z' fill='%238ab9d2'/%3E%3C/svg%3E"); animation: wavemove 8s linear infinite reverse; }
@keyframes wavemove { from { background-position-x: 0; } to { background-position-x: 320px; } }
.boats { position: absolute; left: 0; right: 0; bottom: 34%; height: 0; }
.boat { position: absolute; left: 0; bottom: 0; width: var(--s); animation: sail var(--dur) linear infinite; animation-delay: var(--delay); }
.boat svg { width: 100%; height: auto; display: block; animation: rock 3.2s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 6px 6px rgba(40,60,80,.25)); }
@keyframes sail { from { transform: translateX(-15vw);} to { transform: translateX(105vw);} }
@keyframes rock { 0%,100% { transform: rotate(-6deg) translateY(0);} 50% { transform: rotate(6deg) translateY(-6px);} }

.postcard { position: relative; z-index: 5; width: min(760px, 100%); display: grid; grid-template-columns: 1.1fr 1px 1fr; align-items: center; gap: 22px; padding: 26px 28px;
  background: #fbf7ee; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(80,50,20,.5), 0 4px 12px rgba(80,50,20,.15);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(80,60,30,.05) 27px 28px);
  animation: popin .9s cubic-bezier(.2,1.3,.4,1) .25s both; transform: translate(calc(var(--mx, 0) * 6px), calc(var(--my, 0) * 4px)) rotate(-1deg); }
@keyframes popin { from { opacity: 0; transform: scale(.6) rotate(-8deg) translateY(40px);} to { opacity: 1; transform: scale(1) rotate(-1deg);} }
.postcard .tape-a { --tape: var(--sage); top: -11px; left: 6%; transform: rotate(-8deg); }
.postcard .tape-b { --tape: var(--mustard); top: -9px; right: 5%; transform: rotate(6deg); width: 80px; }
.postcard .tape-c { --tape: var(--sky); bottom: -10px; left: 44%; top: auto; transform: rotate(3deg); width: 70px; }
.pc-left { text-align: center; }
.pc-line { width: 1px; height: 80%; background: repeating-linear-gradient(180deg, var(--kraft) 0 6px, transparent 6px 12px); opacity: .7; }
.cover-ori { display: inline-block; filter: drop-shadow(0 8px 8px rgba(60,30,0,.22)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg);} 50% { transform: translateY(-8px) rotate(2deg);} }
.cover-title { font-family: 'Fraunces', serif; font-size: clamp(2.3rem, 6vw, 3.1rem); margin: 0; color: #3b2a16; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.cover-sub { font-family: 'Caveat', cursive; font-size: 1.5rem; color: #5a4225; margin: 6px 0 0; }
.recipe { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.recipe .step { display: grid; justify-items: center; gap: 2px; width: 84px; font-family: 'Caveat', cursive; font-weight: 700; font-size: 1rem; color: #5a4225; line-height: 1; text-align: center; }
.recipe .e { font-size: 1.7rem; line-height: 1; height: 34px; display: grid; place-items: center; }
.recipe .e svg { width: 34px; height: 34px; }
.recipe .arr { color: var(--kraft); font-weight: 800; font-size: 1.1rem; margin-top: -14px; }
.howto { grid-column: 1 / -1; display: grid; gap: 14px; padding: 10px 6px 0; }
.howto .hand { font-size: 1.5rem; text-align: center; }
.howto .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.howto .st { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 8px 12px; text-align: center; transform: rotate(var(--rot)); display: grid; justify-items: center; gap: 6px; }
.howto .st .e { font-size: 2rem; line-height: 1; height: 40px; display: grid; place-items: center; }
.howto .st .e svg { width: 40px; height: 40px; }
.howto .st .n { position: absolute; } 
.howto .st .t { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.15rem; line-height: 1; color: var(--ink-2); }
.howto .st .num { font-family: 'Fraunces', serif; font-weight: 800; color: var(--accent); font-size: .9rem; }
.howto .extra { text-align: center; font-family: 'Caveat', cursive; font-size: 1.2rem; color: var(--muted); }
.login { display: grid; gap: 10px; position: relative; padding-top: 6px; }
.stamp-box { position: absolute; right: 0; top: -12px; width: 44px; height: 52px; border: 2px dashed var(--kraft); display: grid; place-items: center; font-size: 1.3rem; color: var(--kraft); transform: rotate(6deg); opacity: .8; }
.login input { width: 100%; padding: 12px 14px; border: 0; border-bottom: 2px solid var(--kraft); background: transparent; font-size: 1.1rem; outline: 0; font-family: 'Caveat', cursive; font-size: 1.45rem; font-weight: 700; }
.login input::placeholder { color: #b8a58e; font-weight: 500; }
.login input:focus { border-color: var(--accent); }
.hint { position: absolute; right: 10px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.05); font-weight: 800; color: #5a4225; }
@media (max-width: 640px) {
  .cover { align-items: center; padding: 16px 14px 80px; }
  .postcard { grid-template-columns: 1fr; gap: 14px; padding: 26px 20px 30px; transform: rotate(-1deg); }
  .pc-line { width: 80%; height: 1px; justify-self: center; background: repeating-linear-gradient(90deg, var(--kraft) 0 6px, transparent 6px 12px); }
  .cover-ori svg { width: 100px; height: 100px; }
  .stamp-box { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cover * { animation-duration: 0s !important; } }

.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 1rem; background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.08); transition: transform .12s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.big { padding: 15px 26px; font-size: 1.1rem; }
.btn.ghost { background: transparent; box-shadow: none; border: 1.5px dashed var(--kraft); }
.btn:disabled { opacity: .55; cursor: wait; }

/* ============ SHELL ============ */
.app { max-width: 900px; margin: 0 auto; padding: 8px 12px calc(var(--nav-h) + 24px); }
.top { display: flex; align-items: center; gap: 10px; padding: 4px 2px 12px; }
.mascot { position: relative; width: 62px; height: 62px; flex: none; }
.mascot svg { width: 62px; height: 62px; animation: bob 4s ease-in-out infinite; }
.mascot.flap svg { animation: flap .6s ease 2; }
@keyframes flap { 0%,100% { transform: scale(1);} 50% { transform: scale(1.18) rotate(-6deg);} }
.bubble { position: absolute; left: 66px; top: 8px; white-space: nowrap; background: #fff; border-radius: 14px; padding: 6px 12px; font-size: 1.1rem; box-shadow: var(--shadow); line-height: 1.1; }
.bubble::before { content: ''; position: absolute; left: -8px; top: 12px; border: 6px solid transparent; border-right-color: #fff; border-left: 0; }
.ring { margin-left: auto; position: relative; width: 44px; height: 44px; flex: none; }
.ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(0,0,0,.08); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 113; transition: stroke-dashoffset .6s; }
.ring-n { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Fraunces', serif; font-weight: 800; font-size: .95rem; }
.menu { position: relative; }
.icon-btn { border: 0; background: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; line-height: 1; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.menu-pop { position: absolute; right: 0; top: 46px; background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 30; display: grid; }
.menu-pop button { border: 0; background: transparent; padding: 11px 12px; text-align: left; border-radius: 6px; font-size: 1rem; font-weight: 700; }

.page { display: none; animation: pagein .3s ease; }
.page.active { display: block; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

/* ============ BOTTOM NAV ============ */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper); box-shadow: 0 -6px 24px -10px rgba(60,40,20,.35); display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center; max-width: 900px; margin: 0 auto; border-radius: 18px 18px 0 0; }
.tab { border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 8px 0; }
.tab-ico { font-size: 1.5rem; line-height: 1; transition: transform .15s; }
.tab.active { color: var(--accent); } .tab.active .tab-ico { transform: translateY(-3px) scale(1.15); }
.fab { border: 0; width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 1; margin: -30px auto 0; box-shadow: 0 10px 24px -8px rgba(184,82,63,.8), 0 0 0 6px var(--paper); transition: transform .15s; display: grid; place-items: center; }
.fab:active { transform: scale(.94); }
.fab span { margin-top: -4px; }

/* ============ SHELF ============ */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 14px; padding: 16px 4px 10px; }
@media (min-width: 560px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(6, 1fr); gap: 40px 18px; } }
.ori-card { position: relative; height: 150px; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: end; cursor: pointer; }
.ori-card::after { content: ''; position: absolute; left: -9px; right: -9px; bottom: -10px; height: 12px; border-radius: 2px; z-index: 0;
  background: linear-gradient(#cfa06c, var(--wood) 40%, var(--wood-2)); box-shadow: 0 6px 8px -4px rgba(60,30,0,.45); }
.ori-card svg { width: 100%; max-width: 116px; height: auto; position: relative; z-index: 1; transition: transform .2s; transform: rotate(var(--rot, 0deg)); }
.ori-card:active svg, .ori-card:hover svg { transform: translateY(-6px) scale(1.06); }
.ori-card .n { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.05rem; color: var(--ink-2); line-height: 1; padding: 6px 0 2px; position: relative; z-index: 1; text-align: center; }
.ori-card .badge { position: absolute; top: 4px; right: 6px; z-index: 2; font-size: 1.1rem; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.ori-card.locked { cursor: default; }
.ori-card.locked svg { opacity: .16; filter: grayscale(1); }
.ori-card.locked .n { color: var(--muted); opacity: .7; }
.ori-card.locked:hover svg { transform: none; }
.empty-note { grid-column: 1 / -1; padding: 24px 10px 0; text-align: center; }
.empty-note .hand { font-size: 1.5rem; }

/* ============ TRAIL ============ */
.filters { display: flex; gap: 8px; margin: 6px 0 16px; overflow-x: auto; padding: 4px 2px; }
.chip { flex: none; border: 1.5px solid var(--line); background: rgba(255,255,255,.55); border-radius: 999px; padding: 6px 13px; font-weight: 800; font-size: 1rem; color: var(--ink-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.trail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; padding: 4px 2px; }
@media (min-width: 620px) { .trail { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .trail { grid-template-columns: repeat(4, 1fr); } }
.app-card { position: relative; cursor: pointer; transform: rotate(var(--rot, 0deg)); transition: transform .2s; }
.app-card:active, .app-card:hover { transform: rotate(0) translateY(-3px); }
.polaroid { background: #fff; padding: 7px 7px 8px; box-shadow: var(--shadow); position: relative; }
.polaroid .ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #efe6d4; }
.polaroid .pdf { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: #fdf3e2; font-size: 2.4rem; }
.polaroid .cap { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.15rem; color: var(--ink); line-height: 1.05; padding: 8px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.polaroid .sub { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.app-card .clip { position: absolute; top: -12px; left: 14px; width: 14px; height: 32px; border: 3px solid #9aa3ad; border-radius: 8px; transform: rotate(-8deg); opacity: .85; z-index: 2; }
.app-card .mini { position: absolute; right: -6px; bottom: 26px; width: 42px; height: 42px; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.app-card .mini svg { width: 42px; height: 42px; }
.stamp { position: absolute; left: 10px; bottom: 44px; padding: 2px 8px; border: 2px solid var(--st, var(--sky)); color: var(--st, var(--sky)); font-family: 'Fraunces', serif; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; border-radius: 3px; transform: rotate(-8deg); opacity: .9; mix-blend-mode: multiply; background: rgba(255,255,255,.5); z-index: 2; }
.st-sent { --st: #4c7fb0; } .st-replied { --st: #3f8f6a; } .st-interview { --st: #b8862c; } .st-offer { --st: #b83a2f; } .st-rejected { --st: #7a6b60; } .st-silent { --st: #9a8f86; }
.late { position: absolute; top: 6px; right: 6px; z-index: 2; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.2); font-size: 1rem; animation: wiggle 2.5s ease-in-out infinite; }
@keyframes wiggle { 0%,80%,100% { transform: rotate(0);} 85% { transform: rotate(-12deg);} 90% { transform: rotate(12deg);} 95% { transform: rotate(-6deg);} }

/* ============ MAP ============ */
.map-card { padding: 16px 12px 10px; margin: 8px auto 18px; max-width: 520px; }
.stickers, .nudges, .section-h, .hand-note { max-width: 520px; margin-left: auto; margin-right: auto; }
.map-card svg.map { width: 100%; height: auto; display: block; }
.big-stat { text-align: center; margin: 2px 0 0; }
.big-stat .v { font-family: 'Fraunces', serif; font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--accent); }
.big-stat .l { font-family: 'Caveat', cursive; font-size: 1.35rem; color: var(--ink-2); }
.verdict { text-align: center; font-family: 'Caveat', cursive; font-size: 1.35rem; color: var(--ink-2); margin: 4px 0 2px; }
.stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 2px; }
.sticker { background: var(--paper); padding: 12px 6px 10px; border-radius: 50% 50% 48% 52% / 60% 55% 45% 40%; box-shadow: var(--shadow); text-align: center; transform: rotate(var(--rot, 0deg)); border: 3px solid #fff; }
.sticker .e { font-size: 1.3rem; line-height: 1; }
.sticker .v { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.sticker .l { font-family: 'Caveat', cursive; font-size: 1rem; color: var(--muted); line-height: 1; }
.section-h { font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.2rem; margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px; }
.nudges { display: grid; gap: 10px; padding: 0 2px; }
.nudge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper); box-shadow: var(--shadow); border-radius: 12px; }
.nudge .t { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nudge .d { font-family: 'Caveat', cursive; font-size: 1.1rem; color: var(--red); font-weight: 700; }
.nudge .btn { padding: 8px 12px; font-size: 1.2rem; line-height: 1; }
.charm-sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; padding: 10px 2px; }
@media (min-width: 620px) { .charm-sheet { grid-template-columns: repeat(6, 1fr); } }
.charm { display: grid; justify-items: center; gap: 4px; text-align: center; }
.charm .e { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: var(--paper); box-shadow: var(--shadow); border: 3px solid #fff; transform: rotate(var(--rot, 0deg)); }
.charm .l { font-family: 'Caveat', cursive; font-weight: 700; font-size: .95rem; color: var(--ink-2); line-height: 1; }
.charm.locked .e { background: transparent; box-shadow: none; border: 2px dashed var(--line); filter: grayscale(1); opacity: .45; }
.charm.locked .l { opacity: .5; }
.hand-note { font-family: 'Caveat', cursive; font-size: 1.2rem; color: var(--muted); text-align: center; margin: 16px 0 0; }

/* ============ DRAWERS ============ */
.drawer-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; }
.drawer-bg { position: absolute; inset: 0; background: rgba(50, 35, 20, .45); backdrop-filter: blur(2px); }
.drawer { position: relative; width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; animation: slideup .3s cubic-bezier(.2,.8,.3,1); display: grid; gap: 10px; }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) { .drawer-wrap { place-items: center; } .drawer { border-radius: 12px; max-height: 88vh; padding: 28px 26px 24px; } }
.drawer h3 { font-size: 1.6rem; }
.drawer-ori { text-align: center; margin-top: -6px; }
.drawer-ori svg { width: 110px; height: 110px; }
.drawer input, .drawer select, .drawer textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 1.05rem; }
.drawer input:focus, .drawer select:focus, .drawer textarea:focus { outline: 0; border-color: var(--accent); }
.close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 1.8rem; color: var(--muted); z-index: 2; }
.more { border: 0; background: transparent; font-weight: 800; color: var(--muted); font-size: .9rem; justify-self: center; }
.more-box { display: grid; gap: 8px; }
.drop { border: 2px dashed var(--kraft); border-radius: 12px; padding: 12px; cursor: pointer; background: rgba(255,255,255,.5); transition: background .15s, border-color .15s; }
.drop.over { background: #fff3e6; border-color: var(--accent); }
.drop.has { border-style: solid; background: #fff; }
.drop-inner { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink-2); }
.drop-ico { font-size: 1.8rem; }
.drop img.prev { max-height: 110px; max-width: 45%; border-radius: 6px; box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.err { color: var(--red); font-weight: 800; font-size: .95rem; text-align: center; }

.d-head { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.d-head svg { width: 96px; height: 96px; }
.d-head .co { font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.35rem; line-height: 1.1; }
.d-head .ro { color: var(--ink-2); font-weight: 600; }
.d-head .hand { font-size: 1.1rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-row button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 4px; font-weight: 800; font-size: .85rem; color: var(--ink-2); display: grid; justify-items: center; gap: 2px; }
.stat-row button .e { font-size: 1.5rem; line-height: 1; }
.stat-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.d-actions .btn { flex: 1; padding: 11px 10px; font-size: .95rem; }
.proof-thumb { display: block; }
.proof-thumb img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.proof-thumb .pdf { padding: 16px; text-align: center; font-weight: 800; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.dates { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--ink-2); font-weight: 700; }
.dates input { width: auto; display: inline; padding: 2px 6px; font-size: .9rem; border-radius: 6px; }
.del { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .85rem; justify-self: center; }
.about-list { padding-left: 4px; list-style: none; display: grid; gap: 10px; margin: 0; font-weight: 600; }

/* ============ UNLOCK ============ */
.unlock { position: fixed; inset: 0; z-index: 80; background: rgba(40, 28, 16, .74); display: grid; place-items: center; animation: fadein .3s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.unlock-stage { position: relative; width: 300px; height: 380px; display: grid; place-items: center; perspective: 900px; }
.foldsq { position: absolute; width: 180px; height: 180px; transform-style: preserve-3d; }
.fs { position: absolute; inset: 0; background: linear-gradient(135deg, #f7e9c9, #e6c98f); box-shadow: 0 8px 20px rgba(0,0,0,.25); transform-origin: 50% 50%; }
.foldsq.go .a { animation: foldA 1.6s cubic-bezier(.6,.05,.3,1) forwards; }
.foldsq.go .b { animation: foldB 1.6s cubic-bezier(.6,.05,.3,1) forwards; }
.foldsq.go .c { animation: foldC 1.6s cubic-bezier(.6,.05,.3,1) forwards; }
.foldsq.go .d { animation: foldD 1.6s cubic-bezier(.6,.05,.3,1) forwards; }
@keyframes foldA { 0% { transform: none; } 30% { transform: rotateX(-160deg); } 60% { transform: rotateX(-160deg) rotateY(150deg); } 100% { transform: rotateX(-160deg) rotateY(150deg) scale(.1); opacity: 0; } }
@keyframes foldB { 0% { transform: rotate(45deg) scale(.9); opacity: .9; } 35% { transform: rotate(45deg) rotateY(160deg) scale(.7); } 100% { transform: rotate(90deg) scale(.1); opacity: 0; } }
@keyframes foldC { 0% { transform: rotate(-30deg) scale(.8); opacity: .8; } 45% { transform: rotate(-30deg) rotateX(170deg) scale(.6); } 100% { transform: scale(.05); opacity: 0; } }
@keyframes foldD { 0% { transform: rotate(10deg) scale(.7); opacity: .7; } 100% { transform: rotate(400deg) scale(.05); opacity: 0; } }
.unlock-reveal { position: absolute; opacity: 0; text-align: center; transform: scale(.4) rotate(-20deg); width: 300px; }
.unlock-reveal.show { animation: slap .7s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes slap { 0% { opacity: 0; transform: scale(.3) rotate(-25deg); } 60% { opacity: 1; transform: scale(1.12) rotate(4deg); } 100% { opacity: 1; transform: scale(1) rotate(-2deg); } }
.unlock-reveal svg { width: 210px; height: 210px; filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); }
.unlock-reveal .t1 { font-family: 'Caveat', cursive; font-size: 1.5rem; color: #fbe9c3; }
.unlock-reveal .t2 { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.1; }
.unlock-reveal .btn { margin-top: 16px; }
.confetti { position: absolute; width: 10px; height: 14px; top: 40%; left: 50%; border-radius: 2px; animation: pop 1.4s ease-out forwards; }
@keyframes pop { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(720deg); opacity: 0; } }

/* ============ ALERTS ============ */
.alerts { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(640px, calc(100% - 20px)); display: grid; gap: 8px; }
.alert { background: #fff1ef; border: 2px solid var(--red); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .95rem; animation: pagein .3s; }
.alert.ok { background: #eef8ef; border-color: #3f8f6a; padding: 10px 14px; font-weight: 800; }
.alert b { display: block; }
.alert .tech { font-family: ui-monospace, Menlo, monospace; font-size: .75rem; background: rgba(0,0,0,.06); padding: 6px 8px; border-radius: 6px; margin-top: 8px; word-break: break-all; }
.alert .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.alert .acts button { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .85rem; }
.alert .acts button.x { background: transparent; color: var(--ink-2); }
.alert.ok .acts { display: none; }
