/* Menu Jouer (hors partie) : même style que le reste du site — cases de manga (.koma : fond encre, contour blanc,
   ombre rouge), boutons comics jaunes, onglets .subtab, titres Dela Gothic jaunes. Préfixe pm- (play menu). */
.pm { display: grid; gap: 18px; max-width: 1180px; margin: 0 auto; padding: 4px 0 30px; }
.pm .koma { margin: 0; }
.pm .koma h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.pm .koma h3 small { font: 600 0.75rem "Zen Kaku Gothic New", sans-serif; letter-spacing: 0; text-transform: none; color: var(--muted); }
.pm .ico { width: 1.1em; height: 1.1em; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pm .comic-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.pm .comic-btn small { font: 700 0.72rem "Zen Kaku Gothic New", sans-serif; text-transform: none; letter-spacing: 0; opacity: 0.8; }
.pm .comic-btn.big { font-size: 1.15rem; padding: 14px 30px; }
.pm .muted { color: var(--muted); }
.pm-help { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }
.pm-empty { margin: 8px 0; color: var(--muted); }
.pm-link { background: none; border: 0; padding: 0; color: var(--pop); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* barre de page */
.pm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pm-h2 { margin: 0; font: 1.5rem "Dela Gothic One", sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--pop); text-shadow: 3px 3px 0 var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.pm-bar .pm-chip { margin-left: auto; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 2px solid var(--text); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 0.85rem; white-space: nowrap; }
.pm-chip b { font-family: "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-color { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: color-mix(in oklab, var(--g) 30%, transparent); border: 2px solid var(--g); color: var(--text); font: 700 0.75rem "Zen Kaku Gothic New", sans-serif; }
.pm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 4px; background: var(--text); color: var(--ink-black); font: 700 0.75rem "Zen Kaku Gothic New", sans-serif; }
.pm-tag.boss { background: var(--accent); color: #fff; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px !important; }
.pm-progress { display: block; height: 10px; border: 2px solid var(--ink-black); background: rgba(255, 255, 255, 0.85); border-radius: 3px; overflow: hidden; }
.pm-progress i { display: block; height: 100%; background: var(--accent); }

/* ---------- accueil ---------- */
.pm-hero { text-align: center; }
.pm-title { margin: 0; font: clamp(2.6rem, 8vw, 4.4rem)/1 "Dela Gothic One", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pop); -webkit-text-stroke: 2px var(--ink-black); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--accent); transform: rotate(-2deg); }
.pm-lead { margin: 12px auto 10px; max-width: 560px; color: var(--muted); }
.pm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pm-last { margin: 0; padding: 8px 14px; border: 3px solid var(--text); background: var(--panel); box-shadow: 4px 4px 0 var(--accent); text-align: center; }
.pm-last.win b { color: #6ff09a; }
.pm-last.loss b { color: #ff8a8a; }
.pm-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pm-mode { position: relative; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; border: 3px solid var(--text); background: rgba(16, 16, 20, 0.94); box-shadow: 6px 6px 0 var(--accent); color: var(--text); cursor: pointer; overflow: hidden; transition: transform 0.08s, box-shadow 0.08s; }
.pm-mode::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.6px) 0 0 / 8px 8px; pointer-events: none; }
.pm-mode:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent); }
.pm-mode:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--accent); }
.pm-mode.red { background: linear-gradient(135deg, #b5142a, #e8263c 60%, #ff4d5e); border-color: var(--ink-black); box-shadow: 6px 6px 0 var(--pop); }
.pm-mode.red:hover { box-shadow: 8px 8px 0 var(--pop); }
.pm-mode.yellow { background: var(--pop); color: var(--ink-black); border-color: var(--ink-black); }
.pm-mode.yellow .pm-kicker, .pm-mode.yellow .pm-mode-text > span { color: #3a2a00; }
.pm-mode-art { position: relative; width: 112px; height: 96px; display: flex; align-items: center; justify-content: center; }
.pm-mode-art img { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 3px solid var(--ink-black); background: #222; box-shadow: 3px 3px 0 var(--ink-black); }
.pm-mode-art.vs img { width: 64px; height: 64px; position: absolute; }
.pm-mode-art.vs img:first-child { left: 0; top: 0; }
.pm-mode-art.vs img:last-child { right: 0; bottom: 0; }
.pm-mode-art.vs i { position: relative; z-index: 2; font: 1.3rem "Dela Gothic One", sans-serif; font-style: normal; color: var(--pop); -webkit-text-stroke: 1.5px var(--ink-black); paint-order: stroke fill; }
.pm-mode-art.icon { font-size: 3rem; color: var(--pop); }
.pm-mode-art.icon .ico { width: 64px; height: 64px; }
.pm-mode-text { position: relative; display: grid; gap: 4px; min-width: 0; }
.pm-kicker { font: 700 0.72rem "Zen Kaku Gothic New", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.pm-mode-text b { font: 1.4rem/1.1 "Dela Gothic One", sans-serif; text-transform: uppercase; }
.pm-mode-text > span { font-size: 0.85rem; color: var(--muted); }
.pm-mode.red .pm-mode-text > span { color: #ffe1e4; }
.pm-mode-go { position: absolute; right: 12px; bottom: 8px; font: 0.8rem "Dela Gothic One", sans-serif; text-transform: uppercase; opacity: 0.9; }
.pm-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pm-rank h3 { margin-bottom: 8px; }
.pm-prizes { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-prize { padding: 3px 10px; border: 2px solid var(--ink-black); background: var(--pop); color: var(--ink-black); font: 700 0.8rem "Zen Kaku Gothic New", sans-serif; box-shadow: 2px 2px 0 var(--accent); }
.pm-rank-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.pm-rank-list li { display: grid; grid-template-columns: 2.4em 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; border: 2px solid var(--line); background: var(--panel); }
.pm-rank-list li.me { border-color: var(--pop); box-shadow: 3px 3px 0 var(--accent); }
.pm-rank-n { font: 1rem "Dela Gothic One", sans-serif; text-align: center; color: var(--pop); }
.pm-rank-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-rank-elo { font: 1rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-rank-list small { color: var(--muted); font-size: 0.72rem; }
.pm-rank-list.mine { margin-top: 8px; }
@media (max-width: 760px) {
  .pm-modes { grid-template-columns: 1fr; }
  .pm-mode { grid-template-columns: 84px 1fr; }
  .pm-mode-art { width: 84px; height: 76px; }
  .pm-mode-art img { width: 70px; height: 70px; }
  .pm-mode-art.vs img { width: 50px; height: 50px; }
}

/* ---------- carrousel des protagonistes ---------- */
.pm-hc { --ring: clamp(150px, 26vw, 230px); }
.pm-hc-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(4px, 2vw, 22px); min-height: calc(var(--ring) + 70px); }
.pm-hc-main { display: grid; justify-items: center; gap: 8px; z-index: 2; }
.pm-hc-ring { width: var(--ring); aspect-ratio: 1; border-radius: 50%; padding: 6px; background: conic-gradient(from 200deg, var(--g), var(--pop), var(--g)); box-shadow: 0 0 0 4px var(--ink-black), 8px 8px 0 4px var(--accent), 0 0 40px color-mix(in oklab, var(--g) 60%, transparent); }
.pm-hc-ring img, .pm-hc-ring span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: #222; border: 4px solid var(--ink-black); font: 4rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-hc-name { font: clamp(1.1rem, 3vw, 1.5rem) "Dela Gothic One", sans-serif; text-transform: uppercase; color: var(--text); text-align: center; text-shadow: 2px 2px 0 var(--accent); }
.pm-hc-side { width: calc(var(--ring) * 0.42); aspect-ratio: 1; padding: 0; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink-black); outline: 3px solid var(--g); background: #222; cursor: pointer; opacity: 0.55; filter: grayscale(0.5); transition: opacity 0.2s, transform 0.2s; }
.pm-hc-side.far { width: calc(var(--ring) * 0.28); opacity: 0.3; }
.pm-hc-side:hover { opacity: 0.9; transform: scale(1.06); filter: none; }
.pm-hc-side img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.pm-hc-arrow { position: absolute; top: calc(var(--ring) / 2); z-index: 3; width: 48px; height: 48px; display: grid; place-items: center; border: 3px solid var(--ink-black); border-radius: 6px; background: var(--pop); color: var(--ink-black); font: 1.8rem/1 "Dela Gothic One", sans-serif; box-shadow: 4px 4px 0 var(--accent); cursor: pointer; transition: transform 0.08s; }
.pm-hc-arrow.l { left: 0; }
.pm-hc-arrow.r { right: 0; }
.pm-hc-arrow:hover { transform: translate(-2px, -2px); }
.pm-hc-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.pm-hc-dots button { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 2px solid var(--ink-black); background: color-mix(in oklab, var(--g) 50%, #444); cursor: pointer; }
.pm-hc-dots button.on { background: var(--pop); transform: scale(1.3); box-shadow: 0 0 0 2px var(--g); }
.pm-hc-info { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.pm-hc-power { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border: 2px solid var(--text); background: var(--panel); box-shadow: 4px 4px 0 var(--g); }
.pm-hc-power img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink-black); background: #222; outline: 2px solid var(--pop); }
.pm-hc-power b { font: 1.05rem "Dela Gothic One", sans-serif; color: var(--pop); text-transform: uppercase; }
.pm-hc-power small { color: var(--muted); }
.pm-hc-power p { margin: 4px 0 0; line-height: 1.4; }
.pm-hc-style { margin: 0; text-align: center; line-height: 1.5; }
.pm-hc-style em { display: block; font-size: 1.05rem; }
.pm-hc-style small { color: var(--muted); }
.pm-hc-rates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pm-hc-rates > span { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 2px solid var(--line); background: var(--panel); }
.pm-hc-rates small { font: 700 0.72rem "Zen Kaku Gothic New", sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pm-stars { color: var(--pop); font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; }
.pm-stars i { font-style: normal; color: #3a3a44; }
.pm-hc.from-r .pm-hc-main { animation: pm-from-r 0.3s ease-out; }
.pm-hc.from-l .pm-hc-main { animation: pm-from-l 0.3s ease-out; }
@keyframes pm-from-r { from { transform: translateX(60px) scale(0.85); opacity: 0.3; } }
@keyframes pm-from-l { from { transform: translateX(-60px) scale(0.85); opacity: 0.3; } }
@media (max-width: 700px) {
  .pm-hc-side.far { display: none; }
  .pm-hc-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-hc-arrow { width: 40px; height: 40px; font-size: 1.4rem; }
}

/* ---------- avant-partie ---------- */
.pm-note { display: flex; gap: 10px; align-items: center; font-size: 0.9rem; }
.pm-deckopts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pm-deckopt { display: grid; gap: 4px; padding: 10px 12px; text-align: left; border: 2px solid var(--text); background: var(--panel); color: var(--text); cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; }
.pm-deckopt b { display: flex; align-items: center; gap: 6px; font: 0.95rem "Dela Gothic One", sans-serif; text-transform: uppercase; }
.pm-deckopt small { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.pm-deckopt:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent); }
.pm-deckopt.sel { background: var(--pop); color: var(--ink-black); border-color: var(--ink-black); box-shadow: 4px 4px 0 var(--accent); }
.pm-deckopt.sel small { color: #3a2a00; }
.pm-deckopt.precon { border-style: dashed; }
.pm-deckopt.new { border-style: dotted; background: transparent; }
.pm-deckopt:disabled { opacity: 0.5; }
.pm-deckopt:disabled small { color: #ff9a8a; }
.pm-precon { margin-top: 12px; }
.pm-precon summary { cursor: pointer; color: var(--pop); font-weight: 700; margin-bottom: 10px; }
.pm-go { display: flex; justify-content: center; }
.pm-setup-opp .pm-opp { max-width: 760px; }

/* adversaire de la campagne */
.pm-opp { display: flex; gap: 16px; align-items: flex-start; }
.pm-opp-face { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--ink-black); outline: 3px solid var(--g); background: #222; box-shadow: 5px 5px 0 var(--accent); }
.pm-opp-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; border-radius: 50%; }
.pm-opp-face b { position: absolute; right: -8px; bottom: -6px; min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink-black); background: var(--accent); color: #fff; font: 0.95rem "Dela Gothic One", sans-serif; }
.pm-opp-text { min-width: 0; font-size: 0.9rem; line-height: 1.45; }
.pm-opp-text h4 { margin: 0; font: 1.2rem "Dela Gothic One", sans-serif; text-transform: uppercase; }
.pm-opp-text p { margin: 4px 0; }
.pm-opp-skill { padding: 8px 10px; border: 2px solid var(--accent); background: rgba(232, 38, 60, 0.15); }
.pm-opp-skill small { color: #ffc2c2; }
.pm-opp-reward { font-weight: 700; color: var(--pop); }

/* attente du duel classé */
.pm-wait { display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: 20px auto !important; text-align: center; }
.pm-wait p { margin: 0; }
.pm-wait-vs { display: flex; align-items: center; gap: 16px; }
.pm-wait-vs > b { font: 2rem "Dela Gothic One", sans-serif; color: var(--pop); -webkit-text-stroke: 2px var(--ink-black); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--accent); }
.pm-wait-face { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; border: 4px solid var(--ink-black); outline: 3px solid var(--pop); background: #222; font: 2.4rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-wait-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.pm-wait-face.mystery { animation: pm-shake 1.2s ease-in-out infinite; }
@keyframes pm-shake { 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(8deg) scale(1.05); } }
.pm-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 14px; max-width: 1180px; }

/* ---------- écran de fin (hors partie) : style du site ---------- */
#arena-root .ar-result { border-radius: 0; border: 3px solid var(--text); background: rgba(16, 16, 20, 0.96); box-shadow: 8px 8px 0 var(--accent); }
#arena-root .ar-result::before { background: repeating-conic-gradient(from 0deg, rgba(255, 212, 0, 0.1) 0 6deg, transparent 6deg 16deg); }
#arena-root .ar-result-title { font: clamp(2.2rem, 7vw, 3.6rem)/1 "Dela Gothic One", sans-serif; text-transform: uppercase; background: none; -webkit-text-fill-color: var(--pop); color: var(--pop); -webkit-text-stroke: 2px var(--ink-black); paint-order: stroke fill; filter: none; text-shadow: 4px 4px 0 var(--accent); }
#arena-root .ar-result.loss .ar-result-title { -webkit-text-fill-color: #d6d2dc; color: #d6d2dc; }
#arena-root .ar-result-face { border-radius: 50%; padding: 0; border: 4px solid var(--ink-black); outline: 3px solid var(--pop); background: #222; box-shadow: 5px 5px 0 var(--accent); }
#arena-root .ar-result-score b { font-family: "Dela Gothic One", sans-serif; color: var(--pop); }
#arena-root .ar-result-pa { font-family: "Dela Gothic One", sans-serif; color: var(--pop); text-shadow: 3px 3px 0 var(--accent); }
#arena-root .ar-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
#arena-root .pm-rules { color: var(--text); }
#arena-root .pm-rules h4 { font-family: "Dela Gothic One", sans-serif; text-transform: uppercase; color: var(--pop); }

/* ---------- Mes decks ---------- */
.pm-deckbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px !important; }
.pm-deckpick { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 260px; color: var(--pop); }
.pm-deckpick select, .pm-sort select, .pm-filters input[type="search"] { min-width: 0; padding: 9px 10px; border: 2px solid var(--text); border-radius: 6px; background: var(--panel); color: var(--text); font: 700 0.9rem "Zen Kaku Gothic New", sans-serif; }
.pm-deckpick select { flex: 1; }
.pm-deckbar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-tabs { margin: 0 !important; max-width: none !important; }
.pm-tabs .subtab { cursor: pointer; }
.pm-tabs .subtab b { margin-left: 4px; }
.pm-herotab .pm-hc { padding: 6px 0; }
.pm-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.pm-cardgrid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pm-cardgrid .acard { --w: 100%; width: 100%; }
.pm-dcard, .pm-pcard { position: relative; cursor: pointer; transition: transform 0.1s; }
.pm-dcard:hover, .pm-pcard:not(.off):hover { transform: translateY(-4px); }
.pm-copies { position: absolute; z-index: 6; left: -6px; top: -8px; min-width: 38px; padding: 2px 8px; border: 3px solid var(--ink-black); background: var(--pop); color: var(--ink-black); font: 1rem "Dela Gothic One", sans-serif; box-shadow: 3px 3px 0 var(--accent); transform: rotate(-6deg); }
.pm-minus { position: absolute; z-index: 6; right: -6px; top: -8px; width: 30px; height: 30px; display: grid; place-items: center; border: 3px solid var(--ink-black); border-radius: 50%; background: var(--accent); color: #fff; font: 1.2rem/1 "Dela Gothic One", sans-serif; opacity: 0; transition: opacity 0.15s; }
.pm-dcard:hover .pm-minus { opacity: 1; }
@media (hover: none) { .pm-minus { opacity: 1; } }
.pm-dslot { display: grid; place-items: center; aspect-ratio: 63 / 88; border: 3px dashed var(--line); color: var(--muted); text-align: center; font: 0.85rem "Dela Gothic One", sans-serif; text-transform: uppercase; }
.pm-pcard.in .acard { outline: 4px solid var(--pop); outline-offset: 2px; }
.pm-pcard.off { cursor: not-allowed; }
.pm-pcard.off .acard { filter: grayscale(0.85) brightness(0.55); }
.pm-badge { position: absolute; z-index: 6; right: -6px; top: -8px; padding: 2px 8px; border: 2px solid var(--ink-black); background: var(--text); color: var(--ink-black); font: 0.8rem "Dela Gothic One", sans-serif; box-shadow: 2px 2px 0 var(--accent); }
.pm-pcard.in .pm-badge { background: var(--pop); }
.pm-minus2 { position: absolute; z-index: 7; left: -6px; top: -8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 3px solid var(--ink-black); border-radius: 50%; background: var(--accent); color: #fff; font: 1.2rem/1 "Dela Gothic One", sans-serif; cursor: pointer; }
.pm-why { position: absolute; z-index: 6; left: 6%; right: 6%; bottom: 38%; padding: 4px 6px; border: 2px solid var(--ink-black); background: var(--text); color: var(--ink-black); font: 700 0.72rem/1.25 "Zen Kaku Gothic New", sans-serif; text-align: center; transform: rotate(-3deg); }
.pm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.pm-filters input[type="search"] { flex: 1 1 220px; }
.pm-filters #db-fbtn b:not(:empty) { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; }
.pm-sort { display: inline-flex; gap: 6px; }
.pm-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0; font-size: 0.88rem; }
.pm-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pm-check input { width: 18px; height: 18px; accent-color: var(--pop); }
.pm-poolcount { margin-left: auto; font: 0.85rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm .db-fpanel { display: none; gap: 12px 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 12px; padding: 12px; border: 2px solid var(--text); background: var(--panel); border-radius: 0; box-shadow: none; }
.pm .db-fpanel.open { display: grid; }
.pm .db-fgroup legend { color: var(--pop); font-family: "Dela Gothic One", sans-serif; text-transform: uppercase; font-size: 0.82rem; }
.pm .db-chk > span { border-radius: 4px; border: 2px solid var(--line); background: #101014; color: var(--text); }
.pm .db-chk input:checked + span { background: var(--pop); color: var(--ink-black); border-color: var(--ink-black); }
.pm .db-chk input:checked + span .ico { color: var(--ink-black) !important; }
.pm .db-chk small { margin-left: 4px; opacity: 0.7; }
.pm .db-chk.zero { opacity: 0.4; }
.pm-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0; }
.pm-pager:empty { display: none; }
.pm-pager button { min-width: 36px; height: 36px; padding: 0 8px; border: 2px solid var(--text); border-radius: 4px; background: var(--panel); color: var(--text); font: 0.85rem "Dela Gothic One", sans-serif; cursor: pointer; }
.pm-pager button.on { background: var(--pop); color: var(--ink-black); border-color: var(--ink-black); box-shadow: 2px 2px 0 var(--accent); }
.pm-pgap { align-self: center; color: var(--muted); }
.pm-savebar { position: sticky; bottom: 10px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 14px; border: 3px solid var(--text); background: rgba(16, 16, 20, 0.97); box-shadow: 6px 6px 0 var(--accent); }
.pm-savestate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-width: 0; }
.pm-count { font: 1.2rem "Dela Gothic One", sans-serif; color: var(--muted); }
.pm-count b { font-size: 1.6rem; color: var(--pop); }
.pm-state { font-weight: 700; }
.pm-state.ok { color: #6ff09a; }
.pm-state.todo { color: var(--pop); }
.pm-state.bad { color: #ff9a8a; }
.pm-msg { font-size: 0.8rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 640px; }
.pm-savebtns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .pm-cardgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 8px; }
  .bottom-nav ~ * .pm-savebar, .pm-savebar { bottom: calc(var(--nav-h, 60px) + 8px); }
}
/* stats */
.pm-stats { display: grid; gap: 18px; }
.pm-curve { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; height: 200px; padding: 10px 6px 0; border-bottom: 3px solid var(--text); }
.pm-bar-col { display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-items: center; height: 100%; gap: 4px; }
.pm-bar-col i { width: 100%; max-width: 64px; min-height: 2px; align-self: end; background: repeating-linear-gradient(45deg, var(--pop) 0 8px, #ffe45a 8px 16px); border: 3px solid var(--ink-black); box-shadow: 4px 0 0 var(--accent); }
.pm-bar-col small { font: 0.9rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-bar-col b { margin-top: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #2d7fd8; border: 2px solid var(--ink-black); color: #fff; font: 0.85rem "Dela Gothic One", sans-serif; transform: translateY(18px); }
.pm-avg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.pm-avg span { display: grid; justify-items: center; padding: 8px; border: 2px solid var(--line); background: var(--panel); font-size: 0.78rem; color: var(--muted); }
.pm-avg b { font: 1.4rem "Dela Gothic One", sans-serif; color: var(--pop); }
.pm-odds { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pm-odds th, .pm-odds td { padding: 8px 10px; border-bottom: 2px solid var(--line); text-align: left; }
.pm-odds thead th { font: 0.75rem "Dela Gothic One", sans-serif; text-transform: uppercase; color: var(--muted); }
.pm-odds td { font: 1.05rem "Dela Gothic One", sans-serif; color: var(--pop); text-align: center; }
.pm-odds thead th:not(:first-child) { text-align: center; }
.pm-tallies { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pm-tally { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 2px solid var(--line); background: var(--panel); font-size: 0.85rem; }
.pm-tally b { font-family: "Dela Gothic One", sans-serif; color: var(--pop); }
@media (max-width: 600px) { .pm-avg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pm-curve { height: 150px; gap: 6px; } }

/* ---------- Campagne ---------- */
.pm-lvls { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: thin; }
.pm-lvl { flex: none; width: 96px; display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border: 2px solid var(--text); background: var(--panel); color: var(--text); cursor: pointer; transition: transform 0.08s; }
.pm-lvl:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--accent); }
.pm-lvl.sel { background: var(--pop); color: var(--ink-black); border-color: var(--ink-black); box-shadow: 4px 4px 0 var(--accent); }
.pm-lvl.locked { opacity: 0.4; }
.pm-lvl-face { position: relative; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink-black); background: #222; }
.pm-lvl-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.pm-lvl-face i { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); font-style: normal; color: #6ff09a; font-weight: 800; }
.pm-lvl small { font: 0.72rem "Dela Gothic One", sans-serif; }
.pm-lvl b { font: 700 0.7rem/1.15 "Zen Kaku Gothic New", sans-serif; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-camp-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .pm-camp-main { grid-template-columns: 1fr; } }
.pm-world { position: relative; aspect-ratio: 16 / 10; border: 4px solid var(--text); box-shadow: 8px 8px 0 var(--accent); overflow: hidden; background: #111; }
@media (max-width: 700px) { .pm-world { aspect-ratio: 4 / 5; } }
.pm-world-bg, .pm-world-bg .sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pm-world::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1.4px) 0 0 / 6px 6px, linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.25)); }
.pm-road { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.pm-road path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.pm-road-edge { stroke: #3b2a18; stroke-width: 30px; opacity: 0.55; }
.pm-road-fill { stroke: #e9cf98; stroke-width: 22px; }
.pm-road-dash { stroke: #fff6d8; stroke-width: 3px; stroke-dasharray: 10 12; animation: pm-dash 2.5s linear infinite; }
@keyframes pm-dash { to { stroke-dashoffset: -44; } }
.pm-world-cap { position: absolute; z-index: 4; left: 12px; top: 12px; display: grid; gap: 3px; min-width: 190px; padding: 8px 12px; border: 3px solid var(--ink-black); background: var(--pop); color: var(--ink-black); box-shadow: 4px 4px 0 var(--accent); transform: rotate(-1.5deg); }
.pm-world-cap b { font: 1.05rem "Dela Gothic One", sans-serif; text-transform: uppercase; }
.pm-world-cap small { font: 700 0.72rem "Zen Kaku Gothic New", sans-serif; }
.pm-cell { --sz: clamp(42px, 6.4vw, 66px); position: absolute; z-index: 3; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; animation: pm-pop 0.45s backwards cubic-bezier(0.3, 1.6, 0.5, 1); animation-delay: calc(var(--k) * 40ms); }
@keyframes pm-pop { from { transform: translate(-50%, -50%) scale(0); } }
.pm-cell.big { --sz: clamp(52px, 8vw, 82px); }
.pm-cell.boss { --sz: clamp(62px, 9.5vw, 100px); }
.pm-cell-face { position: relative; width: var(--sz); height: var(--sz); border-radius: 50%; overflow: hidden; border: 3px solid var(--ink-black); outline: 3px solid var(--g); background: #222; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.pm-cell-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.pm-cell.boss .pm-cell-face { outline: 4px solid var(--accent); box-shadow: 0 0 0 6px rgba(232, 38, 60, 0.35), 0 8px 0 rgba(0, 0, 0, 0.35); }
.pm-cell-stone { width: calc(var(--sz) * 0.62); height: calc(var(--sz) * 0.62); display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink-black); background: radial-gradient(circle at 40% 30%, #fff8e4, #d9c48f); color: var(--ink-black); font: 0.85rem "Dela Gothic One", sans-serif; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.pm-cell-name { padding: 1px 7px; border: 2px solid var(--ink-black); background: var(--text); color: var(--ink-black); font: 700 0.68rem/1.2 "Zen Kaku Gothic New", sans-serif; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.pm-cell.boss .pm-cell-name { background: var(--accent); color: #fff; }
.pm-cell-cost { padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: var(--pop); font: 0.62rem "Dela Gothic One", sans-serif; }
.pm-cell-crown { position: absolute; top: -18px; left: 50%; translate: -50% 0; color: var(--pop); font-size: 1.5rem; filter: drop-shadow(1px 2px 0 var(--ink-black)); animation: pm-crown 2s ease-in-out infinite; }
.pm-cell-crown .ico { fill: var(--pop); stroke: var(--ink-black); }
@keyframes pm-crown { 50% { transform: translateY(-4px) rotate(-6deg); } }
.pm-cell-star { position: absolute; top: -6px; right: -12px; padding: 0 5px; border: 2px solid var(--ink-black); background: var(--pop); color: var(--ink-black); font: 0.7rem/1.3 "Dela Gothic One", sans-serif; font-style: normal; transform: rotate(8deg); }
.pm-cell-ok { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #6ff09a; font: 1.4rem "Dela Gothic One", sans-serif; font-style: normal; }
.pm-cell.done .pm-cell-face img { filter: saturate(0.5); }
.pm-cell.next .pm-cell-face { filter: brightness(0.75) saturate(0.7); }
.pm-cell.now .pm-cell-face, .pm-cell.now .pm-cell-stone { animation: pm-now 1.3s ease-in-out infinite; }
@keyframes pm-now { 50% { box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.75), 0 0 24px rgba(255, 212, 0, 0.8); } }
.pm-cell:hover .pm-cell-face, .pm-cell.sel .pm-cell-face { transform: scale(1.12); }
.pm-cell.sel .pm-cell-face, .pm-cell.sel .pm-cell-stone { outline: 4px solid var(--pop); }
.pm-token { position: absolute; z-index: 5; width: clamp(34px, 4.6vw, 48px); height: clamp(34px, 4.6vw, 48px); margin: calc(clamp(34px, 4.6vw, 48px) * -1.35) 0 0 calc(clamp(34px, 4.6vw, 48px) * -0.95); border-radius: 50%; overflow: hidden; border: 3px solid var(--ink-black); outline: 3px solid var(--pop); background: #222; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35); pointer-events: none; transition: left 0.9s cubic-bezier(0.5, 0, 0.3, 1), top 0.9s cubic-bezier(0.5, 0, 0.3, 1); animation: pm-bob 1.6s ease-in-out infinite; }
.pm-token.moving { animation: pm-hop 0.3s ease-in-out 3; }
.pm-token img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
@keyframes pm-bob { 50% { transform: translateY(-5px); } }
@keyframes pm-hop { 50% { transform: translateY(-18px); } }
.pm-talk { position: absolute; z-index: 8; width: min(320px, 70%); transform: translate(-50%, calc(-100% - 70px)); padding: 10px 14px 12px; border: 3px solid var(--ink-black); border-radius: 18px; background: #fff; color: var(--ink-black); box-shadow: 5px 5px 0 var(--accent); animation: pm-talk 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.pm-talk.left { transform: translate(-85%, calc(-100% - 70px)); }
.pm-talk::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 26px; height: 22px; background: #fff; border-right: 3px solid var(--ink-black); border-bottom: 3px solid var(--ink-black); transform: translateX(-50%) skewX(20deg) rotate(45deg) scale(0.8); }
.pm-talk.left::after { left: 85%; }
.pm-talk b { font: 0.8rem "Dela Gothic One", sans-serif; text-transform: uppercase; color: var(--accent); }
.pm-talk p { margin: 4px 0 0; font: 700 1rem/1.35 "Zen Kaku Gothic New", sans-serif; }
@keyframes pm-talk { from { opacity: 0; transform: translate(-50%, calc(-100% - 40px)) scale(0.4); } }
.pm-cell-info { position: sticky; top: 12px; }
.pm-cell-info .pm-opp { flex-direction: column; align-items: center; text-align: center; }
.pm-cell-info .pm-tags { justify-content: center; }
.pm-cell-info .comic-btn { width: 100%; margin-top: 12px; }
@media (max-width: 700px) {
  .pm-opp { flex-direction: column; align-items: center; text-align: center; }
  .pm-tags { justify-content: center; }
  .pm-cell-name, .pm-cell-cost { display: none; }
  .pm-world-cap { min-width: 0; left: 8px; top: 8px; padding: 6px 8px; }
  .pm-talk { width: 72%; }
}

/* ---------- décors animés (scenes.js) ---------- */
.sc-svg * { transform-box: fill-box; }
.sc-drift { animation: sc-drift var(--d, 80s) linear infinite; }
@keyframes sc-drift { from { transform: translateX(-200px); } to { transform: translateX(1700px); } }
.sc-drift-fast { animation: sc-drift-fast 9s linear infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-drift-fast { from { transform: translateX(-80px); opacity: 0; } 20% { opacity: 0.8; } to { transform: translateX(260px); opacity: 0; } }
.sc-wave { animation: sc-wave 7s ease-in-out infinite alternate; }
.sc-wave2 { animation-duration: 5s; animation-direction: alternate-reverse; }
@keyframes sc-wave { to { transform: translateX(-180px); } }
.sc-foam { animation: sc-foam 4s ease-in-out infinite; }
@keyframes sc-foam { 50% { opacity: 0.25; } }
.sc-bob { transform-origin: center; animation: sc-bob var(--d, 5s) ease-in-out infinite; }
@keyframes sc-bob { 25% { transform: translateY(-6px) rotate(-1.5deg); } 75% { transform: translateY(4px) rotate(1.5deg); } }
.sc-flag { transform-origin: left center; animation: sc-flag 1.2s ease-in-out infinite; }
@keyframes sc-flag { 50% { transform: skewY(8deg) scaleX(0.9); } }
.sc-fly { animation: sc-fly 22s linear infinite; }
@keyframes sc-fly { from { transform: translate(-500px, 40px); } to { transform: translate(1700px, -60px); } }
.sc-flap { transform-origin: center; animation: sc-flap 0.5s ease-in-out infinite; }
@keyframes sc-flap { 50% { transform: scaleY(-0.6); } }
.sc-twinkle { animation: sc-twinkle var(--d, 3s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-twinkle { 50% { opacity: 0.25; } }
.sc-fall { animation: sc-fall var(--d, 8s) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-fall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--x, 40px), 960px) rotate(540deg); } }
.sc-pulse { transform-origin: center; animation: sc-pulse 4s ease-in-out infinite; }
@keyframes sc-pulse { 50% { transform: scale(1.12); opacity: 0.2; } }
.sc-peek { animation: sc-peek 9s ease-in-out infinite; }
@keyframes sc-peek { 0%, 30% { transform: translateY(150px); } 50%, 75% { transform: translateY(0); } 100% { transform: translateY(150px); } }
.sc-sway { animation: sc-sway var(--d, 4s) ease-in-out infinite; }
@keyframes sc-sway { 50% { transform: rotate(4deg); } }
.sc-firefly { animation: sc-firefly var(--d, 4s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-firefly { 0%, 100% { transform: translate(0, 0); opacity: 0.2; } 50% { transform: translate(18px, -26px); opacity: 1; } }
.sc-flutter { animation: sc-flutter var(--d, 4s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes sc-flutter { 25% { transform: translate(14px, -12px) scale(0.7, 1); } 50% { transform: translate(28px, 0); } 75% { transform: translate(14px, 10px) scale(0.7, 1); } }
.sc-flash { animation: sc-flash 3s ease-in-out infinite; }
@keyframes sc-flash { 50% { opacity: 0.3; } }
.sc-zip rect { animation: sc-zip 3.5s linear infinite; }
@keyframes sc-zip { from { transform: translateX(0); } to { transform: translateX(2000px); } }
.sc-river { stroke-dasharray: 40 90; animation: sc-river 3s linear infinite; opacity: 0.8; }
@keyframes sc-river { to { stroke-dashoffset: -96; } }
@media (prefers-reduced-motion: reduce) {
  .pm-world *, .pm-cell, .pm-token, .pm-talk, .pm-hc .pm-hc-main, .pm-wait-face { animation: none !important; transition: none !important; }
}
/* téléphone : barres compactes */
@media (max-width: 760px) {
  .pm { gap: 14px; }
  .pm-h2 { font-size: 1.15rem; }
  .pm-deckbar { gap: 8px; padding: 10px !important; }
  .pm-deckbar > small { display: none; }
  .pm-deckbar-btns { flex-wrap: nowrap; gap: 6px; }
  .pm-deckbar-btns .comic-btn, .pm-savebtns .comic-btn { font-size: 0.66rem; padding: 6px 8px; box-shadow: 2px 2px 0 var(--accent); }
  .pm-tabs { flex-wrap: nowrap !important; }
  .pm-tabs .subtab { flex: 1; font-size: 0.72rem; padding: 7px 6px; text-align: center; }
  .pm-savebar { gap: 6px; padding: 8px 10px; box-shadow: 4px 4px 0 var(--accent); }
  .pm-savestate { gap: 2px 10px; }
  .pm-count { font-size: 1rem; }
  .pm-count b { font-size: 1.2rem; }
  .pm-state { font-size: 0.8rem; }
  .pm-msg { display: none; }
  .pm-savebtns { flex-wrap: nowrap; gap: 6px; width: 100%; }
  .pm-savebtns #ad-save { margin-left: auto; }
  .pm-world-cap b { font-size: 0.85rem; }
  .pm-world-cap small:last-child { display: none; }
  .pm-world-cap .pm-progress { height: 7px; }
}

/* boîte de dialogue maison (remplace confirm / prompt) */
.pm-dlg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
.pm-dlg-box { display: grid; gap: 14px; width: min(420px, 100%); margin: 0; }
.pm-dlg-box p { margin: 0; font-weight: 700; line-height: 1.4; }
.pm-dlg-box input { padding: 10px 12px; border: 2px solid var(--text); border-radius: 6px; background: var(--panel); color: var(--text); font: 700 1rem "Zen Kaku Gothic New", sans-serif; }
.pm-dlg-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pm-dlg .comic-btn { cursor: pointer; }
.pm-dlg .comic-btn.danger, .pm .comic-btn.danger { background: var(--accent); color: #fff; }

/* bouton d'action toujours visible sur le plateau de la campagne */
.pm-world-go { position: absolute; z-index: 7; right: 12px; bottom: 12px; }
.pm-world-go.done { padding: 8px 14px; border: 3px solid var(--ink-black); background: #6ff09a; color: var(--ink-black); font: 0.85rem "Dela Gothic One", sans-serif; box-shadow: 4px 4px 0 var(--accent); }
/* téléphone à l'horizontale : le plateau tient dans la hauteur, la fiche de la case à côté */
@media (max-height: 520px) and (orientation: landscape) {
  .pm-camp .pm-lvls { padding-bottom: 6px; }
  .pm-camp .pm-lvl { width: 78px; padding: 4px; }
  .pm-camp .pm-lvl-face { width: 38px; height: 38px; }
  .pm-camp-main { grid-template-columns: auto minmax(220px, 1fr); }
  .pm-world { height: calc(100dvh - var(--header-h, 56px) - var(--nav-h, 60px) - 24px); width: auto; aspect-ratio: 16 / 10; }
  .pm-cell { --sz: clamp(30px, 8dvh, 52px); }
  .pm-cell.big { --sz: clamp(36px, 10dvh, 60px); }
  .pm-cell.boss { --sz: clamp(42px, 12dvh, 68px); }
  .pm-cell-name, .pm-cell-cost { display: none; }
  .pm-world-cap { padding: 4px 8px; min-width: 0; }
  .pm-world-cap small, .pm-world-cap .pm-progress { display: none; }
  .pm-world-go { right: 8px; bottom: 8px; font-size: 0.8rem; padding: 8px 12px; }
  .pm-cell-info { font-size: 0.85rem; padding: 10px 12px !important; }
  .pm-cell-info .pm-opp-face { width: 64px; height: 64px; }
}
