/* A hand of cards; the hit area stays still while its face rises. */
.card-picker {
  display: block;
  margin-top: 42px;
}
.fan-instruction {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #dbe5d1;
  font-size: 13px;
}
.fan-desktop-hint,
.fan-touch-hint {
  color: var(--dark-muted);
  font-size: 11px;
}
.fan-touch-hint {
  display: none;
}
.card-fan {
  --card-width: 184px;
  --fan-step: 105px;
  position: relative;
  height: 390px;
  margin-top: 20px;
  isolation: isolate;
}
.card-fan::before {
  content: "";
  position: absolute;
  width: min(82%, 840px);
  height: 170px;
  border: 1px solid #78917040;
  border-radius: 50%;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}
.card-fan .card-choice {
  --slot: -2.5;
  --angle: -18deg;
  --arc: 30px;
  position: absolute;
  left: 50%;
  top: 38px;
  display: block;
  width: var(--card-width);
  height: auto;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  transform: translateX(calc(-50% + var(--slot) * var(--fan-step)))
    translateY(var(--arc)) rotate(var(--angle));
  transform-origin: 50% 85%;
  cursor: pointer;
  touch-action: manipulation;
  transition: none;
}
.card-fan .card-choice:nth-child(2) {
  --slot: -1.5;
  --angle: -11deg;
  --arc: 8px;
  z-index: 2;
}
.card-fan .card-choice:nth-child(3) {
  --slot: -0.5;
  --angle: -4deg;
  --arc: 0px;
  z-index: 3;
}
.card-fan .card-choice:nth-child(4) {
  --slot: 0.5;
  --angle: 4deg;
  --arc: 0px;
  z-index: 4;
}
.card-fan .card-choice:nth-child(5) {
  --slot: 1.5;
  --angle: 11deg;
  --arc: 8px;
  z-index: 5;
}
.card-fan .card-choice:nth-child(6) {
  --slot: 2.5;
  --angle: 18deg;
  --arc: 30px;
  z-index: 6;
}
.card-fan .card-choice[aria-pressed="true"] {
  background: none;
  color: var(--ink);
}
.card-fan .card-choice > .fan-face {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-family: var(--sans);
  font-style: normal;
  border-radius: 9px;
  background: #f2ebd8;
  border: 1px solid #d6c9ac;
  box-shadow:
    -10px 10px 22px #0b1f2440,
    0 1px 2px #0b1f2450;
  overflow: hidden;
  transform-origin: 50% 85%;
  transition:
    transform 320ms cubic-bezier(0.22, 0.85, 0.25, 1),
    box-shadow 240ms ease;
}
.fan-face > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.fan-card-title {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0 5px auto;
  height: 16.5%;
  font: 600 19px/1.25 var(--serif);
  white-space: nowrap;
}
.fan-card-number {
  position: absolute;
  top: 21%;
  left: 10px;
  color: #fffdf4;
  font:
    italic 12px Georgia,
    serif;
  text-shadow: 0 1px 5px #183425;
}
.fan-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  bottom: 8%;
  left: 14px;
  right: 14px;
  font-size: 10px;
}
.card-fan .card-choice[aria-pressed="true"] .fan-face {
  transform: translateY(-10px);
  box-shadow:
    -10px 12px 24px #0b1f2450,
    0 0 0 2px #d9cf9b;
}
.card-fan .card-choice:focus-visible {
  outline: none;
  z-index: 20;
}
.card-fan .card-choice:focus-visible .fan-face {
  outline: 3px solid var(--yellow);
  outline-offset: -5px;
  transform: translateY(-44px) rotate(calc(-1 * var(--angle))) scale(1.04);
}
@media (hover: hover) and (pointer: fine) {
  .card-fan .card-choice:hover {
    z-index: 20;
  }
  .card-fan .card-choice:hover .fan-face {
    transform: translateY(-48px) rotate(calc(-1 * var(--angle))) scale(1.06);
    box-shadow: 0 24px 35px #0b1f2470;
  }
  .card-fan .card-choice:active .fan-face {
    transform: translateY(-43px) rotate(calc(-1 * var(--angle))) scale(1.02);
    transition-duration: 90ms;
  }
}
.fan-table-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #78917055;
  font: 18px/1.6 var(--serif);
  color: #d9e4cd;
}
.fan-table-caption > span:last-child {
  font: 9px/1.5 var(--sans);
  letter-spacing: 0.14em;
  color: var(--dark-muted);
}
.cards-section .cards-footer {
  margin-top: 30px;
}
.card-dialog {
  width: min(990px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  border: 1px solid #607a60;
  border-radius: 16px;
  padding: 0;
  color: var(--paper);
  background: var(--dark);
  overflow: visible;
  box-shadow: 0 28px 100px #0b1f2460;
}
.card-dialog::backdrop {
  background: #10231bd1;
  backdrop-filter: blur(8px);
}
.card-dialog-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #607a6055;
  margin-inline: 26px;
}
.card-dialog-header > p {
  font-size: 13px;
}
.card-dialog-header > p span {
  color: var(--dark-muted);
  font-size: 11px;
}
.card-dialog-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.card-dialog-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid #73886b;
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font: 20px/1 var(--sans);
  transition:
    background 150ms ease,
    transform 150ms ease;
}
.card-dialog-controls button:hover {
  background: #3b5740;
}
.card-dialog-controls button:active {
  transform: scale(0.94);
}
.card-dialog-controls [data-close-card] {
  margin-left: 7px;
  font-size: 25px;
}
.card-dialog-body {
  max-height: calc(100dvh - 123px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #73886b var(--dark);
  scrollbar-width: thin;
  padding: 30px;
  border-radius: 0 0 16px 16px;
}
.card-dialog .card-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 35px;
  margin: 0;
}
.card-dialog .card-display {
  border: 0;
  background: none;
  min-height: 460px;
}
.card-dialog .playing-card {
  width: 260px;
  transform: none;
  box-shadow: 0 15px 35px #10231b80;
}
.card-dialog .card-details {
  margin: 0;
  padding: 0 10px 0 0;
  min-height: 0;
}
.card-dialog .card-details > .eyebrow {
  color: var(--dark-muted);
  font-size: 10px;
}
.card-dialog .card-details > h3 {
  font-size: 30px;
}
.card-dialog .card-description {
  font-size: 13px;
}
.card-dialog .card-display-note {
  top: 0;
  left: 0;
}
.card-dialog .card-display-foot {
  bottom: 0;
  right: 0;
}
.card-flight {
  position: fixed !important;
  z-index: 5;
  pointer-events: none;
  transform-origin: 0 0;
  margin: 0;
  max-width: none;
}
body.card-open {
  overflow: hidden;
}
@media (max-width: 1100px) {
  .card-fan {
    --fan-step: 85px;
    --card-width: 170px;
    height: 365px;
  }
}
@media (max-width: 850px) {
  .card-fan {
    --fan-step: 70px;
    --card-width: 150px;
    height: 335px;
  }
  .fan-card-title {
    font-size: 17px;
  }
  .card-dialog .card-explorer {
    gap: 22px;
  }
  .card-dialog .playing-card {
    width: 220px;
  }
  .card-dialog .card-details > h3 {
    font-size: 26px;
  }
  .card-dialog-body {
    padding: 24px;
  }
}
@media (max-width: 640px) {
  .card-picker {
    margin-top: 30px;
  }
  .fan-instruction {
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
  }
  .fan-desktop-hint {
    display: none;
  }
  .fan-touch-hint {
    display: inline;
    font-size: 10px;
  }
  .card-fan {
    --fan-step: 34px;
    --card-width: 112px;
    height: 263px;
    margin-top: 24px;
  }
  .card-fan .card-choice {
    --angle: -12deg;
    --arc: 18px;
    top: 35px;
    border-radius: 6px;
    min-height: 0;
  }
  .card-fan .card-choice:nth-child(2) {
    --angle: -7deg;
    --arc: 5px;
  }
  .card-fan .card-choice:nth-child(3) {
    --angle: -2deg;
  }
  .card-fan .card-choice:nth-child(4) {
    --angle: 2deg;
  }
  .card-fan .card-choice:nth-child(5) {
    --angle: 7deg;
    --arc: 5px;
  }
  .card-fan .card-choice:nth-child(6) {
    --angle: 12deg;
    --arc: 18px;
  }
  .card-fan::before {
    width: 96%;
    height: 105px;
    bottom: 4px;
  }
  .card-fan .card-choice > .fan-face {
    border-radius: 6px;
  }
  .fan-card-title {
    font-size: 13px;
  }
  .fan-card-number {
    font-size: 9px;
    left: 6px;
  }
  .fan-card-foot {
    font-size: 7px;
    left: 9px;
    right: 9px;
  }
  .fan-table-caption {
    font-size: 16px;
    justify-content: center;
  }
  .fan-table-caption > span:last-child {
    display: none;
  }
  .card-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .card-dialog-header {
    min-height: 62px;
    margin-inline: 16px;
    gap: 8px;
  }
  .card-dialog-header > p {
    font-size: 12px;
  }
  .card-dialog-header > p span {
    display: none;
  }
  .card-dialog-controls {
    gap: 5px;
  }
  .card-dialog-controls button {
    width: 36px;
    height: 40px;
    font-size: 18px;
  }
  .card-dialog-controls [data-close-card] {
    margin-left: 3px;
  }
  .card-dialog-body {
    max-height: calc(100dvh - 89px);
    padding: 20px;
  }
  .card-dialog .card-explorer {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .card-dialog .card-display {
    width: 100%;
    min-height: 350px;
    flex-shrink: 0;
  }
  .card-dialog .playing-card {
    width: 200px;
  }
  .card-dialog .card-details {
    padding: 0 0 8px;
    width: 100%;
  }
  .card-dialog .card-details > h3 {
    font-size: 26px;
  }
  .card-dialog .card-description {
    font-size: 13px;
  }
  .card-dialog .card-consequence {
    margin-top: 20px;
  }
}
@media (max-width: 370px) {
  .card-fan {
    --fan-step: 26px;
    --card-width: 104px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-fan .card-choice > .fan-face {
    transition: none;
  }
  .card-fan .card-choice:hover .fan-face,
  .card-fan .card-choice:focus-visible .fan-face {
    transform: none;
    box-shadow: 0 0 0 3px var(--yellow);
  }
  .card-fan .card-choice[aria-pressed="true"] .fan-face {
    transform: none;
  }
  .card-dialog::backdrop {
    backdrop-filter: none;
  }
}
