/* Bad Cookie: the fonts, the palette and the page CSS, from sito/index.html */

@font-face { font-family: "Barlow"; src: url("/site/fonts/Barlow-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/site/fonts/Barlow-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("/site/fonts/PermanentMarker-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spicy Rice"; src: url("/site/fonts/SpicyRice-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
:root {
  --p-bg: #17100d; --p-surface: #241a15; --p-ink: #f7edda; --p-muted: #c2b2a1;
  --p-accent: #f4b740; --p-accent-ink: #17100d; --p-action: #f4b740; --p-action-ink: #17100d;
  --p-inv-bg: #f7edda; --p-inv-surface: #e5dbc9; --p-inv-ink: #17100d; --p-inv-muted: #635a51;
  --p-inv-accent: #17100d; --p-inv-accent-ink: #f7edda; --p-inv-action: #17100d; --p-inv-action-ink: #f7edda;
  --font-display: "Spicy Rice", Georgia, serif;
  --font-text: "Barlow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-note: Georgia, "Times New Roman", serif;
  --display-weight: 400;
  --display-tracking: -0.01em;
  --display-tracking-xl: -0.015em;
  --ly-scale: 0.98;
}

/* the logo: the app's icon beside the name */
.nav__logo img { width: 28px; height: 28px; border-radius: 7px; }

/* hero stage: the packet, the cookie and the note, one object at a time, on the page's ground */
.bc-demo { position: absolute; inset: 0; }
.bc-demo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5% 0 4%; pointer-events: none; }
.bc-demo [data-state], .bc-half { visibility: hidden; }
.bc-demo[data-at="packet"] .bc-packet-whole,
.bc-demo:is([data-at="tearing"], [data-at="torn"]) .bc-half,
.bc-demo:is([data-at="torn"], [data-at="whole"]) .bc-cookie[data-state="whole"],
.bc-demo[data-at="cracked"] .bc-cookie[data-state="cracked"],
.bc-demo[data-at="broken"] .bc-cookie[data-state="broken"],
.bc-demo[data-at="open"] :is(.bc-open, .bc-slip) { visibility: visible; }
.bc-demo [data-state] { opacity: 0; }
.hero__stage > img.bc-packet { transition: opacity .25s ease; }
/* the packet's own box, not the whole stage: the picture is the packet */
.hero--product .hero__stage > img.bc-packet { inset: 5% auto 4% 50%; width: auto; height: 91%; aspect-ratio: 720 / 857; padding: 0; translate: -50% 0; }
.hero__stage:has(> .bc-demo:not([data-at="packet"])) > img.bc-packet { opacity: 0; transition: none; }
.bc-half { opacity: 0; transition: transform .9s var(--m-ease-enter), opacity .9s ease; }
.bc-half--l { clip-path: polygon(0 0, 50% 0, 48% 12%, 52% 25%, 48% 38%, 52% 51%, 48% 64%, 52% 77%, 49% 100%, 0 100%); }
.bc-half--r { clip-path: polygon(50% 0, 100% 0, 100% 100%, 49% 100%, 52% 77%, 48% 64%, 52% 51%, 48% 38%, 52% 25%, 48% 12%); }
.bc-cookie { opacity: 0; transform: scale(.7) translateY(6%); transition: opacity .35s ease, transform .7s var(--m-ease-enter); }
.bc-open { transition: transform .8s var(--m-ease-enter), opacity .3s ease; }
.bc-slip {
  position: absolute; left: 50%; top: 50%; width: min(520px, 86%); padding: 28px 32px 18px; text-align: center;
  background: #f7edda; color: #2a1c13; opacity: 0; transform: translate(-50%, -50%) scale(.55, .82);
  transition: opacity .3s ease, transform .55s var(--m-ease-enter);
  clip-path: polygon(0 0, 100% 0, 98.6% 5%, 100% 10%, 98.6% 15%, 100% 20%, 98.6% 25%, 100% 30%, 98.6% 35%, 100% 40%, 98.6% 45%, 100% 50%, 98.6% 55%, 100% 60%, 98.6% 65%, 100% 70%, 98.6% 75%, 100% 80%, 98.6% 85%, 100% 90%, 98.6% 95%, 100% 100%, 0 100%, 1.4% 95%, 0 90%, 1.4% 85%, 0 80%, 1.4% 75%, 0 70%, 1.4% 65%, 0 60%, 1.4% 55%, 0 50%, 1.4% 45%, 0 40%, 1.4% 35%, 0 30%, 1.4% 25%, 0 20%, 1.4% 15%, 0 10%, 1.4% 5%);
}
.bc-slip__text { font: 400 clamp(20px, 1.2vw + 12px, 28px)/1.3 var(--font-note); margin: 0 0 14px; }
.bc-slip__by { font: 500 15px/1.3 var(--font-text); color: #6e5a49; margin: 0; }
/* sul telefono il foglietto si allarga e il testo cala un po': anche il bigliettino più lungo (circa 115 caratteri) sta nell'animazione */
@media (max-width: 639px) { .bc-slip { width: 92%; padding: 20px 20px 14px; } .bc-slip__text { font-size: 18px; margin-bottom: 10px; } }
.bc-hit { position: absolute; inset: 6% 18%; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 32px; }
.bc-hit:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
/* states */
.bc-demo[data-at="packet"] .bc-packet-whole { opacity: 1; }
.bc-demo:is([data-at="torn"]) .bc-half { opacity: 0; }
.bc-demo[data-at="torn"] .bc-half--l { transform: translate(-34%, 18%) rotate(-14deg); }
.bc-demo[data-at="torn"] .bc-half--r { transform: translate(34%, 18%) rotate(14deg); }
.bc-demo[data-at="tearing"] .bc-half { opacity: 1; transition: none; }
.bc-demo[data-at="tearing"] .bc-packet-whole { transition: none; }
.bc-demo:is([data-at="whole"], [data-at="cracked"], [data-at="broken"], [data-at="torn"]) .bc-cookie[data-state="whole"],
.bc-demo[data-at="cracked"] .bc-cookie[data-state="cracked"],
.bc-demo[data-at="broken"] .bc-cookie[data-state="broken"] { opacity: 1; transform: none; }
.bc-demo:is([data-at="cracked"], [data-at="broken"]) .bc-cookie[data-state="whole"] { opacity: 0; transition: none; }
.bc-demo[data-at="broken"] .bc-cookie[data-state="cracked"] { opacity: 0; transition: none; }
.bc-demo[data-at="open"] .bc-open { opacity: 1; }
.bc-demo[data-at="open"] .bc-open--l { transform: translateX(-14%) rotate(-6deg); }
.bc-demo[data-at="open"] .bc-open--r { transform: translateX(14%) rotate(6deg); }
.bc-demo[data-at="open"] .bc-slip { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.bc-demo.is-hit .bc-cookie { animation: bc-knock .22s var(--m-ease-enter); }
@keyframes bc-knock { 0% { transform: scale(1) } 40% { transform: scale(.965) rotate(-1.5deg) } 100% { transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { .bc-demo *, .bc-demo { transition: none !important; animation: none !important; } }

/* the statement's scattered letters fly in inside their own section, never over the one above */
#frase { overflow: clip; }
/* the statement: air between the large line and the words under it */
.mo-la__type + p { margin-top: var(--s-7); }
/* from 640 to 1279 the three steps take two rows: two screens */
@media (min-width: 640px) and (max-width: 1279px) { #come-funziona { --h: 2; } }
/* the statement fills a tablet's and a phone's screen as it fills the desktop's */
@media (max-width: 1023px) { #frase .mo-la__type { font-size: 17vw; } #frase .t-lead { font-size: 22px; } }
@media (max-width: 639px) {
  #frase .mo-la__type { font-size: 22vw; }
}

/* on a phone the split's words and its picture each take a screen of the .g2m section */
@media (max-width: 639px) { :is(#condividi, #settimana, #scrivi) > .wrap > .grid.fill { display: contents; } }

/* a phone of the app, drawn in HTML: an 8px bezel, radius 32 at 280px; --pw sets its width and every size follows
   (its words never under 13px) */
.device {
  --pw: 280px; --u: calc(var(--pw) / 280);
  width: var(--pw); height: calc(570 * var(--u)); flex: none; display: flex; flex-direction: column;
  border-radius: calc(32 * var(--u)); border: calc(8 * var(--u)) solid #0b0806; background: #17100d; overflow: hidden;
  box-shadow: 0 0 0 1px rgb(247 237 218 / .14); color: #f7edda; font-family: var(--font-text);
}
.device__screen { display: contents; }
.app__bar { display: flex; align-items: center; justify-content: space-between; padding: calc(30 * var(--u)) calc(18 * var(--u)) calc(10 * var(--u)); }
.app__name { font: 400 max(13px, calc(19 * var(--u)))/1 var(--font-display); }
.app__dots { display: flex; gap: calc(4 * var(--u)); }
.app__dots i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: #f4b740; }
.app__dots i.is-off { background: none; box-shadow: inset 0 0 0 1.5px #c2b2a1; }
.app__art { flex: none; height: calc(330 * var(--u)); display: grid; place-items: center; padding: calc(4 * var(--u)) calc(22 * var(--u)) calc(10 * var(--u)); }
.app__art img { width: 100%; height: 100%; object-fit: contain; }
.app__hint { display: flex; align-items: center; justify-content: center; gap: calc(6 * var(--u)); margin: auto calc(10 * var(--u)) calc(4 * var(--u)); font: 500 max(13px, calc(14 * var(--u)))/1.25 var(--font-text); text-align: center; }
.app__hint svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); flex: none; color: #f4b740; }
.app__left { text-align: center; font-size: max(13px, calc(13 * var(--u))); color: #c2b2a1; margin: 0 0 calc(10 * var(--u)); }
.app__tabs { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; border-top: 1px solid rgb(247 237 218 / .12); padding: calc(8 * var(--u)) calc(6 * var(--u)) calc(12 * var(--u)); }
.app__tabs svg { width: calc(44 * var(--u)); height: calc(28 * var(--u)); padding: calc(4 * var(--u)) calc(12 * var(--u)); border-radius: 99px; color: #c2b2a1; }
.app__tabs .is-on svg { background: rgb(244 183 64 / .18); color: #f4b740; }
.app__slip { margin: calc(14 * var(--u)) calc(14 * var(--u)) 0; padding: calc(18 * var(--u)) calc(16 * var(--u)) calc(12 * var(--u)); background: #f7edda; color: #2a1c13; text-align: center;
  clip-path: polygon(0 0, 100% 0, 97% 8%, 100% 16%, 97% 24%, 100% 32%, 97% 40%, 100% 48%, 97% 56%, 100% 64%, 97% 72%, 100% 80%, 97% 88%, 100% 96%, 100% 100%, 0 100%, 3% 92%, 0 84%, 3% 76%, 0 68%, 3% 60%, 0 52%, 3% 44%, 0 36%, 3% 28%, 0 20%, 3% 12%, 0 4%); }
.app__slip p { margin: 0; font: 400 max(13px, calc(17 * var(--u)))/1.3 var(--font-note); }
.app__slip small { display: block; margin-top: calc(10 * var(--u)); font: 500 max(13px, calc(13 * var(--u)))/1 var(--font-text); color: #6e5a49; }
.app__acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(2 * var(--u)); margin: calc(16 * var(--u)) calc(10 * var(--u)) 0; text-align: center; font-size: max(13px, calc(13 * var(--u))); font-weight: 500; }
.app__acts span { display: grid; justify-items: center; gap: calc(4 * var(--u)); }
.app__acts i { display: grid; place-items: center; width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%; background: #33271f; box-shadow: inset 0 0 0 1px rgb(247 237 218 / .12); }
.app__acts i.is-on { background: #f4b740; color: #17100d; }
.app__acts svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.app__next { margin: auto calc(14 * var(--u)) calc(12 * var(--u)); height: calc(44 * var(--u)); border-radius: 99px; background: #f4b740; color: #17100d; display: grid; place-items: center; font: 500 max(13px, calc(15 * var(--u)))/1 var(--font-text); }

/* the three steps: each the whole phone beside its words */
.steps { align-items: start; }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.step .device { --pw: 220px; }
.step__text { display: grid; gap: var(--s-2); align-content: start; }
.step__text h3 { margin-top: var(--s-2); font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
@media (min-width: 1024px) and (max-width: 1279px) { .step { grid-template-columns: minmax(0, 1fr); } .step .device { --pw: 240px; } .step__text { order: -1; } }
@media (min-width: 640px) and (max-width: 1023px) { .steps > .step { grid-column: 1 / -1; } }
@media (max-width: 639px) { .step { gap: var(--s-4); } .step .device { --pw: 172px; } }

/* the official Google Play badge, the page's main action, sized by --bh; it steps on hover and presses */
.play-badge { display: inline-block; flex: none; line-height: 0; border-radius: calc(var(--bh, 48px) * .16); }
.play-badge img { height: var(--bh, 48px); width: auto; }
.nav__actions .play-badge { --bh: 44px; }
.hero__head .play-badge { --bh: 56px; }
.play-badge--xl { --bh: 88px; }
.actionbar .play-badge { --bh: 48px; margin-inline: auto; }
.play-badge:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .play-badge { transition: transform 150ms var(--ease); }
  .play-badge:hover { transform: translateY(-1px); }
  .play-badge:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }
}
@media (max-width: 639px) { .play-badge--xl { --bh: 64px; } }

.app__title { font: 400 21px/1.1 var(--font-display); padding: 30px 18px 6px; }
.app__card { margin: 8px 14px 0; padding: 14px; border-radius: 16px; background: #241a15; box-shadow: inset 0 0 0 1px rgb(247 237 218 / .12); }
.app__card b { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.app__card p { margin: 0; font-size: 13px; line-height: 1.35; color: #c2b2a1; }
.app__fmt { display: flex; gap: 6px; margin: 12px 14px 0; }
.app__fmt span { width: 34px; height: 30px; border-radius: 10px; background: #241a15; display: grid; place-items: center; font-weight: 500; font-size: 14px; }
.app__field { margin: 8px 14px 0; padding: 12px; min-height: 92px; border-radius: 16px; box-shadow: inset 0 0 0 2px #f4b740; font: 400 16px/1.3 var(--font-note); }
.app__count { text-align: right; font-size: 13px; color: #c2b2a1; margin: 4px 16px 0; }

/* the image the app shares: the note on its paper, the cookie above it, the name under it */
.share-card { width: 300px; aspect-ratio: 4 / 5; background: #17100d; border-radius: 16px; padding: 20px 18px;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; box-shadow: 0 0 0 1px rgb(247 237 218 / .14); }
.share-card img { width: 86px; }
.share-card .app__slip { margin: 0; width: 100%; }
.share-card .app__slip p { font-size: 19px; }
.share-card__name { font: 400 22px/1 var(--font-display); color: #f4b740; }


/* the eleven languages in two columns, so the footer holds one screen */
.footer__col .footer__langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5); }

/* the plans show the cookies each one opens */
.card > .panel.plan__art { aspect-ratio: auto; height: 200px; display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: var(--s-4); }
.plan__art img { height: 100%; width: auto; max-width: 45%; object-fit: contain; }
.plan__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.plan__lines li { padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }

/* Sezioni alte quanto il loro contenuto, su richiesta del cliente (2026-11-23): la regola della skill
   «una sezione per schermata» lasciava schermate quasi vuote, soprattutto sul telefono. */
main > :is(section, .section):not(.hero) { min-height: 0 !important; height: auto !important; padding-block: clamp(56px, 5.5vw, 88px); }
main > :is(section, .section):not(.hero) > .wrap { display: block !important; height: auto !important; min-height: 0 !important; }
main > :is(section, .section):not(.hero) .grid.fill { height: auto !important; min-height: 0 !important; flex: none !important; align-items: center; }
footer.closing { min-height: 0 !important; height: auto !important; padding-top: clamp(56px, 5.5vw, 88px) !important; }
#come-funziona .section-head { margin-bottom: var(--s-7); }
@media (max-width: 639px) {
  main > :is(section, .section):not(.hero), footer.closing { display: block !important; min-height: 0 !important; }
  main > :is(section, .section):not(.hero) { padding-block: 56px; }
  main > :is(section, .section).g2m > .wrap { display: block !important; }
  :is(#condividi, #settimana, #scrivi) > .wrap > .grid.fill { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; column-gap: 0 !important; row-gap: var(--s-7) !important; }
  :is(#condividi, #settimana, #scrivi) > .wrap > .grid.fill > * { grid-column: 1 / -1 !important; }
}
:is(#condividi, #scrivi) .stack-5 { display: grid; gap: var(--s-4); align-content: center; }
:is(#condividi, #scrivi) .stack-5 > h2 { margin-bottom: 0; }

/* Condividi e Scrivi: le cose vere dell'app su un fondo caldo, alto quanto loro */
.showcase { --u: 1px; position: relative; align-self: center; display: grid; justify-items: center; gap: 22px;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 40px); border-radius: 28px; color: #f7edda;
  background: radial-gradient(110% 80% at 80% 0%, #c08d4f 0%, #7a5532 34%, #3a281c 68%, #241a15 100%);
  box-shadow: inset 0 0 0 1px rgb(247 237 218 / .12); }
.showcase--write { background: radial-gradient(110% 80% at 15% 100%, #c08d4f 0%, #7a5532 34%, #3a281c 68%, #241a15 100%); }
.showcase .share-card { width: min(100%, 280px); aspect-ratio: auto; gap: 16px; padding: 22px 20px 20px; box-shadow: 0 24px 48px -24px rgb(0 0 0 / .7), 0 0 0 1px rgb(247 237 218 / .14); }
.showcase .share-card img { width: 92px; height: auto; }
.showcase .share-card .app__slip { padding: 16px 18px 12px; }
.showcase .share-card .app__slip p { font-size: 18px; }
.dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: min(100%, 340px); padding: 14px 10px 12px;
  border-radius: 22px; background: #17100d; box-shadow: 0 0 0 1px rgb(247 237 218 / .12); text-align: center; font: 500 13px/1.2 var(--font-text); }
.dock span { display: grid; justify-items: center; gap: 6px; }
.dock i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #33271f; box-shadow: inset 0 0 0 1px rgb(247 237 218 / .12); }
.dock i.is-on { background: #f4b740; color: #17100d; }
.dock svg { width: 18px; height: 18px; }

.composer { width: min(100%, 320px); padding: 18px 16px 16px; border-radius: 22px; background: #17100d; box-shadow: 0 24px 48px -24px rgb(0 0 0 / .7), 0 0 0 1px rgb(247 237 218 / .14); }
.composer__title { margin: 0 0 12px; font: 400 21px/1.1 var(--font-display); }
.composer__tools { display: flex; align-items: center; gap: 6px; }
.composer__tools span { width: 34px; height: 30px; border-radius: 10px; background: #241a15; display: grid; place-items: center; font-weight: 500; font-size: 14px; }
.composer__tools b { margin-left: auto; font: 500 14px/1 var(--font-text); color: #c2b2a1; font-variant-numeric: tabular-nums; }
.composer__field { margin-top: 10px; padding: 12px; min-height: 76px; border-radius: 16px; box-shadow: inset 0 0 0 2px #f4b740; font: 400 17px/1.3 var(--font-note); }
.showcase__arrow { width: 40px; height: 40px; color: #f4b740; }
/* le due metà aperte una sull'altra, come nell'apertura della pagina, e il bigliettino che esce sotto */
.opened { width: min(100%, 300px); display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
/* ogni immagine ha il biscotto intero con una sola metà disegnata: si mostra solo quella metà */
.opened img { width: 100%; height: auto; aspect-ratio: 360 / 615; object-fit: cover; }
.opened__l { object-position: 0% 50%; }
.opened__r { object-position: 100% 50%; }
.opened__slip { grid-column: 1 / -1; width: 100%; margin: -8px 0 0; padding: 16px 18px 12px; box-shadow: 0 18px 36px -20px rgb(0 0 0 / .8); }
.opened__slip p { font-size: 18px; }
.opened__slip small { color: #6e5a49; }

/* Ritocchi del 2026-11-23 sera, su richiesta del cliente */
/* 1. i telefoni dei passaggi alti quanto serve: niente vuoti scuri tra il disegno e la scritta */
.step .device { height: calc(450 * var(--u)); }
.step .app__art { height: calc(270 * var(--u)); }
/* 2. tablet: i tre passaggi affiancati, con il testo sopra il telefono */
@media (min-width: 640px) and (max-width: 1023px) {
  .steps > .step { grid-column: span 4; grid-template-columns: minmax(0, 1fr); }
  .step__text { order: -1; }
  .step .device { --pw: 180px; }
}
/* 3. telefono: «Come funziona» accanto al badge di Google Play, non largo quanto lo schermo */
@media (max-width: 639px) {
  .hero__head .btn-row { flex-direction: row; align-items: center; width: auto; }
  .hero__head .btn-row > .btn { width: auto; }
}
/* 4. computer: la frase grande a sinistra e il testo accanto, in basso: niente metà vuota */
@media (min-width: 1024px) {
  main > #frase > .wrap { display: grid !important; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: var(--s-8); align-items: end; }
  #frase .mo-la__type { font-size: clamp(64px, 9vw, 150px); }
  #frase .mo-la__type + p { margin: 0 0 .6em; max-width: 34ch; }
}
/* the name is the brand, as in the app: BAD in marker yellow, COOKIE in Spicy Rice cream, in every language */
.nav__logo, .app__name, .share-card__name { font-family: "Spicy Rice", Georgia, serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0; color: #f7edda; }
.wm__bad { font-family: "Permanent Marker", Georgia, serif; color: #f4b740; }

/* 2026-11-30, l'app di oggi: dietro pacchetto e biscotto l'alone rosso con i raggi, come nella Home dell'app (fermo) */
.app__art { position: relative; isolation: isolate; }
.app__art::before, .app__art::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.app__art::before { background: radial-gradient(closest-side, rgb(236 92 52 / .64), rgb(168 36 22 / .38) 55%, rgb(168 36 22 / 0)); }
.app__art::after { background: repeating-conic-gradient(rgb(255 214 150 / .17) 0deg 10deg, rgb(255 214 150 / 0) 10deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent); mask-image: radial-gradient(closest-side, #000 20%, transparent); }

/* il biscotto della settimana: il biscotto reale con corona e scettro; tre colpi, e al terzo volano via */
#settimana .stack-5 { display: grid; gap: var(--s-4); align-content: center; }
#settimana .stack-5 > h2 { margin-bottom: 0; }
.royal { position: relative; align-self: center; border-radius: 28px; overflow: clip; isolation: isolate;
  aspect-ratio: 6 / 5; background: radial-gradient(90% 75% at 50% 42%, #b3121d 0%, #6e1410 42%, #2b1410 78%, #241a15 100%);
  box-shadow: inset 0 0 0 1px rgb(247 237 218 / .12); }
.royal::before { content: ""; position: absolute; inset: -10%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 46%, rgb(255 214 150 / .14) 0deg 10deg, rgb(255 214 150 / 0) 10deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 25%, transparent); mask-image: radial-gradient(closest-side at 50% 46%, #000 25%, transparent); }
.royal__art { position: absolute; left: 50%; top: 45%; width: 88%; aspect-ratio: 720 / 615; translate: -50% -50%; }
.royal__art > img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.royal__badge { position: absolute; top: 18px; left: 50%; translate: -50% 0; margin: 0; padding: 7px 14px; border-radius: 99px; white-space: nowrap;
  background: rgb(23 16 13 / .72); color: #f4b740; font: 500 13px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; }
.royal__hint { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; margin: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 500 15px/1.2 var(--font-text); color: #f7edda; transition: opacity .3s ease; }
.royal__hint svg { width: 18px; height: 18px; color: #f4b740; }
.royal[data-at="open"] .royal__hint { opacity: 0; }
/* un fotogramma alla volta; le due metà aperte e il bigliettino solo alla fine */
.rc { opacity: 0; transition: opacity .2s ease; }
.royal[data-at="whole"] .rc--whole, .royal[data-at="cracked"] .rc--cracked, .royal[data-at="broken"] .rc--broken { opacity: 1; }
.rc--open { transition: transform .8s var(--m-ease-enter), opacity .3s ease; }
.royal[data-at="open"] .rc--open { opacity: 1; }
.royal[data-at="open"] .rc--open-l { transform: translateX(-12%) rotate(-6deg); }
.royal[data-at="open"] .rc--open-r { transform: translateX(12%) rotate(6deg); }
/* corona e scettro: dondolano ai primi due colpi, al terzo volano via a velocità costante (come nell'app: 1,45 s) */
.rc-crown { transform-origin: 45% 29.5%; }
.rc-scepter { transform-origin: 73% 79.6%; }
.royal.is-hit :is(.rc-crown, .rc-scepter) { animation: rc-sway .9s var(--m-ease-enter); }
@keyframes rc-sway { 0% { rotate: 0deg } 25% { rotate: -9deg } 55% { rotate: 6deg } 80% { rotate: -2deg } 100% { rotate: 0deg } }
.royal.is-hit .rc:is(.rc--whole, .rc--cracked, .rc--broken) { animation: bc-knock .22s var(--m-ease-enter); }
.royal[data-at="open"] :is(.rc-crown, .rc-scepter) { opacity: 0; transition: transform 1.45s linear, opacity .29s linear 1.16s; }
.royal[data-at="open"] .rc-crown { transform: translate(-12%, -190%) rotate(-450deg); }
.royal[data-at="open"] .rc-scepter { transform: translate(50%, -140%) rotate(540deg); }
.royal .bc-slip { top: 52%; width: min(440px, 84%); }
.royal .bc-slip__label { margin: 0 0 10px; font: 500 12px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: #a82416; }
.royal[data-at="open"] .bc-slip { opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: 1.2s; }
.royal .bc-hit { inset: 0; border-radius: 28px; }
@media (max-width: 639px) {
  .royal { aspect-ratio: 4 / 5; }
  .royal__art { width: 112%; top: 46%; }
  .royal .bc-slip { width: 90%; padding: 20px 18px 14px; }
  .royal .bc-slip__text { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .royal *, .royal { transition: none !important; animation: none !important; } }

/* la Classifica sotto il bigliettino firmato: il primo posto è tuo, gli altri due ancora liberi */
.podium { width: min(100%, 320px); padding: 16px 16px 0; border-radius: 22px; background: #17100d;
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / .7), 0 0 0 1px rgb(247 237 218 / .14); }
.podium__title { margin: 0 0 12px; font: 400 21px/1.1 var(--font-display); }
.podium__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; }
.podium__spot { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.podium__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/1.2 var(--font-text); color: #c2b2a1; }
.podium__spot--1 .podium__name { color: #f7edda; }
.podium__step { width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; font: 400 22px/1 var(--font-display); color: #17100d; }
.podium__spot--1 .podium__step { height: 70px; background: #f4b740; }
.podium__spot--2 .podium__step { height: 50px; background: #c9c1b6; }
.podium__spot--3 .podium__step { height: 38px; background: #c8875a; }

/* other scripts: the app's own choice, the system faces of each script (Spicy Rice, Permanent Marker and Barlow are Latin only) */
html[lang="ru"] { --font-display: Georgia, "Times New Roman", serif; --font-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* the name is the brand: BAD in Permanent Marker and COOKIE in Spicy Rice in every language, as in the app */
html:is([lang="ru"], [lang="zh"], [lang="ja"], [lang="ko"], [lang="hi"]) :is(.nav__logo, .app__name, .share-card__name) { font-family: "Spicy Rice", Georgia, serif; font-weight: 400; }
html:is([lang="zh"], [lang="ja"], [lang="ko"], [lang="hi"]) {
  --font-display: system-ui, -apple-system, "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", "Noto Sans", sans-serif;
  --font-text: system-ui, -apple-system, "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", "Noto Sans", sans-serif;
  --font-note: "Hiragino Mincho ProN", "Songti SC", "AppleMyungjo", "Noto Serif", serif; --display-weight: 700;
}
html[lang="hi"] { --font-note: "Kohinoor Devanagari", "Noto Serif Devanagari", serif; }
/* Japanese titles break between phrases, never inside a word (王様, not 王 / 様) */
html[lang="ja"] :is(h1, h2, h3) { word-break: auto-phrase; }
