:root {
  --game-navy: #0d2f57;
  --game-blue: #149ddd;
  --game-blue-dark: #0877b4;
  --game-bg: #f3f7fb;
  --game-panel: #ffffff;
  --game-text: #16283c;
  --game-muted: #6d7b8b;
  --game-border: #dbe5ef;
  --ntt-correct: #1677d2;
  --ntt-present: #ed8b23;
  --ntt-absent: #7d8792;
}

body { background: var(--game-bg); }
.game-page { min-height: 100vh; color: var(--game-text); background: radial-gradient(circle at 15% 0%, #e7f5ff 0, transparent 30%), var(--game-bg); font-family: "Open Sans", sans-serif; }
.game-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(18px, 4vw, 60px); background: #fff; border-bottom: 1px solid var(--game-border); position: sticky; top: 0; z-index: 40; box-shadow: 0 3px 18px rgba(22, 40, 60, .05); }
.game-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--game-navy); font-weight: 700; font-size: 18px; }
.game-brand:hover { color: var(--game-blue); }
.game-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--game-navy), var(--game-blue)); color: #fff; font-size: 12px; letter-spacing: .6px; }
.game-topbar-actions { display: flex; align-items: center; gap: 14px; }
.game-back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--game-navy); font-weight: 600; }
.game-back-link i { font-size: 22px; }
.game-lang-switch { display: flex; border: 1px solid var(--game-border); border-radius: 10px; padding: 3px; background: #f8fafc; }
.game-lang-switch a { padding: 5px 8px; border-radius: 7px; font-size: 12px; color: var(--game-muted); font-weight: 700; }
.game-lang-switch a.is-active { background: var(--game-navy); color: #fff; }
.game-main { width: min(100% - 32px, 960px); margin: 0 auto; padding: 42px 0 64px; }
.game-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 24px; }
.game-intro h1 { font-size: clamp(44px, 8vw, 72px); line-height: .95; margin: 8px 0 14px; color: var(--game-navy); font-weight: 800; letter-spacing: -2px; }
.game-intro p { max-width: 650px; margin: 0; color: var(--game-muted); font-size: 16px; line-height: 1.65; }
.game-kicker { display: inline-block; color: var(--game-blue-dark); text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 800; }
.game-score-zone, .ntt-stats { display: flex; gap: 10px; flex-shrink: 0; }
.game-score-card { min-width: 100px; padding: 10px 14px; text-align: center; background: #fff; border: 1px solid var(--game-border); border-radius: 14px; box-shadow: 0 10px 28px rgba(30, 65, 100, .08); }
.game-score-card span { display: block; color: var(--game-muted); text-transform: uppercase; font-size: 10px; letter-spacing: .7px; font-weight: 800; }
.game-score-card strong { display: block; margin-top: 2px; color: var(--game-navy); font-size: 22px; }
.game-card { background: var(--game-panel); border: 1px solid var(--game-border); border-radius: 24px; padding: clamp(18px, 4vw, 34px); box-shadow: 0 22px 65px rgba(21, 48, 77, .10); }
.game-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
.game-button { border: 0; border-radius: 12px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.game-button:hover { transform: translateY(-1px); }
.game-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.game-button-primary { color: #fff; background: linear-gradient(135deg, var(--game-navy), var(--game-blue)); box-shadow: 0 9px 20px rgba(20, 157, 221, .2); }
.game-button-secondary { color: var(--game-navy); background: #edf4fa; }

/* 2048 */
.game-2048-board-wrap { width: min(100%, 580px); margin: 0 auto; position: relative; }
.game-2048-board { aspect-ratio: 1 / 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 14px); padding: clamp(9px, 2vw, 14px); border-radius: 20px; background: #93a8ba; touch-action: none; user-select: none; overflow: hidden; }
.game-2048-cell { display: grid; place-items: center; min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: hidden; border-radius: 14px; background: rgba(235, 241, 246, .65); color: #25415c; font-weight: 800; font-size: clamp(24px, 7vw, 48px); line-height: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.game-2048-cell span { display: block; max-width: 100%; white-space: nowrap; animation: tilePop .15s ease-out; }
.tile-new span { animation: tileNew .22s cubic-bezier(.34,1.56,.64,1); }
.tile-2 { background: #eef4f7; }.tile-4 { background: #dcecf3; }.tile-8 { background: #90d4ef; color: #083f63; }.tile-16 { background: #51b8e3; color: #fff; }.tile-32 { background: #268fc7; color: #fff; }.tile-64 { background: #166ca7; color: #fff; }.tile-128 { background: #f7ca61; color: #503b0d; }.tile-256 { background: #f1b743; color: #fff; }.tile-512 { background: #ea992a; color: #fff; }.tile-1024 { background: #e37920; color: #fff; font-size: clamp(20px, 6vw, 42px); }.tile-2048, .tile-super { background: linear-gradient(135deg, #183d68, #149ddd); color: #fff; font-size: clamp(20px, 6vw, 40px); box-shadow: 0 0 24px rgba(20,157,221,.45); }
@keyframes tilePop { from { transform: scale(.92); } to { transform: scale(1); } }
@keyframes tileNew { from { transform: scale(.35); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.game-overlay { position: absolute; inset: 0; z-index: 20; border-radius: 20px; background: rgba(8, 25, 44, .82); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.game-overlay[hidden] { display: none; }
.game-overlay-card { max-width: 390px; padding: 28px; border-radius: 20px; text-align: center; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.game-overlay-icon { font-size: 44px; }.game-overlay-card h2 { margin: 8px 0; color: var(--game-navy); }.game-overlay-card p { color: var(--game-muted); }.game-overlay-actions { display: flex; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.game-help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.game-help-grid > div { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; padding: 14px; border: 1px solid var(--game-border); border-radius: 14px; background: #f9fbfd; }
.game-help-grid i { grid-row: 1 / 3; color: var(--game-blue); font-size: 24px; }.game-help-grid strong { color: var(--game-navy); font-size: 13px; }.game-help-grid span { color: var(--game-muted); font-size: 11px; line-height: 1.4; }

/* N TT-cash */
.ntt-main { width: min(100% - 32px, 1020px); }.ntt-card { position: relative; }.ntt-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px 14px; margin-bottom: 22px; border-radius: 13px; background: #f7fafc; color: var(--game-muted); font-size: 12px; }.ntt-legend span { display: inline-flex; align-items: center; gap: 6px; }.ntt-dot { width: 10px; height: 10px; border-radius: 50%; }.ntt-dot.is-correct { background: var(--ntt-correct); }.ntt-dot.is-present { background: var(--ntt-present); }.ntt-dot.is-absent { background: var(--ntt-absent); }
.ntt-game-zone { max-width: 720px; margin: 0 auto; }.ntt-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--game-muted); font-size: 13px; }.ntt-label-row strong { color: var(--game-navy); letter-spacing: 3px; font-size: 15px; }
.ntt-history { display: grid; gap: 9px; margin-bottom: 9px; }.ntt-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(5px, 1.2vw, 9px); }.ntt-tile { aspect-ratio: 1 / 1; min-width: 0; display: grid; place-items: center; border-radius: 12px; border: 2px solid #dce5ed; background: #fff; color: var(--game-navy); font-size: clamp(18px, 4vw, 30px); font-weight: 800; transition: transform .2s ease, background .2s ease; }.ntt-tile.is-filled { border-color: #a8c4d9; background: #f6fbff; transform: translateY(-1px); }.ntt-tile.is-revealed { border-color: var(--ntt-correct); background: #e9f4ff; color: var(--ntt-correct); }.ntt-history-row .ntt-tile { color: #fff; border-color: transparent; animation: nttFlip .38s ease both; }.ntt-tile.is-correct { background: var(--ntt-correct); }.ntt-tile.is-present { background: var(--ntt-present); }.ntt-tile.is-absent { background: var(--ntt-absent); }
@keyframes nttFlip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.ntt-current { margin-top: 5px; }.ntt-message { min-height: 24px; margin: 13px 0 10px; text-align: center; font-size: 13px; font-weight: 600; }.ntt-message.is-warning { color: #b26109; }.ntt-message.is-info { color: #42637e; }
.ntt-keypad { max-width: 420px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.ntt-keypad button { min-height: 52px; border: 1px solid var(--game-border); border-radius: 12px; background: #f8fbfd; color: var(--game-navy); font-size: 19px; font-weight: 800; cursor: pointer; transition: .18s ease; }.ntt-keypad button:hover { background: #edf6fc; border-color: #b9d9eb; transform: translateY(-1px); }.ntt-keypad .ntt-key-special { background: #eaf2f8; font-size: 24px; }.ntt-keypad .ntt-key-submit { background: linear-gradient(135deg, var(--game-navy), var(--game-blue)); color: #fff; border-color: transparent; }.ntt-actions { text-align: center; margin-top: 16px; }
.game-result-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(4, 20, 37, .76); backdrop-filter: blur(7px); }.game-result-modal[hidden] { display: none; }.game-result-dialog { width: min(100%, 460px); padding: 34px; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 26px 80px rgba(0,0,0,.3); }.game-result-icon { font-size: 52px; }.game-result-dialog h2 { color: var(--game-navy); margin: 8px 0; }.game-result-dialog p { color: var(--game-muted); line-height: 1.6; }.ntt-result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }.ntt-result-stats > div { padding: 12px; border-radius: 13px; background: #f3f7fb; }.ntt-result-stats span { display: block; color: var(--game-muted); font-size: 11px; text-transform: uppercase; }.ntt-result-stats strong { color: var(--game-navy); font-size: 22px; }
.fireworks-canvas { pointer-events: none; position: fixed; inset: 0; z-index: 1200; display: none; }.fireworks-canvas.is-active { display: block; }

@media (max-width: 760px) {
  .game-topbar { min-height: 62px; padding: 10px 14px; }.game-brand > span:last-child { display: none; }.game-back-link { font-size: 12px; }.game-main { width: min(100% - 20px, 960px); padding: 26px 0 42px; }.game-intro { align-items: flex-start; flex-direction: column; gap: 16px; }.game-intro h1 { margin-bottom: 10px; }.game-score-zone, .ntt-stats { width: 100%; }.game-score-card { flex: 1; min-width: 0; }.game-card { border-radius: 18px; padding: 14px; }.game-toolbar { justify-content: stretch; }.game-toolbar .game-button { flex: 1; padding: 10px; }.game-2048-board { border-radius: 15px; }.game-2048-cell { border-radius: 9px; }.game-help-grid { grid-template-columns: 1fr; }.ntt-legend { gap: 8px 12px; }.ntt-tile { border-radius: 8px; }.ntt-keypad { max-width: 100%; }.ntt-keypad button { min-height: 48px; }
}

@media (max-width: 420px) {
  .game-topbar-actions { gap: 8px; }.game-back-link span { display: none; }.game-lang-switch a { padding: 4px 6px; }.ntt-row { gap: 4px; }.ntt-tile { border-width: 1px; border-radius: 6px; font-size: 17px; }.game-result-dialog { padding: 26px 18px; }
}

/* ==============================================================
   V15 - N TT-cash spheres + Mot Mystère
   ============================================================== */
.game-button-ghost { color: #51677d; background: #fff; border: 1px solid var(--game-border); }
.ntt-actions-v15 { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.ntt-key-spacer { min-height:52px; }

/* Spherical digits inspired by the TV-game visual language, rendered in CSS (no heavy images). */
.ntt-row { align-items:center; }
.ntt-sphere {
  aspect-ratio: 1 / 1;
  width:100%;
  min-width:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#24384b;
  font-size:clamp(18px, 4vw, 31px);
  font-weight:800;
  text-shadow:0 1px 0 rgba(255,255,255,.45);
  background: radial-gradient(circle at 31% 27%, #ffffff 0 7%, #eceff2 13%, #b8bec5 42%, #7f8790 72%, #5f6770 100%);
  border:1px solid rgba(58,73,87,.25);
  box-shadow: inset -10px -13px 18px rgba(24,34,44,.28), inset 7px 7px 12px rgba(255,255,255,.45), 0 8px 14px rgba(26,43,59,.18);
  transform-style:preserve-3d;
  backface-visibility:hidden;
}
.ntt-sphere:empty { opacity:.50; }
.ntt-sphere.is-filled { opacity:1; color:#112b43; transform:scale(1.03); }
.ntt-sphere.is-revealed {
  opacity:1;
  color:#fff;
  text-shadow:0 2px 3px rgba(0,0,0,.55);
  background:radial-gradient(circle at 31% 27%, #aeb3b8 0 5%, #595e64 15%, #1d2024 48%, #090a0c 76%, #000 100%);
  border-color:#050607;
  box-shadow:inset -13px -15px 19px rgba(0,0,0,.72), inset 8px 8px 13px rgba(255,255,255,.16), 0 9px 17px rgba(0,0,0,.28);
}
.ntt-sphere.is-correct {
  opacity:1; color:#fff; text-shadow:0 2px 3px rgba(0,47,85,.65);
  background:radial-gradient(circle at 31% 27%, #c8fbff 0 4%, #54e8f8 12%, #1ba6ea 40%, #0965b7 69%, #073d80 100%);
  border-color:#0c68af; box-shadow:inset -12px -14px 18px rgba(4,43,106,.52), inset 8px 8px 13px rgba(255,255,255,.35), 0 8px 16px rgba(22,119,210,.30);
}
.ntt-sphere.is-present {
  opacity:1; color:#fff; text-shadow:0 2px 3px rgba(112,55,0,.55);
  background:radial-gradient(circle at 31% 27%, #fff0be 0 4%, #ffca54 12%, #ff9f15 43%, #ed7912 72%, #b54d08 100%);
  border-color:#e37914; box-shadow:inset -12px -14px 18px rgba(140,60,0,.42), inset 8px 8px 13px rgba(255,255,255,.32), 0 8px 16px rgba(237,139,35,.30);
}
.ntt-sphere.is-absent {
  opacity:1; color:#fff; text-shadow:0 2px 3px rgba(32,36,42,.5);
  background:radial-gradient(circle at 31% 27%, #f1f3f5 0 5%, #b8bdc3 14%, #7c838b 45%, #555c65 73%, #363c43 100%);
  border-color:#69717a; box-shadow:inset -12px -14px 18px rgba(37,43,50,.42), inset 8px 8px 13px rgba(255,255,255,.28), 0 8px 16px rgba(65,73,82,.23);
}
.ntt-sphere.is-evaluating { animation: nttSphereTurn .68s cubic-bezier(.3,.8,.25,1) both; }
.ntt-history-row .ntt-sphere { animation: nttHistoryIn .26s ease both; }
@keyframes nttSphereTurn { 0%{transform:perspective(700px) rotateY(0deg) scale(1)} 45%{transform:perspective(700px) rotateY(180deg) scale(.88)} 100%{transform:perspective(700px) rotateY(360deg) scale(1)} }
@keyframes nttHistoryIn { from{opacity:.2;transform:translateY(-4px) scale(.94)} to{opacity:1;transform:none} }

/* Mystery Word */
.word-main { width:min(100% - 32px, 1120px); }
.word-card { overflow:hidden; }
.word-legend { display:flex; flex-wrap:wrap; gap:10px 18px; padding:12px 14px; margin-bottom:22px; border-radius:13px; background:#f7fafc; color:var(--game-muted); font-size:12px; }
.word-legend span { display:inline-flex; align-items:center; gap:6px; }
.word-dot { width:11px; height:11px; border-radius:3px; display:inline-block; }
.word-dot.is-correct { background:#2b9b55; }.word-dot.is-present { background:#e4b52b; }.word-dot.is-absent { background:#7d8792; }
.word-layout { display:grid; grid-template-columns:minmax(220px, .75fr) minmax(0, 1.8fr); gap:24px; align-items:start; }
.word-hints-panel { border:1px solid var(--game-border); border-radius:18px; padding:18px; background:linear-gradient(160deg,#fbfdff,#f1f7fb); position:sticky; top:92px; }
.word-hints-title { color:var(--game-navy); font-weight:800; display:flex; align-items:center; gap:7px; margin-bottom:12px; }
.word-hints-title i { color:#e8a900; font-size:22px; }
.word-hints { margin:0; padding-left:21px; display:grid; gap:10px; color:#53697e; line-height:1.48; font-size:13px; }
.word-hints li::marker { color:var(--game-blue); font-weight:800; }
.word-game-zone { min-width:0; }
.word-history { display:grid; gap:8px; margin-bottom:8px; }
.word-row { --word-length: 7; display:grid; grid-template-columns:repeat(var(--word-length), minmax(0, 1fr)); gap:clamp(4px, .8vw, 8px); max-width:720px; margin-left:auto; margin-right:auto; }
.word-tile { aspect-ratio:1 / 1; min-width:0; display:grid; place-items:center; border-radius:8px; border:2px solid #cbd7e2; background:#fff; color:var(--game-navy); font-size:clamp(15px,3vw,29px); font-weight:900; box-shadow:0 4px 10px rgba(27,50,71,.05); transform-style:preserve-3d; }
.word-tile.is-filled { border-color:#8eb8d3; background:#f5fbff; }
.word-tile.is-revealed { color:#fff; border-color:#173f65; background:linear-gradient(145deg,#18354f,#0d2f57); }
.word-tile.is-correct { color:#fff; border-color:#258247; background:linear-gradient(145deg,#42b96d,#218949); }
.word-tile.is-present { color:#fff; border-color:#c99a14; background:linear-gradient(145deg,#f0c83e,#d3a41c); }
.word-tile.is-absent { color:#fff; border-color:#6e7780; background:linear-gradient(145deg,#9199a1,#68717a); }
.word-tile.is-evaluating { animation:wordFlip .56s ease both; }
.word-history-row .word-tile { animation:wordHistoryIn .22s ease both; }
@keyframes wordFlip { 0%{transform:perspective(650px) rotateX(0)} 50%{transform:perspective(650px) rotateX(90deg) scale(.96)} 100%{transform:perspective(650px) rotateX(360deg)} }
@keyframes wordHistoryIn { from{opacity:.25;transform:translateY(-3px)} to{opacity:1;transform:none} }
.word-keyboard { max-width:760px; margin:16px auto 0; display:grid; gap:6px; }
.word-keyboard-row { display:flex; justify-content:center; gap:5px; }
.word-keyboard button { flex:0 1 54px; min-width:34px; height:48px; border:0; border-radius:8px; background:#e7edf3; color:#16344e; font-size:14px; font-weight:800; cursor:pointer; transition:.16s ease; }
.word-keyboard button:hover { transform:translateY(-1px); background:#dce8f1; }
.word-keyboard button.is-correct { background:#2b9b55; color:#fff; }.word-keyboard button.is-present { background:#e4b52b; color:#fff; }.word-keyboard button.is-absent { background:#7d8792; color:#fff; opacity:.74; }
.word-keyboard .word-key-back { flex-basis:66px; font-size:22px; }
.word-secret { display:inline-block; margin-top:8px; padding:9px 15px; border-radius:10px; background:#eef5fa; color:var(--game-navy); font-size:24px; letter-spacing:3px; font-weight:900; }

@media (max-width: 860px) {
  .word-layout { grid-template-columns:1fr; }
  .word-hints-panel { position:static; order:2; }
  .word-game-zone { order:1; }
}
@media (max-width: 760px) {
  .ntt-sphere { font-size:clamp(15px,5vw,25px); box-shadow:inset -7px -9px 12px rgba(24,34,44,.25), inset 5px 5px 8px rgba(255,255,255,.35), 0 5px 9px rgba(26,43,59,.13); }
  .ntt-actions-v15 .game-button { flex:1; min-width:0; padding-left:10px; padding-right:10px; }
  .word-main { width:min(100% - 20px,1120px); }
  .word-keyboard button { min-width:0; flex:1 1 0; height:44px; padding:0; font-size:12px; }
  .word-keyboard-row { gap:3px; }
}
@media (max-width: 420px) {
  .ntt-sphere { font-size:15px; }
  .word-tile { border-width:1px; border-radius:5px; font-size:clamp(12px,4.7vw,19px); }
  .word-row { gap:3px; }
  .word-hints-panel { padding:14px; }
  .word-keyboard button { height:40px; font-size:11px; border-radius:6px; }
}

/* ==============================================================
   V16 - Memory game + Werewolf narrator
   ============================================================== */
.memory-main{width:min(100% - 28px,1000px)}.memory-intro{align-items:flex-end}.memory-stats{display:flex;gap:10px;flex-wrap:wrap}.memory-stats .game-score-card{min-width:110px}.memory-card-shell{position:relative;width:min(100%,960px);margin-left:auto;margin-right:auto;padding:10px;background:linear-gradient(145deg,#262254,#17143e);overflow:hidden}.memory-board{--memory-cols:4;--memory-rows:4;display:grid;grid-template-columns:repeat(var(--memory-cols),minmax(0,1fr));gap:8px;min-height:0;width:100%;margin:0 auto}.memory-card{position:relative;aspect-ratio:1/1;border:0;padding:0;background:transparent;perspective:900px;cursor:pointer}.memory-card-inner{position:absolute;inset:0;transition:transform .58s cubic-bezier(.2,.75,.2,1);transform-style:preserve-3d}.memory-card.is-flipped .memory-card-inner,.memory-card.is-matched .memory-card-inner{transform:rotateY(180deg)}.memory-card-back,.memory-card-front{position:absolute;inset:0;display:grid;place-items:center;border-radius:10px;overflow:hidden;backface-visibility:hidden}.memory-card-back{background:linear-gradient(145deg,#302973,#201b58);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07),0 5px 12px rgba(0,0,0,.18)}.memory-card-back:before{content:"";position:absolute;inset:12%;border:1px solid rgba(255,255,255,.08);border-radius:50%;background:radial-gradient(circle,rgba(79,203,255,.14),transparent 68%)}.memory-card-mark{position:relative;z-index:1;width:42%;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;font-weight:900;color:#fff;background:linear-gradient(135deg,#16a6dd,#3c2195);font-size:clamp(10px,2.2vw,23px);box-shadow:0 6px 20px rgba(0,0,0,.28)}.memory-card-front{transform:rotateY(180deg);background:#101827}.memory-card-front img{width:100%;height:100%;object-fit:cover}.memory-match-mark{position:absolute;inset:0;display:grid;place-items:center;background:rgba(24,35,50,.66);opacity:0;transition:opacity .25s}.memory-match-mark i{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#19b875;color:#fff;font-size:28px}.memory-card.is-matched .memory-match-mark{opacity:1}.memory-card.is-matched{filter:saturate(.45)}.memory-start-overlay{position:absolute;inset:10px;display:grid;place-items:center;background:rgba(17,18,47,.57);backdrop-filter:blur(2px);z-index:4}.memory-start-overlay[hidden]{display:none}.memory-play-button{width:190px;height:150px;border-radius:14px;border:2px solid #fff;background:#062e4f;color:#fff;font-weight:900;font-size:24px;box-shadow:0 20px 55px rgba(0,0,0,.32);cursor:pointer;display:grid;place-items:center;align-content:center;gap:4px}.memory-play-button i{font-size:44px}.memory-controls{margin-top:16px;background:#eeebf4}.memory-control-row{display:grid;grid-template-columns:200px 1fr;gap:18px;align-items:center;padding:12px 6px}.memory-control-row>strong{font-size:13px;color:#8a7e9e}.memory-choice-group{display:flex;gap:10px;flex-wrap:wrap}.memory-choice-group button{border:0;border-radius:5px;background:#fff;color:#8d7da7;font-weight:800;min-height:46px;padding:0 26px;cursor:pointer;transition:.2s}.memory-choice-group button.is-active{background:#351093;color:#fff}.memory-choice-group button:hover{transform:translateY(-1px)}.memory-name-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.memory-name-grid input{width:100%;border:1px solid #d7d1e2;border-radius:7px;padding:12px 14px;background:#fff}.memory-actions{text-align:right;padding-top:12px}.memory-scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.memory-player{padding:14px 18px;border-radius:7px 7px 0 0;background:#39228a;color:#fff;text-align:center;transition:.2s}.memory-player>span{display:block;font-size:17px;font-weight:900}.memory-player strong{display:block;margin-top:5px;color:#55d7ff}.memory-player:nth-child(2) strong{color:#ffad1f}.memory-player strong span{font-size:12px}.memory-player.is-active{background:#2f0895;box-shadow:inset 0 -4px 0 #ff9400}.memory-board.is-dense{gap:5px}.memory-board.is-dense .memory-card-back,.memory-board.is-dense .memory-card-front{border-radius:6px}

.wolf-page{--wolf-bg:#0d111b;--wolf-card:#171d2a;--wolf-card2:#202838;--wolf-gold:#d6a84a;--wolf-red:#a63a45;--wolf-blue:#4cb6d6;background:radial-gradient(circle at 50% 0,#263249 0,#111722 38%,#090d14 100%);color:#eef3f7;min-height:100vh}.wolf-topbar{background:rgba(8,12,19,.92);border-bottom:1px solid rgba(255,255,255,.08)}.wolf-brand-mark{background:linear-gradient(135deg,#b27b2a,#e6c36d);color:#121720}.wolf-room-chip{padding:5px 9px;border-radius:8px;background:#2a3243;color:#eac66f;font-weight:900;letter-spacing:2px}.wolf-main{width:min(100% - 28px,1120px)}.wolf-hero{display:grid;grid-template-columns:130px 1fr;gap:24px;align-items:center;margin-bottom:24px}.wolf-logo-wrap{width:120px;height:120px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#2c3649,#0e131d 68%);border:1px solid rgba(226,191,103,.3);box-shadow:0 16px 50px rgba(0,0,0,.3)}.wolf-logo-wrap img{width:84px;height:84px}.wolf-hero h1{font-size:clamp(31px,5vw,54px);margin:5px 0 8px;color:#fff}.wolf-hero p{max-width:760px;color:#aeb9c8;line-height:1.6}.wolf-page .game-kicker{color:#d9af52}.wolf-page .game-card{background:linear-gradient(145deg,rgba(28,35,49,.98),rgba(16,22,32,.98));border:1px solid rgba(255,255,255,.07);box-shadow:0 20px 60px rgba(0,0,0,.25);color:#edf2f7}.wolf-section-title{display:flex;gap:14px;align-items:flex-start;margin-bottom:22px}.wolf-section-title>span{flex:0 0 auto;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(216,173,80,.14);color:#e0b85f;font-weight:900}.wolf-section-title h2{margin:0;color:#fff;font-size:21px}.wolf-section-title p{margin:4px 0 0;color:#94a2b6;font-size:13px}.wolf-create-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.wolf-create-form>label>span,.wolf-create-form legend{display:block;color:#c6cfda;font-size:12px;font-weight:800;margin-bottom:7px}.wolf-create-form input[type=number],.wolf-join-form input{width:100%;border:1px solid #3b4659;border-radius:10px;background:#0d141f;color:#fff;padding:13px 14px;outline:none}.wolf-create-form input:focus,.wolf-join-form input:focus{border-color:#d6a84a;box-shadow:0 0 0 3px rgba(214,168,74,.12)}.wolf-create-form fieldset{grid-column:1/-1;border:1px solid #323c4e;border-radius:12px;padding:13px}.wolf-role-check{display:flex;gap:10px;align-items:flex-start;padding:9px;border-radius:8px}.wolf-role-check:hover{background:rgba(255,255,255,.03)}.wolf-role-check input{margin-top:5px}.wolf-role-check b{display:block;color:#fff}.wolf-role-check small{display:block;color:#8997aa;margin-top:3px}.wolf-create-form .wolf-primary-button{grid-column:1/-1;justify-self:start}.wolf-primary-button{background:linear-gradient(135deg,#b7802f,#e0b75d);color:#15191f;border:0}.wolf-primary-button:disabled{opacity:.35;cursor:not-allowed}.wolf-error{color:#ff7e88;margin:10px 0 0;min-height:20px}.wolf-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:150px;color:#aab6c5}.wolf-loader{width:24px;height:24px;border-radius:50%;border:3px solid #47546a;border-top-color:#e0b75d;animation:wolfSpin .8s linear infinite}@keyframes wolfSpin{to{transform:rotate(360deg)}}.wolf-join-form{display:flex;gap:10px}.wolf-join-form input{flex:1}.wolf-host-layout{display:grid;grid-template-columns:.78fr 1.22fr;gap:18px}.wolf-share-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center}.wolf-qr-shell{background:#fff;padding:12px;border-radius:14px;text-align:center}.wolf-qr-shell img{display:block;width:100%;aspect-ratio:1;object-fit:contain}.wolf-qr-shell span{display:block;color:#263246;font-size:11px;font-weight:800;margin-top:6px}.wolf-room-code{text-align:center}.wolf-room-code>span{display:block;color:#8f9bae;font-size:11px;letter-spacing:1px}.wolf-room-code>strong{display:block;font-size:32px;letter-spacing:5px;color:#e4bc63;margin:7px 0 13px}.wolf-page .game-button-ghost{background:#222b3a;border-color:#3b4659;color:#d3dbe5}.wolf-lobby-players{display:grid;gap:7px;max-height:430px;overflow:auto;padding-right:4px}.wolf-lobby-player{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:10px 12px;border-radius:9px;background:#111925;border:1px solid #2c3749}.wolf-lobby-player>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#253047;color:#9eacc0;font-size:11px}.wolf-lobby-player strong{color:#eef3f7}.wolf-lobby-player em{font-style:normal;font-size:11px;color:#8d9bb0}.wolf-lobby-player.is-ready{border-color:rgba(62,190,127,.38);background:rgba(34,126,84,.12)}.wolf-lobby-player.is-ready em{color:#62d89a}.wolf-lobby-player.is-empty{opacity:.55}.wolf-host-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.wolf-player-layout{display:block}.wolf-role-section{text-align:center}.wolf-role-section .wolf-section-title{text-align:left}.wolf-role-card{width:min(310px,82vw);aspect-ratio:3/4.2;border:0;padding:0;background:transparent;perspective:1100px;cursor:pointer;margin:8px auto 20px}.wolf-role-inner{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .8s cubic-bezier(.2,.8,.2,1)}.wolf-role-card.is-revealed .wolf-role-inner{transform:rotateY(180deg)}.wolf-role-back,.wolf-role-front{position:absolute;inset:0;border-radius:22px;backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px;box-shadow:0 25px 60px rgba(0,0,0,.4);overflow:hidden}.wolf-role-back{background:radial-gradient(circle at 50% 30%,#37465d,#171d2a 60%,#090e15);border:2px solid #8d6b31}.wolf-role-back:before{content:"";position:absolute;inset:10px;border:1px solid rgba(223,183,90,.34);border-radius:16px}.wolf-role-back img{width:130px;height:130px;position:relative;z-index:1}.wolf-role-back b{position:relative;z-index:1;color:#e0bc6c;letter-spacing:3px;margin-top:18px}.wolf-role-front{transform:rotateY(180deg);background:linear-gradient(150deg,#f2eadb,#c9b58c);color:#202028;border:2px solid #e8cc8b}.wolf-role-front:after{content:"";position:absolute;inset:10px;border:1px solid rgba(61,43,19,.22);border-radius:16px}.wolf-role-icon{font-size:74px;position:relative;z-index:1}.wolf-role-front strong{font-size:29px;margin-top:10px;position:relative;z-index:1}.wolf-role-front small{font-size:13px;line-height:1.5;margin-top:12px;position:relative;z-index:1}.wolf-pack{padding:10px 14px;border-radius:9px;background:rgba(162,58,69,.15);border:1px solid rgba(189,79,89,.28);max-width:520px;margin:0 auto 15px;color:#efc0c4}.wolf-stage-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.wolf-stage-bar span{font-size:11px;font-weight:900;letter-spacing:1.5px;color:#d7aa4d}.wolf-stage-bar h2{margin:4px 0;color:#fff;font-size:26px}.wolf-stage-bar p{margin:0;color:#99a6b8;max-width:700px}.wolf-countdown{flex:0 0 74px;height:74px;border-radius:50%;display:grid;place-items:center;border:4px solid #48536a;background:#0c131d;color:#fff;font-weight:900;font-size:25px}.wolf-countdown.is-urgent{border-color:#c74651;color:#ff7d86;animation:wolfPulse 1s infinite}@keyframes wolfPulse{50%{transform:scale(1.06)}}.wolf-narrator{display:flex;align-items:center;gap:9px;padding:11px 13px;margin-bottom:15px;border-radius:10px;background:rgba(67,125,155,.11);border:1px solid rgba(76,182,214,.2);color:#b8dbe5;font-size:12px}.wolf-narrator i{font-size:22px}.wolf-narrator button{margin-left:auto;border:0;background:transparent;color:#b8dbe5;font-size:20px;cursor:pointer}.wolf-players-table{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.wolf-table-player{position:relative;min-height:150px;border-radius:13px;border:1px solid #344056;background:linear-gradient(160deg,#202a3b,#111824);color:#edf2f7;padding:14px 9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow:hidden}.wolf-player-avatar{width:55px;height:68px;border-radius:28px 28px 12px 12px;display:grid;place-items:center;background:#2e3a50;color:#b7c3d2;font-size:31px}.wolf-table-player strong{font-size:13px}.wolf-table-player small{font-size:10px;color:#8190a4}.wolf-table-player.is-dead{filter:grayscale(1);opacity:.55}.wolf-status{position:absolute;left:-28px;top:18px;width:130px;transform:rotate(-34deg);background:#a63a45;color:#fff;font-style:normal;font-size:10px;font-weight:900;padding:5px;text-align:center;letter-spacing:1px;box-shadow:0 2px 8px rgba(0,0,0,.35)}.wolf-status.is-saved{background:#288a61}.wolf-power-panel{padding:15px;margin-bottom:16px;border-radius:13px;background:#0d1520;border:1px solid #303c4f}.wolf-power-panel h3{margin:0 0 12px;color:#fff;font-size:17px}.wolf-power-panel p{color:#8f9db0;font-size:12px}.wolf-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px}.wolf-action-player{border:1px solid #37445a;border-radius:10px;background:#1a2433;color:#e7edf5;padding:10px;display:grid;place-items:center;gap:4px;cursor:pointer}.wolf-action-player:hover,.wolf-action-player.is-selected{border-color:#d7aa4d;background:#302819}.wolf-action-player span{font-size:28px}.wolf-action-player strong{font-size:11px}.wolf-power-result{display:flex;align-items:center;gap:12px;color:#c9d3df}.wolf-power-result>span{font-size:34px}.wolf-power-result strong{color:#fff}.wolf-power-result em{font-style:normal;color:#e4bd63}.wolf-witch-choice{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center}.wolf-witch-choice>span{font-size:40px}.wolf-witch-choice h3{margin:0}.wolf-witch-buttons{display:flex;gap:7px}.wolf-save{background:#218a5b;color:#fff;border:0}.wolf-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:1500;background:#151d2a;border:1px solid #3e4a5e;color:#fff;padding:11px 16px;border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.35)}

@media(max-width:860px){.memory-control-row{grid-template-columns:1fr}.wolf-host-layout{grid-template-columns:1fr}.wolf-hero{grid-template-columns:90px 1fr}.wolf-logo-wrap{width:84px;height:84px}.wolf-logo-wrap img{width:58px;height:58px}.wolf-share-grid{grid-template-columns:160px 1fr}.wolf-create-form{grid-template-columns:1fr 1fr}.wolf-witch-choice{grid-template-columns:auto 1fr}.wolf-witch-buttons{grid-column:1/-1}}
@media(max-width:620px){.memory-main,.wolf-main{width:min(100% - 16px,1120px)}.memory-board{gap:5px;min-height:0}.memory-card-shell{padding:6px}.memory-start-overlay{inset:6px}.memory-choice-group button{flex:1;padding:0 8px;min-width:72px}.memory-name-grid{grid-template-columns:1fr}.memory-scoreboard{gap:4px}.memory-player{padding:10px 8px}.wolf-hero{grid-template-columns:1fr;text-align:center}.wolf-logo-wrap{margin:auto}.wolf-create-form{grid-template-columns:1fr}.wolf-create-form fieldset,.wolf-create-form .wolf-primary-button{grid-column:1}.wolf-share-grid{grid-template-columns:1fr}.wolf-qr-shell{max-width:210px;margin:auto}.wolf-join-form{flex-direction:column}.wolf-stage-bar{align-items:center}.wolf-stage-bar h2{font-size:20px}.wolf-countdown{flex-basis:58px;width:58px;height:58px;font-size:20px;border-width:3px}.wolf-players-table{grid-template-columns:repeat(2,minmax(0,1fr))}.wolf-table-player{min-height:130px}.wolf-role-card{width:min(270px,78vw)}.wolf-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wolf-host-actions .game-button{flex:1;min-width:140px}.wolf-room-code>strong{font-size:26px}}
.wolf-table-player.is-selectable{cursor:pointer}.wolf-table-player.is-selectable:hover{border-color:#d7aa4d;transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.26)}
.wolf-code-join{margin-top:22px;padding-top:18px;border-top:1px solid #303a4b;display:flex;align-items:center;justify-content:space-between;gap:14px;color:#9ca9bb;font-size:12px}.wolf-code-join form{display:flex;gap:8px}.wolf-code-join input{width:120px;border:1px solid #3b4659;border-radius:8px;background:#0d141f;color:#fff;padding:10px 12px;text-transform:uppercase;letter-spacing:2px;font-weight:900}
@media(max-width:620px){.wolf-code-join{align-items:stretch;flex-direction:column}.wolf-code-join form{width:100%}.wolf-code-join input{flex:1;width:auto}}

/* V16.3 - creator is also player */
.wolf-create-form .wolf-host-name{grid-column:1/-1}
@media(max-width:620px){.wolf-create-form .wolf-host-name{grid-column:1}}


/* V16.4 - persistent role card, public eliminated roles, manual day -> night */
.wolf-role-section.is-persistent{margin-bottom:16px;padding:16px 20px}.wolf-role-section.is-persistent .wolf-section-title{margin-bottom:8px}.wolf-role-section.is-persistent .wolf-role-card{width:min(190px,42vw);margin:4px auto 10px}.wolf-role-section.is-persistent .wolf-role-front{padding:16px}.wolf-role-section.is-persistent .wolf-role-icon{font-size:46px}.wolf-role-section.is-persistent .wolf-role-front strong{font-size:20px}.wolf-role-section.is-persistent .wolf-role-front small{font-size:11px}.wolf-role-section.is-persistent .wolf-pack{margin-bottom:0}.wolf-table-player.is-role-revealable{cursor:pointer;border-style:dashed;border-color:#75633e}.wolf-table-player.is-role-revealable:hover{opacity:.8;filter:grayscale(.55);border-color:#d7aa4d;box-shadow:0 10px 24px rgba(0,0,0,.26)}.wolf-host-phase-actions{margin-top:18px;padding:16px;border-radius:12px;background:rgba(215,170,77,.09);border:1px solid rgba(215,170,77,.28);text-align:center}.wolf-host-phase-actions p{margin:0 0 12px;color:#b9c3d1;font-size:12px}.wolf-host-phase-actions .game-button{margin:auto}.wolf-public-role-modal{position:fixed;inset:0;z-index:1700;display:grid;place-items:center;padding:20px;background:rgba(4,8,13,.78);backdrop-filter:blur(8px)}.wolf-public-role-modal[hidden]{display:none}.wolf-public-role-card{width:min(360px,92vw);padding:32px 24px;border-radius:22px;text-align:center;background:linear-gradient(150deg,#f2eadb,#c9b58c);color:#202028;border:2px solid #e8cc8b;box-shadow:0 30px 80px rgba(0,0,0,.55)}.wolf-public-role-icon{display:block;font-size:72px}.wolf-public-role-card small{display:block;margin-top:8px;color:#675b49;font-weight:800;text-transform:uppercase;letter-spacing:1px}.wolf-public-role-card strong{display:block;margin-top:4px;font-size:28px}.wolf-public-role-card p{margin:10px 0 0;color:#534b40;font-size:12px}.wolf-public-role-close{position:fixed;top:22px;right:24px;width:42px;height:42px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:#151d2a;color:#fff;font-size:28px;line-height:1;cursor:pointer}@media(max-width:620px){.wolf-role-section.is-persistent{padding:12px}.wolf-role-section.is-persistent .wolf-section-title p{font-size:11px}.wolf-role-section.is-persistent .wolf-role-card{width:min(160px,45vw)}}

/* V16.5 - player identity + untimed village/wolf votes */
.wolf-identity-bar{width:min(100%,1120px);margin:0 auto 14px;padding:10px 14px;border-radius:14px;display:flex;align-items:center;gap:11px;background:linear-gradient(135deg,#111a27,#1d2a3b);border:1px solid #344259;color:#fff;box-shadow:0 10px 28px rgba(0,0,0,.14)}
.wolf-identity-bar[hidden]{display:none}.wolf-identity-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#2d223d;border:1px solid #7f6636;font-size:21px}.wolf-identity-bar>div:nth-child(2){display:flex;flex-direction:column;line-height:1.15}.wolf-identity-bar span{font-size:9px;letter-spacing:1.5px;font-weight:900;color:#d7aa4d}.wolf-identity-bar strong{font-size:17px}.wolf-identity-bar em{margin-left:auto;font-style:normal;font-size:11px;color:#91a0b2}
.wolf-vote-progress{margin:8px 0 0!important;color:#d6c28f!important;font-weight:800}.wolf-vote-tie{margin:10px 0 0;padding:9px 11px;border-radius:9px;background:rgba(184,74,82,.14);border:1px solid rgba(205,90,98,.28);color:#f0b4b8;font-size:12px;font-weight:800}
@media(max-width:620px){.wolf-identity-bar{width:100%;margin-bottom:10px}.wolf-identity-bar em{font-size:10px}.wolf-identity-bar strong{font-size:15px}}


/* V16.6 — Footer commun à toutes les pages de jeux */
.game-footer {
  width: 100%;
  margin: clamp(24px, 4vw, 48px) auto 0;
  padding: 24px 16px 28px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  background: #040c16;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.game-footer p {
  margin: 2px 0;
}
.game-footer a {
  color: #27b4f3;
  text-decoration: none;
  font-weight: 600;
}
.game-footer a:hover,
.game-footer a:focus {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .game-footer {
    margin-top: 28px;
    padding: 20px 12px 24px;
    font-size: 13px;
  }
}


/* V16.7 — Geometry hardening for 2048 on every viewport */
.game-2048-cell.tile-1024,
.game-2048-cell.tile-2048,
.game-2048-cell.tile-super { font-size: clamp(18px, 5.2vw, 40px); }
@media (max-width: 520px) {
  .game-2048-board { gap: 7px; padding: 8px; }
  .game-2048-cell { border-radius: 10px; font-size: clamp(22px, 9vw, 40px); }
  .game-2048-cell.tile-1024,
  .game-2048-cell.tile-2048,
  .game-2048-cell.tile-super { font-size: clamp(16px, 7.4vw, 31px); }
}


/* V17 - role artworks on Werewolf cards */
.wolf-role-front{gap:10px;padding-top:22px;padding-bottom:22px}.wolf-role-artwork{width:min(180px,78%);aspect-ratio:1/1;object-fit:cover;border-radius:18px;border:3px solid rgba(61,43,19,.18);box-shadow:0 14px 28px rgba(0,0,0,.18);background:#eadfca}.wolf-role-icon{font-size:26px;display:inline-grid;place-items:center;width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.52);position:absolute;top:18px;right:18px;z-index:2;box-shadow:0 4px 14px rgba(0,0,0,.12)}.wolf-role-front strong{margin-top:2px}.wolf-role-front small{margin-top:0}.wolf-role-section.is-persistent .wolf-role-artwork{width:min(110px,76%);border-radius:14px}.wolf-role-section.is-persistent .wolf-role-icon{width:34px;height:34px;font-size:18px;top:12px;right:12px}.wolf-public-role-card{position:relative}.wolf-public-role-artwork{display:block;width:min(220px,72vw);aspect-ratio:1/1;object-fit:cover;border-radius:18px;border:3px solid rgba(61,43,19,.18);box-shadow:0 14px 28px rgba(0,0,0,.14);background:#eadfca;margin:0 auto 12px}.wolf-public-role-icon{display:inline-grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.52);font-size:24px;margin:0 auto 6px}.wolf-role-front:after{inset:10px;}@media(max-width:620px){.wolf-role-artwork{width:min(150px,74%)}.wolf-public-role-artwork{width:min(180px,68vw)}}

/* V17.2 - optional role helper */
.wolf-role-note{display:block;grid-column:1/-1;margin-top:8px;color:#7f8da1;font-size:11px;line-height:1.45}
