@font-face{font-family:"Fredoka";font-style:normal;font-weight:600;font-display:swap;src:url("polices/fredoka-600.8616b17413.ttf") format("truetype")}
@font-face{font-family:"Nunito";font-style:normal;font-weight:500;font-display:swap;src:url("polices/nunito-500.b50f5fa19d.ttf") format("truetype")}
@font-face{font-family:"Nunito";font-style:normal;font-weight:700;font-display:swap;src:url("polices/nunito-700.d1c1ca3958.ttf") format("truetype")}
/* IEH games engine stylesheet, v1. No @font-face here: the build adds it. No filter, no blur. */
:root {
  /* Dial C palette (DESIGN-2, section 1). */
  --cadran-teinte: #A9D8D3; --cadran-fonce: #6FB3AC; --cadran-clair: #D3ECE8;
  --cadran-accent: #F3D9A4; --cadran-vif: #F0A231; --cadran-corps: #D1AECF;
  --lagoon: #A9D8D3; --lagoon-d: #6FB3AC;
  --peach: #F2C4B0; --peach-d: #D98B6E;
  --honey: #F3D9A4;
  --violet: #D1AECF; --violet-d: #B08AAE;
  --amber: #F0A231; --amber-d: #C07A12;
  --khaki: var(--cadran-fonce);
  --ink: #1D1D1D;
  --paper: #FFF8EC;
  --sand: var(--cadran-clair);
  --yes: #BFD6EA; --no: #D1AECF;
  --cible: 72px;
  --texte: 22px;
  --gap: 12px;
  --radius: 18px;
  --mot: 70px;
}
@media (min-width: 601px) {
  :root { --cible: 96px; --texte: 28px; --gap: 16px; --radius: 22px; --mot: 102px; }
}
html.tele { --cible: 140px; --texte: 40px; --gap: 24px; --radius: 32px; --mot: 160px; }
/* Short desktop window (laptop, browser not full screen): targets and the minimum verse size follow the HEIGHT, so the verse card is never
   crushed by the controls; these values stay above 44 px (target) and a 24 px alif (verse). */
@media (min-width: 601px) and (max-height: 700px) {
  :root { --cible: 72px; --texte: 22px; --gap: 12px; --radius: 18px; --mot: 84px; }
  html.tele { --cible: 80px; --texte: 26px; --gap: 14px; --radius: 22px; --mot: 100px; }
}
@media (min-width: 601px) and (max-height: 560px) {
  :root { --cible: 56px; --texte: 20px; --gap: 8px; --radius: 14px; --mot: 64px; }
  html.tele { --cible: 60px; --texte: 22px; --gap: 10px; --radius: 16px; --mot: 72px; }
}

* { box-sizing: border-box; }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sand); }
html.scroll, html.scroll body { overflow-y: auto; height: auto; }
body {
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 500;
  font-size: var(--texte);
  line-height: 1.3;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
#app:empty { height: 100vh; display: grid; place-items: center; }
#app:empty::before {
  content: ""; width: 64px; height: 64px; border-radius: 50%;
  border: 8px solid var(--lagoon); border-top-color: var(--khaki);
  animation: spin 1.2s linear infinite;
}
.ieh {
  position: relative;
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
html.scroll .ieh { height: auto; min-height: 100vh; overflow: visible; }
.ieh[data-screen="arrival"], .ieh[data-screen="doors"] {
  grid-template-rows: auto minmax(0, 1fr);
  /* Concentric waves, flat colours: no blur, no transparency. */
  background: repeating-radial-gradient(circle at 50% 42%, var(--cadran-clair) 0 30px, var(--cadran-teinte) 30px 33px);
}
.ieh[data-screen="failure"] { grid-template-rows: minmax(0, 1fr); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .title, .lbl, .door .lbl { font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; }
h1, h2, h3 { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; color: inherit;
  min-width: var(--cible); min-height: var(--cible);
  border: 3px solid transparent; border-radius: 999px;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: 0 .9em;
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 0 rgba(29, 29, 29, .14);
  transition: transform .15s ease, background-color .2s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(29, 29, 29, .14); }
.btn:focus { outline: none; }
.btn:focus-visible, .panel:focus-visible { outline: 6px solid var(--amber); outline-offset: 4px; z-index: 2; }
.btn .lbl { text-transform: uppercase; letter-spacing: .02em; font-size: .8em; }
.btn .ico { width: 1.2em; height: 1.2em; flex: none; }
.btn.round { border-radius: 50%; padding: 0; width: var(--cible); height: var(--cible); flex: none; }
.btn.round .ico { width: 46%; height: 46%; }
.btn.primary { background: var(--cadran-vif); border-color: var(--ink); color: var(--ink); }
.btn[aria-pressed="true"].opt { background: var(--cadran-corps); color: var(--ink); }
.ico, .pict { display: block; }
.pict { width: 62%; height: 62%; color: var(--ink); }

/* ---------- home: dial scene, arrival played over the doors' layout ---------- */
.arrival {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4;
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.arrival:active { transform: none; }
.arrival:focus-visible { outline-offset: -10px; }
.scene-stage { position: relative; flex: 1 1 0; min-height: calc(var(--cible) * 1.2); align-self: stretch; }
.scene-stage > svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .sc-pict { color: var(--ink); }
.cv-t { fill: var(--cadran-teinte); } .cv-f { fill: var(--cadran-fonce); } .cv-c { fill: var(--cadran-clair); }
.cv-a, .scene .ap { fill: var(--cadran-accent); } .cv-v { fill: var(--cadran-vif); } .cv-k { fill: var(--cadran-corps); }
.cv-sc { fill: none; stroke: var(--cadran-clair); } .cv-sv { fill: none; stroke: var(--cadran-vif); } .cv-sf { fill: none; stroke: var(--cadran-fonce); }
.scene .sc-eclat { fill: var(--cadran-vif); stroke: var(--ink); stroke-width: .4; transform: scale(0); }
.scene .sc-eclat.alt { fill: var(--cadran-accent); }
.scene.anim .sc-ondes, .scene.anim .sc-console, .scene.anim .signe-temps, .scene .sc-eclat, .scene.fete-on [data-bouton] { transform-box: fill-box; transform-origin: center; }
.scene.anim .sc-ondes { animation: waves .9s ease-out both; }
.scene.anim .sc-console { transform-origin: center bottom; animation: enter .8s cubic-bezier(.3, 1.5, .5, 1) .2s both; }
.scene.anim [data-calque="ecran"] { animation: lightOn .35s ease .95s both; }
.scene.anim .signe-temps { animation: popSign .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.scene.anim .sc-eclat { animation: scSpark .7s ease-out both; }
.scene.fete-on [data-bouton] { animation: hop .5s ease 2; }
.scene.fete-on [data-bouton="2"] { animation-delay: .1s; } .scene.fete-on [data-bouton="3"] { animation-delay: .2s; } .scene.fete-on [data-bouton="4"] { animation-delay: .3s; }
/* Arrival: the console large and centred (about 70 % of the width in landscape, 88 % in portrait; the frame adds 8 %). */
.ieh.grand .scene-stage { position: absolute; top: 4%; bottom: 4%; left: 12%; right: 12%; z-index: 2; }
@media (orientation: portrait) { .ieh.grand .scene-stage { left: 2.5%; right: 2.5%; } }
.ieh.anim .doors-title { animation: popIn .45s ease 2.4s both; }
.ieh.anim .doors-top, .ieh.anim .doors { animation: popIn .45s ease 2.4s both; }
.arrival-signs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--gap) * 1.5); }
.arrival-signs.many { display: grid; grid-template-columns: repeat(6, auto); align-content: center; }
.arrival-signs .sign.big { width: min(calc(var(--cible) * 1.4), 40vh); height: min(calc(var(--cible) * 1.4), 40vh); }
.arrival-signs.many .sign.big { width: var(--cible); height: var(--cible); }
@media (max-width: 600px) { .arrival-signs.many { grid-template-columns: repeat(3, auto); } }
.ieh.anim .arrival-signs .sign { animation: bounceIn .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.fete { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.fete i { position: absolute; top: -8%; width: .5em; height: .5em; display: block; background: var(--cadran-vif); border: 2px solid var(--ink); animation: confetti 1.4s cubic-bezier(.3, .6, .5, 1) both; }
.fete i:nth-child(3n+1) { border-radius: 50%; background: var(--cadran-accent); }
.fete i:nth-child(3n+2) { background: var(--cadran-teinte); }
.fete i:nth-child(4n) { background: var(--cadran-corps); }
.eclats { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.eclats i { position: absolute; left: -.4em; top: -.4em; width: .8em; height: .8em; display: block; animation: spark .9s cubic-bezier(.2, .8, .3, 1) both; }
.eclats svg { width: 100%; height: 100%; display: block; fill: var(--cadran-vif); stroke: var(--ink); stroke-width: 1.2; }
.eclats i:nth-child(even) svg { fill: var(--cadran-accent); }
.eclats i:nth-child(1) { --x: 0; --y: -1; } .eclats i:nth-child(2) { --x: .71; --y: -.71; } .eclats i:nth-child(3) { --x: 1; --y: 0; } .eclats i:nth-child(4) { --x: .71; --y: .71; }
.eclats i:nth-child(5) { --x: 0; --y: 1; } .eclats i:nth-child(6) { --x: -.71; --y: .71; } .eclats i:nth-child(7) { --x: -1; --y: 0; } .eclats i:nth-child(8) { --x: -.71; --y: -.71; }
.name-fr { font-family: "Fredoka", sans-serif; font-weight: 600; text-transform: uppercase; font-size: 1.6em; letter-spacing: .03em; }
.name-ar-box { display: block; width: min(60vw, 9em); }
.name-ar { width: 100%; height: auto; }

/* ---------- signs ---------- */
.sign {
  width: calc(var(--cible) * .9); height: calc(var(--cible) * .9);
  border-radius: var(--radius);
  background: var(--paper);
  display: grid; place-items: center;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(29, 29, 29, .12);
  flex: none;
}
.sign.big { width: calc(var(--cible) * 1.4); height: calc(var(--cible) * 1.4); }
.sign.huge { width: calc(var(--cible) * 2); height: calc(var(--cible) * 2); border-radius: calc(var(--radius) * 1.4); }
.sign.move .pict { animation: wiggle 1.1s ease-in-out 2; }

/* ---------- doors ---------- */
.doors-top { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); padding: var(--gap); flex-wrap: wrap; }
.switch { display: inline-flex; gap: 4px; background: #fff; padding: 4px; border-radius: 999px; box-shadow: 0 0 0 2px rgba(29, 29, 29, .08); }
.switch .btn { box-shadow: none; }
.adult-open { background: var(--paper); border-color: var(--violet-d); }
.doors-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--gap) * 2); padding: var(--gap); min-height: 0; }
.doors-title { display: flex; flex-direction: column; align-items: center; gap: var(--gap); }
@media (orientation: landscape) { .doors-title { flex-direction: row; gap: calc(var(--gap) * 1.5); } }
.doors-title .name-ar-box { width: min(50vw, 7em); }
.doors { display: flex; gap: calc(var(--gap) * 2); flex-wrap: wrap; justify-content: center; }
.door {
  flex-direction: column; border-radius: calc(var(--radius) * 1.6);
  width: calc(var(--cible) * 3.2); min-height: calc(var(--cible) * 3);
  padding: var(--gap);
  border-width: 4px;
}
.door.understand { background: var(--cadran-accent); border-color: var(--cadran-vif); }
.door.recite { background: var(--lagoon); border-color: var(--lagoon-d); }
.door-ico { width: calc(var(--cible) * 1.3); height: calc(var(--cible) * 1.3); display: grid; place-items: center; background: #fff; border-radius: 50%; }
.door-ico .ico { width: 60%; height: 60%; }
.door .lbl { font-size: 1em; }
@media (max-width: 600px) {
  .door { width: calc(100vw - 2 * var(--gap)); min-height: calc(var(--cible) * 2.2); flex-direction: row; justify-content: flex-start; gap: var(--gap); }
  .doors { gap: var(--gap); }
  .door-ico { width: calc(var(--cible) * 1.1); height: calc(var(--cible) * 1.1); }
}

/* ---------- frame: bar, instruction, zone, foot ---------- */
.bar {
  display: flex; align-items: center; gap: var(--gap);
  padding: calc(var(--gap) * .6) var(--gap);
  background: var(--cadran-corps);
  border-bottom: 3px solid var(--ink);
}
.bar .title { font-size: 1em; text-transform: uppercase; letter-spacing: .02em; flex: 1 1 auto; min-width: 0; overflow-wrap: normal; hyphens: none; }
/* The four console buttons: one row, never a cross; off = dotted outline, lit = flat colour and a ring. */
.stones { display: flex; flex-wrap: nowrap; gap: 6px; }
.stone { box-shadow: none; background: transparent; padding: 0; }
.stone.c-accent { --c: var(--cadran-accent); } .stone.c-vif { --c: var(--cadran-vif); }
.stone.c-teinte { --c: var(--cadran-teinte); } .stone.c-corps { --c: var(--cadran-corps); }
.stone .dot {
  width: calc(var(--cible) * .5); height: calc(var(--cible) * .5); border-radius: 50%;
  background: #fff; border: 3px dashed var(--ink); display: block;
}
.stone.current .dot { border-style: solid; border-width: 5px; }
.stone.played .dot { background: var(--c); border-style: solid; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.stone.allume .dot { animation: lightBtn .6s cubic-bezier(.3, 1.6, .5, 1); }
.levels { display: flex; gap: 4px; flex-wrap: wrap; }
.levels .btn { box-shadow: none; padding: 0 .6em; }
.levels .btn[aria-pressed="true"] { background: var(--cadran-accent); border-color: var(--ink); color: var(--ink); }
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; }
  .bar .levels { order: 1; width: 100%; justify-content: flex-end; }
}
@media (max-width: 600px) {
  .bar { flex-wrap: wrap; }
  .bar .title { order: 0; }
  .bar .stones, .bar .levels { order: 1; width: 100%; justify-content: space-between; }
  .levels .btn .lbl { font-size: .7em; }
}

.instruction {
  display: flex; align-items: center; gap: var(--gap); flex-wrap: wrap;
  padding: calc(var(--gap) * .6) var(--gap) 0;
  min-height: 1.6em;
}
.instruction .say { margin: 0; font-weight: 700; flex: 1 1 8em; min-width: 0; }
.instruction .say:empty { flex-basis: 0; }
.instruction .levels { margin-left: auto; }
.feedback { margin: 0; font-weight: 700; color: var(--ink); opacity: 0; min-width: 1px; }
.feedback.show { animation: note 2.6s ease both; }

.zone { min-height: 0; padding: var(--gap); position: relative; display: flex; flex-direction: column; }
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gap);
  padding: calc(var(--gap) * .6) var(--gap) var(--gap);
}
.foot-l { justify-self: start; }
.foot-c { justify-self: center; }
.foot-r { justify-self: end; }
@media (max-width: 600px) {
  .foot .btn .lbl { font-size: .7em; }
  .foot .btn { padding: 0 .6em; }
  .foot:has(.foot-c > *) .foot-l .lbl, .foot:has(.foot-c > *) .foot-r .lbl { display: none; }
}

/* ---------- look ---------- */
.look { display: flex; flex-direction: column; gap: var(--gap); flex: 1; min-height: 0; }
.strip { display: flex; gap: var(--gap); justify-content: center; }
.sign-btn { padding: 4px; border-radius: calc(var(--radius) + 6px); background: transparent; box-shadow: none; }
.sign-btn.current { background: #fff; border-color: var(--khaki); }
.sign-btn.seen { opacity: .75; }
.look-card {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center; gap: calc(var(--gap) * 2);
  background: #fff; border-radius: calc(var(--radius) * 1.4); padding: calc(var(--gap) * 1.5);
}
.look-text { display: flex; flex-direction: column; gap: var(--gap); max-width: 22em; }
.look-title { font-size: 1.2em; text-transform: uppercase; }
.phrase { margin: 0; font-size: 1.1em; padding: .3em .5em; border-radius: 12px; }
.phrase.light { animation: lightUp 1.4s ease .5s both; }
@media (max-width: 600px) { .look-card { flex-direction: column; text-align: center; } }

/* ---------- find ---------- */
.link { flex: 1; min-height: 0; position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; gap: var(--gap); }
.link .col { display: flex; flex-direction: column; justify-content: space-around; gap: var(--gap); z-index: 1; }
.link .signs { grid-column: 1; }
.link .titles { grid-column: 3; }
.wire { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wire .thread { stroke: var(--khaki); stroke-width: 6; stroke-linecap: round; }
.wire .thread.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s ease forwards; }
.wire .ghost { stroke: var(--amber); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 12; opacity: 0; }
.wire .ghost.on { opacity: 1; }
.link .sign-btn { touch-action: none; }
.title-btn { border-radius: var(--radius); background: var(--paper); border-color: #D8D0BE; padding: .2em .8em; max-width: 46vw; }
.title-btn .lbl { text-transform: none; font-size: .95em; }
.sign-btn.selected, .title-btn.selected { border-color: var(--amber); background: #FFF3DD; }
.sign-btn.linked, .title-btn.linked { border-color: var(--khaki); background: var(--cadran-clair); }
.memory { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: var(--gap); }
.mem-row { display: flex; align-items: center; gap: calc(var(--gap) * 1.5); }
.veiled {
  flex: 1; min-width: 0; min-height: calc(var(--cible) * .8); border-radius: var(--radius);
  background: var(--paper); border: 2px dashed #CFC7B5;
  display: flex; align-items: center; padding: 0 .8em;
}
.demo-hand { position: fixed; left: 0; top: 0; width: calc(var(--cible) * .9); height: calc(var(--cible) * .9); color: var(--ink); pointer-events: none; z-index: 5; }
.demo-hand .ico { width: 100%; height: 100%; }
.veiled.shown { background: #fff; border-color: transparent; box-shadow: inset 0 0 0 3px var(--khaki); animation: fadeIn .4s ease both; }
.veiled .lbl { text-transform: none; }

/* ---------- answer ---------- */
.answer { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(var(--gap) * 2); align-items: center; }
.ask { display: flex; flex-direction: column; align-items: center; gap: calc(var(--gap) * 1.5); text-align: center; }
.question { font-size: 1.15em; }
.qdots { display: flex; gap: 8px; justify-content: center; }
.qdots i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--khaki); display: block; }
.qdots i.on { background: var(--khaki); }
.qdots i.done { background: var(--cadran-teinte); }
.yn-pair { display: flex; gap: calc(var(--gap) * 2); justify-content: center; }
.yn { width: calc(var(--cible) * 1.9); height: calc(var(--cible) * 1.9); border-radius: 50%; border-width: 5px; }
.yn .lbl { font-size: 1em; }
.yn.yes { background: var(--yes); border-color: #8FB2D1; }
.yn.no { background: var(--no); border-color: var(--violet-d); }
.yn.right { box-shadow: 0 0 0 8px #fff, 0 0 0 12px var(--cadran-vif); }
.ask .feedback.under { min-height: 1.3em; text-align: center; }
.card-slot { display: flex; align-items: center; justify-content: center; min-height: 0; }
@media (max-width: 860px) and (orientation: portrait) {
  .answer { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-content: start; }
}

/* ---------- cards ---------- */
.card {
  display: flex; align-items: center; gap: var(--gap);
  background: #fff; border-radius: calc(var(--radius) * 1.2);
  padding: var(--gap);
  border: 3px solid #E4DCCB; text-align: left;
}
.card .card-text { display: flex; flex-direction: column; gap: .3em; min-width: 0; }
.card .learn { margin: 0; font-family: "Fredoka", sans-serif; font-weight: 600; }
.card .do { margin: 0; }
.card .field { background: var(--honey); border-radius: 10px; padding: .1em .35em; font-weight: 700; }
.time-card .sign { width: calc(var(--cible) * 1.1); height: calc(var(--cible) * 1.1); }
.card.lit { border-color: var(--amber); box-shadow: 0 0 0 6px #FFF0D2; }
.card.appear { animation: popIn .5s ease both; }
.gesture { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); justify-content: center; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); width: 100%; }
.cards .card-btn { border-radius: calc(var(--radius) * 1.2); padding: 0; background: transparent; box-shadow: none; display: block; text-align: left; }
.cards .card-btn .card { height: 100%; font-size: .85em; }
.cards .card-btn .card .learn { font-size: 1em; }
.cards.thumbs { display: flex; justify-content: center; }
.cards.thumbs .card-btn { display: inline-flex; padding: 4px; }
.cards .card-btn.picked { border-color: var(--amber); }
.big-card { flex: none; width: min(100%, 30em); justify-content: center; gap: calc(var(--gap) * 1.5); border-color: var(--amber); padding: var(--gap) calc(var(--gap) * 1.5); }
.big-card .learn { font-size: 1em; text-transform: uppercase; }
.big-card .do.big { font-size: 1.35em; font-weight: 700; }
.big-card.grow { animation: grow .45s ease both; }
.lot-nav { display: flex; gap: var(--gap); justify-content: center; }
.lot-btn { background: transparent; box-shadow: none; }
.lot-btn .pip { width: 32%; height: 32%; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--khaki); display: block; }
.lot-btn.on .pip { background: var(--khaki); }
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .big-card { flex-direction: column; text-align: center; }
}

/* ---------- recite ---------- */
.recite { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.parts { display: flex; gap: var(--gap); justify-content: center; }
.verse-stage { flex: 1; min-height: calc(var(--mot) * 1.3 + var(--gap) * 2 + 6px); display: flex; flex-direction: column; background: #fff; border-radius: calc(var(--radius) * 1.4); padding: var(--gap); overflow-y: auto; border-bottom: 6px solid #fff; }
.verse-stage.defile { border-bottom: 6px dashed var(--amber); }
.verse-stage.defile.fin { border-bottom-color: #fff; }
.verse {
  flex: 1 0 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center;
  column-gap: calc(var(--mot) * .25); row-gap: calc(var(--mot) * .15); pointer-events: none;
}
.verse, .verse * { animation: none !important; transition: none !important; }
.verse .mot { height: var(--mot); width: auto; flex: none; display: block; pointer-events: none; }
.verse-empty { flex: 1; }
.pearls { display: grid; gap: 4px; justify-content: center; justify-items: center; direction: rtl; }
.pearl { background: transparent; box-shadow: none; padding: 0; border-radius: 50%; }
.pearl .bead {
  width: calc(var(--cible) * .58); height: calc(var(--cible) * .58); border-radius: 50%;
  background: #fff; border: 4px solid var(--khaki); display: grid; place-items: center;
  font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: calc(var(--cible) * .26); line-height: 1; color: var(--ink);
}
.pearl.filled .bead { background: var(--amber); border-color: var(--amber-d); }
.pearl.current .bead { box-shadow: 0 0 0 3px #fff, 0 0 0 10px var(--amber); animation: pulse 1.6s ease-in-out infinite; }
.pearl.current.filled .bead { animation: none; }
.times { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-content: center; }
.time-btn {
  justify-content: flex-start; gap: var(--gap); border-radius: calc(var(--radius) * 1.2); padding: calc(var(--gap) * .6);
  background: #fff; border-color: #E4DCCB; text-align: left; min-width: 0;
}
.time-btn .lbl { text-transform: none; font-size: .9em; flex: 1; min-width: 0; }
.time-btn .tick { width: calc(var(--cible) * .3); height: calc(var(--cible) * .3); border-radius: 50%; flex: none; box-shadow: inset 0 0 0 3px #E4DCCB; }
.time-btn.done { border-color: var(--amber); }
.time-btn.done .tick { background: var(--amber); box-shadow: inset 0 0 0 3px var(--amber-d); }
@media (max-width: 900px) and (orientation: portrait), (max-width: 600px) { .times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.order { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-around; gap: calc(var(--gap) * 2); }
.slots, .deck { display: flex; gap: calc(var(--gap) * 1.5); justify-content: center; flex-wrap: wrap; }
.slots { flex-wrap: nowrap; }
.slot {
  flex: 0 1 calc(var(--cible) * 2.6); min-width: 0; min-height: calc(var(--cible) * 1.9);
  border: 3px dashed #CFC7B5; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 6px; text-align: center; background: rgba(255, 255, 255, .5);
}
.slot-n { font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: 1.2em; color: #B5AD98; }
.slot.full { border-style: solid; border-color: var(--khaki); background: #fff; }
.slot .lbl { font-size: .8em; }
.slot .sign.glide { transition: transform .6s cubic-bezier(.3, .9, .4, 1); }
.slot.fade { animation: fadeIn .4s ease both; }
.order-card { padding: 6px; border-radius: calc(var(--radius) + 8px); background: #fff; }
.order-card .sign { width: calc(var(--cible) * 1.2); height: calc(var(--cible) * 1.2); }
.order-card.gone { visibility: hidden; }
@media (max-width: 600px) {
  .slots { gap: var(--gap); }
  .slot .lbl { font-size: .65em; }
  .slots.six, .deck.six { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); justify-items: center; }
  .slots.six .slot { width: 100%; min-height: calc(var(--cible) * 1.5); }
  .deck.six .order-card .sign { width: var(--cible); height: var(--cible); }
}

/* ---------- gentle feedback (never red, never a cross) ---------- */
.back { animation: back .5s ease; }
.blink { animation: blink 1s ease-in-out 3; }
.shown { animation: shown 1.2s ease; box-shadow: 0 0 0 6px var(--amber); }

/* ---------- adult panel ---------- */
.veil { position: fixed; inset: 0; background: rgba(29, 29, 29, .45); display: flex; align-items: center; justify-content: center; padding: var(--gap); z-index: 10; }
.panel {
  background: var(--paper); border-radius: var(--radius);
  width: min(100%, 44em); max-height: 100%;
  display: flex; flex-direction: column; overflow: hidden;
  font-size: max(18px, calc(var(--texte) * .8));
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: var(--gap); background: var(--violet); }
.panel-head h2 { font-size: 1.1em; text-transform: uppercase; }
.panel-body { overflow-y: auto; padding: var(--gap) calc(var(--gap) * 1.5) calc(var(--gap) * 2); -webkit-user-select: text; user-select: text; line-height: 1.45; }
.panel-body h3 { font-size: 1em; margin: 1em 0 .3em; color: #5C5A3C; text-transform: uppercase; letter-spacing: .02em; }
.panel-body ul { margin: 0; padding-left: 1.2em; }
.panel-body li { margin: .25em 0; }
.panel-body .lead { font-weight: 700; margin: 0 0 .6em; }
.panel-body .motto { margin: 1em 0 0; padding: .5em .8em; background: var(--honey); border-radius: 12px; font-weight: 700; }
.panel-body .nobook li strong { display: block; }
.panel-body .note { font-size: .88em; margin: .4em 0; color: #3A3A34; }

/* ---------- failure ---------- */
.reload { margin: auto; width: calc(var(--cible) * 3); min-height: calc(var(--cible) * 2); flex-direction: column; border-radius: var(--radius); background: var(--honey); }
.reload .ico { width: 40%; height: auto; }
.speaker { width: calc(var(--cible) * .8); }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceIn { 0% { opacity: 0; transform: translateY(-60px) scale(.6); } 60% { opacity: 1; transform: translateY(8px) scale(1.05); } 100% { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: none; } 25% { transform: translateY(-6%) rotate(-6deg); } 75% { transform: translateY(4%) rotate(5deg); } }
@keyframes lightUp { from { background-color: transparent; } to { background-color: var(--honey); } }
@keyframes note { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes back { 0%, 100% { transform: none; } 30% { transform: translateX(-10px); } 60% { transform: translateX(8px); } }
@keyframes blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 162, 49, 0); } 50% { box-shadow: 0 0 0 10px rgba(240, 162, 49, .9); } }
@keyframes shown { from { transform: scale(1); } 50% { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes grow { from { opacity: .4; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes hop { 0%, 100% { transform: none; } 50% { transform: translateY(-30%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes fadeOnly { from { opacity: .35; } to { opacity: 1; } }
@keyframes waves { from { transform: scale(.15); } to { transform: none; } }
@keyframes enter { 0% { transform: translateY(70%) scale(.7); } 65% { transform: translateY(-5%) scale(1.03); } 100% { transform: none; } }
@keyframes lightOn { 0% { opacity: .25; } 40% { opacity: 1; } 60% { opacity: .6; } 100% { opacity: 1; } }
@keyframes popSign { 0% { transform: scale(0); } 60% { transform: scale(1.18); } 100% { transform: none; } }
@keyframes scSpark { 0% { transform: scale(0); } 50% { transform: scale(1.1) rotate(45deg); } 100% { transform: scale(0) rotate(90deg); } }
@keyframes spark { 0% { transform: scale(.2); opacity: 1; } 70% { transform: translate(calc(var(--x) * 2.2em), calc(var(--y) * 2.2em)) rotate(45deg); opacity: 1; } 100% { transform: translate(calc(var(--x) * 2.6em), calc(var(--y) * 2.6em)) scale(.3); opacity: 0; } }
@keyframes lightBtn { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes confetti { from { top: -8%; transform: rotate(0); } to { top: 104%; transform: rotate(320deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-name: fadeOnly !important; animation-duration: .5s !important; animation-iteration-count: 1 !important; }
  .feedback.show { animation-name: note !important; animation-duration: 2.6s !important; }
  .pearl.current .bead { animation: none !important; box-shadow: 0 0 0 3px #fff, 0 0 0 10px var(--amber); }
  .wire .thread.draw { animation: none !important; stroke-dashoffset: 0; }
  .phrase.light { animation: none !important; background-color: var(--honey); }
  .verse, .verse * { animation: none !important; }
  /* Home: the final image, still; lit buttons at once, without sparkles or confetti. */
  .ieh[data-screen="arrival"] *, .scene *, .stone .dot { animation: none !important; }
  .eclats, .fete, .scene .sc-eclat { display: none; }
}
.top-right { display: flex; gap: var(--gap); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
