/*
 * monster.css — 地点徽章、野怪悬停卡、右键放大查看（2026-11-06），在 hud.css 之后加载。
 * 回退：删掉 index.html 里本文件的 <link>，并恢复 research/backup-20261106-webui-ui/ 下的 app-v2.js、native-layout-v2.js。
 */

/* ---------- 地点徽章：野怪红色交叉剑 / 事件蓝色问号 / 商人金色卡牌 ---------- */
.native-ui .encounter-offer{position:relative}
.native-ui .encounter-type{display:none}
.encounter-badge{
  position:relative;z-index:7;display:grid;place-items:center;
  width:clamp(36px,4.2vw,58px);aspect-ratio:.86;margin:-10px auto 0;
  clip-path:polygon(0 0,100% 0,100% 72%,50% 100%,0 72%);pointer-events:none;
}
.encounter-badge:before{content:'';position:absolute;inset:3px;clip-path:inherit;background:inherit;filter:brightness(1.18)}
.encounter-badge svg{position:relative;width:62%;height:62%;margin-bottom:14%;filter:drop-shadow(0 1px 1px #0009)}
.badge-monster{background:linear-gradient(#ffb36b,#e2502c 45%,#a8241b);color:#fff3e3}
.badge-event{background:linear-gradient(#bff5ff,#33b6d6 45%,#16708f);color:#123448}
.badge-merchant{background:linear-gradient(#fff3a8,#e6be2e 45%,#a87a12);color:#5a3a06}
/* 野怪：只保留头像与徽章；名称、奖励、卡组改到悬停卡和右键放大里 */
.native-ui .encounter-offer.is-monster{background:none!important;padding-bottom:4px}
.native-ui .encounter-offer.is-monster .encounter-info{display:none}
.native-ui .encounter-offer.is-monster .encounter-image{cursor:pointer}
.native-ui .encounter-offer.is-monster:hover .encounter-image{filter:brightness(1.1) drop-shadow(0 0 16px #ff9a5a88)}
@media (min-width:1001px) and (min-height:600px){
  .native-ui .encounter-grid:has(.is-monster){max-width:clamp(420px,calc((100cqh - 90px) * 1.157 * 3 + 60px),100%)!important}
}

/* ---------- 野怪悬停卡 ---------- */
.monster-tip{min-width:300px;max-width:380px;color:#f2e6c9;font-family:'Microsoft YaHei',sans-serif}
.monster-tip .mt-head{position:relative;display:flex;align-items:center;gap:14px;padding:10px 46px 10px 18px;background:linear-gradient(#2b2219,#18120d);border:2px solid #6d6150;border-bottom:0;border-radius:6px 6px 0 0}
.monster-tip .mt-head h3{margin:0;font:600 24px BazaarTitle,serif;color:#f4e7c8;text-shadow:0 2px 3px #000}
.monster-tip .mt-level{position:absolute;right:-14px;top:50%;transform:translateY(-50%);width:44px;height:40px;display:grid;place-items:center;
  clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);background:#7c8a99;color:#5cc8ff;font:700 22px BazaarNumbers,sans-serif}
.monster-tip .mt-level:before{content:'';position:absolute;inset:2px;clip-path:inherit;background:#0d1a2a;z-index:-1}
.monster-tip .mt-level{isolation:isolate}
.monster-tip .mt-body{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:#151210;border:2px solid #6d6150;border-radius:0 0 6px 6px}
.monster-tip .mt-label{font-size:15px;color:#e9dcc0}
.monster-tip .mt-rewards{display:flex;gap:8px}
.monster-tip .mt-rewards span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:58px;height:58px;border-radius:5px;background:#2a2119;box-shadow:inset 0 0 0 1px #5b4a36}
.monster-tip .mt-rewards .game-icon{width:28px;height:28px}
.monster-tip .mt-rewards b{font:700 18px/1 BazaarNumbers,sans-serif;color:#ffd36b;text-shadow:0 1px 2px #000}
.monster-tip .mt-rewards span:nth-child(2) b{color:#6cc8ff}
.monster-tip .mt-foot{margin-top:6px;padding:0 4px;font-size:12px;color:#e3d6b4;display:flex;align-items:center;gap:4px;text-shadow:0 1px 2px #000,0 0 4px #000}
.monster-tip .mt-foot .game-icon{width:15px;height:15px}
.native-ui .card-popover:has(.monster-tip){background:none;box-shadow:none;width:auto;border:0}

/* ---------- 右键放大查看 ---------- */
.monster-view{position:fixed;inset:0;z-index:300;display:grid;place-items:center}
.monster-view .mv-backdrop{position:absolute;inset:0;background:radial-gradient(ellipse at center,#0b0f14b0,#05070ad9);backdrop-filter:blur(3px)}
.monster-view .mv-body{
  --mv-h:clamp(96px,17dvh,190px);
  position:relative;display:flex;flex-direction:column;align-items:center;gap:clamp(10px,2.4dvh,26px);
  width:min(96vw,calc(var(--mv-h) * 5.04 + 80px));max-height:96dvh;
}
.monster-view .mv-close{position:absolute;right:-6px;top:-6px;z-index:3;width:38px;height:38px;border-radius:50%;border:2px solid #c99a45;background:#141b21;color:#f3dca0;font-size:22px;line-height:1;cursor:pointer}
.monster-view .mv-top{display:flex;align-items:center;justify-content:center;gap:clamp(14px,3vw,44px);width:100%}
.monster-view .mv-portrait{position:relative;flex:none;height:clamp(220px,46dvh,520px);aspect-ratio:var(--encounter-ratio,1.157);
  background:var(--encounter-frame) center/100% 100% no-repeat;filter:drop-shadow(0 0 22px #4aa3ff88) drop-shadow(0 10px 20px #000c);transition:filter .15s}
.monster-view .mv-portrait[data-choose]{cursor:pointer}
.monster-view .mv-portrait[data-choose]:hover{filter:drop-shadow(0 0 30px #ffb35acc) drop-shadow(0 10px 20px #000c)}
.monster-view .mv-art{position:absolute;inset:8% 6% 6%;overflow:hidden;border-radius:47% 47% 3% 3% / 18% 18% 3% 3%;z-index:-1}
.monster-view .mv-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:1;mask-image:none}
.monster-view .mv-art .encounter-portrait{object-fit:contain;object-position:bottom;filter:drop-shadow(0 3px 6px #0008)}
.monster-view .mv-side{display:flex;flex-direction:column;align-items:center;gap:14px;min-width:300px}
.monster-view .mv-info{width:100%;max-width:none}
.monster-view .mv-health{position:relative;width:100%;height:30px;border-radius:15px;overflow:hidden;background:#10170f;box-shadow:inset 0 0 0 2px #b5904e,0 2px 6px #000a}
.monster-view .mv-health i{position:absolute;inset:3px;border-radius:12px;background:linear-gradient(#7bea56,#2fb52a 55%,#1d8a1f)}
.monster-view .mv-health b{position:absolute;inset:0;display:grid;place-items:center;font:700 19px BazaarNumbers,sans-serif;color:#fff;text-shadow:0 0 3px #000}
.monster-view .mv-skills{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.monster-view .mv-skills:empty{display:none}
.monster-view .mv-skill{position:relative;width:66px;height:66px;padding:0;border:0;border-radius:50%;overflow:hidden;background:radial-gradient(#3b4650,#1b2228);box-shadow:0 0 0 3px #a9b4bd,0 0 0 5px #2a3138,0 4px 8px #000a;cursor:pointer}
.monster-view .mv-skill .card-component{width:100%;height:100%}
.monster-view .mv-skill .card-caption{display:none}
.monster-view .mv-hint{margin:0;font-size:12px;color:#d9ccaa;text-shadow:0 1px 2px #000}
.monster-view .mv-board{
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:var(--mv-h);gap:3px;
  width:calc(var(--mv-h) * 5.04 + 34px);max-width:100%;box-sizing:border-box;padding:8px 17px 10px;
  background:var(--original-carpet) center/100% 100% no-repeat;filter:drop-shadow(0 8px 16px #000c);
}
.monster-view .mv-token{grid-row:1;min-width:0;height:100%;padding:0;border:0;background:none;cursor:help;display:flex;align-items:flex-end;justify-content:center}
.monster-view .mv-token .card-component{width:100%;height:100%}
.monster-view .mv-token .card-caption{display:none}
@media (max-width:700px){
  .monster-view .mv-top{flex-direction:column}
  .monster-view .mv-portrait{height:32dvh}
  .monster-view .mv-side{min-width:0;width:92vw}
}
/* 棋盘按背景对齐上移后，地点区变矮：图标按剩余高度缩放，名称与徽章不被裁掉 */
@media (min-width:1001px) and (min-height:600px){
  .native-ui .encounter-grid{max-width:clamp(340px,calc((100cqh - 150px) * 1.157 * 3 + 60px),100%)!important}
  .native-ui .encounter-grid:has(.is-monster){max-width:clamp(340px,calc((100cqh - 95px) * 1.157 * 3 + 60px),100%)!important}
}
