html:has(.df-page),
.df-page {
  overflow-x: clip;
}

.df-page {
  --df-ink: #f7fff6;
  --df-muted: #d7efe0;
  --df-felt: #1b6b45;
  --df-panel: #155a3a;
  --df-gold: #ffe08a;
  --df-red: #e85a7a;
  --df-black: #2a2438;
  --df-violet: #7c6fcd;
  --df-violet-dark: #5b4faa;
  --df-paper: #f7f4ee;
  background: #0e3d28;
  max-width: 100%;
}

.df-page .site-header,
.df-page .site-header.is-scrolled,
.df-page .site-header.is-open {
  border-bottom: 2px solid var(--foreground);
  background: color-mix(in oklch, var(--background) 90%, transparent);
  backdrop-filter: blur(12px);
}

.df-page .footer-nav a,
.df-page .site-footer p,
.df-page .footer-logo {
  color: var(--df-muted);
}

.df-skip {
  background: var(--df-gold);
  color: #1a1408;
}

.df-shell {
  padding: 5.75rem 0.6rem 3rem;
  max-width: 100%;
}

.df-layout {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  min-width: 0;
}

.df-ad {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: center;
  border: 1px dashed color-mix(in srgb, var(--df-ink) 28%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in srgb, #0a2a1c 70%, transparent);
  color: var(--df-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.df-ad-side {
  display: none;
}

.df-stage {
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #1f7a4c, #145c3a);
  border: 1px solid color-mix(in srgb, var(--df-gold) 40%, transparent);
  padding: 1.25rem 0.75rem 1.5rem;
  color: var(--df-ink);
  min-width: 0;
  font-family: system-ui, "Segoe UI", sans-serif;
}

.df-kicker {
  margin: 0;
  color: var(--df-gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.df-stage h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
}

.df-lead {
  margin: 0.6rem 0 0;
  color: var(--df-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.df-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem 0 0.2rem;
}

.df-screen[hidden],
#df-resume[hidden] {
  display: none;
}

.df-start-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.df-levels {
  display: grid;
  gap: 0.6rem;
}

.df-levels legend {
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.df-levels label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--df-ink) 16%, transparent);
  background: var(--df-panel);
  cursor: pointer;
}

.df-levels span span {
  display: block;
  margin-top: 0.15rem;
  color: var(--df-muted);
  font-size: 0.8rem;
}

.df-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.df-actions-play {
  justify-content: space-between;
  align-items: center;
}

.df-actions-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.df-dialog {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.35rem 1.25rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--df-gold) 45%, transparent);
  border-radius: 1rem;
  background: #145c3a;
  color: var(--df-ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.df-dialog::backdrop {
  background: rgba(6, 24, 16, 0.62);
}

.df-dialog h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.df-dialog p {
  margin: 0.7rem 0 1.15rem;
  color: var(--df-muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

.df-dialog-actions {
  justify-content: flex-end;
}

.df-btn {
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 0;
  background: var(--df-gold);
  color: #1a1408;
  font-weight: 800;
  cursor: pointer;
}

.df-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.df-btn-ghost {
  background: transparent;
  color: var(--df-ink);
  border: 1px solid color-mix(in srgb, var(--df-ink) 35%, transparent);
}

.df-stats {
  margin: 1.2rem 0 0;
  color: var(--df-muted);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.df-info,
.df-field-meta,
.df-msg,
.df-you-label {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.88rem;
}

.df-info {
  margin-top: 0.85rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--df-gold);
}

.df-badges {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  margin: 0 0 0.4rem;
  overflow: hidden;
}

.df-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.df-badge.is-rev {
  background: #ff7a1a;
  color: #fffdf8;
}

.df-badge.is-lock {
  background: #ffe08a;
  color: #1a1408;
}

.df-badge.is-fx {
  background: #fff8ee;
  color: #145c3a;
}

.df-msg {
  color: #ffb4b4;
  min-height: 1.4em;
}

.df-table {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.df-seat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.8rem;
  background: var(--df-panel);
  border: 1px solid transparent;
}

.df-seat-backs {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  flex: 1;
}

.df-seat-backs .df-card {
  width: 1.7rem;
  height: 2.4rem;
  margin-left: -0.85rem;
  box-shadow: 1px 1px 0 rgba(18, 12, 28, 0.35);
}

.df-seat-backs .df-card:first-child {
  margin-left: 0;
}

.df-seat.is-turn {
  border-color: var(--df-gold);
}

.df-seat.is-out {
  opacity: 0.45;
}

.df-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.df-seat-side {
  flex-direction: column;
  min-width: 0;
}

.df-field-wrap {
  min-width: 0;
  text-align: center;
}

.df-field {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 6.6rem;
  padding: 0.85rem 1.1rem;
  overflow: visible;
  border-radius: 0.8rem;
  background: #0d4a30;
  border: 2px solid color-mix(in srgb, var(--df-gold) 55%, transparent);
}

.df-field.is-stack .df-card {
  margin-left: -1.45rem;
  box-shadow: 3px 4px 0 rgba(8, 32, 22, 0.35);
}

.df-field.is-stack .df-card:first-child {
  margin-left: 0;
}

.df-hand {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 0.6rem 0;
}

.df-card {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 3.1rem;
  height: 4.4rem;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0.42rem;
  border: 1.5px solid var(--df-violet-dark);
  background: var(--df-paper);
  color: var(--df-black);
  font-family: var(--font-display), "Zen Maru Gothic", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 1px 2px 0 #1a1520;
}

.df-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid color-mix(in srgb, var(--df-violet) 42%, transparent);
  border-radius: 0.26rem;
  pointer-events: none;
  z-index: 2;
}

.df-card.is-red {
  color: var(--df-red);
}

.df-card.is-joker {
  color: var(--df-violet-dark);
  background: #f4f0fb;
}

.df-card.is-selected {
  transform: translateY(-8px);
  box-shadow: 0 0 0 2px var(--df-gold);
}

.df-card.is-back {
  background: #5b4faa url("cards/pometa-card-back.png") center / cover no-repeat;
  border-color: #4a3f96;
  color: transparent;
}

.df-card.is-back::before {
  display: none;
}

.df-card-tl,
.df-card-br {
  position: absolute;
  left: 0.18rem;
  top: 0.16rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.02rem;
  font-weight: 900;
}

.df-card-br {
  left: auto;
  right: 0.18rem;
  top: auto;
  bottom: 0.28rem;
  transform: rotate(180deg);
}

.df-rank {
  font-size: 0.7rem;
  letter-spacing: -0.03em;
}

.df-card-tl .df-pip,
.df-card-br .df-pip {
  width: 0.58rem;
  height: 0.58rem;
  display: block;
}

.df-card-suit {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
}

.df-card-suit .df-pip {
  width: 100%;
  height: 100%;
  display: block;
}

.df-card-art {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 1;
  width: 72%;
  height: 62%;
  object-fit: cover;
  object-position: center 18%;
  transform: translate(-50%, -50%);
  border-radius: 0.18rem;
  pointer-events: none;
}

.df-card.is-joker .df-card-art {
  object-position: center 28%;
}

.df-card-brand {
  position: absolute;
  left: 50%;
  bottom: 0.14rem;
  z-index: 3;
  transform: translateX(-50%);
  color: var(--df-violet);
  font-size: 0.34rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.df-card.is-back .df-card-brand,
.df-card.is-back .df-card-tl,
.df-card.is-back .df-card-br {
  display: none;
}

.df-hand .df-card {
  cursor: pointer;
}

.df-result {
  text-align: center;
}

.df-result h2 {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--font-display);
}

.df-ranks {
  list-style: none;
  margin: 0 auto 1.2rem;
  padding: 0;
  max-width: 18rem;
  text-align: left;
}

.df-ranks li {
  padding: 0.45rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--df-ink) 12%, transparent);
}

.df-seo {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  color: #f4fff8;
  min-width: 0;
}

.df-seo h2 {
  margin: 2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.df-seo p,
.df-seo li {
  color: #d5efe2;
  line-height: 1.85;
  font-size: 0.95rem;
}

@media (min-width: 960px) {
  .df-layout {
    grid-template-columns: 9.5rem minmax(0, 1fr) 9.5rem;
    align-items: start;
  }

  .df-ad-side {
    display: flex;
    min-height: 28rem;
    position: sticky;
    top: 5.5rem;
  }

  .df-ad-mobile {
    display: none;
  }

  .df-stage {
    padding: 1.75rem 1.5rem 2rem;
  }

  .df-card {
    width: 3.5rem;
    height: 5rem;
  }
}

@media (max-width: 639px) {
  .df-card {
    width: 2.55rem;
    height: 3.7rem;
    font-size: 0.64rem;
  }

  .df-card-brand {
    font-size: 0.28rem;
  }

  .df-field.is-stack .df-card {
    margin-left: -1.15rem;
  }

  .df-mid {
    grid-template-columns: 1fr;
  }

  .df-seat-side {
    flex-direction: row;
    justify-content: space-between;
  }
}
