html:has(body.play-page),
body.play-page {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.play-page {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.08), transparent 42%),
    #070705;
}

.play-page body,
body.play-page {
  min-height: 100svh;
}

.play-app {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
  height: 100svh;
  display: flex;
  flex-direction: column;
  color: #ece8e1;
  overflow: hidden;
}

.play-app.is-busy .play-lobby,
.play-app.is-busy .play-table,
.play-app.is-busy .play-sheet {
  pointer-events: none;
}

.play-app.is-busy .play-decks,
.play-app.is-busy .play-board-col,
.play-app.is-busy .play-hand-wrap,
.play-app.is-busy .play-center {
  opacity: 0.38;
}

.play-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem 0.45rem;
}

.play-brand {
  color: #fff;
  text-decoration: none;
  line-height: 0;
}

.play-logo img {
  display: block;
  width: 7.25rem;
  height: auto;
}

.play-new {
  font-family: Inter, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 232, 225, 0.75);
  text-decoration: none;
}

.play-new:hover,
.play-new:focus-visible {
  color: #fff;
}

.play-bar {
  position: relative;
  z-index: 6;
}

.play-bar-end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(232, 200, 114, 0.3);
  border-radius: 50%;
  background: rgba(10, 9, 7, 0.55);
  color: rgba(236, 232, 225, 0.8);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.play-mute:hover,
.play-mute:focus-visible {
  color: #e8c872;
  border-color: #e8c872;
  outline: none;
}

.play-mute svg {
  width: 1.05rem;
  height: 1.05rem;
}

.play-mute .play-mute-off,
.play-mute.is-muted .play-mute-on {
  display: none;
}

.play-mute.is-muted .play-mute-off {
  display: block;
}

.play-mute.is-muted {
  color: rgba(183, 177, 166, 0.6);
}

.play-app.is-intro .play-brand,
.play-app.is-intro .play-new {
  visibility: hidden;
}

.play-intro {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #050505;
  text-align: center;
  transition: opacity 600ms ease, scale 600ms ease;
}

.play-intro[hidden] {
  display: none;
}

.play-intro.is-leaving {
  opacity: 0;
  scale: 1.04;
  pointer-events: none;
}

.play-intro-art {
  position: absolute;
  inset: -4%;
  background: url("/img/hero-leviathan.webp") center 35% / cover no-repeat;
  filter: brightness(0.5) saturate(1.1);
  animation: play-intro-drift 24s ease-in-out infinite alternate;
}

.play-intro-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.55) 58%, #050505 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.65) 0%, rgba(5, 5, 5, 0) 30%, rgba(5, 5, 5, 0) 62%, #050505 100%);
}

.play-intro-embers span {
  position: absolute;
  bottom: -2vh;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #f4c76a;
  box-shadow: 0 0 8px 2px rgba(244, 170, 70, 0.7);
  opacity: 0;
  animation: play-intro-ember var(--d) linear infinite;
  animation-delay: var(--w);
}

.play-intro-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(40rem, calc(100% - 2.5rem));
}

.play-intro-kicker {
  margin-bottom: 1rem;
  letter-spacing: 0.32em;
  animation: play-intro-in 1s ease 0.2s both;
}

.play-intro-title {
  margin: 0;
  line-height: 0;
  animation: play-intro-logo 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.play-intro-logo img {
  display: block;
  width: min(34rem, 82vw);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(232, 200, 114, 0.28)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
}

.play-intro-lead {
  max-width: 30rem;
  margin: 1.4rem 0 2.2rem;
  color: rgba(236, 232, 225, 0.78);
  font-size: 1rem;
  line-height: 1.6;
  animation: play-intro-in 1s ease 0.7s both;
}

.play-intro-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: play-intro-in 1s ease 1.05s both;
}

.play-intro-start {
  min-width: 15rem;
  padding: 0.95rem 2.6rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0d48a, #c9a227);
  color: #14110a;
  font-family: Cinzel, serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 236, 180, 0.35), 0 12px 32px rgba(201, 162, 39, 0.35);
  animation: play-intro-glow 2.8s ease-in-out 2s infinite;
  transition: transform 150ms ease, filter 150ms ease;
}

.play-intro-start:hover,
.play-intro-start:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-2px);
  outline: none;
}

.play-intro-start:active {
  transform: scale(0.97);
}

.play-intro-link {
  color: rgba(236, 232, 225, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.play-intro-link:hover,
.play-intro-link:focus-visible {
  color: #e8c872;
}

.play-intro-foot {
  position: absolute;
  bottom: 1.2rem;
  margin: 0;
  color: rgba(183, 177, 166, 0.45);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@keyframes play-intro-drift {
  0% { transform: scale(1.02) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1.5%, -1%); }
}

@keyframes play-intro-ember {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: 0.9; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translate(3vw, -95vh); }
}

@keyframes play-intro-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes play-intro-logo {
  0% { opacity: 0; transform: scale(0.92); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: none; }
}

@keyframes play-intro-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 236, 180, 0.35), 0 12px 32px rgba(201, 162, 39, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(255, 236, 180, 0.55), 0 12px 44px rgba(232, 200, 114, 0.6); }
}


.play-lobby {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.2rem 1.25rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.55) transparent;
}

.play-kicker,
.play-step {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: #c9a227;
}

.play-steps {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0.95rem;
  padding: 0;
  list-style: none;
}

.play-steps li {
  min-width: 3.4rem;
  padding: 0.2rem 0.35rem 0.28rem;
  border-bottom: 2px solid rgba(232, 200, 114, 0.18);
  color: rgba(183, 177, 166, 0.45);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-steps .is-done {
  color: #b7b1a6;
  border-bottom-color: rgba(232, 200, 114, 0.45);
}

.play-steps .is-now {
  color: #e8c872;
  border-bottom-color: #e8c872;
}

.play-lobby h1,
.play-prompt {
  font-family: Cinzel, serif;
  font-weight: 600;
  line-height: 1.25;
}

.play-lobby h1 {
  margin: 0.15rem 0 0.4rem;
  font-size: 1.8rem;
}

.play-lead {
  margin: 0;
}

.play-lead,
.play-note,
.play-log {
  color: #b7b1a6;
  font-size: 0.92rem;
}

.play-decks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.play-deck {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid rgba(232, 200, 114, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #b7b1a6;
  text-align: center;
  cursor: pointer;
}

.play-deck img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.play-deck span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.play-deck:hover,
.play-deck:focus-visible {
  border-color: #e8c872;
  outline: none;
}

.play-deck[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.play-error {
  color: #e7a3a3;
}

.play-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0.85rem 0.35rem;
  flex: 1;
  min-height: 0;
}

.play-table [data-play-board] {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.play-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.play-rival-hand {
  display: none;
}

.play-hand-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 0.15rem;
}

.play-hand-kicker,
.play-hand-library {
  margin: 0;
}

.play-hand-library {
  font-size: 0.75rem;
  color: #b7b1a6;
}

.play-side.is-yours .play-meta {
  display: none;
}

.play-meta .play-kicker {
  margin: 0;
}

.play-board-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.65rem;
  overflow: auto;
}

.play-side {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 0.85rem;
}

.play-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 0;
  padding: 0.2rem 0.15rem 0.05rem;
}

.play-meta.is-yours {
  justify-content: center;
}

.play-backs {
  display: flex;
  align-items: flex-end;
  height: 1.85rem;
  margin-right: 0.15rem;
}

.play-back {
  width: 1.15rem;
  height: 1.7rem;
  margin-right: -0.55rem;
  border-radius: 3px;
  border: 1px solid rgba(232, 200, 114, 0.45);
  background: #1a140c center / calc(100% * 828 / 728) calc(100% * 1122 / 1022) no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.play-count,
.play-pile {
  font-size: 0.75rem;
  color: #b7b1a6;
}

.play-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.35rem;
  width: 100%;
}

.play-slot,
.play-card {
  --slot-h: clamp(3.85rem, calc((100svh - 37.625rem) / 4), 5.5rem);
  flex: 0 1 auto;
  width: calc(var(--slot-h) * 728 / 1022);
  max-width: calc(var(--slot-h) * 728 / 1022);
  min-width: 0;
  height: var(--slot-h);
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  position: relative;
}

.play-slot {
  border: 1px dashed rgba(232, 200, 114, 0.22);
  color: rgba(183, 177, 166, 0.7);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.3rem;
}

.play-card {
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  cursor: pointer;
  color: #fff;
}

.play-card-face {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.play-slot.is-held {
  border-style: dotted;
  border-color: rgba(232, 200, 114, 0.12);
  color: rgba(183, 177, 166, 0.42);
}

.play-behind {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.play-behind-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  z-index: calc(5 - var(--step));
  transform: translate(calc(var(--step) * 0.16rem), calc(var(--step) * -0.12rem)) rotate(calc(var(--step) * -1.4deg));
  transform-origin: 70% 92%;
  box-shadow: 0 0 0 1px rgba(232, 200, 114, 0.4), 0 4px 8px rgba(0, 0, 0, 0.45);
}

.play-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.play-face,
.play-sheet-art {
  position: absolute;
  left: calc(100% * -50 / 728);
  top: calc(100% * -50 / 1022);
  width: calc(100% * 828 / 728);
  height: calc(100% * 1122 / 1022);
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

.play-hand-card:not(.is-ready)::after,
.play-card-face:not(.is-ready)::after,
.play-sheet-frame:not(.is-ready)::after,
.play-sheet-fuel:not(.is-ready)::after,
.play-strike-face:not(.is-ready)::after,
.play-reel-card:not(.is-ready)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 4;
  width: 1.05rem;
  height: 1.05rem;
  margin: -0.52rem 0 0 -0.52rem;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 200, 114, 0.22);
  border-top-color: #e8c872;
  animation: play-spin 0.7s linear infinite;
  pointer-events: none;
}

.play-card-hp {
  position: absolute;
  left: 50%;
  bottom: 0.16rem;
  transform: translateX(-50%);
  padding: 0.16rem 0.42rem 0.18rem;
  border-radius: 0.32rem;
  background: #000;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.play-card-charge {
  position: absolute;
  left: 50%;
  top: 0.18rem;
  z-index: 2;
  transform: translateX(-50%);
  padding: 0.14rem 0.38rem;
  border: 1px solid rgba(232, 200, 114, 0.55);
  border-radius: 0.32rem;
  background: rgba(0, 0, 0, 0.82);
  color: #e8c872;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.play-card-charge.is-ready {
  background: #e8c872;
  color: #16130e;
  box-shadow: 0 0 10px rgba(232, 200, 114, 0.75);
  animation: play-charged 1.6s ease-in-out infinite;
}

@keyframes play-charged {
  50% { box-shadow: 0 0 3px rgba(232, 200, 114, 0.3); }
}

.play-sheet-charge {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  border: 2px solid #e8c872;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232, 200, 114, 0.6), inset 0 0 10px rgba(232, 200, 114, 0.5);
}

.play-card-hp.is-fresh {
  color: #e8c872;
  animation: play-hp 0.7s ease;
}

@keyframes play-hp {
  0% { transform: translateX(-50%) scale(1.2); }
  100% { transform: translateX(-50%) scale(1); }
}

.play-card-face:has(.play-card-hp) .play-pips {
  bottom: 1.35rem;
}

.play-pips {
  position: absolute;
  left: 0.1rem;
  right: 0.1rem;
  bottom: 0.12rem;
  display: flex;
  gap: 0.12rem;
  justify-content: center;
}

.play-pip {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1a140c center/cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.play-cost i {
  width: 0.72rem;
  height: 0.72rem;
  display: block;
  background: center/cover no-repeat;
  border-radius: 50%;
}

.play-center {
  flex-shrink: 0;
  margin: 0;
  padding: 0.85rem 0.45rem 0.7rem;
  border-top: 1px solid rgba(232, 200, 114, 0.2);
  border-bottom: 1px solid rgba(232, 200, 114, 0.2);
  text-align: center;
}

.play-prompt {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.play-actions {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.play-actions button,
.play-sheet-actions button {
  font: inherit;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.play-actions .is-primary,
.play-sheet-actions .is-primary {
  border: 0;
  color: #14110a;
  background: linear-gradient(180deg, #e8c872, #c9a227);
}

.play-actions .is-quiet,
.play-sheet-actions .is-quiet {
  border: 1px solid rgba(232, 200, 114, 0.35);
  color: #ece8e1;
  background: transparent;
}

.play-log {
  height: 5rem;
  margin: 0.9rem 0 0;
  padding: 0.15rem 0.35rem 0.15rem;
  list-style: none;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.45;
  overflow: auto;
}

.play-log li + li {
  margin-top: 0.15rem;
}

.play-center > .play-log {
  display: none;
}

.play-history {
  display: block;
  margin-top: 0.9rem;
}

.play-history:not([open])::details-content,
.play-history:not([open]) > .play-log {
  display: none;
}

.play-history summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: #b7b1a6;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  list-style: none;
}

.play-history summary:hover,
.play-history summary:focus-visible {
  color: #e8c872;
}

.play-history summary::-webkit-details-marker {
  display: none;
}

.play-history summary::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.play-history[open] summary::before {
  transform: rotate(45deg) translateY(-1px);
}

.play-history .play-log {
  height: auto;
  max-height: min(46vh, 20rem);
  margin-top: 0.45rem;
  padding: 0.15rem 0.2rem 0.35rem;
  border: 0;
  background: none;
}

.play-history .play-log.is-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 1.75rem), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 1.75rem), transparent 100%);
}

.play-hand-wrap {
  flex-shrink: 0;
  padding-top: 0.35rem;
  background: linear-gradient(180deg, rgba(7, 7, 5, 0), #070705 18%);
}

.play-hand {
  position: relative;
  display: flex;
  justify-content: safe center;
  align-items: flex-end;
  min-height: 7.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: none;
  touch-action: pan-x;
  scrollbar-width: none;
  padding: 1.1rem 1.5rem 0.3rem;
}

.play-hand::-webkit-scrollbar {
  display: none;
}

.play-hand.is-more-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
}

.play-hand.is-more-left {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem);
  mask-image: linear-gradient(90deg, transparent, #000 3rem);
}

.play-hand.is-more-left.is-more-right {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
}

.play-hand.is-dragging .play-hand-card {
  cursor: grabbing;
}

.play-hand-card {
  width: 4.4rem;
  height: calc(4.4rem * 1022 / 728);
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  flex: 0 0 auto;
  margin: 0 0 0 calc(var(--hand-overlap, 1.7rem) * -1);
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #111;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt)) translateY(0);
  transform-origin: 50% 120%;
  cursor: pointer;
  position: relative;
  z-index: var(--z, 0);
}

.play-hand-card:first-child {
  margin-left: 0;
}

.play-hand-card.is-lifted,
.play-hand-card:focus-visible {
  transform: rotate(0deg) translateY(-0.8rem) scale(1.05);
  z-index: 100;
  outline: 1px solid #e8c872;
}

.play-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.play-sheet[hidden],
.play-lobby[hidden],
.play-table[hidden],
.play-tip[hidden],
.play-error[hidden] {
  display: none;
}

.play-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  animation: play-sheet-fade 0.28s ease;
}

.play-sheet.is-fit .play-sheet-panel {
  height: auto;
}

.play-sheet.is-fit .play-sheet-body {
  height: auto;
  overflow: visible;
}

.play-sheet-panel {
  position: relative;
  width: min(440px, 100%);
  height: auto;
  max-height: min(92svh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #12110e;
  border-radius: 18px 18px 0 0;
  padding: 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  animation: play-sheet-up 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes play-sheet-up {
  from {
    transform: translateY(110%);
  }
}

@keyframes play-sheet-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-sheet-panel,
  .play-sheet-backdrop,
  .play-intro-art,
  .play-intro-embers span,
  .play-intro-start {
    animation: none;
  }
}

.play-sheet-close {
  flex-shrink: 0;
  align-self: flex-end;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0.45rem 0.7rem 0.15rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #e8c872;
  cursor: pointer;
  padding: 0;
}

.play-sheet-close svg,
.play-sheet-more svg {
  width: 1.35rem;
  height: 1.35rem;
}

.play-sheet-scroll {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.play-sheet-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: auto;
  padding: 0 1rem 1.4rem;
}

.play-sheet-more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.05rem;
  height: 3.2rem;
  padding-bottom: 0.25rem;
  background: linear-gradient(transparent, #12110e 62%);
  color: #e8c872;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.play-sheet-more[hidden] {
  display: none;
}

.play-sheet-more svg {
  animation: play-bob 1.1s ease-in-out infinite;
}

.play-sheet-dock {
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  max-height: 42%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(232, 200, 114, 0.22);
  background: #16140f;
}

.play-sheet-dock[hidden] {
  display: none;
}

.play-sheet-copy {
  width: min(340px, 100%);
  margin: 0 auto;
}

.play-sheet-fan {
  position: relative;
  margin: 0 auto 0.35rem;
}

.play-sheet-fan.has-fuel {
  position: relative;
  width: min(220px, 68%);
  height: auto;
  margin: 0.15rem auto 0;
  padding: 0.75rem 0 2.1rem;
}

.play-sheet-frame {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 728 / 1022;
  overflow: hidden;
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  margin: 0 auto 0.85rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.play-sheet-fan.has-fuel .play-sheet-frame {
  position: relative;
  z-index: 5;
  width: 100%;
  margin: 0;
  transform: none;
}

.play-sheet-fuel {
  position: absolute;
  top: 0.75rem;
  right: 0;
  bottom: 2.1rem;
  left: 0;
  width: auto;
  height: auto;
  overflow: hidden;
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 78%;
  transform: translateY(calc(var(--lift, 0) * -1)) rotate(var(--tilt, 0deg));
}

.play-sheet-attached {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0.45rem;
  color: #e8c872;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.play-sheet h2 {
  font-family: Cinzel, serif;
  font-size: 1.35rem;
  margin: 0;
}

.play-sheet-status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(232, 200, 114, 0.28);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
}

.play-sheet-status img {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  object-fit: contain;
}

.play-sheet-status span {
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.play-sheet-status strong {
  color: #e8c872;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play-inline {
  white-space: nowrap;
}

.play-inline-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.22em;
  vertical-align: -0.2em;
  background: center/contain no-repeat;
}

.play-sheet-type .play-inline-icon,
.play-ability h3 .play-inline-icon {
  width: 1.35em;
  height: 1.35em;
  vertical-align: -0.32em;
}

.play-sheet-type,
.play-ability h3 {
  margin: 0.15rem 0 0;
  color: #c9a227;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-ability {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(232, 200, 114, 0.16);
}

.play-ability p,
.play-sheet-note {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.play-cost {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.play-sheet .play-cost {
  gap: 0.3rem;
}

.play-sheet .play-cost i {
  width: calc(0.92rem * 1.15);
  height: calc(0.92rem * 1.15);
}

.play-pay {
  margin-top: 0.9rem;
  min-width: 0;
}

.play-pay p {
  margin: 0 0 0.5rem;
  color: #b7b1a6;
  font-size: 0.85rem;
  line-height: 1.4;
}

.play-pay-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding: 0.15rem 0.1rem 0.55rem;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 200, 114, 0.7) transparent;
}

.play-pay-row::-webkit-scrollbar {
  height: 0.45rem;
}

.play-pay-row::-webkit-scrollbar-track {
  background: rgba(232, 200, 114, 0.12);
  border-radius: 99px;
}

.play-pay-row::-webkit-scrollbar-thumb {
  background: rgba(232, 200, 114, 0.7);
  border-radius: 99px;
}

.play-pay-row.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.play-pay-card {
  position: relative;
  flex: 0 0 3.45rem;
  width: 3.45rem;
  height: calc(3.45rem * 1022 / 728);
  padding: 0;
  border: 2px solid transparent;
  border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
  overflow: hidden;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.play-pay-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.15rem 0.1rem 0.2rem;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.58rem;
  line-height: 1.15;
  text-align: center;
}

.play-pay-card.is-selected {
  border-color: #e8c872;
  box-shadow: 0 0 0 1px #e8c872;
}

.play-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.play-sheet-actions button {
  text-align: left;
}

.play-sheet-actions button:disabled {
  opacity: 0.45;
  cursor: default;
  filter: grayscale(0.35);
}

.play-strike-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.play-strike-group + .play-strike-group {
  margin-top: 0.35rem;
}

.play-strike-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.15rem 0.15rem 0;
  color: #e8c872;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-strike-head b {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.play-strike-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0.1rem 0.05rem 0.55rem;
}

.play-strike-row::-webkit-scrollbar {
  height: 0.28rem;
}

.play-strike-row::-webkit-scrollbar-track {
  background: rgba(232, 200, 114, 0.12);
  border-radius: 99px;
}

.play-strike-row::-webkit-scrollbar-thumb {
  background: rgba(232, 200, 114, 0.55);
  border-radius: 99px;
}

.play-actions .play-strike-group {
  flex: 1 0 100%;
  min-width: 0;
  text-align: left;
}

button.play-strike {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 5.6rem;
  width: 5.6rem;
  gap: 0.28rem;
  margin: 0;
  padding: 0.28rem 0.28rem 0.38rem;
  border: 1px solid rgba(232, 200, 114, 0.32);
  border-radius: 0.7rem;
  background: #14110c;
  color: #fff;
  text-align: center;
}

button.play-strike:hover,
button.play-strike:focus-visible {
  border-color: #e8c872;
  background: #1c1812;
}

.play-strike-face {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 728 / 1022;
  overflow: hidden;
  border-radius: 0.4rem;
  background: #111;
}

.play-strike-face:not(.is-ready)::after {
  width: 0.7rem;
  height: 0.7rem;
  margin: -0.35rem 0 0 -0.35rem;
}

.play-strike-name {
  flex: none;
  min-width: 0;
  max-height: 2.3em;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.15;
  text-align: center;
}

.play-strike-hp {
  position: absolute;
  left: 50%;
  bottom: 0.18rem;
  transform: translateX(-50%);
  padding: 0.12rem 0.32rem 0.14rem;
  border-radius: 0.32rem;
  background: #000;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.play-strike.is-lethal .play-strike-hp {
  color: #e8c872;
}

.play-hold {
  margin: 0.35rem 0 0;
  color: #b7b1a6;
  font-size: 0.88rem;
  line-height: 1.4;
}

.play-tip {
  position: fixed;
  z-index: 40;
  max-width: 14rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #1c1914;
  border: 1px solid rgba(232, 200, 114, 0.4);
  color: #ece8e1;
  font-size: 0.78rem;
  pointer-events: none;
}

.play-tip strong {
  display: block;
  font-family: Cinzel, serif;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.play-end {
  position: absolute;
  z-index: 46;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom));
  overflow: auto;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(232, 200, 114, 0.32), transparent 58%),
    #070705;
}

.play-end[hidden] {
  display: none;
}

.play-end-card {
  width: min(22rem, 100%);
  animation: play-rise 0.45s ease;
}

.play-end h2 {
  margin: 0.2rem 0 0.45rem;
  font-family: Cinzel, serif;
  font-size: clamp(2.7rem, 13vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-transform: uppercase;
  color: #ece8e1;
}

.play-end.is-win h2 {
  color: #e8c872;
  text-shadow: 0 0 28px rgba(232, 200, 114, 0.45);
}

.play-end-lead {
  margin: 0 auto;
  max-width: 16rem;
  font-size: 1.05rem;
  line-height: 1.4;
  color: #ece8e1;
}

.play-end-again {
  display: inline-block;
  margin-top: 1.15rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8c872, #c9a227);
  color: #14110a;
  font-family: Cinzel, serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.play-end-market {
  margin-top: 1.6rem;
  padding: 0.9rem 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 200, 114, 0.28);
  background: #12110e;
  text-align: left;
}

.play-end-market h3 {
  margin: 0.25rem 0 0.35rem;
  font-family: Cinzel, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #e8c872;
}

.play-end-market p:last-of-type {
  margin: 0;
  color: #d9d3c8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.play-end-market a {
  display: block;
  margin-top: 0.95rem;
  padding: 0.65rem 1.2rem;
  border: 1px solid #e8c872;
  border-radius: 999px;
  background: rgba(232, 200, 114, 0.1);
  color: #e8c872;
  font-family: Cinzel, serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.play-end-market a:hover,
.play-end-market a:focus-visible {
  background: #e8c872;
  color: #14110a;
}

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

.play-wait {
  position: absolute;
  z-index: 25;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(18rem, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  pointer-events: none;
}

.play-wait[hidden] {
  display: none;
}

.play-wait p {
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1.05rem;
  line-height: 1.35;
}

.play-wait-spin {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 2px solid rgba(232, 200, 114, 0.25);
  border-top-color: #e8c872;
  animation: play-spin 0.7s linear infinite;
}

.play-deck,
.play-actions button,
.play-sheet-actions button,
.play-card,
.play-hand-card,
.play-sheet-close {
  transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
}

.play-deck:active,
.play-actions button:active,
.play-sheet-actions button:active,
.play-card:active,
.play-sheet-close:active {
  transform: scale(0.96);
}

.play-hand-card:active {
  transform: rotate(0deg) translateY(-0.4rem) scale(0.96);
}

.play-hand .play-hand-card {
  transition: transform 220ms cubic-bezier(0.2, 1.3, 0.4, 1), opacity 120ms ease, filter 160ms ease, box-shadow 220ms ease;
}

.play-hand .play-hand-card.is-lifted {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.6);
}

.play-deck.is-pressed,
.play-actions button.is-pressed,
.play-sheet-actions button.is-pressed {
  filter: brightness(1.15);
}

.play-card.is-dim,
.play-hand-card.is-dim {
  filter: grayscale(0.76) brightness(0.66);
}

.play-card.is-dim:hover,
.play-card.is-dim:focus-visible,
.play-hand-card.is-dim.is-lifted,
.play-hand-card.is-dim:focus-visible {
  filter: grayscale(0.2) brightness(0.92);
}

.play-rival-hand.is-dim .play-rival-card {
  filter: grayscale(0.76) brightness(0.66);
}

.play-card.is-lunging,
.play-card.is-struck {
  z-index: 6;
  transition: none;
  overflow: visible;
}

.play-card.is-lunging {
  animation: play-lunge 0.62s ease;
}

.play-card.is-struck {
  animation: play-shake 0.42s linear;
}

.play-card.is-landing {
  z-index: 6;
  animation: play-land 0.52s cubic-bezier(0.2, 1.1, 0.35, 1) both;
}

.play-card.is-breaking {
  z-index: 6;
  pointer-events: none;
  animation: play-break 0.6s ease-in forwards;
}

.play-card.is-fueled .play-card-face {
  animation: play-fueled 0.56s ease;
}

.play-card.is-fueled .play-behind-card:last-child {
  animation: play-tuck 0.5s cubic-bezier(0.2, 1.1, 0.35, 1) both;
}

.play-pip.is-fresh {
  animation: play-pip 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.play-hand-card.is-drawn {
  animation: play-draw 0.46s cubic-bezier(0.2, 1, 0.35, 1) both;
  animation-delay: var(--draw-delay, 0ms);
}

@keyframes play-land {
  0% { opacity: 0; translate: 0 -1.1rem; scale: 1.14; }
  60% { opacity: 1; translate: 0 0.12rem; scale: 0.98; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes play-break {
  0% { opacity: 1; scale: 1; filter: brightness(1); }
  25% { opacity: 1; scale: 1.05; filter: brightness(1.9) saturate(0.4); }
  100% { opacity: 0; scale: 0.82; filter: brightness(0.6) grayscale(1); }
}

@keyframes play-fueled {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(1.45) drop-shadow(0 0 10px rgba(232, 200, 114, 0.75)); }
}

@keyframes play-tuck {
  0% { opacity: 0; translate: 0 -1.2rem; }
  100% { opacity: 1; translate: 0 0; }
}

@keyframes play-pip {
  0% { opacity: 0; scale: 1.8; }
  100% { opacity: 1; scale: 1; }
}

@keyframes play-draw {
  0% { opacity: 0; translate: 0 2.2rem; }
  100% { opacity: 1; translate: 0 0; }
}

.play-hit {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.play-hit-spark {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 160%;
  height: 22%;
  transform: translate(-50%, -50%) rotate(-16deg);
  background: linear-gradient(90deg, transparent, #fff 42%, #fff 58%, transparent);
  mix-blend-mode: screen;
  animation: play-spark 0.32s ease forwards;
}

.play-hit-element {
  --hit-x: calc(-50% + var(--hit-shift, 0%));
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  height: 78%;
  opacity: 0;
  transform: translate(var(--hit-x), -50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  animation: play-burst 0.66s ease both;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
}

.play-hit-element.is-fire {
  animation-name: play-fire;
  filter: drop-shadow(0 0 14px #ff6a1a);
}

.play-hit-element.is-water {
  animation-name: play-water;
  filter: drop-shadow(0 0 14px #3ec6ff);
}

.play-hit-element.is-lightning {
  animation-name: play-lightning;
  filter: drop-shadow(0 0 16px #fff4a8);
}

.play-hit-element.is-earth {
  animation-name: play-earth;
  filter: drop-shadow(0 0 12px #c4a15a);
}

.play-hit-element.is-wind {
  animation-name: play-wind;
  filter: drop-shadow(0 0 12px #d8fff4);
}

.play-hit-element.is-nature {
  animation-name: play-nature;
  filter: drop-shadow(0 0 12px #7dff6a);
}

.play-hit-element.is-light {
  animation-name: play-light;
  filter: drop-shadow(0 0 16px #fff);
}

.play-hit-element.is-void {
  animation-name: play-void;
  filter: drop-shadow(0 0 14px #b388ff);
}

@keyframes play-fire {
  0% { opacity: 0; transform: translate(var(--hit-x), -20%) scale(0.5); }
  35% { opacity: 1; transform: translate(var(--hit-x), -55%) scale(1.08); }
  60% { transform: translate(var(--hit-x), -60%) scale(0.96); }
  100% { opacity: 0; transform: translate(var(--hit-x), -85%) scale(1.15); }
}

@keyframes play-water {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(0.4); }
  40% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1.12, 0.9); }
  65% { transform: translate(var(--hit-x), -50%) scale(0.94, 1.06); }
  100% { opacity: 0; transform: translate(var(--hit-x), -40%) scale(1.25); }
}

@keyframes play-lightning {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(1.1); }
  12% { opacity: 1; }
  24% { opacity: 0.2; }
  36% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1); }
  50% { opacity: 0.35; }
  64% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(1.2); }
}

@keyframes play-light {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(0.3); }
  40% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(1.45); }
}

@keyframes play-earth {
  0% { opacity: 0; transform: translate(var(--hit-x), -140%) scale(0.9); }
  40% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1.06); }
  52% { transform: translate(calc(var(--hit-x) - 4%), -48%) scale(1); }
  64% { transform: translate(calc(var(--hit-x) + 4%), -50%); }
  100% { opacity: 0; transform: translate(var(--hit-x), -46%) scale(1); }
}

@keyframes play-wind {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) rotate(-120deg) scale(0.5); }
  45% { opacity: 1; transform: translate(var(--hit-x), -50%) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) rotate(140deg) scale(1.2); }
}

@keyframes play-nature {
  0% { opacity: 0; transform: translate(var(--hit-x), -30%) scale(0.2); }
  50% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(1); }
}

@keyframes play-void {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) rotate(0deg) scale(1.5); }
  45% { opacity: 1; transform: translate(var(--hit-x), -50%) rotate(-90deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) rotate(-200deg) scale(0.3); }
}

@keyframes play-stamp {
  0% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 1; transform: scale(1); }
}

.play-hit-status {
  position: absolute;
  right: -0.35rem;
  top: -0.35rem;
  width: 2rem;
  height: 2rem;
  animation: play-stamp 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

.play-reel {
  position: absolute;
  z-index: 34;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(7, 7, 5, 0.62);
  text-align: center;
}

.play-reel[hidden] {
  display: none;
}

.play-reel-panel {
  width: min(18rem, 100%);
}

.play-reel.is-on .play-reel-panel {
  animation: play-rise 0.34s ease;
}

.play-reel h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: Cinzel, serif;
  font-size: 2.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8c872;
}

.play-reel.is-pending h2 {
  animation: play-wait 1.1s ease-in-out infinite;
}

.play-reel.is-strike {
  background: linear-gradient(to bottom, rgba(7, 7, 5, 0.22) 0%, rgba(7, 7, 5, 0.78) 34%, rgba(7, 7, 5, 0.78) 66%, rgba(7, 7, 5, 0.22) 100%);
}

@keyframes play-wait {
  50% { opacity: 0.82; }
}

.play-reel-stage {
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-reel-deck {
  position: relative;
  width: 4.6rem;
  height: 3.4rem;
}

.play-reel-deck .play-back {
  position: absolute;
  left: 0.4rem;
  bottom: 0;
  width: 2.15rem;
  height: 3.05rem;
  margin: 0;
}

.play-reel-deck .play-back:nth-child(1) { transform: rotate(-10deg) translate(-6px, 2px); }
.play-reel-deck .play-back:nth-child(2) { transform: rotate(-4deg); }
.play-reel-deck .play-back:nth-child(3) { transform: rotate(3deg) translate(5px, -1px); }
.play-reel-deck .play-back:nth-child(4) { transform: rotate(8deg) translate(10px, -2px); }

.play-reel-slide {
  position: absolute;
  z-index: 2;
  left: 0.7rem;
  bottom: 0;
  width: 2.15rem;
  height: 3.05rem;
  border-radius: 4px;
  border: 1px solid rgba(232, 200, 114, 0.55);
  background: #1a140c center / calc(100% * 828 / 728) calc(100% * 1122 / 1022) no-repeat;
  animation: play-deal 0.8s ease forwards;
}

.play-reel-card {
  position: relative;
  display: block;
  width: 4.4rem;
  aspect-ratio: 728 / 1022;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  animation: play-rise 0.42s ease;
}

.play-reel-blow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.play-reel-marks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
}

.play-reel-dice {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
}

.play-reel-dice.is-solo .play-reel-die {
  width: 3.4rem;
  height: 3.4rem;
}

.play-reel-die {
  width: 2.15rem;
  height: 2.15rem;
  color: #e8c872;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.play-reel-die svg {
  width: 100%;
  height: 100%;
}

.play-reel-die.is-landed {
  animation: play-mark 0.28s ease;
}

.play-reel-element {
  width: 3.2rem;
  height: 3.2rem;
  display: block;
  background: center / contain no-repeat;
  animation: play-mark 0.28s ease;
}

.play-reel-marks .play-reel-element,
.play-reel-marks .play-reel-status {
  position: static;
  width: 1.65rem;
  height: 1.65rem;
}

.play-reel-status {
  width: 3.2rem;
  height: 3.2rem;
  display: block;
  object-fit: contain;
  animation: play-mark 0.28s ease;
}

.play-reel [data-play-reel-note] {
  margin: 0.45rem 0 0;
  min-height: 1.3rem;
  color: #ece8e1;
  font-size: 0.95rem;
}

@keyframes play-deal {
  from { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  to { transform: translate(2.4rem, -0.8rem) rotate(8deg); opacity: 0; }
}

.play-dice {
  position: absolute;
  z-index: 36;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(7, 7, 5, 0.84);
}

.play-dice-panel {
  width: min(16rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 16px;
  background: rgba(18, 17, 14, 0.96);
  border: 1px solid rgba(232, 200, 114, 0.35);
  text-align: center;
}

.play-dice[hidden] {
  display: none;
}

.play-dice p {
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1rem;
}

.play-dice-row {
  display: flex;
  gap: 1.4rem;
}

.play-die-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #b7b1a6;
  font-size: 0.75rem;
}

.play-dice-go {
  margin-top: 0.15rem;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  background: linear-gradient(180deg, #e8c872, #c9a227);
  color: #14110a;
  font-family: Cinzel, serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.play-dice-go[hidden] {
  display: none;
}

.play-die {
  width: 4.2rem;
  height: 4.2rem;
  color: #e8c872;
}

.play-die svg {
  width: 100%;
  height: 100%;
}

.play-die.is-rolling svg {
  animation: play-tumble 0.16s linear infinite;
}

@keyframes play-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes play-tumble {
  to {
    transform: rotate(360deg);
  }
}

@keyframes play-lunge {
  0% { transform: translateY(0); }
  30% { transform: translateY(calc(var(--lunge, -1.2rem) * -0.28)); }
  58% { transform: translateY(var(--lunge, -1.2rem)); }
  100% { transform: translateY(0); }
}

@keyframes play-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); filter: brightness(1.7); }
  55% { transform: translateX(5px); }
  80% { transform: translateX(-3px); }
}

@keyframes play-mark {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes play-burst {
  0% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(0.4); }
  45% { opacity: 1; transform: translate(var(--hit-x), -50%) scale(1); }
  100% { opacity: 0; transform: translate(var(--hit-x), -50%) scale(1.12); }
}


@keyframes play-spark {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scaleX(0.2); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scaleX(1); }
}

@keyframes play-flash {
  0% { opacity: 0; transform: scaleX(0.2); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes play-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@media (min-width: 768px) {
  .play-lobby {
    padding-top: 1.4rem;
  }
}

/* Midsize, both shapes: tablets, chat panels, and short laptops. */
@media (min-width: 600px) and (max-width: 1079.98px) and (min-height: 600px),
  (min-width: 1080px) and (min-height: 560px) and (max-height: 859.98px) {
  .play-bar {
    padding: 1rem 1.75rem 0.5rem;
  }

  .play-lobby {
    padding: 0.8rem 1.75rem 2.5rem;
  }

  .play-lobby h1 {
    font-size: 2.1rem;
  }

  .play-decks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .play-table {
    padding: 0.2rem 1.5rem 0.5rem;
  }

  .play-board-col {
    gap: 0.8rem;
  }

  .play-row {
    gap: 1.8rem;
  }

  .play-slot {
    font-size: 0.68rem;
  }

  .play-center {
    padding: 0.6rem 1rem 0.6rem;
  }

  .play-center .play-steps {
    margin: 0.35rem 0 0.55rem;
  }

  .play-prompt {
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
  }

  .play-history {
    margin-top: 0.55rem;
  }

  .play-actions button {
    padding: 0.55rem 1.2rem;
  }

  .play-hand-library,
  .play-count {
    font-size: 0.82rem;
  }

  .play-hand {
    min-height: 9.4rem;
    padding: 1.3rem 2rem 0.4rem;
  }

  .play-hand-card {
    width: 5.6rem;
    height: calc(5.6rem * 1022 / 728);
  }
}

/* Midsize, tall: one stacked column, scaled up to the room it has. */
@media (min-width: 600px) and (max-width: 1079.98px) and (min-height: 600px) {
  .play-app {
    width: min(920px, 100%);
  }

  .play-stage {
    position: relative;
  }

  .play-stage::before,
  .play-stage::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    background: center / cover no-repeat;
    opacity: 0.38;
  }

  .play-stage::before {
    top: 0;
    height: 46%;
    background-image: url("/img/board-rival.jpg");
    -webkit-mask-image: linear-gradient(#000 42%, transparent);
    mask-image: linear-gradient(#000 42%, transparent);
  }

  .play-stage::after {
    bottom: 0;
    height: 40%;
    background-image: url("/img/board-you.jpg");
    -webkit-mask-image: linear-gradient(transparent, #000 48%);
    mask-image: linear-gradient(transparent, #000 48%);
  }

  .play-slot,
  .play-card {
    --slot-h: clamp(5rem, min(calc((100svh - 35.5rem) / 4), calc((min(100vw, 920px) - 7rem) / 3 * 1.4)), 10.5rem);
  }
}

/* Midsize, landscape: board on the left, turn panel and hand in a column on the right. */
@media (min-width: 760px) and (max-width: 1079.98px) and (min-height: 600px) and (min-aspect-ratio: 501/400),
  (min-width: 1080px) and (min-height: 560px) and (max-height: 859.98px) {
  .play-app {
    --panel-w: clamp(20rem, 30vw, 25rem);
    width: min(1300px, 100%);
  }

  .play-stage {
    position: relative;
  }

  .play-stage::before,
  .play-stage::after {
    content: "";
    position: absolute;
    left: 0;
    right: calc(var(--panel-w) + 0.6rem);
    pointer-events: none;
    background: center / cover no-repeat;
    opacity: 0.4;
  }

  .play-stage::before {
    top: 0;
    height: 48%;
    background-image: url("/img/board-rival.jpg");
    background-position: center 20%;
    -webkit-mask-image: linear-gradient(#000 36%, transparent);
    mask-image: linear-gradient(#000 36%, transparent);
  }

  .play-stage::after {
    bottom: 0;
    height: 46%;
    background-image: url("/img/board-you.jpg");
    -webkit-mask-image: linear-gradient(transparent, #000 40%);
    mask-image: linear-gradient(transparent, #000 40%);
  }

  .play-board-col {
    justify-content: center;
    padding: 0.4rem calc(var(--panel-w) + 1rem) 0.6rem 0;
  }

  .play-slot,
  .play-card {
    --slot-h: clamp(5rem, min(calc((100svh - 11rem) / 4), calc((min(100vw, 1300px) - var(--panel-w) - 7.5rem) / 3 * 1.4)), 10.5rem);
  }

  .play-side.is-rival .play-meta {
    display: none;
  }

  .play-side.is-yours {
    padding-top: 1rem;
    border-top: 1px solid rgba(232, 200, 114, 0.18);
  }

  .play-center {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 4;
    width: var(--panel-w);
    translate: 0 -50%;
    border: 1px solid rgba(232, 200, 114, 0.42);
    border-radius: 16px;
    background: rgba(12, 11, 8, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

  .play-history .play-log {
    max-height: min(40vh, 20rem);
  }

  .play-hand-wrap {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: var(--panel-w);
    background: none;
  }

  .play-hand {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  .play-hand-card {
    width: 5.6rem;
    height: calc(5.6rem * 1022 / 728);
  }
}

/* Opponent hand fan in the top right corner: desktop and midsize landscape. */
@media (min-width: 760px) and (max-width: 1079.98px) and (min-height: 600px) and (min-aspect-ratio: 501/400),
  (min-width: 1080px) and (min-height: 560px) {
  .play-rival-hand {
    position: absolute;
    top: 0.2rem;
    right: 0.7rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-height: 0;
    padding: 0;
  }

  .play-rival-head {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
  }

  .play-rival-head .play-kicker,
  .play-rival-head .play-count {
    margin: 0;
  }

  .play-rival-fan {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    max-height: none;
    margin-top: 0;
    padding-left: 0.35rem;
  }

  .play-rival-card {
    width: 2.35rem;
    height: calc(2.35rem * 1022 / 728);
    margin-top: 0;
    margin-left: -1.15rem;
    border-radius: calc(100% * 30 / 728) / calc(100% * 30 / 1022);
    border: 1px solid rgba(232, 200, 114, 0.5);
    background: #1a140c center / calc(100% * 828 / 728) calc(100% * 1122 / 1022) no-repeat;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
    transform: rotate(calc(var(--tilt) * 0.55));
    transform-origin: 50% 130%;
  }

  .play-rival-card:first-child {
    margin-top: 0;
    margin-left: 0;
  }

  .play-rival-head .play-count {
    white-space: nowrap;
  }
}

@media (min-width: 1080px) and (min-height: 860px) {
  .play-app {
    width: min(1300px, 100%);
  }

  .play-bar {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .play-lobby {
    padding: 1.9rem 2rem 2.5rem;
  }

  .play-lobby h1 {
    font-size: 2.4rem;
  }

  .play-decks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    margin-right: 0;
    margin-left: 0;
  }

  .play-deck span {
    font-size: 0.84rem;
  }

  .play-stage {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }

  .play-stage::before,
  .play-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background: center / cover no-repeat;
    opacity: 0.34;
  }

  .play-stage::before {
    top: 0;
    right: 8%;
    left: 28%;
    height: 46%;
    background-image: url("/img/board-rival.jpg");
    background-position: center 18%;
    -webkit-mask-image: linear-gradient(#000 28%, transparent);
    mask-image: linear-gradient(#000 28%, transparent);
  }

  .play-stage::after {
    bottom: 11rem;
    left: 0;
    width: 32%;
    height: 42%;
    background-image: url("/img/board-you.jpg");
    -webkit-mask-image: linear-gradient(transparent, #000 50%);
    mask-image: linear-gradient(transparent, #000 50%);
  }

  .play-board-col {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 1.15rem;
    padding: 1rem 0 12rem;
    overflow: hidden;
  }

  .play-side.is-rival,
  .play-side.is-yours {
    width: max-content;
    max-width: 100%;
    z-index: 1;
  }

  .play-side.is-rival {
    align-self: center;
    margin-left: 0;
    transform: translateX(clamp(4.5rem, 14vw, 14rem));
  }

  .play-side.is-yours {
    align-self: center;
    margin-bottom: 0.9rem;
    transform: translateX(clamp(-17rem, -18vw, -5rem));
  }

  .play-side.is-rival .play-slot,
  .play-side.is-rival .play-card {
    --slot-h: calc(clamp(6.85rem, (100svh - 20.5rem) / 4, 11rem) * 0.82);
  }

  .play-row {
    gap: 1.7rem;
  }

  .play-side.is-rival .play-row,
  .play-side.is-yours .play-row {
    width: auto;
    justify-content: flex-start;
  }

  .play-side.is-rival .play-backs {
    display: none;
  }

  .play-side.is-yours .play-meta {
    display: none;
  }

  .play-slot,
  .play-card {
    --slot-h: clamp(6.85rem, calc((100svh - 20.5rem) / 4), 11rem);
  }

  .play-side.is-yours .play-slot,
  .play-side.is-yours .play-card {
    --slot-h: calc(clamp(6.85rem, (100svh - 20.5rem) / 4, 11rem) * 1.08);
  }

  .play-side.is-rival .play-meta {
    display: none;
  }

  .play-center {
    position: absolute;
    left: auto;
    right: 0.7rem;
    bottom: 0.4rem;
    top: auto;
    z-index: 4;
    width: clamp(26rem, 28vw, 30rem);
    padding: 0.65rem 1.35rem 0.6rem;
    transform: none;
    border: 1px solid rgba(232, 200, 114, 0.42);
    border-radius: 16px;
    background: rgba(12, 11, 8, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
  }

  .play-center .play-step,
  .play-center .play-steps,
  .play-center .play-prompt,
  .play-center .play-actions,
  .play-center .play-history {
    pointer-events: auto;
  }

  .play-center .play-steps {
    margin: 0.3rem 0 0.45rem;
  }

  .play-center .play-prompt {
    margin-bottom: 0.35rem;
    font-size: clamp(1.02rem, 1.35vw, 1.28rem);
    line-height: 1.2;
  }

  .play-history {
    margin-top: 0.45rem;
  }

  .play-history .play-log {
    max-height: min(52vh, 24rem);
  }

  .play-hand-wrap {
    position: absolute;
    left: 0.15rem;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: min(44rem, calc(100% - 28rem));
    max-height: none;
    padding: 0 0 0.2rem;
    background: none;
    pointer-events: none;
  }

  .play-hand-head {
    justify-content: flex-start;
    margin: 0 0 0.15rem 0.35rem;
  }

  .play-hand {
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 7.5rem;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.6rem 0.4rem 0.7rem 2.4rem;
    pointer-events: auto;
  }

  .play-hand-card {
    width: 6.6rem;
    height: calc(6.6rem * 1022 / 728);
    margin: 0 0 0 calc(var(--hand-overlap, 2.4rem) * -1);
    transform: rotate(var(--tilt));
    transform-origin: 50% 120%;
  }

  .play-hand-card:first-child {
    margin-top: 0;
    margin-left: 0;
  }

  .play-hand-card.is-lifted,
  .play-hand-card:focus-visible {
    transform: rotate(0deg) translateY(-0.8rem) scale(1.05);
  }

  .play-sheet,
  .play-sheet.is-fit {
    justify-content: flex-start;
    padding-left: max(0.75rem, calc((100vw - min(1300px, 100vw)) / 2 + 0.4rem));
  }

  .play-sheet-backdrop {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.5) 34%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.05) 100%);
  }
}
