/* The primary mission card: a themed re-drawing of the Event Companion's own
   card (see js/mission-cards.js for the transcribed text), opened from the
   eyeball button next to a Force Disposition's mission name. Grey panel,
   amber body text — the app's own palette (css/app.css) — with the one
   exception the source card keeps: the header carries the mission's own
   disposition colour, title in white. */

.mc-eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  cursor: pointer;
  flex: 0 0 auto;
}
.mc-eye-btn:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber);
}
.mc-eye-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
.mc-eye-btn svg { width: 12px; height: 12px; }

.mc-mission-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.mc-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 10, 0.74);
}
.mc-overlay[hidden] { display: none; }

.mc-wrap {
  width: 100%;
  max-width: 460px;
  max-height: 100%;
  perspective: 2200px;
}

.mc-card {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  transition: transform 180ms ease;
}
.mc-card.is-turning { transform: rotateY(90deg); }

.mc-head {
  position: relative;
  flex: 0 0 auto;
  padding: 14px 44px 13px 16px;
  color: #fff;
}
.mc-head-eyebrow {
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  opacity: 0.82;
}
.mc-head-title {
  margin-top: 2px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.15;
}
.mc-head-badge {
  position: absolute;
  top: 12px;
  right: 40px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  color: #fff;
}
.mc-head-badge svg { width: 15px; height: 15px; }

.mc-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.mc-close:hover { background: rgba(0, 0, 0, 0.45); }

.mc-body {
  overflow-y: auto;
  padding: 14px 16px 16px;
  background: var(--panel);
  color: var(--amber);
}

.mc-side-note {
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--panel-raised);
  border-radius: var(--r);
  color: var(--text-faint);
  font-size: 11px;
  font-style: italic;
}

.mc-intro {
  margin: 0 0 12px;
  padding: 9px 11px;
  background: var(--panel-raised);
  border-left: 3px solid var(--amber-dim);
  border-radius: 0 2px 2px 0;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.55;
}

.mc-section {
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.mc-section:last-child { margin-bottom: 0; }

.mc-section-head {
  padding: 6px 10px;
  background: #12161a;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.mc-section-when {
  padding: 8px 10px 0;
  font-size: 11px;
  color: var(--text-faint);
}
.mc-section-when b {
  font-weight: 600;
  color: var(--text-dim);
}

.mc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}
.mc-row-text {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.5;
}
.mc-row-vp {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 4px 2px 3px;
  text-align: center;
  border: 1px solid var(--amber-dim);
  border-radius: 3px;
}
.mc-row-vp b {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}
/* A row scorable for more than one VP amount (a "for each ... up to max N"
   secondary, or a "for each" primary row's own score button next to its
   count stepper — see battle.js's bRows) replaces the single .mc-row-vp
   button with one of these wrappers in its place. */
.mc-row-vp-group {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.mc-row-vp-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mc-row-vp small {
  display: block;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--text-faint);
}

.mc-join {
  padding: 1px 0 3px;
  text-align: center;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.mc-row-divider {
  margin: 0 10px;
  border-top: 1px dashed var(--line);
}

.mc-action-block {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.mc-body mark {
  background: none;
  color: #fff;
  font-weight: 700;
}
.mc-body strong {
  color: #fff;
  font-weight: 700;
}

.mc-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--amber-dim);
  color: #17120b;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mc-action-tag {
  padding: 2px 6px;
  background: #17120b;
  border-radius: 2px;
  color: #fff;
  font-size: 8.5px;
  letter-spacing: 0.06em;
}
.mc-action-row {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
}
.mc-action-label {
  flex: 0 0 84px;
  padding-top: 1px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.mc-action-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
}

.mc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 9px 14px;
  background: var(--panel-raised);
  border-top: 1px solid var(--line);
}
.mc-opponent {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 10.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-opponent b { color: var(--text-dim); font-weight: 400; }
.mc-opponent-badge {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #fff;
}
.mc-opponent-badge svg { width: 9px; height: 9px; }

@media (max-width: 1000px) {
  .mc-overlay { padding: 12px; }
  .mc-head-title { font-size: 18px; }
}
