:root {
  --bg: #0b080c;
  --panel: #151015;
  --panel-2: #1f171f;
  --ink: #f8eff6;
  --muted: #b8a6b3;
  --subtle: #6f5c6b;
  --pink: #ff5daa;
  --pink-2: #ff8ac4;
  --border: #302431;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden],
html:not([data-local-runtime="true"]) [data-local-only] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 93, 170, 0.16), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(255, 93, 170, 0.1), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f0b10;
  color: var(--ink);
}

button {
  cursor: pointer;
  padding: 0.7rem 0.85rem;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--pink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

textarea,
input,
select {
  width: 100%;
  padding: 0.75rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.35;
}

.app-shell {
  min-height: 100vh;
  padding: 1.25rem;
}

.site-topbar,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(17, 12, 18, 0.84);
  box-shadow: 0 18px 50px var(--shadow);
}

.site-topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
}

.topbar h1,
.site-topbar h1,
.panel h2,
.canvas-header h2 {
  margin: 0;
}

.topbar h1,
.site-topbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

.tab-nav {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  min-width: min(680px, 56vw);
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0f0b10;
}

.tab-nav button {
  min-height: 2.6rem;
  padding: 0.6rem 0.85rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 900;
}

.tab-nav button.active {
  color: #150812;
  background: var(--pink-2);
}

.account-panel {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 240px;
}

.account-panel[hidden] {
  display: none;
}

.account-panel span {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.account-panel > #accountStatus {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
  max-width: min(420px, 34vw);
  overflow: hidden;
  white-space: nowrap;
}

.logout-wallet-button {
  display: inline-grid;
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  min-height: 1.55rem;
  padding: 0;
  place-items: center;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.wallet-inline {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
  max-width: 100%;
  vertical-align: middle;
}

.wallet-inline-code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.wallet-label,
.wallet-prefix {
  color: inherit;
}

.wallet-short {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-copy-button {
  position: relative;
  display: inline-grid;
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  min-height: 1.25rem;
  padding: 0;
  place-items: center;
  border-radius: 6px;
  border-color: rgba(255, 255, 255, 0.22);
  color: #f8eff6;
  background: rgba(255, 255, 255, 0.07);
}

.wallet-copy-button::before,
.wallet-copy-button::after {
  content: "";
  position: absolute;
  width: 0.48rem;
  height: 0.58rem;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.wallet-copy-button::before {
  top: 0.28rem;
  left: 0.46rem;
  opacity: 0.7;
}

.wallet-copy-button::after {
  top: 0.42rem;
  left: 0.31rem;
  background: #211923;
}

.wallet-copy-button:hover {
  color: #160711;
  background: var(--pink-2);
}

.wallet-copy-button[data-copied="Copied"] {
  border-color: rgba(127, 255, 212, 0.55);
  color: #071611;
  background: #7fffd4;
}

.wallet-copy-button[data-copied="Copied"]::before {
  content: "OK";
  inset: auto;
  width: auto;
  height: auto;
  border: 0;
  font-size: 0.52rem;
  font-weight: 950;
}

.wallet-copy-button[data-copied="Copied"]::after {
  display: none;
}

.account-switcher {
  display: flex;
  gap: 0.25rem;
}

.account-switcher[hidden] {
  display: none;
}

.account-switcher button {
  min-height: 2.1rem;
  padding: 0.42rem 0.52rem;
  border-radius: 8px;
  color: #f8eff6;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 900;
}

.sign-in-button {
  border-color: transparent;
  color: #160711;
  background: var(--pink-2);
  font-weight: 900;
}

.testnet-button {
  min-height: 2.1rem;
  padding: 0.45rem 0.65rem;
  border-color: rgba(255, 138, 196, 0.34);
  border-radius: 999px;
  color: #f8eff6;
  background: rgba(255, 93, 170, 0.12);
  font-size: 0.75rem;
  font-weight: 900;
}

.testnet-button[hidden] {
  display: none;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.creator-topbar {
  position: static;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--pink-2);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.api-status {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #0d090e;
  white-space: nowrap;
}

.api-tools {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.check-button {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-2);
  white-space: nowrap;
}

.export-button {
  color: #160711;
  border-color: transparent;
  background: var(--pink-2);
  font-weight: 900;
}

.key-panel {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.api-key-form {
  display: grid;
  gap: 0.35rem;
  min-width: min(420px, 44vw);
}

.api-key-row {
  display: flex;
  gap: 0.45rem;
}

.api-key-row input {
  min-width: 0;
}

.api-key-row button {
  flex: 0 0 auto;
  color: #160711;
  background: var(--pink-2);
  border-color: transparent;
  font-weight: 800;
}

.remember-key {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.76rem;
}

.remember-key input {
  width: auto;
}

.remember-key code {
  color: var(--pink-2);
}

.api-status.ok {
  color: #111;
  background: var(--pink-2);
  border-color: var(--pink-2);
}

.api-status.missing {
  color: #ffd7e8;
  border-color: rgba(255, 93, 170, 0.45);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(420px, 1fr) minmax(300px, 380px);
  gap: 1rem;
  align-items: start;
}

.fake-poker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1.45rem;
  min-height: calc(100vh - 8rem);
}

.select-panel,
.bounties-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 16, 21, 0.9);
  box-shadow: 0 18px 50px var(--shadow);
}

.select-panel {
  --pool-card-width: clamp(124px, 9.6vw, 160px);
  --pool-shelf-height: clamp(260px, 23vw, 338px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "heading"
    "cards"
    "selected";
  gap: 1rem;
  align-items: stretch;
  min-height: 0;
  padding: 1rem;
  overflow: hidden;
}

.select-panel.signed-out {
  --pool-card-width: clamp(64px, 7vw, 82px);
  --pool-shelf-height: clamp(174px, 15.5vw, 226px);
  grid-template-areas:
    "heading"
    "cards";
}

.select-panel.signed-out .player-cards {
  grid-template-columns: repeat(5, minmax(var(--pool-card-width), var(--pool-card-width)));
  align-content: center;
  height: var(--pool-shelf-height);
  max-height: var(--pool-shelf-height);
  overflow: hidden;
}

.select-heading {
  grid-area: heading;
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 138, 196, 0.34);
}

.section-step-title {
  margin: 0;
  color: var(--pink-2);
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  letter-spacing: 0;
  line-height: 1.05;
}

.select-heading p {
  margin: 0;
  color: #e6d3df;
  line-height: 1.35;
  text-align: right;
}

.selected-hand {
  grid-area: selected;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 138, 196, 0.22);
}

.selected-hand[hidden] {
  display: none;
}

.current-hand-line {
  margin: 0;
  min-width: min(100%, 260px);
  padding: 0.56rem 0.8rem;
  border: 1px solid rgba(255, 138, 196, 0.38);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(255, 93, 170, 0.055);
  font-size: 0.84rem;
  line-height: 1.3;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.current-hand-line span {
  color: #d8c8d4;
  font-weight: 850;
}

.current-hand-line strong {
  color: #fff7fb;
  font-size: 0.92rem;
}

.player-cards {
  grid-area: cards;
}

/* Legacy aliases kept harmless while the creator and game share one CSS file. */
.select-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.selected-cards {
  display: grid;
  grid-template-columns: repeat(5, clamp(36px, 4.4vw, 54px));
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.selected-cards > .playing-card:not(.empty) {
  animation: selectedSettle 180ms ease-out both;
}

.player-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--pool-card-width), var(--pool-card-width)));
  gap: 0.8rem;
  align-content: center;
  justify-content: center;
  justify-items: center;
  min-width: 0;
  height: var(--pool-shelf-height);
  max-height: var(--pool-shelf-height);
  overflow: auto;
  padding: 0.65rem;
}

.empty-game-message {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  margin: 0 auto;
  max-width: 360px;
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(255, 93, 170, 0.44);
  border-radius: 8px;
  color: var(--pink-2);
  background:
    linear-gradient(180deg, rgba(255, 93, 170, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(255, 93, 170, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  line-height: 1.35;
  text-align: center;
}

.select-panel.signed-out .empty-game-message {
  max-width: 420px;
  padding: 0.72rem 0.9rem;
}

.inline-sign-in-link {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff7fb;
  background: transparent;
  font-weight: 950;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

button.inline-sign-in-link:hover:not(:disabled) {
  transform: none;
  color: var(--pink);
}

.playing-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 203 / 315;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #09070a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

button.playing-card {
  min-height: 118px;
}

button.playing-card:hover:not(:disabled) {
  transform: translateY(-3px);
}

button.playing-card:disabled {
  opacity: 0.38;
}

.playing-card.selected {
  border-color: var(--pink);
  box-shadow:
    0 0 0 2px rgba(255, 93, 170, 0.35),
    0 0 26px rgba(255, 93, 170, 0.24),
    0 14px 30px rgba(0, 0, 0, 0.45);
}

.player-cards > .playing-card.selected:not(.empty) {
  animation: none;
  border: 4px solid #fff;
  box-shadow:
    0 0 0 2px rgba(5, 4, 5, 0.82),
    0 0 0 7px rgba(255, 255, 255, 0.26),
    0 0 34px rgba(255, 255, 255, 0.34),
    0 16px 32px rgba(0, 0, 0, 0.52);
}

.playing-card.mini {
  min-height: 0;
  box-shadow: none;
}

.playing-card.empty {
  border-style: dashed;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 196, 0.08);
}

.playing-card img,
.card-art-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-cards > .playing-card:not(.empty) {
  animation: cardPulse 7.5s ease-in-out infinite;
}

.player-cards > .playing-card:nth-child(3n + 1) {
  animation-delay: -0.6s;
}

.player-cards > .playing-card:nth-child(3n + 2) {
  animation-delay: -1.35s;
}

.player-cards > .playing-card:nth-child(3n + 3) {
  animation-delay: -2.15s;
}

.player-cards > button.playing-card:hover:not(:disabled) {
  animation-play-state: paused;
}

@keyframes cardPulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }

  50% {
    box-shadow:
      0 10px 24px rgba(0, 0, 0, 0.35),
      0 0 18px rgba(255, 93, 170, 0.12);
  }
}

.cards52-topbar p {
  max-width: 48rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  text-align: right;
}

.cards52-shell {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 16, 21, 0.9);
  box-shadow: 0 18px 50px var(--shadow);
}

.cards52-status-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.cards52-status-card {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.cards52-status-card strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.cards52-status-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.cards52-status-card.status-spin {
  border-color: rgba(127, 255, 212, 0.28);
  background: rgba(127, 255, 212, 0.065);
}

.cards52-status-card.status-listed {
  border-color: rgba(255, 138, 196, 0.38);
  background: rgba(255, 93, 170, 0.085);
}

.cards52-status-card.status-you-own {
  border-color: rgba(255, 78, 176, 0.72);
  color: #160711;
  background:
    linear-gradient(180deg, #ff8ac4, #ff4eb0),
    var(--pink);
  box-shadow:
    0 0 0 2px rgba(255, 78, 176, 0.22),
    0 14px 28px rgba(255, 78, 176, 0.18);
}

.cards52-status-card.status-you-own span {
  color: rgba(22, 7, 17, 0.76);
}

.cards52-status-card.status-not-listed {
  border-color: rgba(255, 255, 255, 0.12);
}

.cards52-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.cards52-summary span {
  padding: 0.42rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e8dfe7;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.76rem;
  font-weight: 850;
}

.cards52-grid {
  --card-cell-width: 118px;
  display: grid;
  grid-template-columns: repeat(13, minmax(var(--card-cell-width), 1fr));
  gap: 0.55rem;
  min-width: 0;
  overflow: auto;
  padding: 0.15rem 0.15rem 0.45rem;
}

.cards52-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(2.6rem, auto);
  gap: 0.42rem;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.18);
}

.cards52-card.status-spin {
  border-color: rgba(127, 255, 212, 0.26);
}

.cards52-card.status-listed {
  border-color: rgba(255, 138, 196, 0.42);
}

.cards52-card.status-you-own {
  border-color: rgba(255, 78, 176, 0.72);
  box-shadow:
    0 0 0 2px rgba(255, 78, 176, 0.22),
    0 14px 30px rgba(255, 78, 176, 0.15);
}

.cards52-card-thumb {
  display: grid;
  width: 100%;
  aspect-ratio: 203 / 315;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #080609;
}

.cards52-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.cards52-card-thumb span {
  color: var(--pink-2);
  font-size: 1.2rem;
  font-weight: 950;
}

.cards52-card-header {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.cards52-card-header strong,
.cards52-card-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cards52-card-header strong {
  color: #fff7fb;
  font-size: 0.64rem;
  font-weight: 950;
}

.cards52-card-header span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}

.cards52-status-pill {
  display: inline-grid;
  min-height: 1.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #e8dfe7;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
}

.cards52-status-pill.status-spin {
  border-color: rgba(127, 255, 212, 0.28);
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.08);
}

.cards52-status-pill.status-listed {
  border-color: rgba(255, 138, 196, 0.38);
  color: #ffd5e8;
  background: rgba(255, 93, 170, 0.12);
}

.cards52-status-pill.status-you-own {
  border-color: rgba(255, 78, 176, 0.88);
  color: #160711;
  background: linear-gradient(180deg, #ff8ac4, #ff4eb0);
  box-shadow: 0 0 0 2px rgba(255, 78, 176, 0.2);
}

.cards52-owner {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  align-content: start;
}

.cards52-owner-label {
  color: var(--subtle);
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cards52-owner .wallet-inline {
  max-width: 100%;
  min-width: 0;
}

.cards52-owner .wallet-inline-code {
  font-size: 0.6rem;
}

.cards52-owner .wallet-copy-button {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  min-height: 1rem;
  border-radius: 4px;
}

.cards52-owner .wallet-copy-button::before,
.cards52-owner .wallet-copy-button::after {
  width: 0.38rem;
  height: 0.46rem;
}

.cards52-owner .wallet-copy-button::before {
  top: 0.22rem;
  left: 0.38rem;
}

.cards52-owner .wallet-copy-button::after {
  top: 0.34rem;
  left: 0.23rem;
}

.cards52-owner-empty {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@keyframes selectedSettle {
  from {
    opacity: 0.45;
    transform: translateY(-6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-cards > .playing-card:not(.empty),
  .selected-cards > .playing-card:not(.empty) {
    animation: none;
  }
}

.card-art-fallback {
  display: grid;
  place-items: center;
  color: var(--pink-2);
  font-size: 1.5rem;
  font-weight: 900;
}

.rank-badge,
.suit-badge {
  position: absolute;
  display: grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.rank-badge {
  top: 0.3rem;
  left: 0.3rem;
  color: #11080f;
  background: var(--pink-2);
}

.suit-badge {
  right: 0.3rem;
  bottom: 0.3rem;
}

.suit-red {
  color: #2a0614;
  background: #ff91bd;
}

.suit-black {
  color: #f8eff6;
  background: #171217;
}

.card-label {
  position: absolute;
  right: 0.25rem;
  bottom: 2rem;
  left: 0.25rem;
  padding: 0.18rem 0.25rem;
  overflow: hidden;
  border-radius: 5px;
  color: #fff;
  background: rgba(5, 4, 5, 0.72);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#gameTab .rank-badge,
#gameTab .suit-badge,
#gameTab .card-label {
  display: none;
}

.playing-card.mini .card-label {
  display: none;
}

.playing-card.mini .rank-badge,
.playing-card.mini .suit-badge {
  min-width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  font-size: 0.58rem;
}

.playing-card.mini .rank-badge {
  top: 0.18rem;
  left: 0.18rem;
}

.playing-card.mini .suit-badge {
  right: 0.18rem;
  bottom: 0.18rem;
}

.empty-slot-text {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bounties-section {
  position: relative;
  min-height: 0;
  padding: 1rem;
  border-top-color: rgba(255, 138, 196, 0.7);
  overflow: auto;
}

.bounties-section::before {
  content: "";
  position: absolute;
  top: -0.75rem;
  right: 1rem;
  left: 1rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 196, 0.9), transparent);
}

.bounties-heading {
  display: block;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 138, 196, 0.34);
}

.bounty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-height: calc(75vh - 5.5rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.bounty-grid.single-bounty {
  grid-template-columns: minmax(0, min(920px, 100%));
  justify-content: start;
}

.bounty-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(190px, 0.9fr);
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 138, 196, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(38, 28, 38, 0.98), rgba(20, 15, 21, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.38);
}

.bounty-card.eligible {
  border-color: var(--pink);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 93, 170, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(55, 30, 47, 0.98), rgba(22, 12, 20, 0.98));
  box-shadow:
    0 0 0 3px rgba(255, 93, 170, 0.72),
    0 0 0 7px rgba(255, 93, 170, 0.16),
    0 0 44px rgba(255, 93, 170, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bounty-card.eligible::after {
  content: "ELIGIBLE";
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 1;
  padding: 0.32rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: #190610;
  background: var(--pink-2);
  box-shadow: 0 0 20px rgba(255, 93, 170, 0.72);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.bounty-card.collected {
  opacity: 0.68;
  filter: saturate(0.72);
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(31, 28, 31, 0.95), rgba(15, 14, 16, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.bounty-card.collected::after {
  content: "COLLECTED";
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 1;
  padding: 0.32rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #e5dce4;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.bounty-card.collected .bounty-hand-side {
  background: rgba(255, 255, 255, 0.025);
}

.bounty-card.collected .bounty-prize-side {
  border-left-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

.bounty-hand-side,
.bounty-prize-side {
  display: grid;
  min-width: 0;
}

.bounty-hand-side {
  gap: 0.72rem;
  align-content: center;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
}

.bounty-prize-side {
  gap: 0.75rem;
  align-content: center;
  padding: 0.85rem;
  border-left: 1px solid rgba(255, 138, 196, 0.42);
  background: rgba(255, 138, 196, 0.1);
}

.bounty-card.eligible .bounty-hand-side {
  background: rgba(255, 93, 170, 0.09);
}

.bounty-card.eligible .bounty-prize-side {
  background: rgba(255, 93, 170, 0.18);
}

.bounty-label {
  width: fit-content;
  padding: 0.24rem 0.4rem;
  border: 1px solid rgba(127, 255, 212, 0.24);
  border-radius: 6px;
  color: #aefced;
  background: rgba(127, 255, 212, 0.07);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.bounty-label.prize {
  border-color: rgba(255, 138, 196, 0.3);
  color: var(--pink-2);
  background: rgba(255, 93, 170, 0.08);
}

.bounty-label.collected-status {
  border-color: rgba(255, 255, 255, 0.22);
  color: #e8dfe7;
  background: rgba(255, 255, 255, 0.08);
}

.bounty-card h3 {
  margin: 0;
  color: #fff7fb;
  font-size: clamp(1.55rem, 2.15vw, 2.15rem);
  line-height: 1.05;
}

.bounty-card p {
  margin: 0;
  color: #ddcbd8;
  font-size: clamp(1rem, 1.18vw, 1.18rem);
  line-height: 1.3;
}

.reward-card {
  overflow: hidden;
  border: 1px solid rgba(255, 138, 196, 0.58);
  border-radius: 13px;
  background: #1b161b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.3);
}

.reward-image-frame,
.reward-image-link {
  display: block;
  overflow: hidden;
  color: inherit;
  background: #0b090b;
  text-decoration: none;
}

.reward-image-link:hover img {
  transform: scale(1.025);
}

.reward-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  background: #0b090b;
  transition: transform 160ms ease;
}

.reward-meta,
.reward-requires {
  background: #211b21;
}

.reward-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.65rem 0.35rem;
  min-width: 0;
}

.reward-meta strong {
  overflow: hidden;
  color: #f8eff6;
  font-size: 0.86rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-rarity {
  font-size: 0.72rem;
  font-weight: 950;
}

.rarity-legendary {
  color: #f0a13a;
}

.rarity-epic {
  color: #c790ff;
}

.rarity-rare {
  color: #75b7ff;
}

.rarity-uncommon {
  color: #31c866;
}

.reward-requires {
  padding: 0.2rem 0.65rem 0.62rem;
  color: #d8c8d4;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.reward-requires + .reward-requires {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reward-line {
  color: #fff7fb;
}

.reward-requirement {
  color: #ffc4df;
}

.reward-destination {
  color: #bfeee5;
}

.reward-collected-by,
.reward-collected-at {
  color: #cfc4cc;
}

.reward-market-link,
.live-market-link {
  display: flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(127, 255, 212, 0.18);
  color: #7fffd4;
  background: rgba(127, 255, 212, 0.065);
  font-size: 0.75rem;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reward-market-link:hover,
.live-market-link:hover {
  color: #f8fffc;
  background: rgba(127, 255, 212, 0.12);
}

.redeem-button {
  width: 100%;
  min-height: 2.55rem;
  margin-top: 0.2rem;
  border-color: rgba(255, 255, 255, 0.28);
  color: #d1c8cf;
  background: #403a40;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.redeem-button.eligible,
.redeem-button:not(:disabled) {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.72);
  color: #16060f;
  background: linear-gradient(180deg, #ff9bc8, #ff4fa9);
  box-shadow:
    0 0 0 2px rgba(255, 93, 170, 0.32),
    0 13px 26px rgba(255, 93, 170, 0.28);
}

.redeem-button.eligible:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(255, 93, 170, 0.46),
    0 16px 34px rgba(255, 93, 170, 0.38);
}

.redeem-button.needs-hand:not(:disabled) {
  cursor: pointer;
  border-color: rgba(255, 211, 109, 0.72);
  color: #fff7e2;
  background:
    linear-gradient(180deg, rgba(255, 211, 109, 0.22), rgba(255, 138, 196, 0.12)),
    #30212b;
  box-shadow:
    0 0 0 2px rgba(255, 211, 109, 0.16),
    0 11px 24px rgba(255, 138, 196, 0.14);
}

.redeem-button.needs-hand:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(255, 211, 109, 0.28),
    0 14px 30px rgba(255, 138, 196, 0.18);
}

.redeem-button:disabled {
  opacity: 1;
  color: #b7a8b4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #2b252c;
  border-color: rgba(255, 255, 255, 0.16);
}

.collected-button:disabled {
  color: #e1d8df;
  background: #3b363b;
  border-color: rgba(255, 255, 255, 0.22);
}

.bounty-example {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, clamp(70px, 5.8vw, 106px)));
  gap: 0.48rem;
  align-items: center;
  justify-content: start;
}

.collected-bounty-grid {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.collected-bounty-grid[hidden] {
  display: none;
}

.collected-bounty-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.collected-bounty-heading h3,
.collected-bounty-heading p {
  margin: 0;
}

.collected-bounty-heading h3 {
  color: #e6dce4;
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.collected-bounty-heading p {
  color: #9f929b;
  font-size: 0.82rem;
  font-weight: 850;
}

.collected-grid {
  max-height: none;
  overflow: visible;
}

.data-topbar p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  text-align: right;
}

.data-layer {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  gap: 1rem;
  align-items: start;
}

.data-rules-panel,
.data-prizes-panel,
.data-ledger-panel,
.data-preview-panel,
.data-builder-panel,
.data-chain-state-panel,
.prototype-data-drawer {
  grid-column: 1 / -1;
}

.data-builder-panel,
.data-live-panel,
.data-redeemed-panel,
.data-rules-panel,
.data-prizes-panel,
.data-ledger-panel,
.data-preview-panel,
.data-contract-panel,
.data-admin-panel,
.data-chain-state-panel {
  padding: 1rem;
}

.data-panel-heading {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 138, 196, 0.26);
}

.data-panel-heading h2,
.data-rule-grid h3,
.live-bounty-row h3 {
  margin: 0;
}

.data-reset-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.data-reset-actions button {
  min-height: 2.25rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #f6e9f2;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 900;
}

.data-reset-actions button:last-child {
  border-color: rgba(255, 95, 95, 0.34);
  color: #ffdada;
  background: rgba(255, 95, 95, 0.1);
}

.data-reset-actions button:hover {
  border-color: rgba(255, 138, 196, 0.52);
  transform: translateY(-1px);
}

.data-muted {
  margin: 0.15rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.data-muted code {
  color: #ffd36d;
}

.data-contract-line {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(127, 255, 212, 0.2);
  border-radius: 8px;
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.055);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.data-stats {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.data-contract-panel {
  border-color: rgba(255, 138, 196, 0.32);
}

.data-admin-panel {
  border-color: rgba(127, 255, 212, 0.24);
}

.data-builder-panel {
  border-color: rgba(255, 138, 196, 0.4);
}

.data-chain-state-panel {
  border-color: rgba(127, 255, 212, 0.3);
}

.contract-integration-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.contract-integration-status p {
  margin: 0;
  color: var(--muted);
}

.contract-state-card {
  min-height: 5rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.contract-state-card strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: 0.86rem;
}

.contract-state-card span,
.contract-state-card code {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.admin-status-pill {
  min-height: 4rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-status-pill strong,
.admin-action-card h3 {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 0.86rem;
}

.admin-status-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.admin-status-pill.ok {
  border-color: rgba(127, 255, 212, 0.34);
  background: rgba(127, 255, 212, 0.06);
}

.admin-status-pill.warn {
  border-color: rgba(255, 211, 109, 0.34);
  background: rgba(255, 211, 109, 0.055);
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-action-card {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.admin-action-card-wide {
  grid-column: 1 / -1;
}

.admin-button-row {
  display: flex;
  gap: 0.45rem;
}

.admin-button-row.wrap {
  flex-wrap: wrap;
}

.admin-button-row button {
  min-height: 2.35rem;
  padding: 0.55rem 0.68rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.chain-state-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 0.85rem;
}

.chain-state-card {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-height: 16rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.chain-state-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.chain-state-summary {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(127, 255, 212, 0.22);
  border-radius: 8px;
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.055);
  font-size: 0.78rem;
  font-weight: 850;
}

.on-chain-card-owner-list,
.on-chain-bounty-list,
.on-chain-collection-list {
  display: grid;
  gap: 0.38rem;
  max-height: 34rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.on-chain-card-row,
.on-chain-bounty-row,
.on-chain-collection-row {
  display: grid;
  gap: 0.3rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.on-chain-card-row {
  grid-template-columns: 3rem minmax(7rem, 1fr) minmax(8rem, 1.25fr) minmax(5rem, 0.7fr);
  align-items: center;
}

.on-chain-card-row.active-owner {
  border-color: rgba(255, 138, 196, 0.44);
  background: rgba(255, 93, 170, 0.07);
}

.on-chain-card-row strong,
.on-chain-bounty-row strong,
.on-chain-collection-row strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.on-chain-card-row span,
.on-chain-bounty-row p,
.on-chain-collection-row span,
.on-chain-collection-row code {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.on-chain-row-heading {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}

.on-chain-row-heading span {
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  color: #160711;
  background: var(--pink-2);
  font-size: 0.65rem;
  font-weight: 950;
}

.on-chain-bounty-row.status-redeemed,
.on-chain-bounty-row.status-cancelled,
.on-chain-collection-row.blocked {
  opacity: 0.68;
}

.chain-wallet-cell .wallet-inline {
  max-width: 100%;
}

.prototype-data-drawer {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.prototype-data-drawer summary {
  padding: 0.85rem 1rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.prototype-data-drawer[open] {
  padding-bottom: 0.85rem;
}

.prototype-data-drawer[open] summary {
  color: var(--pink-2);
}

.prototype-data-drawer > .panel {
  margin: 0.85rem;
}

.data-stats span,
.data-tags span {
  display: inline-grid;
  gap: 0.08rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(127, 255, 212, 0.22);
  border-radius: 8px;
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.07);
  font-size: 0.72rem;
  font-weight: 850;
}

.data-stats strong {
  color: #fff;
  font-size: 1rem;
}

.data-rule-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: 1rem;
}

.data-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 0.35rem;
}

.data-card-token {
  display: grid;
  min-height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.72rem;
  font-weight: 950;
}

.data-card-token strong {
  font-size: 0.64rem;
  line-height: 1;
}

.data-card-token.suit-red {
  color: #231018;
  background: #ff99c9;
}

.data-card-token.suit-black {
  color: #f8eff6;
  background: #171217;
}

.data-requirement-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.data-rule-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 138, 196, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.data-rule-heading {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.data-rule-heading strong {
  color: #fff7fb;
}

.data-rule-heading code,
.redeemed-row code {
  color: #7fffd4;
  font-size: 0.72rem;
}

.data-rule-card p {
  margin: 0;
  color: #ddcbd8;
  font-size: 0.84rem;
  line-height: 1.35;
}

.data-rule-card small {
  color: #b7eadd;
  font-size: 0.72rem;
  line-height: 1.25;
}

.fake-ledger-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.fake-ledger-layout h3 {
  margin: 0 0 0.65rem;
  color: #fff7fb;
}

.fake-account-list,
.fake-ledger-event-list,
.fake-card-ledger-list {
  display: grid;
  gap: 0.5rem;
}

.fake-account-list {
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
}

.fake-account-card,
.fake-ledger-event,
.fake-card-ledger-row {
  border: 1px solid rgba(255, 138, 196, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.fake-account-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
}

.fake-account-card.active {
  border-color: rgba(127, 255, 212, 0.5);
  background: rgba(127, 255, 212, 0.085);
}

.fake-account-card strong,
.fake-ledger-event strong {
  color: #fff7fb;
}

.fake-account-card code,
.fake-ledger-event code,
.fake-card-ledger-row code {
  color: #7fffd4;
  font-size: 0.72rem;
}

.fake-account-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.fake-account-card button {
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.fake-ledger-event {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
}

.fake-ledger-event p {
  margin: 0;
  color: #ddcbd8;
  font-size: 0.82rem;
  line-height: 1.3;
}

.fake-card-ledger-list {
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}

.fake-card-ledger-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.28rem 0.55rem;
  align-items: center;
  padding: 0.55rem;
}

.fake-card-ledger-row strong {
  color: #ffd36d;
}

.fake-card-ledger-row > span:first-of-type {
  color: #fff7fb;
  font-weight: 850;
}

.fake-card-ledger-row > span:last-child {
  width: fit-content;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.09);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bounty-builder-form,
.bounty-builder-form fieldset,
.ask-option-fields {
  display: grid;
  gap: 0.75rem;
}

.bounty-builder-form {
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
}

.bounty-builder-form fieldset {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid rgba(255, 138, 196, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bounty-builder-form legend {
  padding: 0 0.35rem;
  color: var(--pink-2);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.bounty-builder-form label {
  display: grid;
  gap: 0.32rem;
}

.bounty-builder-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.bounty-builder-form > .primary-button,
.bounty-builder-form > .status-line {
  grid-column: 1 / -1;
}

.generated-ask-title {
  display: grid;
  gap: 0.3rem;
  padding: 0.7rem;
  border: 1px solid rgba(127, 255, 212, 0.22);
  border-radius: 8px;
  background: rgba(127, 255, 212, 0.055);
}

.generated-ask-title span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.generated-ask-title strong {
  color: #dffdf5;
  font-size: 1.05rem;
}

.prize-data-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 420px);
  gap: 1rem;
  align-items: start;
}

.allowed-prize-list,
.prize-inventory-list {
  display: grid;
  gap: 0.65rem;
}

.allowed-prize-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid rgba(127, 255, 212, 0.2);
  border-radius: 8px;
  background: rgba(127, 255, 212, 0.055);
}

.allowed-prize-card.blocked {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.allowed-prize-card.disabled {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.allowed-prize-card strong,
.registry-form h3,
.prize-inventory-heading h3 {
  margin: 0;
  color: #fff7fb;
}

.allowed-prize-card code {
  color: #7fffd4;
  font-size: 0.72rem;
}

.allowed-prize-card p {
  margin: 0;
  color: #ddcbd8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.collection-status {
  width: fit-content;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.collection-status.allowed {
  color: #061611;
  background: #7fffd4;
}

.collection-status.blocked {
  color: #f8eff6;
  background: #514951;
}

.registry-forms,
.registry-form {
  display: grid;
  gap: 0.75rem;
}

.registry-form {
  padding: 0.85rem;
  border: 1px solid rgba(255, 138, 196, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.registry-form label {
  display: grid;
  gap: 0.32rem;
}

.registry-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.form-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.fixed-collection-constraints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.fixed-collection-constraints span {
  display: grid;
  gap: 0.16rem;
  min-height: 3.1rem;
  padding: 0.62rem;
  border: 1px solid rgba(127, 255, 212, 0.2);
  border-radius: 8px;
  color: #dffdf5;
  background: rgba(127, 255, 212, 0.06);
  font-size: 0.8rem;
  font-weight: 850;
}

.fixed-collection-constraints strong {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.fixed-collection-constraints code {
  color: #ffd36d;
  font-size: 0.72rem;
}

.collection-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.collection-actions button {
  min-height: 2.15rem;
  padding: 0.42rem 0.58rem;
  border-radius: 8px;
  color: #f6e9f2;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.74rem;
  font-weight: 850;
}

.prize-inventory-heading {
  margin: 1rem 0 0.65rem;
}

.prize-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem;
  border: 1px solid rgba(255, 138, 196, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.prize-row.prize-redeemed {
  border-color: rgba(127, 255, 212, 0.24);
  background: rgba(127, 255, 212, 0.055);
}

.prize-row img {
  width: 82px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 138, 196, 0.38);
  border-radius: 8px;
  background: #080608;
}

.prize-row-body {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.prize-row-body strong {
  overflow: hidden;
  color: #fff7fb;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-row-body p,
.live-exchange-line,
.prize-exchange-line {
  margin: 0;
  color: #ddcbd8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.live-bounty-list,
.redeemed-bounty-list {
  display: grid;
  gap: 0.75rem;
  max-height: 680px;
  overflow: auto;
}

.live-bounty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 138, 196, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.live-bounty-ask {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
}

.live-bounty-ask h3 {
  color: #fff7fb;
  font-size: 1.15rem;
}

.live-bounty-ask p,
.live-bounty-prize p,
.redeemed-row p {
  margin: 0;
  color: #ddcbd8;
  font-size: 0.84rem;
  line-height: 1.35;
}

.data-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.data-example {
  grid-template-columns: repeat(5, minmax(34px, 52px));
}

.live-bounty-prize {
  display: grid;
  gap: 0.42rem;
  align-content: start;
  padding: 0.75rem;
  border-left: 1px solid rgba(255, 138, 196, 0.28);
  background: rgba(255, 138, 196, 0.08);
}

.live-bounty-prize img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 138, 196, 0.38);
  border-radius: 8px;
  background: #080608;
}

.live-bounty-prize strong {
  color: #fff7fb;
  line-height: 1.15;
}

.live-bounty-prize button {
  margin-top: 0.25rem;
  padding: 0.52rem 0.65rem;
  border-radius: 8px;
  color: #f6e9f2;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 850;
}

.redeemed-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid rgba(127, 255, 212, 0.22);
  border-radius: 8px;
  background: rgba(127, 255, 212, 0.055);
}

.redeemed-row strong {
  color: #fff7fb;
}

.data-empty {
  margin: 0;
  padding: 0.9rem;
  border: 1px dashed rgba(255, 138, 196, 0.32);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  line-height: 1.35;
}

.data-flow-viz {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.data-flow-node {
  display: grid;
  gap: 0.25rem;
  min-height: 4.4rem;
  align-content: center;
  padding: 0.7rem;
  border: 1px solid rgba(127, 255, 212, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(127, 255, 212, 0.08), rgba(255, 138, 196, 0.045));
}

.data-flow-node strong {
  color: #fff7fb;
  font-size: 0.88rem;
}

.data-flow-node span {
  color: #b7eadd;
  font-size: 0.74rem;
  line-height: 1.25;
}

.contract-data-preview {
  max-height: 520px;
  margin: 0;
  padding: 0.9rem;
  overflow: auto;
  border: 1px solid rgba(127, 255, 212, 0.2);
  border-radius: 8px;
  color: #dffdf5;
  background: #070a0a;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.45;
}

.trade-modal[hidden] {
  display: none;
}

.trade-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at center, rgba(255, 93, 170, 0.16), transparent 42%),
    rgba(7, 4, 7, 0.78);
  backdrop-filter: blur(10px);
}

.trade-dialog {
  width: min(880px, 100%);
  padding: 1.15rem;
  border: 1px solid rgba(255, 138, 196, 0.72);
  border-radius: 16px;
  color: #fff7fb;
  background:
    linear-gradient(180deg, rgba(36, 22, 34, 0.98), rgba(13, 9, 14, 0.98));
  box-shadow:
    0 0 0 3px rgba(255, 93, 170, 0.24),
    0 26px 80px rgba(0, 0, 0, 0.6);
}

.trade-dialog h2 {
  margin: 0 0 0.65rem;
  color: var(--pink-2);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.trade-prompt {
  margin: 0;
  color: #f4e7f0;
  font-size: 1rem;
  line-height: 1.4;
}

.trade-card-list {
  margin: 0.9rem 0;
}

.trade-exchange {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) minmax(88px, 0.3fr) minmax(190px, 0.72fr);
  gap: 0.85rem;
  align-items: center;
}

.trade-side {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 138, 196, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.trade-exchange.confirmed .trade-cards-side {
  opacity: 0.28;
  filter: grayscale(0.6) saturate(0.42);
  transform: translateX(-0.35rem) scale(0.985);
  transition:
    opacity 520ms ease,
    filter 520ms ease,
    transform 520ms ease;
}

.trade-exchange.confirmed .trade-cards-side .playing-card {
  animation: tradeCardFade 620ms ease forwards;
}

.trade-exchange.confirmed .trade-reward-side {
  position: relative;
  z-index: 1;
  border-color: rgba(255, 174, 211, 0.92);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 93, 170, 0.2), transparent 58%),
    rgba(255, 93, 170, 0.09);
  box-shadow:
    0 0 0 3px rgba(255, 93, 170, 0.22),
    0 0 38px rgba(255, 93, 170, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: tradeRewardPop 700ms cubic-bezier(0.2, 0.9, 0.18, 1.2) both;
  animation-delay: 240ms;
}

.trade-side-label {
  color: #d8c8d4;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.trade-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: center;
}

.trade-card-grid .playing-card {
  min-height: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.trade-arrows {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.trade-arrow-icon {
  display: grid;
  place-items: center;
  width: min(100%, 76px);
  min-height: 2.75rem;
  padding: 0.26rem 0.34rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 52%),
    rgba(255, 93, 170, 0.12);
  box-shadow: 0 10px 22px rgba(255, 93, 170, 0.22);
}

.trade-arrow-icon img {
  display: block;
  width: 54px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 5px 8px rgba(255, 93, 170, 0.34));
}

.trade-reward-side {
  align-self: stretch;
}

.trade-reward-card {
  width: min(210px, 100%);
  justify-self: center;
}

.trade-confetti {
  position: absolute;
  inset: -1rem;
  z-index: 2;
  pointer-events: none;
}

.trade-confetti span {
  position: absolute;
  width: 0.44rem;
  height: 0.78rem;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffd3e8, #ff5daa);
  box-shadow: 0 0 10px rgba(255, 93, 170, 0.55);
  opacity: 0;
  transform: translateY(0) rotate(var(--rotate));
  animation: tradeConfettiPop 950ms ease-out forwards;
}

.trade-confetti span:nth-child(3n + 1) {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #ff8ac4;
}

.trade-confetti span:nth-child(3n + 2) {
  background: linear-gradient(180deg, #fff7fb, #ff7dbb);
}

.trade-warning {
  margin: 0.15rem 0 0.9rem;
  color: #cbbbc7;
  font-size: 0.76rem;
  line-height: 1.25;
}

.trade-status {
  display: grid;
  gap: 0.32rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 138, 196, 0.34);
  border-radius: 12px;
  color: #eadce6;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.trade-status[hidden] {
  display: none;
}

.trade-status strong {
  color: #fff7fb;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.trade-status.pending {
  border-color: rgba(255, 93, 170, 0.58);
  box-shadow: inset 0 0 28px rgba(255, 93, 170, 0.08);
}

.trade-status.confirmed {
  border-color: rgba(255, 138, 196, 0.8);
  color: #fff7fb;
  background: rgba(255, 93, 170, 0.16);
  box-shadow: 0 0 24px rgba(255, 93, 170, 0.22);
}

.trade-status.error {
  border-color: rgba(255, 95, 95, 0.58);
  color: #ffd7d7;
  background: rgba(255, 95, 95, 0.12);
}

.trade-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
}

.trade-actions button {
  min-height: 2.6rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  font-weight: 950;
}

.trade-cancel {
  color: #f6e9f2;
  background: rgba(255, 255, 255, 0.08);
}

.trade-confirm {
  color: #16060f;
  background: linear-gradient(180deg, #ff9bc8, #ff4fa9);
  box-shadow: 0 12px 28px rgba(255, 93, 170, 0.3);
}

.trade-confirm.continue-state {
  color: #f8eff6;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055)),
    #3b3039;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.trade-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@keyframes tradeCardFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0.36;
    transform: translateY(0.35rem) scale(0.96);
  }
}

@keyframes tradeRewardPop {
  0% {
    transform: scale(0.96);
  }
  55% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tradeConfettiPop {
  0% {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.72) rotate(var(--rotate));
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-1.35rem) scale(1) rotate(calc(var(--rotate) + 120deg));
  }
}

.panel,
.template-kit-card,
.canvas-card,
.pixel-editor-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(21, 16, 21, 0.88);
  box-shadow: 0 18px 50px var(--shadow);
}

.panel {
  overflow: hidden;
}

.panel-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.compact {
  padding-bottom: 1.15rem;
}

.field-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.edit-target-panel {
  margin: 0.75rem 0 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 93, 170, 0.28);
  border-radius: 16px;
  background: rgba(255, 93, 170, 0.055);
}

.edit-target-panel .field-label {
  margin-top: 0;
}

.edit-target-panel select {
  width: 100%;
}

.file-drop {
  display: block;
  margin-top: 0.8rem;
  padding: 0.85rem;
  border: 1px dashed rgba(255, 93, 170, 0.45);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 93, 170, 0.07);
  cursor: pointer;
}

.file-drop small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

.compact-drop {
  margin-top: 0.55rem;
  padding: 0.7rem;
}

.card-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.card-buttons button {
  padding: 0.75rem 0.4rem;
  border-radius: 12px;
  font-weight: 800;
}

.card-buttons button.active {
  color: #150812;
  background: var(--pink);
  border-color: var(--pink);
}

.reference-section {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 93, 170, 0.28);
  border-radius: 16px;
  background: rgba(255, 93, 170, 0.055);
}

.reference-heading {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
}

.reference-heading h3 {
  margin: 0;
  font-size: 0.95rem;
}

.reference-heading button {
  padding: 0.45rem 0.65rem;
  color: var(--muted);
  background: #100b11;
}

.reference-help {
  margin: 0.45rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.reference-card-buttons {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.reference-card-buttons button {
  padding: 0.5rem 0.25rem;
  border-radius: 10px;
  color: var(--muted);
  background: #100b11;
  font-size: 0.78rem;
  font-weight: 800;
}

.reference-card-buttons button.active {
  color: #150812;
  background: var(--pink-2);
  border-color: var(--pink-2);
}

.reference-part-row {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.reference-part-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 0.4rem;
}

.reference-part-buttons button {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  align-items: center;
  min-height: 4.7rem;
  padding: 0.42rem 0.35rem;
  border-radius: 11px;
  color: var(--muted);
  background: #100b11;
  font-size: 0.68rem;
  font-weight: 900;
}

.reference-part-buttons button.active {
  color: #150812;
  background: var(--pink-2);
  border-color: var(--pink-2);
  box-shadow: 0 0 0 2px rgba(255, 93, 170, 0.22);
}

.reference-part-buttons img {
  max-width: 72px;
  max-height: 46px;
  padding: 0.22rem;
  border-radius: 8px;
  background: #f4f3f2;
  object-fit: contain;
  image-rendering: pixelated;
}

.reference-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.reference-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.reference-item img {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  image-rendering: auto;
}

.reference-item.normalized-part img {
  object-fit: contain;
  background: #f4f3f2;
  image-rendering: pixelated;
}

.reference-item strong {
  display: block;
  font-size: 0.78rem;
}

.reference-item small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.reference-item button {
  padding: 0.35rem 0.5rem;
  color: var(--pink-2);
  background: transparent;
}

.template-kit-card,
.canvas-card {
  padding: 1rem;
}

.template-kit-card {
  margin-bottom: 1rem;
}

.template-symbols {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.template-symbol-row {
  display: grid;
  grid-template-columns: minmax(95px, 0.18fr) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid rgba(255, 138, 196, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.template-symbol-row.archive-row {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(255, 93, 170, 0.025);
}

.template-row-label {
  display: grid;
  gap: 0.18rem;
}

.template-row-label strong {
  color: #fff7fb;
  font-size: 0.9rem;
}

.template-row-label span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.template-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 0.45rem;
}

.template-symbol-grid.suit-grid {
  grid-template-columns: repeat(auto-fit, minmax(54px, 72px));
}

.template-symbol-grid.fancy-suit-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 142px));
}

.fancy-suit-pair-control {
  display: grid;
  gap: 0.38rem;
  align-content: start;
  min-width: 0;
}

.template-symbol-grid.art-grid {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.card-art-suit-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.card-art-suit-label {
  display: grid;
  min-height: 3.8rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 138, 196, 0.2);
  border-radius: 8px;
  color: #fff7fb;
  background: rgba(255, 93, 170, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-art-suit-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 110px));
  gap: 0.45rem;
  min-width: 0;
}

.card-art-suit-buttons.archived-card-art-buttons {
  grid-template-columns: repeat(3, minmax(58px, 110px));
}

.card-art-suit-buttons.queen-mask-suit-buttons {
  grid-template-columns: minmax(68px, 118px);
}

.card-art-suit-label.archive-label {
  color: #dac7d4;
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 620px) {
  .card-art-suit-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .card-art-suit-label {
    min-height: auto;
  }

  .card-art-suit-buttons {
    grid-template-columns: repeat(2, minmax(58px, 1fr));
  }
}

.template-symbol-button {
  display: grid;
  gap: 0.32rem;
  justify-items: center;
  min-width: 0;
  padding: 0.42rem 0.32rem;
  border-radius: 12px;
  background: #0f0b10;
}

.template-symbol-button:hover {
  background: rgba(255, 93, 170, 0.12);
}

.template-symbol-button.active {
  border-color: var(--pink);
  background: rgba(255, 93, 170, 0.18);
  box-shadow:
    0 0 0 2px rgba(255, 93, 170, 0.28),
    0 10px 22px rgba(255, 93, 170, 0.14);
}

.template-symbol-button canvas {
  width: 100%;
  max-width: 54px;
  height: auto;
  border: 1px solid rgba(255, 138, 196, 0.18);
  border-radius: 8px;
  background: #f4f3f2;
  image-rendering: pixelated;
}

.template-symbol-button.thick-rank canvas {
  max-width: 68px;
}

.template-symbol-button.rounded-rank canvas {
  max-width: 54px;
}

.template-symbol-button.card-art-button canvas {
  max-width: 82px;
  max-height: 122px;
  object-fit: contain;
}

.template-symbol-button.archived-art-button {
  opacity: 0.82;
}

.template-symbol-button.archived-art-button:hover,
.template-symbol-button.archived-art-button.active {
  opacity: 1;
}

.template-symbol-button.fancy-suit-pair-button {
  gap: 0.42rem;
  padding: 0.5rem 0.42rem;
}

.fancy-suit-pair-preview {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.4rem;
  align-items: end;
  justify-content: center;
}

.fancy-suit-asset-box {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  align-items: end;
  padding: 0.3rem;
  border: 1px solid rgba(255, 138, 196, 0.2);
  border-radius: 9px;
  background: rgba(244, 243, 242, 0.96);
}

.template-symbol-button.fancy-suit-pair-button .fancy-suit-asset-box canvas {
  width: auto;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fancy-suit-asset-box.pip canvas {
  width: 52px;
}

.fancy-suit-asset-box.corner canvas {
  width: 39px;
}

.fancy-suit-asset-box em {
  color: #4a283f;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.template-symbol-button span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
}

.fancy-suit-clean-button {
  min-height: 2rem;
  padding: 0.42rem 0.55rem;
  border-color: rgba(255, 93, 170, 0.44);
  border-radius: 8px;
  color: #ffd8ea;
  background:
    linear-gradient(180deg, rgba(255, 93, 170, 0.14), rgba(255, 93, 170, 0.06)),
    #120b12;
  font-size: 0.72rem;
  font-weight: 950;
}

.fancy-suit-clean-button:hover:not(:disabled) {
  border-color: rgba(255, 138, 196, 0.8);
  box-shadow: 0 0 16px rgba(255, 93, 170, 0.16);
}

.fancy-suit-clean-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.template-main {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.template-preview-shell {
  display: grid;
  place-items: center;
  min-height: 455px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    #080608;
  background-size: 18px 18px;
}

#baseTemplateCanvas {
  width: min(100%, 271px);
  height: auto;
  image-rendering: pixelated;
}

.template-notes {
  display: grid;
  gap: 0.65rem;
}

.template-notes h3 {
  margin: 0;
  color: #fff7fb;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.template-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.template-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.template-actions button {
  border-color: rgba(255, 138, 196, 0.48);
  color: #160711;
  background: var(--pink-2);
  font-weight: 950;
}

.template-actions button + button {
  color: var(--ink);
  background: var(--panel-2);
}

.template-selection-summary {
  margin: 0;
  color: #f0dbe8;
  font-size: 0.82rem;
  font-weight: 850;
}

.card-template-builder {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 138, 196, 0.24);
}

.card-template-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.card-template-controls label {
  display: grid;
  gap: 0.32rem;
}

.card-template-controls span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.card-template-controls select {
  min-height: 2.5rem;
  padding: 0.55rem 0.65rem;
}

.card-template-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.card-template-preview {
  display: grid;
  place-items: center;
  min-height: 455px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    #080608;
  background-size: 18px 18px;
}

#cardTemplateCanvas {
  width: min(100%, 271px);
  height: auto;
  image-rendering: pixelated;
}

.card-template-side {
  display: grid;
  gap: 0.65rem;
}

.card-template-side h3 {
  margin: 0;
  color: #fff7fb;
}

.card-template-side p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.numbered-template-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 0.45rem;
}

.numbered-template-card {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  min-width: 0;
  padding: 0.42rem;
  border-radius: 12px;
  background: #0f0b10;
}

.numbered-template-card.active {
  border-color: var(--pink);
  background: rgba(255, 93, 170, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 93, 170, 0.24);
}

.numbered-template-card canvas {
  width: 100%;
  max-width: 58px;
  height: auto;
  border-radius: 6px;
  background: #f4f3f2;
  image-rendering: pixelated;
}

.numbered-template-card span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
}

.pixel-editor-card {
  margin-top: 1rem;
  padding: 1rem;
}

.canvas-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.canvas-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.legacy-sheet-card {
  padding: 0;
  overflow: hidden;
}

.legacy-sheet-card summary {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(160px, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem 0.9rem;
  cursor: pointer;
  list-style: none;
}

.legacy-sheet-card summary::-webkit-details-marker {
  display: none;
}

.legacy-sheet-card summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(255, 138, 196, 0.38);
  border-radius: 8px;
  color: var(--pink-2);
  background: rgba(255, 93, 170, 0.08);
  font-weight: 950;
}

.legacy-sheet-card[open] summary::before {
  content: "-";
}

.legacy-sheet-card summary > span {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  min-width: 0;
}

.legacy-sheet-card summary .eyebrow {
  margin: 0;
}

.legacy-sheet-card summary strong {
  min-width: 0;
  color: #fff7fb;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legacy-sheet-card summary small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
  text-align: right;
}

.legacy-sheet-card #sheetCanvas {
  margin: 0 0.9rem 0.9rem;
  width: calc(100% - 1.8rem);
}

#sheetCanvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #050405;
  image-rendering: auto;
}

.pixel-toolbar {
  position: sticky;
  top: 5.75rem;
  z-index: 18;
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr) minmax(220px, auto);
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 138, 196, 0.24);
  border-radius: 14px;
  background: rgba(16, 11, 17, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.tool-group,
.pixel-action-row,
.pixel-guide-row,
.pixel-zoom-controls,
.pixel-palette {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.tool-group button,
.pixel-action-row button,
.pixel-zoom-controls button {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--panel-2);
}

.tool-group button.active {
  color: #150812;
  background: var(--pink);
  border-color: var(--pink);
  font-weight: 900;
}

.pixel-color-field {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.pixel-color-field input {
  width: 2.4rem;
  height: 2.25rem;
  padding: 0.18rem;
  border-radius: 10px;
}

.pixel-palette button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.pixel-palette button.labeled {
  width: 2.25rem;
  color: #170710;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pixel-palette button.active {
  border-color: var(--pink-2);
  box-shadow:
    0 0 0 2px rgba(255, 138, 196, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pixel-zoom-controls {
  justify-content: flex-end;
}

.pixel-zoom-controls input {
  width: 8rem;
  padding: 0;
}

.pixel-zoom-controls span {
  min-width: 2.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.pixel-guide-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 138, 196, 0.26);
  border-radius: 10px;
  background: rgba(255, 138, 196, 0.065);
}

.pixel-guide-toggle {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: #ecddea;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.pixel-guide-toggle input {
  width: auto;
  margin: 0;
  accent-color: var(--pink);
}

.pixel-action-row {
  grid-column: 1 / -1;
}

.pixel-action-row button {
  flex: 1;
}

.pixel-editor-viewport {
  display: block;
  height: min(68vh, 760px);
  min-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    #070507;
  background-size: 18px 18px;
}

.pixel-stage {
  position: relative;
  width: 1px;
  height: 1px;
  margin: 1rem auto;
  background: #f4f3f2;
  box-shadow: 0 0 0 1px rgba(255, 93, 170, 0.3);
}

#pixelCanvas,
#pixelOverlayCanvas {
  position: absolute;
  inset: 0;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#pixelOverlayCanvas {
  cursor: crosshair;
  touch-action: none;
}

.pixel-stage.select-tool #pixelOverlayCanvas {
  cursor: grab;
}

.pixel-stage.move-tool #pixelOverlayCanvas {
  cursor: grab;
}

.pixel-stage.eyedropper-tool #pixelOverlayCanvas {
  cursor: copy;
}

.pixel-stage.bucket-tool #pixelOverlayCanvas {
  cursor: cell;
}

.pixel-stage.moving-selection #pixelOverlayCanvas {
  cursor: grabbing;
}

.preview-frame {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    #09070a;
  background-size: 18px 18px;
}

.preview-frame img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  image-rendering: auto;
}

.source-preview {
  min-height: 190px;
}

.source-preview img {
  max-height: 260px;
}

.button-row,
.result-heading {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.button-row {
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.button-row button,
.result-heading button {
  flex: 1;
  padding: 0.62rem;
  color: var(--ink);
  background: var(--panel-2);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.settings-grid span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  margin-top: 1rem;
  color: #160711;
  background: linear-gradient(135deg, var(--pink), var(--pink-2));
  border-color: transparent;
  font-weight: 900;
}

.repair-art-button,
.suit-cleanup-button,
.face-art-build-button {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 93, 170, 0.52);
  color: #ffd8ea;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 93, 170, 0.22), transparent 36%),
    rgba(255, 93, 170, 0.08);
  font-weight: 900;
}

.repair-art-button:hover:not(:disabled),
.suit-cleanup-button:hover:not(:disabled),
.face-art-build-button:hover:not(:disabled) {
  border-color: rgba(255, 138, 196, 0.82);
  box-shadow: 0 0 18px rgba(255, 93, 170, 0.16);
}

.suit-cleanup-button:disabled,
.face-art-build-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.repair-art-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.status-line {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.status-line.error {
  color: #ffb5cd;
}

.status-line.ok {
  color: #ffd8ea;
}

.status-line.pending {
  color: var(--pink-2);
}

.activity-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 93, 170, 0.35);
  border-radius: 14px;
  background: rgba(255, 93, 170, 0.08);
}

.activity-panel[hidden],
.error-box[hidden] {
  display: none;
}

.activity-panel strong {
  display: block;
  margin-bottom: 0.15rem;
}

.activity-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--pink);
  border-radius: 999px;
  animation: spin 850ms linear infinite;
}

.error-box {
  margin: 0.85rem 0 0;
  padding: 0.8rem;
  overflow: auto;
  max-height: 220px;
  border: 1px solid rgba(255, 93, 170, 0.38);
  border-radius: 14px;
  color: #ffd7e8;
  background: rgba(75, 12, 38, 0.38);
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.35;
}

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

.result-heading {
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.result-heading h2 {
  margin: 0;
}

#emptyResult {
  color: var(--subtle);
}

.download-link {
  display: none;
  margin-top: 0.65rem;
  color: var(--pink-2);
  text-decoration: none;
  font-size: 0.88rem;
}

.download-link.show {
  display: inline-block;
}

.history-list {
  display: grid;
  gap: 0.6rem;
  max-height: 370px;
  overflow: auto;
}

.history-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.history-item img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.history-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.history-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

@media (max-width: 1180px) {
  .site-topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .tab-nav {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .account-panel {
    min-width: 0;
  }

  .select-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .player-cards {
    grid-template-columns: repeat(auto-fit, minmax(var(--pool-card-width), var(--pool-card-width)));
  }

  .bounty-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .data-layer,
  .data-rule-grid,
  .fake-ledger-layout,
  .prize-data-grid {
    grid-template-columns: 1fr;
  }

  .data-flow-viz {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards52-topbar p {
    text-align: left;
  }

  .cards52-grid {
    --card-cell-width: 108px;
  }

  .left-panel,
  .right-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-main {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  }

  .card-template-layout {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  }

  .left-panel .panel-section,
  .right-panel .panel-section {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0.65rem;
  }

  .site-topbar,
  .topbar,
  .canvas-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 18px;
    top: 0;
  }

  .site-topbar > div:first-child {
    min-width: 0;
  }

  .site-topbar h1 {
    font-size: clamp(1.45rem, 8vw, 2rem);
    line-height: 1;
  }

  .site-topbar .eyebrow {
    margin-bottom: 0.18rem;
  }

  .tab-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.18rem;
    min-width: 0;
    border-radius: 16px;
  }

  .tab-nav button {
    min-height: 2.35rem;
    padding: 0.48rem 0.32rem;
    border-radius: 12px;
    font-size: 0.68rem;
  }

  .pixel-toolbar {
    top: 0.5rem;
  }

  .account-panel {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    max-width: 210px;
    min-width: 0;
    gap: 0.35rem;
    justify-content: flex-end;
  }

  .account-panel span {
    max-width: 9rem;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .account-panel > #accountStatus {
    max-width: 9rem;
  }

  .sign-in-button {
    padding: 0.62rem 0.74rem;
    border-radius: 12px;
  }

  .fake-poker,
  .select-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fake-poker {
    grid-template-rows: auto auto;
  }

  .select-panel {
    --pool-card-width: clamp(92px, 27vw, 116px);
    --pool-shelf-height: clamp(232px, 64vw, 285px);
    grid-template-areas:
      "heading"
      "cards"
      "selected";
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .select-panel.signed-out {
    --pool-card-width: clamp(52px, 15vw, 72px);
    --pool-shelf-height: clamp(145px, 42vw, 190px);
  }

  .select-panel.signed-out .player-cards {
    grid-template-columns: repeat(5, minmax(var(--pool-card-width), var(--pool-card-width)));
    align-content: center;
    height: var(--pool-shelf-height);
    max-height: var(--pool-shelf-height);
  }

  .section-step-title {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .select-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.45rem;
    padding-bottom: 0.65rem;
  }

  .select-heading p {
    text-align: left;
  }

  .selected-cards {
    grid-template-columns: repeat(5, clamp(34px, 9vw, 44px));
  }

  .selected-hand {
    gap: 0.65rem;
    flex-direction: column;
    padding-top: 0.65rem;
  }

  .current-hand-line {
    width: 100%;
    min-width: 0;
  }

  .player-cards {
    grid-template-columns: repeat(auto-fit, minmax(var(--pool-card-width), var(--pool-card-width)));
    gap: 0.55rem;
    align-content: start;
    padding: 0.5rem;
  }

  .bounty-grid {
    grid-template-columns: 1fr;
  }

  .cards52-status-legend {
    grid-template-columns: 1fr;
  }

  .cards52-shell {
    padding: 0.75rem;
  }

  .cards52-grid {
    --card-cell-width: 104px;
    gap: 0.45rem;
  }

  .contract-integration-status {
    grid-template-columns: 1fr;
  }

  .admin-status-grid,
  .admin-action-grid,
  .bounty-builder-form,
  .chain-state-grid {
    grid-template-columns: 1fr;
  }

  .on-chain-card-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .bounty-card {
    grid-template-columns: 1fr;
  }

  .bounty-hand-side,
  .bounty-prize-side {
    padding: 0.85rem;
  }

  .bounty-card h3 {
    font-size: 1.45rem;
  }

  .bounty-card p {
    font-size: 0.92rem;
  }

  .bounty-example {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .bounty-prize-side .reward-card {
    width: 100%;
    max-width: 220px;
    justify-self: center;
  }

  .trade-dialog {
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }

  .trade-exchange {
    grid-template-columns: 1fr;
  }

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

  .trade-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .data-topbar p:last-child {
    text-align: left;
  }

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

  .data-stats {
    justify-content: flex-start;
  }

  .data-reset-actions {
    justify-content: flex-start;
  }

  .data-requirement-rules,
  .live-bounty-row,
  .prize-row,
  .form-split,
  .fixed-collection-constraints,
  .data-flow-viz {
    grid-template-columns: 1fr;
  }

  .prize-row img {
    width: min(180px, 100%);
  }

  .live-bounty-prize {
    border-top: 1px solid rgba(255, 138, 196, 0.28);
    border-left: 0;
  }

  .live-bounty-prize img {
    width: min(220px, 100%);
  }

  .bounty-prize-side {
    border-top: 1px solid rgba(255, 138, 196, 0.42);
    border-left: 0;
  }

  .key-panel {
    width: 100%;
    justify-items: stretch;
  }

  .api-key-form {
    min-width: 0;
    width: 100%;
  }

  .left-panel,
  .right-panel,
  .settings-grid,
  .template-main,
  .template-symbol-row,
  .card-template-controls,
  .card-template-layout {
    grid-template-columns: 1fr;
  }

  .template-preview-shell {
    min-height: 260px;
  }

  .card-template-preview {
    min-height: 280px;
  }

  .left-panel .panel-section,
  .right-panel .panel-section {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}
