:root {
  --ink: #11100e;
  --paper: #fff8e8;
  --paper-strong: #fffdf5;
  --red: #e12727;
  --red-dark: #9f1616;
  --yellow: #ffd331;
  --cyan: #17b6c7;
  --green: #1e8c4a;
  --muted: #6c6257;
  --line: #211b14;
  --shadow: 8px 8px 0 #11100e;
  --soft-shadow: 4px 4px 0 #11100e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 16, 14, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 16, 14, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 14% 22%, rgba(225, 39, 39, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 36%, rgba(23, 182, 199, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 41% 84%, rgba(17, 16, 14, 0.11) 0 1px, transparent 2px);
  background-size: 22px 26px, 31px 35px, 18px 21px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px clamp(16px, 4vw, 48px);
  border-bottom: 3px solid var(--line);
  background: rgba(255, 248, 232, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  min-width: 48px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 900;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.nav-current {
  border-color: var(--line);
  background: var(--paper-strong);
  outline: none;
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) clamp(16px, 4vw, 52px) clamp(20px, 4vw, 52px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: clamp(16px, 2.6vw, 32px);
  align-items: stretch;
  min-height: clamp(240px, 34vh, 344px);
  padding-top: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.source-line,
.panel-kicker,
.score-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--red-dark);
}

.source-line {
  width: fit-content;
  padding: 7px 9px;
  border: 2px dashed var(--red-dark);
  background: var(--paper-strong);
  transform: rotate(-1.4deg);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: Impact, "Arial Black", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(3.2rem, 7.3vw, 6.8rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 700px;
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  font-weight: 750;
  line-height: 1.35;
  color: #322b22;
}

.hero-board,
.ranking-panel,
.controls,
.trunfo-section {
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.hero-board {
  position: relative;
  display: grid;
  align-self: center;
  align-content: center;
  overflow: visible;
  min-height: 0;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 211, 49, 0.38), rgba(255, 253, 245, 0.95) 54%),
    var(--paper-strong);
}

.hero-board::before {
  content: none;
}

.mega-stat {
  display: grid;
  gap: 10px;
  margin: 0;
}

.mega-stat div {
  min-height: 76px;
  padding: 12px 13px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.mega-stat dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mega-stat dd {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  line-height: 0.95;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.score-strip article {
  min-width: 0;
  padding: 14px 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--soft-shadow);
}

.score-strip article:nth-child(2) {
  background: var(--cyan);
  color: var(--ink);
}

.score-strip article:nth-child(3) {
  background: var(--red);
  color: #fff;
}

.score-strip strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.75rem, 3vw, 3.2rem);
  line-height: 0.95;
}

.score-strip small {
  display: block;
  margin-top: 8px;
  font-weight: 900;
}

.score-strip .score-label {
  color: currentColor;
  opacity: 0.78;
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 16px;
  align-items: end;
  margin-top: 26px;
  padding: 18px;
}

.search-box,
.range-box {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.search-box span,
.range-box span {
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 42px 0 12px;
}

input:focus,
select:focus,
.segment:focus-visible,
.deal-button:focus-visible,
.skill-button:focus-visible,
.ranking-more:focus-visible {
  outline: 4px solid rgba(23, 182, 199, 0.34);
  outline-offset: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
}

.segment {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.segment.active {
  background: var(--yellow);
  color: var(--ink);
}

.duel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 30px);
  margin-top: 34px;
}

.ranking-panel {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 24px);
}

.ranking-panel.pf {
  background: linear-gradient(180deg, #fffdf5, #fff1be);
}

.ranking-panel.pj {
  background: linear-gradient(180deg, #fffdf5, #dff9ff);
}

.trunfo-section {
  margin-top: 34px;
  padding: clamp(16px, 2.5vw, 24px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(225, 39, 39, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(23, 182, 199, 0.18), transparent 38%),
    var(--paper-strong);
}

.trunfo-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.trunfo-head h2 {
  margin-top: 6px;
  font-size: clamp(1.9rem, 4vw, 4.3rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.trunfo-head p {
  max-width: 820px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.35;
}

.trunfo-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-width: 250px;
}

.trunfo-type {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
}

.deal-button {
  min-height: 48px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-weight: 950;
  text-transform: uppercase;
}

.deal-button:hover {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.trunfo-skillbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.skill-button {
  min-height: 40px;
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.skill-button.active {
  background: var(--yellow);
}

.trunfo-arena {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 28px);
  margin-top: 18px;
}

.trunfo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 211, 49, 0.42), transparent 34%),
    #fff;
  box-shadow: 6px 6px 0 var(--ink);
}

.trunfo-card::before {
  content: attr(data-card-code);
  position: absolute;
  top: 14px;
  right: -38px;
  min-width: 150px;
  padding: 5px 24px;
  border-block: 3px solid var(--line);
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 950;
  text-align: center;
  transform: rotate(18deg);
}

.trunfo-card.winner {
  background:
    linear-gradient(180deg, rgba(255, 211, 49, 0.74), transparent 38%),
    #fff;
}

.trunfo-card.loser {
  filter: saturate(0.82);
}

.trunfo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 74px;
}

.trunfo-card-top span,
.receipt-stack strong {
  color: var(--red-dark);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.trunfo-card-top strong {
  display: grid;
  min-width: 54px;
  min-height: 36px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--cyan);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.22rem;
}

.trunfo-card h3 {
  margin-top: 14px;
  padding-right: 24px;
  overflow-wrap: anywhere;
  font-family: Impact, "Arial Black", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.trunfo-doc {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
}

.trunfo-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.trunfo-stat {
  min-width: 0;
  padding: 10px;
  border: 3px solid rgba(17, 16, 14, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.trunfo-stat.active {
  border-color: var(--line);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
}

.trunfo-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.trunfo-stat strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.22rem, 2vw, 1.72rem);
  line-height: 0.98;
}

.receipt-stack {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.receipt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.receipt-pill {
  max-width: 100%;
  padding: 6px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 900;
}

.trunfo-status {
  margin-top: 18px;
  padding: 12px 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
  text-transform: uppercase;
}

.trunfo-page {
  width: min(1540px, 100%);
}

.trunfo-hero-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
  min-height: auto;
}

.trunfo-hero-page h1 {
  max-width: 960px;
}

.trunfo-console {
  display: flex;
  align-items: flex-start;
  margin-top: 26px;
  padding: 0;
}

.super-card {
  --card-accent: var(--yellow);
  --card-secondary: var(--red);
  --debt: 10%;
  position: relative;
  display: grid;
  grid-template-rows: 52px 118px minmax(144px, 1fr) 14px;
  gap: 5px;
  justify-self: center;
  width: min(100%, 300px);
  aspect-ratio: 63 / 88;
  min-height: 386px;
  max-height: none;
  overflow: hidden;
  padding: 10px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 7px 7px 0 var(--ink);
}

.super-card-pj {
  --card-accent: var(--cyan);
  --card-secondary: var(--green);
  grid-template-rows: 56px 112px minmax(176px, 1fr) 16px;
  min-height: 418px;
}

.super-card-pj .card-stat-row {
  min-height: 20px;
  padding-block: 2px;
  font-size: 0.7rem;
}

.super-card-pj .card-stat-row strong {
  font-size: 0.74rem;
}

.super-card-top {
  display: grid;
  place-items: center;
  min-width: 0;
}

.super-card-portrait {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--card-secondary) var(--debt), transparent 0),
    repeating-linear-gradient(135deg, rgba(17, 16, 14, 0.1) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #fff9d9, #e9fbff);
}

.super-card-portrait strong {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.64rem;
  line-height: 1;
  text-transform: uppercase;
}

.super-card-portrait > span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 950;
}

.trunfo-burst {
  position: absolute;
  top: 8px;
  right: -4px;
  z-index: 3;
  display: block;
  width: 104px;
  min-height: 44px;
  padding: 6px 10px 5px 20px;
  border: 3px solid var(--line);
  border-right-width: 0;
  border-radius: 4px 0 0 4px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: Impact, "Arial Black", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 0.84;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(3deg);
  transform-origin: right center;
}

.trunfo-burst::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper-strong);
  transform: translateY(-50%);
}

.trunfo-burst::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: -9px;
  width: 12px;
  height: 9px;
  background: var(--red-dark);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.trunfo-burst span {
  display: block;
}

.super-card-top h3 {
  display: -webkit-box;
  overflow: hidden;
  font-family: Impact, "Arial Black", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.16rem;
  line-height: 0.94;
  text-align: center;
  text-transform: uppercase;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.super-card-stats {
  display: grid;
  align-content: stretch;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 7px;
  background: var(--yellow);
}

.card-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 0;
  border-bottom: 2px solid rgba(17, 16, 14, 0.4);
  font-size: 0.76rem;
  line-height: 1;
  text-align: left;
}

button.card-stat-row {
  width: 100%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.card-stat-row:last-child {
  border-bottom: 0;
}

.card-stat-row.active {
  background: #fff;
}

.card-stat-row.selectable:hover,
.card-stat-row.selectable:focus-visible {
  outline: 0;
  background: #fff7b8;
  box-shadow: inset 0 0 0 2px var(--line);
}

.card-stat-row.skill-winner {
  background: var(--green);
  color: #fff;
}

.card-stat-row.skill-loser {
  background: var(--red);
  color: #fff;
}

.card-stat-row.skill-tie {
  background: var(--cyan);
  color: var(--ink);
}

.card-stat-row span {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-stat-row strong {
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.super-card-receipt {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.48rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.super-card-identifier {
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trunfo-game {
  margin-top: 28px;
  padding: clamp(16px, 2.5vw, 24px);
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 16, 14, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(225, 39, 39, 0.12), transparent 42%),
    #fffdf5;
  box-shadow: var(--shadow);
}

.game-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.game-head h2 {
  margin-top: 6px;
  font-size: clamp(1.9rem, 4vw, 4.5rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.next-button {
  display: none;
  background: var(--cyan);
  color: var(--ink);
}

.deal-button:disabled,
.skill-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.35);
  opacity: 0.62;
  transform: none;
}

.game-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.game-scoreboard span {
  min-width: 0;
  padding: 9px 10px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.game-table {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: clamp(18px, 4vw, 44px);
  align-items: start;
  justify-items: center;
  margin-top: 20px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.game-table.is-exiting {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
}

.game-round-control {
  position: absolute;
  top: 52%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}

.round-next-button {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  font-family: Impact, "Arial Black", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
}

.round-next-button:hover,
.round-next-button:focus-visible {
  outline: 0;
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.game-slot {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-width: 0;
}

.game-slot-label {
  padding: 7px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.game-super-card {
  width: min(100%, 320px);
  min-height: 414px;
}

.game-super-card.super-card-pj {
  min-height: 436px;
}

.winner-card {
  box-shadow: 9px 9px 0 var(--green);
}

.loser-card {
  filter: grayscale(0.25) saturate(0.72);
  opacity: 0.84;
}

.card-back {
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;
  place-items: center;
  gap: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 211, 49, 0.72) 0 14px, rgba(225, 39, 39, 0.82) 14px 28px),
    var(--ink);
}

.card-back::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 4px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 245, 0.9), rgba(255, 253, 245, 0.72)),
    var(--paper-strong);
}

.card-back > * {
  position: relative;
  z-index: 1;
}

.card-back-mark {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 6px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 3.2rem;
}

.card-back strong {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 2rem;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
}

.card-back span {
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.game-skillbar {
  display: none;
}

@keyframes cardEnterLeft {
  from {
    opacity: 0;
    transform: translateX(-42px) rotate(-3deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }
}

@keyframes cardEnterRight {
  from {
    opacity: 0;
    transform: translateX(42px) rotate(3deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }
}

@keyframes opponentReveal {
  0% {
    opacity: 0;
    transform: rotateY(78deg) translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: rotateY(0) translateY(0) scale(1);
  }
}

.enter-left {
  animation: cardEnterLeft 360ms cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.enter-right {
  animation: cardEnterRight 360ms cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.revealed-card {
  transform-origin: center;
  animation: opponentReveal 420ms cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

@media (prefers-reduced-motion: reduce) {
  .enter-left,
  .enter-right,
  .revealed-card,
  .game-table {
    animation: none;
    transition: none;
  }
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin-top: 6px;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.badge {
  flex: 0 0 auto;
  padding: 9px 10px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-more {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ranking-more:hover {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.ranking-more:hover .ranking-more-icon {
  transform: translateY(2px);
}

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

.ranking-more-icon {
  font-size: 1.18rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.rank-row {
  --bar: 0%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(46px, auto) minmax(0, 1fr) minmax(128px, auto);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  overflow: hidden;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rank-row::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  width: var(--bar);
  height: 10px;
  background: var(--red);
}

.pj .rank-row::before {
  background: var(--cyan);
}

.rank-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.38rem;
}

.rank-row:nth-child(1) .rank-number {
  background: var(--yellow);
  color: var(--ink);
}

.rank-row:nth-child(2) .rank-number {
  background: var(--cyan);
  color: var(--ink);
}

.rank-row:nth-child(3) .rank-number {
  background: var(--red);
}

.debtor {
  min-width: 0;
}

.debtor strong {
  display: block;
  overflow: hidden;
  font-size: clamp(0.94rem, 1.25vw, 1.08rem);
  font-weight: 950;
  line-height: 1.12;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.debtor span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount {
  justify-self: end;
  color: var(--red-dark);
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.pj .amount {
  color: #075d68;
}

.footer-notes {
  width: 100%;
  max-width: none;
  margin: 42px auto 0;
  padding: 14px 2px 0;
  border-top: 1px solid rgba(108, 98, 87, 0.28);
  background: transparent;
  color: rgba(108, 98, 87, 0.68);
  box-shadow: none;
  column-count: 1;
  column-gap: normal;
  column-rule: 0;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.55;
}

.next-steps,
.fine-print {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
}

.next-steps h2,
.next-steps strong,
.fine-print strong {
  color: rgba(108, 98, 87, 0.82);
  font-weight: 850;
}

.next-steps h2 {
  display: inline;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: uppercase;
}

.next-steps h2::after {
  content: " ";
}

.next-steps p {
  display: inline;
}

.next-steps a {
  color: rgba(108, 98, 87, 0.88);
  font-weight: 850;
  text-underline-offset: 2px;
}

.fine-print {
  display: block;
  margin-top: 10px;
}

.empty-state {
  padding: 24px;
  border: 3px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 950;
}

@media (max-width: 1080px) {
  .hero,
  .duel-grid,
  .trunfo-hero-page {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
  }

  main {
    padding: 18px;
  }

  .score-strip,
  .controls,
  .trunfo-console {
    grid-template-columns: 1fr;
  }

  .trunfo-head,
  .trunfo-arena,
  .game-head,
  .game-table {
    grid-template-columns: 1fr;
  }

  .trunfo-actions {
    min-width: 0;
  }

  .segmented {
    width: 100%;
  }

  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .game-actions {
    justify-content: stretch;
  }

  .game-actions .deal-button {
    flex: 1 1 150px;
  }

  .game-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-round-control {
    position: static;
    transform: none;
  }

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

  .footer-notes {
    column-count: 1;
    column-rule: 0;
  }

  .amount {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .debtor strong,
  .debtor span {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .trunfo-stats {
    grid-template-columns: 1fr;
  }

  .super-card {
    width: min(100%, 306px);
    min-height: 390px;
  }

  .super-card-pj {
    min-height: 422px;
  }

  h1 {
    font-size: clamp(2.6rem, 16vw, 4.6rem);
  }
}
