.raid-map {
  padding: 0;
  border-radius: 18px;
  border: 2px solid #2e313d;
  overflow: hidden;
  background: #0f1014;
}

.raid-stage {
  position: relative;
  min-height: calc(100svh - 102px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: #26333f;
  isolation: isolate;
  overflow: hidden;
}

.raid-hero-art {
  position: absolute;
  left: clamp(16px, 8vw, 140px);
  bottom: 0;
  height: min(82%, 620px);
  width: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .75));
  z-index: 0;
}

/* TOP-LEFT COMPACT HUD */
.raid-hud-tl {
  position: relative;
  z-index: 2;
  max-width: 390px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 16, 22, .84);
  border: 2px solid #303442;
  backdrop-filter: blur(10px);
}
.raid-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.raid-region-tag { font-weight: 900; font-size: 1rem; color: #fff; letter-spacing: .03em; }
.raid-danger-tag { padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 900; background: var(--m6-lime); color: #111216; }
.raid-danger-tag.d-1 { background: #ffd84d; }
.raid-danger-tag.d-2 { background: var(--m6-orange); color: #fff; }
.raid-loot-hint { font-size: .76rem; font-weight: 800; color: var(--m6-lime); line-height: 1.35; }
.raid-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.raid-meter-card { display: grid; gap: 4px; }
.raid-meter-top { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 800; color: #b7bfce; }
.raid-meter-top strong { color: #fff; }
.raid-meter-card game-bar { width: 100%; height: 6px; }
.raid-chip-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.raid-chip-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: #222633; border: 1px solid #3c4254; font-size: .74rem; font-weight: 800; }
.raid-chip-pill .inventory-icon { width: 18px; height: 18px; }

/* TOP-RIGHT FLOATING MINIMAP */
.raid-minimap {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: min(380px, 38vw);
  padding: 10px;
  border-radius: 14px;
  background: rgba(14, 15, 21, .86);
  border: 2px solid #333847;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transition: width .2s ease;
}
.raid-minimap.expanded {
  inset: 24px;
  width: auto;
  max-width: 960px;
  max-height: 540px;
  margin: auto;
  z-index: 12;
  padding: 16px;
  border-color: var(--m6-lime);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .85);
}
.raid-minimap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .8rem; font-weight: 900; color: var(--m6-lime); }
.raid-mini-toggle { padding: 3px 10px; border-radius: 999px; background: #232734; border: 1px solid #44495a; color: #fff; font-size: .74rem; font-weight: 800; }
.raid-mini-toggle:hover { border-color: var(--m6-lime); color: var(--m6-lime); }

.raid-layers { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.raid-minimap.expanded .raid-layers { gap: 14px; }
.raid-layer { z-index: 1; display: grid; align-content: center; gap: 6px; }
.raid-layer > small { text-align: center; font-size: .64rem; font-weight: 800; color: #959eb0; }
.raid-layer button {
  min-height: 44px;
  padding: 5px 4px;
  border-radius: 9px;
  border: 2px solid #323644;
  background: #1a1d26;
  color: #e8ecf4;
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.raid-minimap.expanded .raid-layer button { min-height: 82px; padding: 10px 8px; font-size: .88rem; border-radius: 12px; }
.raid-layer button:not(:disabled) { border-color: var(--m6-lime); background: #202824; box-shadow: 0 0 12px rgba(200, 255, 0, .24); }
.raid-layer button[aria-current="step"] { border-color: var(--m6-orange); box-shadow: 0 0 12px rgba(255, 77, 0, .4); opacity: 1; }
.raid-layer button:disabled:not([aria-current="step"]) { opacity: .42; }
.raid-layer .visited { border-color: #4b5540; opacity: .75; }
.raid-layer button .inventory-icon { display: block; width: 18px; height: 18px; margin: 0 auto 2px; }
.raid-minimap.expanded .raid-layer button .inventory-icon { width: 32px; height: 32px; margin-bottom: 5px; }
.raid-layer button small { display: block; margin-top: 3px; font-size: .72rem; color: #b8c0cf; font-weight: 600; }
.raid-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; stroke: #353b4a; stroke-width: 2; }
.raid-wires .lit { stroke: var(--m6-lime); stroke-width: 2.5; }

/* CENTER TACTICAL EVENT CARD */
.raid-center-card {
  position: relative;
  z-index: 6;
  align-self: center;
  width: min(740px, 100%);
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(16, 17, 24, .94);
  border: 2px solid var(--m6-lime);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .75);
  display: grid;
  gap: 12px;
}

/* BOTTOM HUD ACTION BAR */
.raid-hud-bottom {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.raid-next-actions { display: grid; gap: 8px; flex: 1 1 420px; }
.raid-next-hint { font-size: .82rem; font-weight: 900; color: var(--m6-lime); text-shadow: 0 2px 6px #000; }
.raid-next-row { display: flex; flex-wrap: wrap; gap: 10px; }
.raid-go-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(20, 22, 30, .92);
  border: 2px solid var(--m6-lime);
  color: #fff;
  font-size: .96rem;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  transition: transform .12s ease, background .15s ease;
}
.raid-go-btn:hover { background: var(--m6-lime); color: #111216; transform: translateY(-2px); }
.raid-go-btn .inventory-icon { width: 28px; height: 28px; }
.raid-go-btn small { display: block; font-size: .74rem; font-weight: 700; opacity: .82; }

.raid-bag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(22, 24, 32, .94);
  border: 2px solid #ffd84d;
  color: #ffd84d;
  font-size: .9rem;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.raid-bag-toggle:hover { background: #ffd84d; color: #111216; }
.raid-bag-toggle .inventory-icon { width: 24px; height: 24px; }

/* FLOATING BAG & SAFE BOX OVERLAY */
.raid-bag-overlay {
  position: absolute;
  inset: 20px;
  max-width: 820px;
  max-height: 540px;
  margin: auto;
  z-index: 14;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(16, 17, 23, .96);
  border: 2px solid #ffd84d;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .88);
  display: grid;
  gap: 14px;
  overflow: auto;
}
.raid-bag-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; color: #ffd84d; }
.raid-bag-close { padding: 6px 14px; border-radius: 999px; background: var(--m6-orange); border: 0; color: #111216; font-weight: 900; }
.raid-bag-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; color: #aeb6c6; font-size: .82rem; }
.raid-bag-foot button { padding: 8px 16px; border-radius: 999px; background: var(--m6-lime); border: 2px solid #0b0c10; color: #111216; font-weight: 900; }

.raid-pack { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.raid-block { margin: 0; padding: 12px; border-radius: 14px; background: #1a1c24; border: 2px solid #2e3240; }
.raid-block h2 { margin: 0 0 10px; font-size: .94rem; font-weight: 900; color: #fff; }
.raid-pack .raid-block:nth-child(2) { border-color: #d9a838; background: linear-gradient(145deg, rgba(255, 216, 77, .1), #1a1c24 58%); }
.raid-pack .raid-block:nth-child(2) h2 { color: #ffd84d; }

.raid-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.raid-slots button {
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  border: 2px solid #3a3e4d;
  background: #22252f;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .74rem;
  font-weight: 800;
  text-align: center;
}
.raid-slots button[aria-pressed="true"] { border-color: var(--m6-lime); }
.raid-slots .shiny { border-color: #ffd84d; box-shadow: inset 0 0 14px rgba(255, 216, 77, .4); }
.raid-slots [data-tier="蓝"] { background: #1b3b5a; border-color: #3a7ab8; }
.raid-slots [data-tier="紫"] { background: #472859; border-color: #a355d4; }
.raid-slots [data-tier="大红"] { background: #6b222a; border-color: #ff4655; }
.raid-empty {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #20232d;
  border: 2px solid #2c303d;
  color: #3e4454;
  font-size: 1.5rem;
  font-weight: 900;
  user-select: none;
}
.raid-item-details { grid-column: 1 / -1; padding: 10px; border-radius: 10px; background: #111319; border: 2px solid var(--m6-lime); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.raid-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.raid-actions button { min-height: 44px; padding: 10px 16px; border-radius: 12px; font-weight: 800; }
.raid-ticket { flex: 1 1 180px; min-width: 0; padding: 14px; border-radius: 14px; border: 2px solid #3c404e; border-bottom: 4px dashed var(--m6-lime); background: #20232e; display: grid; justify-items: center; gap: 6px; text-align: center; font-weight: 800; }
.raid-ticket:hover { border-color: var(--m6-lime); transform: translateY(-3px); }
.raid-notice { margin: 0; color: var(--m6-lime); font-weight: 800; font-size: .92rem; }
.raid-bomb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.raid-bomb > div { display: grid; gap: 8px; }
.options button.raid-mine { box-shadow: inset 0 0 18px #ff46558c; border-color: var(--red); }
.raid-smoke strong { filter: blur(5px); animation: raid-smoke 1.1s ease-in-out infinite alternate; }
@keyframes raid-smoke { from { opacity: .45; } to { opacity: .85; } }

.relic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.relic { min-width: 0; display: grid; gap: 6px; padding: 14px; border-radius: 14px; border: 2px solid #3a3240; background: #191b22; }
.relic.owned { border-color: var(--m6-orange); background: linear-gradient(145deg, rgba(255, 77, 0, .14), #191b22 60%); }
.inventory-icon { object-fit: contain; width: 44px; height: 44px; vertical-align: middle; }
.relic .inventory-icon { width: min(100%, 120px); height: auto; margin-inline: auto; }
.raid-name-frame { outline: 2px solid #e7bf72; outline-offset: 2px; }
.gold-label { color: var(--gold); }
.enemy-rule { color: var(--m6-lime); font-weight: 800; }
.enemy-rule:empty { display: none; }

@media (min-width: 760px) { .relic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .raid-minimap { position: static; width: 100%; }
  .raid-hero-art { height: 46%; opacity: .55; left: 50%; transform: translateX(-50%); }
  .raid-pack { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .raid-smoke strong { animation: none; } }
