/* ============================================================
   MST Player Review — Portal / Public CSS  v2.0
   Parent portal, public library, card creator shortcode views.
   ============================================================ */

/* ─── Portal root ─────────────────────────────────────────────────────────── */
.mst-portal {
  background: #0b0f1a;
  color: #f0f0f0;
  padding: 20px 24px 60px;
  min-height: 300px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  box-sizing: border-box;
}
.mst-portal *, .mst-portal *::before, .mst-portal *::after { box-sizing: border-box; }

/* ─── Multi-player nav ────────────────────────────────────────────────────── */
.mst-portal-players-nav {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mst-player-nav-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 40px; padding: 8px 16px 8px 8px;
  cursor: pointer; color: #ccc; font-size: 14px; font-weight: 600;
  transition: all .2s ease; position: relative;
}
.mst-player-nav-btn img,
.mst-nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.mst-nav-avatar {
  background: #1a7a3e; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.mst-player-nav-btn.active {
  border-color: #1a7a3e; background: rgba(26,122,62,.15); color: #fff;
}
.mst-player-nav-btn:hover { border-color: rgba(255,255,255,.3); }
.mst-unread-dot {
  position: absolute; top: 4px; right: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #f4c430; box-shadow: 0 0 6px rgba(244,196,48,.6);
}

/* ─── Loading state ───────────────────────────────────────────────────────── */
.mst-portal-loading {
  display: flex; align-items: center; gap: 14px;
  padding: 40px 0; color: rgba(255,255,255,.5); font-size: 14px;
}

/* ─── Tabs ────────────────────────────────────────────────────────────────── */
.mst-portal-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin-bottom: 22px;
  border-bottom: 2px solid rgba(255,255,255,.1);
  padding-bottom: 0;
}
.mst-ptab {
  padding: 10px 18px; background: none; border: none;
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.45); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.mst-ptab.active { color: #fff; border-bottom-color: #1a7a3e; }
.mst-ptab:hover  { color: rgba(255,255,255,.75); }

/* ─── Portal card layout ──────────────────────────────────────────────────── */
.mst-portal-main-grid {
  display: grid !important;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}
.mst-portal-sticky-left {
  position: sticky;
  top: 80px;
}
.mst-portal-tab-area {
  min-width: 0;
}
.mst-portal-toolbar {
  display: flex !important;
}
@media (max-width: 900px) {
  .mst-portal-main-grid { grid-template-columns: 1fr !important; }
  .mst-portal-sticky-left { position: static; }
}

/* ─── Attribute display ───────────────────────────────────────────────────── */
.mst-attr-panel { color: #f0f0f0; }

.mst-core-grid-display {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.mst-core-display-item { text-align: center; }
.mst-core-display-val  {
  font-size: 30px; font-weight: 900; line-height: 1;
  margin-bottom: 2px;
}
.mst-core-display-key  {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  margin-bottom: 6px;
}

.mst-pos-ovr-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.mst-pos-ovr-item { text-align: center; min-width: 48px; }
.mst-pos-ovr-val  { font-size: 22px; font-weight: 800; line-height: 1; }
.mst-pos-ovr-key  { font-size: 10px; font-weight: 700; text-transform: uppercase; color: rgba(255,255,255,.5); }

.mst-detail-groups {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.mst-group-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mst-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.7); }
.mst-group-ovr   { font-size: 20px; font-weight: 800; }

.mst-attr-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.mst-attr-label { font-size: 12px; color: rgba(255,255,255,.55); width: 100px; flex-shrink: 0; }
.mst-attr-val   { font-size: 13px; font-weight: 700; width: 28px; text-align: right; flex-shrink: 0; }

.mst-extras-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.mst-extras-grid label {
  font-size: 11px; color: rgba(255,255,255,.5); display: block; margin-bottom: 3px;
  text-transform: uppercase; letter-spacing: .4px;
}

/* ─── Trainer review text ─────────────────────────────────────────────────── */
.mst-review-text {
  font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.8);
  white-space: pre-wrap;
}

/* ─── Chip display (read-only) ────────────────────────────────────────────── */
.mst-chip-display { display: flex; flex-wrap: wrap; gap: 7px; }

/* ─── Sessions table ─────────────────────────────────────────────────────── */
.mst-sessions-table { width: 100%; color: #f0f0f0; }
.mst-sessions-table th, .mst-sessions-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 13px;
}
.mst-sessions-table th { color: rgba(255,255,255,.5); font-weight: 600; font-size: 11px; text-transform: uppercase; }

/* ─── Purchase grid ───────────────────────────────────────────────────────── */
.mst-purchase-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.mst-purchase-card {
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.mst-purchase-icon    { font-size: 32px; }
.mst-purchase-card h3 { font-size: 17px; font-weight: 700; color: #fff; margin: 0; }
.mst-purchase-card p  { font-size: 13px; color: rgba(255,255,255,.6); margin: 0; line-height: 1.5; }
.mst-purchase-price   { font-size: 28px; font-weight: 900; color: #1a7a3e; }
.mst-card-options     { display: flex; flex-direction: column; gap: 8px; }
.mst-card-options label {
  display: flex; align-items: center; gap: 9px; font-size: 13px;
  color: rgba(255,255,255,.7); cursor: pointer;
}
.mst-card-options label:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════
   PUBLIC LIBRARY
   ═══════════════════════════════════════════════════════ */
.mst-library { color: #f0f0f0; padding: 20px 0 60px; }

.mst-library-hero { text-align: center; padding: 30px 20px 24px; }
.mst-library-hero h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px; color: #fff; }
.mst-library-hero p  { color: rgba(255,255,255,.6); font-size: 15px; margin: 0; }

.mst-library-controls {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.mst-search-wrap {
  flex: 1; min-width: 200px; position: relative;
}
.mst-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: rgba(255,255,255,.4); pointer-events: none;
}
#mst-lib-search {
  width: 100%; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px; color: #fff; padding: 10px 14px 10px 38px;
  font-size: 14px; outline: none; transition: border-color .15s;
}
#mst-lib-search:focus  { border-color: #1a7a3e; }
#mst-lib-search::placeholder { color: rgba(255,255,255,.35); }

.mst-select {
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px; color: #fff; padding: 10px 30px 10px 14px;
  font-size: 13px; appearance: none; cursor: pointer; min-width: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23888' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

.mst-demo-notice {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(244,196,48,.08); border: 1px solid rgba(244,196,48,.2);
  border-radius: 10px; margin-bottom: 20px; font-size: 13px;
  color: rgba(255,255,255,.7);
}
.mst-demo-badge {
  background: #f4c430; color: #0d2b1a; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.mst-demo-notice a { color: #7bc2ff; }

.mst-library-grid {
  display: flex; flex-wrap: wrap; gap: 20px; min-height: 120px;
}
.mst-library-card-wrap { flex-shrink: 0; }
.mst-library-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; width: 100%;
}

/* CTA section */
.mst-library-cta-section {
  margin-top: 60px; padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mst-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 700px; margin: 0 auto; }
.mst-cta-card {
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 28px; position: relative; overflow: hidden;
}
.mst-cta-card h3     { font-size: 19px; font-weight: 800; color: #fff; margin: 20px 0 10px; }
.mst-cta-price       { font-size: 34px; font-weight: 900; color: #1a7a3e; margin-bottom: 14px; }
.mst-cta-features    { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 7px; }
.mst-cta-features li { font-size: 13px; color: rgba(255,255,255,.65); padding-left: 18px; position: relative; }
.mst-cta-features li::before { content: '✓'; position: absolute; left: 0; color: #1a7a3e; font-weight: 700; }
.mst-cta-badge {
  display: inline-block; background: #1a7a3e; color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  padding: 3px 10px; border-radius: 6px; text-transform: uppercase;
}
.mst-cta-badge-gold { background: #f4c430; color: #0d2b1a; }
.mst-cta-comprehensive { border-color: rgba(244,196,48,.25); }

/* ═══════════════════════════════════════════════════════
   CARD CREATOR
   ═══════════════════════════════════════════════════════ */
.mst-creator { color: #f0f0f0; padding: 20px 0 60px; }

.mst-creator-header { text-align: center; padding: 20px 0 28px; }
.mst-creator-header h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.mst-creator-header p  { color: rgba(255,255,255,.55); font-size: 14px; margin: 0; }

.mst-creator-layout {
  display: flex; gap: 32px; align-items: flex-start;
  flex-wrap: wrap;
}

/* Preview column */
.mst-creator-preview {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  position: sticky; top: 80px;
  flex-shrink: 0;
}
.mst-creator-card-wrap { filter: drop-shadow(0 20px 48px rgba(0,0,0,.6)); }
.mst-creator-card-hint { font-size: 11px; color: rgba(255,255,255,.35); text-align: center; }

/* Form column */
.mst-creator-form { flex: 1; min-width: 300px; }

/* Step indicator */
.mst-creator-steps {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 2px solid rgba(255,255,255,.08);
}
.mst-cstep {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: rgba(255,255,255,.35); cursor: default;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.mst-cstep.active { color: #fff; border-bottom-color: #1a7a3e; }
.mst-cstep.done   { color: #1a7a3e; }
.mst-cstep span {
  width: 22px; height: 22px; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15);
}
.mst-cstep.active span { background: #1a7a3e; border-color: #1a7a3e; color: #fff; }
.mst-cstep.done span   { background: rgba(26,122,62,.3); border-color: #1a7a3e; }

/* Step panels */
.mst-cstep-panel   { display: none; }
.mst-cstep-panel.active { display: block; }

.mst-cstep-nav {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07);
}

/* Rating controls in creator */
.mst-creator-ratings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 10px;
}
.mst-creator-rating-item { display: flex; flex-direction: column; gap: 5px; }
.mst-creator-rating-item label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: rgba(255,255,255,.55); display: flex; justify-content: space-between;
}
.mst-rating-hint { font-weight: 400; opacity: .7; }
.mst-rating-control {
  display: flex; align-items: center; gap: 8px;
}
.mst-rating-dec, .mst-rating-inc {
  width: 28px; height: 28px; background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.12); border-radius: 6px;
  color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.mst-rating-dec:hover, .mst-rating-inc:hover { background: #1a7a3e; border-color: #1a7a3e; }
.mst-rating-input {
  width: 52px; text-align: center; background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12); border-radius: 7px;
  color: #fff; padding: 5px 6px; font-size: 16px; font-weight: 700;
  outline: none;
}
.mst-rating-input:focus { border-color: #1a7a3e; }
.mst-rating-bar {
  height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden;
}
.mst-rating-bar-fill {
  height: 100%; background: linear-gradient(90deg, #1a7a3e, #7bc2ff);
  transition: width .2s;
}

/* Product option selector */
.mst-product-options { display: flex; flex-direction: column; gap: 10px; }
.mst-product-option  {
  border: 2px solid rgba(255,255,255,.1); border-radius: 10px; padding: 0;
  cursor: pointer; transition: border-color .15s; overflow: hidden;
}
.mst-product-option input[type="radio"] { display: none; }
.mst-product-option.active { border-color: #1a7a3e; background: rgba(26,122,62,.1); }
.mst-product-option:hover  { border-color: rgba(255,255,255,.25); }
.mst-product-option-inner {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
}
.mst-product-icon  { font-size: 22px; flex-shrink: 0; }
.mst-product-option-inner > div { flex: 1; }
.mst-product-option-inner strong { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.mst-product-desc  { font-size: 12px; color: rgba(255,255,255,.5); }
.mst-product-price { font-size: 17px; font-weight: 800; color: #1a7a3e; flex-shrink: 0; }

/* ── Portal empty state ────────────────────────────────────────────────────── */
.mst-portal-empty {
  text-align: center; padding: 60px 20px; color: rgba(255,255,255,.7);
}
.mst-portal-empty-icon { font-size: 52px; margin-bottom: 16px; }
.mst-portal-empty h2   { font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.mst-portal-empty p    { font-size: 15px; max-width: 420px; margin: 0 auto 24px; line-height: 1.6; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .mst-portal-card-layout { flex-direction: column; }
  .mst-purchase-grid      { grid-template-columns: 1fr; }
  .mst-cta-grid           { grid-template-columns: 1fr; }
  .mst-detail-groups      { grid-template-columns: 1fr; }
  .mst-creator-layout     { flex-direction: column; align-items: center; }
  .mst-creator-preview    { position: static; }
  .mst-creator-ratings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .mst-creator-ratings-grid { grid-template-columns: 1fr; }
  .mst-portal-tabs { gap: 0; }
  .mst-ptab        { padding: 10px 10px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Portal, Library, Creator
   Breakpoint 1: ≤ 860px  (tablet/landscape phone)
   Breakpoint 2: ≤ 520px  (phone portrait)
═══════════════════════════════════════════════════════ */

@media (max-width: 860px) {

  /* ── Portal ─────────────────────────────────────────── */
  .mst-portal-card-layout {
    flex-direction: column;
    gap: 20px;
  }

  .mst-portal-side {
    width: 100%;
  }

  #mst-portal-card-frame {
    display: flex;
    justify-content: center;
  }

  .mst-portal-tabs,
  .mst-portal-players-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .mst-portal-tabs::-webkit-scrollbar,
  .mst-portal-players-nav::-webkit-scrollbar { display: none; }

  .mst-ptab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Attributes grid ───────────────────────────────── */
  .mst-core-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mst-detail-group {
    break-inside: avoid;
  }

  /* ── Purchase grid ─────────────────────────────────── */
  .mst-purchase-grid {
    grid-template-columns: 1fr;
  }

  /* ── Library ───────────────────────────────────────── */
  .mst-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .mst-cta-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ── Card Creator ──────────────────────────────────── */
  .mst-creator-layout {
    flex-direction: column;
  }

  .mst-creator-preview {
    position: static;
    padding: 20px;
    display: flex;
    justify-content: center;
  }

  .mst-creator-form {
    padding: 16px;
  }

  .mst-creator-steps {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .mst-creator-steps::-webkit-scrollbar { display: none; }

  .mst-cstep {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mst-creator-ratings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {

  /* ── Portal ─────────────────────────────────────────── */
  .mst-portal {
    padding: 12px;
  }

  .mst-player-card {
    transform: scale(0.92);
    transform-origin: top center;
  }

  .mst-ptab {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* ── Attributes ────────────────────────────────────── */
  .mst-core-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mst-attr-bar-row {
    gap: 8px;
  }

  /* ── Library cards ─────────────────────────────────── */
  .mst-library-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .mst-library-controls {
    flex-direction: column;
  }

  .mst-library-controls .mst-select {
    width: 100%;
  }

  /* ── Creator ───────────────────────────────────────── */
  .mst-creator-ratings-grid {
    grid-template-columns: 1fr;
  }

  .mst-field-row {
    flex-direction: column;
  }

  .mst-product-option-inner {
    flex-wrap: wrap;
  }

  /* ── Purchase ──────────────────────────────────────── */
  .mst-card-options label {
    font-size: 13px;
  }

  /* ── CTA section ───────────────────────────────────── */
  .mst-library-cta-section {
    padding: 30px 16px;
  }

  .mst-cta-card {
    padding: 24px 20px;
  }
}

/* ── Snapshot / Growth Log cards ─────────────────────────────────────────── */
.mst-snap-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.mst-snap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mst-snap-date {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  font-weight: 600;
}
.mst-snap-ovr-badge {
  background: var(--mst-green, #1a7a3e);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}
.mst-snap-note {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
  margin-bottom: 8px;
}
.mst-snap-core {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mst-snap-pill {
  background: rgba(255,255,255,.08);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 11px;
  color: rgba(255,255,255,.6);
}
.mst-snap-pill strong {
  color: #fff;
  margin-left: 3px;
}

/* ── Trait/Chem/Playstyle chips ──────────────────────────────────────────── */
.mst-chip-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}
.mst-chip-tag {
  background: rgba(26,122,62,.25);
  border: 1px solid rgba(26,122,62,.4);
  color: #4ade80;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Stars display ───────────────────────────────────────────────────────── */
.mst-stars {
  font-size: 16px;
  color: var(--mst-gold, #f4c430);
  letter-spacing: 1px;
}

/* ── Detailed attribute group ────────────────────────────────────────────── */
.mst-detail-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.mst-detail-group-display {
  background: rgba(255,255,255,.03);
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.06);
}

/* ── Error box ───────────────────────────────────────────────────────────── */
.mst-error-box {
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.4);
  color: #f87171;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  text-align: center;
}

/* ── Download page (mst_card_download shortcode) ─────────────────────────── */
.mst-download-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}
.mst-download-card-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}
.mst-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.mst-download-info {
  margin-top: 20px;
  font-size: 13px;
  color: var(--mst-muted, #777);
  line-height: 1.6;
}
.mst-expired-page {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
}
.mst-expired-icon { font-size: 48px; margin-bottom: 16px; }
.mst-expired-page h2 { font-size: 22px; margin-bottom: 10px; }
.mst-expired-page p  { color: var(--mst-muted, #777); line-height: 1.6; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.mst-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 10px;
  flex-wrap: wrap;
}
.mst-page-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.mst-page-btn:hover,
.mst-page-btn.active {
  background: var(--mst-green, #1a7a3e);
  border-color: var(--mst-green, #1a7a3e);
  color: #fff;
}
.mst-page-btn:disabled {
  opacity: .35;
  cursor: default;
}

/* ═══════════════════════════════════════════════════════
   BRICKS BUILDER OVERRIDES FOR PORTAL
   ═══════════════════════════════════════════════════════ */
.brxe-shortcode .mst-portal,
.brxe-code .mst-portal {
  background: #0b0f1a !important;
  color: #f0f0f0 !important;
}
.mst-portal .mst-panel {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  color: #f0f0f0 !important;
}
.mst-portal .mst-panel h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 0 14px !important;
}
.mst-portal .mst-ptab {
  font-size: 14px !important;
  padding: 12px 20px !important;
}
/* Portal empty state */
.mst-portal-empty {
  text-align: center;
  padding: 60px 20px;
}
.mst-portal-empty-icon { font-size: 48px; margin-bottom: 12px; }
.mst-portal-empty h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.mst-portal-empty p { color: rgba(255,255,255,0.5); font-size: 15px; margin: 0 0 20px; }

/* Fix portal card layout */
.mst-portal-card-layout {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 28px !important;
  align-items: start !important;
}
#mst-portal-card-frame {
  display: flex !important;
  justify-content: center !important;
}

/* Portal responsive */
@media (max-width: 768px) {
  .mst-portal-card-layout { grid-template-columns: 1fr !important; }
  .mst-portal { padding: 16px 12px 60px !important; }
  .mst-purchase-grid { grid-template-columns: 1fr !important; }
  .mst-detail-groups { grid-template-columns: 1fr !important; }
}
