/* Monster Profile — one presentation surface for combat intelligence, Chronicle
   history and the authoritative reward renderer. Gameplay remains read-only. */
.monster-profile-portrait-trigger{
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  padding:0;
  cursor:pointer;
  position:relative;
  overflow:visible;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease;
}
.monster-profile-portrait-trigger::after{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:10px;
  border:1px solid transparent;
  pointer-events:none;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.monster-profile-portrait-trigger:hover,
.monster-profile-portrait-trigger:focus-visible{
  z-index:2;
  transform:translateY(-1px) scale(1.035);
  border-color:rgba(107,220,214,.8)!important;
  box-shadow:0 0 0 1px rgba(107,220,214,.18),0 0 17px rgba(69,196,191,.26),0 6px 13px rgba(0,0,0,.34);
  outline:none;
}
.monster-profile-portrait-trigger:hover::after,
.monster-profile-portrait-trigger:focus-visible::after{
  border-color:rgba(213,181,95,.42);
  box-shadow:0 0 12px rgba(107,220,214,.2);
}
.monster-profile-card-button{cursor:pointer}

.monster-profile-overlay{
  z-index:9850!important;
  padding:18px;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  background:rgba(3,8,13,.78);
}
.monster-profile-shell{
  --monster-profile-primary:77,178,174;
  --monster-profile-secondary:211,169,80;
  --monster-profile-glint:126,235,226;
  position:relative;
  width:min(920px,calc(100vw - 36px));
  max-width:920px!important;
  max-height:min(900px,calc(100dvh - 36px));
  overflow:auto;
  padding:0!important;
  text-align:left!important;
  border:1px solid rgba(var(--monster-profile-primary),.46)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 17% 8%,rgba(var(--monster-profile-primary),.16),transparent 33%),
    radial-gradient(circle at 88% 4%,rgba(var(--monster-profile-secondary),.11),transparent 27%),
    linear-gradient(155deg,rgba(17,27,35,.995),rgba(8,13,20,.995) 66%,rgba(12,18,25,.995))!important;
  box-shadow:0 30px 80px rgba(0,0,0,.72),0 0 32px rgba(var(--monster-profile-primary),.13),inset 0 1px rgba(255,255,255,.025)!important;
  scrollbar-color:rgba(var(--monster-profile-primary),.48) rgba(255,255,255,.035);
}
.monster-profile-shell::before{
  content:"";
  position:sticky;
  display:block;
  top:0;
  z-index:9;
  height:2px;
  background:linear-gradient(90deg,transparent,rgba(var(--monster-profile-primary),.86),rgba(var(--monster-profile-secondary),.9),transparent);
  box-shadow:0 0 17px rgba(var(--monster-profile-primary),.45);
}
.monster-profile-close{
  position:sticky;
  top:12px;
  z-index:30;
  float:right;
  width:40px;
  height:40px;
  margin:12px 12px -54px 0;
  border:1px solid rgba(var(--monster-profile-glint),.38);
  border-radius:11px;
  background:rgba(6,12,18,.87);
  color:#E9F5F4;
  font-size:25px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.36),inset 0 0 14px rgba(var(--monster-profile-primary),.06);
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.monster-profile-close:hover,.monster-profile-close:focus-visible{
  background:rgba(var(--monster-profile-primary),.19);
  border-color:rgba(var(--monster-profile-glint),.82);
  transform:scale(1.04);
  outline:none;
}
#drops-modal-body{min-height:180px}
.monster-profile{color:var(--text)}
.monster-profile-hero{
  position:relative;
  min-height:286px;
  display:grid;
  grid-template-columns:minmax(230px,38%) 1fr;
  align-items:center;
  gap:22px;
  padding:28px 62px 24px 28px;
  overflow:hidden;
  border-bottom:1px solid rgba(var(--monster-profile-primary),.24);
}
.monster-profile-hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(var(--monster-profile-primary),.06),transparent 46%),
    repeating-linear-gradient(120deg,transparent 0 23px,rgba(255,255,255,.012) 24px 25px);
  mask-image:linear-gradient(to bottom,#000,transparent 96%);
}
.monster-profile-art-stage{
  position:relative;
  aspect-ratio:1;
  width:min(260px,100%);
  margin:auto;
  display:grid;
  place-items:center;
  isolation:isolate;
}
.monster-profile-art-stage::before,
.monster-profile-art-stage::after{
  content:"";
  position:absolute;
  pointer-events:none;
  border-radius:50%;
}
.monster-profile-art-stage::before{
  inset:8%;
  z-index:-2;
  border:1px solid rgba(var(--monster-profile-primary),.34);
  background:radial-gradient(circle,rgba(var(--monster-profile-primary),.18),rgba(6,13,19,.12) 54%,transparent 72%);
  box-shadow:0 0 34px rgba(var(--monster-profile-primary),.18),inset 0 0 28px rgba(var(--monster-profile-primary),.12);
}
.monster-profile-art-stage::after{
  inset:17%;
  z-index:-1;
  border:1px dashed rgba(var(--monster-profile-secondary),.34);
  box-shadow:0 0 16px rgba(var(--monster-profile-secondary),.1);
  animation:monsterProfileOrbit 24s linear infinite;
}
.monster-profile-art{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  filter:drop-shadow(0 13px 15px rgba(0,0,0,.58));
}
.monster-profile-art>.monster-imported-art,
.monster-profile-art>svg{width:100%;height:100%;max-width:100%;max-height:100%}
.monster-profile-kicker{
  color:rgb(var(--monster-profile-glint));
  font-size:9px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  margin-bottom:7px;
}
.monster-profile-title{
  margin:0;
  padding:0;
  font-family:var(--font-display);
  font-size:clamp(22px,3vw,34px);
  line-height:1.06;
  color:#F2F4F3;
  text-shadow:0 0 22px rgba(var(--monster-profile-primary),.24);
}
.monster-profile-subtitle{margin:8px 0 15px;color:var(--text-muted);font-size:11px;line-height:1.55}
.monster-profile-badges{display:flex;flex-wrap:wrap;gap:6px}
.monster-profile-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:25px;
  padding:4px 8px;
  border:1px solid rgba(var(--monster-profile-primary),.27);
  border-radius:999px;
  background:rgba(var(--monster-profile-primary),.075);
  color:#D7E6E5;
  font-size:9px;
  font-weight:800;
  letter-spacing:.035em;
}
.monster-profile-badge.boss{border-color:rgba(var(--monster-profile-secondary),.52);color:rgb(var(--monster-profile-secondary));background:rgba(var(--monster-profile-secondary),.095)}
.monster-profile-body{padding:20px 22px 26px}
.monster-profile-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);gap:14px;align-items:start}
.monster-profile-left-column{min-width:0}
.monster-profile-panel{
  border:1px solid rgba(var(--monster-profile-primary),.21);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(255,255,255,.026),rgba(var(--monster-profile-primary),.025));
  box-shadow:inset 0 1px rgba(255,255,255,.018);
  overflow:hidden;
}
.monster-profile-panel+.monster-profile-panel{margin-top:14px}
.monster-profile-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 13px;
  border-bottom:1px solid rgba(var(--monster-profile-primary),.16);
  background:rgba(var(--monster-profile-primary),.045);
}
.monster-profile-panel-head strong{font-family:var(--font-display);font-size:12px;letter-spacing:.055em;color:#E9F1F0}
.monster-profile-panel-head span{font-size:8px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:rgba(var(--monster-profile-glint),.78)}
.monster-profile-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:rgba(var(--monster-profile-primary),.13)}
.monster-profile-stat{
  min-height:69px;
  padding:10px;
  background:rgba(10,17,24,.94);
}
.monster-profile-stat strong{display:block;color:#F1F4F4;font-size:14px;line-height:1.2}
.monster-profile-stat span{display:block;margin-top:4px;color:var(--text-dim);font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.monster-profile-style-row{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:11px}
.monster-profile-style-card{padding:8px 9px;border:1px solid var(--border-light);border-radius:8px;background:rgba(0,0,0,.13)}
.monster-profile-style-card span{display:block;color:var(--text-dim);font-size:8px;text-transform:uppercase;letter-spacing:.07em}
.monster-profile-style-card strong{display:block;margin-top:3px;color:var(--text);font-size:11px}
.monster-profile-triangle{display:flex;flex-wrap:wrap;gap:7px;padding:0 11px 12px}
.monster-profile-triangle span{padding:5px 8px;border-radius:7px;font-size:9px;font-weight:800}
.monster-profile-triangle .weak{color:#8CDF9B;background:rgba(80,190,112,.1);border:1px solid rgba(80,190,112,.3)}
.monster-profile-triangle .strong{color:#F08A8A;background:rgba(210,79,79,.1);border:1px solid rgba(210,79,79,.3)}
.monster-profile-matchup{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;padding:11px}
.monster-profile-matchup div{padding:8px;border:1px solid rgba(var(--monster-profile-primary),.15);border-radius:8px;background:rgba(0,0,0,.14)}
.monster-profile-matchup strong{display:block;color:#E8F1F0;font-size:12px}
.monster-profile-matchup span{display:block;margin-top:3px;color:var(--text-dim);font-size:8px;text-transform:uppercase;letter-spacing:.07em}
.monster-profile-risk-low{color:#7ED792!important}.monster-profile-risk-moderate{color:#E1C568!important}.monster-profile-risk-high{color:#E69B65!important}.monster-profile-risk-severe{color:#F07474!important}
.monster-profile-ability{
  padding:13px;
  position:relative;
  background:radial-gradient(circle at 3% 12%,rgba(var(--ability-rgb),.16),transparent 46%),rgba(0,0,0,.12);
}
.monster-profile-ability-title{display:flex;align-items:center;gap:10px;margin-bottom:7px}
.monster-profile-ability-glyph{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;border:1px solid rgba(var(--ability-rgb),.48);background:rgba(var(--ability-rgb),.1);color:rgb(var(--ability-rgb));font-size:17px;box-shadow:0 0 15px rgba(var(--ability-rgb),.14)}
.monster-profile-ability-title strong{display:block;color:#EFF3F2;font-family:var(--font-display);font-size:12px}
.monster-profile-ability-title span{display:block;margin-top:2px;color:rgb(var(--ability-rgb));font-size:8px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.monster-profile-ability p{margin:0;color:var(--text-muted);font-size:10px;line-height:1.58}
.monster-profile-ability em{display:block;margin-top:7px;color:rgba(var(--ability-rgb),.88);font-size:9px;font-style:normal;font-weight:700}
.monster-profile-chronicle{padding:11px}
.monster-profile-chronicle-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}
.monster-profile-chronicle-stat{padding:9px;border:1px solid rgba(var(--monster-profile-secondary),.16);border-radius:8px;background:rgba(var(--monster-profile-secondary),.035)}
.monster-profile-chronicle-stat strong{display:block;color:#F0E7CE;font-size:13px}.monster-profile-chronicle-stat span{display:block;margin-top:3px;color:var(--text-dim);font-size:8px;text-transform:uppercase;letter-spacing:.07em}
.monster-profile-chronicle-note{margin:9px 1px 0;color:var(--text-dim);font-size:8.5px;line-height:1.5}
.monster-profile-rewards{min-width:0;margin-top:0;align-self:start}
.monster-profile-rewards-body{padding:12px 13px 14px}
.monster-profile-rewards .monster-drop-group-title:first-child{margin-top:0}
.monster-profile-empty{padding:15px;color:var(--text-dim);font-size:10px;text-align:center}

@keyframes monsterProfileOrbit{to{transform:rotate(360deg)}}
body.reduced-motion .monster-profile-art-stage::after,
body.battery-saver .monster-profile-art-stage::after{animation:none}
@media(prefers-reduced-motion:reduce){
  .monster-profile-art-stage::after{animation:none}
  .monster-profile-portrait-trigger{transition:none}
}
@media(max-width:680px){
  .monster-profile-overlay{padding:0;align-items:flex-end}
  .monster-profile-shell{width:100%;max-width:none!important;max-height:94dvh;border-radius:16px 16px 0 0!important;border-bottom:0!important}
  .monster-profile-hero{min-height:0;grid-template-columns:130px minmax(0,1fr);gap:12px;padding:22px 55px 18px 15px}
  .monster-profile-art-stage{width:130px}
  .monster-profile-title{font-size:21px}
  .monster-profile-subtitle{font-size:9.5px;margin:6px 0 10px}
  .monster-profile-body{padding:12px 11px 18px}
  .monster-profile-grid{display:flex;flex-direction:column;gap:10px}
  .monster-profile-left-column{display:contents}
  .monster-profile-grid .monster-profile-panel{margin-top:0}
  .monster-profile-combat-panel{order:1}
  .monster-profile-signature-panel{order:2}
  .monster-profile-rewards{order:3}
  .monster-profile-matchup-panel{order:4}
  .monster-profile-chronicle-panel{order:5}
  .monster-profile-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .monster-profile-stat{min-height:62px;padding:8px 6px}.monster-profile-stat strong{font-size:12px}.monster-profile-stat span{font-size:7px}
  .monster-profile-style-row{padding:9px;gap:5px}.monster-profile-style-card{padding:7px 6px}
}
@media(max-width:370px){
  .monster-profile-hero{grid-template-columns:105px minmax(0,1fr);padding-left:11px;gap:9px}
  .monster-profile-art-stage{width:105px}
  .monster-profile-title{font-size:18px}
  .monster-profile-kicker{font-size:7.5px}
  .monster-profile-badge{font-size:7.5px;padding:3px 6px;min-height:21px}
  .monster-profile-stat-grid{grid-template-columns:repeat(2,1fr)}
}
