@font-face { font-family: "Fredoka"; src: url("/assets/fonts/Fredoka-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/Fredoka-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* FlyDie's garden: leaf green, sun yellow, swatter red, cream paper, dark wood */
:root {
  --bg: #fffaf0; --surface: #ffffff; --surface-2: #fff1cf; --fg: #2b2116; --muted: #6e5d49; --line: #ecdcb8;
  --leaf: #23863a; --leaf-dark: #145a24; --sun: #ffc928; --sun-deep: #f59a12; --swatter: #e2412c; --wood: #5a3416;
  --on-leaf: #ffffff; --on-sun: #3b2508; --link: #145a24; --focus: #1e63d6;
  --shadow: 0 10px 30px rgba(74, 44, 12, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141a12; --surface: #1d251a; --surface-2: #26301f; --fg: #f4efe2; --muted: #b9ae98; --line: #34402c;
  --leaf: #4cc260; --leaf-dark: #2c8a3d; --sun: #ffcf3d; --sun-deep: #f7a62a; --swatter: #ff6a55; --wood: #c9925c;
  --on-leaf: #0d1a0c; --on-sun: #2a1904; --link: #6fd683; --focus: #7fb0ff; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #141a12; --surface: #1d251a; --surface-2: #26301f; --fg: #f4efe2; --muted: #b9ae98; --line: #34402c;
  --leaf: #4cc260; --leaf-dark: #2c8a3d; --sun: #ffcf3d; --sun-deep: #f7a62a; --swatter: #ff6a55; --wood: #c9925c;
  --on-leaf: #0d1a0c; --on-sun: #2a1904; --link: #6fd683; --focus: #7fb0ff; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, .brand, .btn { font-family: "Fredoka", system-ui, sans-serif; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.prose { max-width: 70ch; }
.muted { color: var(--muted); }
.eyebrow { font: 700 .8rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--sun-deep); margin-bottom: .8em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.35rem; color: var(--fg); text-decoration: none; }
.brand img { width: auto; height: 40px; }
.nav { margin-left: auto; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--sun-deep); }
/* a phone: the links on one row under the logo, swiped sideways if they don't all fit */
@media (max-width: 640px) { .site-header .wrap { padding-block: 6px 0; gap: 2px; } .nav { margin-left: 0; width: 100%; gap: 11px; font-size: .86rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .nav a { flex: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn-sun { background: linear-gradient(#ffd94a, var(--sun-deep)); color: var(--on-sun); }
.btn-leaf { background: var(--leaf); color: var(--on-leaf); }
.btn-ghost { background: var(--surface); color: var(--fg); border: 2px solid var(--line); box-shadow: none; }
a.btn-ghost { color: var(--fg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 18px; border-radius: 12px;
  background: #111; color: #fff; text-decoration: none; line-height: 1.15; font-size: .78rem; border: 1px solid #333; }
.store b { font: 700 1.05rem/1.1 "Fredoka", system-ui, sans-serif; }
.store[aria-disabled="true"] { opacity: .85; cursor: default; }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff; background: #1d3b17 url("/assets/img/bg-garden.webp") center 35% / cover;
  background-image: image-set(url("/assets/img/bg-garden.avif") type("image/avif"), url("/assets/img/bg-garden.webp") type("image/webp")); }
@media (max-width: 820px) { .hero { background-image: url("/assets/img/bg-garden-828.webp");
  background-image: image-set(url("/assets/img/bg-garden-828.avif") type("image/avif"), url("/assets/img/bg-garden-828.webp") type("image/webp")); } }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,30,8,.15), rgba(10,30,8,.72)); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-block: 56px 64px; }
.hero h1 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hero p { font-size: 1.15rem; max-width: 46ch; color: #fff8e6; }
.hero .logo { width: min(520px, 100%); filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); margin-bottom: 8px; }
.hero picture { justify-self: center; width: min(300px, 80%); }
.hero .phone { width: 100%; border-radius: 34px; border: 8px solid #111; box-shadow: 0 24px 50px rgba(0,0,0,.45); transform: rotate(3deg); }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 36px 44px; } .hero picture { width: min(240px, 70%); } .hero .phone { transform: none; } }

/* sections */
.section { padding-block: 64px; }
.section-alt { background: var(--surface-2); }
@media (max-width: 640px) { .section[id] { scroll-margin-top: 56px; } }   /* a jump link lands below the two-row header */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card img.icon { width: 72px; height: 72px; margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.game-card { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }
@media (max-width: 640px) { .game-card { grid-template-columns: 1fr; } }
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.shots img { width: 230px; flex: none; border-radius: 22px; border: 6px solid #111; scroll-snap-align: start; box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.facts dt { font-weight: 700; } .facts dd { margin: 0; color: var(--muted); }
.page-head { padding-block: 48px 8px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }

/* FAQ and legal */
details { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--surface); margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 8px; }
.legal h2 { font-size: 1.4rem; margin-top: 1.6em; } .legal h3 { margin-top: 1.2em; }
.legal ul { padding-left: 1.2em; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* forms */
form.feedback { display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; }
.field .hint { font-size: .9rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 48px; }
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 30%, transparent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; } .check input { width: 22px; min-height: 22px; margin-top: 3px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.status.ok { background: color-mix(in srgb, var(--leaf) 16%, var(--surface)); border: 1px solid var(--leaf); }
.status.err { background: color-mix(in srgb, var(--swatter) 14%, var(--surface)); border: 1px solid var(--swatter); }

/* the beta sign-up: two phone cards to pick from, the reasons beside the form */
.platforms { border: 0; padding: 0; margin: 0; grid-template-columns: 1fr 1fr; gap: 12px; }
.platforms legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.platform { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; min-width: 0; }
.platform input { width: 22px; min-height: 22px; margin: 0; flex: none; accent-color: var(--leaf); }
.platform span { display: grid; gap: 2px; min-width: 0; }
.platform small { color: var(--muted); font-weight: 400; }
.platform:has(input:checked) { border-color: var(--leaf); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 30%, transparent); }
.beta { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 56px; }
.beta-perks { grid-template-columns: 1fr; }
.platform-hint { background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: .95rem; }
.platform-hint p { margin: 0 0 .5em; }
.platform-hint ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
@media (max-width: 900px) { .beta { grid-template-columns: 1fr; } .beta-perks { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

/* footer */
.site-footer li { overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 36px 28px; margin-top: 32px; font-size: .95rem; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.site-footer .cols > :first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .site-footer .cols > :first-child { grid-column: auto; } }
.site-footer h3 { font-size: 1rem; margin-bottom: .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--fg); text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.site-footer .small { margin-top: 24px; color: var(--muted); font-size: .85rem; }

/* Collection: player cards and item cards. A card is its frame (a PNG with a see-through window) over what shows in the
   window: the player's photo, or the item in 3D. --l --t --r --b are the window's edges as fractions of the frame,
   measured from the art; the plate (the name) sits at --pt to --pb. */
.notebook { background: #14301b url("/assets/img/collection/cover-b.webp") center / cover; color: #f6ecd0; border-radius: 28px;
  padding: clamp(22px, 5vw, 48px); box-shadow: 0 20px 50px rgba(10, 30, 12, .35); position: relative; overflow: hidden; }
.notebook h1, .notebook h2 { color: #ffe9a8; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.notebook p { color: #efe3c2; max-width: 56ch; }
.notebook .eyebrow { color: #e9c15a; }
.cards { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(min(140px, 42vw), 1fr)); }
/* each card spans two rows of the grid (subgrid): the frames line up along their bottoms, so the name plates share a line,
   and the captions all start on the line below, however many lines a caption wraps to */
.ccard { position: relative; margin: 0; min-width: 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.ccard > .frame { align-self: end; }
.ccard > figcaption { align-self: start; }
.ccard .frame { position: relative; width: 100%; aspect-ratio: var(--ar); }
.ccard .frame > img.border { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.ccard .window { position: absolute; left: calc(var(--l) * 100%); top: calc(var(--t) * 100%); right: calc((1 - var(--r)) * 100%);
  bottom: calc((1 - var(--b)) * 100%); z-index: 1; overflow: hidden; display: grid; place-items: center; }
.ccard .window > img { width: 100%; height: 100%; object-fit: cover; }
.ccard .window.art > img { object-fit: contain; padding: 8%; }
.ccard .plate { position: absolute; left: 14%; right: 14%; top: calc(var(--pt) * 100%); height: calc((var(--pb) - var(--pt)) * 100%); z-index: 3;
  display: grid; place-items: center; text-align: center; font: 700 clamp(.85rem, 2.4vw, 1.05rem)/1.1 "Fredoka", system-ui, sans-serif; color: #3a2408; }
.ccard figcaption { margin-top: 8px; text-align: center; font-size: .92rem; color: var(--muted); }
.ccard figcaption .rar { display: table; margin: 0 auto 4px; }
.ccard figcaption b { display: block; color: var(--fg); font: 700 1.05rem/1.2 "Fredoka", system-ui, sans-serif; }
.rar { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 700 .72rem/1.6 "Fredoka", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.rar.common { background: #7c8a93; } .rar.rare { background: #2f7de1; } .rar.epic { background: #8b3fd9; }
.rar.legendary { background: linear-gradient(#f6c344, #d98b0b); color: #3a2408; } .rar.black { background: #16121c; border: 1px solid #b48cff; }

/* the item in 3D (item3d.js): the icon until the model has loaded */
.item3d { position: relative; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.item3d:active { cursor: grabbing; }
.item3d > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.item3d > img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; transition: opacity .3s; }
.item3d.is-3d > img { opacity: 0; }
/* coins and gems: pictures only (in the game only swatters and power-ups turn) */
.currency { display: flex; gap: 18px; flex-wrap: wrap; }
.currency img { width: 160px; height: 160px; padding: 14px; object-fit: contain; border-radius: 20px; background: radial-gradient(circle at 50% 45%, #fff6d6, #f2dfae); border: 1px solid var(--line); }
.trophies { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.trophy { text-align: center; padding: 16px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.trophy img { width: 96px; height: 120px; object-fit: contain; margin: 0 auto 8px; }
.trophy b { display: block; font: 700 1.05rem/1.2 "Fredoka", system-ui, sans-serif; }
.trophy small { color: var(--muted); display: block; margin-top: 4px; }

/* cookie banner (assets/consent.js) */
.cookie-banner { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); color: var(--fg); border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.cookie-banner p { margin: 0; max-width: 62ch; }
.cookie-banner[hidden] { display: none; }

/* invite page (/flydie/add/<code>): the friend's code with Copy */
.invite-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: fit-content; max-width: 100%; margin: 4px 0 18px;
  padding: 12px 16px; border-radius: 16px; background: rgba(255,248,230,.96); color: #472908; }
.invite-code[hidden] { display: none; }
.invite-code span { width: 100%; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6a3c; }
.invite-code b { font: 700 2rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: .04em; }

/* ---- motion (motion.js; none for reduced motion) ---- */
/* a game fly: body and wings are the game's sprites, the wings flap about their roots */
.gfly { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; }
.gfly img { position: absolute; inset: 0; width: 100%; height: 100%; }
.gfly .w { opacity: .9; animation: flap .07s linear infinite alternate; }
.gfly .w.l { transform-origin: 43% 40%; } .gfly .w.r { transform-origin: 57% 40%; animation-name: flap-r; }
.gfly.rest .w { animation: none; }
@keyframes flap { from { transform: rotate(-4deg); } to { transform: rotate(-38deg) scaleY(.92); } }
@keyframes flap-r { from { transform: rotate(4deg); } to { transform: rotate(38deg) scaleY(.92); } }
.fly-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.fly-layer .gfly { pointer-events: auto; cursor: crosshair; width: 54px; height: 54px; margin: -27px 0 0 -27px; filter: drop-shadow(0 8px 4px rgba(0,0,0,.35)); }
.fly-layer .gfly.splat > img { display: none; }
.fly-layer .gfly.splat { background: url("/assets/img/flies/squish.webp") center / 100% no-repeat; animation: splat 1.6s ease-out forwards; filter: none; }
@keyframes splat { 0% { scale: .6; } 12% { scale: 1.25; } 25% { scale: 1; opacity: 1; } 100% { opacity: 0; } }
.hero .wrap { z-index: 2; pointer-events: none; } .hero .wrap > * { pointer-events: auto; }

/* sections slide in */
.reveal { opacity: 0; translate: 0 22px; transition: opacity .5s ease var(--d, 0ms), translate .6s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.reveal.in { opacity: 1; translate: 0 0; }

/* the three modes, each with its own live meter as the round's HUD shows it */
.modes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.mode { position: relative; overflow: hidden; }
.mode img.icon { transition: transform .3s; } .mode:hover img.icon { transform: rotate(-8deg) scale(1.08); }
.mode .tag { font: 700 .8rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: .08em; color: var(--sun-deep); text-transform: uppercase; }
.meter { margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font: 700 .78rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: .06em; color: var(--muted); }
.meter .bar { height: 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 99px; transform-origin: left; }
.meter.infest .bar i { background: linear-gradient(90deg, #8fd14f, #f2b632, #e2412c); animation: infest 6s ease-in-out infinite; }
@keyframes infest { 0% { transform: scaleX(.12); } 70% { transform: scaleX(.92); } 76% { transform: scaleX(.3); } 100% { transform: scaleX(.12); } }
.meter.food .bar i { background: linear-gradient(90deg, #e2412c, #f2b632 40%, #4cc260); animation: food 8s linear infinite; }
@keyframes food { from { transform: scaleX(1); } to { transform: scaleX(.08); } }
.meter .clock { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--fg);
  background: radial-gradient(var(--surface) 58%, transparent 60%), conic-gradient(var(--sun-deep) var(--clock), var(--surface-2) 0); }
.meter.timed { grid-template-columns: auto 1fr; }
@property --clock { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
.meter.timed .clock { animation: clock 6s linear infinite; }
@keyframes clock { from { --clock: 100%; } to { --clock: 0%; } }

/* the flies of a round, bobbing */
.bugs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.bug { text-align: center; }
.bug img { width: 104px; height: 104px; object-fit: contain; margin: 0 auto 6px; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 10px 6px rgba(0,0,0,.2)); }
.bug:nth-child(2n) img { animation-delay: -1.3s; } .bug:nth-child(3n) img { animation-duration: 3.2s; }
@keyframes bob { 50% { translate: 0 -8px; rotate: 4deg; } }
.bug b { display: block; font: 700 1.05rem/1.2 "Fredoka", system-ui, sans-serif; }
.bug small { color: var(--muted); }

/* items: a shelf of icons; legendaries catch the light */
.shelf { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.shelf figure { margin: 0; text-align: center; padding: 10px 6px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.shelf img { width: 84px; height: 84px; margin: 0 auto 4px; transition: transform .25s; }
.shelf .item3d { width: 96px; height: 96px; margin: 0 auto 4px; }
.shelf .item3d > img { inset: 4%; width: 92%; height: 92%; margin: 0; }
.card .icon3d { width: 84px; height: 84px; margin-bottom: 10px; }
.shelf figcaption { font: 700 .9rem/1.2 "Fredoka", system-ui, sans-serif; }
.shelf .rar { margin-top: 4px; }
.shine { position: relative; overflow: hidden; }
.ccard .window.shine { position: absolute; }
.shine::after { content: ""; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.55) 50%, transparent 58%); translate: -60% 0; animation: shine 3.6s ease-in-out infinite; pointer-events: none; z-index: 4; }
@keyframes shine { 0%, 55% { translate: -60% 0; } 100% { translate: 60% 0; } }

/* arenas, scrolled sideways */
.arenas { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 18px; scroll-snap-type: x mandatory; }
.arena { flex: none; width: 190px; margin: 0; scroll-snap-align: start; }
.arena img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; border-radius: 18px; border: 4px solid var(--surface); box-shadow: var(--shadow); transition: transform .35s; }
.arena:hover img { transform: translateY(-6px) rotate(-1.5deg); }
.arena figcaption { margin-top: 8px; } .arena b { display: block; font: 700 1rem/1.2 "Fredoka", system-ui, sans-serif; }
.arena small { color: var(--muted); }

/* the Golden Queen */
.queen { width: 180px; justify-self: center; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 14px 10px rgba(0,0,0,.25)); }

/* sent: the form folds into an envelope, a fly carries it off, a tick lands (forms.js) */
form.feedback { position: relative; }
form.is-sent > :not(.sent) { animation: fold .45s ease-in forwards; }
@keyframes fold { to { opacity: 0; transform: scale(.94); visibility: hidden; } }
.sent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; min-height: 320px; }
.parcel { position: absolute; left: 50%; top: 42%; width: 150px; margin-left: -75px; animation: away 1s cubic-bezier(.55,0,.75,.4) 1.45s forwards; }
.env { position: relative; z-index: 1; width: 150px; display: block; animation: pop .4s cubic-bezier(.3,1.6,.5,1) .35s both; overflow: visible; }
.env-back, .env-front { fill: var(--sun); stroke: var(--wood); stroke-width: 3; } .env-front { fill: #ffd94a; }
.letter { fill: #fff; stroke: var(--line); stroke-width: 2; animation: tuck .35s ease-in .75s forwards; }
.letter-line { stroke: var(--muted); stroke-width: 4; stroke-linecap: round; animation: tuck .35s ease-in .75s forwards; }
.flap { fill: #ffcf3d; stroke: var(--wood); stroke-width: 3; transform-origin: 60px 4px; transform: scaleY(-1); animation: shut .3s ease-in 1s forwards; }
@keyframes pop { from { transform: scale(0) rotate(-10deg); } }
@keyframes tuck { to { transform: translateY(12px); } }
@keyframes shut { to { transform: scaleY(1); } }
.parcel .carrier { z-index: 2; left: 50%; top: -30px; width: 72px; height: 72px; margin: 0 0 0 -36px; transform: rotate(30deg); animation: swoop .4s ease-out 1.05s both; }
@keyframes swoop { from { transform: translate(-240px, -120px) rotate(60deg); opacity: 0; } 30% { opacity: 1; } }
@keyframes away { 15% { transform: translate(-10px, 14px) rotate(-6deg); } to { transform: translate(min(60vw, 520px), -420px) rotate(18deg) scale(.5); opacity: 0; } }
.tick { width: 96px; height: 96px; animation: pop .45s cubic-bezier(.3,1.6,.5,1) 2.1s both; }
.tick circle { fill: var(--leaf); }
.tick path { fill: none; stroke: var(--on-leaf); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .35s ease-out 2.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent-title { margin: 0; font: 700 2rem/1 "Fredoka", system-ui, sans-serif; color: var(--leaf); animation: rise .4s ease-out 2.35s both; }
.sent-msg { margin: 0; max-width: 40ch; font-weight: 600; animation: rise .4s ease-out 2.45s both; }
.sent-again { animation: rise .4s ease-out 2.6s both; }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }

.still .meter .bar i, .still .meter .clock, .still .bug img, .still .shine::after, .still .queen, .still .gfly .w { animation: none; }
