body[data-page="plot-twists.html"] .content-card {
  width: min(100%, 68rem);
  padding-top: 0.75rem;
  padding-inline: clamp(0.65rem, 2.5vw, 1.5rem);
}

body[data-page="plot-twists.html"] .article-content > p:first-child {
  max-width: 48rem;
}

.plot-game {
  --game-ink: #302014;
  --game-paper: #fffdf1;
  --game-leaf: #3f7f36;
  --game-leaf-dark: #245124;
  --game-lime: #91bd42;
  --game-pink: #ce3470;
  --game-dirt: #6b3e25;
  position: relative;
  margin: 0.35rem -0.45rem 2rem;
  color: var(--game-ink);
  font-size: clamp(0.88rem, 0.8rem + 0.25vw, 1rem);
}

.plot-game::before {
  position: absolute;
  z-index: 0;
  inset: -0.7rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 8% 5%, rgb(255 255 255 / 80%), transparent 15rem),
    radial-gradient(circle at 92% 10%, rgb(255 224 110 / 35%), transparent 16rem),
    linear-gradient(145deg, #f8f4b7, #cfe597 55%, #9fc26c);
  box-shadow: inset 0 0 0 0.12rem rgb(255 255 255 / 60%), 0 1.2rem 2.7rem rgb(57 35 17 / 20%);
  content: "";
}

.plot-game button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  color: #fff;
  background: linear-gradient(#7b563d, #4d301e);
  box-shadow: 0 0.35rem 0.7rem rgb(57 35 17 / 22%), inset 0 0.08rem 0 rgb(255 255 255 / 25%);
  cursor: pointer;
  font-weight: 850;
  transition: translate 150ms ease, filter 150ms ease;
}

.plot-game button:hover:not(:disabled) {
  filter: saturate(1.15) brightness(1.05);
  translate: 0 -0.12rem;
}

.plot-game button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.58;
}

.plot-game__header,
.plot-game__layout {
  position: relative;
  z-index: 1;
}

.plot-game__header {
  display: grid;
  padding: clamp(1rem, 3vw, 1.6rem);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.plot-game__header h2 {
  margin: 0;
  color: var(--orange-dark);
  font-size: clamp(3rem, 9vw, 5.6rem);
  line-height: 0.8;
  rotate: -1deg;
  text-shadow: 0.05em 0.06em 0 #fff, 0.09em 0.12em 0 rgb(91 64 51 / 16%);
}

.plot-game__header p {
  max-width: 38rem;
  margin: 0.65rem 0 0;
  font-weight: 750;
}

.plot-game__kicker {
  margin: 0 0 0.25rem !important;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 900 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plot-game__stats {
  display: grid;
  min-width: 20rem;
  margin: 0;
  padding: 0.65rem;
  border-radius: 1.2rem;
  grid-template-columns: repeat(4, minmax(4.25rem, 1fr));
  gap: 0.4rem;
  background: rgb(255 253 241 / 70%);
  box-shadow: inset 0 0 0 0.08rem rgb(255 255 255 / 80%);
}

.plot-game__stats div {
  padding: 0.45rem 0.35rem;
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 55%);
  text-align: center;
}

.plot-game__stats dt {
  color: rgb(48 32 20 / 60%);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plot-game__stats dd {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  font-weight: 900;
}

.plot-game__layout {
  display: grid;
  padding: 0 1rem 1rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
  gap: 0.8rem;
}

.plot-game__board,
.plot-game__side {
  padding: 0.9rem;
  border-radius: 1.45rem;
  background: rgb(255 253 241 / 80%);
  box-shadow: 0 0.75rem 1.8rem rgb(57 35 17 / 17%), inset 0 0 0 0.08rem rgb(255 255 255 / 78%);
  backdrop-filter: blur(0.45rem);
}

.plot-game__season {
  display: flex;
  margin-bottom: 0.7rem;
  padding: 0.72rem 0.8rem;
  border-radius: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: linear-gradient(110deg, rgb(255 255 255 / 72%), rgb(255 225 126 / 60%));
}

.plot-game__season strong,
.plot-game__season span {
  display: block;
}

.plot-game__season strong {
  color: var(--purple);
  font-size: 0.9rem;
}

.plot-game__season span {
  margin-top: 0.12rem;
  color: rgb(48 32 20 / 68%);
  font-size: 0.7rem;
}

.plot-game__plots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.plot-card {
  position: relative;
  min-width: 0;
  padding: 0.8rem;
  overflow: hidden;
  border: 0.1rem solid rgb(78 88 37 / 16%);
  border-radius: 1.25rem 0.9rem 1.3rem 1rem;
  background:
    radial-gradient(circle at 22% 0%, rgb(255 255 255 / 90%), transparent 5.5rem),
    linear-gradient(155deg, #fffef5, #e8efad 60%, #a8c868);
  box-shadow: 0.4rem 0.5rem 0 rgb(73 84 37 / 13%), 0 0.65rem 1.2rem rgb(57 35 17 / 15%);
  transition: translate 180ms ease, rotate 180ms ease;
}

.plot-card:nth-child(2) { rotate: 0.7deg; }
.plot-card:nth-child(3) { rotate: -0.6deg; }
.plot-card:hover { z-index: 2; translate: 0 -0.22rem; rotate: 0deg; }

.plot-card--candidate {
  min-height: auto;
  background: linear-gradient(155deg, #fffef5, #ffe3a4 62%, #f5ad47);
}

.plot-card__top,
.plot-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.plot-card h3 {
  margin: 0;
  color: var(--game-dirt);
  font-family: "Kids Croteau", Impact, sans-serif;
  font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  font-weight: 400;
}

.plot-card__badge {
  padding: 0.24rem 0.4rem;
  border-radius: 999px;
  color: var(--game-dirt);
  background: rgb(91 64 51 / 12%);
  font-size: 0.55rem;
  font-weight: 900;
}

.plot-card__badge--good { color: #215a29; background: rgb(38 130 53 / 15%); }
.plot-card__badge--bad { color: #8c251e; background: rgb(180 45 35 / 15%); }

.plot-card__art {
  display: grid;
  height: 5rem;
  margin: 0.45rem 0;
  border-radius: 0.9rem;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 92%, #6e4d2d 0 27%, transparent 28%),
    radial-gradient(ellipse at 43% 58%, #80af3a 0 17%, transparent 18%),
    radial-gradient(ellipse at 58% 48%, #4d8b32 0 19%, transparent 20%),
    linear-gradient(130deg, rgb(255 255 255 / 70%), rgb(255 223 129 / 35%));
  color: var(--game-leaf-dark);
  font-family: "Kids Croteau", Impact, sans-serif;
  font-size: 1rem;
  text-align: center;
}

.plot-card__name {
  display: block;
  min-height: 2.9em;
  margin: 0.45rem 0;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
}

.plot-card__generation {
  display: block;
  color: rgb(48 32 20 / 62%);
  font-size: 0.58rem;
  font-weight: 800;
}

.plot-card__traits {
  display: grid;
  gap: 0.42rem;
}

.plot-card__trait {
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 1fr) 1rem;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.63rem;
  font-weight: 850;
}

.plot-card__bar {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(72 65 35 / 13%);
  box-shadow: inset 0 0.08rem 0.12rem rgb(57 35 17 / 20%);
}

.plot-card__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--game-leaf), #d9dd48);
}

.plot-card__footer {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 0.08rem solid rgb(57 35 17 / 12%);
  color: rgb(48 32 20 / 65%);
  font-size: 0.58rem;
  font-weight: 850;
}

.plot-card__footer button { padding: 0.42rem 0.55rem; font-size: 0.62rem; }

.plot-game__side h2 {
  margin: 0 0 0.35rem;
  color: var(--purple);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.plot-game__side > p {
  color: rgb(48 32 20 / 70%);
  font-size: 0.78rem;
  line-height: 1.45;
}

.plot-game__candidates {
  display: grid;
  max-height: 27rem;
  margin-top: 0.6rem;
  overflow: auto;
  gap: 0.55rem;
}

.plot-game__candidates .plot-card { padding: 0.65rem; }
.plot-game__candidates .plot-card__name { min-height: 0; }

.plot-game__actions {
  display: flex;
  margin-top: 0.7rem;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.plot-game .plot-game__secondary { color: #3d260f; background: linear-gradient(#ffe473, #edac22); }
.plot-game .plot-game__danger { background: linear-gradient(#ca4f25, #7c2d17); }
.plot-game .plot-game__quiet { color: var(--purple); background: #fff; box-shadow: inset 0 0 0 0.1rem var(--purple); }

.plot-game__log {
  max-height: 13rem;
  margin-top: 0.65rem;
  padding-right: 0.2rem;
  overflow: auto;
}

.plot-game__log-entry {
  margin: 0.4rem 0;
  padding: 0.48rem 0.58rem;
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 60%);
  font-size: 0.67rem;
  line-height: 1.4;
}

.plot-game__log-entry--rare {
  border: 0.1rem dashed var(--pink);
  background: linear-gradient(120deg, #fff, #ffe8a9);
  color: var(--purple);
  font-weight: 800;
}

.plot-game__overlay {
  position: fixed;
  z-index: 99;
  inset: 0;
  display: none;
  padding: 1rem;
  place-items: center;
  background: rgb(44 28 17 / 55%);
  backdrop-filter: blur(0.35rem);
}

.plot-game__overlay.is-open { display: grid; }

.plot-game__modal {
  width: min(100%, 34rem);
  padding: clamp(1.3rem, 4vw, 2.2rem);
  border-radius: 1.6rem;
  background: linear-gradient(145deg, #fffef5, #e7ed9f);
  box-shadow: 0 2rem 5rem rgb(38 22 11 / 45%);
  text-align: center;
}

.plot-game__modal h2 { margin: 0; color: var(--orange-dark); }
.plot-game__final-score { display: block; color: var(--purple); font-size: clamp(3.5rem, 12vw, 6rem); line-height: 1; }
.plot-game__noscript { position: relative; z-index: 2; padding: 1rem; }

@media (max-width: 58rem) {
  .plot-game__header,
  .plot-game__layout { grid-template-columns: 1fr; }
  .plot-game__stats { min-width: 0; }
}

@media (max-width: 38rem) {
  .plot-game { margin-inline: 0; }
  .plot-game::before { inset-inline: -0.2rem; }
  .plot-game__header { padding-inline: 0.6rem; }
  .plot-game__layout { padding-inline: 0.35rem; }
  .plot-game__stats { grid-template-columns: repeat(2, 1fr); }
  .plot-game__plots { grid-template-columns: 1fr; }
  .plot-card { min-height: auto; }
  .plot-game__season { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .plot-card,
  .plot-game button { transition: none; }
  .plot-card:hover,
  .plot-game button:hover { translate: 0; }
}
