/* components.css - shared components + non-game surfaces, layer 2.
   Loaded on every game-app page, after base.css. Holds shared primitives
   (buttons, links, cards, messages, footer) and the non-game surfaces:
   marketing/landing, menu, auth, results-shared, broker ops, analytics.
   The live game surface lives in game.css (layer 3), loaded only on game
   pages. Keep game-only rules out of this file. See
   docs/11-css-architecture.md. */

.marketing-shell,
.menu-shell,
.auth-shell {
  min-height: 100dvh;
  padding: var(--space-3);
}

.messages {
  position: fixed;
  top: var(--space-3);
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100vw - var(--space-4)));
  transform: translateX(-50%);
  animation: messages-dismiss 5.2s ease forwards;
}

.message {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.auth-shell {
  display: grid;
  place-items: center;
}

.marketing-shell {
  display: grid;
  align-items: start;
  justify-items: center;
  overflow-x: hidden;
  padding-inline: 0;
}

.marketing-hero,
.menu-header,
.mode-grid,
.auth-card {
  width: 100%;
  max-width: 1120px;
}


.landing-nav {
  width: min(1120px, calc(100% - var(--space-6)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 auto;
  padding: 16px 0;
}

.landing-brand {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 12px 4px;
  margin: -12px -4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.landing-brand small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-nav div {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.landing-nav a:not(.landing-brand) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  margin: 0 -6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.landing-nav a:hover {
  color: var(--ink);
}

.marketing-hero {
  width: min(1120px, calc(100% - var(--space-6)));
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(var(--space-5), 5vw, 64px);
  align-items: center;
  min-height: calc(100dvh - 116px);
  margin: 0 auto;
  padding: clamp(var(--space-5), 5vw, 56px) 0 48px;
}

.marketing-copy {
  min-width: 0;
  max-width: 100%;
}

.marketing-copy h1 {
  max-width: 720px;
  font-size: clamp(3rem, 5.6vw, 5.25rem);
  line-height: 0.98;
  overflow-wrap: normal;
  text-wrap: balance;
  white-space: normal;
}

.marketing-lede {
  min-width: 0;
  max-width: 560px;
  margin: var(--space-4) 0 0;
  color: #3f3a33;
  font-size: clamp(1.02rem, 1.6vw, 1.24rem);
  font-weight: 750;
  line-height: 1.48;
  overflow-wrap: break-word;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.marketing-actions .inline-action-form,
.marketing-actions .primary-action,
.marketing-actions .primary-link,
.marketing-actions .secondary-link {
  max-width: 100%;
}

.landing-mechanics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 620px;
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.landing-mechanics span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.landing-mechanics strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(13, 118, 111, 0.28);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.84rem;
  line-height: 1;
}

.landing-guess-ticket {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(157, 163, 157, 0.36), 0 14px 28px rgba(31, 27, 20, 0.12);
  transform: rotate(-0.6deg);
}

.landing-guess-ticket span,
.landing-guess-ticket small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-guess-ticket strong {
  font-size: clamp(1rem, 1.6vw, 1.26rem);
}

.landing-shell {
  position: relative;
  display: block;
  background: #fbf7ef;
}

.landing-shell .landing-nav {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: min(1180px, calc(100% - var(--space-6)));
  padding: 18px 0;
  transform: translateX(-50%);
}

.landing-shell .landing-brand {
  color: var(--ink);
  text-shadow: none;
}

.landing-shell .landing-nav a:not(.landing-brand) {
  padding: 7px 10px;
  border: 1px solid rgba(23, 26, 23, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 8px 18px rgba(31, 27, 20, 0.07);
}

.landing-shell .landing-nav a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.landing-shell .marketing-hero {
  position: relative;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: clamp(var(--space-4), 4vw, 52px);
  align-items: end;
  min-height: min(760px, calc(100dvh - 22px));
  padding: 96px max(var(--space-6), calc((100vw - 1180px) / 2)) 42px;
  overflow: hidden;
  isolation: isolate;
  background: #fbf7ef;
}

.landing-shell .marketing-hero::before,
.landing-shell .marketing-hero::after {
  display: none;
}

.landing-shell .marketing-copy {
  padding-bottom: clamp(var(--space-2), 3vw, var(--space-5));
  color: var(--ink);
}

.landing-shell .marketing-copy h1 {
  text-shadow: none;
}

.landing-shell .marketing-copy .eyebrow {
  color: var(--muted);
}

.landing-shell .marketing-lede {
  max-width: 620px;
  color: #3f3a33;
  text-shadow: none;
}

.landing-shell .marketing-actions .secondary-link {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 236, 231, 0.96));
  color: var(--ink);
}

.landing-shell .landing-mechanics {
  margin-top: var(--space-4);
  border-top-color: rgba(23, 26, 23, 0.12);
}

.landing-shell .landing-mechanics span {
  color: var(--muted);
}

.landing-shell .landing-mechanics strong {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(180deg, #2796a2, var(--accent));
  color: white;
  box-shadow: var(--button-highlight), 0 1px 1px rgba(6, 64, 58, 0.34), 0 6px 14px rgba(31, 27, 20, 0.1);
}

.broker-demo-copy h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4.6vw, 4rem);
}

.broker-demo-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.broker-demo-points span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.broker-demo-inventory {
  display: grid;
  gap: var(--space-3);
}

.broker-demo-listing {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 144px;
  padding: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(31, 27, 20, 0.1);
}

.broker-demo-listing img {
  width: 132px;
  height: 108px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--panel-soft);
}

.broker-demo-listing small,
.broker-demo-listing strong,
.broker-demo-listing span {
  display: block;
}

.broker-demo-listing small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.broker-demo-listing strong {
  margin-top: 4px;
  font-size: 1.02rem;
}

.broker-demo-listing span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.broker-demo-credit {
  margin: var(--space-2) 0 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.broker-demo-credit .broker-logo {
  width: 30px;
  height: 30px;
  font-size: 0.62rem;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 780;
  letter-spacing: 0;
  text-decoration: none;
  user-select: none;
}

.primary-link {
  border-color: rgba(8, 79, 72, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 46%),
    linear-gradient(180deg, #2796a2, var(--accent));
  color: white;
  box-shadow: var(--button-highlight), var(--button-shadow);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.secondary-link {
  border-color: rgba(23, 26, 23, 0.22);
  background:
    linear-gradient(180deg, white, rgba(241, 243, 240, 0.96));
  color: var(--ink);
  box-shadow: var(--button-highlight), var(--button-shadow-soft);
}

.primary-link:hover:not(:disabled) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(180deg, #238d99, var(--accent-dark));
  transform: translateY(-1px);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(7, 54, 49, 0.5), 0 12px 24px rgba(13, 44, 39, 0.22);
}

.secondary-link:hover:not(:disabled) {
  border-color: rgba(15, 107, 97, 0.3);
  background:
    linear-gradient(180deg, white, rgba(232, 238, 234, 0.98));
  transform: translateY(-1px);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(123, 130, 124, 0.45), 0 10px 22px rgba(20, 28, 24, 0.13);
}

.primary-link:active:not(:disabled),
.secondary-link:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: var(--button-press), 0 3px 10px rgba(20, 28, 24, 0.1);
}

.preview-board {
  min-height: 360px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-map {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(32deg, transparent 0 45%, var(--road) 45% 47%, transparent 47%),
    linear-gradient(120deg, transparent 0 38%, var(--road) 38% 40%, transparent 40%),
    #dfe4e1;
}

.preview-marker {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 36px;
  padding: 0 10px;
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  box-shadow: 0 8px 18px rgba(31, 27, 20, 0.28);
  font-size: 0.8rem;
  font-weight: 800;
}

.preview-marker.target {
  left: 46%;
  top: 42%;
  min-width: 40px;
  background: var(--target);
}

.preview-marker.comp {
  background: var(--accent);
}

.preview-marker.a {
  left: 24%;
  top: 28%;
}

.preview-marker.b {
  right: 20%;
  top: 34%;
}

.preview-card {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.preview-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 720;
  text-transform: uppercase;
}

.preview-card strong {
  display: block;
  margin-top: var(--space-1);
}

.landing-preview {
  position: relative;
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-xl);
  background: rgba(247, 248, 247, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 2px 2px rgba(91, 97, 91, 0.28), 0 24px 46px rgba(31, 27, 20, 0.18);
  backdrop-filter: blur(12px);
  animation: landing-preview-rise 420ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.landing-preview::before {
  content: "?";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid white;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #d18464, var(--target));
  color: white;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 1px 1px rgba(105, 24, 18, 0.5), 0 10px 20px rgba(31, 27, 20, 0.18);
  animation: target-pulse 2.2s ease-in-out infinite;
}

.landing-preview-heading {
  width: 100%;
  min-width: 0;
}

.landing-preview-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.06;
  overflow-wrap: break-word;
}

.landing-preview-card {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-preview-card.featured {
  grid-template-columns: 1fr;
  align-content: start;
}

.landing-preview-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.landing-preview-media > img:first-child,
.landing-preview-card > img {
  width: 100%;
  height: clamp(240px, 28vw, 360px);
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #d9dedb;
  box-shadow: 0 0 0 1px rgba(23, 26, 23, 0.08), 0 12px 24px rgba(31, 27, 20, 0.12);
}

.landing-pelican-video,
.landing-pelican-still {
  position: absolute;
  left: 50%;
  bottom: clamp(-54px, -3.9vw, -34px);
  z-index: 5;
  width: clamp(170px, 20vw, 246px);
  height: auto;
  filter: drop-shadow(0 16px 20px rgba(31, 27, 20, 0.2));
  pointer-events: none;
  background: transparent;
  transform: translateX(-50%);
  transition: none;
}

.landing-pelican-video {
  z-index: 6;
  opacity: 1;
  mix-blend-mode: normal;
}

.landing-preview-media.is-pelican-ready .landing-pelican-video {
  opacity: 1;
}

.landing-preview-media.is-pelican-ready .landing-pelican-still {
  opacity: 0;
}

.landing-preview-card small,
.landing-preview-card strong,
.landing-preview-card span {
  display: block;
  overflow-wrap: anywhere;
}

.landing-preview-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.landing-preview-card strong {
  margin-top: 4px;
  font-size: clamp(1.28rem, 2.2vw, 1.78rem);
}

.landing-preview-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.landing-comp-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.landing-comp-strip span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(23, 26, 23, 0.14);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, white, rgba(241, 243, 240, 0.96));
  box-shadow: var(--button-highlight), 0 1px 1px rgba(163, 169, 163, 0.35), 0 8px 18px rgba(20, 28, 24, 0.08);
}

.landing-comp-strip small,
.landing-comp-strip strong {
  display: block;
}

.landing-comp-strip small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  text-transform: uppercase;
}

.landing-comp-strip strong {
  margin-top: 4px;
  font-size: 1.08rem;
}

/* --- Landing: boxy catalog treatment. Landing-only selectors (shared
   primitives untouched): flatten the glass/soft cards into hairline boxes, sharp
   4px radii, straighten the price ticket, tabular price numerals. --- */
.landing-guess-ticket {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: none;
}

.landing-guess-ticket strong {
  font-variant-numeric: tabular-nums;
}

.landing-preview {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.landing-preview-media,
.landing-preview-media > img:first-child,
.landing-preview-card > img {
  border-radius: 4px;
}

.landing-preview-card > img,
.landing-preview-media > img:first-child {
  box-shadow: 0 0 0 1px var(--line);
}

.landing-comp-strip span {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: none;
}

.landing-comp-strip strong {
  font-variant-numeric: tabular-nums;
}

.landing-mechanics strong {
  border-radius: 4px;
}

.landing-shell .landing-nav a:not(.landing-brand) {
  border-radius: 4px;
}

/* --- Landing push: denser / more editorial catalog. Tighten the airy hero;
   turn the mechanics + preview comps into hairline "catalog" tables. --- */
.landing-shell .marketing-hero {
  padding-top: 44px;
  padding-bottom: 44px;
  align-items: center;
}

.landing-mechanics {
  gap: 1px;
  margin-top: var(--space-3);
  padding-top: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
}

.landing-mechanics span {
  padding: 11px 12px;
  background: var(--panel);
}

.landing-mechanics strong {
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.landing-preview {
  gap: var(--space-2);
  padding: var(--space-2);
}

.landing-comp-strip {
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
}

.landing-comp-strip span {
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
  background: var(--panel);
}

.landing-credit {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  padding: var(--space-2);
  border: 1px solid rgba(23, 26, 23, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
}

.landing-credit small,
.landing-credit strong {
  margin: 0;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.88rem;
  font-weight: 750;
}

.site-footer:not(.site-footer--landing) {
  width: min(1180px, calc(100% - var(--space-6)));
  margin: var(--space-4) auto;
  padding: var(--space-3);
  border: 1px solid rgba(23, 26, 23, 0.1);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 244, 241, 0.9));
  color: var(--muted);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(174, 179, 173, 0.32), 0 12px 26px rgba(20, 28, 24, 0.07);
}

.footer-brand {
  display: grid;
  gap: 2px;
  min-width: min(100%, 280px);
}

.footer-brand strong {
  font-size: 0.98rem;
  font-weight: 900;
}

.footer-brand span {
  font-size: 0.82rem;
  font-weight: 740;
}

.site-footer:not(.site-footer--landing) .footer-brand strong {
  color: var(--ink);
}

.site-footer:not(.site-footer--landing) .footer-brand span {
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  text-decoration: none;
}

.site-footer:not(.site-footer--landing) a {
  border: 1px solid rgba(23, 26, 23, 0.12);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, white, rgba(241, 243, 240, 0.96));
  color: var(--ink);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(163, 169, 163, 0.28), 0 6px 14px rgba(20, 28, 24, 0.06);
}

.site-footer:not(.site-footer--landing) a:hover {
  transform: translateY(-1px);
  box-shadow: var(--button-highlight), 0 1px 1px rgba(143, 150, 144, 0.38), 0 10px 18px rgba(20, 28, 24, 0.1);
}

.site-footer--landing {
  width: 100%;
  margin: 0;
  padding: var(--space-4) max(var(--space-6), calc((100vw - 1180px) / 2));
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  background:
    linear-gradient(180deg, #151815, #101310);
  color: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.site-footer--landing .footer-brand strong {
  color: white;
}

.site-footer--landing .footer-brand span {
  color: rgba(255, 255, 255, 0.62);
}

.site-footer--landing a {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.24), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.site-footer--landing a:hover {
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 1px 1px rgba(0, 0, 0, 0.28), 0 10px 22px rgba(0, 0, 0, 0.2);
}

.legal-shell {
  display: grid;
  gap: var(--space-3);
}

.legal-card {
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 34px rgba(31, 27, 20, 0.08);
}

.legal-card h2 {
  margin-bottom: var(--space-2);
}

.legal-card p {
  max-width: 840px;
  color: var(--muted);
  line-height: 1.58;
}

.legal-card p:last-child {
  margin-bottom: 0;
}


/* --- Mode-select catalog (menu.html) -----------------------------------------
   Self-contained dense "catalog" surface. Everything is scoped under
   .menu-catalog (or uses fresh cat-* / mode--* classes) so it never disturbs the
   shared .menu-shell / .menu-header / .mode-card / .history-* primitives that
   results, profile, broker and analytics pages rely on. The three test-locked
   menu-only classes (.menu-subtitle, .mode-switcher, .game-format-strip) are
   restyled here under the .menu-catalog scope, which wins on specificity. Mode
   accents are drawn only from existing base.css brand tokens - no new hues. */
.menu-catalog {
  --cat-hair: var(--line);
  --cat-radius: 4px;
  --cat-gap: var(--space-3);
  --cat-pad: var(--space-4);
  --cat-label: 0.68rem;
  --cat-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --mode-quick: var(--accent);
  --mode-daily: var(--target);
  --mode-party: var(--accent-dark);
  --mode-custom: var(--muted);

  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--space-3);
  display: grid;
  gap: var(--cat-gap);
  align-content: start;
}

@media (min-width: 640px) {
  .menu-catalog { padding: var(--space-4); }
}

/* Tabular figures wherever data lives - the "catalog" numeral look. */
.menu-catalog .cat-index,
.menu-catalog .cat-rank,
.menu-catalog .cat-board-score,
.menu-catalog .cat-board-count,
.menu-catalog .cat-history-score,
.menu-catalog .cat-history-meta,
.menu-catalog .cat-resume-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Masthead */
.cat-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--cat-hair);
}

.cat-brand .eyebrow { margin-bottom: 2px; }
.cat-title { font-size: var(--step-2); line-height: 1.05; }

.cat-account {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  text-align: right;
}

.cat-ident { color: var(--muted); font-size: var(--step-0); font-weight: 620; }
.cat-ident strong { color: var(--ink); font-weight: 760; }

.cat-account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }

.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--cat-hair);
  border-radius: var(--cat-radius);
  background: var(--panel);
  color: var(--ink);
  font-size: var(--step-0);
  font-weight: 680;
  text-decoration: none;
}

.cat-chip:hover { border-color: rgba(15, 107, 97, 0.4); color: var(--accent-dark); }
.cat-chip--action { background: linear-gradient(180deg, white, rgba(241, 243, 240, 0.96)); }

/* Subtitle (test-locked class, scoped restyle) */
.menu-catalog .menu-subtitle {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 620;
  line-height: 1.5;
}

/* Guest nudge - links to signup, which converts the temporary guest account
   into a real one in place (keeping match history). */
.cat-guest {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(159, 47, 37, 0.4);
  border-left: 3px solid var(--target);
  border-radius: var(--cat-radius);
  background: rgba(159, 47, 37, 0.05);
  color: var(--ink);
  font-size: var(--step-0);
  text-decoration: none;
}

.cat-guest:hover { background: rgba(159, 47, 37, 0.09); }
.cat-guest span:nth-child(2) { flex: 1; }

.cat-guest-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--target);
  color: white;
  font-size: var(--cat-label);
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-guest-go { flex: none; color: var(--target); font-size: 1.3rem; font-weight: 700; }

/* Control ribbon: mode switcher + how it works */
.cat-ribbon {
  border: 1px solid var(--cat-hair);
  border-radius: var(--cat-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cat-ribbon-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--cat-hair);
}

.cat-ribbon-label {
  color: var(--muted);
  font-size: var(--cat-label);
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mode switcher (test-locked class, scoped restyle to a boxed segmented control) */
.menu-catalog .mode-switcher {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--cat-hair);
  border-radius: var(--cat-radius);
  background: rgba(15, 118, 110, 0.06);
}

.menu-catalog .mode-switch-option {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 var(--space-3);
  border-radius: 3px;
  color: var(--accent-dark);
  font-size: var(--step-0);
  font-weight: 700;
  text-decoration: none;
}

.menu-catalog .mode-switch-option:hover { background: rgba(15, 118, 110, 0.12); }
.menu-catalog .mode-switch-option.is-active { background: var(--accent); color: white; }

/* How it works (test-locked class, scoped restyle to a tight legend) */
.menu-catalog .game-format-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  width: auto;
}

.menu-catalog .game-format-strip article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas: "idx title" "idx copy";
  column-gap: var(--space-3);
  row-gap: 2px;
  align-items: start;
  padding: var(--space-3);
  border: 0;
  border-top: 1px solid var(--cat-hair);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.menu-catalog .game-format-strip article:first-child { border-top: 0; }

.menu-catalog .game-format-strip span {
  grid-area: idx;
  width: auto;
  height: auto;
  place-items: start;
  background: none;
  font-family: var(--cat-mono);
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--accent);
}

.menu-catalog .game-format-strip strong { grid-area: title; font-size: var(--step-0); }

.menu-catalog .game-format-strip p {
  grid-area: copy;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Resume strip */
.cat-resume {
  display: grid;
  gap: var(--space-2);
  padding: var(--cat-pad);
  border: 1px solid var(--cat-hair);
  border-left: 3px solid var(--accent);
  border-radius: var(--cat-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cat-resume > .eyebrow { margin: 0; }
.cat-resume-list { display: grid; gap: var(--space-2); }

.cat-resume-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--cat-hair);
}

.cat-resume-list .cat-resume-item:first-child { border-top: 0; }

.cat-resume-status {
  padding: 2px 8px;
  border: 1px solid var(--cat-hair);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: var(--cat-label);
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-resume-title { min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-resume-count { color: var(--muted); font-size: var(--step-0); font-weight: 700; }

.cat-resume-go {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid rgba(8, 79, 72, 0.92);
  border-radius: var(--cat-radius);
  background: linear-gradient(180deg, #2796a2, var(--accent));
  color: white;
  font-size: var(--step-0);
  font-weight: 780;
  text-decoration: none;
}

.cat-resume-go:hover { background: linear-gradient(180deg, #238d99, var(--accent-dark)); }

/* Mode catalog */
.cat-modes { display: grid; grid-template-columns: 1fr; gap: var(--cat-gap); }

.cat-mode {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--cat-pad);
  border: 1px solid var(--cat-hair);
  border-left: 3px solid var(--mode-accent, var(--cat-hair));
  border-radius: var(--cat-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.cat-mode:hover { box-shadow: var(--shadow-strong); transform: translateY(-1px); }

.mode--quick { --mode-accent: var(--mode-quick); }
.mode--daily { --mode-accent: var(--mode-daily); }
.mode--party { --mode-accent: var(--mode-party); }
.mode--custom { --mode-accent: var(--mode-custom); }

.cat-mode-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }

.cat-index {
  font-family: var(--cat-mono);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--mode-accent, var(--muted));
}

.cat-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 107, 97, 0.1);
  background: color-mix(in srgb, var(--mode-accent, var(--muted)) 14%, transparent);
  color: var(--mode-accent, var(--muted));
  font-size: var(--cat-label);
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-mode h2 { margin: 0; font-size: var(--step-2); }
.cat-mode p { margin: 0; color: var(--muted); font-size: var(--step-0); line-height: 1.45; }

.cat-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--cat-hair);
  border-radius: var(--cat-radius);
  background: var(--panel);
  color: var(--ink);
  font-size: var(--step-0);
  font-weight: 760;
  text-decoration: none;
}

.cat-cta:hover { border-color: var(--mode-accent, var(--accent)); color: var(--accent-dark); }
.cat-cta-arrow { font-size: 1.3rem; line-height: 1; }

/* Quick Play feature cell - the one filled, primary cell */
.cat-mode--feature {
  border-color: transparent;
  border-left-color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(160deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: var(--shadow-strong);
}

.cat-mode--feature h2 { font-size: var(--step-4); line-height: 1.02; }
.cat-mode--feature p { color: rgba(255, 255, 255, 0.86); font-size: var(--step-1); }
.cat-mode--feature .cat-index { color: rgba(255, 255, 255, 0.92); }
.cat-mode--feature .cat-tag { background: rgba(255, 255, 255, 0.18); color: white; }

.cat-cta--primary {
  justify-content: center;
  border-color: transparent;
  background: white;
  color: var(--accent-dark);
  font-weight: 820;
}

.cat-cta--primary:hover { color: var(--accent-dark); background: rgba(255, 255, 255, 0.9); }

/* Data panels: leaderboard + match history */
.cat-data { display: grid; grid-template-columns: 1fr; gap: var(--cat-gap); }

.cat-panel {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--cat-pad);
  border: 1px solid var(--cat-hair);
  border-radius: var(--cat-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cat-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--cat-hair);
}

.cat-panel-head .eyebrow { margin: 0; }
.cat-panel-head h2 { margin: 0; font-size: var(--step-1); }

.cat-board { list-style: none; margin: 0; padding: 0; display: grid; }

.cat-board-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
  border-bottom: 1px solid var(--cat-hair);
}

.cat-board-row:last-child { border-bottom: 0; }

.cat-rank { font-family: var(--cat-mono); font-weight: 700; color: var(--muted); text-align: right; }
.cat-board-row:first-child .cat-rank { color: var(--target); }

.cat-board-name { min-width: 0; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-board-name em { font-style: normal; font-size: var(--cat-label); font-weight: 780; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.cat-board-count { color: var(--muted); font-size: 0.8rem; font-weight: 620; }
.cat-board-score { font-family: var(--cat-mono); font-weight: 760; }
.cat-board-row.is-you { background: rgba(15, 107, 97, 0.07); border-radius: 3px; }

.cat-history { display: grid; }

.cat-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title score" "meta meta";
  align-items: center;
  gap: 2px var(--space-3);
  min-height: 44px;
  padding: var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
  border-bottom: 1px solid var(--cat-hair);
  color: var(--ink);
  text-decoration: none;
}

.cat-history-row:last-child { border-bottom: 0; }
.cat-history-row:hover { background: rgba(15, 107, 97, 0.05); border-radius: 3px; }

.cat-history-title { grid-area: title; min-width: 0; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-history-score { grid-area: score; font-family: var(--cat-mono); font-weight: 760; }
.cat-history-meta { grid-area: meta; color: var(--muted); font-size: 0.8rem; font-weight: 620; }

.cat-empty { margin: 0; color: var(--muted); font-size: var(--step-0); padding: var(--space-2) 0; }

@media (min-width: 640px) {
  .menu-catalog .game-format-strip { grid-template-columns: repeat(3, 1fr); }
  .menu-catalog .game-format-strip article { border-top: 0; border-left: 1px solid var(--cat-hair); }
  .menu-catalog .game-format-strip article:first-child { border-left: 0; }
}

/* Feature Quick Play becomes a full-width horizontal banner (content left, big
   Start on the right), with the three secondary modes as a 3-up row below - a
   denser catalog block than a tall feature cell with empty space. */
@media (min-width: 720px) {
  .cat-modes { grid-template-columns: repeat(3, 1fr); }
  .cat-mode--feature {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    grid-template-areas: "top cta" "title cta" "desc cta";
    align-items: center;
    column-gap: var(--space-6);
  }
  .cat-mode--feature .cat-mode-top { grid-area: top; }
  .cat-mode--feature h2 { grid-area: title; }
  .cat-mode--feature p { grid-area: desc; max-width: 48ch; }
  .cat-mode--feature .cat-cta--primary {
    grid-area: cta;
    align-self: center;
    min-height: 60px;
    padding: 0 var(--space-6);
  }
}

@media (min-width: 980px) {
  .cat-data { grid-template-columns: 1fr 1fr; }
}

.mode-card,
.setup-card,
.history-row,
.continue-card,
.landing-preview-card,
.legal-card,
.metric-card {
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.mode-card:hover,
.setup-card:hover,
a.history-row:hover,
.continue-card:hover,
.landing-preview-card:hover,
.legal-card:hover,
.metric-card:hover {
  border-color: rgba(13, 118, 111, 0.22);
  box-shadow: var(--shadow-strong);
}


.menu-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 auto var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.header-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.header-actions .inline-action-form {
  flex: 0 1 auto;
}

.header-actions .secondary-action,
.header-actions .secondary-link,
.header-actions .primary-link {
  min-width: 132px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0 auto;
}

.metric-grid {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 auto var(--space-4);
}

.dashboard-grid {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0 auto;
}

.metric-card {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.metric-card small,
.metric-card strong {
  display: block;
}

.metric-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: var(--space-1);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
}

.mode-card,
.auth-card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.mode-card h2 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.mode-card p {
  color: var(--muted);
  line-height: 1.5;
}

.mode-card .primary-link,
.mode-card .secondary-action,
.mode-card .secondary-link {
  width: 100%;
  margin-top: var(--space-3);
}

.setup-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: var(--space-3);
  margin: 0 auto;
  align-items: start;
}

.setup-panel,
.setup-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.setup-panel {
  padding: var(--space-4);
}

.setup-copy {
  max-width: 720px;
  margin: 0 0 var(--space-4);
  color: var(--muted);
  line-height: 1.5;
}

.settings-form {
  display: grid;
  gap: var(--space-4);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.setting-field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.setting-field span {
  display: block;
}

.setting-field select {
  min-width: 0;
  min-height: 52px;
  /* 16px+ or iOS Safari zooms the page when the field gets focus. */
  font-size: 1rem;
  width: 100%;
  padding: 0 42px 0 var(--space-3);
  border: 1px solid rgba(33, 31, 27, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 16px) 50% / 7px 7px no-repeat,
    white;
  color: var(--ink);
  font-weight: 750;
  appearance: none;
}

.setting-field small {
  color: var(--target);
  font-size: 0.78rem;
}

.setup-actions {
  display: flex;
  justify-content: flex-end;
}

.setup-actions .primary-action {
  min-width: 220px;
  padding: 0 var(--space-5);
}

.setup-sidebar {
  display: grid;
  gap: var(--space-3);
}

.setup-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.setup-card h2 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.setup-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.setup-card .compact-action {
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-1);
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.copy-field input {
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 750;
}

.copy-field .secondary-action {
  width: auto;
  margin-top: 0;
  padding: 0 var(--space-3);
}

.history-section {
  width: min(1120px, 100%);
  margin: var(--space-4) auto 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.history-heading h2 {
  margin-bottom: var(--space-3);
}

.history-list {
  display: grid;
  gap: var(--space-2);
}

.history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  text-decoration: none;
}

.history-row span,
.history-row small {
  color: var(--muted);
}

.history-row strong {
  font-weight: 750;
}

.broker-dashboard {
  display: grid;
  gap: var(--space-4);
}

.broker-dashboard .history-section {
  margin-top: 0;
}

.split-sections {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0 auto;
}

.broker-listing-table {
  display: grid;
  gap: var(--space-2);
}

.broker-listing-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr) auto;
  gap: var(--space-3);
  align-items: center;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
}

.broker-listing-row strong,
.broker-listing-row small {
  display: block;
}

.broker-listing-row small {
  color: var(--muted);
  font-weight: 650;
}

.broker-listing-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-width: 0;
}

.broker-listing-photos {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  grid-template-rows: repeat(2, 50px);
  gap: 3px;
  width: 132px;
  height: 103px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(23, 26, 23, 0.08);
}

.broker-listing-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(23, 26, 23, 0.08);
}

.broker-listing-photos img:first-child {
  grid-row: span 2;
}

.broker-listing-photos > span {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.broker-listing-photos small {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: rgba(23, 26, 23, 0.72);
  color: white;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.broker-listing-copy {
  min-width: 0;
}

.broker-listing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: var(--space-2);
}

.broker-listing-metrics span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 247, 0.84);
  text-align: center;
}

.broker-listing-metrics strong {
  font-size: 1.05rem;
  line-height: 1;
}

.broker-listing-metrics small {
  margin-top: 3px;
  font-size: 0.72rem;
}

.broker-listing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.perception-section .history-heading small {
  display: block;
  max-width: 72ch;
  color: var(--muted);
}

.perception-totals {
  margin-bottom: var(--space-3);
}

.perception-row {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: start;
}

.perception-row-main {
  min-width: 0;
}

.perception-diagnosis {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 52ch;
}

.perception-row-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, max-content));
  gap: var(--space-2);
  justify-content: flex-end;
}

.perception-row-metrics span {
  display: grid;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 247, 0.84);
  text-align: center;
}

.perception-row-metrics strong {
  font-size: 1.02rem;
  line-height: 1.2;
}

.perception-row-metrics small {
  margin-top: 3px;
  font-size: 0.72rem;
}

.perception-state {
  border-left: 3px solid var(--muted);
}

.perception-state-perceived_underpriced {
  border-left-color: #0f766e;
}

.perception-state-perceived_overpriced {
  border-left-color: #b45309;
}

.perception-state-well_positioned {
  border-left-color: #15803d;
}

.perception-state-unclear_positioning {
  border-left-color: #7c3aed;
}

.perception-guide {
  margin-top: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  padding: var(--space-3);
}

.perception-guide summary {
  cursor: pointer;
  font-weight: 650;
}

.perception-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.perception-guide-grid p {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.perception-guide-why {
  font-style: italic;
}

.perception-disclaimer {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 0.82rem;
}

.perception-export-row {
  margin-top: var(--space-2);
}

.comp-set-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.comp-set-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 247, 0.6);
}

.comp-set-copy {
  min-width: 0;
}

.comp-set-copy small {
  display: block;
  color: var(--muted);
}

.comp-set-metrics span {
  background: rgba(255, 255, 255, 0.9);
}

.price-test-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: end;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
}

.price-test-form label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.price-test-form .price-test-notes {
  flex: 1 1 200px;
}

.price-test-form select,
.price-test-form input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.price-test-state-strongly_supported,
.price-test-state-supported {
  border-left-color: #15803d;
}

.price-test-state-stretch {
  border-left-color: #b45309;
}

.price-test-state-resistance {
  border-left-color: #b91c1c;
}

.price-test-state-insufficient_data {
  border-left-color: var(--muted);
}

.readiness-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.readiness-tags span {
  padding: 5px 8px;
  border: 1px solid rgba(15, 107, 97, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(15, 107, 97, 0.07);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 760;
}

.broker-edit-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.broker-edit-panel form {
  display: grid;
  gap: var(--space-3);
}

.broker-edit-panel label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.broker-edit-panel input,
.broker-edit-panel select,
.broker-edit-panel textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
}

.broker-edit-panel textarea {
  min-height: 112px;
  resize: vertical;
}

.broker-onboarding-form {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: var(--space-2) var(--space-3);
  align-items: center;
  max-width: 760px;
}

.broker-onboarding-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.broker-onboarding-form input,
.broker-onboarding-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
}

.broker-onboarding-form .errorlist {
  grid-column: 2;
}

.broker-onboarding-form .primary-action {
  grid-column: 2;
  justify-self: start;
  min-width: 180px;
  padding: 0 var(--space-4);
}

.broker-ops-list {
  display: grid;
  gap: var(--space-3);
}

.broker-ops-row {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
}

.broker-ops-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.broker-ops-heading h3 {
  margin: 0;
  font-size: 1.08rem;
}

.status-pill {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-pill.warning {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.08);
  color: #8a4208;
}

.status-pill.blocked {
  border-color: rgba(159, 47, 37, 0.26);
  background: rgba(159, 47, 37, 0.07);
  color: var(--target);
}

.broker-ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.broker-ops-metrics span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 247, 0.82);
}

.broker-ops-metrics strong,
.broker-ops-metrics small,
.broker-ops-sections strong,
.broker-ops-sections small {
  display: block;
}

.broker-ops-metrics strong {
  font-size: 1.2rem;
  line-height: 1;
}

.broker-ops-metrics small,
.broker-ops-sections small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.broker-ops-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.broker-ops-sections > div {
  display: grid;
  gap: 4px;
}

.broker-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

#lobbyStatus {
  margin-bottom: 0;
}

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

@media (max-width: 720px) {
  .result-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.listing-inventory-row {
  grid-template-columns: minmax(220px, 1fr) repeat(7, auto);
}

.favorite-home-row {
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

.favorite-home-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #d8cebf;
}

.compact-link {
  min-height: 40px;
  padding: 0 var(--space-3);
  font-size: 0.85rem;
}

.compact-action {
  min-height: 40px;
  padding: 0 var(--space-3);
  font-size: 0.85rem;
}

.danger-action {
  background: rgba(185, 28, 28, 0.1);
  color: #991b1b;
}

.rights-warning {
  color: #991b1b;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.auth-card {
  width: min(460px, 100%);
}

.auth-card h1 {
  margin-bottom: var(--space-2);
}

.auth-perks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}

.auth-perks span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}


.auth-form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.compact-auth-form {
  margin-top: var(--space-2);
}

.guest-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.guest-profile-actions .compact-auth-form {
  margin-top: 0;
}

.guest-profile-actions .primary-link,
.guest-profile-actions .secondary-action {
  min-width: 148px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-form input {
  min-height: 46px;
  padding: 0 var(--space-3);
  /* 16px+ or iOS Safari zooms the page when the field gets focus. */
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
}

.auth-form small,
.errorlist {
  margin: 0;
  padding: 0;
  color: var(--target);
  list-style: none;
  font-size: 0.8rem;
}

.auth-alt {
  margin: var(--space-4) 0 0;
  color: var(--muted);
}

.auth-alt a {
  color: var(--accent-dark);
  font-weight: 700;
  /* Inline text link; extend the hit area to finger size without moving text. */
  padding: 12px 4px;
  margin: -12px -4px;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.inline-action-form .primary-action,
.inline-action-form .secondary-action {
  padding: 0 var(--space-4);
}

.listing-broker {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin: var(--space-3) 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-decoration: none;
}

.listing-broker-logo {
  flex: 0 0 auto;
}

.listing-broker small,
.listing-broker strong,
.listing-broker em {
  display: block;
}

.listing-broker small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.listing-broker strong {
  font-size: 0.92rem;
}

.listing-broker em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.broker-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.broker-logo-image {
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line);
  background: white;
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

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

@keyframes messages-dismiss {
  0%,
  92% {
    opacity: 1;
    transform: translateX(-50%);
    visibility: visible;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -8px);
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px)) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes reaction-feed-roll {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  12%,
  72% {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-18px);
  }
}

@keyframes target-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(159, 47, 37, 0.28);
  }

  50% {
    box-shadow: 0 0 0 9px rgba(159, 47, 37, 0);
  }
}

@keyframes landing-preview-rise {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(0.7deg) scale(0.98);
  }

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

@media (min-width: 640px) {

  .marketing-shell,
  .menu-shell,
  .auth-shell {
    padding: var(--space-4);
  }

  .landing-shell {
    padding: 0;
  }

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

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

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

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

  .broker-demo-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }
}

@media (max-width: 900px) {
  .landing-shell .marketing-hero {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: auto;
    padding: 92px var(--space-4) var(--space-4);
  }

  .landing-shell .landing-preview {
    max-width: 560px;
    margin-top: 0;
  }

  .landing-shell .landing-pelican-video,
  .landing-shell .landing-pelican-still {
    right: auto;
    bottom: -28px;
    left: 50%;
    width: 158px;
  }

  .setup-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {

  #syncStatus:not([hidden]) {
    grid-column: 1 / -1;
  }

  .listing-broker {
    margin: var(--space-2) 0;
    padding: 8px;
  }

  .landing-shell {
    overflow-x: clip;
  }

  .marketing-shell,
  .menu-shell,
  .auth-shell {
    width: 100%;
  }

  .menu-shell,
  .auth-shell {
    padding: var(--space-3);
  }

  .marketing-shell {
    padding: 0;
  }

  .landing-nav,
  .marketing-hero,
  .marketing-copy,
  .landing-preview,
  .landing-preview-card,
  .landing-preview-media {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .landing-nav div {
    min-width: 0;
    justify-content: flex-end;
  }

  .marketing-hero {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-5) 0 var(--space-4);
  }

  .landing-shell .marketing-copy {
    display: contents;
  }

  .landing-shell .marketing-copy .eyebrow {
    order: 1;
    width: 100%;
    text-align: left;
  }

  .landing-shell .marketing-copy h1 {
    order: 2;
    width: 100%;
    text-align: left;
  }

  .landing-shell .marketing-lede {
    order: 3;
    width: 100%;
    text-align: left;
  }

  .landing-shell .marketing-actions {
    order: 4;
  }

  .landing-shell .landing-preview {
    order: 5;
  }

  .landing-shell .landing-guess-ticket {
    order: 6;
  }

  .landing-shell .landing-mechanics {
    order: 7;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
  }

  .landing-shell .landing-mechanics span {
    gap: 10px;
    font-size: 0.98rem;
  }

  .landing-shell .landing-mechanics strong {
    width: 30px;
    height: 30px;
  }

  .marketing-copy h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 9vw, 2.65rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .marketing-lede {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .landing-preview-media > img:first-child,
  .landing-preview-card > img {
    height: 240px;
  }

  .landing-comp-strip {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    padding-inline: 0;
  }

  .landing-nav div {
    gap: var(--space-2);
  }

  .landing-shell .landing-nav {
    width: calc(100% - var(--space-4));
    padding-top: 10px;
  }

  .landing-shell .landing-preview {
    padding-top: 0;
  }

  .landing-shell .landing-pelican-video,
  .landing-shell .landing-pelican-still {
    right: auto;
    bottom: -20px;
    left: 50%;
    width: 116px;
  }

  .landing-shell .landing-nav a:not(.landing-brand) {
    padding: 6px 8px;
    font-size: 0.82rem;
  }

  .landing-shell .marketing-hero {
    padding: 76px var(--space-3) var(--space-3);
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer a {
    text-align: center;
  }

  .landing-guess-ticket {
    grid-template-columns: 1fr auto;
    width: 100%;
    max-width: 360px;
    transform: none;
  }

  .landing-guess-ticket small {
    grid-column: 1 / -1;
  }

  .marketing-actions {
    display: grid;
    /* Fit as many >=140px columns as the screen allows: 2 across on a normal
       phone, 1 across on a 320px iPhone SE - never a fixed 3 columns that clip
       long labels like "Play today's challenge". */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: stretch;
    gap: 6px;
  }

  .marketing-actions .inline-action-form {
    display: flex;
  }

  .marketing-actions .primary-action,
  .marketing-actions .primary-link,
  .marketing-actions .secondary-link {
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    font-size: 0.86rem;
    line-height: 1.1;
    /* Allow wrapping so a long label uses two lines instead of clipping. */
    white-space: normal;
  }

  .menu-header,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions .inline-action-form,
  .header-actions .primary-action,
  .header-actions .secondary-action,
  .header-actions .primary-link,
  .header-actions .secondary-link {
    width: 100%;
  }

  .guest-profile-actions,
  .guest-profile-actions .compact-auth-form,
  .guest-profile-actions .primary-link,
  .guest-profile-actions .secondary-action {
    width: 100%;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .setup-sidebar,
  .social-recap {
    grid-template-columns: 1fr;
  }

  .setup-actions,
  .setup-actions .primary-action {
    width: 100%;
  }

  .history-row,
  .result-row,
  .broker-listing-row,
  .continue-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .broker-listing-metrics {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .broker-listing-main {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .broker-listing-photos {
    width: 92px;
    height: 78px;
    grid-template-rows: repeat(2, 37.5px);
  }

  .broker-listing-actions,
  .broker-listing-actions .compact-link {
    width: 100%;
  }

  .broker-onboarding-form {
    grid-template-columns: 1fr;
  }

  .broker-onboarding-form .errorlist,
  .broker-onboarding-form .primary-action {
    grid-column: 1;
  }

  .broker-onboarding-form .primary-action {
    width: 100%;
  }

  .broker-ops-heading,
  .broker-ops-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .broker-ops-metrics,
  .broker-ops-sections {
    grid-template-columns: 1fr;
  }

  .broker-ops-actions .compact-link {
    width: 100%;
  }

  .continue-card .primary-link,
  .continue-card .secondary-link {
    width: 100%;
  }

  .broker-demo-listing {
    grid-template-columns: 1fr;
  }

  .broker-demo-listing img {
    width: 100%;
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-pelican-video,
  .pelican-loader-video {
    display: none;
  }
}

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

/* --- Player profile catalog -------------------------------------------------
   A page-scoped ledger layout for profile.html. It deliberately avoids the
   shared .metric-card / .history-* primitives so broker and admin dashboards
   keep their existing component contracts. */
.profile-catalog {
  --profile-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  width: min(1320px, 100%);
  min-height: auto;
  margin: 0 auto;
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  align-content: start;
  font-variant-numeric: tabular-nums;
}

.profile-masthead,
.profile-ledger,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: none;
}

.profile-masthead {
  min-height: 102px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0;
  border-top: 4px solid var(--accent);
  overflow: hidden;
}

.profile-identity {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
}

.profile-identity h1 {
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.profile-handle {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-family: var(--profile-mono);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.profile-catalog .profile-menu-link {
  align-self: stretch;
  min-width: 180px;
  padding: 0 var(--space-5);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  color: var(--ink);
}

.profile-catalog .profile-menu-link:hover {
  background: rgba(15, 107, 97, 0.06);
  box-shadow: none;
  color: var(--accent-dark);
}

.profile-ledger {
  display: grid;
  overflow: hidden;
}

.profile-ledger-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  padding: 9px var(--space-3);
  background: var(--accent-dark);
  color: white;
}

.profile-ledger-heading .eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.profile-ledger-heading h2 {
  margin: 0;
  color: white;
  font-size: 0.86rem;
  font-weight: 820;
  letter-spacing: -0.01em;
}

.profile-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.profile-metric {
  min-width: 0;
  min-height: 65px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-metric:nth-child(4n) {
  border-right: 0;
}

.profile-metric:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.profile-metric dt {
  min-width: 0;
  color: var(--muted);
  font-size: clamp(0.54rem, 2.3vw, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.05;
  text-transform: uppercase;
}

.profile-metric dd {
  min-width: 0;
  margin: 0;
  font-family: var(--profile-mono);
  font-size: clamp(1rem, 4.8vw, 1.9rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
}

.profile-metric--feature dd {
  color: var(--target);
}

.profile-dashboard,
.profile-primary-column,
.profile-secondary-column {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.profile-panel {
  min-width: 0;
  overflow: hidden;
}

.profile-panel-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.profile-panel-heading .eyebrow {
  margin-bottom: 2px;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.profile-panel-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1;
}

.profile-panel-count {
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--profile-mono);
  font-size: 0.64rem;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.profile-home-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-2);
  padding: var(--space-2);
}

.profile-home {
  min-width: 0;
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(120px, 0.62fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
  overflow: hidden;
  text-decoration: none;
}

.profile-home:hover,
.profile-activity-row:hover {
  border-color: rgba(15, 107, 97, 0.34);
  background: rgba(15, 107, 97, 0.035);
  box-shadow: 0 5px 14px rgba(20, 28, 24, 0.08);
  transform: translateY(-1px);
}

.profile-home-media {
  min-width: 0;
  min-height: 118px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.profile-home-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 13, 0.06) 36%, rgba(11, 15, 13, 0.6));
  content: "";
  pointer-events: none;
}

.profile-home-media img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.profile-home-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-3);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-home-index,
.profile-home-price {
  position: absolute;
  z-index: 1;
  color: white;
}

.profile-home-index {
  top: 7px;
  left: 7px;
  padding: 3px 5px;
  background: rgba(11, 79, 72, 0.92);
  font-family: var(--profile-mono);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.profile-home-price {
  right: 8px;
  bottom: 7px;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.profile-home-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: var(--space-3);
}

.profile-home-copy strong,
.profile-home-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-home-copy strong {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.profile-home-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.25;
}

.profile-activity-list {
  display: grid;
}

.profile-activity-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto minmax(150px, auto);
  gap: var(--space-3);
  align-items: center;
  padding: 8px var(--space-3);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.profile-activity-row:last-child {
  border-bottom: 0;
}

.profile-activity-index,
.profile-activity-status {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 740;
}

.profile-activity-index {
  font-family: var(--profile-mono);
  text-transform: uppercase;
}

.profile-activity-mode {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-activity-score {
  font-family: var(--profile-mono);
  font-size: 0.9rem;
  font-weight: 820;
  white-space: nowrap;
}

.profile-activity-status {
  text-align: right;
  white-space: nowrap;
}

.profile-panel-body {
  padding: var(--space-3);
}

.profile-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.profile-home-list > .profile-empty,
.profile-activity-list > .profile-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  padding: var(--space-3);
  text-align: center;
}

.profile-catalog .auth-form {
  gap: 9px;
}

.profile-catalog .auth-form label {
  min-width: 0;
  gap: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.profile-catalog .auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 2px;
  font-weight: 720;
}

.profile-catalog .primary-action,
.profile-catalog .secondary-action,
.profile-catalog .primary-link {
  min-height: 44px;
  border-radius: 2px;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
}

.profile-catalog .primary-action,
.profile-catalog .primary-link {
  background: var(--accent);
}

.profile-catalog .primary-action:hover,
.profile-catalog .primary-link:hover {
  background: var(--accent-dark);
  box-shadow: 0 5px 14px rgba(11, 79, 72, 0.16);
}

.profile-catalog .danger-action {
  border-color: rgba(159, 47, 37, 0.32);
  background: rgba(159, 47, 37, 0.08);
  box-shadow: none;
  color: var(--target);
}

.profile-catalog .danger-action:hover {
  border-color: var(--target);
  background: rgba(159, 47, 37, 0.12);
  box-shadow: 0 5px 14px rgba(159, 47, 37, 0.1);
}

.profile-privacy {
  border-top-color: rgba(159, 47, 37, 0.45);
}

.profile-delete-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.profile-delete-form .errorlist {
  grid-column: 1 / -1;
}

.profile-delete-form .danger-action {
  min-width: 146px;
}

.profile-body .site-footer {
  width: min(1320px, calc(100% - var(--space-6)));
  margin-top: 0;
  border-radius: 3px;
  background: var(--panel);
  box-shadow: none;
}

.profile-body .site-footer a {
  min-height: 44px;
  border-radius: 2px;
  background: var(--panel);
  box-shadow: none;
}

@media (min-width: 760px) {
  .profile-ledger {
    grid-template-columns: 164px minmax(0, 1fr);
  }

  .profile-ledger-heading {
    display: grid;
    align-content: center;
    justify-content: stretch;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
  }

  .profile-ledger-heading h2 {
    font-size: 1.1rem;
  }

  .profile-metric {
    min-height: 70px;
    padding-inline: var(--space-3);
  }

  .profile-metric dd {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
  }
}

@media (min-width: 980px) {
  .profile-catalog {
    padding: var(--space-4);
  }

  .profile-dashboard {
    grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.78fr);
  }
}

@media (max-width: 560px) {
  .profile-catalog {
    padding: var(--space-2);
  }

  .profile-masthead {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 0;
  }

  .profile-identity {
    padding: 10px var(--space-3);
  }

  .profile-identity h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .profile-handle {
    margin-top: 6px;
    font-size: 0.61rem;
  }

  .profile-catalog .profile-menu-link {
    min-width: 0;
    padding: 8px;
    font-size: 0.78rem;
    line-height: 1.1;
    text-align: center;
  }

  .profile-ledger-heading {
    padding-block: 7px;
  }

  .profile-ledger-heading h2 {
    font-size: 0.74rem;
  }

  .profile-metric {
    min-height: 58px;
    padding: 6px;
  }

  .profile-metric dd {
    font-size: clamp(0.96rem, 4.6vw, 1.18rem);
  }

  .profile-panel-heading {
    min-height: 58px;
    padding: 9px 10px;
  }

  .profile-panel-heading h2 {
    font-size: 1.2rem;
  }

  .profile-home {
    min-height: 104px;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .profile-home-media {
    min-height: 104px;
  }

  .profile-home-copy {
    padding: 10px;
  }

  .profile-home-copy strong {
    font-size: 0.93rem;
  }

  .profile-home-price {
    font-size: 1.05rem;
  }

  .profile-activity-row {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "index score"
      "mode score"
      "status status";
    gap: 1px var(--space-3);
    padding: 8px 10px;
  }

  .profile-activity-index { grid-area: index; }
  .profile-activity-mode { grid-area: mode; }
  .profile-activity-score { grid-area: score; align-self: center; }
  .profile-activity-status { grid-area: status; text-align: left; }

  .profile-panel-body {
    padding: 10px;
  }

  .profile-delete-form {
    grid-template-columns: 1fr;
  }

  .profile-delete-form .danger-action {
    width: 100%;
  }

  .profile-body .site-footer {
    width: calc(100% - var(--space-4));
    margin-bottom: var(--space-2);
  }
}

/* --- Catalog palette -------------------------------------------------------
   User-selected primaries: cyan teal for mastheads and warm terracotta for
   decisions/reveals. Supporting darks and UI neutrals are derived from those
   anchors, scoped to the consumer game so broker surfaces keep their theme. */
.landing-body,
.menu-body,
.profile-body,
.catalog-utility-body {
  --accent: #1e838f;
  --accent-dark: #17636c;
  --target: #c2714f;
  --ink: #182729;
  --muted: #657477;
  --line: rgba(24, 39, 41, 0.15);
  --panel: #fffdf9;
  --panel-soft: rgba(255, 253, 249, 0.96);
  --road: rgba(30, 131, 143, 0.2);
  --focus: 0 0 0 3px rgba(30, 131, 143, 0.25);
}

.landing-body {
  /* Match the full-bleed footer if mobile viewport rounding exposes the page canvas. */
  background: #101310;
}

.landing-catalog {
  --target: #c2714f;
}

/* --- Player file: final paper-led editorial treatment ----------------------
   The profile already has the right dense ledger structure. These page-scoped
   material rules bring it into the same oyster / ink / teal / clay system as
   the approved landing without changing shared dashboard primitives. */
.profile-body {
  background: #f7f3ec;
}

.profile-catalog {
  max-width: none;
  padding-inline: max(var(--space-3), calc((100vw - 1320px) / 2));
  background: #f7f3ec;
}

.profile-masthead {
  border-color: var(--accent);
  border-top: 0;
  background: var(--accent);
  color: white;
}

.profile-identity .eyebrow,
.profile-handle {
  color: rgba(255, 255, 255, 0.7);
}

.profile-identity h1 {
  color: white;
}

.profile-catalog .profile-menu-link {
  border-left-color: rgba(255, 255, 255, 0.24);
  background: var(--accent-dark);
  color: white;
}

.profile-catalog .profile-menu-link:hover {
  background: #12515a;
  color: white;
}

.profile-ledger {
  border-color: var(--ink);
  background: #fffdf8;
}

.profile-ledger-heading {
  background: var(--ink);
}

.profile-metric {
  background: #fffdf8;
}

.profile-metric--feature {
  background: var(--target);
  color: white;
}

.profile-metric--feature dt,
.profile-metric--feature dd {
  color: white;
}

.profile-panel {
  background: #fffdf8;
}

.profile-panel-heading {
  border-bottom-color: var(--ink);
  background: var(--ink);
  color: white;
}

.profile-panel-heading .eyebrow {
  color: rgba(255, 255, 255, 0.64);
}

.profile-panel-heading h2 {
  color: white;
}

.profile-panel-count {
  border-color: rgba(255, 255, 255, 0.4);
  background: #f7f3ec;
  color: var(--ink);
}

.profile-settings .profile-panel-heading {
  background: var(--accent-dark);
}

.profile-privacy .profile-panel-heading {
  background: #f7f3ec;
  color: var(--ink);
}

.profile-privacy .profile-panel-heading .eyebrow {
  color: var(--target);
}

.profile-privacy .profile-panel-heading h2 {
  color: var(--ink);
}

.profile-privacy .profile-panel-count {
  border-color: rgba(159, 47, 37, 0.34);
  background: transparent;
  color: var(--target);
}

.profile-home,
.profile-activity-row,
.profile-panel-body,
.profile-catalog .auth-form input {
  background: #fffdf8;
}

.profile-home-copy {
  border-left: 1px solid var(--line);
}

.profile-activity-row:nth-child(even) {
  background: #f7f3ec;
}

.profile-home:hover,
.profile-activity-row:hover {
  background: rgba(15, 107, 97, 0.06);
}

.profile-catalog .primary-action,
.profile-catalog .primary-link {
  background: var(--target);
}

.profile-catalog .primary-action:hover,
.profile-catalog .primary-link:hover {
  background: #a85e40;
}

.profile-body .site-footer {
  width: 100%;
  max-width: none;
  padding-inline: max(var(--space-4), calc((100vw - 1320px) / 2));
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: white;
}

.profile-body .site-footer p,
.profile-body .site-footer small {
  color: rgba(255, 255, 255, 0.7);
}

.profile-body .site-footer a {
  border-color: rgba(255, 255, 255, 0.26);
  background: transparent;
  color: white;
}

@media (max-width: 560px) {
  .profile-catalog {
    padding-inline: var(--space-2);
  }

  .profile-body .site-footer {
    width: 100%;
    margin-bottom: 0;
    padding-inline: var(--space-3);
  }
}

/* --- Paper-led manga catalog: public landing + mode-select masthead ---------
   Page-scoped so the shared marketing, menu, and history primitives retain
   their contracts on broker, auth, results, and analytics surfaces. */
.landing-catalog {
  --landing-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 88px);
  margin: 0 auto;
  padding: var(--space-3) max(var(--space-3), calc((100vw - 1320px) / 2));
  display: grid;
  gap: var(--space-2);
  align-content: start;
  overflow: visible;
  background: #f7f3ec;
  font-variant-numeric: tabular-nums;
}

.landing-catalog .landing-masthead {
  position: relative;
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-width: 100%;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: white;
  overflow: hidden;
}

.landing-catalog .landing-mast-brand {
  min-width: 0;
  display: grid;
  padding: var(--space-3) var(--space-4);
}

.landing-catalog .landing-mast-brand .eyebrow,
.landing-catalog .landing-mast-code {
  color: rgba(255, 255, 255, 0.72);
}

.landing-catalog .landing-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: fit-content;
  padding: 0;
  margin: 0;
  color: white;
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.landing-catalog .landing-brand h1 {
  margin: 0;
  color: white;
  font-size: clamp(3.5rem, 6.5vw, 6rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.landing-catalog .landing-mast-code {
  margin: var(--space-2) 0 0;
  font-family: var(--landing-mono);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  align-content: end;
}

.landing-catalog .landing-nav {
  position: static;
  inset: auto;
  width: auto;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent-dark);
  transform: none;
}

.landing-catalog .landing-nav-label {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--landing-mono);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.landing-catalog .landing-nav div {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.landing-catalog .landing-nav a:not(.landing-brand) {
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  background: transparent;
  color: white;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 780;
  text-decoration: none;
}

.landing-catalog .landing-nav a:not(.landing-brand):hover {
  border-color: white;
  background: white;
  color: var(--accent-dark);
  box-shadow: none;
}

.landing-catalog .landing-editorial {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.62fr);
  gap: var(--space-2);
  align-items: stretch;
}

.landing-catalog .landing-preview.landing-cover {
  min-width: 0;
  align-self: start;
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #171a17;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
  overflow: hidden;
}

.landing-catalog .landing-preview.landing-cover::before {
  content: none;
}

.landing-catalog .landing-preview-card.featured.landing-cover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.landing-catalog .landing-cover .landing-preview-media {
  min-width: 0;
  position: relative;
  border: 0;
  border-radius: 0;
  background: var(--accent-dark);
  overflow: hidden;
}

.landing-catalog .landing-cover .landing-preview-media > img:first-child {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.landing-catalog .landing-photo-label,
.landing-catalog .landing-hidden-price {
  position: absolute;
  top: var(--space-3);
  z-index: 8;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  color: white;
  font-family: var(--landing-mono);
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.landing-catalog .landing-photo-label {
  left: var(--space-3);
  background: var(--accent-dark);
}

.landing-catalog .landing-hidden-price {
  right: var(--space-3);
  background: var(--target);
}

.landing-catalog .landing-cover .landing-pelican-video,
.landing-catalog .landing-cover .landing-pelican-still {
  right: auto;
  bottom: -24px;
  left: 3%;
  width: clamp(155px, 18vw, 235px);
  filter: drop-shadow(0 10px 14px rgba(31, 27, 20, 0.17));
  transform: none;
}

.landing-catalog .landing-cover-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  justify-items: end;
  padding: 110px 18px 18px 250px;
  border-bottom: 5px solid var(--target);
  background: linear-gradient(180deg, transparent 0%, rgba(11, 14, 12, 0.72) 46%, rgba(11, 14, 12, 0.94) 100%);
  color: white;
  text-align: right;
  pointer-events: none;
}

.landing-catalog .landing-cover-copy small,
.landing-catalog .landing-cover-copy strong,
.landing-catalog .landing-cover-copy span {
  display: block;
}

.landing-catalog .landing-cover-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--landing-mono);
  font-size: 0.62rem;
  font-weight: 760;
  line-height: 1.25;
  text-transform: uppercase;
}

.landing-catalog .landing-cover-copy h2 {
  max-width: 11ch;
  margin: 4px 0 5px;
  color: white;
  font-size: clamp(2.4rem, 3.8vw, 3.7rem);
  font-weight: 920;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.landing-catalog .landing-cover-copy strong {
  max-width: 48ch;
  color: white;
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  font-weight: 820;
  line-height: 1.08;
}

.landing-catalog .landing-cover-copy span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  font-weight: 720;
}

.landing-catalog .landing-issue-strip {
  display: none;
}

.landing-catalog .landing-play-panel {
  min-width: 0;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: clamp(var(--space-4), 3vw, var(--space-6));
  border: 0;
  border-radius: 3px;
  background: var(--target);
  color: white;
}

.landing-catalog .landing-play-panel .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.landing-catalog .landing-play-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(3.6rem, 6vw, 6rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.84;
}

.landing-catalog .landing-play-panel .marketing-lede {
  max-width: 29ch;
  margin: var(--space-5) 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.42;
}

.landing-catalog .landing-play-panel .marketing-actions {
  align-self: end;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.landing-catalog .landing-play-panel .marketing-actions > :first-child {
  grid-column: 1;
}

.landing-catalog .landing-play-panel .inline-action-form,
.landing-catalog .landing-play-panel .primary-action,
.landing-catalog .landing-play-panel .primary-link,
.landing-catalog .landing-play-panel .secondary-action,
.landing-catalog .landing-play-panel .secondary-link {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border-radius: 2px;
  box-shadow: none;
  text-align: center;
  text-shadow: none;
  white-space: normal;
}

.landing-catalog .landing-play-panel .primary-action,
.landing-catalog .landing-play-panel .primary-link {
  border-color: white;
  background: white;
  color: var(--target);
}

.landing-catalog .landing-play-panel .primary-action:hover,
.landing-catalog .landing-play-panel .primary-link:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--target);
}

.landing-catalog .landing-play-panel .secondary-action,
.landing-catalog .landing-play-panel .secondary-link {
  border-color: rgba(255, 255, 255, 0.58);
  background: transparent;
  color: white;
}

.landing-catalog .landing-preview--fallback .preview-board {
  min-height: 560px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* The menu keeps its information density; only its major editorial fields use
   full background color. */
.menu-catalog {
  width: min(1280px, 100%);
}

.menu-catalog .cat-resume-go {
  min-height: 44px;
}

.menu-catalog .cat-masthead {
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: white;
  overflow: hidden;
}

.menu-catalog .cat-brand {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: var(--space-3) var(--space-4);
}

.menu-catalog .cat-brand .eyebrow,
.menu-catalog .cat-brand .menu-subtitle,
.menu-catalog .cat-mast-code {
  color: rgba(255, 255, 255, 0.74);
}

.menu-catalog .cat-title {
  color: white;
  font-size: clamp(3.3rem, 6vw, 5.5rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.menu-catalog .cat-brand .menu-subtitle {
  max-width: 68ch;
  margin-top: var(--space-3);
  font-size: 0.82rem;
  line-height: 1.35;
}

.menu-catalog .cat-mast-code,
.menu-catalog .cat-account-label {
  font-family: var(--cat-mono);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-catalog .cat-mast-code {
  margin: var(--space-2) 0 0;
}

.menu-catalog .cat-account {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 4px;
  padding: var(--space-3);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent-dark);
  color: white;
  text-align: left;
}

.menu-catalog .cat-account-label,
.menu-catalog .cat-ident,
.menu-catalog .cat-ident strong {
  color: white;
}

.menu-catalog .cat-ident {
  min-width: 0;
  margin-bottom: var(--space-2);
  overflow-wrap: anywhere;
}

.menu-catalog .cat-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.menu-catalog .cat-chip {
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.52);
  border-radius: 2px;
  background: transparent;
  color: white;
  box-shadow: none;
}

.menu-catalog .cat-chip:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.menu-catalog .cat-chip--action {
  border-color: white;
  background: white;
  color: var(--accent-dark);
}

.menu-catalog .mode-switch-option {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.menu-catalog .cat-mode.mode--daily {
  border-color: var(--target);
  background: var(--target);
  color: white;
}

.menu-catalog .cat-mode.mode--daily h2,
.menu-catalog .cat-mode.mode--daily p,
.menu-catalog .cat-mode.mode--daily .cat-index {
  color: white;
}

.menu-catalog .cat-mode.mode--daily .cat-tag {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.menu-catalog .cat-mode.mode--daily .cat-cta {
  border-color: white;
  background: white;
  color: var(--target);
}

.menu-catalog + .site-footer {
  width: min(1280px, calc(100% - var(--space-6)));
  border-radius: 3px;
  background: var(--panel);
  box-shadow: none;
}

.menu-catalog + .site-footer a {
  min-height: 44px;
  border-radius: 2px;
  background: var(--panel);
  box-shadow: none;
}

@media (min-width: 960px) {
  .landing-catalog .landing-issue-strip {
    min-width: 0;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(180px, 0.72fr) minmax(0, 4fr);
    gap: 1px;
    border: 1px solid rgba(23, 26, 23, 0.2);
    border-radius: 3px;
    background: rgba(23, 26, 23, 0.2);
    overflow: hidden;
  }

  .landing-catalog .landing-issue-heading {
    min-width: 0;
    display: grid;
    align-content: end;
    padding: var(--space-4);
    background: #171a17;
    color: white;
  }

  .landing-catalog .landing-issue-heading .eyebrow {
    color: rgba(255, 255, 255, 0.68);
  }

  .landing-catalog .landing-issue-heading h2 {
    margin: 0;
    color: white;
    font-size: clamp(1.7rem, 2.5vw, 2.8rem);
    font-weight: 920;
    letter-spacing: -0.055em;
    line-height: 0.9;
  }

  .landing-catalog .landing-issue-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(23, 26, 23, 0.3);
  }

  .landing-catalog .landing-issue-tile {
    min-width: 0;
    position: relative;
    height: clamp(160px, 16vw, 215px);
    margin: 0;
    background: #d8d3c9;
    overflow: hidden;
  }

  .landing-catalog .landing-issue-tile > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
  }

  .landing-catalog .landing-issue-tile:hover > img {
    transform: scale(1.018);
  }

  .landing-catalog .landing-issue-tile figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 6px 8px;
    border-top: 1px solid rgba(23, 26, 23, 0.28);
    background: rgba(247, 243, 236, 0.94);
    color: #171a17;
  }

  .landing-catalog .landing-issue-tile small,
  .landing-catalog .landing-issue-tile strong {
    min-width: 0;
    color: #171a17;
    font-family: var(--landing-mono);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .landing-catalog .landing-issue-tile small {
    color: var(--target);
  }

  .landing-catalog .landing-issue-tile strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 960px) and (max-width: 1199px) {
  .landing-catalog .landing-issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-catalog .landing-issue-tile {
    height: clamp(185px, 20vw, 225px);
  }
}

@media (min-width: 960px) and (max-width: 1199px) and (min-height: 900px) {
  .landing-catalog .landing-issue-tile {
    height: clamp(245px, 28vw, 300px);
  }
}

@media (max-width: 959px) {
  .landing-catalog .landing-editorial {
    grid-template-columns: 1fr;
  }

  .landing-catalog .landing-play-panel {
    min-height: 390px;
  }
}

@media (max-width: 700px) {
  .landing-catalog,
  .menu-catalog {
    padding: var(--space-2);
  }

  .landing-catalog .landing-preview.landing-cover {
    order: 0;
  }

  .landing-catalog .landing-play-panel {
    order: 1;
  }

  .landing-catalog .landing-masthead {
    min-height: 128px;
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .landing-catalog .landing-mast-brand {
    padding: 10px var(--space-3);
  }

  .landing-catalog .landing-brand h1 {
    font-size: clamp(2.25rem, 10vw, 3rem);
    line-height: 0.9;
  }

  .landing-catalog .landing-brand {
    position: static;
    justify-self: center;
    text-align: center;
    transform: none;
  }

  .landing-catalog .landing-mast-code {
    font-size: 0.58rem;
  }

  .landing-catalog .landing-nav {
    padding: 8px;
  }

  .landing-catalog .landing-nav-label {
    display: none;
  }

  .landing-catalog .landing-nav div {
    grid-template-columns: 1fr;
  }

  .landing-catalog .landing-cover .landing-preview-media > img:first-child {
    aspect-ratio: 4 / 3;
  }

  .landing-catalog .landing-photo-label,
  .landing-catalog .landing-hidden-price {
    top: var(--space-2);
  }

  .landing-catalog .landing-photo-label { left: var(--space-2); }
  .landing-catalog .landing-hidden-price { right: var(--space-2); }

  .landing-catalog .landing-cover .landing-pelican-video,
  .landing-catalog .landing-cover .landing-pelican-still {
    right: auto;
    bottom: -12px;
    left: 2%;
    width: 104px;
  }

  .landing-catalog .landing-cover-copy {
    gap: 4px;
    padding: 62px 12px 12px 104px;
    border-bottom-width: 4px;
  }

  .landing-catalog .landing-cover-copy h2 {
    margin: 2px 0 5px;
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .landing-catalog .landing-cover-copy strong {
    font-size: 1rem;
  }

  .landing-catalog .landing-play-panel {
    min-height: 330px;
    padding: var(--space-4);
  }

  .landing-catalog .landing-play-heading h2 {
    font-size: clamp(3.5rem, 17vw, 4.7rem);
  }

  .menu-catalog .cat-masthead {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .menu-catalog .cat-brand {
    padding: 10px var(--space-3);
  }

  .menu-catalog .cat-title {
    font-size: clamp(2.7rem, 13vw, 3.6rem);
  }

  .menu-catalog .cat-brand .menu-subtitle {
    margin-top: var(--space-2);
    font-size: 0.76rem;
  }

  .menu-catalog .cat-account {
    padding: 9px var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .menu-catalog + .site-footer {
    width: calc(100% - var(--space-4));
    margin: var(--space-4) auto var(--space-2);
  }
}

/* --- Consumer utility catalog: auth, legal, setup, and lobby --------------
   These pages borrow the landing's paper-and-ink hierarchy while remaining
   separate from the live .game-shell and broker-facing Home Hunch surfaces. */
.catalog-utility-body {
  background: #f7f3ec;
}

.catalog-utility-body .site-footer {
  width: 100%;
  margin: 0;
  padding: var(--space-4) max(var(--space-6), calc((100vw - 1180px) / 2));
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  background: #111411;
  color: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.catalog-utility-body .site-footer .footer-brand strong {
  color: white;
}

.catalog-utility-body .site-footer .footer-brand span {
  color: rgba(255, 255, 255, 0.62);
}

.catalog-utility-body .site-footer a {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  box-shadow: none;
}

.auth-catalog-shell {
  min-height: calc(100dvh - 88px);
  padding: clamp(var(--space-3), 4vw, 48px);
  background: #f7f3ec;
}

.auth-catalog-shell .auth-catalog-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  padding: 0;
  border: 1px solid rgba(23, 26, 23, 0.24);
  border-radius: 3px;
  background: white;
  box-shadow: none;
  overflow: hidden;
}

.auth-catalog-title {
  min-width: 0;
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  padding: clamp(var(--space-4), 3vw, 32px);
  border-top: 8px solid var(--target);
  background: var(--accent);
  color: white;
}

.auth-catalog-brand {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: white;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.auth-catalog-title > div {
  align-self: center;
}

.auth-catalog-title .eyebrow,
.auth-catalog-code {
  color: rgba(255, 255, 255, 0.66);
}

.auth-catalog-title h1 {
  margin: 0;
  color: white;
  font-size: clamp(3.5rem, 6vw, 5.8rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.84;
}

.auth-catalog-code {
  align-self: end;
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-catalog-content {
  min-width: 0;
  align-self: center;
  padding: clamp(var(--space-5), 4vw, 48px);
  background: white;
}

.auth-catalog-content .auth-copy {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-weight: 680;
}

.auth-catalog-content .auth-perks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.auth-catalog-content .auth-perks span {
  min-width: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 0;
  background: #f7f3ec;
  color: #171a17;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.64rem;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.auth-catalog-content .auth-form {
  gap: var(--space-3);
  margin-top: 0;
}

.auth-catalog-content .auth-form + .auth-form {
  margin-top: var(--space-2);
}

.auth-catalog-content .auth-form label {
  color: #171a17;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.auth-catalog-content .auth-form input {
  min-height: 50px;
  border-color: rgba(23, 26, 23, 0.3);
  border-radius: 2px;
  background: #f7f3ec;
  box-shadow: none;
}

.auth-catalog-content .primary-action,
.auth-catalog-content .primary-link,
.auth-catalog-content .secondary-action {
  width: 100%;
  min-height: 48px;
  border-radius: 2px;
  box-shadow: none;
}

.auth-catalog-content .primary-action,
.auth-catalog-content .primary-link {
  border-color: var(--target);
  background: var(--target);
  color: white;
}

.auth-catalog-content .secondary-action {
  border-color: #171a17;
  background: white;
  color: #171a17;
}

.auth-catalog-content .auth-alt {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-catalog-content .auth-alt a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 700px) {
  .auth-catalog-shell {
    min-height: 0;
    padding: var(--space-2);
  }

  .auth-catalog-shell .auth-catalog-card {
    grid-template-columns: 1fr;
  }

  .auth-catalog-title {
    min-height: 230px;
    padding: var(--space-4);
    border-top-width: 6px;
  }

  .auth-catalog-title h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .auth-catalog-content {
    padding: var(--space-4);
  }

  .auth-catalog-content .auth-perks {
    grid-template-columns: 1fr;
  }
}

.catalog-page-shell {
  width: min(1280px, 100%);
  min-height: calc(100dvh - 88px);
  margin: 0 auto;
  padding: var(--space-3);
  background: #f7f3ec;
  font-variant-numeric: tabular-nums;
}

.catalog-page-shell > .menu-header {
  width: 100%;
  max-width: none;
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 0;
  margin: 0 0 var(--space-2);
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: white;
  box-shadow: none;
  overflow: hidden;
}

.catalog-page-shell > .menu-header > div {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: var(--space-4) var(--space-5);
}

.catalog-page-shell > .menu-header .eyebrow,
.catalog-page-shell > .menu-header p,
.catalog-page-code {
  color: rgba(255, 255, 255, 0.7);
}

.catalog-page-shell > .menu-header h1 {
  max-width: 18ch;
  margin: 0;
  color: white;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 920;
  letter-spacing: -0.06em;
  line-height: 0.88;
}

.catalog-page-code {
  margin: var(--space-2) 0 0;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-page-shell > .menu-header > .secondary-link,
.catalog-page-shell > .menu-header > form {
  width: 100%;
  height: 100%;
  min-height: 148px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: var(--space-4);
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: var(--accent-dark);
  color: white;
  box-shadow: none;
}

.catalog-page-shell > .menu-header > form .secondary-link {
  min-width: 0;
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.54);
  border-radius: 2px;
  background: transparent;
  color: white;
  box-shadow: none;
}

.catalog-page-shell > .menu-header > .secondary-link:hover,
.catalog-page-shell > .menu-header > form .secondary-link:hover {
  background: white;
  color: var(--accent-dark);
  transform: none;
  box-shadow: none;
}

/* Long-form reader pages become a compact two-column editorial index. */
.legal-catalog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  align-content: start;
}

.legal-catalog > .menu-header {
  grid-column: 1 / -1;
}

.legal-catalog .legal-card {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid rgba(23, 26, 23, 0.22);
  border-top: 5px solid var(--target);
  border-radius: 2px;
  background: white;
  box-shadow: none;
}

.legal-catalog .legal-card:first-of-type {
  border-color: #171a17;
  border-top-color: var(--target);
  background: #171a17;
  color: white;
}

.legal-catalog .legal-card:hover {
  border-color: rgba(23, 26, 23, 0.38);
  border-top-color: var(--target);
  box-shadow: none;
}

.legal-catalog .legal-card h2 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-weight: 920;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.legal-catalog .legal-card p {
  max-width: 74ch;
  color: #4e5752;
  font-size: 0.9rem;
  line-height: 1.55;
}

.legal-catalog .legal-card:first-of-type h2,
.legal-catalog .legal-card:first-of-type p,
.legal-catalog .legal-card:first-of-type a {
  color: white;
}

.legal-catalog .legal-card a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-dark);
  font-weight: 780;
}

/* Branded request failures: one compact editorial panel, not a SaaS dialog. */
.error-catalog {
  align-content: start;
}

.error-catalog-panel {
  position: relative;
  min-height: min(460px, 52vh);
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: clamp(28px, 6vw, 76px);
  border: 1px solid rgba(23, 26, 23, 0.28);
  border-top: 7px solid var(--target);
  border-radius: 2px;
  background: #fffdf9;
}

.error-catalog-panel h2 {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  margin: var(--space-2) 0;
  color: #171a17;
  font-size: clamp(2.5rem, 7vw, 6.6rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.error-catalog-panel > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 58ch;
  margin: var(--space-2) 0 0;
  color: #4e5752;
  line-height: 1.55;
}

.error-catalog-mark {
  position: absolute;
  top: -0.16em;
  right: -0.02em;
  color: rgba(30, 131, 143, 0.1);
  font-family: var(--game-mono);
  font-size: clamp(11rem, 28vw, 28rem);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 0.8;
  pointer-events: none;
}

@media (max-width: 680px) {
  .error-catalog-panel {
    min-height: 390px;
    padding: var(--space-5);
  }

  .error-catalog-mark {
    top: 0.08em;
    right: -0.08em;
  }
}

/* Match builder: one working sheet plus a dense 2x2 preset index. */
.setup-catalog .setup-layout {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1.18fr) minmax(430px, 0.82fr);
  gap: var(--space-2);
}

.setup-catalog .setup-panel,
.setup-catalog .setup-card {
  border: 1px solid rgba(23, 26, 23, 0.22);
  border-radius: 2px;
  background: white;
  box-shadow: none;
}

.setup-catalog .setup-panel {
  display: grid;
  grid-template-rows: max-content max-content minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.setup-catalog .setup-panel .history-heading {
  padding: var(--space-4);
  background: #171a17;
  color: white;
}

.setup-catalog .setup-panel .history-heading .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.setup-catalog .setup-panel .history-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  font-weight: 920;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.setup-catalog .setup-copy {
  max-width: none;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: #f7f3ec;
  color: #4e5752;
  font-size: 0.88rem;
}

.setup-catalog .settings-form {
  position: relative;
  padding: var(--space-4);
}

.setup-catalog .setup-sheet-index {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  margin: 0;
  color: rgba(23, 26, 23, 0.055);
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(8rem, 16vw, 14rem);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.8;
  pointer-events: none;
}

.setup-catalog .setting-field {
  gap: 6px;
  padding: 10px;
  border-radius: 2px;
  background: #f7f3ec;
  color: #171a17;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.setup-catalog .setting-field select {
  min-height: 48px;
  border-radius: 2px;
  background-color: white;
  box-shadow: none;
}

.setup-catalog .setup-actions .primary-action {
  min-height: 52px;
  border-color: var(--target);
  border-radius: 2px;
  background: var(--target);
  color: white;
  box-shadow: none;
}

.setup-catalog .setup-sidebar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.setup-catalog .setup-card {
  align-content: start;
  padding: var(--space-4);
}

.setup-catalog .setup-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
  font-weight: 920;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.setup-catalog .setup-card p:last-of-type {
  color: #4e5752;
  font-size: 0.84rem;
}

.setup-catalog .setup-card .compact-action {
  align-self: end;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

.setup-catalog .setup-card:first-child {
  border-color: #171a17;
  background: #171a17;
  color: white;
}

.setup-catalog .setup-card:first-child .eyebrow,
.setup-catalog .setup-card:first-child p,
.setup-catalog .setup-card:first-child h2 {
  color: white;
}

.setup-catalog .setup-card:first-child .compact-action {
  border-color: white;
  color: white;
}

.setup-catalog .setup-card:last-child {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: white;
}

.setup-catalog .setup-card:last-child .eyebrow,
.setup-catalog .setup-card:last-child p,
.setup-catalog .setup-card:last-child h2 {
  color: white;
}

.setup-catalog .setup-card:last-child .compact-action {
  border-color: white;
  color: white;
}

/* Lobby: invite file in black, player roster on paper. */
.lobby-catalog .lobby-grid {
  width: 100%;
  max-width: none;
  gap: var(--space-2);
}

.lobby-catalog .mode-card {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid rgba(23, 26, 23, 0.22);
  border-radius: 2px;
  background: white;
  box-shadow: none;
}

.lobby-catalog .mode-card:first-child {
  border-color: #171a17;
  background: #171a17;
  color: white;
}

.lobby-catalog .mode-card:first-child .eyebrow,
.lobby-catalog .mode-card:first-child p,
.lobby-catalog .mode-card:first-child h2 {
  color: white;
}

.lobby-catalog .mode-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 920;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.lobby-catalog .match-detail-grid {
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.lobby-catalog .match-detail-grid span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.lobby-catalog .copy-field input,
.lobby-catalog .copy-field .secondary-action,
.lobby-catalog .action-row .primary-action,
.lobby-catalog .action-row .secondary-action {
  min-height: 48px;
  border-radius: 2px;
  box-shadow: none;
}

.lobby-catalog .copy-field input {
  border-color: rgba(255, 255, 255, 0.32);
  background: #f7f3ec;
}

.lobby-catalog .mode-card:first-child .secondary-action {
  border-color: white;
  background: transparent;
  color: white;
}

.lobby-catalog #lobbyPrimaryAction.primary-action {
  border-color: var(--target);
  background: var(--target);
  color: white;
}

.lobby-catalog .player-row {
  min-height: 58px;
  align-items: center;
  border-radius: 2px;
  background: #f7f3ec;
}

/* Partner preview: editorial intro plus a real listing photo index. */
.broker-demo-catalog {
  width: min(1320px, 100%);
  min-height: calc(100dvh - 88px);
  margin: 0 auto;
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  background: #f7f3ec;
}

.broker-demo-masthead {
  width: 100%;
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  border-radius: 3px;
  background: var(--accent);
  color: white;
  overflow: hidden;
}

.broker-demo-masthead > div {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: var(--space-4) var(--space-5);
}

.broker-demo-masthead .eyebrow,
.broker-demo-masthead .catalog-page-code {
  color: rgba(255, 255, 255, 0.68);
}

.broker-demo-masthead > div > a {
  width: fit-content;
  color: white;
  font-size: clamp(3.2rem, 6vw, 5.7rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.86;
  text-decoration: none;
}

.broker-demo-masthead > .secondary-link {
  min-height: 148px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: var(--accent-dark);
  color: white;
  box-shadow: none;
}

.broker-demo-catalog .broker-demo-hero {
  width: 100%;
  max-width: none;
  min-height: 0;
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
  gap: var(--space-2);
  align-items: stretch;
  margin: 0;
  padding: 0;
}

.broker-demo-catalog .broker-demo-copy {
  min-width: 0;
  padding: clamp(var(--space-4), 3vw, 36px);
  border-top: 8px solid var(--target);
  border-radius: 2px;
  background: #171a17;
  color: white;
}

.broker-demo-catalog .broker-demo-copy .eyebrow,
.broker-demo-catalog .broker-demo-copy .marketing-lede {
  color: rgba(255, 255, 255, 0.72);
}

.broker-demo-catalog .broker-demo-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(3rem, 5vw, 5.2rem);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.broker-demo-catalog .broker-demo-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.broker-demo-catalog .broker-demo-points span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  text-align: center;
}

.broker-demo-catalog .broker-demo-copy .primary-action {
  min-height: 50px;
  border-color: var(--target);
  border-radius: 2px;
  background: var(--target);
  color: white;
  box-shadow: none;
}

.broker-demo-catalog .broker-demo-inventory {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.broker-demo-catalog .broker-demo-listing {
  min-width: 0;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(23, 26, 23, 0.22);
  border-radius: 2px;
  background: white;
  box-shadow: none;
  overflow: hidden;
}

.broker-demo-catalog .broker-demo-listing > img {
  width: 100%;
  height: clamp(180px, 19vw, 245px);
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.broker-demo-catalog .broker-demo-listing > div {
  min-width: 0;
  padding: var(--space-3);
}

.broker-demo-catalog .broker-demo-listing:not(:has(> img)) {
  background: var(--target);
  color: white;
}

.broker-demo-catalog .broker-demo-listing:not(:has(> img)) > div > small,
.broker-demo-catalog .broker-demo-listing:not(:has(> img)) > div > strong,
.broker-demo-catalog .broker-demo-listing:not(:has(> img)) > div > span {
  color: white;
}

.broker-demo-catalog .broker-demo-listing > div > small {
  color: var(--target);
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
}

.broker-demo-catalog .broker-demo-credit {
  border-radius: 2px;
  background: #f7f3ec;
  box-shadow: none;
}

@media (min-width: 960px) {
  .setup-catalog .setup-layout,
  .lobby-catalog .lobby-grid {
    min-height: calc(100dvh - 272px);
    align-items: stretch;
  }

  .setup-catalog .settings-form {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .setup-catalog .settings-grid {
    align-self: center;
  }

  .setup-catalog .setup-sidebar {
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .setup-catalog .setup-card {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .lobby-catalog .mode-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .lobby-catalog .mode-card:first-child h2 {
    font-size: clamp(4rem, 6vw, 6.4rem);
  }

  .lobby-catalog .mode-card:first-child .action-row {
    margin-top: auto;
  }

  .broker-demo-catalog .broker-demo-listing:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  }

  .broker-demo-catalog .broker-demo-listing:last-child:nth-child(odd) > img {
    height: 100%;
    min-height: 240px;
  }

  .broker-demo-catalog .broker-demo-listing:last-child:nth-child(odd) > div {
    align-self: center;
    padding: var(--space-5);
  }
}

@media (max-width: 959px) {
  .catalog-page-shell > .menu-header {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .legal-catalog {
    grid-template-columns: 1fr;
  }

  .setup-catalog .setup-layout {
    grid-template-columns: 1fr;
  }

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

  .broker-demo-catalog .broker-demo-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .catalog-page-shell,
  .broker-demo-catalog {
    min-height: 0;
    padding: var(--space-2);
  }

  .catalog-page-shell > .menu-header,
  .broker-demo-masthead {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .catalog-page-shell > .menu-header > div,
  .broker-demo-masthead > div {
    padding: var(--space-4);
  }

  .catalog-page-shell > .menu-header h1 {
    font-size: clamp(2.6rem, 12vw, 3.7rem);
  }

  .catalog-page-shell > .menu-header > .secondary-link,
  .catalog-page-shell > .menu-header > form,
  .broker-demo-masthead > .secondary-link {
    min-height: 58px;
    height: auto;
    padding: 7px var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .legal-catalog .legal-card {
    padding: var(--space-4);
  }

  .setup-catalog .settings-grid,
  .setup-catalog .setup-sidebar,
  .broker-demo-catalog .broker-demo-inventory,
  .broker-demo-catalog .broker-demo-points {
    grid-template-columns: 1fr;
  }

  .setup-catalog .settings-form,
  .setup-catalog .setup-panel .history-heading {
    padding: var(--space-3);
  }

  .setup-catalog .setup-sheet-index {
    display: none;
  }

  .setup-catalog .setup-actions .primary-action {
    width: 100%;
    min-width: 0;
  }

  .lobby-catalog .mode-card {
    padding: var(--space-4);
  }

  .lobby-catalog .match-detail-grid {
    grid-template-columns: 1fr;
  }

  .lobby-catalog .copy-field {
    grid-template-columns: 1fr;
  }

  .lobby-catalog .copy-field .secondary-action {
    width: 100%;
  }

  .broker-demo-masthead > div > a {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .broker-demo-catalog .broker-demo-copy {
    padding: var(--space-4);
  }

  .broker-demo-catalog .broker-demo-copy h1 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }
}
