/* Les Douceurs. An anime sticker world on a near-black canvas; paper for the livret, the convocation and tickets.
   Portrait, one thumb, iPhone 12 (390 x 844). Fonts are the phone's own: nothing is fetched from anywhere. */
:root {
  --bg: #0b0b0d; --panel: #17171d; --line: #2a2a33; --ink: #f4ebdd; --dim: #a39d93;
  --paper: #f4ebdd; --paper-ink: #2a2433; --paper-line: #d9cbb4;
  --blue: #1f4bff; --lime: #c8f31d; --olive: #5d6b1e; --brown: #5a3418; --orange: #ff8a1f;
  --red: #e0263c; --violet: #7b2ff7; --pink: #ff2d95;
  --party: linear-gradient(135deg, #ff1f8e, #ff7ac3);
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  --typed: "American Typewriter", "Courier New", ui-monospace, monospace;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--ui); overscroll-behavior-y: none; }
body { min-height: 100vh; min-height: 100dvh; -webkit-user-select: none; user-select: none; }
body.has-overlay { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; } ul { list-style: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.center { text-align: center; } .sub { color: var(--dim); font-size: 13px; } .big { font-size: 22px; font-weight: 700; }
.typed { font-family: var(--typed); letter-spacing: -.01em; } .typed.small { font-size: 13px; opacity: .8; } .typed.big { font-size: 26px; }

/* ---- frame */
#gauge { position: fixed; inset: 0 0 auto 0; z-index: 20; padding: calc(var(--top) + 6px) 14px 8px; background: linear-gradient(#0b0b0d 70%, #0b0b0d00); max-width: 480px; margin: 0 auto; }
#view { max-width: 480px; margin: 0 auto; padding: calc(var(--top) + 58px) 14px calc(var(--bottom) + 84px); }
#tabs { position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; max-width: 480px; margin: 0 auto; padding: 6px 6px calc(var(--bottom) + 6px); background: #0f0f13f2; border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tab { flex: 1; min-height: 48px; font-size: 12px; font-weight: 600; color: var(--dim); display: grid; place-items: center; gap: 2px; }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.tab.on { color: var(--ink); } .tab.on .tab-dot { background: var(--pink); }

/* ---- the Acidomètre */
.gauge { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; color: var(--lime); }
.lemon { width: 34px; height: 34px; flex: none; transition: color .4s; }
.gauge-bar { flex: 1; height: 10px; border-radius: 6px; background: #24242c; overflow: hidden; }
.gauge-bar i { display: block; height: 100%; border-radius: 6px; background: currentColor; transition: width .6s cubic-bezier(.2, .9, .3, 1.2), background .4s; }
.gauge-band { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; min-width: 74px; text-align: right; }
.band-doux { color: var(--lime); } .band-piquant { color: #ffd21f; } .band-acide { color: var(--orange); } .band-corrosif { color: var(--red); }
.frozen { filter: grayscale(1); opacity: .55; }

/* ---- buttons, chips, stickers */
.btn { min-height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 700; background: #2a2a34; color: var(--ink); display: inline-grid; place-items: center; text-align: center; }
.btn.primary { background: var(--blue); color: #fff; } .btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.dark { background: var(--paper-ink); color: var(--paper); } .btn.ghost.dark { background: transparent; color: var(--paper-ink); box-shadow: inset 0 0 0 2px var(--paper-ink); }
.btn:disabled { opacity: .35; }
.btn.stkbtn { background: var(--pink); color: #fff; text-transform: uppercase; font-weight: 900; transform: rotate(-2deg); box-shadow: 0 0 0 3px #fff; }
.btn.shell { background: #f1e3c4; color: #3a2c12; width: 100%; margin-top: 14px; }
.row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; } .row .btn { flex: 1; } .row.two .btn { padding: 0 8px; }
.link { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; min-height: 44px; padding: 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; } .chips.col { flex-direction: column; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 22px; background: #24242c; font-weight: 600; font-size: 14px; text-align: left; }
.chip:disabled { opacity: .35; }
.stk { display: inline-block; padding: 5px 12px 6px; border-radius: 10px; font-weight: 900; font-size: 14px; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; transform: rotate(-3deg); box-shadow: 0 0 0 3px #fff, 0 6px 14px #0008; background: var(--blue); color: #fff; max-width: 100%; }
.stk.xl { font-size: 26px; padding: 8px 18px 10px; border-radius: 14px; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
/* label colours are doubled up (.stk.stk-x) so no layout rule that greys a span can ever win over them */
.stk.stk-blue { background: var(--blue); color: #fff; } .stk.stk-pink { background: var(--pink); color: #fff; } .stk.stk-lime { background: #7df01d; color: #17300a; } .stk.stk-olive { background: var(--olive); color: var(--lime); }
.stk.stk-brown { background: var(--brown); color: var(--orange); } .stk.stk-orange { background: var(--orange); color: #fff; } .stk.stk-red { background: var(--red); color: #fff; }
.stk.stk-violet { background: var(--violet); color: #fff; } .stk.stk-white { background: #fff; color: #e0263c; }
@keyframes pop { from { transform: scale(.2) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-3deg); opacity: 1; } }
.face { width: 64px; height: 64px; object-fit: cover; object-position: top; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff; flex: none; }

/* ---- panels */
.panel { background: var(--panel); border-radius: 18px; padding: 18px 16px; margin-bottom: 14px; } .panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel.center p { margin-top: 8px; }

/* ---- Accueil: story rings */
.rings { display: flex; gap: 14px; padding: 4px 2px 12px; overflow-x: auto; }
.ring { display: grid; justify-items: center; gap: 4px; min-width: 64px; }
.ring-disc { width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: #3a3a44; display: grid; place-items: center; }
.ring.unread .ring-disc { background: conic-gradient(from 210deg, #ff1f8e, #ff8a1f, #c8f31d, #1f4bff, #ff1f8e); }
.ring-disc > * { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); background: #1c1c24; display: grid; place-items: center; font-size: 24px; object-fit: cover; box-shadow: none; }
.ring-disc img { background: #fff; object-position: top; }
.ring-label { font-size: 11px; color: var(--dim); } .ring.unread .ring-label { color: var(--ink); }

/* ---- Accueil: Chacha, the table, the glass */
.scene { text-align: center; margin-bottom: 6px; color: var(--ink); }
.scene.band-doux, .scene.band-piquant, .scene.band-acide, .scene.band-corrosif { color: var(--ink); }
.scene-stage { position: relative; height: 31vh; min-height: 230px; max-height: 300px; }
.table { position: absolute; left: 20%; right: 5%; bottom: 0; height: 14px; border-radius: 6px 10px 4px 4px; background: linear-gradient(#b98652, #7a5330); box-shadow: 0 14px 0 -6px #3a2716; }
.chacha { position: absolute; bottom: 12px; left: 23%; height: 90%; transform-origin: 50% 100%; filter: drop-shadow(0 0 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 -2px 0 #fff); }
.band-acide .chacha { animation: flick 1.6s ease-in-out infinite; } .band-corrosif .chacha { animation: flick .7s ease-in-out infinite; }
@keyframes flick { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2.5deg); } }
.glass { position: absolute; right: 7%; bottom: 14px; width: 44px; height: 64px; display: grid; place-items: end center; }
.glass span { width: 26px; height: 40px; border: 3px solid #dff3ff; border-top: 0; border-radius: 3px 3px 8px 8px; background: linear-gradient(transparent 35%, #9fd8ff66 35%); clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); }
.push .chacha { animation: nudge .95s ease-in-out; } .push .glass { animation: fall .95s ease-in forwards; }
@keyframes nudge { 30%, 55% { transform: translateX(26px) rotate(4deg); } }
@keyframes fall { 0%, 30% { transform: none; } 55% { transform: translate(22px, 0) rotate(38deg); } 100% { transform: translate(40px, 150px) rotate(140deg); opacity: 0; } }
.stool-wait { position: absolute; left: 0; bottom: 26px; display: grid; justify-items: center; gap: 4px; font-size: 10px; color: var(--red); font-weight: 800; max-width: 74px; line-height: 1.1; }
.stool-wait img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 2px var(--red); animation: lurk 2.4s ease-in-out infinite; }
@keyframes lurk { 50% { transform: translateY(-4px) rotate(-3deg); } }
.status { margin-top: 18px; font-weight: 800; font-size: 17px; transform-origin: 0 50%; }
.band-corrosif .status { animation: swing 2.2s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(5deg) translateY(6px); } 45% { transform: rotate(-2deg); } 70% { transform: rotate(1deg); } }
.truce-note { margin-top: 6px; font-size: 13px; color: var(--dim); font-style: italic; }

/* ---- Accueil: the hand */
.hand h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); text-align: center; margin: 14px 0 4px; }
.waiting { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 6px 0; } .waiting .chip { font-size: 12px; min-height: 36px; background: #2b2410; color: #ffd21f; }
.fan { display: flex; justify-content: center; padding: 16px 0 10px; }
.fan-card { position: relative; width: 33%; max-width: 132px; margin: 0 -4px; transition: transform .25s; }
.fan-card.f0 { transform: rotate(-7deg) translateY(8px); } .fan-card.f2 { transform: rotate(7deg) translateY(8px); } .fan-card.f1 { z-index: 2; }
.fan-card:active { transform: translateY(-8px) scale(1.03); } .fan-card.dim { opacity: .4; }
.badge { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-8deg); background: #ffd21f; color: #2b2410; font-size: 10px; font-weight: 900; padding: 4px 6px; border-radius: 6px; text-transform: uppercase; width: max-content; max-width: 96%; box-shadow: 0 0 0 2px #fff; }
.hand-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 12px; }

/* ---- playing cards: cream belote faces, classic pips, a madras back */
.pcard { position: relative; aspect-ratio: 5 / 7; border-radius: 9px; background: var(--paper); color: var(--paper-ink); padding: 22% 8% 16%; display: flex; flex-direction: column; justify-content: center; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 8px 18px #000a; text-align: center; }
.pcard.big { width: min(76vw, 320px); border-radius: 18px; margin: 0 auto; }
.suit-coeur, .suit-carreau { --pip: #c8102e; } .suit-trefle, .suit-pique { --pip: #1d1a26; }
.corner { position: absolute; display: grid; justify-items: center; line-height: 1; color: var(--pip); font-family: Georgia, "Times New Roman", serif; }
.corner b { font-size: 15px; } .corner i { font-style: normal; font-size: 13px; }
.corner.tl { top: 5%; left: 6%; } .corner.br { bottom: 5%; right: 6%; transform: rotate(180deg); }
.pcard.big .corner b { font-size: 34px; } .pcard.big .corner i { font-size: 28px; }
.pcard-art { position: absolute; inset: 0; display: grid; place-items: center; font-size: 86px; color: var(--pip); opacity: .09; font-family: Georgia, serif; } .pcard.big .pcard-art { font-size: 240px; }
.mission { position: relative; font-size: 9.5px; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pcard.big .mission { font-size: 21px; line-height: 1.3; -webkit-line-clamp: 9; font-family: var(--typed); font-weight: 400; }
.pcval { position: absolute; left: 0; right: 0; bottom: 6%; font-size: 9px; font-weight: 900; color: var(--pip); letter-spacing: .05em; } .pcard.big .pcval { font-size: 18px; }
.finish-bronze { box-shadow: 0 0 0 3px #b9773f, 0 8px 18px #000a; } .finish-argent { box-shadow: 0 0 0 3px #cfd6dd, 0 8px 18px #000a; }
.finish-holographique { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #ff2d95, 0 0 22px #7b2ff7; background: linear-gradient(125deg, #f4ebdd 30%, #ffd9f0 45%, #d6f7ff 60%, #f4ebdd 75%); }
.madras { position: absolute; inset: 0; background:
  repeating-linear-gradient(0deg, #d41f2fb0 0 9px, transparent 9px 21px, #14713fb0 21px 27px, transparent 27px 44px, #ffffff80 44px 46px, transparent 46px 60px),
  repeating-linear-gradient(90deg, #d41f2fb0 0 9px, transparent 9px 21px, #14713fb0 21px 27px, transparent 27px 44px, #1f3fb580 44px 48px, transparent 48px 60px), #f2b21c; }
.pcard.back { padding: 0; }
.flip { perspective: 1200px; margin: 6px auto 12px; width: min(76vw, 320px); }
.flip-in { position: relative; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .8, .3, 1.15); transform: rotateY(180deg); }
.flip.on .flip-in { transform: none; }
.flip-front, .flip-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; } .flip-back { transform: rotateY(180deg); }
.flip .pcard.big { width: 100%; height: 100%; }

/* ---- layers */
.overlay { position: fixed; inset: 0; z-index: 40; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--top) + 14px) 14px calc(var(--bottom) + 20px); background: #000d; animation: fade .2s both; }
.overlay.pink { background: var(--party); } .overlay.story-layer, .overlay.conseil-layer { background: #08080b; } .overlay.onboard-layer { background: #1a1620; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; max-width: 452px; margin: 0 auto; background: var(--panel); border-radius: 22px; padding: 22px 16px 18px; animation: up .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.sheet h2 { font-size: 20px; margin: 0 40px 6px 0; } .sheet h3 { font-size: 15px; margin: 18px 0 2px; }
.card-sheet { background: transparent; padding-top: 44px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; font-size: 28px; line-height: 1; color: var(--dim); z-index: 3; }
.pending { background: #2b2410; color: #ffd21f; border-radius: 14px; padding: 12px 14px; text-align: center; } .pending p { font-size: 13px; opacity: .85; margin-top: 4px; }
.log li, .post li, .coupon, .ticket { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log li div, .coupon div, .ticket div { display: grid; gap: 2px; } .log span, .coupon span, .ticket span { font-size: 12px; color: var(--dim); }
.log .void b { text-decoration: line-through; opacity: .5; } .tag { font-style: normal; background: #2a2a34; border-radius: 6px; padding: 1px 6px; margin-left: 4px; } .empty { color: var(--dim); font-style: italic; justify-content: center !important; }
.paper-sheet { background: var(--paper); color: var(--paper-ink); font-family: var(--typed); } .paper-sheet .x { color: var(--paper-ink); }
.post li { flex-direction: column; align-items: flex-start; border-color: var(--paper-line); } .post small { opacity: .6; font-size: 12px; } .post .stk { font-family: var(--ui); margin-bottom: 4px; }
#modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: #000c; animation: fade .2s both; }
.modal-card { width: 100%; max-width: 360px; background: var(--panel); border-radius: 22px; padding: 22px 18px; display: grid; gap: 12px; justify-items: center; text-align: center; animation: up .3s both; }
.modal-card .chips { width: 100%; } .modal-card .chip { width: 100%; }
.josh-line { font-size: 22px; font-weight: 800; line-height: 1.25; } .signed { font-family: var(--typed); color: var(--pink); font-size: 18px; transform: rotate(-3deg); }
#toast { position: fixed; left: 14px; right: 14px; top: calc(var(--top) + 64px); z-index: 70; display: grid; justify-items: center; pointer-events: none; opacity: 0; transform: translateY(-16px) scale(.96); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.5, .4, 1); }
#toast.show { opacity: 1; transform: none; }
.toast-in { display: flex; gap: 12px; align-items: center; max-width: 420px; background: #1d1d26; border-radius: 18px; padding: 12px 16px; box-shadow: 0 10px 30px #000c, 0 0 0 1px #3a3a46; font-size: 14px; }
.toast-in p { margin-top: 6px; } .toast-in > p { margin: 0; }
#mist { position: fixed; inset: 0; z-index: 65; pointer-events: none; opacity: 0; background: radial-gradient(circle at 20% 30%, #c9a7ffcc 0 4px, transparent 5px) 0 0 / 46px 52px, radial-gradient(circle at 70% 60%, #e6d4ffaa 0 3px, transparent 4px) 0 0 / 38px 44px, linear-gradient(120deg, #b58cff55, #d9c2ff22 60%, transparent); }
body.mist #mist { animation: mist 3.2s ease-out both; } body.mist .chacha { animation: shake .18s linear 12; }
@keyframes mist { 0% { opacity: 0; transform: translateX(-30%); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateX(25%); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

/* ---- épreuve: story format */
.story { max-width: 452px; margin: 0 auto; min-height: calc(100dvh - var(--top) - var(--bottom) - 40px); display: flex; flex-direction: column; position: relative; }
.segs { display: flex; gap: 4px; margin-bottom: 10px; } .segs i { flex: 1; height: 4px; border-radius: 2px; background: #3a3a44; } .segs i.done { background: #fff; } .segs i.now { background: linear-gradient(90deg, #fff 50%, #3a3a44 50%); }
.story-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 44px; position: relative; } .story-head span { color: var(--dim); font-size: 13px; } .story-head .x { top: 0; right: -6px; }
.story-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 8px 0 70px; position: relative; } .story-body.center { align-items: center; text-align: center; }
.quote { font-size: 26px; font-weight: 800; line-height: 1.2; } .prompt { font-size: 20px; font-weight: 700; text-align: center; }
.panneau { width: 150px; height: 150px; margin: 0 auto; filter: drop-shadow(0 8px 14px #000a); }
.answers { display: grid; gap: 10px; } .btn.answer { justify-items: start; text-align: left; padding: 12px 16px; min-height: 56px; font-weight: 600; width: 100%; }
.btn.answer.action { font-style: italic; } .btn.good { background: #1f7a3a; color: #fff; opacity: 1; } .btn.bad { background: #8a1f2d; color: #fff; opacity: 1; }
.swipe-card { background: var(--paper); color: var(--paper-ink); border-radius: 20px; padding: 44px 20px; font-size: 24px; font-weight: 800; text-align: center; box-shadow: 0 0 0 3px #fff, 0 14px 30px #000a; touch-action: pan-y; transition: transform .3s; }
.swipe-card.right { transform: rotate(3deg) translateX(10px); box-shadow: 0 0 0 4px #1f7a3a; } .swipe-card.wrong { transform: rotate(-3deg) translateX(-10px); box-shadow: 0 0 0 4px #8a1f2d; }
.btn.choice.acide { background: #3a3410; color: var(--lime); } .btn.choice.tendre { background: #3a1028; color: #ff9fd0; } .btn.choice.good { background: #1f7a3a; color: #fff; }
.verdict { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: #08080bcc; } .verdict .tap { font-size: 13px; color: var(--dim); }
.hint-btn { position: absolute; left: 0; bottom: 8px; } .hint-bubble { position: absolute; left: 0; right: 0; bottom: 56px; display: flex; gap: 10px; align-items: center; background: var(--paper); color: var(--paper-ink); border-radius: 18px; padding: 10px 14px; z-index: 4; animation: up .3s both; font-weight: 600; } .hint-bubble img { width: 64px; }
.gain { font-size: 30px; font-weight: 900; color: var(--lime); }

/* ---- Le Conseil */
.conseil { max-width: 452px; margin: 0 auto; position: relative; padding-bottom: 20px; }
.conseil .rise { width: 62%; margin: 0 auto -8px; border-radius: 24px; animation: rise 1.4s steps(7, end) both; }
@keyframes rise { from { transform: translateY(70%); opacity: 0; } }
.conseil h1 { text-align: center; font-size: 34px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); margin-top: 14px; }
.conseil .intro { text-align: center; font-family: var(--typed); margin: 8px 0 18px; }
.penalties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.penalty { position: relative; min-height: 190px; border-radius: 16px; background: var(--paper); color: var(--paper-ink); padding: 16px 12px; text-align: center; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 10px 22px #000a; display: grid; align-content: center; }
.penalty.chosen { min-height: 130px; margin-bottom: 14px; } .pen-front { display: grid; gap: 8px; } .pen-front b { font-size: 20px; } .pen-front i { font-style: normal; font-size: 13px; font-family: var(--typed); }
.pen-back { position: absolute; inset: 0; animation: reveal .5s 1.5s both; } .penalty.land { animation: land .6s cubic-bezier(.3, 1.4, .5, 1) both; } .penalty.l1 { animation-delay: .25s; }
@keyframes land { from { transform: translateY(-120vh) rotate(-24deg); } } @keyframes reveal { to { opacity: 0; visibility: hidden; } }
.conseil.settled .pen-back { display: none; } .conseil.settled .land, .conseil.settled .rise { animation: none; }
.countdown { font-size: 110px; font-weight: 900; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; color: var(--orange); margin: 6px 0 12px; }
.conseil .btn.primary { width: 100%; }

/* ---- the livret: cream paper, ruled lines, crooked stamps */
.livret { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 10px; -webkit-overflow-scrolling: touch; }
.page { position: relative; flex: 0 0 100%; scroll-snap-align: center; min-height: 62vh; background: var(--paper); color: var(--paper-ink); border-radius: 8px 18px 18px 8px; padding: 22px 16px 18px; font-family: var(--typed); box-shadow: inset 8px 0 12px -8px #0005; overflow: hidden;
  background-image: linear-gradient(#0000 0 0), radial-gradient(#00000008 1px, transparent 1px); background-size: auto, 5px 5px; }
.page h1 { font-size: 30px; line-height: 1.05; margin: 34px 0 20px; } .page h2 { font-size: 19px; margin-bottom: 4px; padding-right: 6px; }
.page.cover { display: flex; flex-direction: column; gap: 12px; } .page.cover .band { position: absolute; inset: 0 0 auto 0; height: 26px; } .hint { margin-top: auto; font-size: 13px; opacity: .6; text-align: right; }
.lines li { position: relative; display: flex; align-items: center; min-height: 54px; padding: 8px 76px 8px 0; border-bottom: 1.5px solid var(--paper-line); font-size: 13.5px; line-height: 1.25; } .rk { color: var(--pip, inherit); font-family: Georgia, serif; margin-right: 4px; }
.stamp { position: absolute; right: 0; top: 50%; width: 70px; height: 44px; margin-top: -22px; border: 2.5px solid #1f4bff; border-radius: 8px; color: #1f4bff; display: grid; place-content: center; text-align: center; transform: rotate(var(--r, -5deg)); font-family: var(--ui); opacity: .88; mix-blend-mode: multiply; }
.stamp b { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; } .stamp i { font-size: 9px; font-style: normal; }
.stamp.thud { animation: thud .32s cubic-bezier(.3, 1.6, .5, 1) both; } @keyframes thud { from { transform: scale(2.6) rotate(calc(var(--r) * 3)); opacity: 0; } }
.sash { position: relative; margin: -22px -16px 12px; padding: 9px 16px; overflow: hidden; color: #fff; text-align: center; font-family: var(--ui); } .sash b { position: relative; background: #1d1a26; padding: 3px 12px; border-radius: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.sash.big { margin: 10px 0; padding: 22px 16px; border-radius: 14px; transform: rotate(-6deg); box-shadow: 0 0 0 4px #fff; } .sash.big b { font-size: 22px; }
.lines.sign li { padding-right: 0; justify-content: space-between; } .sig { height: 46px; mix-blend-mode: multiply; }

/* ---- Boutique, Moi */
.balance { font-size: 22px; font-weight: 900; color: var(--pink); margin: 8px 0; } .ticket.used { opacity: .5; }
.ticket-full { min-height: calc(100dvh - 80px); display: grid; place-items: center; } .ticket-paper { width: 100%; max-width: 380px; background: var(--paper); color: var(--paper-ink); border-radius: 14px; padding: 30px 20px; text-align: center; font-family: var(--typed); display: grid; gap: 12px; transform: rotate(-2deg); box-shadow: 0 0 0 4px #fff, 0 20px 40px #000c; border: 2px dashed var(--paper-ink); outline: 10px solid var(--paper); }
.ticket-paper h1 { font-size: 28px; line-height: 1.1; } .ticket-paper .foot { font-size: 11px; opacity: .6; }
.idcard { display: flex; gap: 14px; align-items: center; background: var(--paper); color: var(--paper-ink); border-radius: 18px; padding: 16px; margin-bottom: 14px; font-family: var(--typed); } .idcard .face { width: 92px; height: 92px; border-radius: 14px; }
.idcard div { display: grid; gap: 2px; font-size: 13px; } .idcard b { font-size: 24px; } .idcard small { text-transform: uppercase; letter-spacing: .1em; font-size: 10px; opacity: .6; font-family: var(--ui); }
.mini-sash { background: #1d1a26; color: #fff; border-radius: 6px; padding: 1px 8px; font-size: 11px; font-family: var(--ui); width: max-content; }
.records { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; } .records dd { font-weight: 800; text-align: right; } .version { margin-top: 12px; min-height: 44px; display: grid; align-items: center; }

/* ---- celebrations */
.celebrate { min-height: calc(100dvh - 80px); display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; color: #fff; }
.evo-1 { font-size: 24px; font-weight: 800; } .evo-2 { font-size: 30px; font-weight: 900; animation: pop .5s 1.3s cubic-bezier(.2, 1.6, .4, 1) both; } .celebrate .sub { color: #fffc; }
.evo-cat { height: 34vh; max-width: 80%; object-fit: contain; filter: brightness(0) invert(1); animation: evolve 1.4s ease-in-out both; } @keyframes evolve { 0% { filter: brightness(0) invert(1); transform: scale(.6); } 60% { filter: brightness(0) invert(1); transform: scale(1.1); } 100% { filter: none; transform: none; } }
.celebrate .face { width: 120px; height: 120px; }

/* ---- Day 0 */
.onboard { max-width: 452px; margin: 0 auto; }
.letter { min-height: 72vh; background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 30px 20px 22px; display: flex; flex-direction: column; gap: 14px; font-family: var(--typed); box-shadow: 0 20px 50px #000c; transform: rotate(-.6deg); animation: up .4s both; }
.letter small { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; opacity: .6; font-family: var(--ui); } .letter h1 { font-size: 30px; line-height: 1.05; } .letter h2 { font-size: 18px; } .letter .typed { font-size: 18px; line-height: 1.45; }
.letter > .sub { margin-top: auto; color: #2a243399; text-align: right; } .letter .link { color: var(--paper-ink); padding: 0; }
.typed-input { font: 26px var(--typed); padding: 12px; border: 0; border-bottom: 3px solid var(--paper-ink); background: transparent; color: var(--paper-ink); width: 100%; text-transform: uppercase; outline: none; border-radius: 0; -webkit-user-select: text; user-select: text; }
#sig { width: 100%; aspect-ratio: 600 / 260; background: #fffaf0; border-bottom: 3px solid var(--paper-ink); border-radius: 6px; touch-action: none; }
.meet { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 6px; } .meet .chacha { position: static; height: 190px; } .meet .stool { width: 120px; border-radius: 16px; } .meet p { max-width: 300px; } .meet .btn { margin-top: 12px; width: 100%; }
.glass.static { position: static; }

/* ---- debug */
#debug-fab { position: fixed; right: 12px; top: calc(var(--top) + 64px); z-index: 30; width: 44px; height: 44px; border-radius: 50%; background: #2a2a34; font-size: 20px; opacity: .8; }
.debug i { color: var(--dim); font-size: 13px; }

/* ---- drawn art */
.pcard-img { position: absolute; left: 12%; right: 12%; top: 13%; height: 44%; width: 76%; object-fit: contain; mix-blend-mode: multiply; }
.pcard:has(.pcard-img) { justify-content: flex-end; padding: 0 15% 19%; } .pcard:has(.pcard-img) .mission { -webkit-line-clamp: 4; font-size: 8.5px; }
.pcard.big:has(.pcard-img) .mission { font-size: 17px; -webkit-line-clamp: 6; } .pcard.big .pcard-img { top: 12%; height: 46%; }
/* Sticker rule (Josh, 28 November 2026): the label is at least as wide as the picture and sits over its bottom edge,
   so it always hides the two lower corners where the bust is cut off. --w is the picture's width; the image keeps its
   own proportions (no letterboxing), so its corners are the corners of the drawing. */
.stkface { --w: 150px; position: relative; display: inline-grid; justify-items: center; align-content: start; align-self: start; width: var(--w); }
.stkface img { display: block; width: 100%; height: auto; max-height: calc(var(--w) * 1.15); object-fit: cover; object-position: top;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 -2px 0 #fff); }
.stkface .stk { position: relative; z-index: 1; width: calc(100% + 16px); margin-top: calc(var(--w) * -0.24); text-align: center; white-space: normal; transform: rotate(-3deg);
  padding: calc(var(--w) * .035) calc(var(--w) * .05); line-height: 1.04; letter-spacing: .01em; overflow-wrap: normal; word-break: keep-all; overflow: hidden; font-size: calc(var(--w) * .11); align-self: start; }
.stkface .stk.balanced { text-wrap: balance; }
.stkface .stk.oneline { white-space: nowrap; }   /* the size is then fitted to the box by fitStickers() in ui.js */
.stkface.xl { --w: 220px; } .stkface.xl img { animation: popimg .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes popimg { from { transform: scale(.2); opacity: 0; } }   /* no tilt on the picture: only the label leans */ .stkface.xl .stk { border-radius: 14px; animation: none; }
.toast-big { display: grid; justify-items: center; text-align: center; } .toast-big .stkface { --w: 120px; } 
.chacha { object-fit: contain; object-position: bottom; max-width: 56%; } .push-frames .glass { animation: fall .95s ease-in forwards; }
.evo-face { width: 190px; }
.dish:has(img) { padding-left: 84px; } .dish img { position: absolute; left: 8px; top: 50%; width: 64px; height: 64px; margin-top: -32px; object-fit: contain; mix-blend-mode: multiply; }

/* ---- clips */
.clip { display: block; width: 100%; border-radius: 18px; background: #000; }
.clipcard { width: min(86vw, 360px); border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 4px #fff, 0 20px 50px #000c; transform: rotate(-1.5deg); cursor: pointer; }
#modal .modal-card:has(.clipcard) { background: transparent; padding: 0; } .clipcard .clip { border-radius: 0; background: #fff; }
.conseil .rise-clip { width: 62%; margin: 0 auto -8px; border-radius: 24px; }
.convoc-clip { width: 78%; margin: 0 auto 14px; aspect-ratio: 9 / 16; max-height: 46vh; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 16px 40px #000c; transform: rotate(1.5deg); }
.letter.with-clip { min-height: 0; }

/* ---- linking, the sticker code, On mange quoi */
#offline { position: fixed; left: 50%; bottom: calc(var(--bottom) + 70px); transform: translateX(-50%); z-index: 25; font-size: 11px; font-weight: 700; background: #2a2a34; color: var(--dim); padding: 3px 10px; border-radius: 10px; }
.err { color: #ff6b7d; font-size: 14px; } .letter .err { color: #b3142a; }
.link-status { font-weight: 700; font-size: 14px; margin-bottom: 8px; } .link-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 8px; }
.s-ok::before { background: var(--lime); } .s-offline::before, .s-no-relay::before { background: #ffd21f; } .s-wrong-dossier::before, .s-unlinked::before { background: var(--red); }
.own, select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: #101015; color: var(--ink); font: inherit; outline: none; -webkit-user-select: text; user-select: text; margin: 8px 0; }
.own:focus { border-color: var(--blue); }
.codepad { margin-top: 14px; background: var(--panel); border-radius: 18px; padding: 14px; text-align: center; }
.codegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; margin: 14px 0 6px; } .codegrid button { position: relative; min-height: 48px; display: grid; place-items: center; border-radius: 12px; }
.codegrid button.on { background: #ffffff18; } .codegrid em { position: absolute; top: -6px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #000; font-style: normal; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.codegrid .stk, .stkpick .stk, .codeshow .stk { font-size: 12px; pointer-events: none; }
.seg { display: flex; background: #101015; border-radius: 14px; padding: 4px; margin-bottom: 12px; } .seg button { flex: 1; min-height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--dim); } .seg button.on { background: #2a2a34; color: var(--ink); }
.seg.levels { margin-top: 14px; } .q { margin-top: 10px; } .chips.four .chip { flex: 1 1 40%; text-align: center; } .chip.on { background: var(--blue); color: #fff; }
.nudge { text-align: center; color: var(--lime); font-size: 13px; font-weight: 700; margin-top: 6px; }
.dishes { display: grid; gap: 10px; margin: 14px 0 4px; } .dish { position: relative; min-height: 64px; padding: 14px 16px; border-radius: 16px; background: var(--paper); color: var(--paper-ink); text-align: left; font-family: var(--typed); font-size: 18px; box-shadow: 0 0 0 2px #fff; }
.dish.on { box-shadow: 0 0 0 4px var(--blue); transform: rotate(-1deg); } .dish i { position: absolute; top: -8px; right: 10px; font: 900 10px var(--ui); font-style: normal; text-transform: uppercase; background: var(--pink); color: #fff; padding: 2px 8px; border-radius: 6px; transform: rotate(3deg); }
.miam .empty { margin: 18px 0; text-align: center; } .miam .row.add { margin-top: 10px; } .row.add .own, .row.add input { flex: 3; margin: 0; } .row.add .btn { flex: 1; }
.proposal { background: var(--paper); color: var(--paper-ink); border-radius: 16px; padding: 18px 14px; margin: 14px 0; font-family: var(--typed); display: grid; gap: 6px; transform: rotate(-1.5deg); box-shadow: 0 0 0 3px #fff; } .proposal small { font: 700 10px var(--ui); text-transform: uppercase; letter-spacing: .12em; opacity: .6; } .proposal b { font-size: 22px; }
.miam.center .stk { margin: 8px 0; } .miam.center .btn { margin-top: 12px; }
.tab.nudge .tab-dot { background: var(--orange); }

.chef-note { font-family: var(--typed); font-size: 13px; background: #f4ebdd14; border-left: 3px solid var(--orange); padding: 8px 10px; border-radius: 0 10px 10px 0; margin: 12px 0 4px; }
.dish small { display: block; font: 700 11px var(--ui); opacity: .55; margin-top: 4px; }
.chips.four .chip { flex: 1 1 28%; }

/* ---- giraffes */
.girafe-peek { position: absolute; top: -18px; right: 2%; width: 26%; max-width: 110px; z-index: 1; transform-origin: 50% 0; animation: peek 5s ease-in-out infinite; }
.girafe-peek img { width: 100%; filter: drop-shadow(0 0 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff); }
.girafe-peek.nod { animation: nod .9s ease-in-out; }
@keyframes peek { 0%, 100% { transform: translateY(-10%) rotate(3deg); } 50% { transform: translateY(0) rotate(-4deg); } }
@keyframes nod { 30% { transform: translateY(8%) rotate(-12deg); } 60% { transform: translateY(2%) rotate(6deg); } }
.ring-girafe { background: #fff !important; object-fit: contain !important; padding: 4px; }
.toast-girafe { width: 70px; }
.girafe-story .girafe-big { width: 62%; max-width: 260px; filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: var(--orange); font-weight: 800; }
.girafe-fact { font-size: 22px; font-weight: 800; line-height: 1.3; max-width: 340px; }
.shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; align-items: end; border-bottom: 6px solid #7a5330; padding-bottom: 4px; }
.shelf figure { margin: 0; text-align: center; } .shelf img { width: 100%; } .shelf figcaption { font-size: 9px; color: var(--dim); line-height: 1.15; margin-top: 2px; min-height: 2.3em; }
.shelf .locked img { filter: brightness(0); opacity: .35; }
.evo-girafe { display: flex; gap: 10px; align-items: center; background: #ffffff26; border-radius: 16px; padding: 8px 12px; max-width: 340px; text-align: left; } .evo-girafe img { width: 64px; } .evo-girafe p { font-weight: 700; }

/* ---- the Espace formateur */
body.coach { -webkit-user-select: none; user-select: none; } body.coach #view { padding: calc(var(--top) + 14px) 14px calc(var(--bottom) + 30px); }
.coach h1 { font-size: 22px; } .coach .who { margin-top: 6px; font-weight: 700; } .coach .panel.alert { box-shadow: inset 0 0 0 2px var(--orange); }
.btn.wide { width: 100%; margin-top: 8px; } .btn.big-pink { width: 100%; min-height: 76px; font-size: 22px; font-weight: 900; text-transform: uppercase; background: var(--party); color: #fff; border-radius: 20px; box-shadow: 0 0 0 3px #fff; transform: rotate(-1deg); margin-bottom: 10px; }
.todo { padding: 12px 0; border-bottom: 1px solid var(--line); } .todo:last-child { border-bottom: 0; } .todo.line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stkpick { min-height: 48px; padding: 8px 6px; border-radius: 12px; } .stkpick.on { background: #ffffff22; }
.coderow { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); } .codeshow { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 16px 0 12px; } .codeshow .stk { font-size: 15px; }
.codeleft { display: block; position: relative; height: 18px; border-radius: 9px; background: #24242c; font: 700 11px/18px var(--ui); font-style: normal; text-align: center; overflow: hidden; margin-bottom: 8px; } .codeleft::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #1f4bff88; }
.acidgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; } .btn.acidbtn { min-height: 84px; font-size: 16px; background: #2b2410; color: #ffd21f; display: grid; gap: 2px; padding: 8px; } .acidbtn small { font-size: 13px; opacity: .8; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 14px; } .check input { width: 22px; height: 22px; }
.undo { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #2b2410; color: #ffd21f; border-radius: 14px; padding: 8px 8px 8px 14px; margin: 8px 0; font-weight: 700; font-size: 14px; }
.setting { padding: 14px 0; border-bottom: 1px solid var(--line); } .setting .row { justify-content: flex-start; margin-top: 8px; } .setting .row .btn { flex: 0 0 64px; } .setting .row.add .btn { flex: 0 0 56px; }
.mono { font: 12px/1.4 ui-monospace, monospace; word-break: break-all; background: #101015; padding: 10px; border-radius: 10px; margin-top: 8px; -webkit-user-select: text; user-select: text; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
}
