/* MoonTik — pages Phase 1 (Presets, TTS, Chatbot, Vitre, Battle, Panneaux, Écrans, Timers, Chat) */
.p2 { display: flex; flex-direction: column; gap: 16px; max-width: 1280px; }
.p2-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: linear-gradient(180deg, #19191f, #121216); }
.p2-head .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: #24242c; border: 1px solid var(--border); flex: none; }
.p2-head h2 { margin: 0; font-size: 20px; } .p2-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.p2-head .sp { flex: 1; }
.p2-sw { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; }
.p2-sw i { width: 38px; height: 22px; border-radius: 99px; background: #33333a; position: relative; transition: background .2s; flex: none; }
.p2-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #aaa; transition: transform .2s, background .2s; }
.p2-sw.on i { background: #22c55e; } .p2-sw.on i::after { transform: translateX(16px); background: #fff; }
.p2-sw.on { color: var(--text); }
.p2-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 22px; align-items: start; }
.p2-sec { display: flex; flex-direction: column; gap: 12px; }
.p2-sec > h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.p2-sec > h3 small { font-family: ui-monospace, monospace; color: var(--dim); font-size: 11px; font-weight: 400; }
.p2-sec > h3 .p2-sw { margin-left: auto; }
.p2-sub { color: var(--muted); font-size: 12px; margin: -8px 0 0; }
.p2-lab { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.p2-hint { color: var(--dim); font-size: 12px; margin-top: 6px; }
.p2-seg { display: flex; background: #0e0e12; border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.p2-seg button { flex: 1; border: 0; background: none; color: var(--muted); padding: 7px 10px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; white-space: nowrap; }
.p2-seg button.on { background: #f2f2f4; color: #111; font-weight: 600; }
.p2-seg.dark button.on { background: #2a2a33; color: #fff; }

/* TTS : 15 langues sur plusieurs lignes, sans débordement horizontal. */
.p2-seg.p2-lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 8px; background: transparent; border: 0; padding: 0; }
.p2-seg.p2-lang-grid button { flex: none; width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: center; background: #121218; border: 1px solid var(--border); border-radius: 9px; padding: 8px 9px; }
.p2-seg.p2-lang-grid button:hover { border-color: #a1a1aa; }
.p2-seg.p2-lang-grid button.on { background: #f2f2f4; color: #111; font-weight: 600; border-color: #f2f2f4; }
.p2-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.p2-trow { display: flex; align-items: center; gap: 12px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.p2-trow .tx { flex: 1; } .p2-trow .tx b { display: block; font-size: 13.5px; } .p2-trow .tx span { color: var(--muted); font-size: 12px; }
.p2-trow .ico { font-size: 16px; width: 22px; text-align: center; }
.p2-sl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.p2-sl input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: #fff; }
.p2-sl .v { font-family: ui-monospace, monospace; color: var(--dim); font-size: 11px; }
.p2-step { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.p2-step button { width: 30px; height: 30px; border: 0; background: #1c1c22; color: var(--text); cursor: pointer; font-size: 15px; }
.p2-step input { width: 46px; height: 30px; border: 0; background: #0e0e12; color: var(--text); text-align: center; font: inherit; }
.p2-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #0e0e12; border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-height: 36px; }
.p2-chips .ch { display: inline-flex; align-items: center; gap: 6px; background: #24242c; border-radius: 7px; padding: 3px 8px; font-size: 12.5px; }
.p2-chips .ch button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.p2-chips input { flex: 1; min-width: 120px; background: none; border: 0; color: var(--text); font: inherit; outline: none; }

.p2-word-chips { max-height: 210px; overflow-y: auto; align-content: flex-start; }
.p2-word-chips .ch { max-width: 100%; overflow-wrap: anywhere; }
.p2-word-chips .ch button { color: var(--danger, #f87171); }
.p2-toggles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.p2-tbtn { border: 1px solid var(--border); background: var(--bg-panel); color: var(--muted); border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; font-size: 13px; }
.p2-tbtn.on { border-color: #a1a1aa; color: var(--text); background: #222228; }
.p2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p2-list { display: flex; flex-direction: column; gap: 8px; }
.p2-li { display: flex; align-items: center; gap: 10px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.p2-li .grow { flex: 1; min-width: 0; }
.p2-li code { background: #24242c; border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.p2-ibtn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px; border-radius: 6px; }
.p2-ibtn:hover { background: #24242c; color: var(--text); }
.p2-ibtn.pw.on { color: #22c55e; }
.p2-muted { color: var(--dim); font-size: 12px; }
.p2-tabs { display: inline-flex; gap: 4px; background: #121216; border: 1px solid var(--border); border-radius: 10px; padding: 3px; align-self: flex-start; }
.p2-tabs button { border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; }
.p2-tabs button.on { background: #2a2a33; color: #fff; }
.p2-prev { position: relative; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background-color: #0c0c10; background-image: linear-gradient(45deg, #15151b 25%, transparent 25%), linear-gradient(-45deg, #15151b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #15151b 75%), linear-gradient(-45deg, transparent 75%, #15151b 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.p2-prev iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.p2-prev > .ov-ifr-prev { position: absolute; inset: 0; min-height: 0; overflow: visible; }
.p2-prev > .ov-ifr-prev > iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; max-width: none; border: 0; background: transparent; pointer-events: none; }
.p2-link { display: flex; gap: 6px; align-items: center; }
.p2-link input { flex: 1; font-family: ui-monospace, monospace; font-size: 11.5px; height: 30px; }
.p2-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 999; }
.p2-modal > div { width: min(520px, 92vw); max-height: 88vh; overflow: auto; background: #141418; border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.p2-modal.wide > div { width: min(1040px, 96vw); }
.p2-modal h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.p2-modal .ft { display: flex; justify-content: flex-end; gap: 8px; }
.p2-frow { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.p2-toast { position: fixed; right: 20px; bottom: 20px; background: #16a34a; color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13px; }
/* Presets */
.ps-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ps-ban { height: 130px; display: grid; place-items: center; position: relative; overflow: hidden; }
.ps-ban .g { font-size: 64px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.ps-ban .t { position: absolute; bottom: 8px; left: 12px; font-family: "LG", sans-serif; color: #fff; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0,0,0,.6); font-size: 18px; }
.ps-ban::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.18), transparent 50%); }
.ps-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ps-body h4 { margin: 0; font-size: 14px; } .ps-body p { margin: 0; color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; border: 1px solid; }
.ps-badge.blue { color: #60a5fa; border-color: #1e3a8a; background: rgba(37,99,235,.12); cursor: pointer; }
.ps-badge.purple { color: #c084fc; border-color: #581c87; background: rgba(147,51,234,.12); cursor: pointer; }
.ps-badge.gold { color: #facc15; border-color: #854d0e; background: rgba(250,204,21,.1); }
.ps-badge.orange { color: #fb923c; border-color: #9a3412; background: rgba(251,146,60,.1); }
.ps-badge.green { color: #4ade80; border-color: #166534; background: rgba(34,197,94,.1); }
.ps-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ps-table th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ps-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.ps-pop { position: fixed; z-index: 80; background: #17171c; border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.55); min-width: 280px; max-height: min(440px, 70vh); overflow: auto; font-size: 12.5px; }
.ps-pop table { border-collapse: collapse; width: 100%; } .ps-pop td, .ps-pop th { padding: 6px 8px; text-align: left; border-bottom: 1px solid #222228; white-space: nowrap; }
.ps-pop th { color: var(--muted); font-weight: 500; }
.ps-ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.ps-ico.ps-round { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px #1a1030, 0 0 0 3px rgba(246, 217, 138, .7); }
.ps-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.ps-ban.ps-shots { display: grid; grid-template-columns: 1fr 1.35fr 1fr; height: 168px; background: #07070b; }
.ps-ban.ps-shots iframe { width: 100%; height: 168px; border: 0; pointer-events: none; background: #111; }
.ps-ban .ps-logo { width: min(100%, 420px); height: 120px; position: relative; z-index: 1; }
.ps-ban.ps-photo { height: 168px; padding: 0; background: #120c22; display: block; }
.ps-ban.ps-photo::after { content: none; }
.ps-ban.ps-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ps-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.ps-voir { flex: 1; background: #1c1c22; border: 1px solid #2a2a32; }
.ps-round { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #1c1c22; border: 1px solid #2a2a32; color: #e5e7eb; padding: 0; }
.ps-install { background: #e11d48; color: #fff; border: 0; font-weight: 700; }
.ps-install:hover { filter: brightness(1.08); }
.ps-top { display: flex; align-items: center; gap: 12px; }
.ps-top .grow { flex: 1; min-width: 0; }
.ps-top h2 { margin: 0; font-size: 16px; }
.ps-top p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.ps-pop.wide { min-width: min(560px, 78vw); }
.ps-ov { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid #222228; }
.ps-shots-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ps-shots-mini iframe { width: 100%; height: 120px; border: 0; border-radius: 8px; background: #111; pointer-events: none; }
.ps-shots-mini.one { grid-template-columns: 1fr; }
.ps-shots-mini.one iframe { height: 200px; }
.ps-board { position: relative; width: 460px; height: 250px; margin-top: 8px; border-radius: 14px; overflow: hidden; background: #100c18; }
/* Battle */
.bt-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-panel); }
.bt-team { position: relative; border: 1px solid rgba(167, 139, 250, 0.22); border-top: 2px solid var(--c); border-radius: 14px; background: #14122a; padding: 12px 40px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.bt-team-del { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; border-radius: 10px; border: 1px solid rgba(251, 113, 133, 0.5); background: rgba(90, 18, 40, 0.85); color: #fb7185; display: grid; place-items: center; cursor: pointer; z-index: 2; box-shadow: 0 0 0 1px rgba(10, 8, 24, 0.4); }
.bt-team-del svg { width: 16px; height: 16px; display: block; pointer-events: none; }
.bt-team-del:hover:not(:disabled) { background: #e11d48; color: #fff; border-color: #fb7185; box-shadow: 0 0 12px rgba(244, 63, 94, 0.45); }
.bt-team-del:disabled { opacity: 0.38; cursor: not-allowed; filter: grayscale(0.25); box-shadow: none; }
.bt-team .hd { display: flex; align-items: center; gap: 8px; } .bt-team .hd b { color: var(--c); font-size: 15px; flex: 1; }
.bt-team .dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), var(--c) 50%); background-size: cover; }
.bt-team .score { text-align: center; font-size: 34px; font-weight: 800; color: var(--c); }
.bt-team .pg { height: 4px; border-radius: 99px; background: #2a2a33; overflow: hidden; } .bt-team .pg i { display: block; height: 100%; background: var(--c); }
.bt-team .row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.bt-team .row .wins { color: #facc15; flex: 1; }
.bt-team .btns { display: flex; justify-content: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.bt-team .btns button { min-width: 44px; }
.bt-team .lnk { display: flex; justify-content: center; gap: 16px; font-size: 12px; } .bt-team .lnk button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.bt-add { border: 1px dashed var(--border); border-radius: 12px; display: grid; place-items: center; color: var(--muted); cursor: pointer; min-height: 180px; background: none; font: inherit; }
.bt-chip { padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.bt-adv summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
.bt-adv summary small { color: var(--muted); font-weight: 400; }
.bt-moon { display: flex; flex-direction: column; gap: 18px; }
.bt-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(167, 139, 250, .28); }
.bt-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #c4b5fd; margin-bottom: 4px; }
.bt-top b { display: block; font-size: 26px; line-height: 1.1; }
.bt-top #btInfo { color: var(--muted); font-size: 13px; margin-top: 4px; }
.bt-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bt-arena { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; align-items: stretch; }
.bt-side { position: relative; border-radius: 18px; padding: 14px 14px 12px; background: linear-gradient(165deg, color-mix(in srgb, var(--c) 28%, #140f28), #0e0c18 62%); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); display: flex; flex-direction: column; gap: 8px; }
.bt-side header { display: flex; align-items: center; gap: 10px; }
.bt-side header b { font-size: 16px; }
.bt-side header em { display: block; font-style: normal; color: var(--c); font-size: 12px; }
.bt-side .dot { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 55%); background-size: cover; flex: none; }
.bt-side .score { margin-left: auto; font-size: 32px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 #000; }
.bt-side .pg { height: 8px; border-radius: 99px; background: rgba(0,0,0,.4); overflow: hidden; }
.bt-side .pg i { display: block; height: 100%; background: var(--c); }
.bt-side .meta { margin: 0; font-size: 12px; color: var(--muted); }
.bt-push { display: flex; gap: 6px; }
.bt-push button { flex: 1; }
.bt-side footer { display: flex; gap: 6px; flex-wrap: wrap; }
.bt-side footer button { border: 0; background: rgba(255,255,255,.07); color: #e4e4e7; border-radius: 8px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 12px; }
.bt-new { border: 1px solid rgba(196, 181, 253, .35); background: transparent; color: #ddd6fe; border-radius: 18px; cursor: pointer; font: 600 14px inherit; min-height: 120px; }
.p2-prev.bt-stage-prev { height: 180px; background: #07060f; background-image: none; }
.bt-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); gap: 22px; align-items: start; }
.bt-split h3 { margin: 0 0 8px; font-size: 16px; }
.bt-split section { display: flex; flex-direction: column; gap: 10px; }
.bt-gifts { display: flex; flex-direction: column; }
.bt-gift { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.bt-gift img, .bt-gift > span { width: 28px; height: 28px; object-fit: contain; flex: none; }
.bt-gift p { flex: 1; margin: 0; font-size: 13.5px; }
.bt-gift button { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.bt-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bt-link select { flex: 1; min-width: 140px; }
.bt-link input { width: 76px; }
@media (max-width: 900px) { .bt-split { grid-template-columns: 1fr; } .bt-top { flex-direction: column; align-items: flex-start; } }
/* Vitre */
.vt-tr { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; }
.vt-tr .hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13.5px; } .vt-tr .hd b { flex: 1; font-weight: 500; }
.vt-tr .bd { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.vt-tr .rw { display: flex; align-items: center; gap: 10px; font-size: 13px; }
/* Panneaux */
.pn-wiz { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pn-opt { border: 1px solid var(--border); background: #18181d; border-radius: 12px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--text); font: inherit; font-size: 12.5px; }
.pn-opt:hover { border-color: #8b5cf6; }
.pn-phone { position: relative; width: 82px; height: 140px; border-radius: 10px; background: #26262e; overflow: hidden; }
.pn-phone.land { width: 132px; height: 76px; margin: 32px 0; }
.pn-phone::before { content: "👤"; position: absolute; left: 0; right: 0; top: 0; height: 45%; display: grid; place-items: center; background: #303038; font-size: 18px; opacity: .6; }
.pn-phone.land::before { display: none; }
.pn-phone::after { content: "🎮"; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; display: grid; place-items: center; font-size: 18px; opacity: .45; }
.pn-phone.land::after { height: 100%; }
.pn-phone s { position: absolute; width: 9px; height: 9px; border-radius: 3px; background: #f472b6; text-decoration: none; }
/* t236 — grille virtualisée, icône + fallback emoji, steppers MoonTik */
.pn-g-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.pn-gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; align-content: start; }
.pn-g { position: relative; border: 1px solid var(--border); border-radius: 10px; background: #1a1a20; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 10.5px; text-align: center; color: var(--text); font-family: inherit; height: 132px; overflow: hidden; box-sizing: border-box; }
.pn-g img { width: 44px; height: 44px; object-fit: contain; }
.pn-g.on { border-color: #fff; background: #26262e; }
.pn-g .n { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #111; font-size: 11px; display: grid; place-items: center; font-weight: 700; z-index: 2; }
.pn-g-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; max-width: 100%; word-break: break-word; }
.pn-g-ico { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.pn-g-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; line-height: 1; pointer-events: none; }
.pn-g-ico img {
  position: relative; z-index: 1; width: 44px; height: 44px; object-fit: contain;
  opacity: 0; pointer-events: none;
}
.pn-g-ico img.is-ok { opacity: 1; }
/* is-pending stays opacity:0 (not display:none) so load events still fire */
.pn-g-ico img.is-err,
.pn-g-ico img:not([src]),
.pn-g-ico img[src=""] { display: none !important; opacity: 0; }
.pn-g-sp { grid-column: 1 / -1; pointer-events: none; padding: 0; border: 0; height: 0; }
.p2-modal .mp-step { width: 124px; flex: none; }
.p2-modal .mp-step input[type=number] { width: 100%; min-width: 0; text-align: center; }
.p2-modal .mp-step input[type=number]::-webkit-inner-spin-button,
.p2-modal .mp-step input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.p2-modal .mp-step input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.p2-modal .mp-dd { width: auto; min-width: 160px; flex: none; }
.pn-ed { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 12px; height: 74vh; }
.pn-side { overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.pn-canvas-wrap { display: grid; place-items: center; background: #000; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.pn-canvas { position: relative; height: 96%; aspect-ratio: 9/16; border: 1px solid #555; background: #0b0b0b; overflow: visible; }
.pn-canvas.land { height: auto; width: 96%; aspect-ratio: 16/9; }
.pn-canvas .face { position: absolute; left: 0; right: 0; top: 0; height: 42%; background: #161616; display: grid; place-items: center; font-size: 60px; opacity: .5; }
.pn-canvas .game { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; display: grid; place-items: center; font-size: 60px; opacity: .25; }
.pn-canvas.land .face { display: none; } .pn-canvas.land .game { height: 100%; }
.pn-canvas .pn-it { cursor: move; }
/* Le libellé doit être cliquable pour l'édition au double-clic (mt_panel_label_edit.js). */
.pn-canvas .pn-tx { pointer-events: auto; cursor: text; }
.pn-order { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.pn-order div { display: flex; align-items: center; gap: 6px; } .pn-order img { width: 20px; height: 20px; object-fit: contain; } .pn-order span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-order button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
/* Écrans */
.ec-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-panel); cursor: pointer; }
.ec-card.sel { border-color: #8b5cf6; }
.ec-card .pv { aspect-ratio: 16/9; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 800; background-size: cover; background-position: center; position: relative; }
.ec-card .pv .b { position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 500; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 99px; }
.ec-card .bd { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
/* Galerie de skins */
.sk-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sk-c { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0e0e12; cursor: pointer; text-align: left; padding: 0; color: var(--text); font: inherit; }
.sk-c.on { border-color: #8b5cf6; box-shadow: 0 0 0 2px rgba(139,92,246,.3); }
.sk-c .h { padding: 8px 10px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); } .sk-c .h small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-c .f { height: 170px; overflow: hidden; position: relative; } .sk-c iframe { width: 200%; height: 340px; transform: scale(.5); transform-origin: 0 0; border: 0; pointer-events: none; }
/* Sidebar fonctionnalités cliquables */
.toggle-row.mt-feat { cursor: pointer; border: 0; background: none; width: 100%; font: inherit; text-align: left; border-radius: 8px; }
.toggle-row.mt-feat:hover { background: var(--bg-hover); color: var(--text); }
.toggle-row.mt-feat .switch { pointer-events: auto; cursor: pointer; }
.toggle-row.mt-feat .switch.on { background: rgba(167, 139, 250, .45); } .toggle-row.mt-feat .switch.on::after { transform: translateX(16px); background: #f5f3ff; }
.toggle-row.mt-feat.active { background: var(--accent-soft); color: var(--text); }
@font-face { font-family: "LG"; src: url("/static/fonts/LuckiestGuy-Regular.ttf"); }
@font-face { font-family: "BG"; src: url("/static/fonts/Bangers-Regular.ttf"); }
@font-face { font-family: "LI"; src: url("/static/fonts/LilitaOne-Regular.v2.woff2") format("woff2"), url("/static/fonts/LilitaOne-Regular.v2.ttf") format("truetype"); }
@font-face { font-family: "PX"; src: url("/static/fonts/PressStart2P-Regular.ttf"); }
/* Popover variables Minecraft */
.mcv-wrap { display: flex; align-items: center; gap: 8px; position: relative; margin-bottom: 6px; }
.mcv-wrap .mc-title { margin: 0 !important; }
.mcv-btn { border: 1px solid #a16207; color: #fbbf24; background: rgba(251,191,36,.08); border-radius: 7px; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; }
.mcv-pop { position: absolute; top: 28px; left: 0; right: 0; z-index: 60; background: #141418; border: 1px solid #ca8a04; border-radius: 12px; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.mcv-h { color: #fbbf24; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.mcv-g { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; margin: 8px 0 4px; }
.mcv-l { display: flex; flex-wrap: wrap; gap: 4px; }
.mcv-c { font-family: ui-monospace, monospace; font-size: 11px; background: #24242c; color: var(--text); border: 1px solid #2f2f38; border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.mcv-c:hover { border-color: #ca8a04; } .mcv-c.ok { background: #166534; }
.mcv-f { color: var(--dim); font-size: 11px; margin-top: 8px; }
/* Carte membre — éditeur de flux */
.cf-ed { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 18px; min-height: 72vh; padding-bottom: 60px; background-image: radial-gradient(#26262e 1px, transparent 1px); background-size: 18px 18px; border-radius: 14px; }
.cf-svg { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; overflow: visible; }
.cf-left { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.cf-node { position: relative; background: #121216; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.cf-node.cf-new { flex-direction: row; align-items: center; justify-content: space-between; border-style: dashed; }
.cf-h { display: flex; align-items: center; gap: 10px; } .cf-h .ic { width: 30px; height: 30px; border-radius: 8px; background: rgba(59,130,246,.15); display: grid; place-items: center; }
.cf-h small { display: block; color: #60a5fa; font-size: 10px; letter-spacing: .06em; } .cf-h b { font-size: 13.5px; }
.cf-p { display: flex; align-items: center; gap: 6px; color: var(--muted); } .cf-p input { width: 80px; height: 26px; }
.cf-c { display: flex; align-items: center; justify-content: space-between; color: #fbbf24; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.cf-add { background: #1c1c22; color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
.cf-conds { display: flex; flex-wrap: wrap; gap: 5px; }
.cf-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(251,191,36,.1); border: 1px solid #854d0e; color: #fde68a; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; }
.cf-chip input { width: 48px; background: #0e0e12; border: 1px solid #3a3a44; color: var(--text); border-radius: 4px; font-size: 11px; }
.cf-chip button { border: 0; background: none; color: #fde68a; cursor: pointer; }
.cf-port { position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; }
.cf-mid { display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; }
.cf-card { position: relative; background: #121216; border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.cf-in { position: absolute; left: -6px; top: 220px; width: 10px; height: 10px; }
.cf-react details { border-top: 1px solid var(--border-soft); padding: 6px 0; font-size: 12.5px; } .cf-react summary { cursor: pointer; color: var(--muted); }
.cf-right { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; }
.cf-bar { position: sticky; bottom: 12px; align-self: center; display: flex; gap: 8px; background: #121216; border: 1px solid var(--border); border-radius: 12px; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 5; }
/* Bingo des cadeaux */
.bg-cols { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.bg-left { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bg-right { display: flex; flex-direction: column; gap: 14px; }
.bg-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.bg-cells { display: grid; gap: 6px; }
.bg-c { border: 1px solid var(--border); background: #18181d; color: var(--text); border-radius: 10px; padding: 8px 4px; min-height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; font: inherit; font-size: 11.5px; text-align: center; }
.bg-c img { width: 26px; height: 26px; object-fit: contain; } .bg-c b { font-weight: 600; } .bg-c small { color: var(--muted); }
.bg-c.on { border-color: #ec4899; background: rgba(236, 72, 153, .12); } .bg-c.done { box-shadow: inset 0 0 0 2px #2563eb; } .bg-c.free { cursor: default; opacity: .7; }
@media (max-width: 1100px) { .bg-cols { grid-template-columns: 1fr; } .bg-left { position: static; } }
/* Jeux / Tableau Battle / Snake Duel */
.lv-split { display: grid; grid-template-columns: minmax(380px, 520px) minmax(0, 1fr); gap: 16px; align-items: start; }
.lv-sticky { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 132px); overflow: auto; z-index: 2; }
.lv-pair { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; align-items: start; }
.lv-glass { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #111; }
.lv-glass iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lv-pair .vt-phone { width: 132px; }
@media (max-width: 1100px) { .lv-split { grid-template-columns: 1fr; } .lv-sticky { position: static; max-height: none; overflow: visible; } }
main.main > .mt-playbar { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 28px 12px; padding: 10px 12px; border: 1px solid #3f3f46; border-radius: 12px; background: #16141f; }
main.main > .mt-playbar[hidden] { display: none; }
main.main > .mt-playbar [data-mt-note] { opacity: .75; font-size: 13px; }
.g3-cols { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
.g3-left { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 10px; } .g3-right { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .g3-cols { grid-template-columns: minmax(0, 1fr); } .g3-left { position: static; } .g3-left, .g3-right { min-width: 0; } /* t447 : le panneau de droite ne depasse plus a faible largeur */ }
.g3-team { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; background: #101014; }
.g3-flag { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.g3-lunou { width: 52px; height: 56px; flex: none; }
.g3-lunou .lunou { width: 52px; height: 56px; display: block; }
.g3-row { display: grid; grid-template-columns: 30px minmax(0, 1.4fr) minmax(0, 1fr) 90px 34px; gap: 6px; align-items: center; }
.g3-row img { width: 28px; height: 28px; object-fit: contain; }
.g3-how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.g3-search { display: flex; align-items: center; gap: 10px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px; }
.g3-search .input { flex: 1; border: 0; background: transparent; font-size: 14px; }
.g3-pills { display: flex; gap: 8px; flex-wrap: wrap; } .g3-pills button { border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); border-radius: 99px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.g3-pills button.on { background: #f5f5f5; color: #111; border-color: #f5f5f5; }
/* t278d: pastilles Splash / Cleaner plus visibles */
.g3-pills[data-glass-tabs]{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 14px;}
.g3-pills[data-glass-tabs] button{border:1px solid var(--border,#3f3f46);background:var(--bg-panel,#1c1833);color:var(--text,#f3f0ff);border-radius:99px;padding:8px 16px;cursor:pointer;font:inherit;font-size:14px;font-weight:700;}
.g3-pills[data-glass-tabs] button.on{background:#f5f5f5;color:#111;border-color:#f5f5f5;}

.g3-h { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; }
.g3-card { cursor: pointer; transition: transform .15s, border-color .15s; } .g3-card:hover { transform: translateY(-2px); border-color: #52525b; }
.g3-card.is-soon { cursor: not-allowed; opacity: .78; } .g3-card.is-soon:hover { transform: none; border-color: inherit; }
.g3-card.is-soon button { pointer-events: none; }
.g3-title { font-size: 30px; color: #fff; letter-spacing: .04em; text-shadow: 0 3px 14px rgba(0,0,0,.7); text-align: center; padding: 0 10px; position: relative; z-index: 1; }
.ps-ban.ps-live { height: 168px; padding: 0; background: radial-gradient(circle at 50% 42%, #24143d, #07060e 72%); display: block; }
.ps-ban.ps-live::after { content: none; }
.ps-ban.ps-live iframe { position: absolute; top: 0; left: 0; width: 200%; height: 200%; border: 0; pointer-events: none; background: transparent; transform: scale(.5); transform-origin: 0 0; }
.g3-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 10.5px; padding: 2px 8px; border-radius: 99px; z-index: 2; }
.g3-cmd { display: block; background: #0c0c10; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

.vt-previews { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.vt-phone { width: 220px; background: #0b0b10; border-radius: 32px; padding: 12px 10px 16px; border: 2px solid #2a2a36; box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 0 0 1px #3f3f52; }
.vt-phone-notch { width: 72px; height: 8px; border-radius: 8px; background: #16161e; margin: 0 auto 8px; }
.vt-phone-screen { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 9/16; background: #100c18; }
.vt-phone-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vt-stage-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* t244 — sélecteur de cadeaux de la scène (aperçu + grille), sans toucher aux dalles existantes */
.p2-modal.wide.pn-scene-pick > div{width:min(1100px,96vw);max-width:96vw}
.pn-split-head{display:flex;align-items:center;gap:8px}
.pn-split-head h3{flex:1;margin:0}
.p2-modal h3 .sp,.pn-split-head .sp{flex:1}
button.p2-x{
  appearance:none;border:0;background:transparent;color:var(--muted,#9aa0b8);
  font-size:22px;line-height:1;width:32px;height:32px;border-radius:8px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;padding:0;flex:0 0 auto
}
button.p2-x:hover{background:rgba(255,255,255,.08);color:#fff}
.pn-split{display:grid;grid-template-columns:minmax(240px,.9fr) minmax(340px,1.25fr);gap:16px;min-height:0;align-items:stretch}
.pn-split-prev{display:flex;flex-direction:column;gap:8px;min-width:0}
.pn-scene-pick .pn-live{position:relative;flex:0 0 auto;min-height:200px;border-radius:12px;border:1px solid var(--border,rgba(255,255,255,.12));background:#0b0b0b;overflow:hidden;width:100%;height:auto}
.pn-scene-pick .pn-live.land{aspect-ratio:16/9}
.pn-scene-pick .pn-live:not(.land){aspect-ratio:9/16;max-height:52vh;width:auto;margin:0 auto}
.pn-scene-pick .pn-live .pn-stage{position:absolute;inset:0;width:100%;height:100%}
.pn-scene-pick .pn-live.is-empty .game{opacity:.45;height:100%}
.pn-scene-pick .pn-live.is-empty .face{display:none}
.pn-live-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pn-live-tools .p2-lab{margin:0}
.pn-split-list{display:flex;flex-direction:column;gap:8px;min-width:0}
.pn-split-list-head{display:flex;align-items:center;gap:10px}
.pn-split-list-head .p2-muted{flex:1}
.pn-split-list-head .btn{flex:0 0 auto;white-space:nowrap}
.pn-scene-pick .pn-gifts-scene{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;max-height:52vh;overflow:auto;align-content:start
}
.pn-scene-pick .pn-g{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  margin:0;width:auto;min-width:0;height:132px;padding:18px 6px 8px;
  box-sizing:border-box
}
.pn-scene-pick .pn-g .pn-g-ico{width:64px;height:64px;flex:0 0 64px}
.pn-scene-pick .pn-g .pn-g-name{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;
  overflow:hidden;text-align:center;font-size:11px;font-weight:700;line-height:1.15;
  max-height:2.3em;margin-top:6px;width:100%;word-break:break-word
}
.pn-scene-pick .pn-g.on{border-color:#c084fc;background:rgba(124,58,237,.28)}
.pn-scene-pick .pn-g .n{
  position:absolute;top:5px;left:5px;z-index:2;
  min-width:20px;height:20px;padding:0 5px;border-radius:999px;
  background:#7c3aed;color:#fff;font-weight:700;font-size:11px;line-height:20px;text-align:center
}
@media (max-width:900px){
  .pn-split{grid-template-columns:1fr}
  .pn-scene-pick .pn-gifts-scene{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:620px){
  .pn-scene-pick .pn-gifts-scene{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* t251 — aperçu typo des listes Police (n'affecte pas les dalles) */
.mt-font-dd{position:relative;width:100%;max-width:100%;min-width:0}
.mt-font-dd .mp-dd-native{
  position:absolute!important;opacity:0;pointer-events:none;
  width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)
}
.mt-font-dd .mp-dd-btn{
  appearance:none;-webkit-appearance:none;
  width:100%;display:flex;align-items:center;text-align:left;cursor:pointer;
  background:rgba(18,18,24,.92);color:#e8e8ef;
  border:1px solid #2a2a32;border-radius:10px;
  padding:7px 28px 7px 12px;font-size:14px;line-height:1.25;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c4b5fd' d='M1 1l5 5 5-5'/></svg>");
  background-repeat:no-repeat;background-position:right 10px center
}
.mt-font-dd.open .mp-dd-btn,.mt-font-dd .mp-dd-btn:focus-visible{
  border-color:#7c3aed;box-shadow:0 0 0 2px rgba(124,58,237,.35);outline:none
}
.mt-font-dd .mp-dd-menu{
  position:absolute;z-index:80;left:0;right:0;top:calc(100% + 4px);
  max-height:280px;overflow:auto;
  background:#14141c;color:#e8e8ef;
  border:1px solid rgba(167,139,250,.35);border-radius:12px;
  box-shadow:0 18px 40px rgba(0,0,0,.55);padding:4px
}
.mt-font-dd .mp-dd-opt{
  appearance:none;-webkit-appearance:none;
  display:block;width:100%;text-align:left;cursor:pointer;border:0;border-radius:8px;
  background:transparent;color:inherit;padding:8px 10px;font-size:15px;line-height:1.3
}
.mt-font-dd .mp-dd-opt:hover,.mt-font-dd .mp-dd-opt.on{background:rgba(124,58,237,.28)}
