:root {
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, serif;
  --text: #fff7f9;
  --muted: rgba(255, 240, 246, .68);
  --line: rgba(255, 255, 255, .13);
  --soft: rgba(255, 255, 255, .08);
  --rose: #ff86a3;
  --rose-2: #ff6a90;
  --gold: #ffc66d;
  --mint: #8ee4b6;
  --violet: #4b2d8f;
  --glass: linear-gradient(160deg, rgba(46, 35, 88, .64), rgba(24, 17, 50, .64));
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #160f2e; }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none;
}
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 6, 28, .3), rgba(10, 6, 28, 0) 28%, rgba(10, 6, 28, .18) 62%, rgba(10, 6, 28, .55)); }
#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: -2;
  image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

/* ——— Texte ——— */
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .74); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.big-e { font-size: 30px; line-height: 1; flex: none; }
.ok { color: var(--mint); font-weight: 700; font-size: 14px; }
.section { margin: 22px 4px 10px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.handle { color: var(--gold); font-size: 18px; }

/* ——— Boutons ——— */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 999px; font-size: 17px; font-weight: 800; color: #3d0f22;
  background: linear-gradient(180deg, #ff9db5, #ff6f93); box-shadow: 0 8px 24px rgba(255, 90, 140, .32), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.white { background: #fff; color: var(--violet); box-shadow: 0 8px 24px rgba(10, 5, 30, .25); }
.btn.gold { background: linear-gradient(180deg, #ffd68a, #f5ad3a); color: #3a2606; box-shadow: 0 8px 24px rgba(245, 173, 58, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.soft { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 80, 110, .14); color: #ffb6c2; box-shadow: none; }
.btn.sm { min-height: 40px; width: auto; padding: 0 16px; font-size: 15px; white-space: nowrap; }
.round { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: rgba(20, 14, 44, .42); border: 1px solid rgba(255, 255, 255, .17); color: var(--text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.round.sm { width: 34px; height: 34px; }
.round.sm svg { width: 18px; height: 18px; }
.round.ghost { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.round:disabled { opacity: .35; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; font-size: 16px; font-weight: 650;
  background: rgba(20, 14, 44, .42); border: 1px solid rgba(255, 255, 255, .17); color: var(--text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pill.sm { height: 32px; padding: 0 12px; font-size: 13.5px; gap: 6px; }
.pill.sm svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 8px; font-size: 15px; color: rgba(255, 255, 255, .78); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; align-self: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 750; white-space: nowrap; color: var(--text); }
.chip.hot { background: rgba(255, 126, 157, .24); color: #ffd0dc; }
button.chip.on { background: #fff; color: var(--violet); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }

/* ——— Champs ——— */
.input { width: 100%; font: inherit; font-size: 17px; color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 16px; padding: 13px 14px; outline: none; -webkit-appearance: none; appearance: none; min-height: 50px; }
.input:focus { border-color: var(--rose); background: rgba(255, 255, 255, .12); }
.input::placeholder { color: rgba(255, 255, 255, .42); }
textarea.input { resize: vertical; line-height: 1.45; }
.input.serif { font-family: var(--serif); font-size: 19px; }
.input.code { text-align: center; letter-spacing: .4em; font-size: 26px; font-weight: 800; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--muted); }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at { display: flex; align-items: center; gap: 8px; }
.at > b { color: var(--gold); font-size: 20px; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 650; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; width: 48px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, .2); transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--rose-2); }
.switch input:checked + span::after { transform: translateX(20px); }
.emoji-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.emoji-row button { flex: none; width: 44px; height: 44px; border-radius: 14px; border: 1px solid transparent; background: var(--soft); font-size: 22px; }
.emoji-row button.on { background: rgba(255, 198, 109, .2); border-color: var(--gold); }

/* ——— Avatars ——— */
.av { --size: 40px; flex: none; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%;
  font-size: calc(var(--size) * .56); line-height: 1; border: 2px solid rgba(255, 255, 255, .9);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 60%), var(--av); box-shadow: 0 4px 12px rgba(10, 5, 30, .25); }
.av.xs { --size: 26px; border-width: 1.5px; }
.av.lg { --size: 62px; border-width: 3px; }
.duo { display: inline-flex; }
.duo .av { --size: 46px; }
.duo .av + .av { margin-left: -14px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-grid button { padding: 3px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; }
.avatar-grid button .av { --size: min(46px, calc((100vw - 140px) / 6)); }
.avatar-grid button.on { box-shadow: 0 0 0 3px var(--gold); }

/* ——— Écrans d'accueil (connexion, profil, appairage) ——— */
.screen { min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding: calc(var(--top) + 32px) 20px calc(var(--bottom) + 28px); }
.screen.center { align-items: center; justify-content: center; text-align: center; }
.screen > .center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.screen > .center p, .screen > .link, .screen.center > .tagline, .screen.center > .link { text-shadow: 0 1px 10px rgba(10, 6, 30, .9), 0 0 2px rgba(10, 6, 30, .6); }
.logo { filter: drop-shadow(0 12px 30px rgba(255, 90, 140, .45)); animation: float 5s ease-in-out infinite; border-radius: 26%; }
.brand { font-family: var(--serif); font-size: 58px; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 4px 30px rgba(0, 0, 0, .3); }
.tagline { font-size: 19px; color: var(--muted); margin-bottom: 10px; }
.title { font-family: var(--serif); font-size: 32px; }
.stack { display: flex; flex-direction: column; gap: 10px; width: min(360px, 100%); }
.info { text-align: left; padding: 14px 16px; border-radius: 20px; background: rgba(20, 14, 44, .5); border: 1px solid var(--line); font-size: 14.5px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); width: 100%; }
.info b { display: block; margin-bottom: 3px; font-size: 15px; }
.info p b { display: inline; }
.screen .card { display: flex; flex-direction: column; gap: 14px; }
.pair .row-fields { margin-top: 2px; }
.result { padding-top: 6px; }

/* ——— Pages ——— */
.page { max-width: 560px; margin: 0 auto; padding: calc(var(--top) + 14px) 16px calc(var(--bottom) + 112px); animation: in .3s ease; }
.page-h { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 14px; }
.page-h h1 { font-size: 40px; font-weight: 850; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.page-sub { color: var(--muted); margin: -6px 0 14px; }
.home-top { display: flex; align-items: center; gap: 8px; }
.home-h .eyebrow { margin: 16px 0 4px; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.hello { font-size: 38px; line-height: 1.05; font-weight: 850; letter-spacing: -.01em; margin-bottom: 18px; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.widgets { display: flex; flex-direction: column; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row2 > .card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.empty-note, .empty { text-align: center; color: var(--muted); padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .big-e { font-size: 46px; }

/* ——— Cartes ——— */
.card { position: relative; background: var(--glass); border: 1px solid rgba(255, 255, 255, .13); border-radius: 28px; padding: 18px;
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 12px 30px rgba(10, 6, 30, .22), inset 0 1px 0 rgba(255, 255, 255, .08); }
.card > * + * { margin-top: 12px; }
.row2 > .card > * + *, .screen .card > * + * { margin-top: 0; }
.card-h { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.card-h h2 { flex: 1; font-size: 17px; font-weight: 780; }
.card-ico { font-size: 21px; line-height: 1; }
.count { color: var(--gold); font-weight: 850; font-size: 15px; white-space: nowrap; }
.actions { display: flex; gap: 6px; align-items: center; }
.row2 .card-h h2 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.row2 .card-ico { font-size: 17px; }

/* Temps ensemble */
.clock { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.clock div { display: flex; flex-direction: column; align-items: center; padding: 10px 0 8px; border-radius: 16px; background: rgba(255, 255, 255, .08); }
.clock b { font-size: clamp(20px, 6.4vw, 28px); font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1.1; }
.clock small { font-size: 9.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { width: 100%; border: 1px dashed rgba(255, 198, 109, .6); background: rgba(255, 198, 109, .08); color: var(--gold); border-radius: 16px; padding: 12px; font-weight: 700; }

/* Humeur */
.duo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mood-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 22px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); min-height: 150px; justify-content: center; }
.mood-tile:disabled { opacity: 1; }
.mood-tile.empty { border: 1.5px dashed rgba(255, 198, 109, .65); }
.mood-tile.empty .mood-l { color: var(--gold); font-weight: 750; }
.who { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 15px; }
.mood-e { font-size: 46px; line-height: 1.1; }
.mood-e.none { filter: grayscale(.6); opacity: .7; }
.mood-l { font-size: 14.5px; color: var(--muted); }
.mood-t { font-family: var(--serif); font-size: 14px; color: rgba(255, 255, 255, .85); }
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mood-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 18px; background: var(--soft); border: 1.5px solid transparent; }
.mood-pick span { font-size: 34px; line-height: 1.1; }
.mood-pick small { font-size: 12px; font-weight: 650; }
.mood-pick.on { border-color: var(--gold); background: rgba(255, 198, 109, .16); }

/* Bisous */
.w-bisous { background: linear-gradient(160deg, rgba(150, 96, 60, .62), rgba(60, 34, 46, .62)); }
.kiss { align-self: center; width: 96px; height: 96px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .14); display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ffe0a0, #f5ad3a 70%); box-shadow: 0 0 0 6px rgba(245, 173, 58, .18), 0 12px 30px rgba(245, 173, 58, .35); }
.kiss svg { width: 46px; height: 46px; filter: drop-shadow(0 2px 4px rgba(150, 70, 0, .35)); }
.kiss.pop { animation: pop .35s ease; }

/* Distance */
.dist { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0; }
.dist b { font-size: 30px; font-weight: 850; line-height: 1.1; }
.dist small { color: var(--muted); font-size: 13.5px; }
.w-distance .btn { width: 100%; }

/* Mot du jour */
.note { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.note footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-family: var(--font); font-size: 13.5px; color: var(--muted); }
.note.big { font-size: 26px; text-align: center; padding: 10px 0; }
.my-note { display: block; width: 100%; text-align: left; border: 0; border-radius: 18px; padding: 12px 14px; background: rgba(255, 255, 255, .07); font-size: 15px; }
.my-note span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }

/* Photos */
.ph-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph { position: relative; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; border: 0; padding: 0; background: rgba(255, 255, 255, .07);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.ph.empty { border: 1.5px dashed rgba(255, 255, 255, .25); padding: 12px; }
button.ph.empty { color: var(--text); font-weight: 700; }
.ph img, .ph .img-wait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-who { position: absolute; left: 8px; bottom: 8px; }
.img-wait { display: block; background: linear-gradient(100deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .14) 50%, rgba(255, 255, 255, .05) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* Dessin */
.board { display: block; width: 100%; aspect-ratio: 1; border-radius: 22px; background: #2a1f4f; touch-action: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tools { display: flex; align-items: center; gap: 6px; }
.ink { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: var(--ink); padding: 0; }
.ink.on { box-shadow: 0 0 0 3px #fff; }
.ink.eraser { background: repeating-linear-gradient(45deg, #2a1f4f 0 4px, #5a4a8f 4px 8px); }
.tools .push { margin-left: auto; }
.dot { display: block; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; }

/* Rendez-vous & dates */
.rdv { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 20px; padding: 14px; background: rgba(255, 255, 255, .07); }
.rdv b { display: block; font-size: 17px; }
.rdv small { display: block; color: var(--muted); font-size: 13.5px; }
.dates li + li { border-top: 1px solid rgba(255, 255, 255, .08); }
.date-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 2px; }
.date-row b { display: block; font-size: 16px; }
.date-row small { display: block; color: var(--muted); font-size: 13px; }

/* Roue des dates */
.slot { display: flex; gap: 10px; }
.window { flex: 1; height: 72px; overflow: hidden; border-radius: 20px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 8px 14px rgba(0, 0, 0, .25); }
.idea { display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 14px; }
.idea b { display: block; font-size: 16px; line-height: 1.2; }
.idea small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.lever { position: relative; width: 46px; border-radius: 23px; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); padding: 0; }
.lever::before { content: ''; position: absolute; left: 50%; top: 18px; bottom: 12px; width: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); transform: translateX(-50%); }
.lever i { position: absolute; left: 50%; top: 6px; width: 28px; height: 28px; border-radius: 50%; transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #ffb0bd, #e0334f 70%); box-shadow: 0 4px 10px rgba(224, 51, 79, .45); }
.lever.pulled i { animation: pull .7s ease; }

/* Vocal */
.voice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: rgba(255, 255, 255, .07); }
.voice .play { width: 46px; height: 46px; background: linear-gradient(180deg, #ffd68a, #f5ad3a); color: #3a2606; border: 0; }
.voice-body { flex: 1; min-width: 0; }
.wave { display: flex; align-items: center; gap: 3px; height: 30px; }
.wave i { flex: 1; max-width: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.wave i.on { background: var(--gold); }
.voice small { color: var(--muted); font-size: 12.5px; }
.recorder { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0; }
.recorder audio { width: 100%; }
.recorder .row-fields { width: 100%; }
.rec-ring { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 8px rgba(255, 255, 255, .05); }
.rec-ring b { font-size: 40px; font-weight: 850; font-variant-numeric: tabular-nums; }
.rec-ring small { font-size: 18px; margin-left: 2px; color: var(--muted); }
.rec-ring.live { background: rgba(255, 80, 110, .2); animation: beat 1.2s ease-in-out infinite; }

/* ——— Débats ——— */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(20, 14, 44, .5); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); margin-bottom: 14px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 10px 6px; font-weight: 750; color: rgba(255, 255, 255, .8); }
.seg button.on { background: #fff; color: var(--violet); }
.sheet .seg { background: rgba(255, 255, 255, .08); }
.page > .card + .card { margin-top: 14px; }
.qday { background: linear-gradient(165deg, var(--th) -30%, rgba(34, 25, 66, .72) 72%); }
.q { font-family: var(--serif); font-size: 27px; line-height: 1.22; font-weight: 600; }
.q.sm { font-size: 20px; }
.lock { padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .2); font-size: 14.5px; color: rgba(255, 255, 255, .85); }
.tag-line { color: var(--gold); font-weight: 700; font-size: 14.5px; }
.turn { background: linear-gradient(160deg, rgba(143, 109, 242, .5), rgba(40, 28, 80, .62)); border-color: rgba(190, 170, 255, .35); }
.turn-h { display: flex; align-items: center; gap: 12px; }
.turn-h b { display: block; font-size: 16px; line-height: 1.2; }
.turn-h small { display: block; color: var(--muted); font-size: 13.5px; }
.tag { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #3a2606; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-height: 172px; padding: 16px; border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .15); background: linear-gradient(165deg, var(--th), rgba(22, 15, 44, .55));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 26px rgba(10, 6, 30, .2); }
.theme.wide { grid-column: span 2; min-height: 130px; }
.te { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.ring { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(#fff var(--p), rgba(255, 255, 255, .25) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); }
.theme small { font-size: 13px; opacity: .85; font-weight: 650; }
.theme b { font-family: var(--serif); font-size: 21px; line-height: 1.12; font-weight: 600; }
.progress { margin: 22px 4px 0; }
.progress-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.progress-h span:last-child { letter-spacing: .02em; text-transform: none; color: var(--muted); }
.bar { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd68a, #f5ad3a); }
.revealed { background: linear-gradient(165deg, var(--th) -50%, rgba(34, 25, 66, .72) 60%); }
.answers { display: grid; gap: 10px; }
.answer { padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .09); }
.answer-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.answer p { margin-top: 6px; font-family: var(--serif); font-size: 17.5px; line-height: 1.4; white-space: pre-wrap; }
.qlist li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.qlist li > .grow { padding: 12px 0; }
.qlist button:not(.round) { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 13px 0; font-size: 15.5px; }
.st { flex: none; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 11.5px; font-weight: 800; color: var(--muted); }
.st.ok { background: rgba(142, 228, 182, .16); color: var(--mint); }
.st.gold { background: var(--gold); color: #3a2606; }

/* ——— Souvenirs ——— */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: 0; padding: 0; background: rgba(255, 255, 255, .08); }
.tile img, .tile .img-wait { width: 100%; height: 100%; object-fit: cover; }
.tile.dessins { background: #2a1f4f; }
.tile.mots { background: linear-gradient(160deg, #ffe9f0, #ffcfdc); color: #5a2038; padding: 10px; text-align: left; }
.tile-text { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-size: 13.5px; line-height: 1.3; }
.tile.vocaux { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(160deg, rgba(143, 109, 242, .55), rgba(40, 28, 80, .7)); }
.tile.vocaux small { color: var(--muted); font-weight: 700; }
.tile-who { position: absolute; right: 5px; bottom: 5px; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 34px 6px 8px; font-size: 11.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; }
.spot { margin-bottom: 4px; }
.viewer img, .viewer .img-wait { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 20px; background: rgba(0, 0, 0, .3); min-height: 200px; }
.caption { font-family: var(--serif); font-size: 18px; text-align: center; }
.who-line { display: flex; align-items: center; gap: 8px; }

/* ——— Jeux ——— */
.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: var(--text); }
.game-card > * + * { margin-top: 0; }
.game-e { font-size: 38px; line-height: 1; width: 48px; text-align: center; }
.game-card b { display: block; font-size: 19px; font-weight: 800; }
.game-card small { display: block; color: var(--muted); font-size: 13.5px; }
.tag.soft { background: rgba(255, 255, 255, .12); color: var(--muted); }
.scoreboard { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, .07); }
.scoreboard b { font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; }
.scoreboard i { color: var(--muted); font-style: normal; }
.scoreboard small { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 12.5px; }
.sb-side { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 14px; }
.turn-line { text-align: center; font-weight: 800; font-size: 16px; color: var(--muted); }
.turn-line.me { color: var(--gold); }
.turn-line.end { color: var(--text); font-size: 18px; }
.turn-line small { font-weight: 600; color: var(--muted); }

.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 330px); margin: 0 auto; }
.ttt .cell { aspect-ratio: 1; border: 0; border-radius: 20px; background: rgba(255, 255, 255, .08); font-size: 54px; font-weight: 800; line-height: 1; display: grid; place-items: center; }
.ttt.live .cell:not(:disabled) { background: rgba(255, 255, 255, .13); }
.ttt .cell:disabled { opacity: 1; }
.ttt .cell.x { color: var(--rose); }
.ttt .cell.o { color: var(--gold); }
.ttt .cell.last { animation: pop .35s ease; }
.ttt .cell.win { background: rgba(142, 228, 182, .25); box-shadow: inset 0 0 0 2px var(--mint); }

.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; border-radius: 20px; background: linear-gradient(180deg, #3b2f7a, #2a2160); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.c4-col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 4px; padding: 0; border: 0; background: none; border-radius: 12px; }
.c4.live .c4-col:not(:disabled):active { background: rgba(255, 255, 255, .08); }
.c4-col:disabled { opacity: 1; }
.disc { aspect-ratio: 1; border-radius: 50%; background: rgba(10, 6, 30, .55); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45); }
.disc.r { background: radial-gradient(circle at 35% 30%, #ffb6c8, #ff5c86 70%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.disc.y { background: radial-gradient(circle at 35% 30%, #ffe7b0, #f5ad3a 70%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.disc.drop { animation: fall .45s cubic-bezier(.4, 0, .9, .6); }
.disc.win { box-shadow: 0 0 0 3px #fff, 0 0 14px rgba(255, 255, 255, .7); }
@keyframes fall { from { transform: translateY(calc(var(--r) * -112%)); } }

.chess { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.sqr { position: relative; padding: 0; border: 0; display: grid; place-items: center; }
.sqr.light { background: #e9d8f0; }
.sqr.dark { background: #8b6aa8; }
.sqr.last.light { background: #f5d79a; }
.sqr.last.dark { background: #c9a35e; }
.sqr.sel { box-shadow: inset 0 0 0 3px var(--rose); }
.sqr.check { background: radial-gradient(circle, #ff5c6a 20%, transparent 75%), #8b6aa8; }
.sqr.target::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(40, 20, 60, .35); }
.sqr.capture::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(40, 20, 60, .4); }
.pc { font-size: min(9.4vw, 44px); line-height: 1; font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif; pointer-events: none; position: relative; z-index: 1; }
.pc.w { color: #fffaf3; text-shadow: 0 0 1px #1b1433, 0 0 1px #1b1433, 0 1px 2px rgba(0, 0, 0, .55); }
.pc.b { color: #1b1433; text-shadow: 0 0 1px rgba(255, 255, 255, .6); }
.rank, .file { position: absolute; font-style: normal; font-size: 9px; font-weight: 800; color: rgba(40, 20, 60, .55); }
.rank { top: 2px; left: 3px; }
.file { bottom: 1px; right: 3px; }
.promo { position: absolute; inset: 30% 8%; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; border-radius: 18px; background: rgba(28, 22, 58, .96); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.promo button { border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.taken { display: flex; flex-wrap: wrap; gap: 1px; min-height: 22px; }
.taken .pc { font-size: 20px; }

/* ——— Panneaux (sheets) ——— */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 5, 22, .55); animation: fade .2s ease; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 12px; padding: 22px 18px calc(var(--bottom) + 26px); border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #2c2257, #1b1537); border: 1px solid rgba(255, 255, 255, .1); border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .4); animation: up .34s cubic-bezier(.2, .9, .3, 1); }
.sheet-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.sheet-h { padding-right: 40px; }
.sheet-h h2 { font-size: 23px; font-weight: 800; margin-top: 2px; }
.sheet-h h2.q { font-size: 25px; font-weight: 600; }
.sheet .section { margin: 10px 2px 0; }
.org li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.org li.off > .big-e, .org li.off > .grow { opacity: .4; }
.org .big-e { font-size: 22px; }
.couple-card { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0; }
.heart-link { color: var(--rose); font-size: 26px; animation: beat 1.6s ease-in-out infinite; }

/* ——— Barre d'onglets ——— */
.tabbar { position: fixed; z-index: 40; left: 50%; bottom: calc(var(--bottom) + 10px); transform: translateX(-50%); width: min(440px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(30, 22, 64, .7); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 14px 40px rgba(5, 3, 20, .45); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border: 0; border-radius: 999px; background: none;
  color: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 750; }
.tabbar button svg { width: 25px; height: 25px; }
.tabbar button.on { background: rgba(255, 255, 255, .16); color: #ffd3de; }
.badge { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center;
  background: #ff4d6d; color: #fff; font-style: normal; font-size: 11px; font-weight: 850; box-shadow: 0 0 0 2px rgba(30, 22, 64, .95); }
.badge:empty { min-width: 11px; width: 11px; height: 11px; padding: 0; top: 6px; }

/* ——— Notifications, cœurs, chargement ——— */
.toasts { position: fixed; z-index: 80; top: calc(var(--top) + 10px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: rgba(36, 26, 74, .94); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35); font-weight: 700; font-size: 15px; animation: drop .4s cubic-bezier(.2, .9, .3, 1.2); }
.toast span { font-size: 20px; }
.fly { position: fixed; z-index: 90; pointer-events: none; transform: translate(-50%, -50%); animation: fly 1.7s cubic-bezier(.2, .7, .3, 1) forwards; opacity: 0; }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; opacity: .8; }
.screen .spinner { margin-top: 10px; }

@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop { 40% { transform: scale(1.14); } 70% { transform: scale(.96); } }
@keyframes beat { 50% { transform: scale(1.08); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pull { 45% { top: calc(100% - 36px); } }
@keyframes fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(.9); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 360px) { .hello { font-size: 32px; } .q { font-size: 23px; } .theme b { font-size: 20px; } .clock small { font-size: 8.5px; } }
