/* Behind the Cards reuses the shared .section-light and .section-dark banner
   surfaces. Opacity and backgrounds belong only to site-banner-surfaces.css. */
.community-behind-section {
  padding: clamp(72px, 7vw, 104px) 0;
  border-top: 1px solid rgba(160, 117, 67, .18);
  border-bottom: 1px solid rgba(160, 117, 67, .18);
}

.community-behind-inner {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  max-width: 1120px;
}

.community-behind-heading {
  max-width: 440px;
}

.community-behind-heading .eyebrow {
  margin-bottom: 12px;
}

.community-behind-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 3.5vw, 3.8rem);
  line-height: 1.04;
}

.community-behind-copy {
  max-width: 68ch;
}

.community-behind-copy p {
  margin: 0;
  font-size: clamp(.97rem, 1.3vw, 1.07rem);
  line-height: 1.75;
}

.community-behind-copy p + p {
  margin-top: 18px;
}

@media (max-width: 680px) {
  .community-behind-inner {
    grid-template-columns: 1fr;
  }
}

.community-readings-page .community-how-panel {
  gap: 12px;
}

.community-readings-page .community-how-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(111, 70, 37, .18);
  color: #3e2d20;
}

.community-readings-page .community-how-step strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(111, 70, 37, .3);
  border-radius: 50%;
  font-size: .8rem;
}

.community-reading-grid .question-art-card {
  position: relative;
}

.community-reading-grid .question-art-card.is-website-exclusive {
  border-color: rgba(218, 177, 108, .86);
  box-shadow:
    0 14px 32px rgba(55, 34, 21, .075),
    0 0 18px rgba(103, 52, 128, .28);
}

.community-reading-grid .question-art-card.is-website-exclusive:hover {
  border-color: rgba(226, 187, 116, .96);
  box-shadow:
    0 18px 42px rgba(62, 39, 24, .11),
    0 0 24px rgba(111, 57, 139, .36);
}

.community-reading-grid .question-art-card .community-reading-ribbon {
  position: absolute;
  top: 25px;
  right: -50px;
  z-index: 4;
  width: 240px;
  padding: 9px 4px;
  transform: rotate(30deg);
  transform-origin: center;
  border-top: 1px solid rgba(255, 222, 158, .75);
  border-bottom: 1px solid rgba(255, 222, 158, .75);
  background: #674021;
  box-shadow: 0 3px 12px rgba(44, 26, 13, .24);
  color: #fff5df;
  font: 800 .7rem/1.25 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .045em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.community-reading-grid .question-art-card .community-card-art {
  position: relative;
}

.community-reading-grid .question-art-card .community-card-art > img {
  display: block;
}

.community-reading-grid .question-art-card .community-exclusive-ribbon {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  width: min(110%, 500px);
  padding: 6px 6px;
  transform: translate(-50%, 50%) rotate(var(--community-exclusive-rotation, 0grad));
  transform-origin: center;
  border-top: 1px solid rgba(218, 177, 108, .72);
  border-bottom: 1px solid rgba(218, 177, 108, .72);
  background: linear-gradient(180deg, #563060 0%, #43234d 100%);
  box-shadow: 0 4px 12px rgba(45, 23, 51, .2);
  color: #f1ddbd;
  font: 800 1.25rem/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .055em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.community-reading-series {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.community-card-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  min-width: 0;
}

.community-reading-date {
  flex: 0 0 auto;
  color: rgba(76, 58, 45, .72);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

@media (min-width: 1061px) {
  .community-reading-grid > .community-reading-series {
    flex: 0 1 calc((100% - 48px) / 3);
    width: calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    min-width: 0;
  }
}

.community-card-link {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  color: #7b4f2b;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.community-library-status,
.community-picker-live {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.community-picker-status,
.community-result-status {
  padding: 20px 0;
  color: #6b5b4c;
  line-height: 1.65;
}

.community-library-status.is-error,
.community-picker-status.is-error,
.community-result-status.is-error {
  color: #8d3228;
}

.community-library-empty {
  padding: 30px;
  border: 1px solid rgba(127, 84, 46, .16);
  border-radius: 16px;
  background: rgba(255, 252, 246, .72);
  color: #655446;
  text-align: center;
}

/* Keep the public header flush with the viewport and the footer anchored
   at the page bottom when a reading is loading or unavailable. */
.community-pick-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.community-pick-page > main {
  flex: 1 0 auto;
}

/* Generous spacing belongs to the hero, never to the entire body. */
.community-pick-hero {
  padding-top: clamp(72px, 8vw, 112px);
  padding-bottom: clamp(64px, 7vw, 96px);
}

.community-pick-intro {
  max-width: 860px;
  text-align: center;
}

.community-pick-intro h1 {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
}

.community-pick-intro > [data-community-intro] {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
  color: #d7c8b4;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.75;
}

.community-card-section {
  padding-top: clamp(22px, 3vw, 38px);
  padding-bottom: clamp(54px, 6vw, 82px);
}

.community-shuffle-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  width: min(100%, 760px);
  margin: 0 auto clamp(22px, 3vw, 34px);
}

.community-shuffle-bar[hidden] {
  display: none;
}

.community-shuffle-button {
  flex: 0 0 auto;
  min-width: 160px;
}

.community-shuffle-button:disabled {
  opacity: .58;
  cursor: wait;
}

.community-conglomerate-control {
  display: grid;
  gap: 6px;
  max-width: 410px;
  font-family: var(--font-ui);
}

.community-conglomerate-control[hidden] {
  display: none;
}

.community-conglomerate-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: var(--text-dark);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.community-conglomerate-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gold-deep);
}

.community-conglomerate-help {
  color: var(--text-dark-soft);
  font-size: .78rem;
  line-height: 1.45;
}

.community-conglomerate-help summary {
  width: max-content;
  color: var(--accent-on-light);
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(152, 97, 39, .35);
  text-underline-offset: 3px;
}

.community-conglomerate-help p {
  max-width: 48ch;
  margin: 7px 0 0;
  color: var(--text-dark-soft) !important;
}

.community-picker-actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 3vw, 34px);
}

.community-picker-library-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(224, 173, 102, .75);
  border-radius: 999px;
  color: #f4dfbd;
  background: rgba(9, 8, 7, .88);
  box-shadow:
    inset 0 0 0 1px rgba(240, 206, 139, .1),
    0 8px 22px rgba(0, 0, 0, .14);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
}

.community-picker-library-link:hover {
  color: #fff0d1;
  border-color: rgba(224, 173, 102, .95);
  background: rgba(15, 12, 9, .94);
}

.community-picker-library-link:focus-visible {
  outline: 2px solid rgba(224, 173, 102, .9);
  outline-offset: 4px;
}

.community-pick-page .community-previous-section {
  padding: clamp(44px, 6vw, 80px) 0;
  border-top: 1px solid rgba(218, 170, 94, .4);
  border-bottom: 1px solid rgba(218, 170, 94, .28);

  color: #f8ecda;
}

.community-previous-heading {
  max-width: 690px;
  margin: 0 auto clamp(28px, 4vw, 42px);
  text-align: center;
}

.community-previous-heading h2 {
  margin-bottom: 12px;
  color: #fff4e0;
}

.community-previous-heading > p:last-child {
  margin: 0;
  color: #d9c8b0;
  line-height: 1.6;
}

.community-previous-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

.community-previous-card {
  display: grid;
  grid-template-columns: minmax(128px, 48%) minmax(0, 1fr);
  justify-self: center;
  width: min(100%, 360px);
  overflow: hidden;
  min-height: 138px;
  border: 1px solid rgba(225, 172, 98, .55);
  border-radius: 14px;
  background: rgba(255, 250, 239, .96);
  color: #443020;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.community-previous-card:hover {
  transform: translateY(-3px);
  border-color: #e1ac62;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .27);
}

.community-previous-card:focus-visible {
  outline: 3px solid #f0bf76;
  outline-offset: 4px;
}

.community-previous-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 138px;
  object-fit: cover;
}

.community-previous-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 12px;
  padding: 18px 16px;
}

.community-previous-card.is-website-exclusive {
  border-color: rgba(218, 177, 108, .86);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, .18),
    0 0 18px rgba(103, 52, 128, .28);
}

.community-previous-card.is-website-exclusive:hover {
  border-color: rgba(226, 187, 116, .96);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, .27),
    0 0 24px rgba(111, 57, 139, .36);
}

.community-previous-card.is-website-exclusive .community-previous-copy {
  position: relative;
  padding-top: 42px;
  padding-bottom: 42px;
  background: linear-gradient(180deg, #563060 0%, #43234d 100%);
}

.community-previous-card.is-website-exclusive .community-previous-date,
.community-previous-card.is-website-exclusive .community-previous-action {
  color: #f1ddbd;
}

.community-previous-exclusive {
  position: absolute;
  left: 16px;
  right: 16px;
  color: var(--accent-on-dark);
  font: 800 1rem/1.15 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .055em;
  text-align: center;
  pointer-events: none;
}

.community-previous-exclusive-top {
  top: 12px;
}

.community-previous-exclusive-bottom {
  bottom: 12px;
}

.community-previous-date {
  color: #58402b;
  font: 700 clamp(.82rem, 1.1vw, 1rem)/1.4 Georgia, "Times New Roman", serif;
}

.community-previous-action {
  color: #794e24;
  font: 800 .73rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}

@media (max-width: 990px) {
  .community-previous-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 590px) {
  .community-shuffle-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .community-shuffle-button {
    width: 100%;
  }

  .community-conglomerate-control {
    max-width: none;
  }

  .community-previous-grid { grid-template-columns: 1fr; }
  .community-previous-card {
    grid-template-columns: minmax(132px, 48%) minmax(0, 1fr);
    width: min(100%, 350px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-previous-card { transition: none; }
  .community-shuffle-deck-card,
  .community-pile.is-scooping .community-card-stack,
  .community-pile.is-scooping .community-pick-card,
  .community-pile.is-reverse-scooping .community-card-stack,
  .community-pile.is-reverse-scooping .community-pick-card {
    animation: none;
  }
  .community-table-stage.is-shuffling .community-pile-grid {
    filter: none;
  }
}

.community-table-stage-wrap {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.community-table-stage {
  --community-pile-count: 4;
  --community-flip-seconds: 3s;
  --community-flip-easing: linear(0, .064444 5%, .124444 10%, .18 15%, .231111 20%, .277778 25%, .722222 75%, .768889 80%, .82 85%, .875556 90%, .935556 95%, 1);
  --community-fade-seconds: 2s;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1080 / 498;
  border: 1px solid rgba(86, 57, 32, .34);
  border-radius: 18px;
  background-color: #211b15;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 22px 48px rgba(51, 32, 19, .2);
  isolation: isolate;
}

.community-table-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 30%, rgba(0, 0, 0, .08) 100%);
}

.community-table-stage.is-flipping-back,
.community-table-stage.is-scooping,
.community-table-stage.is-shuffling,
.community-table-stage.is-reverse-scooping {
  z-index: 3;
}

.community-table-stage.is-flipping-back .community-card-inner,
.community-table-stage.is-flipping-back .community-pick-card {
  transition-duration: var(--community-shuffle-flip-back-seconds, .45s);
}

.community-table-stage.is-flipping-back :is(.community-pile-card-name, .community-pile-reading-link),
.community-table-stage.is-shuffle-sequence :is(.community-pile-card-name, .community-pile-reading-link) {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

.community-shuffle-deck {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: visible;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  transition: opacity .1s ease;
}

.community-shuffle-deck[hidden] {
  display: none;
}

.community-shuffle-deck.is-handing-off {
  opacity: 0;
  transition: none;
}

.community-shuffle-deck-card {
  position: absolute;
  right: auto;
  bottom: var(--community-shuffle-card-bottom, clamp(10px, 2vw, 24px));
  left: var(--community-shuffle-anchor-x, 16%);
  display: block;
  width: var(--community-shuffle-card-width, clamp(134.4px, 24.8vw, 288px));
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 12px;
  filter: none;
  opacity: .98;
  transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
  transform-origin: 50% 82%;
  -webkit-user-drag: none;
  user-select: none;
}

.community-table-stage.is-shuffling .community-pile-grid {
  opacity: 0;
  filter: none;
  pointer-events: none;
}

.community-table-stage.is-deck-shuffling .community-pile-grid {
  visibility: hidden;
  opacity: 0 !important;
  pointer-events: none;
  transition: none;
}

.community-table-stage.is-reverse-scooping .community-pile-grid {
  transition: none;
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}

.community-table-stage.is-scooping .community-pile-grid {
  pointer-events: none;
}

.community-pile-grid {
  transition: opacity .14s ease, filter .14s ease;
}

.community-pile.is-scooping {
  z-index: var(--community-scoop-z, 1);
}

.community-pile.is-scooping .community-card-stack {
  animation: community-scoop-card var(--community-scoop-duration, .6s) cubic-bezier(.42, 0, .18, 1) forwards;
  animation-delay: var(--community-scoop-delay, 0ms);
  transform-origin: 50% 82%;
}

.community-pile.is-scooping .community-pick-card {
  animation: community-scoop-placement var(--community-scoop-duration, .6s) cubic-bezier(.42, 0, .18, 1) forwards;
  animation-delay: var(--community-scoop-delay, 0ms);
}

.community-pile.is-reverse-scooping .community-card-stack {
  animation: community-reverse-scoop-card var(--community-reverse-scoop-duration, .7s) cubic-bezier(.2, .7, .22, 1) both;
  animation-delay: var(--community-reverse-scoop-delay, 0ms);
  transform-origin: center;
}

.community-pile.is-reverse-scooping .community-pick-card {
  animation: community-reverse-scoop-placement var(--community-reverse-scoop-duration, .7s) cubic-bezier(.2, .7, .22, 1) both;
  animation-delay: var(--community-reverse-scoop-delay, 0ms);
}

@keyframes community-scoop-placement {
  to {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes community-scoop-card {
  0% {
    opacity: 1;
    transform:
      translate(0, var(--community-spread-offset-y, -8px))
      rotate(0deg)
      scale(1);
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform:
      translate(var(--community-scoop-x, 0px), var(--community-scoop-y, 0px))
      rotate(var(--community-scoop-rotation, 0deg))
      scale(var(--community-scoop-scale, 1));
  }
}

@keyframes community-reverse-scoop-card {
  0% {
    opacity: 1;
    transform:
      translate(var(--community-reverse-scoop-x, 0px), var(--community-reverse-scoop-y, 0px))
      rotate(0deg)
      scale(var(--community-reverse-scoop-scale, 1));
  }
  100% {
    opacity: 1;
    transform:
      translate(0, var(--community-spread-offset-y, -8px))
      rotate(0deg)
      scale(1);
  }
}

@keyframes community-reverse-scoop-placement {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform:
      translate(var(--community-card-x, 0), var(--community-card-y, 0))
      rotate(var(--community-card-rotation, 0deg));
  }
}

.community-pile-grid {
  position: absolute;
  inset: clamp(16px, 3vw, 34px);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: clamp(10px, 2vw, 28px);
}

.community-pile {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  max-width: min(18%, calc(94% / var(--community-pile-count)));
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.community-card-stack {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  transform: translateY(var(--community-spread-offset-y, -8px));
}

.community-pick-card {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1400px;
  appearance: none;
  transform: translate(var(--community-card-x, 0), var(--community-card-y, 0)) rotate(var(--community-card-rotation, 0deg));
  transform-origin: center;
  transition:
    opacity .35s ease,
    filter .35s ease,
    transform var(--community-flip-seconds) var(--community-flip-easing);
}

.community-pick-card:focus-visible {
  outline: 3px solid rgba(240, 189, 108, .82);
  outline-offset: 8px;
  border-radius: 18px;
}

.community-pile.is-flipped .community-pick-card {
  transform: translate(0, 0) rotate(0deg);
}

.community-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition: transform var(--community-flip-seconds) var(--community-flip-easing);
}

.community-pile.is-flipped .community-card-inner {
  transform: rotateY(180deg);
}

.community-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
}

.community-card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .34));
  -webkit-user-drag: none;
  user-select: none;
}

.community-card-reveal {
  transform: rotateY(180deg);
}

.community-pile-reveal-meta {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  height: 0;
  pointer-events: none;
}

.community-pile-card-name {
  --community-reveal-gold: #f4dfbd;
  --community-reveal-border: rgba(224, 173, 102, .75);
  --community-reveal-surface: rgba(9, 8, 7, .5);
  position: absolute;
  bottom: clamp(7px, 1.1vw, 12px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  padding: 6px 11px;
  border: 1px solid var(--community-reveal-border) !important;
  border-radius: 999px;
  color: var(--community-reveal-gold) !important;
  background: var(--community-reveal-surface) !important;
  box-shadow:
    inset 0 0 0 1px rgba(240, 206, 139, .12),
    0 8px 22px rgba(0, 0, 0, .2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.78rem, 1.2vw, .92rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    opacity var(--community-fade-seconds) ease,
    transform var(--community-fade-seconds) ease;
}

.community-pile-reading-link {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: auto !important;
  max-width: none;
  min-width: 148px;
  min-height: 40px !important;
  padding: 6px 14px !important;
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    opacity var(--community-fade-seconds) ease,
    border-color .18s ease,
    color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.community-pile-reading-link.button-primary {
  --community-reveal-gold: #f4dfbd;
  --community-reveal-border: rgba(224, 173, 102, .75);
  --community-reveal-surface: rgba(9, 8, 7, .5);
  border: 1px solid var(--community-reveal-border) !important;
  color: var(--community-reveal-gold) !important;
  background: var(--community-reveal-surface) !important;
  box-shadow:
    inset 0 0 0 1px rgba(240, 206, 139, .12),
    0 8px 22px rgba(0, 0, 0, .2);
}

.community-pile-reading-link.button-primary:hover,
.community-pile-reading-link.button-primary:focus,
.community-pile-reading-link.button-primary:active {
  border-color: var(--community-reveal-border) !important;
  color: var(--community-reveal-gold) !important;
  background: var(--community-reveal-surface) !important;
  box-shadow:
    inset 0 0 0 1px rgba(240, 206, 139, .12),
    0 8px 22px rgba(0, 0, 0, .2);
  transform: translateX(-50%);
}

.community-pile-reading-link.button-primary:focus-visible {
  outline: 2px solid rgba(224, 173, 102, .9);
  outline-offset: 4px;
}

.community-pile.is-revealed .community-pile-card-name,
.community-pile.is-revealed .community-pile-reading-link {
  opacity: 1;
}

.community-pile.is-revealed .community-pile-card-name {
  transform: translate(-50%, 0);
}

.community-pile.is-revealed .community-pile-reading-link {
  pointer-events: auto;
}


/* The picker alone becomes a landscape canvas on portrait phones.
   Turning the device sideways automatically returns the stage to its normal layout. */
@media (max-width: 780px) and (orientation: portrait) {
  .community-pick-page.uses-landscape-picker .community-table-stage-wrap {
    --community-portrait-landscape-length: min(92vh, 205vw, 1120px);
    --community-portrait-landscape-length: min(92svh, 205vw, 1120px);
    position: relative;
    width: 100%;
    height: var(--community-portrait-landscape-length);
    margin: 0 auto;
  }

  .community-pick-page.uses-landscape-picker .community-table-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--community-portrait-landscape-length);
    max-width: none;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }

  /* The picker is rotated clockwise on portrait phones. Shift the whole
     pile grid on its local X axis so cards, labels and CTA move down together. */
  .community-pick-page.uses-landscape-picker .community-pile-grid {
    transform: translateY(12px);
  }

  /* Keep the CTA in the picker's own landscape layout. Give the label
     enough room on portrait phones without counter-rotating the button. */
  .community-pick-page.uses-landscape-picker .community-pile-reading-link {
    width: auto !important;
    min-width: 148px;
    max-width: none;
    padding-right: 11px !important;
    padding-left: 11px !important;
    font-size: .8rem !important;
  }
}

.community-result-status {
  min-height: 120px;
  padding-top: 52px;
  padding-bottom: 52px;
}

.community-result-hero {
  padding-top: clamp(40px, 5vw, 70px);
  padding-bottom: clamp(36px, 5vw, 60px);
}

.community-result-header {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(38px, 7vw, 86px);
  align-items: center;
  width: min(100%, 960px);
  margin: 0 auto;
}

.community-result-card {
  margin: 0;
}

.community-result-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35));
}

.community-result-heading h1 {
  max-width: 720px;
  margin-bottom: 18px;
}

.community-result-heading > p:not(.eyebrow) {
  max-width: 620px;
  color: #d4c4b0;
  line-height: 1.75;
}

.community-reading-section {
  padding-top: clamp(32px, 4.5vw, 64px);
  padding-bottom: clamp(72px, 8vw, 110px);
}

.community-reading-sheet {
  scroll-margin-top: 100px;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 66px);
  border: 1px solid rgba(127, 84, 46, .18);
  border-radius: 4px;
  background: #f8efe0;
  box-shadow: 0 20px 48px rgba(73, 48, 28, .12);
}

.community-reading-sheet h2 {
  margin-bottom: 26px;
}

.community-reading-copy {
  color: #4d4034;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  line-height: 1.9;
}

.community-reading-copy p + p {
  margin-top: 1.35em;
}

.community-clarifying-spread {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(127,84,46,.25);
}
.community-clarifying-spread[hidden],
.community-clarifying-copy[hidden] { display:none; }
.community-clarifying-question {
  display:block;
  width:100%;
  min-height:54px;
  padding:12px 18px !important;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.5;
}
.community-clarifying-copy {
  margin-top:22px;
  border-left:3px solid rgba(127,84,46,.42);
  padding:8px 0 8px 20px;
}

.community-card-description {
  color: #6b5b4c;
  line-height: 1.6;
}

.community-card-description > :last-child {
  margin-bottom: 0;
}

.community-reading-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, .82fr) minmax(0, .92fr);
  gap: 10px;
  margin-top: 38px;
}

.community-reading-actions .button {
  width: 100%;
  min-width: 0;
  padding-right: 12px !important;
  padding-left: 12px !important;
  font-size: .82rem !important;
  white-space: nowrap;
}

.community-result-cta {
  padding-top: clamp(58px, 6vw, 82px);
  padding-bottom: clamp(58px, 6vw, 82px);
}

.community-result-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 64px);
}

.community-result-cta-inner > div:first-child {
  max-width: 720px;
}

.community-result-cta h2 {
  color: #fff5e7;
}

.community-result-cta p:not(.eyebrow) {
  max-width: 680px;
  color: #cfbfaa;
  line-height: 1.7;
}

.community-result-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.community-result-cta .button-secondary {
  color: #f5e5cf;
  border-color: rgba(214, 160, 90, .34);
  background: rgba(214, 160, 90, .07);
}

@media (max-width: 780px) {
  .community-reading-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .community-reading-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .community-table-stage {
    border-radius: 14px;
  }

  .community-pile-grid {
    inset: 18px;
    gap: 12px;
  }

  .community-pile-reading-link {
    min-width: 120px;
    padding-right: 13px;
    padding-left: 13px;
    font-size: .8rem;
  }
}

@media (max-width: 780px) {
  .community-result-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .community-result-card {
    width: min(62vw, 230px);
    margin: 0 auto;
  }

  .community-result-heading > p:not(.eyebrow) {
    margin-right: auto;
    margin-left: auto;
  }

  .community-result-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-result-cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .community-reading-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-pick-card,
  .community-card-inner,
  .community-pile-card-name,
  .community-pile-reading-link,
  .community-reading-grid .question-art-card {
    transition: none !important;
  }

}


/* Give the hidden shuffle experiment a larger resting/dealt spread without
   changing the shuffle-deck geometry. Scoop and reverse-scoop scale between
   this table pose and the deck pose, so the V4.9.41 handoff remains matched. */
.community-table-stage.has-shuffle-controller .community-pile-grid {
  inset: clamp(10px, 1.8vw, 20px);
  gap: clamp(8px, 1.25vw, 18px);
}

.community-table-stage.has-shuffle-controller .community-pile {
  max-width: min(22%, calc(96% / var(--community-pile-count)));
}

.community-table-stage.has-shuffle-controller .community-card-stack,
.community-table-stage.has-shuffle-controller .community-pick-card {
  max-width: 260px;
}

/* Keep the hidden shuffle experiment's image boxes contained consistently.
   Auto grid tracks otherwise expand to a tall image's intrinsic size. */
.community-table-stage.has-shuffle-controller .community-card-face {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.community-table-stage.has-shuffle-controller .community-card-face img {
  min-width: 0;
  min-height: 0;
}
