/* ── Play detail modal — shared across all trade pages ── */
.pdm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(20, 36, 20, 0.62);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
}
.pdm-overlay.open { display: flex; }
.pdm-card {
  background: #FFFFFF;
  border-radius: 18px;
  width: 100%; max-width: 760px;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.32);
  animation: pdmIn 0.28s cubic-bezier(.2,.7,.2,1);
  overflow: hidden;
}
@keyframes pdmIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pdm-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  background: #1A3A1A; color: #FFFFFF;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  transition: transform 0.15s, background 0.15s;
}
.pdm-close:hover { background: #2C5F2E; transform: scale(1.08); }

/* Header band — tinted cream with id + status pills */
.pdm-head {
  background: #F8F6F2;
  padding: 24px 32px 18px;
  border-bottom: 1px solid rgba(28,50,32,0.08);
}
.pdm-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: 'Inter', Arial, sans-serif;
}
.pdm-id {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; font-weight: 700;
  color: rgba(28,50,32,0.55);
  letter-spacing: 0.05em;
}
.pdm-status {
  display: inline-block;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px; border-radius: 5px;
  line-height: 1;
}
.pdm-status.live { background: rgba(44,95,46,0.14); color: #2C5F2E; border: 1px solid rgba(44,95,46,0.30); }
.pdm-status.universal { background: rgba(219,99,35,0.12); color: #C85A20; border: 1px solid rgba(219,99,35,0.30); }
.pdm-status.beta { background: rgba(28,50,32,0.08); color: rgba(28,50,32,0.65); border: 1px solid rgba(28,50,32,0.18); }
.pdm-duration {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; color: rgba(28,50,32,0.55);
  margin-left: auto;
}
.pdm-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700; line-height: 1.18;
  color: #1A3A1A; letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.pdm-title em { font-style: normal; color: #C85A20; font-weight: 700; }
.pdm-tagline {
  font-family: Georgia, serif;
  font-style: italic; font-size: 15px;
  color: rgba(28,28,28,0.62);
  margin: 0;
}

/* Recommended-by strip */
.pdm-rec {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  background: linear-gradient(135deg, rgba(219,99,35,0.06) 0%, rgba(44,95,46,0.04) 100%);
  border-bottom: 1px solid rgba(28,50,32,0.06);
}
.pdm-rec-avatar {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(219,99,35,0.20), rgba(44,95,46,0.12));
  border: 1px solid rgba(28,50,32,0.10);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  color: #2C5F2E;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 900; font-size: 16px;
}
.pdm-rec-avatar video { width: 100%; height: 100%; object-fit: cover; }
.pdm-rec-text { line-height: 1.35; }
.pdm-rec-label {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(28,50,32,0.55);
  margin-bottom: 3px;
}
.pdm-rec-name {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14.5px; font-weight: 800; color: #2C5F2E;
}
.pdm-rec-tone {
  font-size: 12.5px; color: rgba(28,50,32,0.55);
  margin-top: 2px;
}

/* Body content */
.pdm-body { padding: 28px 32px 24px; }
.pdm-section { margin-bottom: 24px; }
.pdm-section:last-child { margin-bottom: 0; }
.pdm-section-label {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(28,28,28,0.50);
  margin-bottom: 10px;
}
.pdm-section-body {
  font-size: 14.5px; color: #1C1C1C; line-height: 1.65;
}
.pdm-section-body p { margin: 0; }
.pdm-list { margin: 0; padding: 0; list-style: none; counter-reset: pdm; }
.pdm-list li {
  font-size: 14px; color: #1C1C1C; line-height: 1.6;
  padding: 7px 0 7px 28px; position: relative;
  counter-increment: pdm;
}
.pdm-list.numbered li::before {
  content: counter(pdm) ".";
  position: absolute; left: 0; top: 7px;
  color: #C85A20; font-weight: 800;
  font-family: 'Inter', Arial, sans-serif; font-size: 13px;
}
.pdm-list.bullet li::before {
  content: '•'; position: absolute; left: 8px; top: 5px;
  color: #C85A20; font-weight: 900; font-size: 14px;
}

/* Play signature code block */
.pdm-sig {
  background: #1A3A1A; color: #F4EFE6;
  border-radius: 10px;
  padding: 16px 18px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; line-height: 1.7;
  overflow-x: auto;
}
.pdm-sig-row { display: grid; grid-template-columns: 24px 1fr 18px; gap: 12px; align-items: baseline; }
.pdm-sig-num { color: rgba(244,239,230,0.40); font-size: 11px; }
.pdm-sig-line { color: rgba(244,239,230,0.92); }
.pdm-sig-line .arg { color: #E89A3D; }
.pdm-sig-line .fn { color: #FFFFFF; }
.pdm-sig-arrow { color: #E89A3D; }

/* Tools used chips */
.pdm-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.pdm-tool-chip {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11px; font-weight: 700; color: #2C5F2E;
  background: rgba(44,95,46,0.07);
  border: 1px solid rgba(44,95,46,0.20);
  border-radius: 6px; padding: 5px 9px;
  line-height: 1.1;
}

/* Footer / CTAs */
.pdm-foot {
  display: flex; gap: 10px; align-items: center;
  padding: 18px 32px;
  background: #F8F6F2;
  border-top: 1px solid rgba(28,50,32,0.08);
}
.pdm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 800; font-size: 14px;
  padding: 12px 22px; border-radius: 10px;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.pdm-btn.primary { background: #C85A20; color: #FFFFFF; box-shadow: 0 6px 16px rgba(200,90,32,0.28); flex: 1; justify-content: center; }
.pdm-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(200,90,32,0.36); background: #B84A1A; }
.pdm-btn.secondary { background: #FFFFFF; color: #1A3A1A; border: 1px solid rgba(28,50,32,0.18); }
.pdm-btn.secondary:hover { border-color: #C85A20; color: #C85A20; }
.pdm-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .pdm-overlay { padding: 16px 12px; }
  .pdm-head, .pdm-rec, .pdm-body, .pdm-foot { padding-left: 22px; padding-right: 22px; }
  .pdm-foot { flex-direction: column-reverse; gap: 8px; }
  .pdm-btn.primary { width: 100%; }
  .pdm-btn.secondary { width: 100%; justify-content: center; }
}

/* ── Trade-page play cards: workspace-card visual upgrade ──
   Wired cards (with data-play-id) get a markedly different look than
   their unwired siblings: white surface, pronounced borders, clear
   "OPEN DETAILS" CTA, hover lift, plus a JS-injected agent footer. */
.play-card[data-play-id] {
  cursor: pointer;
  background: #FFFFFF !important;
  border: 1px solid rgba(28,50,32,0.10) !important;
  border-radius: 14px !important;
  padding: 0 !important;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  display: flex !important; flex-direction: column !important;
  box-shadow: 0 6px 18px rgba(28,50,32,0.06);
}
.play-card[data-play-id]:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(28,50,32,0.14);
  border-color: rgba(200,90,32,0.40) !important;
}
/* Header strip — green LIVE indicator + serial centered */
.play-card[data-play-id]::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #2C5F2E 0%, #67D27A 60%, #2C5F2E 100%);
  background-size: 200% 100%;
  animation: pc-ws-stripe 5s linear infinite;
}
@keyframes pc-ws-stripe {
  0%   { background-position:   0% 50%; }
  100% { background-position: 200% 50%; }
}
.play-card[data-play-id] > * {
  padding-left: 22px; padding-right: 22px;
}
.play-card[data-play-id] .play-id {
  font-family: 'IBM Plex Mono', ui-monospace, monospace !important;
  font-size: 11px !important; font-weight: 700 !important;
  letter-spacing: 0.14em !important; text-transform: uppercase;
  color: rgba(28,50,32,0.55) !important;
  padding-top: 18px !important;
  margin-bottom: 4px !important;
  display: flex !important; align-items: center; gap: 8px;
}
.play-card[data-play-id] .play-id::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #2C5F2E;
  box-shadow: 0 0 0 3px rgba(44,95,46,0.20);
  animation: pc-ws-dot 2.2s ease-in-out infinite;
}
@keyframes pc-ws-dot {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.25); }
}
.play-card[data-play-id] .play-id::after {
  content: 'LIVE';
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em;
  background: rgba(44,95,46,0.10);
  color: #2C5F2E;
  border: 1px solid rgba(44,95,46,0.24);
  padding: 3px 7px; border-radius: 4px; line-height: 1;
  margin-left: 2px;
}
.play-card[data-play-id] .play-name {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 20px !important; font-weight: 700 !important;
  color: #1A3A1A !important;
  line-height: 1.22 !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.01em;
}
.play-card[data-play-id] .play-desc {
  font-size: 13.5px !important;
  color: rgba(28,28,28,0.68) !important;
  line-height: 1.55 !important;
  margin-bottom: 16px !important;
}
.play-card[data-play-id] .play-meta {
  margin-bottom: 16px !important;
}
.play-card[data-play-id] .play-meta-cell {
  font-size: 11.5px !important;
  color: rgba(28,28,28,0.60) !important;
}
.play-card[data-play-id] .play-meta-cell strong {
  display: block !important;
  font-size: 9.5px !important; font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: rgba(28,50,32,0.50) !important;
  margin-bottom: 2px !important;
}
/* JS-injected agent recommendation footer */
.play-card-rec {
  margin-top: auto;
  padding: 14px 22px 16px !important;
  border-top: 1px dashed rgba(28,50,32,0.14);
  display: flex; align-items: center; gap: 10px;
  background: rgba(244,239,230,0.45);
}
.play-card-rec-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(219,99,35,0.18), rgba(44,95,46,0.10));
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(28,50,32,0.16);
}
.play-card-rec-avatar video,
.play-card-rec-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.play-card-rec-text {
  font-size: 11.5px; color: rgba(28,28,28,0.62);
  line-height: 1.35;
}
.play-card-rec-text strong {
  display: block; font-weight: 800; color: #2C5F2E;
  font-size: 12px;
  font-family: 'Inter', Arial, sans-serif;
  letter-spacing: -0.005em;
}
/* Workspace-style action row — two buttons, matches the in-product card */
.play-card-cta {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px 18px !important;
  background: #FFFFFF;
  border-top: 1px solid rgba(28,50,32,0.06);
  pointer-events: none; /* parent card is the click target */
}
.play-card-cta-primary,
.play-card-cta-secondary {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12.5px; font-weight: 800;
  letter-spacing: -0.005em;
  padding: 9px 16px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 7px;
  line-height: 1;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.play-card-cta-primary {
  background: #2C5F2E; color: #FFFFFF;
  border: 1px solid #2C5F2E;
  flex: 1; justify-content: center;
}
.play-card[data-play-id]:hover .play-card-cta-primary {
  background: #1A3A1A; border-color: #1A3A1A;
}
.play-card-cta-secondary {
  background: #FFFFFF; color: #1A3A1A;
  border: 1px solid rgba(28,50,32,0.18);
}
.play-card[data-play-id]:hover .play-card-cta-secondary {
  border-color: #2C5F2E; color: #2C5F2E;
}
.play-card-cta-arrow {
  display: inline-block; font-size: 14px; line-height: 1;
  transition: transform 0.18s;
}
.play-card[data-play-id]:hover .play-card-cta-arrow {
  transform: translateX(3px);
}
/* Drop the legacy "+" corner indicator — the action row is the affordance now */
.play-card[data-play-id]::after { content: none; }
/* Space between emoji and title text (workspace pattern) */
.play-name-emoji { margin-right: 6px; }

/* ── Tier badge above the plays section ── */
.tier-badge-row {
  display: flex; justify-content: center; margin-bottom: 18px;
}
.tier-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
  line-height: 1;
}
.tier-badge.tier-1 { background: rgba(44,95,46,0.10); color: #2C5F2E; border: 1px solid rgba(44,95,46,0.28); }
.tier-badge.tier-2 { background: rgba(44,95,46,0.10); color: #2C5F2E; border: 1px solid rgba(44,95,46,0.28); }
.tier-badge.tier-3 { background: rgba(200,90,32,0.10); color: #C85A20; border: 1px solid rgba(200,90,32,0.30); }
.tier-badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: tier-pulse 1.8s ease-in-out infinite;
}
@keyframes tier-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}
