/* SSC Blog Play Section. Every rule is scoped to #ssc-play so it beats the theme's button and link styles. */

#ssc-play {
  background: #f4f1fc;
  border-bottom: 1px solid #e4dff5;
  color: #334155;
  font-family: Inter, "Nirmala UI", Mangal, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

#ssc-play,
#ssc-play * {
  box-sizing: border-box;
}

#ssc-play [hidden] {
  display: none !important;
}

#ssc-play a {
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

#ssc-play button {
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#ssc-play h2,
#ssc-play h3,
#ssc-play p {
  margin: 0;
  padding: 0;
}

#ssc-play svg {
  display: block;
}

#ssc-play :focus-visible {
  outline: 3px solid #926d23;
  outline-offset: 2px;
}

#ssc-play .ssp-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Scroll reveal: only hides once the script has confirmed it can show it again */
#ssc-play.ssp-ready [data-ssp-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

#ssc-play.ssp-ready [data-ssp-reveal].is-shown {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

/* Heading */
#ssc-play .ssp-head {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ssc-play .ssp-kicker {
  color: #7a5a1c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .72px;
  text-transform: uppercase;
}

#ssc-play h2 {
  color: #20213e;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.025em;
}

#ssc-play .ssp-sub {
  font-size: 17px;
}

/* Stage */
#ssc-play .ssp-stage {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  border-radius: 18px;
  background: #1d1948;
  box-shadow: 0 24px 50px rgba(29, 25, 72, .22);
}

#ssc-play .ssp-side {
  flex: 1 1 280px;
  min-width: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #e0e7ff;
}

#ssc-play .ssp-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#ssc-play .ssp-tab {
  width: 100%;
  min-height: 56px;
  padding: 9px 14px;
  border: 1px solid rgba(199, 210, 254, .35);
  border-radius: 10px;
  color: #fff;
  text-align: left;
  transition: background-color .2s ease;
}

#ssc-play .ssp-tab:hover {
  background: rgba(255, 255, 255, .08);
}

#ssc-play .ssp-tab[aria-pressed="true"] {
  border-color: #e4d6a9;
  background: #e4d6a9;
  color: #252043;
}

#ssc-play .ssp-tab-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

#ssc-play .ssp-tab-sub {
  display: block;
  font-size: 13px;
}

#ssc-play .ssp-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#ssc-play .ssp-info-body {
  color: #fff;
  font-size: 15px;
}

#ssc-play .ssp-info-more {
  font-size: 14px;
}

#ssc-play .ssp-info-cta {
  margin-top: auto;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  background: #e4d6a9;
  color: #252043;
  font-size: 15px;
  font-weight: 700;
  transition: transform .15s ease;
}

#ssc-play .ssp-info-cta:hover {
  transform: translateY(-2px);
}

#ssc-play .ssp-arrow {
  display: inline-block;
  transition: transform .18s ease;
}

#ssc-play .ssp-info-cta:hover .ssp-arrow,
#ssc-play .ssp-card:hover .ssp-arrow {
  transform: translateX(5px);
}

#ssc-play .ssp-area {
  flex: 999 1 560px;
  min-width: 0;
  min-height: 440px;
  position: relative;
  background: #fff;
}

#ssc-play .ssp-pane {
  animation: ssp-rise .4s cubic-bezier(.2, .8, .2, 1) both;
}

/* Gravity Drop */
#ssc-play .ssp-gravity {
  position: relative;
  height: 440px;
  overflow: hidden;
  background-color: #262058;
  background-image: radial-gradient(at 70% 10%, #3f2b7b 0, rgba(0, 0, 0, 0) 60%);
  color: #e0e7ff;
}

#ssc-play .ssp-screen {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

#ssc-play .ssp-screen h3 {
  color: #fff;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}

#ssc-play .ssp-go {
  min-height: 50px;
  padding: 0 28px;
  border-radius: 10px;
  background: #e4d6a9;
  color: #252043;
  font-size: 17px;
  font-weight: 800;
  transition: transform .15s ease;
}

#ssc-play .ssp-go:hover {
  transform: translateY(-2px);
}

#ssc-play .ssp-field {
  position: absolute;
  inset: 0;
}

#ssc-play .ssp-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

#ssc-play .ssp-word {
  position: absolute;
  top: 62px;
  width: 42%;
  min-height: 52px;
  padding: 6px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #fff;
  color: #20213e;
  font-size: 17px;
  font-weight: 700;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform;
}

#ssc-play .ssp-word-a {
  left: 6%;
}

#ssc-play .ssp-word-b {
  right: 6%;
}

#ssc-play .ssp-word.is-right {
  border-color: #0b6246;
  background: #e3f4ec;
  color: #0b6246;
}

#ssc-play .ssp-word.is-wrong {
  border-color: #8f1d1d;
  background: #fbe9e7;
  color: #8f1d1d;
}

#ssc-play .ssp-word.is-dim {
  border-color: #e2e8f0;
  background: #e2e8f0;
  color: #475569;
}

#ssc-play .ssp-field.is-paused .ssp-word,
#ssc-play .ssp-gravity[data-offscreen="true"] .ssp-word {
  animation-play-state: paused;
}

#ssc-play .ssp-flash-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#ssc-play .ssp-flash {
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(5, 3, 30, .35);
  color: #8f1d1d;
  font-size: 16px;
  font-weight: 800;
  animation: ssp-pop .35s cubic-bezier(.2, 1.35, .4, 1) both;
}

#ssc-play .ssp-flash.is-good {
  color: #0b6246;
}

#ssc-play .ssp-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #8f1d1d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

#ssc-play .ssp-over-label {
  color: #e4d6a9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

#ssc-play .ssp-over-score {
  color: #fff;
  font-size: 56px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.03em;
}

#ssc-play .ssp-missed {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

#ssc-play .ssp-missed span {
  padding: 4px 10px;
  border-radius: 7px;
  background: #fcf1d9;
  color: #7a4e00;
  font-size: 14px;
  font-weight: 700;
}

/* Mind map */
#ssc-play .ssp-mappane {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#ssc-play .ssp-map-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#ssc-play .ssp-mappane h3 {
  color: #20213e;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

#ssc-play .ssp-map-top p {
  font-size: 14px;
}

#ssc-play .ssp-map-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

#ssc-play .ssp-map-count {
  color: #0f766e;
  font-size: 14px;
  font-weight: 700;
}

#ssc-play .ssp-ghost {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d8d3ef;
  border-radius: 9px;
  background: #fff;
  color: #4d3ec2;
  font-size: 14px;
  font-weight: 700;
}

#ssc-play .ssp-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px minmax(0, 1fr);
  gap: 10px;
}

#ssc-play .ssp-lines {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: ssp-wipe .9s cubic-bezier(.2, .8, .2, 1) both;
}

#ssc-play .ssp-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#ssc-play .ssp-node {
  flex: 1 1 auto;
  min-height: 62px;
  padding: 6px 8px;
  border: 1.5px solid #0f766e;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  transition: background-color .2s ease;
}

#ssc-play .ssp-branch-right .ssp-node {
  border-color: #d97706;
}

#ssc-play .ssp-node[aria-pressed="true"] {
  background: #fffbf0;
}

#ssc-play .ssp-verb {
  display: block;
  color: #20213e;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

#ssc-play .ssp-hi {
  display: block;
  color: #0f766e;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  animation: ssp-pop .35s cubic-bezier(.2, 1.35, .4, 1) both;
}

#ssc-play .ssp-branch-right .ssp-hi {
  color: #b45309;
}

#ssc-play .ssp-tap {
  display: block;
  color: #64748b;
  font-size: 12px;
}

#ssc-play .ssp-hub-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ssc-play .ssp-hub {
  width: 104px;
  height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 7px rgba(15, 118, 110, .18);
  color: #fff;
  text-align: center;
}

#ssc-play .ssp-hub-word {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 800;
}

#ssc-play .ssp-hub-sub {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
}

/* Formula tool */
#ssc-play .ssp-formula {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

#ssc-play .ssp-shape-col {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#ssc-play .ssp-shapes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

#ssc-play .ssp-chip {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d8d3ef;
  border-radius: 9px;
  background: #fff;
  color: #20213e;
  font-size: 14px;
  font-weight: 700;
}

#ssc-play .ssp-chip[aria-pressed="true"] {
  border-color: #4d3ec2;
  background: #4d3ec2;
  color: #fff;
}

#ssc-play .ssp-drawing {
  width: 100%;
  max-width: 280px;
  height: auto;
}

#ssc-play .ssp-mark {
  fill: #7a5a1c;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
}

#ssc-play .ssp-controls {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#ssc-play .ssp-slider {
  display: block;
  margin: 0;
  color: #20213e;
  font-size: 15px;
  font-weight: 700;
}

#ssc-play input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #4d3ec2;
  cursor: pointer;
}

#ssc-play .ssp-result {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

#ssc-play .ssp-result-main {
  border-color: #d8d3ef;
  background: #f4f1fc;
}

#ssc-play .ssp-result-label {
  color: #7a5a1c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

#ssc-play .ssp-result-value {
  color: #20213e;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.02em;
}

#ssc-play .ssp-result-small {
  font-size: 22px;
  font-weight: 800;
}

#ssc-play .ssp-result-work {
  font-size: 14px;
}

/* All tools */
#ssc-play .ssp-list-head {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#ssc-play .ssp-list-head h3 {
  color: #20213e;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.015em;
}

#ssc-play .ssp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#ssc-play .ssp-filter {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d8d3ef;
  border-radius: 22px;
  background: #fff;
  color: #20213e;
  font-size: 14px;
  font-weight: 700;
  transition: background-color .2s ease;
}

#ssc-play .ssp-filter[aria-pressed="true"] {
  border-color: #1d1948;
  background: #1d1948;
  color: #fff;
}

#ssc-play .ssp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}

#ssc-play .ssp-cards.is-filtering {
  animation: ssp-rise .35s ease both;
}

#ssc-play .ssp-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

#ssc-play .ssp-card:hover {
  transform: translateY(-5px);
  border-color: #d8d3ef;
  box-shadow: 0 16px 30px rgba(32, 33, 62, .12);
}

#ssc-play .ssp-card-type {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  color: #7a5a1c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

#ssc-play .ssp-card-note {
  color: #475569;
  letter-spacing: 0;
  text-transform: none;
}

#ssc-play .ssp-card-name {
  color: #20213e;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
}

#ssc-play .ssp-card-desc {
  flex-grow: 1;
  font-size: 15px;
}

#ssc-play .ssp-card-go {
  padding-top: 2px;
  color: #4d3ec2;
  font-size: 15px;
  font-weight: 700;
}

/* Phones */
@media (max-width: 600px) {
  #ssc-play .ssp-wrap {
    padding: 44px 16px;
  }

  /* Tabs in a row, then the game, then the text, so the game is close to the top */
  #ssc-play .ssp-side {
    display: contents;
  }

  #ssc-play .ssp-tabs {
    order: 1;
    flex: 1 1 100%;
    min-width: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #ssc-play .ssp-tab {
    min-height: 52px;
    padding: 6px;
    text-align: center;
  }

  #ssc-play .ssp-tab-name {
    font-size: 13px;
    line-height: 1.2;
  }

  #ssc-play .ssp-tab-sub {
    display: none;
  }

  #ssc-play .ssp-area {
    order: 2;
    flex: 1 1 100%;
  }

  #ssc-play .ssp-info {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
    padding: 16px;
    color: #e0e7ff;
  }

  #ssc-play .ssp-screen h3 {
    font-size: 24px;
  }

  #ssc-play .ssp-mappane,
  #ssc-play .ssp-formula {
    padding: 14px;
  }

  /* A swipe row instead of 11 stacked cards */
  #ssc-play .ssp-cards {
    display: flex;
    margin: 0 -16px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #ssc-play .ssp-cards::-webkit-scrollbar {
    display: none;
  }

  #ssc-play .ssp-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  #ssc-play .ssp-card:hover {
    transform: none;
  }

  #ssc-play .ssp-map {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 6px;
  }

  /* No room for the curves here, and the hub already sits between the two columns */
  #ssc-play .ssp-lines {
    display: none;
  }

  #ssc-play .ssp-hub {
    width: 76px;
    height: 76px;
  }

  #ssc-play .ssp-hub-word {
    font-size: 15px;
  }

  #ssc-play .ssp-hub-sub {
    font-size: 9px;
  }

  #ssc-play .ssp-verb {
    font-size: 14px;
  }

  #ssc-play .ssp-hi {
    font-size: 13px;
  }

  #ssc-play .ssp-word {
    font-size: 15px;
  }

  #ssc-play .ssp-chip {
    padding: 0 8px;
    font-size: 13px;
  }

  #ssc-play .ssp-drawing {
    max-width: 200px;
  }
}

@keyframes ssp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes ssp-pop {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: none; }
}

@keyframes ssp-wipe {
  from { clip-path: inset(0 50% 0 50%); }
  to { clip-path: inset(0 0 0 0); }
}

/* Two identical copies, so changing the name restarts the fall for each new word */
@keyframes ssp-fall-a {
  from { transform: translateY(0); }
  to { transform: translateY(286px); }
}

@keyframes ssp-fall-b {
  from { transform: translateY(0); }
  to { transform: translateY(286px); }
}

@media (prefers-reduced-motion: reduce) {
  #ssc-play,
  #ssc-play * {
    animation: none !important;
    transition: none !important;
  }

  #ssc-play.ssp-ready [data-ssp-reveal] {
    opacity: 1;
    transform: none;
  }
}
