/* Automatoon: place Treasure Chest first and organize Direct Referrals content below. */
.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered {
  display: grid;
  gap: 0;
  text-align: center;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-doc-button-wrap {
  position: relative;
  order: 1;
  box-sizing: border-box;
  width: min(100%, 900px);
  margin: 0 auto 30px;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -24%, rgba(245, 158, 11, 0.16), transparent 46%),
    linear-gradient(145deg, #0d0905 0%, #040404 60%, #020202 100%);
  box-shadow:
    0 25px 54px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(245, 158, 11, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-doc-button-wrap::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d97706 18%, #fcd34d 50%, #f97316 82%, transparent);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.46);
  pointer-events: none;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-doc-button-wrap
  .automatoon-treasure-video-card {
  position: relative;
  z-index: 1;
  width: min(100%, 800px);
  border-color: rgba(252, 211, 77, 0.38);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(245, 158, 11, 0.08);
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-section-title {
  position: relative;
  order: 2;
  box-sizing: border-box;
  width: min(100%, 900px);
  margin: 0 auto !important;
  padding: 2rem 1.5rem 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background:
    radial-gradient(circle at 50% -30%, rgba(245, 158, 11, 0.17), transparent 52%),
    linear-gradient(145deg, #0d0905 0%, #050403 62%, #030303 100%);
  color: #fbbf24;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.25;
  text-shadow:
    0 3px 15px rgba(0, 0, 0, 0.62),
    0 0 18px rgba(245, 158, 11, 0.18);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(245, 158, 11, 0.055);
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-section-title::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d97706 18%, #fcd34d 50%, #f97316 82%, transparent);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.42);
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table:not(.mt-3) {
  order: 3;
  box-sizing: border-box;
  width: min(100%, 900px);
  max-width: 900px;
  margin: 0 auto;
  padding: 0.9rem 1.6rem 1.35rem;
  border-right: 1px solid rgba(245, 158, 11, 0.36);
  border-left: 1px solid rgba(245, 158, 11, 0.36);
  background: #050403;
  color: #e5e7eb;
  line-height: 1.75;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table:not(.mt-3)
  p:first-child {
  color: #ffffff;
  font-weight: 700;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table.mt-3 {
  order: 4;
  box-sizing: border-box;
  width: min(100%, 900px);
  max-width: 900px;
  margin: 0 auto !important;
  padding: 0.2rem 1.6rem 1.7rem;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-top: 0;
  border-radius: 0 0 23px 23px;
  background:
    radial-gradient(circle at 50% 125%, rgba(249, 115, 22, 0.1), transparent 48%),
    linear-gradient(145deg, #050403, #020202);
  color: #e5e7eb;
  box-shadow:
    0 25px 54px rgba(0, 0, 0, 0.4),
    0 0 26px rgba(245, 158, 11, 0.055);
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table.mt-3
  > p {
  margin: 0 0 0.8rem !important;
  color: #fbbf24;
  font-size: 0.93rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table.mt-3
  > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table.mt-3
  > ul
  > li {
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.055), transparent 62%),
    rgba(255, 255, 255, 0.025);
  color: #e5e7eb;
  font-size: 0.86rem;
  line-height: 1.55;
}

.automatoon-story-card-table
  .automatoon-table-header
  > .automatoon-section-copy-centered
  > .automatoon-copy-table.mt-3
  > ul
  > li
  > strong {
  color: #fbbf24;
}

@media (max-width: 680px) {
  .automatoon-story-card-table
    .automatoon-table-header
    > .automatoon-section-copy-centered
    > .automatoon-doc-button-wrap {
    margin-bottom: 22px;
    padding: 0.6rem;
    border-radius: 17px;
  }

  .automatoon-story-card-table
    .automatoon-table-header
    > .automatoon-section-copy-centered
    > .automatoon-section-title {
    padding: 1.7rem 1rem 0.65rem;
    border-radius: 18px 18px 0 0;
    font-size: 1.55rem;
  }

  .automatoon-story-card-table
    .automatoon-table-header
    > .automatoon-section-copy-centered
    > .automatoon-copy-table:not(.mt-3) {
    padding: 0.75rem 1rem 1.2rem;
    font-size: 0.88rem;
    line-height: 1.68;
  }

  .automatoon-story-card-table
    .automatoon-table-header
    > .automatoon-section-copy-centered
    > .automatoon-copy-table.mt-3 {
    padding: 0.15rem 1rem 1.3rem;
    border-radius: 0 0 18px 18px;
  }

  .automatoon-story-card-table
    .automatoon-table-header
    > .automatoon-section-copy-centered
    > .automatoon-copy-table.mt-3
    > ul {
    grid-template-columns: 1fr;
  }
}
