/* Hallmark reference · Catalogue · existing game art and task-focused tools.
 * Colors and typography inherit the site's existing tokens. */
:root {
  --font-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --hall-game-action: oklch(49% 0.2 26);
  --hall-space-xs: 4px;
  --hall-space-sm: 8px;
  --hall-space-md: 16px;
  --hall-space-lg: 24px;
  --hall-space-xl: 32px;
  --hall-space-2xl: 48px;
}

body.hall-home {
  --hall-surface: var(--dark-surface-0);
  --hall-card: var(--dark-surface-1);
  --hall-ink: var(--dark-fg-strong);
  --hall-copy: var(--dark-fg-default);
  --hall-muted: var(--dark-fg-muted);
  --hall-rule: color-mix(in oklch, var(--dark-fg-muted) 28%, transparent);
  --hall-accent: var(--dark-accent);
  --hall-action: var(--hall-game-action);
  --hall-focus: var(--hall-game-focus);
  background: var(--hall-surface);
}

body.hall-home[data-hall-view="utility"] {
  --hall-surface: var(--color-canvas-default);
  --hall-card: var(--color-canvas-card);
  --hall-ink: var(--color-fg-default);
  --hall-copy: var(--color-fg-muted);
  --hall-muted: var(--color-fg-subtle);
  --hall-rule: var(--color-border-default);
  --hall-accent: var(--color-accent-fg);
  --hall-action: var(--color-accent-emphasis);
  --hall-focus: var(--hall-utility-focus);
  background: var(--hall-surface);
}

body.hall-home .container {
  max-width: 1600px;
  padding: var(--hall-space-md) var(--hall-space-lg);
}

body.hall-home .hall-shell {
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Author display rules must never override an empty or filtered state. */
.hall-shell [hidden] {
  display: none !important;
}

body.hall-home .hall-topbar {
  position: sticky;
  top: var(--header-height);
  z-index: 10;
  grid-template-columns: max-content minmax(240px, 540px);
  justify-content: space-between;
  gap: var(--hall-space-lg);
  min-height: 64px;
  padding: var(--hall-space-sm) 0 var(--hall-space-md);
  border-bottom: 1px solid var(--hall-rule);
  background: var(--hall-surface);
}

body.hall-home .hall-tabs {
  gap: var(--hall-space-xs);
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

body.hall-home .hall-tab {
  min-width: 104px;
  min-height: 44px;
  padding: var(--hall-space-sm) var(--hall-space-md);
  border-radius: var(--radius-sm);
  color: var(--hall-muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  box-shadow: none;
}

body.hall-home .hall-tab.active {
  color: var(--hall-ink);
  background: var(--hall-card);
  box-shadow: inset 0 -2px var(--hall-accent);
}

.hall-topbar .hall-search {
  width: 100%;
  justify-self: stretch;
}

body.hall-home .hall-search input {
  height: 44px;
  padding: 0 var(--hall-space-md);
  color: var(--hall-ink);
  border-color: var(--hall-rule);
  background: var(--hall-card);
}

.hall-search input::placeholder {
  color: var(--hall-muted);
  opacity: 1;
}

body.hall-home .hall-panel {
  padding: var(--hall-space-lg) 0;
}

.hall-page-heading {
  display: flex;
  align-items: center;
  gap: var(--hall-space-lg);
  margin-bottom: var(--hall-space-md);
}

.hall-quality-nav {
  display: flex;
  gap: var(--hall-space-md);
  margin-left: auto;
}

.hall-quality-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--hall-space-xs);
  min-height: 44px;
  color: var(--hall-copy);
  font: 600 12px/1 var(--font-label);
  text-decoration: none;
  white-space: nowrap;
}

.hall-quality-nav [data-quality-count] {
  color: var(--hall-muted);
  font-weight: 400;
}

.hall-quality-nav a:focus-visible {
  outline: 2px solid var(--hall-focus);
  outline-offset: 3px;
}

.hall-quality-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hall-page-heading h1 {
  min-width: 0;
  color: var(--hall-ink);
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.hall-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hall-space-sm);
  margin-bottom: var(--hall-space-lg);
}

.hall-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hall-space-sm);
  min-height: 44px;
  padding: var(--hall-space-sm) 12px;
  border: 1px solid var(--hall-rule);
  border-radius: var(--radius-sm);
  color: var(--hall-copy);
  font: 500 14px/1 var(--font-body);
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.hall-filter[aria-pressed="true"] {
  border-color: var(--hall-accent);
  color: var(--hall-ink);
  background: var(--hall-card);
}

.hall-filter-count {
  color: var(--hall-muted);
  font: 400 12px/1 var(--font-label);
  font-variant-numeric: tabular-nums;
}

.hall-filter:focus-visible,
.hall-clear-search:focus-visible,
.hall-reset-all:focus-visible,
.hall-help a:focus-visible {
  outline: 2px solid var(--hall-focus);
  outline-offset: 3px;
}

.hall-filter:active,
.hall-reset-all:active {
  background: var(--hall-card);
}

.hall-filter:disabled,
.hall-clear-search:disabled,
.hall-reset-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hall-featured {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  overflow: clip;
  margin-bottom: var(--hall-space-lg);
  border: 1px solid var(--hall-rule);
  border-radius: var(--radius-md);
  background: var(--hall-card);
}

.hall-featured-media {
  min-width: 0;
  overflow: hidden;
  background: #13bfd5;
}

.hall-featured-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(24px, 2.5vw, 40px);
}

.hall-featured .hall-kicker {
  margin: 0 0 var(--hall-space-md);
  color: #82d3c5;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.hall-featured-title {
  max-width: 12ch;
  margin: 0;
  color: var(--hall-ink);
  font-family: var(--font-headline);
  font-size: clamp(32px, 3.1vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hall-featured-subtitle {
  margin: var(--hall-space-sm) 0 0;
  color: var(--hall-muted);
  font-size: 14px;
  line-height: 1.4;
}

.hall-featured-headline {
  margin: var(--hall-space-lg) 0 0;
  color: var(--hall-ink);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  line-height: 1.5;
  word-break: keep-all;
  text-wrap: pretty;
}

.hall-featured-description {
  margin: var(--hall-space-sm) 0 0;
  color: var(--hall-copy);
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hall-featured-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hall-space-sm) var(--hall-space-md);
  padding: 0;
  margin: var(--hall-space-lg) 0;
  color: var(--hall-copy);
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
}

.hall-featured-facts li + li {
  padding-left: var(--hall-space-md);
  border-left: 1px solid var(--hall-rule);
}

.hall-featured .hall-primary {
  min-width: 176px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  padding: 0 var(--hall-space-lg);
  color: #101919;
  background: #f7825d;
  box-shadow: none;
}

.hall-featured-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hall-catalog {
  min-width: 0;
  scroll-margin-top: calc(var(--header-height) + 100px);
}

.hall-results-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--hall-space-sm) 12px;
  min-height: 44px;
  margin-bottom: var(--hall-space-md);
}

.hall-results-heading h2 {
  min-width: 0;
  color: var(--hall-ink);
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.hall-result-count {
  margin-right: auto;
  color: var(--hall-muted);
  font: 400 14px/1.4 var(--font-label);
  font-variant-numeric: tabular-nums;
}

.hall-clear-search,
.hall-reset-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  padding: var(--hall-space-sm) 0;
  color: var(--hall-copy);
  font: 500 14px/1.2 var(--font-body);
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.hall-clear-search {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hall-reset-all {
  padding: var(--hall-space-sm) var(--hall-space-md);
  border: 1px solid var(--hall-rule);
  border-radius: var(--radius-sm);
}

.hall-empty-state {
  padding: var(--hall-space-2xl) var(--hall-space-lg);
  border-top: 1px solid var(--hall-rule);
}

.hall-empty-state h3 {
  color: var(--hall-ink);
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 600;
}

.hall-empty-state p {
  margin: var(--hall-space-sm) 0 var(--hall-space-lg);
  color: var(--hall-copy);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
}

.hall-game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hall-space-lg) var(--hall-space-md);
}

.hall-game-groups {
  display: grid;
  gap: var(--hall-space-xl);
}

.hall-game-groups > .game-library-group {
  min-width: 0;
  gap: var(--hall-space-md);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scroll-margin-top: calc(var(--header-height) + 100px);
}

.hall-game-groups .game-library-group-heading {
  border-color: var(--hall-rule);
}

.hall-game-groups .game-library-group-heading h3:focus-visible {
  outline: 2px solid var(--hall-focus);
  outline-offset: 4px;
}

.hall-game-groups [data-game-group="feature"] .game-library-group-heading h3 {
  color: var(--hall-feature-group);
}

.hall-game-groups [data-game-group="casual"] .game-library-group-heading h3 {
  color: var(--hall-casual-group);
}

.hall-game-grid--feature {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hall-game-grid--casual {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hall-game-grid .game-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-color: var(--hall-rule);
  border-radius: var(--radius-sm);
  background: var(--hall-card);
}

.hall-game-grid .game-card-art {
  flex: 0 0 auto;
  min-height: 0;
}

.hall-game-grid .game-card-body {
  padding: 12px;
}

.hall-game-grid .game-card-title {
  margin-bottom: var(--hall-space-sm);
  color: var(--hall-ink);
  font-size: 16px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hall-game-grid .game-card-meta {
  display: block;
  margin: 0;
  color: var(--hall-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hall-game-grid--casual .game-card-title {
  font-size: 14px;
}

.hall-game-grid--casual .game-card-meta {
  font-size: 12px;
}

.hall-tool-group + .hall-tool-group {
  margin-top: var(--hall-space-xl);
}

.hall-tool-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hall-space-md);
  padding-bottom: var(--hall-space-md);
  margin-bottom: var(--hall-space-md);
  border-bottom: 1px solid var(--hall-rule);
}

.hall-tool-group-heading h3 {
  margin: 0;
  color: var(--hall-ink);
  font: 600 13px/1.4 var(--font-body);
}

[data-tool-group="feature"] .hall-tool-group-heading h3 {
  color: var(--hall-accent);
  letter-spacing: 0.12em;
}

.hall-tool-group-heading span {
  color: var(--hall-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.hall-tool-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hall-space-lg);
}

.tool-feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hall-rule);
  border-radius: var(--radius-md);
  background: var(--hall-card);
  color: var(--hall-ink);
  text-decoration: none;
}

.tool-feature-screen {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-bottom: 1px solid var(--hall-rule);
}

.tool-feature-copy {
  padding: var(--hall-space-lg);
}

.tool-feature-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hall-space-md);
}

.tool-feature-title-row h4 {
  min-width: 0;
  margin: 0;
  color: var(--hall-ink);
  font: 600 22px/1.35 var(--font-headline);
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.tool-feature-copy p {
  margin: var(--hall-space-sm) 0 0;
  color: var(--hall-copy);
  font-size: 14px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tool-feature-open {
  flex-shrink: 0;
  color: var(--hall-accent);
  font-size: 13px;
  font-weight: 600;
}

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

.hall-tool-grid .tool-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) max-content;
  gap: var(--hall-space-md);
  align-items: start;
  min-width: 0;
  min-height: 128px;
  padding: var(--hall-space-lg) 0;
  border: 0;
  border-bottom: 1px solid var(--hall-rule);
  border-radius: 0;
  color: var(--hall-ink);
  background: transparent;
}

.hall-tool-grid .tool-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--room-text);
  background: transparent;
  box-shadow: none;
}

.hall-tool-grid .tool-icon svg {
  width: 24px;
  height: 24px;
}

.hall-tool-grid .tool-emoji {
  display: grid;
  place-items: center;
  font-family: var(--font-emoji);
  font-size: 26px;
  line-height: 1;
}

.tool-card-copy {
  min-width: 0;
}

.hall-tool-grid .tool-card h4 {
  margin: 0;
  color: var(--hall-ink);
  font-family: var(--font-headline);
  font-size: 16px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hall-tool-grid .tool-card p {
  margin: var(--hall-space-sm) 0 0;
  color: var(--hall-copy);
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tool-open {
  padding-top: var(--hall-space-xs);
  color: var(--hall-muted);
  font-size: 13px;
  white-space: nowrap;
}

.hall-catalog .hall-ad-slot--horizontal {
  grid-column: 1 / -1;
  margin: var(--hall-space-md) auto;
}

.hall-help {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hall-space-sm) var(--hall-space-lg);
  margin-top: var(--hall-space-xl);
  border-top: 1px solid var(--hall-rule);
  padding-top: var(--hall-space-md);
}

.hall-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hall-copy);
  font-size: 14px;
  text-underline-offset: 4px;
  white-space: nowrap;
}

body.hall-home .hall-home-answers {
  gap: var(--hall-space-xl);
  padding: var(--hall-space-lg) 0;
  border-top: 1px solid var(--hall-rule);
}

body.hall-home .hall-home-answer-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.hall-home-answer-card h2,
.hall-home-faq-item h3 {
  color: var(--hall-ink);
}

body.hall-home .hall-home-answer-card li,
body.hall-home .hall-home-answer-card p {
  color: var(--hall-copy);
}

body[data-hall-searching="true"] [data-hall-discovery],
body[data-hall-searching="true"] .hall-home-answers,
body[data-hall-searching="true"] .hall-ad-rail {
  display: none;
}

body[data-hall-searching="true"] .hall-ad-frame {
  grid-template-columns: minmax(0, 1fr);
}

.hall-loading-panel {
  display: block;
  padding: var(--hall-space-lg) 0;
}

.hall-loading-hero {
  min-height: 320px;
}

.hall-loading-side {
  display: none;
}

@media (min-width: 769px) {
  body.hall-home .hall-panel {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: var(--hall-space-lg);
    align-items: center;
  }

  .hall-page-heading,
  .hall-filters {
    margin-bottom: var(--hall-space-lg);
  }

  .hall-filters {
    justify-content: flex-end;
  }

  .hall-featured,
  .hall-catalog,
  .hall-help {
    grid-column: 1 / -1;
  }

}

@media (hover: hover) and (pointer: fine) {
  .tool-feature-card:hover {
    border-color: var(--hall-accent);
  }

  .tool-feature-card:hover .tool-feature-open {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .hall-filter:hover,
  .hall-reset-all:hover {
    background: var(--hall-card);
  }

  .hall-game-grid .game-card:hover,
  .hall-tool-grid .tool-card:hover {
    border-color: var(--hall-muted);
    transform: none;
  }
}

@media (max-width: 1100px) {
  .hall-featured {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

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

  .hall-game-grid--feature {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .hall-tool-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .hall-game-groups > .game-library-group {
    scroll-margin-top: calc(var(--header-height) + 132px);
  }

  .hall-game-grid--feature,
  .hall-game-grid--casual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.hall-home .header {
    padding: 0 var(--hall-space-md);
  }

  body.hall-home .header-content {
    gap: var(--hall-space-xs);
    padding: 0;
  }

  body.hall-home .nav {
    gap: var(--hall-space-sm);
  }

  body.hall-home .container {
    padding: var(--hall-space-sm) var(--hall-space-md);
  }

  body.hall-home .hall-topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--hall-space-sm);
    padding: 0 0 12px;
  }

  body.hall-home .hall-tab {
    flex: 1;
    min-width: 0;
  }

  body.hall-home .hall-panel {
    padding: var(--hall-space-md) 0;
  }

  .hall-featured {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: var(--hall-space-md);
  }

  .hall-featured-copy {
    padding: var(--hall-space-lg);
  }

  .hall-featured-title {
    max-width: none;
    font-size: clamp(28px, 7.5vw, 36px);
    line-height: 1.15;
  }

  .hall-featured .hall-kicker {
    margin-bottom: var(--hall-space-sm);
  }

  .hall-featured-headline {
    margin-top: var(--hall-space-md);
  }

  .hall-featured-art {
    height: auto;
    aspect-ratio: 1672 / 941;
  }

  .hall-featured-facts {
    margin: var(--hall-space-md) 0;
  }

  .hall-featured .hall-primary {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .tool-feature-copy {
    padding: var(--hall-space-md);
  }

  .tool-feature-title-row h4 {
    font-size: 20px;
  }

  .hall-page-heading {
    margin-bottom: 12px;
  }

  .hall-page-heading h1 {
    font-size: 28px;
  }

  .hall-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hall-space-sm);
    margin-bottom: var(--hall-space-md);
  }

  .hall-filter {
    min-width: 0;
    gap: var(--hall-space-xs);
    padding: var(--hall-space-sm) var(--hall-space-xs);
    font-size: 13px;
  }

  .hall-filter-count {
    font-size: 11px;
  }

  .hall-game-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--hall-space-sm);
  }

  .hall-game-grid .game-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
  }

  .hall-game-grid .game-card-art {
    height: 100%;
    min-height: 96px;
    aspect-ratio: auto;
  }

  .hall-game-grid .game-card-body {
    padding: 12px;
  }

  .hall-game-grid .game-card-title {
    font-size: 15px;
    line-height: 1.35;
  }

  .hall-game-grid .game-card-meta {
    font-size: 13px;
  }

  .hall-game-grid--feature .game-card {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .hall-game-grid--casual .game-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .hall-game-grid--casual .game-card-art {
    min-height: 80px;
  }

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

  .hall-tool-grid .tool-card {
    min-height: 104px;
    gap: 12px;
    padding: var(--hall-space-md) 0;
  }

  .hall-empty-state {
    padding: var(--hall-space-xl) 0;
  }

  body.hall-home .hall-home-answers {
    grid-template-columns: minmax(0, 1fr);
  }

  .hall-catalog {
    scroll-margin-top: calc(var(--header-height) + 132px);
  }
}
