/* ============================================================
   CYBER SPRINT — "Clair & ludique" theme
   Warm cream canvas, soft rounded cards, coral/orange accents.
   Display: Bricolage Grotesque · Body: DM Sans
   (Game logic untouched — only the visual layer changed.)
   ============================================================ */
:root {
  /* warm neutrals */
  --cream:    #fff6ee;
  --cream-2:  #ffeada;
  --card:     #ffffff;
  --ink:      #2b1b14;   /* warm near-black */
  --ink-2:    #5b463c;
  --ink-soft: #9a8074;
  --line:     rgba(43,27,20,.10);

  /* brand warmth */
  --coral:    #ff5a3c;
  --coral-d:  #ef451f;
  --orange:   #ff8a2b;
  --amber:    #ffc24b;

  /* answer semaphore (clear good/bad) */
  --good:     #16b169;
  --good-d:   #11985a;
  --bad:      #ff3b30;
  --bad-d:    #e7281d;

  /* dramatic dark for cyberattaque / loss */
  --danger:   #2b1117;

  /* soft shadows */
  --sh-sm: 0 4px 14px rgba(70,30,15,.10);
  --sh-md: 0 14px 34px rgba(70,30,15,.14);
  --sh-lg: 0 26px 60px rgba(70,30,15,.20);

  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

/* ---- background layers ---- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

/* fine grain for a tactile, non-flat surface */
#grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* warm spotlight behind the home title */
#home-fx {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0; transition: opacity 1.1s ease;
  background:
    radial-gradient(60% 55% at 50% 38%, rgba(255,138,43,.40), transparent 70%),
    radial-gradient(40% 40% at 70% 65%, rgba(255,90,60,.28), transparent 70%);
}
#home-fx.on { opacity: 1; animation: glow-breathe 7s ease-in-out infinite; }
@keyframes glow-breathe { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

/* celebratory glow ring flashed on a correct answer */
@property --rb-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
#correct-flash {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  padding: 14px;
  background: conic-gradient(from var(--rb-angle),
    #ff8a2b, #ffc24b, #16b169, #ffc24b, #ff5a3c, #ff8a2b);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .12s ease;
  filter: drop-shadow(0 0 18px rgba(255,138,43,.55));
}
#correct-flash.show { opacity: 1; animation: rb-spin 1.1s linear infinite; }
@keyframes rb-spin { to { --rb-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { #correct-flash.show { animation: none; } }

main#screen {
  position: relative; z-index: 3;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.hidden { display: none !important; }

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between;
  padding: 26px 40px; pointer-events: none;
}
.hud-block {
  background: rgba(255,255,255,.66);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 22px;
  box-shadow: var(--sh-sm);
  backdrop-filter: blur(8px);
}
.hud-right { text-align: right; }
.hud-label {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}
.hud-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 42px; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.04;
}
.hud-right .hud-value { color: var(--coral-d); }
/* dark screens (cyberattaque / clic) -> glassy dark chips */
.hud.invert .hud-block { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); }
.hud.invert .hud-label { color: rgba(255,255,255,.72); }
.hud.invert .hud-value { color: #fff; }
.hud.invert .hud-right .hud-value { color: var(--amber); }
/* softly fading timer on the "Comment jouer ?" / countdown screen */
.hud-value.blink { animation: softblink 1.6s ease-in-out infinite; }
@keyframes softblink { 0%,100% { opacity: 1; } 50% { opacity: .18; } }

/* ============================================================
   Generic helpers
   ============================================================ */
.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pop-in { animation: popIn .42s var(--ease-bounce) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, var(--orange), var(--coral) 60%, var(--coral-d));
  color: #fff; border: none; border-radius: 999px;
  padding: 22px 64px;
  font-family: 'DM Sans', sans-serif;
  font-size: 26px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(255,90,60,.40), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .18s var(--ease-bounce), box-shadow .2s ease, filter .2s ease;
}
.btn-primary::after {                /* soft top shine */
  content: ""; position: absolute; inset: 2px 2px 50%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(rgba(255,255,255,.30), transparent);
  pointer-events: none;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 40px rgba(255,90,60,.48); filter: saturate(1.05); }
.btn-primary:active { transform: translateY(0) scale(.99); }

.link-btn {
  background: none; border: none; color: var(--ink-2);
  font-family: inherit; font-size: 20px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.link-btn:hover { color: var(--coral-d); background: rgba(255,90,60,.08); transform: translateY(-1px); }
.link-btn svg { width: 24px; height: 24px; }

.btn-pill {
  margin-top: 30px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 18px 52px;
  font-family: inherit; font-size: 22px; font-weight: 600;
  cursor: pointer; box-shadow: var(--sh-sm);
  transition: transform .16s var(--ease-bounce), box-shadow .2s ease;
}
.btn-pill:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.btn-pill:active { transform: translateY(0); }

/* ============================================================
   HOME
   ============================================================ */
.home { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; }
.home-kicker {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(13px, 1.5vw, 19px); font-weight: 700; letter-spacing: .26em;
  text-transform: uppercase; color: var(--coral-d); margin-bottom: 14px;
}
.home-title { margin: 0; animation: title-float 5.5s ease-in-out infinite; transform-origin: center; }
@keyframes title-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.home-tag {
  margin-top: 22px; font-size: clamp(18px, 2.1vw, 27px); font-weight: 500;
  color: var(--ink-2); max-width: 22ch; line-height: 1.3;
}

.home h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(72px, 13vw, 188px);
  font-weight: 800; line-height: .86; letter-spacing: -.035em;
  color: var(--ink);
  text-shadow: 0 8px 0 rgba(255,90,60,.10);
}
.home .sub {
  display: inline-block; margin-top: 18px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(20px, 3vw, 38px); font-weight: 700; letter-spacing: .14em;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  padding: 8px 26px; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255,90,60,.34);
  transform: rotate(-2deg);
  animation: sub-wiggle 4s ease-in-out infinite;
}
@keyframes sub-wiggle { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) scale(1.03); } }

.home .actions { margin-top: 44px; display: flex; flex-direction: row; align-items: center; gap: 30px; flex-wrap: wrap; }
.home .btn-primary { padding: 30px 88px; font-size: 38px; }
.home .link-btn { font-size: 22px; }
.home .link-btn svg { width: 28px; height: 28px; }

/* ============================================================
   CLASSEMENT
   ============================================================ */
.board { width: min(720px, 92vw); text-align: center; }
.board h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(42px, 6vw, 66px); font-weight: 800;
  color: var(--ink); letter-spacing: -.02em; margin-bottom: 26px;
}
.board-list {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 24px;
  padding: 10px 18px; box-shadow: var(--sh-md); border: 1px solid var(--line);
}
.board-row {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 10px; border-top: 1px solid var(--line); color: var(--ink-2);
}
.board-row:first-child { border-top: none; }
.board-rank {
  width: 40px; text-align: center; font-weight: 800; font-size: 19px;
  color: var(--ink-soft); flex: none;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.board-rank.medal { font-size: 26px; }
.board-name {
  flex: 1; text-align: left; font-size: 18px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-score {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 20px; color: var(--coral-d);
}
.board-row.you {
  background: linear-gradient(135deg, rgba(255,138,43,.16), rgba(255,90,60,.16));
  border-radius: 14px; border-top-color: transparent;
}
.board-row.you + .board-row { border-top-color: transparent; }
.board-row.you .board-name { color: var(--coral-d); }
.board-foot { margin-top: 16px; font-size: 12px; color: var(--ink-soft); letter-spacing: .05em; }

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(160px, 32vw, 400px); font-weight: 800;
  color: var(--ink); line-height: 1; letter-spacing: -.03em;
  animation: countPop .8s var(--ease-bounce) both;
  text-shadow: 0 14px 0 rgba(255,90,60,.12);
}
.countdown.go {
  background: linear-gradient(135deg, var(--orange), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: clamp(96px, 19vw, 230px);
}
@keyframes countPop {
  0% { opacity: 0; transform: scale(.4); }
  45% { opacity: 1; transform: scale(1.14); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   RULES
   ============================================================ */
.rules-overlay {
  position: fixed; inset: 0; z-index: 6;
  background: rgba(255,238,222,.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.rules { text-align: center; width: min(1140px, 94vw); }
.rules-head { margin-bottom: 28px; }
.rules-kicker {
  display: block; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase;
  color: var(--coral-d); margin-bottom: 8px;
}
.rules h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 800;
  color: var(--ink); margin: 0; line-height: 1;
}
.rules .btn-primary { margin: 32px auto 0; }
.rules-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.rule-card {
  counter-increment: step;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 28px 26px; text-align: left;
  box-shadow: var(--sh-md);
  transition: transform .25s var(--ease-bounce);
}
.rule-card::before {
  content: "0" counter(step);
  display: block; font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 40px; font-weight: 800; line-height: 1; color: var(--coral);
  letter-spacing: -.02em; margin-bottom: 14px;
}
.rule-card:hover { transform: translateY(-6px); }
.rule-card:nth-child(1) { animation: card-in .5s var(--ease-bounce) both .05s; }
.rule-card:nth-child(2) { animation: card-in .5s var(--ease-bounce) both .14s; }
.rule-card:nth-child(3) { animation: card-in .5s var(--ease-bounce) both .23s; }
@keyframes card-in { from { transform: translateY(26px) scale(.97); } to { transform: none; } }
.rule-card .ic {
  width: 56px; height: 56px; margin: 0 0 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,138,43,.18), rgba(255,90,60,.18));
  display: flex; align-items: center; justify-content: center;
}
.rule-card .ic svg { width: 30px; height: 30px; stroke: var(--coral-d); }
.rule-card p { font-size: 17px; line-height: 1.5; color: var(--ink-2); font-weight: 500; }
.rule-card .note {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-soft); font-weight: 500;
  display: flex; align-items: flex-start; gap: 8px; justify-content: flex-start; line-height: 1.4;
}
.rule-card .note svg { width: 19px; height: 19px; flex: none; stroke: var(--orange); margin-top: 1px; }

/* ============================================================
   QUESTION (gameplay)
   ============================================================ */
/* Gameplay content is centred in the space ABOVE the fixed answer bar,
   so long questions never collide with the buttons. */
.q { width: min(1000px, 95vw); text-align: center; display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(230px, 34vh, 320px); }
.q-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(36px, 5vw, 56px); font-weight: 800; color: var(--ink);
  line-height: 1.12; letter-spacing: -.02em; margin-bottom: 30px; max-width: 860px;
}
.reflex-stmt { display: flex; flex-direction: column; align-items: center; }
.q-title.reflexq {
  text-transform: uppercase; font-style: normal; font-weight: 800;
  font-size: clamp(30px, 4.2vw, 46px); max-width: 880px; margin-bottom: 0;
}

.q-cap {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 600; color: var(--ink-soft); margin-bottom: 16px;
}
.q-cap svg { width: 28px; height: 28px; stroke: var(--ink-soft); }

/* URL pill */
.q-pill {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 24px 46px; font-size: clamp(22px, 2.7vw, 30px);
  color: var(--ink); font-weight: 600; box-shadow: var(--sh-md);
  max-width: 92vw; overflow-wrap: anywhere;
}
.q-pill svg { width: 24px; height: 24px; stroke: var(--coral-d); flex: none; }

/* Password box */
.q-box {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 20px;
  padding: 30px 44px; font-size: clamp(32px, 4.6vw, 54px); font-weight: 600;
  color: var(--ink); letter-spacing: .01em; box-shadow: var(--sh-md);
  max-width: 90vw; overflow-wrap: anywhere;
  font-feature-settings: "tnum";
}

/* SMS bubble */
.sms { width: min(480px, 90vw); text-align: left; }
.sms-head {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-weight: 700; font-size: 23px; color: var(--ink); margin-bottom: 14px;
}
.sms-head svg { width: 30px; height: 30px; fill: var(--coral-d); }
.sms-bubble {
  background: var(--card); border-radius: 6px 22px 22px 22px;
  padding: 22px 24px 16px; font-size: 20.5px; line-height: 1.45; color: var(--ink-2);
  box-shadow: var(--sh-md); border: 1px solid var(--line);
}
.sms-time { display: block; text-align: right; font-size: 14px; color: var(--ink-soft); margin-top: 8px; }

.q-title.practice { margin-bottom: 0; }
.thumb { font-size: 50px; margin-bottom: 18px; }

/* Answer buttons — anchored near the bottom of the screen */
.q-answers, .attack-answers {
  position: fixed; bottom: 8vh; left: 50%; transform: translateX(-50%);
  display: flex; gap: 28px; justify-content: center; z-index: 4;
}
.ans {
  position: relative; min-width: 246px;
  border: none; border-radius: 20px;
  padding: 32px 52px 28px; font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap;
  transition: transform .14s var(--ease-bounce), box-shadow .18s ease, filter .14s ease;
}
.ans::after { content: ""; position: absolute; inset: 2px 2px 55%; border-radius: 18px 18px 30% 30%; background: linear-gradient(rgba(255,255,255,.22), transparent); pointer-events: none; }
.ans:hover { transform: translateY(-4px); filter: brightness(1.04); }
.ans:active { transform: translateY(-1px); }
.ans.green { background: linear-gradient(135deg, var(--good), var(--good-d)); box-shadow: 0 14px 28px rgba(22,177,105,.36); }
.ans.red   { background: linear-gradient(135deg, var(--bad), var(--bad-d));   box-shadow: 0 14px 28px rgba(255,59,48,.34); }
.ans .key {
  position: absolute; top: 12px; left: 12px; width: 32px; height: 32px;
  border: 1.5px solid rgba(255,255,255,.65); border-radius: 8px;
  font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  opacity: .9; background: rgba(255,255,255,.12);
}
.ans.correct { animation: ansPop .5s var(--ease-bounce); }
.ans.wrong   { animation: ansShake .5s ease; }
@keyframes ansPop { 0% { transform: scale(1); } 40% { transform: scale(1.08); filter: brightness(1.25); } 100% { transform: scale(1); } }
@keyframes ansShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 60% { transform: translateX(9px); } }

/* ============================================================
   CYBERATTAQUE (dramatic dark moment)
   ============================================================ */
.attack { width: min(880px, 95vw); text-align: center; display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(230px, 34vh, 320px); }
.attack-q {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(28px, 3.9vw, 44px); font-weight: 700; color: #fff7f2;
  text-shadow: 0 2px 22px rgba(0,0,0,.55); margin-bottom: 28px;
  max-width: 800px; line-height: 1.25;
}
.attack-q.caps { text-transform: uppercase; letter-spacing: .01em; }

.attack-intro { text-align: center; color: #fff7f2; }
.attack-intro-skull {
  font-size: clamp(76px, 14vw, 156px); line-height: 1;
  filter: drop-shadow(0 0 26px rgba(255,90,60,.8));
  animation: attack-pulse 1s ease-in-out infinite;
}
.attack-intro-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  margin-top: 8px; font-size: clamp(54px, 11vw, 134px); font-weight: 800; letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 0 30px rgba(255,90,60,.9), 0 0 10px rgba(255,196,75,.4);
  animation: attack-throb 1.4s ease-in-out infinite;
}
.attack-intro-sub { margin-top: 18px; font-size: clamp(17px, 2.6vw, 28px); font-weight: 600; color: #ffd8cd; }
.attack-intro-sub b { color: var(--coral); letter-spacing: .04em; }
@keyframes attack-pulse { 50% { transform: scale(1.12); } }
@keyframes attack-throb { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.attack .ans {
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,138,43,.55);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}
.attack .ans::after { display: none; }
.attack .ans:hover { background: rgba(255,138,43,.18); border-color: var(--coral); }

/* ============================================================
   CLIC minigame
   ============================================================ */
.clic-screen {
  position: fixed; inset: 0; z-index: 4;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--orange), transparent 60%),
    linear-gradient(160deg, var(--coral), var(--coral-d));
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff;
}
.clic-hint { font-size: clamp(20px, 2.9vw, 31px); font-weight: 600; margin-bottom: 30px; }
.clic-btn {
  width: min(660px, 88vw); background: rgba(255,255,255,.14);
  border: 3px solid rgba(255,255,255,.85); border-radius: 22px; color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(34px, 5.6vw, 60px); font-weight: 800; padding: 40px 0; cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
  transition: transform .05s ease, background .08s;
}
.clic-btn:active { transform: scale(.98); background: rgba(255,255,255,.26); }
.clic-bar {
  margin-top: 28px; width: min(660px, 88vw); height: 84px;
  border: 3px solid rgba(255,255,255,.85); border-radius: 22px; overflow: hidden;
  background: rgba(255,255,255,.14);
}
.clic-bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #fff, var(--amber));
  transition: width .08s ease-out;
}
.clic-foot { position: fixed; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 18px; color: rgba(255,255,255,.92); }
.kbd { border: 1.5px solid rgba(255,255,255,.7); border-radius: 7px; padding: 3px 10px; margin-left: 6px; font-size: 15px; font-weight: 600; }

/* ============================================================
   FULLSCREEN STATES (game over / hacked / explication / score / pseudo)
   ============================================================ */
.fs {
  position: fixed; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.fs.red {
  background:
    radial-gradient(110% 80% at 50% 0%, var(--coral), transparent 55%),
    linear-gradient(160deg, var(--coral-d), #c01f25);
  color: #fff;
}
.fs-huge {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(66px, 16vw, 220px); font-weight: 800; line-height: .9; letter-spacing: -.03em;
  text-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.fs-mid { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(40px, 9vw, 120px); font-weight: 800; letter-spacing: -.02em; }

/* Explication */
.expl { padding: 0 8vw; }
.expl .verdict { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(56px, 11vw, 130px); font-weight: 800; }
.expl p { margin-top: 20px; font-size: clamp(19px, 2.8vw, 26px); font-weight: 500; line-height: 1.55; max-width: 660px; opacity: .96; }
.expl .btn-pill { position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%); }
.expl .btn-pill:hover { transform: translateX(-50%) translateY(-3px); }

/* Score */
.score-screen .label {
  font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: .14em;
  color: var(--ink-soft); text-transform: uppercase; margin-bottom: 8px;
}
.score-screen .big {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(80px, 14vw, 180px); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Pseudo */
.pseudo { width: min(1060px, 96vw); text-align: center; }
.pseudo h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; color: var(--ink); margin-bottom: 44px;
}
.pseudo-input {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(34px, 5.6vw, 54px); font-weight: 800; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  min-height: 1.5em; min-width: 360px; display: inline-block;
  padding: 12px 22px; margin-bottom: 34px; letter-spacing: .06em; box-shadow: var(--sh-sm);
}
.pseudo-input .caret { color: var(--coral); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.keyboard { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.kb-row { display: flex; gap: clamp(6px, 0.9vw, 12px); flex-wrap: wrap; justify-content: center; }
.kb-key {
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  font-family: inherit; font-size: clamp(26px, 3.6vw, 40px); font-weight: 700;
  cursor: pointer; padding: 18px 14px; border-radius: 16px; min-width: 92px;
  box-shadow: var(--sh-sm);
  transition: transform .1s ease, background .12s, color .12s;
}
.kb-key:hover { background: linear-gradient(135deg, var(--orange), var(--coral)); color: #fff; transform: translateY(-2px); }
.kb-key.boxed { color: var(--coral-d); }
.kb-key.space { min-width: 0; padding: 18px 160px; font-size: 22px; letter-spacing: .1em; }
.pseudo .btn-primary { margin-top: 26px; }

@media (max-width: 720px) {
  .rules-cards { grid-template-columns: 1fr; }
  .home .actions { gap: 18px; }
  .hud { padding: 14px 16px; }
  .hud-block { padding: 8px 14px; border-radius: 14px; }
  .hud-value { font-size: 30px; }
  .ans { min-width: 0; padding: 24px 30px 22px; font-size: 24px; }
  .q-answers, .attack-answers { gap: 16px; bottom: 6vh; }
}
@media (prefers-reduced-motion: reduce) {
  .home-title, .home .sub, #home-fx.on, .attack-intro-skull, .attack-intro-title,
  .rule-card, .fade-in, .pop-in, .hud-value.blink { animation: none; }
}
