:root {
  --bg1: #1b1140;
  --bg2: #3b1f6e;
  --card: #ffffff;
  --ink: #2b2350;
  --accent: #ffb347;
  --accent2: #7c5cff;
  --good: #2ecc71;
  --bad: #ff5c7a;
  --soft: #efeaff;
  --radius: 18px;
  --font: 'Baloo 2', 'Comic Sans MS', 'Chalkboard SE', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1200px 800px at 80% -10%, #5b3aa8 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #274a9e 0%, transparent 55%),
              linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, #ffe9a8, transparent),
    radial-gradient(2px 2px at 240px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70px 160px, #cfe0ff, transparent),
    radial-gradient(2px 2px at 300px 190px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 180px 120px, #ffe9a8, transparent);
  background-size: 340px 220px;
  animation: twinkle 5s ease-in-out infinite alternate;
  opacity: .8;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .95; } }

.app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 14px 48px;
}

header.masthead {
  text-align: center;
  color: #fff;
  margin: 8px 0 18px;
}
.masthead h1 {
  margin: 0;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  letter-spacing: .5px;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.masthead .rocket { display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(-4deg); } }
.masthead p { margin: 4px 0 0; opacity: .85; font-size: .95rem; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(10, 5, 40, .35);
}
.card h2 { margin: 0 0 12px; font-size: 1.25rem; }

.hidden { display: none !important; }

label.field { display: block; margin-bottom: 12px; font-weight: 700; }
input[type="text"], select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-family: var(--font);
  border: 3px solid var(--soft);
  border-radius: 12px;
  background: #fbfaff;
  color: var(--ink);
}
input[type="text"]:focus, select:focus { outline: none; border-color: var(--accent2); }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #8f6bff, var(--accent2));
  box-shadow: 0 5px 0 #5a3fd6;
  transition: transform .06s ease, box-shadow .06s ease;
  margin-top: 10px;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #5a3fd6; }
.btn.secondary { background: linear-gradient(180deg, #ffc46b, var(--accent)); box-shadow: 0 5px 0 #d9822b; color: #5b3200; }
.btn.secondary:active { box-shadow: 0 1px 0 #d9822b; }
.btn.ghost { background: #ece7ff; color: var(--accent2); box-shadow: 0 4px 0 #d3c9fa; }
.btn.ghost:active { box-shadow: 0 1px 0 #d3c9fa; }
.btn.small { width: auto; display: inline-block; padding: 9px 14px; font-size: .95rem; margin-top: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.room-code {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 8px;
  background: var(--soft);
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0 4px;
  color: var(--accent2);
  user-select: all;
}
.hint { font-size: .85rem; color: #7a739e; text-align: center; margin: 6px 0 0; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  border: 3px dashed var(--soft);
  border-radius: 12px;
  margin: 8px 0;
}
.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fbfaff;
  border: 2px solid var(--soft);
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  user-select: none;
}
.cat-chip input { accent-color: var(--accent2); width: 18px; height: 18px; margin: 0; }
.cat-chip.on { background: #e6dcff; border-color: var(--accent2); }

.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row input { flex: 1; }

.lobby-players { list-style: none; padding: 0; margin: 10px 0; }
.lobby-players li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 12px;
  margin-bottom: 8px;
  font-weight: 700;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(160deg, #ffd66b, #ff9d5c);
  flex: 0 0 auto;
}
.host-tag { margin-left: auto; font-size: .75rem; background: var(--accent); color: #5b3200; border-radius: 999px; padding: 3px 8px; }

.letter-banner {
  text-align: center;
  color: #fff;
  margin-bottom: 14px;
}
.letter-banner .big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px; height: 110px;
  border-radius: 50%;
  font-size: 3.4rem;
  font-weight: 800;
  background: radial-gradient(circle at 30% 30%, #ffe29a, var(--accent) 70%);
  color: #5b3200;
  box-shadow: 0 8px 0 rgba(0,0,0,.25), inset 0 -6px 0 rgba(0,0,0,.12);
  text-transform: uppercase;
}
.letter-banner .timer {
  margin-top: 8px;
  font-size: 1.3rem;
  font-weight: 800;
}
.letter-banner .sub { opacity: .85; font-size: .9rem; }

.answer-row { margin-bottom: 12px; }
.answer-row .cat-label { font-weight: 800; font-size: .95rem; margin-bottom: 4px; display: flex; justify-content: space-between; }
.answer-row input { font-size: 1.1rem; }

.status-ok { color: var(--good); font-weight: 800; font-size: .8rem; }
.status-ko { color: var(--bad); font-weight: 800; font-size: .8rem; }

table.results { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.results th, table.results td { padding: 7px 6px; text-align: left; border-bottom: 2px dashed var(--soft); }
table.results th { font-size: .8rem; color: #7a739e; text-transform: uppercase; letter-spacing: .4px; }
.vote-btns { display: flex; gap: 6px; }
.vote-btns .btn { width: auto; padding: 7px 12px; font-size: .9rem; margin: 0; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.vote-btns .btn:active { box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.vote-btns .btn.up.on { background: var(--good); box-shadow: 0 3px 0 #1d9e54; }
.vote-btns .btn.down.on { background: var(--bad); box-shadow: 0 3px 0 #d13b58; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 800; margin-left: 6px; }
.badge.dup { background: #ffe3ec; color: #c22c52; }
.badge.auto { background: #e2f8ec; color: #177a44; }
.badge.rejected { background: #ffecec; color: #c22; }

.score-line { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 2px dashed var(--soft); font-weight: 700; }
.score-line .pts { margin-left: auto; font-weight: 800; color: var(--accent2); font-size: 1.15rem; }
.score-line.winner { background: linear-gradient(90deg, #fff6dd, transparent); border-radius: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #2b2350;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  max-width: 90vw;
  text-align: center;
}

.share-link { word-break: break-all; font-size: .8rem; color: #7a739e; background: var(--soft); padding: 8px 10px; border-radius: 10px; }

@media print {
  .stars, .app > *:not(.print-sheet) { display: none !important; }
  body { background: #fff !important; }
  .print-sheet { display: block !important; max-width: none; padding: 0; }
}

/* impression A4 paysage, grille façon CGI (lettres A-Z en colonnes) */
.print-sheet { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; }
  .app { max-width: none; padding: 0; }
  .print-sheet { display: block !important; color: #000; font-family: var(--font); }
  .print-sheet h1 { font-size: 20pt; margin: 0 0 4pt; }
  .print-sheet .pin { font-size: 10.5pt; margin: 0 0 8pt; }
  .print-sheet .pin .pline { display: inline-block; min-width: 160pt; border-bottom: 1.2pt solid #000; }
  .print-sheet .pin.small { font-size: 8.5pt; color: #333; margin-top: 8pt; }
  table.ptable { width: 100%; border-collapse: collapse; table-layout: fixed; }
  table.ptable th, table.ptable td { border: 1.2pt solid #2b2350; text-align: center; }
  table.ptable th { background: #efeaff; font-size: 8pt; padding: 2pt 1pt; }
  table.ptable th.pc { font-size: 9pt; text-align: left; padding: 3pt 5pt; width: 17%; }
  table.ptable th.pp { font-size: 8pt; width: 7%; }
  table.ptable td.pc { font-weight: 800; font-size: 9pt; text-align: left; padding: 3pt 5pt; }
  table.ptable td.pw { height: 18pt; }
  table.ptable td.pp { background: #fdf6e3; }
}

/* barre de thèmes + chat + confettis */
.theme-bar { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.theme-chip {
  cursor: pointer; font-size: 1.3rem; padding: 5px 9px; border-radius: 999px;
  border: 2px solid transparent; background: rgba(255,255,255,.15); user-select: none;
}
.theme-chip.on { border-color: var(--accent); background: rgba(255,255,255,.3); }
.chat-box { font-size: .9rem; }
.chat-line { padding: 2px 0; }
.chat-phrase { margin: 0 !important; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetti {
  position: absolute; top: -12px; width: 10px; height: 16px; border-radius: 2px;
  animation: confetti-fall 3s ease-in forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .9; }
}

/* --- thèmes --- */
body[data-theme="jungle"] {
  background: radial-gradient(1000px 700px at 80% -10%, #2e7d32 0%, transparent 60%),
              radial-gradient(800px 600px at -10% 110%, #00695c 0%, transparent 55%),
              linear-gradient(160deg, #0b3d1e, #1b5e20);
  background-attachment: fixed;
}
body[data-theme="mer"] {
  background: radial-gradient(1000px 700px at 80% -10%, #0288d1 0%, transparent 60%),
              radial-gradient(800px 600px at -10% 110%, #00acc1 0%, transparent 55%),
              linear-gradient(160deg, #01579b, #0277bd);
  background-attachment: fixed;
}
body[data-theme="bonbon"] {
  background: radial-gradient(1000px 700px at 80% -10%, #f06292 0%, transparent 60%),
              radial-gradient(800px 600px at -10% 110%, #ba68c8 0%, transparent 55%),
              linear-gradient(160deg, #ad1457, #7b1fa2);
  background-attachment: fixed;
}
body[data-theme="xp"] {
  --bg1: #0054e3; --bg2: #3a8bff; --card: #ece9d8; --ink: #000;
  --accent: #ffb347; --accent2: #0054e3; --soft: #d4d0c8; --radius: 6px;
  background: linear-gradient(180deg, #0054e3 0%, #3a8bff 45%, #7ec850 45.2%, #5aa832 100%);
  background-attachment: fixed;
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
}
body[data-theme="xp"] .stars { display: none; }
body[data-theme="xp"] .masthead h1 { color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,.6); }
body[data-theme="xp"] .card {
  border: 2px solid; border-color: #fff #7a7a7a #7a7a7a #fff;
  box-shadow: none; border-radius: 8px 8px 0 0; position: relative;
}
body[data-theme="xp"] .card::before {
  content: ""; display: block; height: 22px; margin: -18px -18px 12px;
  background: linear-gradient(90deg, #0054e3, #3a8bff);
  border-radius: 6px 6px 0 0;
}
body[data-theme="xp"] .btn {
  border-radius: 4px; border: 1px solid #003c74;
  background: linear-gradient(180deg, #fff 0%, #ecebe5 86%, #d8d0c4 100%);
  color: #000; box-shadow: none; font-weight: 700;
}
body[data-theme="xp"] .btn:active { background: #d8d0c4; }
body[data-theme="xp"] .btn.secondary { background: linear-gradient(180deg, #fff 0%, #ffe9c4 86%, #ffd28a 100%); }
body[data-theme="xp"] .room-code { background: #fff; border: 1px solid #7a7a7a; color: #0054e3; }
body[data-theme="xp"] .letter-banner .big { border-radius: 8px; border: 2px solid #7a7a7a; box-shadow: none; }

/* ===== v3 — interface façon jeux casual mobiles (Wordle/Duolingo/StopotS) ===== */
.app { padding-bottom: 90px; }

.btn.big { font-size: 1.25rem; padding: 17px 18px; border-radius: 16px; }
.small-link { width: auto; display: inline-block; background: none; box-shadow: none; color: #b9b1e8; text-decoration: underline; font-weight: 700; margin: 6px 8px 0; }
body[data-theme="xp"] .small-link { color: #003c74; }

.divider { display: flex; align-items: center; gap: 10px; color: #8b84b8; margin: 14px 0; font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--soft); border-radius: 2px; }

.code-input {
  text-align: center; font-size: 1.8rem; font-weight: 800; letter-spacing: 10px;
  text-transform: uppercase; padding: 12px;
}
.row-btns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.row-btns .btn { width: auto; margin: 0; }

.spinner { font-size: 2.6rem; animation: spin-bounce 1.1s ease-in-out infinite; }
@keyframes spin-bounce { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(20deg); } }

/* accueil */
.home-card { text-align: center; }
.home-card .field { text-align: left; }

/* salon : grille d'avatars */
.avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0 12px; }
.avatar-pick {
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--soft); border: 3px solid transparent; transition: transform .1s;
}
.avatar-pick:active { transform: scale(.9); }
.avatar-pick.on { border-color: var(--accent2); background: #e6dcff; transform: scale(1.12); }

/* manche : bannière lettre + anneau timer + progression */
.play-top { text-align: center; color: #fff; margin-bottom: 12px; }
.progress-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.progress-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); }
.progress-dots .dot.done { background: var(--accent); }
.progress-dots .dot.current { background: #fff; box-shadow: 0 0 8px #fff; }
.letter-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; }
.big.letter-pop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 28px;
  font-size: 3rem; font-weight: 800; text-transform: uppercase;
  background: linear-gradient(160deg, #ffe29a, var(--accent));
  color: #5b3200; box-shadow: 0 6px 0 rgba(0,0,0,.28), inset 0 -6px 0 rgba(0,0,0,.1);
  animation: pop-in .45s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pop-in { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.play-top .sub { opacity: .9; font-weight: 700; margin-top: 8px; }

.timer-ring-wrap { position: relative; width: 64px; height: 64px; display: none; }
.timer-ring-wrap.show { display: block; }
.timer-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 5; }
.ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke .3s;
}
.ring-fg.low { stroke: var(--bad); }
.timer-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.15rem;
}

/* champs de réponse : feedback couleur façon Wordle (vert ok, gris neutre — pas de rouge agressif) */
.answers-card { position: sticky; top: 8px; }
.answer-row input.ok { border-color: var(--good); background: #f0fbf4; }
.answer-row input.warn { border-color: #d9c46b; background: #fdf9ec; }
.answer-row input.err { border-color: var(--bad); background: #fff3f5; }

/* barre d'actions fixe en bas (pouce-friendly) */
.sticky-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(520px, calc(100vw - 20px));
  display: flex; gap: 10px; z-index: 40;
  background: rgba(20, 12, 50, .82); backdrop-filter: blur(8px);
  padding: 10px; border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.sticky-bar .btn { margin: 0; flex: 1; }
.sticky-bar .btn.secondary { flex: 0 0 auto; }

/* podium */
#podium, #podium-final { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 10px 0 14px; min-height: 110px; }
.podium-slot { text-align: center; width: 88px; }
.podium-slot .avatar { width: 46px; height: 46px; font-size: 1.5rem; margin: 0 auto 4px; }
.podium-slot .name { font-weight: 800; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-slot .pts { font-weight: 800; color: var(--accent2); }
.podium-slot .bar {
  border-radius: 10px 10px 0 0; margin-top: 6px; color: #fff; font-weight: 800;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
  background: linear-gradient(180deg, #9d86ff, var(--accent2));
}
.podium-slot.p1 .bar { height: 84px; background: linear-gradient(180deg, #ffd76b, var(--accent)); color: #5b3200; font-size: 1.3rem; }
.podium-slot.p2 .bar { height: 60px; }
.podium-slot.p3 .bar { height: 42px; background: linear-gradient(180deg, #e0a172, #c97b3f); }
.podium-slot.p1 { order: 2; transform: scale(1.08); }
.podium-slot.p2 { order: 1; }
.podium-slot.p3 { order: 3; }

/* modal règles */
.modal { position: fixed; inset: 0; background: rgba(10,5,35,.7); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { max-width: 420px; width: 100%; animation: pop-in .3s cubic-bezier(.2,1.6,.4,1); }
.rules-list { padding-left: 20px; line-height: 1.55; font-size: 1rem; }
.rules-list li { margin-bottom: 6px; }

/* XP : ajustements sticky bar */
body[data-theme="xp"] .sticky-bar { background: #ece9d8; border: 2px solid; border-color: #fff #7a7a7a #7a7a7a #fff; box-shadow: none; border-radius: 8px; }
body[data-theme="xp"] .big.letter-pop { border-radius: 8px; border: 2px solid #7a7a7a; box-shadow: none; }
body[data-theme="xp"] .progress-dots .dot { background: #b8b4a8; }
body[data-theme="xp"] .progress-dots .dot.done { background: #0054e3; }
body[data-theme="xp"] .progress-dots .dot.current { background: #000; box-shadow: none; }

/* ===== thème « carnet d'écolier » (défaut) : papier kraft, crayon, gommette ===== */
body[data-theme="carnet"] {
  --card: #fffdf5;
  --ink: #33302a;
  --accent: #ff6b5e;
  --accent2: #0aa6a6;
  --good: #2f9e5f;
  --bad: #e5484d;
  --soft: #f3ead8;
  --radius: 4px;
  --font: 'Patrick Hand', 'Baloo 2', cursive;
  background-color: #efe3c8;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(120, 90, 40, .10) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, rgba(120, 90, 40, .10) 27px 28px),
    radial-gradient(600px 300px at 15% 0%, rgba(255, 246, 214, .9), transparent 70%),
    radial-gradient(500px 300px at 90% 100%, rgba(214, 186, 130, .55), transparent 70%);
  background-attachment: fixed;
}
body[data-theme="carnet"] .stars { display: none; }

body[data-theme="carnet"] .masthead { color: #33302a; }
body[data-theme="carnet"] .masthead h1 {
  font-family: 'Patrick Hand', cursive;
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  transform: rotate(-2deg);
  text-shadow: none;
  color: #2f2b24;
}
body[data-theme="carnet"] .masthead .rocket { animation: none; display: inline-block; transform: rotate(15deg); }
body[data-theme="carnet"] .tagline { color: #6b6353; opacity: 1; font-size: 1.05rem; transform: rotate(-1deg); }

body[data-theme="carnet"] .card {
  background: #fffdf5;
  border: 2px solid #33302a;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 4px 5px 0 rgba(51, 48, 42, .18);
  padding: 20px;
}
body[data-theme="carnet"] h2 { font-family: 'Patrick Hand', cursive; transform: rotate(-.6deg); }

body[data-theme="carnet"] input[type="text"],
body[data-theme="carnet"] input[type="number"],
body[data-theme="carnet"] select {
  font-family: 'Patrick Hand', cursive;
  background: #fff;
  border: 2px solid #33302a;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 2px 3px 0 rgba(51,48,42,.12);
}
body[data-theme="carnet"] input:focus { border-color: var(--accent2); outline: none; }

body[data-theme="carnet"] .btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  border: 2.5px solid #33302a;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: #ffd23f;
  color: #33302a;
  box-shadow: 3px 4px 0 #33302a;
  text-shadow: none;
  transition: transform .07s ease, box-shadow .07s ease;
}
body[data-theme="carnet"] .btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 #33302a; }
body[data-theme="carnet"] .btn.secondary { background: #7de3d8; }
body[data-theme="carnet"] .btn.ghost { background: #fffdf5; color: #33302a; box-shadow: 2px 3px 0 #33302a; }
body[data-theme="carnet"] .btn.ghost:active { box-shadow: 0 0 0 #33302a; }

body[data-theme="carnet"] .room-code {
  background: #fff;
  border: 2.5px dashed #33302a;
  border-radius: 12px;
  color: #e5484d;
  box-shadow: 2px 3px 0 rgba(51,48,42,.15);
  transform: rotate(-1deg);
}

body[data-theme="carnet"] .cat-chip { border-radius: 999px; border: 2px solid #33302a; background: #fff; box-shadow: 2px 2px 0 rgba(51,48,42,.12); }
body[data-theme="carnet"] .cat-chip.on { background: #ffe9a8; border-color: #33302a; }

body[data-theme="carnet"] .theme-chip { background: #fffdf5; border-color: #33302a; box-shadow: 2px 2px 0 rgba(51,48,42,.15); }
body[data-theme="carnet"] .theme-chip.on { background: #ffd23f; }

body[data-theme="carnet"] .avatar { border: 2px solid #33302a; background: #ffe9a8; }
body[data-theme="carnet"] .lobby-players li { border: 2px solid #33302a; border-radius: 14px 255px 14px 225px / 225px 14px 255px 14px; background: #fff; box-shadow: 2px 3px 0 rgba(51,48,42,.12); }
body[data-theme="carnet"] .host-tag { background: #ff6b5e; color: #fff; border: 2px solid #33302a; }

body[data-theme="carnet"] .big.letter-pop {
  border: 3px solid #33302a;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: #ffd23f;
  color: #33302a;
  box-shadow: 4px 5px 0 #33302a;
}
body[data-theme="carnet"] .play-top, body[data-theme="carnet"] .play-top .sub { color: #33302a; }
body[data-theme="carnet"] .progress-dots .dot { background: rgba(51,48,42,.2); box-shadow: none; }
body[data-theme="carnet"] .progress-dots .dot.done { background: var(--accent2); }
body[data-theme="carnet"] .progress-dots .dot.current { background: #33302a; box-shadow: none; }
body[data-theme="carnet"] .timer-num { color: #33302a; }
body[data-theme="carnet"] .ring-bg { stroke: rgba(51,48,42,.15); }
body[data-theme="carnet"] .ring-fg { stroke: var(--accent2); }
body[data-theme="carnet"] .ring-fg.low { stroke: var(--bad); }

body[data-theme="carnet"] .answer-row input { font-family: 'Patrick Hand', cursive; }
body[data-theme="carnet"] .answer-row input.ok { border-color: var(--good); background: #eef9f0; }
body[data-theme="carnet"] .answer-row input.warn { border-color: #d9a514; background: #fff8e1; }
body[data-theme="carnet"] .answer-row input.err { border-color: var(--bad); background: #fdecec; }

body[data-theme="carnet"] .sticky-bar {
  background: #fffdf5;
  border: 2.5px solid #33302a;
  border-radius: 18px;
  box-shadow: 4px 5px 0 rgba(51,48,42,.35);
  backdrop-filter: none;
}

body[data-theme="carnet"] .podium-slot .bar { border: 2.5px solid #33302a; box-shadow: 3px 3px 0 rgba(51,48,42,.25); border-radius: 12px 12px 4px 4px; }
body[data-theme="carnet"] .podium-slot.p1 .bar { background: #ffd23f; color: #33302a; }
body[data-theme="carnet"] .podium-slot.p2 .bar { background: #cfd8dc; color: #33302a; }
body[data-theme="carnet"] .podium-slot.p3 .bar { background: #e8b48a; color: #33302a; }
body[data-theme="carnet"] .podium-slot .pts { color: #33302a; }

body[data-theme="carnet"] .badge.auto { background: #dff3e4; color: #1d7a44; border: 1.5px solid #33302a; }
body[data-theme="carnet"] .badge.dup { background: #ffe3e0; color: #c22c2c; border: 1.5px solid #33302a; }
body[data-theme="carnet"] .badge.rejected { background: #fdecec; color: #c22c2c; border: 1.5px solid #33302a; }

body[data-theme="carnet"] .modal { background: rgba(51,48,42,.45); }
body[data-theme="carnet"] .divider { color: #6b6353; }
body[data-theme="carnet"] .small-link { color: #0aa6a6; }
body[data-theme="carnet"] .hint { color: #6b6353; }
body[data-theme="carnet"] .score-line { border-bottom: 2px dashed #d8c9a3; }
body[data-theme="carnet"] .score-line.winner { background: #fff3c4; }
body[data-theme="carnet"] .score-line .pts { color: #33302a; }
body[data-theme="carnet"] table.results th { color: #6b6353; }
body[data-theme="carnet"] .toast { background: #33302a; border: 2px solid #fffdf5; box-shadow: 3px 4px 0 rgba(0,0,0,.3); }
body[data-theme="carnet"] .spinner { animation: spin-bounce 1.1s ease-in-out infinite; }
