@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Manrope:wght@600;700;800&display=swap");
:root {
  --ink: #17211c;
  --paper: #f4f0e7;
  --lime: #c9f04b;
  --orange: #ef6a3a;
  --line: #c9c6bc;
  --page-gutter: clamp(1.25rem, 5vw, 4.5rem);
  --section-space: clamp(3rem, 7vw, 6rem);
}
* {
  box-sizing: border-box;
}
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #17211c;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
#blazor-error-ui {
  position: fixed;
  z-index: 1000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: none;
  padding: 1rem 3rem 1rem 1rem;
  border: 1px solid var(--ink);
  background: #fff3cd;
  box-shadow: 0 0.75rem 2rem rgb(23 33 28 / 22%);
}
#blazor-error-ui .dismiss {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  cursor: pointer;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope, sans-serif;
}
h1 {
  font-size: clamp(2.6rem, 6vw, 6.3rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin: 0.25em 0;
}
h1:focus,
h1:focus-visible {
  outline: none;
}
a {
  color: inherit;
}
.shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.shell::before,
.shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.shell::before {
  z-index: -2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.shell::after {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, rgb(244 240 231 / 24%), transparent 58%),
    linear-gradient(rgb(244 240 231 / 16%), rgb(244 240 231 / 28%));
}
.background-scene-0::before {
  background-image: url("../images/backgrounds/stone-corridors.png");
}
.background-scene-1::before {
  background-image: url("../images/backgrounds/maze-overview.png");
}
.background-scene-2::before {
  background-image: url("../images/backgrounds/industrial-catacombs.png");
}
.site-nav {
  position: sticky;
  z-index: 1000;
  top: 0;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid var(--line);
  background: rgb(244 240 231 / 72%);
  backdrop-filter: blur(12px);
}
.brand {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
}
.brand span {
  color: var(--orange);
}
.site-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-links a {
  text-decoration: none;
  font-weight: 600;
}
.site-links > a:not(.nav-cta) {
  position: relative;
}
.site-links > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 160ms ease;
}
.site-links > a:hover::after,
.site-links > a:focus-visible::after {
  transform: scaleX(1);
}
.menu-toggle {
  display: none;
}
.language-switch {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  padding: 0.2rem;
  font: 700 0.75rem Manrope, sans-serif;
  cursor: pointer;
}
.nav-cta {
  border: 1px solid;
  padding: 0.65rem 1rem;
}
.account-menu {
  position: relative;
}
.mobile-account-link {
  display: none;
}
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 1rem "DM Sans", sans-serif;
  cursor: pointer;
}
.account-avatar {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  font: 800 0.85rem Manrope, sans-serif;
}
.account-chevron {
  color: #627054;
  transition: transform 160ms ease;
}
.account-trigger[aria-expanded="true"] .account-chevron {
  transform: rotate(180deg);
}
.account-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 210px;
  display: grid;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgb(23 33 28 / 14%);
}
.account-dropdown a,
.account-dropdown button {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: 600 0.95rem "DM Sans", sans-serif;
  cursor: pointer;
}
.account-dropdown > :last-child {
  border-bottom: 0;
}
.account-section {
  padding: 0.7rem 1rem 0.45rem;
  border-bottom: 1px solid var(--line);
  color: #627054;
  font: 700 0.65rem Manrope, sans-serif;
  letter-spacing: 0.14em;
}
.account-dropdown a:hover,
.account-dropdown button:hover {
  background: var(--lime);
}
main {
  width: min(100%, 1400px);
  max-width: 1400px;
  margin: auto;
  padding: clamp(3rem, 5vw, 5rem) var(--page-gutter);
  background: rgb(244 240 231 / 46%);
  box-shadow: 0 0 60px rgb(244 240 231 / 22%);
  backdrop-filter: blur(2px);
}
.shell > main {
  flex: 1;
}
.hero {
  min-height: min(66vh, 720px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 5vw;
}
.hero p {
  font-size: 1.25rem;
  max-width: 620px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #627054;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 0;
  padding: 1rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.primary {
  background: var(--ink);
  color: white;
}
.secondary {
  background: transparent;
  border: 1px solid var(--ink);
}
.google-auth {
  width: 100%;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
.google-auth:hover,
.google-auth:focus-visible {
  border-color: var(--ink);
}
.google-auth svg {
  width: 1.35rem;
  height: 1.35rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0;
  color: #627054;
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.terms-note {
  color: #627054;
  font-size: 0.85rem;
  line-height: 1.5;
}
.terms-note a {
  font-weight: 700;
}
.hero-photo {
  position: relative;
  width: min(88%, 440px);
  aspect-ratio: 4 / 5;
  justify-self: end;
  margin: 0 1.25rem 0 0;
}
.hero-photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: var(--lime);
}
.hero-photo::after {
  content: "";
  position: absolute;
  top: -0.65rem;
  right: -0.65rem;
  width: 3.5rem;
  height: 3.5rem;
  border-top: 0.65rem solid var(--orange);
  border-right: 0.65rem solid var(--orange);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--ink);
  object-fit: cover;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}
.features article {
  padding: 2rem;
  border-right: 1px solid var(--line);
}
.features b {
  color: var(--orange);
}
.page-head {
  margin-bottom: 4rem;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
}
.popular-games {
  margin-bottom: 6rem;
}
.home-popular {
  margin: var(--section-space) 0;
}
.featured-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.featured-row .card {
  min-width: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 32px rgb(23 33 28 / 5%);
}
.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}
.filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 45%);
}
.filter-toggle {
  display: none;
}
.catalog-filters {
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(140px, 1fr));
}
.filter-panel label,
.filter-panel label span {
  display: block;
}
.filter-panel label span {
  margin-bottom: 0.45rem;
  color: #627054;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: inherit;
}
.filter-panel input:focus,
.filter-panel select:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.catalog-list {
  border-top: 1px solid var(--line);
}
.catalog-list article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 4rem 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.catalog-list h3 {
  margin: 0.3rem 0;
  font-size: 1.4rem;
}
.catalog-list p {
  max-width: 760px;
  margin: 0.35rem 0 0;
  color: #565e59;
}
.catalog-list-meta {
  text-align: right;
}
.catalog-list-meta strong,
.catalog-list-meta small {
  display: block;
}
.catalog-list-meta strong {
  font: 800 1.6rem Manrope, sans-serif;
}
.text-link {
  font-weight: 700;
}
.icon-action,
.ai-generated-badge {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
}
.icon-action {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: background 150ms ease, transform 150ms ease;
}
.icon-action:hover {
  background: var(--lime);
  transform: translateY(-2px);
}
.icon-action svg,
.ai-generated-badge svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.large-icon-action {
  width: 3.4rem;
  height: 3.4rem;
}
.ai-generated-badge {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  right: 0.75rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 14px rgb(23 33 28 / 10%);
}
.ai-generated-badge.inline-badge {
  position: relative;
  top: auto;
  right: auto;
  width: 2.5rem;
  height: 2.5rem;
  box-shadow: none;
}
.game-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.game-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
}
.rating-star {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c7c7bf;
  font: 700 1.25rem/1 Manrope, sans-serif;
}
button.rating-star {
  cursor: pointer;
  transition: color 120ms ease, transform 120ms ease;
}
button.rating-star:hover,
button.rating-star:focus-visible {
  color: #b67a00;
  transform: translateY(-1px) scale(1.08);
}
.rating-star.is-filled {
  color: #d99a00;
}
.rating-summary {
  color: #666;
  white-space: nowrap;
}
.rating-prompt {
  margin: 2rem 0;
  text-align: center;
}
.rating-prompt h2 {
  margin-bottom: 0.75rem;
}
.rating-prompt .game-rating {
  justify-content: center;
}
.rating-prompt .rating-stars {
  gap: 0.2rem;
}
.rating-prompt .rating-star {
  font-size: 2.75rem;
}
.rating-prompt .rating-summary {
  font-size: 1rem;
}
.icon-action.has-tooltip {
  position: relative;
}
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  padding: 0.45rem 0.65rem;
  border-radius: 0.25rem;
  background: var(--ink);
  color: white;
  font: 600 0.75rem "DM Sans", sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.25rem);
  transition: opacity 120ms ease, transform 120ms ease;
}
.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.game-title-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.card-actions,
.row-actions,
.completion-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.card-actions {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
}
.empty,
.narrow {
  padding: 4rem;
  border: 1px solid var(--line);
  max-width: 680px;
}
.narrow {
  margin: 3rem auto;
}
.narrow h1 {
  font-size: 3.5rem;
}
.narrow input,
.form-grid input,
.form-grid textarea,
.play input {
  width: 100%;
  padding: 1rem;
  margin: 0.45rem 0 1.2rem;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
}

.browser-sensor-action {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.qr-camera {
  width: min(100%, 32rem);
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  background: #111;
  object-fit: cover;
}

.qr-generator,
.qr-generated-preview {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.qr-generated-preview img {
  width: min(100%, 20rem);
  aspect-ratio: 1;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
  image-rendering: pixelated;
}

.qr-code-id {
  overflow-wrap: anywhere;
}

.qr-scan-message {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
}

.qr-scan-message h2,
.qr-scan-message p {
  margin: 0;
}

.navigation-compass {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  margin: 1rem 0;
  text-align: center;
}

.compass-dial {
  position: relative;
  width: min(72vw, 18rem);
  aspect-ratio: 1;
  border: 0.45rem solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 58%, #f0eadf 59% 100%);
  box-shadow: inset 0 0 0 0.2rem var(--line), 0 0.5rem 1.5rem rgb(0 0 0 / 14%);
}

.compass-rose {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: transform 180ms ease-out;
}

.compass-rose > span {
  position: absolute;
  z-index: 2;
  font-weight: 800;
}

.compass-north { top: 0.55rem; left: 50%; transform: translateX(-50%); color: var(--orange); }
.compass-east { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.compass-south { bottom: 0.55rem; left: 50%; transform: translateX(-50%); }
.compass-west { left: 0.75rem; top: 50%; transform: translateY(-50%); }

.compass-arrow {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 3.5rem;
  height: 46%;
  color: var(--orange);
  font-size: 3.5rem;
  line-height: 1;
  text-align: center;
  transform-origin: 50% 88%;
  transition: transform 180ms ease-out;
}

.compass-center {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 1rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.code-input {
  font-size: 2rem !important;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}
.narrow .btn {
  width: 100%;
}
.error {
  color: #b33b26;
}
.success {
  color: #3c6e24;
  font-weight: 700;
}
.list article {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 1.5rem 4rem 1.5rem 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 3rem;
}
.form-grid label {
  display: block;
  font-weight: 700;
}
.form-grid .check {
  display: flex;
  gap: 0.6rem;
}
.form-grid .check input {
  width: auto;
}
.json {
  height: 500px;
  font-family: monospace;
}
.visual-editor {
  display: grid;
  gap: 3rem;
}
.editor-section {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.editor-section-heading,
.subsection-heading,
.scenario-step-header,
.choice-option-header,
.editor-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.editor-section-heading {
  margin-bottom: 1.5rem;
}
.editor-section-heading h2,
.scenario-step-header h3,
.step-subsection h4 {
  margin: 0.25rem 0 0;
}
.editor-section-heading > p {
  max-width: 480px;
  margin-left: auto;
  color: #666;
}
.editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}
.editor-fields-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.editor-fields label,
.editor-fields .editor-readonly-field,
.media-editor-row label,
.transition-field {
  display: block;
  font-weight: 700;
}
.editor-fields label > span,
.media-editor-row label > span,
.transition-field > span {
  display: block;
  margin-bottom: 0.35rem;
}
.field-label,
.cover-image-field > span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.editor-fields label > .field-label-with-help,
.editor-fields .editor-readonly-field > .field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.editor-readonly-value {
  display: block;
  min-height: 3rem;
  padding: 0.7rem 0;
  overflow-wrap: anywhere;
  font-weight: 400;
}
.field-tooltip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
  cursor: help;
}
.field-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.55rem);
  left: 50%;
  width: min(18rem, 75vw);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: #17211c;
  color: white;
  box-shadow: 0 0.5rem 1rem rgb(23 33 28 / 20%);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.2rem);
  transition: opacity 120ms ease, transform 120ms ease;
}
.field-tooltip:hover::after,
.field-tooltip:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.field-help {
  display: block;
  margin-top: 0.4rem;
  color: #565e59;
  font-weight: 400;
}
.cover-image-field input[type="file"] {
  display: block;
  width: 100%;
  padding: 0.8rem;
  border: 1px dashed var(--line);
  background: rgb(255 255 255 / 70%);
}
.cover-image-preview {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}
.cover-image-preview img {
  width: min(100%, 320px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
}
.location-picker {
  z-index: 0;
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  background: #d9ddd6;
  text-shadow: none;
}
.scenario-step .location-picker {
  height: 320px;
}
.location-picker-error {
  display: block;
  margin-top: 0.5rem;
}
.editor-fields input:not([type="checkbox"]),
.editor-fields textarea,
.editor-fields select,
.media-editor-row input,
.media-editor-row select,
.transition-field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
}
.editor-fields textarea {
  min-height: 7rem;
  resize: vertical;
}
.editor-fields .full-width {
  grid-column: 1 / -1;
}
.editor-checks,
.inline-checks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.editor-checks {
  align-self: end;
  min-height: 3rem;
}
.visual-editor .check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}
.visual-editor .check input {
  width: 1.1rem;
  height: 1.1rem;
}
.access-code-manager {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 55%);
}
.access-code-manager h3 {
  margin: 0;
}
.game-link-qr-manager {
  display: grid;
  justify-items: start;
  gap: 1rem;
}
.game-link-qr-manager .subsection-heading,
.game-link-qr-manager .access-code-form {
  width: 100%;
}
.game-link-qr-preview {
  max-width: 100%;
}
.game-link-url {
  max-width: min(100%, 42rem);
  overflow-wrap: anywhere;
}
.access-code-form {
  align-items: end;
  margin-top: 1.25rem;
}
.access-code-create-action {
  align-self: center;
}
.access-code-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.access-code-row {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: white;
}
.access-code-row code {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.access-code-details,
.access-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.access-code-details {
  justify-content: flex-end;
}
.access-code-actions {
  align-items: center;
  justify-content: flex-end;
}
.access-code-row span {
  color: #565e59;
}
.scenario-steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.scenario-step {
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 70%);
  box-shadow: 0 12px 30px rgb(23 33 28 / 5%);
}
.scenario-step-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.scenario-step-header > div,
.step-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.step-number {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 800;
}
.icon-text-button {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  font: 800 1rem Manrope, sans-serif;
}
.icon-text-button:disabled {
  opacity: 0.35;
}
.step-fields,
.step-subsection {
  margin: 1.5rem;
}
.step-subsection {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.subsection-heading {
  margin-bottom: 1rem;
}
.compact,
.compact-button {
  margin: 0;
}
.compact-button {
  padding: 0.55rem 0.8rem;
}
.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.answer-route-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.answer-route-row label,
.answer-route-row label > span {
  display: block;
}
.answer-route-row label > span {
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.answer-route-row input,
.answer-route-row select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
}
.answer-route-row .transition-field {
  margin-top: 0;
}
.add-after-list {
  justify-self: start;
  margin-top: 1rem;
}
.answer-row input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
}
.inline-checks,
.transition-field {
  margin-top: 1rem;
}
.skip-editor > .check {
  margin-bottom: 1rem;
}
.skip-fields {
  align-items: end;
}
.skip-fields .transition-field {
  margin-top: 0;
}
.choice-editor {
  display: grid;
  gap: 1rem;
}
.choice-option {
  padding: 1rem;
  border: 1px solid var(--line);
  background: white;
}
.choice-option-header {
  margin-bottom: 1rem;
}
.choice-option details {
  margin-top: 1rem;
}
.choice-option summary {
  cursor: pointer;
  font-weight: 700;
}
.media-list-editor {
  display: grid;
  gap: 0.75rem;
}
.media-editor-row {
  display: grid;
  grid-template-columns: 140px minmax(180px, 1.5fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: white;
}
.editor-errors {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #b33b26;
  background: #fff0ec;
  color: #7d2819;
}
.editor-errors ul {
  margin-bottom: 0;
}
.editor-save-bar {
  position: sticky;
  z-index: 10;
  bottom: 1rem;
  padding: 0.65rem 1rem;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: rgb(246 244 238 / 95%);
  box-shadow: 0 10px 35px rgb(23 33 28 / 15%);
  backdrop-filter: blur(8px);
}
.editor-save-summary {
  display: grid;
  gap: 0.25rem;
}
.editor-save-summary small {
  color: #627054;
}
.editor-save-summary a {
  font-weight: 700;
}
.muted {
  color: #666;
}
.play {
  max-width: 900px;
  margin: auto;
}
.game-start-screen {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  background: rgb(244 240 231 / 92%);
  box-shadow: 1rem 1rem 0 rgb(23 33 28 / 12%);
}
.game-start-cover {
  display: block;
  width: 100%;
  max-height: 24rem;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  object-fit: cover;
}
.game-start-screen > h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.5rem, 7vw, 5rem);
}
.game-start-description {
  max-width: 720px;
  font-size: 1.2rem;
  line-height: 1.65;
}
.game-start-meta {
  margin-bottom: 2rem;
}
.game-start-map,
.device-readiness-notice,
.permission-notice {
  margin: 2rem 0;
}
.game-start-map .location-picker {
  height: 360px;
}
.permission-notice {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--orange);
  background: rgb(255 255 255 / 64%);
}
.device-readiness-notice {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  background: rgb(213 231 103 / 24%);
}
.device-readiness-notice p {
  margin: 0.35rem 0 0;
}
.permission-notice h2,
.permission-notice p:last-child {
  margin-bottom: 0;
}
.saved-progress-notice {
  display: grid;
  gap: 0.3rem;
  margin: 2rem 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 64%);
}
.game-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.play header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.play main {
  padding: 6rem 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.play h1 {
  font-size: 4rem;
}
.prompt {
  font-size: 1.5rem;
}
.media,
.play video {
  max-width: 100%;
}
.play aside {
  padding: 1.5rem;
  border-left: 4px solid var(--lime);
  margin: 2rem 0;
}
.choices {
  display: grid;
  gap: 0.75rem;
}
.choices button {
  padding: 1.25rem;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  font: inherit;
}
.text-button {
  border: 0;
  background: none;
  text-decoration: underline;
  margin-top: 1rem;
}
.skip-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.skip-action small {
  font-weight: 700;
}
.complete {
  text-align: center;
  padding: 10vh 0;
}
.complete .completion-actions {
  justify-content: center;
  margin-top: 2rem;
}
.support-card {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 3rem auto 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--ink);
  background: rgb(244 240 231 / 84%);
  box-shadow: 0.75rem 0.75rem 0 var(--orange);
  text-align: left;
}
.support-card-copy h2 {
  margin: 0.3rem 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.05;
}
.support-card-copy p {
  max-width: 34rem;
  margin: 0 0 1.25rem;
}
.support-button {
  gap: 0.65rem;
  border: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0.3rem 0.3rem 0 var(--ink);
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.support-button:hover,
.support-button:focus-visible {
  box-shadow: 0.15rem 0.15rem 0 var(--ink);
  transform: translate(0.15rem, 0.15rem);
}
.support-emoji {
  font-size: 1.25rem;
}
.support-qr {
  width: 9.5rem;
  margin: 0;
  text-align: center;
}
.support-qr img {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5rem solid white;
}
.support-qr figcaption {
  margin-top: 0.6rem;
  color: #627054;
  font-size: 0.75rem;
  line-height: 1.3;
}
.support-widget-hidden #bmc-wbtn,
.support-widget-hidden .bmc-btn-container {
  display: none !important;
}
.final-time {
  font: 800 clamp(5rem, 15vw, 12rem) Manrope;
  color: var(--orange);
}
.leaderboard-head h1 {
  max-width: 980px;
}
.leaderboard-head {
  position: relative;
}
.leaderboard {
  max-width: 900px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.leaderboard li {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.leaderboard .rank {
  font: 800 1.8rem Manrope, sans-serif;
  color: var(--orange);
  text-align: center;
}
.leaderboard strong,
.leaderboard small {
  display: block;
}
.leaderboard time {
  font: 800 1.35rem Manrope, sans-serif;
}
.admin-users {
  display: grid;
  gap: 1rem;
}
.admin-user-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) auto auto minmax(90px, auto);
  align-items: end;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 55%);
}
.admin-user-card label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.admin-user-card input[type="text"],
.admin-user-card input[type="email"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
}
.admin-user-card .admin-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  margin: 0;
}
.admin-game-actions {
  min-width: 250px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.danger {
  background: #b33b26;
  color: white;
}
.danger-text {
  color: #b33b26;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding: 3rem var(--page-gutter);
  margin-top: 5rem;
  background: rgb(244 240 231 / 68%);
  backdrop-filter: blur(12px);
}
.footer-links {
  display: grid;
  gap: 0.4rem;
}
.footer-links a {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}
.footer-version {
  flex: 0 0 auto;
  margin-right: 5rem;
  white-space: nowrap;
}
.legal-page {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  background: rgb(244 240 231 / 94%);
  box-shadow: 1rem 1rem 0 rgb(23 33 28 / 12%);
  backdrop-filter: blur(12px);
}
.legal-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.legal-header h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}
.legal-lead {
  max-width: 720px;
  font-size: 1.15rem;
  line-height: 1.65;
}
.legal-date {
  margin: 0;
  color: #627054;
  font-size: 0.85rem;
}
.legal-highlight {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 0.4rem solid var(--orange);
  background: white;
}
.legal-highlight p {
  margin: 0.5rem 0 0;
}
.legal-page section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.legal-page section:last-child {
  border-bottom: 0;
}
.legal-page h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}
.legal-page p,
.legal-page li {
  line-height: 1.7;
}
.legal-page li + li {
  margin-top: 0.65rem;
}
@media (max-width: 1100px) {
  .catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-filters .search-field {
    grid-column: 1 / -1;
  }
  .admin-user-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-user-card > :first-child,
  .admin-user-card > :nth-child(2) {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 1.1rem;
    --section-space: 3.5rem;
  }
  body {
    background: var(--paper);
  }
  h1 {
    font-size: clamp(2.45rem, 13vw, 4.2rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    overflow-wrap: anywhere;
  }
  .site-nav {
    height: 68px;
    padding: 0 var(--page-gutter);
    background: rgb(244 240 231 / 94%);
  }
  .site-nav.nav-open {
    background: var(--paper);
  }
  .brand {
    font-size: 1.1rem;
  }
  .menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-content: center;
    gap: 0.3rem;
    padding: 0;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle span {
    width: 1.2rem;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }
  .nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(0.4rem) rotate(45deg);
  }
  .nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-0.4rem) rotate(-45deg);
  }
  .site-links {
    position: fixed;
    z-index: 1001;
    top: 68px;
    right: 0;
    left: 0;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    display: none;
    padding: 0.4rem var(--page-gutter) 0.7rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 35px rgb(23 33 28 / 18%);
    pointer-events: auto;
  }
  .nav-open .site-links {
    display: grid;
    gap: 0;
  }
  .site-links > a,
  .site-links > .account-menu,
  .site-links > .language-switch {
    width: 100%;
    min-height: 2.65rem;
  }
  .site-links > .account-menu {
    display: none;
  }
  .site-links > .mobile-account-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.65rem;
    padding: 0.45rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: inherit;
    font: 600 0.95rem "DM Sans", sans-serif;
    text-align: left;
    text-decoration: none;
  }
  .site-links > .mobile-account-link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
  }
  .site-links > a {
    display: flex;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }
  .site-links > a::after {
    display: none;
  }
  .site-links .nav-cta {
    justify-content: center;
    margin-top: 0.45rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: white;
  }
  .language-switch {
    justify-self: start;
    text-align: left;
    border-bottom: 0;
  }
  .shell::after {
    background: linear-gradient(rgb(244 240 231 / 54%), rgb(244 240 231 / 72%));
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 2.5rem;
  }
  .hero p {
    font-size: 1.08rem;
  }
  .hero .actions {
    margin-top: 1.75rem;
  }
  .hero-photo {
    display: none;
  }
  .features,
  .form-grid,
  .featured-row,
  .editor-fields,
  .editor-fields-wide,
  .media-editor-row {
    grid-template-columns: 1fr;
  }
  .answer-route-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .access-code-row {
    grid-template-columns: 1fr;
  }
  .access-code-details,
  .access-code-actions {
    justify-content: flex-start;
  }
  .editor-section-heading,
  .scenario-step-header,
  .choice-option-header,
  .editor-save-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.55rem 0.8rem;
    gap: 0.5rem;
  }
  .editor-section-heading > p {
    margin-left: 0;
  }
  .step-header-actions {
    width: 100%;
  }
  .scenario-step-header,
  .step-fields,
  .step-subsection {
    margin-right: 1rem;
    margin-left: 1rem;
  }
  .scenario-step-header {
    margin: 0;
    padding: 1rem;
  }
  .media-editor-row .text-button {
    justify-self: start;
  }
  .features article {
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .features article:last-child {
    border-bottom: 0;
  }
  main {
    width: 100%;
    padding: 2.75rem var(--page-gutter);
    background: rgb(244 240 231 / 76%);
    box-shadow: none;
    backdrop-filter: blur(1px);
  }
  .page-head {
    margin-bottom: 2.5rem;
  }
  .popular-games {
    margin-bottom: 4rem;
  }
  .featured-row,
  .grid {
    gap: 1rem;
  }
  .card > div {
    padding: 1.2rem;
  }
  .card h2 {
    font-size: 1.5rem;
  }
  .narrow {
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
  }
  .narrow h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }
  .empty {
    width: 100%;
    padding: 2rem 1.25rem;
  }
  .list article,
  footer {
    align-items: flex-start;
    gap: 1rem;
    flex-direction: column;
  }
  .list article {
    padding: 1.25rem 3rem 1.25rem 0;
  }
  .leaderboard li {
    grid-template-columns: 2.5rem 1fr;
    gap: 0.75rem;
  }
  .leaderboard time {
    grid-column: 2;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
  .catalog-filters,
  .filter-panel {
    grid-template-columns: 1fr;
  }
  .filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 45%);
    color: var(--ink);
    font: 700 0.85rem Manrope, sans-serif;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
  }
  .admin-filters:not(.filters-expanded),
  .catalog-filters:not(.filters-expanded) {
    display: none;
  }
  .catalog-list article {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 0;
  }
  .catalog-list-meta {
    text-align: left;
  }
  .admin-user-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 1rem;
  }
  .admin-game-actions {
    min-width: 0;
    justify-content: flex-start;
  }
  .row-actions,
  .completion-actions {
    width: 100%;
  }
  .row-actions .btn,
  .completion-actions .btn {
    flex: 1;
  }
  .location-picker {
    height: 320px;
  }
  .answer-row {
    align-items: stretch;
  }
  .editor-save-bar {
    bottom: 0.5rem;
    gap: 0.5rem;
  }
  .editor-save-bar .btn {
    width: 100%;
  }
  .play header {
    align-items: flex-start;
    gap: 1rem;
  }
  .game-title-inline {
    flex-wrap: wrap;
  }
  .play main {
    padding: 3rem 0;
  }
  .play h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }
  .prompt {
    font-size: 1.2rem;
  }
  .play audio,
  .play video {
    width: 100%;
  }
  .complete {
    padding: 3rem 0;
  }
  .final-time {
    font-size: clamp(4rem, 22vw, 7rem);
  }
  .rating-prompt .rating-star {
    font-size: 2.35rem;
  }
  .support-card {
    grid-template-columns: 1fr;
    box-shadow: 0.45rem 0.45rem 0 var(--orange);
    text-align: center;
  }
  .support-card-copy p {
    margin-right: auto;
    margin-left: auto;
  }
  .support-button {
    width: 100%;
  }
  .support-qr {
    display: none;
  }
  footer {
    margin-top: 0;
    padding: 2rem var(--page-gutter);
    background: var(--paper);
  }
}

@media (max-width: 420px) {
  .actions,
  .skip-action {
    align-items: stretch;
    flex-direction: column;
  }
  .actions .btn,
  .skip-action .btn {
    width: 100%;
  }
  .card-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .card-actions .game-icon-actions {
    width: 100%;
  }
  .code-input {
    font-size: 1.4rem !important;
    letter-spacing: 0.22em;
  }
  .answer-row {
    grid-template-columns: 1fr;
  }
  .answer-row .text-button {
    justify-self: start;
  }
  .leaderboard li {
    grid-template-columns: 2rem minmax(0, 1fr);
  }
  .leaderboard .rank {
    font-size: 1.35rem;
  }
  .leaderboard time {
    font-size: 1.15rem;
  }
}
