/* ================= TÉLÉPHONE ET TABLETTE =================
   .touch : appareil tactile ; .mob : petit écran tactile (téléphone). Rien ici ne change le jeu à la souris. */

/* pas de zoom au double toucher, pas de « tirer pour rafraîchir », pas de surlignage bleu au toucher */
html.touch,html.touch body{touch-action:none;overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}
html.touch body{position:fixed;inset:0;width:100%;height:100%}
html.touch img{-webkit-user-drag:none;pointer-events:auto}
/* les listes qui défilent (encyclopédie, atelier, deck, familiers) restent défilables au doigt */
html.touch #overlay,html.touch .deckgrid,html.touch .cx-body,html.touch .cx2 .cx-body,html.touch .petpick-in,html.touch .at-xcol,html.touch .at-body,html.touch .cx2 nav{touch-action:pan-y;-webkit-overflow-scrolling:touch}

/* ---------- message d'orientation (portrait) ---------- */
#rotate{display:none}
@media (orientation:portrait){
  html.touch #rotate{display:grid;position:fixed;inset:0;z-index:9999;place-items:center;text-align:center;padding:24px;
    background:radial-gradient(ellipse at 50% 40%,#2a1b0e,#0b0704 75%);color:#f4e6c4;font-family:"Alegreya Sans",system-ui,sans-serif}
  html.touch #stage{visibility:hidden}
}
.rot-in{display:flex;flex-direction:column;align-items:center;gap:14px}
.rot-in b{font-family:"Fondamento",Georgia,serif;font-weight:400;font-size:30px;color:#ffd76a}
.rot-in span{font-size:17px;color:#d9c49a}
.rot-ph{width:62px;height:104px;border:4px solid #e2b05a;border-radius:12px;position:relative;margin-bottom:8px;animation:rotph 2.2s ease-in-out infinite}
.rot-ph::after{content:"";position:absolute;left:50%;bottom:7px;width:16px;height:4px;border-radius:2px;background:#e2b05a;transform:translateX(-50%)}
@keyframes rotph{0%,25%{transform:rotate(0)}55%,85%{transform:rotate(-90deg)}100%{transform:rotate(0)}}

/* ---------- info-bulles au toucher (mêmes que le survol) ---------- */
html.touch .relic.th .tip,html.touch .pot.th .tip{display:flex}
html.touch .st[data-tip].th::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);white-space:nowrap;z-index:5;
  padding:8px 12px;border-radius:8px;background:#2b1d12;color:#f4e6c4;font-size:18px;font-weight:700;box-shadow:0 0 0 2px #e2b05a}
html.touch .blewid.th .blewid-txt{opacity:1;transform:translateY(-50%)}
/* pas d'effet de survol « collé » après un toucher */
html.touch .mnode.avail:hover{transform:none;animation:avail 1.4s ease-in-out infinite}

/* ---------- zoom d'une carte (appui long) ---------- */
#czoom{position:absolute;inset:0;z-index:400;display:flex;align-items:center;justify-content:center;gap:70px;background:rgb(8 5 2 / .82);animation:czin .16s ease-out}
@keyframes czin{from{opacity:0}to{opacity:1}}
#czoom .cz-card{width:440px;height:634px;position:relative}
#czoom .cz-card .card{position:absolute;left:0;top:0;transform:scale(2)!important;transform-origin:0 0;pointer-events:none;transition:none}
#czoom .cz-kw{display:flex;flex-direction:column;gap:18px;max-width:640px}
#czoom .cz-kw div{padding:18px 24px;border-radius:14px;background:linear-gradient(#f2e5c4,#dcc596);color:#2b1d12;box-shadow:0 0 0 3px #2b1d12,0 14px 30px rgb(0 0 0 / .6)}
#czoom .cz-kw b{display:block;font-family:var(--display);font-weight:400;font-size:38px;color:#5b3a22;margin-bottom:4px}
#czoom .cz-kw span{font-size:28px;font-weight:700;line-height:1.25}
#czoom .cz-hint{position:absolute;bottom:30px;left:0;right:0;text-align:center;margin:0;font-size:30px;font-weight:800;color:#d9c49a;letter-spacing:2px}

/* ---------- téléphone : tout ce qui se lit en combat est agrandi ---------- */
html.mob .kwtip{transform:scale(1.55);transform-origin:50% 100%}
html.mob .kwtip div span{font-size:17px}
html.mob .fighter:not(.is-p) .plate{transform:translateX(-50%) scale(1.4);transform-origin:50% 0}
html.mob .intentwrap{transform:scale(1.45);transform-origin:50% 100%}
html.mob #endturn{transform:scale(1.35);transform-origin:100% 100%}
html.mob .orb{transform:scale(1.12);transform-origin:0 100%}
html.mob #hud{font-size:120%}
html.mob .warn{transform:translateX(-50%) scale(1.4);transform-origin:50% 100%}
html.mob .relic .tip,html.mob .pot .tip{transform:scale(1.35);transform-origin:0 0}
html.mob .credits{font-size:22px}
html.mob .lead{font-size:30px}
/* bulles du tutoriel et astuces */
html.mob .coach-bub{width:720px;padding:24px 30px 20px}
html.mob .coach-bub small{font-size:17px}
html.mob .coach-bub b{font-size:42px}
html.mob .coach-bub p{font-size:26px;line-height:1.32}
html.mob .coach-btns .btn{font-size:26px;padding:12px 30px}
html.mob .coach-skip{font-size:20px}
html.mob .coach-wait{font-size:22px}
