:root {
  color-scheme: dark;
  --ink: #fff7e8;
  --muted: #d5c4a7;
  --paper: #111019;
  --panel: #211a2a;
  --panel-soft: #2b2235;
  --line: rgba(246, 196, 79, 0.3);
  --teal: #5fc7b1;
  --coral: #ef6658;
  --gold: #f6c44f;
  --green: #66c783;
  --pink: #df6d90;
  --violet: #b69bd8;
  --violet-strong: #7657aa;
  --black-ink: #08070d;
  --shadow: 0 24px 72px rgba(4, 3, 10, 0.66);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family:
    "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", ui-sans-serif, system-ui,
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(246, 196, 79, 0.14), transparent 25%),
    radial-gradient(circle at 88% 82%, rgba(95, 199, 177, 0.13), transparent 28%),
    linear-gradient(135deg, rgba(118, 87, 170, 0.2), transparent 42%),
    repeating-linear-gradient(115deg, rgba(255, 247, 232, 0.035) 0 1px, transparent 1px 24px),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255, 247, 232, 0.11) 0 1px, transparent 1.8px) 0 0 / 20px 20px,
    repeating-linear-gradient(0deg, rgba(255, 247, 232, 0.026) 0 1px, transparent 1px 6px);
  opacity: 0.34;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(246, 196, 79, 0.08) 49%, transparent 50%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(255, 247, 232, 0.05) 20px 22px, transparent 22px 44px);
  mask-image: linear-gradient(110deg, transparent, #000 18%, #000 78%, transparent);
  opacity: 0.32;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 1.6vw, 20px);
  overflow: hidden;
}

.game-panel {
  position: relative;
  width: min(1320px, 100%);
  height: min(900px, calc(100dvh - clamp(16px, 3.2vw, 40px)));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(33, 26, 42, 0.96);
  border: 2px solid rgba(246, 196, 79, 0.42);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 247, 232, 0.08) inset,
    10px 10px 0 rgba(8, 7, 13, 0.42),
    var(--shadow);
  isolation: isolate;
  animation: panel-enter 480ms ease both;
}

.game-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(246, 196, 79, 0.13), transparent 38%),
    linear-gradient(315deg, rgba(95, 199, 177, 0.12), transparent 40%);
  mask-image: linear-gradient(#000, transparent 70%);
  z-index: -1;
}

.game-panel::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(255, 247, 232, 0.08);
  border-radius: 14px;
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 20px);
  flex: 0 0 auto;
  padding: clamp(12px, 2vw, 20px) clamp(16px, 2.2vw, 28px);
  border-bottom: 2px solid rgba(246, 196, 79, 0.24);
  background:
    linear-gradient(90deg, rgba(246, 196, 79, 0.08), transparent 38%),
    rgba(17, 16, 25, 0.92);
}

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

.game-panel.is-compact-view .topbar > div:first-child {
  display: none;
}

.game-panel.is-compact-view .topbar {
  padding-block: 8px;
}

.game-panel.is-compact-view .top-nav {
  width: min(520px, 100%);
}

.game-panel.is-compact-view .score-pill {
  min-width: 84px;
  padding: 8px 12px;
}

.top-nav {
  flex: 0 1 auto;
  display: flex;
  gap: 6px;
  padding: 5px;
  background: rgba(17, 16, 25, 0.86);
  border: 1px solid rgba(246, 196, 79, 0.28);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.34);
}

.nav-button {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 900;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: #161019;
  background: linear-gradient(135deg, var(--gold), #f1994d 58%, var(--coral));
  border-color: rgba(255, 247, 232, 0.58);
  box-shadow: 2px 2px 0 rgba(8, 7, 13, 0.4);
}

.nav-button:hover {
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  -webkit-text-stroke: 1px rgba(8, 7, 13, 0.72);
  text-shadow: 3px 3px 0 rgba(239, 102, 88, 0.55), -1px -1px 0 rgba(246, 196, 79, 0.35);
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.4vw, 2.8rem);
  line-height: 1.02;
  text-shadow: 2px 2px 0 rgba(8, 7, 13, 0.75), 3px 3px 0 rgba(239, 102, 88, 0.32);
}

.score-pill {
  min-width: 116px;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  text-align: right;
  background:
    linear-gradient(135deg, rgba(246, 196, 79, 0.17), rgba(239, 102, 88, 0.12)),
    rgba(43, 34, 53, 0.9);
  border: 1px solid rgba(246, 196, 79, 0.46);
  color: #ffffff;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.36);
}

.score-pill span,
.round-stats span,
.target-strip span {
  color: inherit;
  opacity: 0.74;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.score-pill strong {
  font-size: 1.45rem;
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 2vw, 24px);
  isolation: isolate;
}

.home-screen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 22px);
}

.home-screen::before {
  content: "";
  position: absolute;
  right: -8%;
  top: 7%;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(246, 196, 79, 0.16) 0 2px, transparent 2.4px) 0 0 / 18px 18px,
    conic-gradient(from 15deg, transparent 0 7deg, rgba(255, 247, 232, 0.08) 7deg 9deg, transparent 9deg 18deg);
  border-radius: 50%;
  opacity: 0.56;
  z-index: -1;
}

.home-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 470px);
  gap: clamp(16px, 3vw, 34px);
  align-items: center;
}

.home-copy {
  display: grid;
  gap: 14px;
}

.home-copy h2 {
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.home-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.16rem);
  line-height: 1.58;
}

.home-actions {
  display: grid;
  gap: 14px;
}

.home-side {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 14px;
}

.dashboard-card {
  position: relative;
  min-height: 154px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: clamp(16px, 2vw, 22px);
  color: var(--ink);
  background: rgba(43, 34, 53, 0.96);
  border: 2px solid rgba(246, 196, 79, 0.3);
  border-radius: 14px;
  box-shadow:
    6px 6px 0 rgba(8, 7, 13, 0.42),
    0 18px 50px rgba(4, 3, 10, 0.38);
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  animation: card-rise 420ms ease both;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(120deg, rgba(255, 247, 232, 0.06) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 90% 18%, rgba(255, 247, 232, 0.15), transparent 22%);
  opacity: 0.5;
}

.dashboard-card::after {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 5px;
  pointer-events: none;
  background: var(--coral);
  border-radius: 999px;
  box-shadow: 2px 0 0 rgba(255, 247, 232, 0.1);
}

.dashboard-card--catalog::after {
  background: var(--teal);
}

.dashboard-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  border-color: rgba(246, 196, 79, 0.68);
  box-shadow:
    8px 8px 0 rgba(8, 7, 13, 0.5),
    0 22px 44px rgba(239, 102, 88, 0.16);
}

.dashboard-card--game {
  background:
    linear-gradient(135deg, rgba(239, 102, 88, 0.28), rgba(246, 196, 79, 0.12)),
    rgba(43, 34, 53, 0.96);
}

.dashboard-card--catalog {
  background:
    linear-gradient(135deg, rgba(95, 199, 177, 0.24), rgba(246, 196, 79, 0.1)),
    rgba(43, 34, 53, 0.96);
}

.dashboard-card__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #161019;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  border: 2px solid rgba(255, 247, 232, 0.38);
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(8, 7, 13, 0.38);
  z-index: 1;
  transition: transform 180ms ease;
}

.dashboard-card:hover .dashboard-card__icon {
  transform: rotate(-6deg) scale(1.06);
}

.dashboard-card--catalog .dashboard-card__icon {
  background: linear-gradient(135deg, var(--teal), var(--gold));
}

.dashboard-card__icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.dashboard-card span:last-child {
  min-width: 0;
  display: grid;
  gap: 8px;
  z-index: 1;
}

.dashboard-card strong {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.dashboard-card em {
  color: var(--muted);
  font-size: 0.94rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.35;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 14px);
}

.home-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(43, 34, 53, 0.9);
  border: 1px solid rgba(246, 196, 79, 0.26);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.28);
}

.home-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-stats strong {
  color: #ffffff;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.setup-screen {
  display: grid;
  grid-template-rows: minmax(132px, 0.78fr) auto;
  gap: clamp(12px, 2vw, 22px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: clamp(12px, 2vw, 26px);
  align-items: stretch;
  min-height: 0;
}

.intro-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 0;
  padding: 4px 0;
}

.intro-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.data-status {
  width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(246, 196, 79, 0.12);
  border: 1px solid rgba(246, 196, 79, 0.34);
  border-radius: var(--radius);
  font-size: 0.86rem !important;
  font-weight: 800;
  line-height: 1.3 !important;
}

.preview-card {
  position: relative;
  min-height: 0;
  aspect-ratio: 0.72;
  align-self: center;
  padding: 10px;
  background: var(--black-ink);
  border: 2px solid rgba(246, 196, 79, 0.54);
  border-radius: 14px;
  box-shadow: 6px 6px 0 rgba(8, 7, 13, 0.46), 0 18px 42px rgba(4, 3, 10, 0.4);
  transform: rotate(2deg);
  animation: card-float 4s ease-in-out infinite;
}

.preview-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
}

.preview-card__art {
  height: 68%;
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.88) 0 9%, transparent 10%),
    linear-gradient(140deg, #7657aa 0 38%, #5fc7b1 38% 64%, #ef6658 64% 100%);
}

.preview-card__body {
  display: grid;
  gap: 8px;
  padding: 14px 4px 2px;
  color: #ffffff;
}

.preview-card__body span {
  width: max-content;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.preview-card__body strong {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.setup-form {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: clamp(8px, 1.4vw, 14px);
  min-height: 0;
  align-content: start;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: clamp(10px, 1.5vw, 14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(43, 34, 53, 0.92);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.24);
}

fieldset.is-disabled {
  opacity: 0.56;
}

legend {
  padding: 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.segmented-control label {
  min-width: 0;
}

.segmented-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.segmented-control span,
select {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: var(--ink);
  background: #261f31;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.segmented-control input:checked + span {
  color: #161019;
  background: linear-gradient(135deg, var(--gold), #f09a51);
  border-color: rgba(255, 247, 232, 0.55);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.34);
}

.segmented-control span:hover,
select:hover {
  border-color: var(--gold);
}

.segmented-control input:focus-visible + span,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(246, 196, 79, 0.26);
  outline-offset: 2px;
}

select {
  justify-content: flex-start;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 0;
  font-weight: 900;
}

.primary-action {
  color: #161019;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  box-shadow:
    5px 5px 0 rgba(8, 7, 13, 0.42),
    0 14px 28px rgba(239, 102, 88, 0.18);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

.primary-action:hover {
  background: linear-gradient(135deg, #ffd76c, #f07762);
  box-shadow:
    6px 6px 0 rgba(8, 7, 13, 0.5),
    0 18px 34px rgba(239, 102, 88, 0.2);
  transform: translateY(-2px);
}

.secondary-action {
  color: var(--ink);
  background: #261f31;
  border: 1px solid var(--line);
}

.secondary-action:hover {
  background: #30283b;
}

.setup-form > .primary-action {
  align-self: end;
}

.catalog-screen {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.3vw, 14px);
}

.catalog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.catalog-head .secondary-action {
  flex: 0 0 auto;
}

.catalog-filter-panel {
  overflow: hidden;
  background: rgba(17, 16, 25, 0.78);
  border: 1px solid rgba(246, 196, 79, 0.24);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.24);
}

.catalog-filter-panel summary {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.catalog-filter-panel summary::-webkit-details-marker {
  display: none;
}

.catalog-filter-panel summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.catalog-filter-panel[open] summary {
  border-bottom: 1px solid rgba(246, 196, 79, 0.2);
}

.catalog-filter-panel[open] summary::after {
  transform: rotate(225deg);
}

.catalog-filter-panel summary span {
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.catalog-filter-panel summary em {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1fr) minmax(220px, 1.15fr);
  gap: 10px;
  padding: 12px;
  background: transparent;
}

.catalog-toolbar label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.catalog-toolbar label > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.catalog-toolbar input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #261f31;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.catalog-toolbar input::placeholder {
  color: rgba(213, 196, 167, 0.72);
}

.catalog-meta {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.catalog-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 2px 6px 4px 2px;
  scrollbar-color: rgba(246, 196, 79, 0.6) rgba(43, 34, 53, 0.62);
}

.catalog-card {
  min-width: 0;
  min-height: 322px;
  display: grid;
  grid-template-rows: auto minmax(106px, auto);
  overflow: hidden;
  background: rgba(43, 34, 53, 0.96);
  border: 2px solid rgba(246, 196, 79, 0.2);
  border-radius: 12px;
  box-shadow:
    4px 4px 0 rgba(8, 7, 13, 0.36),
    0 12px 30px rgba(4, 3, 10, 0.34);
  animation: card-rise 300ms ease both;
  cursor: zoom-in;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.catalog-card:hover,
.catalog-card:focus-visible {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: rgba(246, 196, 79, 0.64);
  box-shadow:
    6px 6px 0 rgba(8, 7, 13, 0.48),
    0 18px 36px rgba(239, 102, 88, 0.14);
}

.catalog-card:focus-visible {
  outline: 3px solid rgba(246, 196, 79, 0.26);
  outline-offset: 2px;
}

.catalog-card__art {
  position: relative;
  aspect-ratio: 0.72;
  min-height: 188px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 10px 10px 0;
  background: #16121c;
  border-radius: 8px;
}

.catalog-card__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0 32%, rgba(246, 196, 79, 0.18) 45%, transparent 58%),
    linear-gradient(135deg, rgba(118, 87, 170, 0.16), rgba(95, 199, 177, 0.08));
  transform: translateX(-100%);
  animation: art-loading 1.2s ease-in-out infinite;
}

.catalog-card__art.is-loaded::before,
.catalog-card__art.is-missing::before {
  display: none;
}

.catalog-card__art.is-missing {
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.catalog-card__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity 180ms ease;
}

.catalog-card__art.is-loaded img {
  opacity: 1;
}

.catalog-card__body {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.catalog-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-card__badge {
  max-width: 100%;
  padding: 5px 8px;
  color: #161019;
  background: rgba(246, 196, 79, 0.9);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
}

.catalog-card__badge--code {
  background: rgba(95, 199, 177, 0.22);
  color: #daf8ed;
}

.catalog-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.15;
}

.catalog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.catalog-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  color: var(--muted);
  background: rgba(43, 34, 53, 0.78);
  border: 1px solid rgba(246, 196, 79, 0.24);
  border-radius: var(--radius);
  font-weight: 850;
  text-align: center;
}

.draw-screen {
  display: grid;
  place-items: center;
}

.maintenance-screen {
  display: grid;
  place-items: center;
}

.maintenance-panel {
  width: min(680px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  background: rgba(33, 26, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 54px rgba(4, 3, 10, 0.5);
  text-align: center;
  animation: screen-pop 360ms ease both;
}

.maintenance-panel p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.55;
}

.draw-panel {
  width: min(720px, 100%);
  display: grid;
  gap: 20px;
  padding: 30px;
  background: rgba(33, 26, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 54px rgba(4, 3, 10, 0.5);
  text-align: center;
  animation: screen-pop 360ms ease both;
}

.roulette-window {
  min-height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 14px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(246, 196, 79, 0.9), rgba(239, 102, 88, 0.76)),
    var(--violet-strong);
  border-radius: var(--radius);
}

.roulette-ticker {
  width: 100%;
  padding: 18px 16px;
  background: rgba(8, 7, 13, 0.42);
  border: 1px solid rgba(255, 247, 232, 0.32);
  border-radius: var(--radius);
  font-size: clamp(1.15rem, 4vw, 2.3rem);
  font-weight: 950;
  line-height: 1.1;
  animation: ticker-flash 420ms ease infinite alternate;
}

.roulette-lock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px 16px;
  color: #ffffff;
  background: var(--black-ink);
  border: 1px solid rgba(246, 196, 79, 0.34);
  border-radius: var(--radius);
  text-align: left;
}

.roulette-lock span {
  grid-column: 1 / -1;
  opacity: 0.74;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.roulette-lock strong {
  min-width: 0;
  font-size: clamp(1.05rem, 3vw, 1.6rem);
  line-height: 1.1;
}

.roulette-lock em {
  padding: 8px 12px;
  color: #ffffff;
  background: var(--coral);
  border-radius: 999px;
  font-style: normal;
  font-weight: 950;
}

.button-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.game-screen {
  display: grid;
  grid-template-rows: auto auto 9px minmax(0, 1fr) auto;
  align-content: stretch;
  gap: clamp(8px, 1.3vw, 14px);
}

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

.round-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 92px));
  gap: 8px;
}

.round-stats div {
  min-height: clamp(54px, 7vh, 66px);
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  background: rgba(43, 34, 53, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.28);
}

.round-stats strong {
  font-size: 1.2rem;
}

.target-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: clamp(10px, 1.5vw, 14px) clamp(12px, 1.8vw, 16px);
  color: #ffffff;
  background:
    repeating-linear-gradient(120deg, rgba(255, 247, 232, 0.04) 0 2px, transparent 2px 16px),
    linear-gradient(135deg, var(--black-ink), #251d2f);
  border: 1px solid rgba(246, 196, 79, 0.36);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.34);
}

.target-strip strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.target-code {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 9px 12px;
  color: #ffffff;
  background: var(--coral);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(8, 7, 13, 0.34);
  text-align: center;
  font-weight: 950;
}

.timer-track {
  height: 9px;
  overflow: hidden;
  background: #30283b;
  border-radius: 999px;
}

#timerBar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--coral));
  border-radius: inherit;
  transition: width 120ms linear;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.1vw, 12px);
  min-height: 0;
}

.card-choice {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 10px;
  color: var(--ink);
  background: rgba(43, 34, 53, 0.96);
  border: 2px solid rgba(246, 196, 79, 0.22);
  border-radius: 12px;
  box-shadow:
    4px 4px 0 rgba(8, 7, 13, 0.36),
    0 12px 28px rgba(4, 3, 10, 0.38);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
  animation: card-rise 360ms ease both;
}

.card-choice:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  border-color: var(--gold);
  box-shadow:
    6px 6px 0 rgba(8, 7, 13, 0.48),
    0 18px 36px rgba(239, 102, 88, 0.14);
}

.card-choice[disabled] {
  cursor: default;
}

.card-choice.is-correct {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(65, 220, 149, 0.18);
}

.card-choice.is-wrong {
  border-color: var(--coral);
  opacity: 0.76;
}

.card-choice__art {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #16121c;
}

.card-choice__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0 32%, rgba(246, 196, 79, 0.18) 45%, transparent 58%),
    linear-gradient(135deg, rgba(118, 87, 170, 0.16), rgba(95, 199, 177, 0.08));
  transform: translateX(-100%);
  animation: art-loading 1.2s ease-in-out infinite;
}

.card-choice__art.is-loaded::before {
  display: none;
}

.card-choice__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 180ms ease;
}

.card-choice__art.is-loaded img {
  opacity: 1;
}

.card-choice__meta {
  display: grid;
  gap: 6px;
  padding: 10px 2px 2px;
  text-align: left;
}

.card-choice__name {
  min-height: 2.2em;
  color: var(--ink);
  font-size: clamp(0.82rem, 1.25vw, 0.98rem);
  font-weight: 950;
  line-height: 1.12;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-choice__details {
  color: var(--muted);
  font-size: clamp(0.68rem, 1vw, 0.8rem);
  font-weight: 750;
  line-height: 1.25;
}

.feedback {
  min-height: 28px;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.feedback.is-good {
  color: var(--green);
}

.feedback.is-bad {
  color: var(--coral);
}

.result-screen {
  display: grid;
  place-items: center;
}

.result-card {
  width: min(680px, 100%);
  display: grid;
  gap: 18px;
  padding: 30px;
  background: rgba(33, 26, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 54px rgba(4, 3, 10, 0.5);
  text-align: center;
  animation: screen-pop 360ms ease both;
}

.final-score {
  display: grid;
  gap: 2px;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--black-ink), rgba(239, 102, 88, 0.48));
  border: 1px solid rgba(246, 196, 79, 0.4);
  border-radius: var(--radius);
}

.final-score span {
  opacity: 0.74;
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.final-score strong {
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: 1;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.result-stats div {
  display: grid;
  gap: 6px;
  padding: 14px 10px;
  background: rgba(43, 34, 53, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(8, 7, 13, 0.28);
}

.result-stats dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.result-stats dd {
  margin: 0;
  font-weight: 950;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.legal-note {
  margin: 0;
  flex: 0 0 auto;
  padding: 8px clamp(14px, 2vw, 26px) 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  border-top: 1px solid rgba(246, 196, 79, 0.16);
}

.card-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.card-modal__backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(246, 196, 79, 0.16), transparent 34%),
    rgba(5, 4, 10, 0.82);
  border: 0;
  backdrop-filter: blur(10px);
}

.card-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92dvh, 920px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  justify-items: center;
  padding: clamp(14px, 2.4vw, 22px);
  background: linear-gradient(145deg, rgba(33, 26, 42, 0.96), rgba(28, 23, 38, 0.96));
  border: 1px solid rgba(246, 196, 79, 0.42);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.66);
  animation: preview-enter 220ms ease both;
  perspective: 1100px;
}

.card-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: rgba(12, 10, 20, 0.8);
  border: 1px solid rgba(246, 196, 79, 0.42);
  border-radius: 999px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.card-modal__close:hover {
  background: rgba(239, 102, 88, 0.52);
}

.card-modal__frame {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  --shine-y: 20%;
  position: relative;
  width: min(74vw, 390px);
  max-width: 100%;
  max-height: calc(92dvh - 138px);
  aspect-ratio: 0.715;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #090812;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.58),
    0 0 32px rgba(246, 196, 79, 0.12);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition:
    transform 120ms ease,
    box-shadow 160ms ease;
  will-change: transform;
}

.card-modal__frame::after {
  display: none;
}

.card-modal__frame:hover::after {
  display: none;
}

.card-modal__frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: translateZ(20px);
}

.card-modal__info {
  width: min(420px, 100%);
  display: grid;
  gap: 6px;
  text-align: center;
}

.card-modal__info h2 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  line-height: 1.1;
}

.card-modal__info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.card-modal[hidden] {
  display: none !important;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes screen-pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-float {
  0%,
  100% {
    transform: rotate(2deg) translateY(0);
  }
  50% {
    transform: rotate(1deg) translateY(-7px);
  }
}

@keyframes ticker-flash {
  from {
    border-color: rgba(255, 255, 255, 0.22);
    filter: brightness(1);
  }
  to {
    border-color: rgba(255, 255, 255, 0.48);
    filter: brightness(1.08);
  }
}

@keyframes art-loading {
  to {
    transform: translateX(100%);
  }
}

@keyframes preview-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 10px;
  }

  .game-panel {
    width: 100%;
    height: calc(100dvh - 20px);
  }

  .topbar {
    flex-wrap: wrap;
  }

  .top-nav {
    order: 3;
    width: 100%;
  }

  .nav-button {
    flex: 1 1 0;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .home-side {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .dashboard-card {
    min-height: 130px;
  }

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

  .catalog-search {
    grid-column: 1 / -1;
  }

  .intro-grid,
  .round-head {
    grid-template-columns: 1fr;
  }

  .preview-card {
    display: none;
  }

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

  .round-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card-choice {
    padding: 8px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 6px;
  }

  .game-panel {
    height: calc(100dvh - 12px);
    border-radius: 12px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }

  .game-panel.is-compact-view .topbar {
    flex-wrap: nowrap;
    padding: 6px;
    gap: 6px;
  }

  .topbar .eyebrow {
    font-size: 0.62rem;
  }

  h1 {
    font-size: clamp(1.8rem, 11vw, 2.75rem);
  }

  h2 {
    font-size: clamp(1.2rem, 7vw, 1.85rem);
  }

  .score-pill {
    min-width: 78px;
    padding: 8px 10px;
    text-align: right;
  }

  .score-pill span {
    font-size: 0.62rem;
  }

  .score-pill strong {
    font-size: 1.05rem;
  }

  .game-panel.is-compact-view .score-pill {
    min-width: 64px;
    padding: 6px 8px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    padding: 4px;
    gap: 4px;
  }

  .nav-button {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .game-panel.is-compact-view .top-nav {
    order: 0;
    flex: 1 1 auto;
    width: auto;
  }

  .game-panel.is-compact-view .nav-button {
    min-height: 34px;
    padding-inline: 6px;
  }

  .screen {
    padding: 10px;
  }

  .home-screen {
    gap: 8px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
  }

  .home-side {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-copy {
    gap: 7px;
  }

  .home-copy h2 {
    font-size: clamp(1.45rem, 8vw, 2.35rem);
  }

  .home-copy p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .home-actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .dashboard-card {
    min-height: 82px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
  }

  .dashboard-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .dashboard-card__icon svg {
    width: 21px;
    height: 21px;
  }

  .dashboard-card strong {
    font-size: 1rem;
  }

  .dashboard-card em {
    font-size: 0.72rem;
  }

  .home-stats {
    gap: 6px;
  }

  .home-stats div {
    padding: 8px;
  }

  .home-stats span {
    font-size: 0.58rem;
  }

  .home-stats strong {
    font-size: 1rem;
  }

  .setup-screen {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
  }

  .intro-grid {
    gap: 0;
  }

  .intro-copy {
    min-height: auto;
    gap: 6px;
  }

  .intro-copy p {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .data-status {
    padding: 6px 8px;
    font-size: 0.72rem !important;
  }

  .setup-form {
    grid-template-columns: 1fr;
    gap: 7px;
    align-content: stretch;
  }

  .setup-form > .primary-action {
    grid-column: 1;
  }

  fieldset {
    padding: 8px;
  }

  legend {
    font-size: 0.66rem;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .segmented-control span,
  select {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .catalog-screen {
    gap: 6px;
  }

  .catalog-head {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .catalog-head .eyebrow {
    display: none;
  }

  .catalog-head h2 {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
    line-height: 1.05;
  }

  .catalog-head .secondary-action {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .catalog-filter-panel summary {
    min-height: 38px;
    gap: 7px;
    padding: 8px 10px;
  }

  .catalog-filter-panel summary span,
  .catalog-filter-panel summary em {
    font-size: 0.68rem;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .catalog-search {
    grid-column: auto;
  }

  .catalog-toolbar label > span {
    font-size: 0.6rem;
  }

  .catalog-toolbar input {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .catalog-meta {
    font-size: 0.7rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding-right: 2px;
  }

  .catalog-card {
    min-height: 224px;
    grid-template-rows: minmax(0, 1fr);
    border-radius: 9px;
  }

  .catalog-card__art {
    height: 100%;
    min-height: 210px;
    margin: 7px;
    border-radius: 7px;
  }

  .catalog-card__body {
    display: none;
  }

  .catalog-card__badge {
    padding: 4px 6px;
    font-size: 0.58rem;
  }

  .catalog-card h3 {
    font-size: 0.78rem;
  }

  .catalog-card p {
    font-size: 0.64rem;
  }

  .card-modal {
    padding: 10px;
  }

  .card-modal__panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .card-modal__close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }

  .card-modal__frame {
    width: min(86vw, 330px);
    max-height: calc(100dvh - 122px);
    border-radius: 14px;
  }

  .card-modal__info h2 {
    font-size: 1rem;
  }

  .card-modal__info p {
    font-size: 0.7rem;
  }

  .target-strip {
    align-items: center;
    flex-direction: row;
    padding: 8px 10px;
  }

  .target-strip span {
    font-size: 0.64rem;
  }

  .target-strip strong {
    font-size: 0.94rem;
  }

  .target-code {
    min-width: 52px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .roulette-lock {
    grid-template-columns: 1fr;
  }

  .round-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .round-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .round-stats div {
    min-height: 42px;
    padding: 6px;
  }

  .round-stats span {
    font-size: 0.6rem;
  }

  .round-stats strong {
    font-size: 0.9rem;
  }

  .game-screen {
    grid-template-rows: auto auto 7px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .game-screen .eyebrow {
    font-size: 0.6rem;
  }

  .game-screen h2 {
    font-size: clamp(1.1rem, 6vw, 1.6rem);
    white-space: nowrap;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .card-choice {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: stretch;
    padding: 6px;
    border-radius: 9px;
  }

  .card-choice__art {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 7px;
  }

  .card-choice__meta {
    min-width: 0;
    padding: 0;
    gap: 3px;
  }

  .card-choice__name {
    min-height: 0;
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .card-choice__details {
    display: none;
    font-size: 0.6rem;
  }

  .feedback {
    min-height: 18px;
    font-size: 0.76rem;
  }

  .result-card,
  .maintenance-panel,
  .draw-panel {
    gap: 10px;
    padding: 16px;
  }

  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .result-stats div {
    padding: 9px 6px;
  }

  .result-stats dt {
    font-size: 0.62rem;
  }

  .result-actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .primary-action,
  .secondary-action {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 0.86rem;
  }

  .legal-note {
    padding-inline: 18px;
    padding-block: 6px 8px;
    font-size: 0.58rem;
  }
}

@media (max-height: 720px) and (min-width: 621px) {
  .topbar {
    padding-block: 10px;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
  }

  h2 {
    font-size: clamp(1.35rem, 3vw, 2.25rem);
  }

  .screen {
    padding-block: 12px;
  }

  .setup-screen {
    grid-template-rows: auto auto;
    gap: 10px;
  }

  .intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-card {
    display: none;
  }

  .intro-copy {
    gap: 8px;
  }

  .intro-copy p {
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .home-screen {
    gap: 10px;
  }

  .home-hero {
    align-items: center;
  }

  .home-side {
    grid-template-columns: 1fr;
  }

  .home-copy {
    gap: 8px;
  }

  .home-copy h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
  }

  .home-copy p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .dashboard-card {
    min-height: 112px;
    padding: 14px;
  }

  .catalog-toolbar {
    padding: 9px;
  }

  .catalog-toolbar input,
  .catalog-toolbar select {
    min-height: 38px;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 9px;
  }

  .catalog-card {
    min-height: 288px;
  }

  .catalog-card__art {
    min-height: 164px;
  }

  .card-choice__meta {
    padding-top: 7px;
  }

  .legal-note {
    padding-block: 6px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .card-modal__frame {
    transform: none !important;
  }
}
