/* ---------- Rédaction ---------- */
.lang-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.lang-card{display:flex;flex-direction:column;gap:12px;margin:0}
.lc-head{display:flex;align-items:center;gap:12px}.lc-head .grow{flex:1;display:flex;flex-direction:column}.lc-head small{color:var(--muted);font-size:12.5px}
.lc-flag{width:44px;height:44px;border-radius:12px;background:var(--gray-bg);display:inline-flex;align-items:center;justify-content:center;font-size:24px}
.today-word{display:flex;gap:6px;justify-content:center;padding:10px 0}
.today-word span{width:42px;height:46px;border-radius:8px;background:#16a34a;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:21px}
.lc-board{border-top:1px solid var(--border);padding-top:10px}
.lb-row{display:flex;justify-content:space-between;padding:4px 0;font-size:14px}
.lb-row.big{padding:10px 4px;border-bottom:1px solid #eef0f3;font-size:15.5px}.lb-row.big:last-child{border:0}.lb-row.me{background:#ecfeff;border-radius:10px}
.word-cell{font-size:16px}
.len-row{display:grid;grid-template-columns:80px 1fr 30px;gap:8px;align-items:center;margin:4px 0}
.vkb{display:flex;flex-wrap:wrap;gap:4px;margin:-6px 0 14px}.vkb button{min-width:34px;height:32px;border-radius:7px;border:1px solid var(--border);background:#fff;font:inherit;font-size:16px;cursor:pointer}
.vkb button:hover{border-color:var(--accent)}
.date-col{display:flex;flex-direction:column;width:150px}.date-col small{color:var(--muted);font-size:12px}
.today-row{background:#ecfeff}
.sched-form{display:flex;gap:6px;align-items:center}.sched-form select{width:220px}
.emo{font-size:26px;width:40px;text-align:center}
.emo-pick{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.emo-pick input{position:absolute;opacity:0}
.emo-pick span{width:42px;height:42px;border-radius:12px;border:1.5px solid var(--border);display:inline-flex;align-items:center;justify-content:center;font-size:22px;cursor:pointer}
.emo-pick input:checked+span{border-color:var(--accent);background:#ecfeff}

/* ---------- Jeu ---------- */
body.bare:has(.mdj){background:#f8fafc}
.bare-main:has(.mdj){max-width:none;padding:0}
.mdj{max-width:520px;margin:0 auto;padding:10px 12px 20px;min-height:100vh;display:flex;flex-direction:column}
.mdj-top{display:flex;align-items:center;justify-content:space-between;padding:6px 0 10px;border-bottom:1px solid #e2e8f0;margin-bottom:10px}
.mdj-logo{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:18px;color:#0f172a;text-decoration:none!important;letter-spacing:-.01em}
.mdj-logo span{width:34px;height:34px;border-radius:10px;background:#0e7490;color:#fff;display:inline-flex;align-items:center;justify-content:center}
.mdj-tools{display:flex;align-items:center;gap:4px}
.mdj-ic{width:38px;height:38px;border-radius:10px;border:0;background:none;color:#334155;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.mdj-ic:hover{background:#eef2f6}
.mdj-who{border:0;background:#e0f2fe;color:#0c4a6e;border-radius:999px;padding:6px 12px;font:inherit;font-weight:650;font-size:13.5px;cursor:pointer;white-space:nowrap}
.mdj-langs{display:flex;gap:6px;justify-content:center;margin-bottom:8px}
.mdj-langs a{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;background:#fff;border:1.5px solid #e2e8f0;color:#334155;font-weight:650;text-decoration:none!important;font-size:14.5px}
.mdj-langs a.on{border-color:#0e7490;color:#0e7490;background:#ecfeff}
.mdj-langs .fl{font-size:17px}
.mdj-modes{display:flex;gap:4px;justify-content:center;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.mdj-modes button{border:0;background:none;font:inherit;font-size:13.5px;font-weight:650;color:#64748b;padding:6px 12px;border-radius:8px;cursor:pointer}
.mdj-modes button.on{background:#0f172a;color:#fff}
.mdj-alt{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-size:13.5px;font-weight:650;color:#334155;cursor:pointer}
.mdj-alt input{width:16px;height:16px;accent-color:#0e7490}
.mdj-meta{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;min-height:30px;margin-bottom:8px}
.pill{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid #e2e8f0;border-radius:999px;padding:4px 11px;font-size:12.5px;font-weight:600;color:#475569;font-family:inherit}
.pill.hint{background:#fef9c3;border-color:#fde047;color:#713f12}
button.pill{cursor:pointer}.btn-hint:hover,.btn-new:hover{border-color:#0e7490;color:#0e7490}.btn-new{background:#0e7490;color:#fff;border-color:#0e7490}
.mdj-board{display:flex;flex-direction:column;gap:6px;align-items:center;margin:4px 0 8px;flex:1;justify-content:center;--len:5}
.b-row{display:grid;grid-template-columns:repeat(var(--len),1fr);gap:6px;width:min(100%,calc(var(--len) * 62px))}
.t{aspect-ratio:1;border:2px solid #d4dbe3;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:clamp(18px,6.5vw,30px);color:#0f172a;background:#fff;user-select:none;text-transform:none}
.t.filled{border-color:#64748b;animation:pop .1s}
.t.c0{background:#787c7e;border-color:#787c7e;color:#fff}.t.c1{background:#c9a227;border-color:#c9a227;color:#fff}.t.c2{background:#16a34a;border-color:#16a34a;color:#fff}
.b-row.flip .t{animation:flip .5s ease both;animation-delay:calc(var(--i) * .3s)}
@keyframes flip{0%{transform:rotateX(0)}50%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}
@keyframes pop{50%{transform:scale(1.08)}}
.shake{animation:shake .4s}
@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.mdj-msg{min-height:30px;text-align:center}
.mdj-msg.on{display:block;margin:0 auto 8px;background:#0f172a;color:#fff;border-radius:10px;padding:7px 14px;font-weight:650;width:max-content;max-width:100%}
.mdj-kb{display:flex;flex-direction:column;gap:7px;padding-bottom:env(safe-area-inset-bottom)}
.kb-row{display:flex;gap:5px;justify-content:center}
.kb-k{flex:1;max-width:46px;height:54px;border:0;border-radius:7px;background:#dde3ea;color:#0f172a;font:inherit;font-weight:700;font-size:clamp(14px,4.4vw,19px);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;touch-action:manipulation}
.kb-k:active{filter:brightness(.92)}
.kb-wide{max-width:66px;flex:1.5;font-size:13px}
.kb-k.s0{background:#787c7e;color:#fff}.kb-k.s1{background:#c9a227;color:#fff}.kb-k.s2{background:#16a34a;color:#fff}
.mdj-card{background:#fff;border-radius:18px;padding:20px;box-shadow:0 10px 30px -18px rgba(15,23,42,.3);margin-bottom:12px}
.mdj-card.center{text-align:center}.mdj-h2{font-size:17px;margin-bottom:8px}
.mdj-pick h1{font-size:24px;margin:6px 0 18px}
.mdj-players{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-bottom:12px}
.mdj-players button{width:100%;display:flex;flex-direction:column;align-items:center;gap:6px;border:1.5px solid #e2e8f0;background:#fff;border-radius:16px;padding:16px 8px;font:inherit;font-weight:700;font-size:16px;cursor:pointer}
.mdj-players button span{font-size:34px}.mdj-players button:hover{border-color:#0e7490;background:#ecfeff}
.mdj-link{border:0;background:none;color:#0e7490;font:inherit;font-weight:600;cursor:pointer;text-decoration:underline}
.mdj-modal{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}
.mdj-mbox{background:#fff;border-radius:22px;padding:26px 22px 22px;max-width:400px;width:100%;position:relative;text-align:center;animation:pop2 .3s cubic-bezier(.2,1.4,.4,1);max-height:92vh;overflow:auto}
@keyframes pop2{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
.mdj-x{position:absolute;top:10px;right:10px;border:0;background:none;color:#64748b;cursor:pointer;padding:6px}
.mdj-mbox .ex{display:flex;gap:10px;align-items:center;text-align:left;margin:8px 0}.mdj-mbox .ex .t{width:38px;font-size:18px}
.end-h{font-size:24px;font-weight:800;letter-spacing:-.02em;margin-bottom:12px}
.end-word{display:flex;gap:5px;justify-content:center;margin-bottom:10px}.end-word .t{width:44px;font-size:22px}
.end-tr{font-size:17px;font-weight:600;color:#0e7490;margin-bottom:6px}
.end-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:16px 0 12px}
.end-stats div{display:flex;flex-direction:column;background:#f8fafc;border-radius:12px;padding:10px 4px}.end-stats strong{font-size:20px}.end-stats small{font-size:11.5px;color:#64748b}
.dist{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}
.dr{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:700}.dr span{width:12px}
.db{background:#94a3b8;color:#fff;border-radius:4px;padding:2px 7px;text-align:right;min-width:24px}.db.me{background:#16a34a}
.mdj-btn{display:flex;width:100%;justify-content:center;align-items:center;height:50px;border:0;border-radius:14px;background:#0e7490;color:#fff;font:inherit;font-weight:700;font-size:16px;cursor:pointer;text-decoration:none!important;margin-top:8px}
.mdj-btn.ghost{background:#ecfeff;color:#0e7490}
@media (max-height:700px){.kb-k{height:46px}.b-row{width:min(100%,calc(var(--len) * 50px))}}
