.header-inner {
  --rmlp-header-gap: var(--rmlp-space-2);

  flex-wrap: wrap;
  padding-block: var(--rmlp-space-3);
}

.bl-app {
  --bl-content-width: 620px;
  --bl-control-height: 46px;
  --bl-hex-width: 11.6%;
  --bl-hex-height: 12.7%;
  --bl-transition-duration: 150ms;
  --bl-modal-layer: 50;
  --bl-modal-width: 520px;
  --bl-modal-backdrop-opacity: 45%;
  --bl-active: #9FD2BF;
  --bl-active-ink: #173F35;
  --bl-selected: #FFD86F;
  --bl-revealed: #D9C7ED;
  --bl-inactive: #E5E4DA;
}

.bl-app [hidden] {
  display: none;
}

.bl-header-branding {
  min-width: 0;
}

.bl-publisher-lockup {
  display: flex;
  min-height: 1.35rem;
  margin-bottom: 0.1rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--rmlp-ink-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.bl-logo {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.bl-title-lockup {
  --bl-game-logo-size: 3rem;

  display: flex;
  align-items: center;
  gap: var(--rmlp-space-2);
}

.bl-game-logo {
  width: var(--bl-game-logo-size);
  height: auto;
  flex-shrink: 0;
}

.bl-wordmark {
  margin: 0;
  font-size: var(--rmlp-text-lg);
}

.bl-header-actions,
.bl-session-actions,
.bl-notice-actions,
.bl-actions,
.bl-modal-actions,
.bl-share-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--rmlp-space-2);
}

.bl-header-actions {
  margin-left: auto;
}

.bl-pill,
.bl-btn,
.bl-answer-word {
  min-height: var(--bl-control-height);
  padding: var(--rmlp-space-2) 14px;
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-md);
  color: var(--rmlp-ink);
  background: var(--rmlp-paper-raised);
  font-family: var(--rmlp-font-ui);
  font-size: var(--rmlp-text-sm);
  font-weight: var(--rmlp-font-weight-semibold);
  cursor: pointer;
  transition: background-color var(--bl-transition-duration) ease;
}

.bl-pill {
  border-radius: 999px;
  color: var(--rmlp-ink-muted);
  white-space: nowrap;
}

.bl-pill:hover,
.bl-btn:hover,
.bl-answer-word:hover {
  background: var(--rmlp-paper);
}

.bl-pill:disabled,
.bl-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bl-btn-accent {
  color: var(--rmlp-paper);
  border-color: var(--rmlp-accent-red);
  background: var(--rmlp-accent-red);
}

.bl-btn-accent:hover {
  background: color-mix(in srgb, var(--rmlp-accent-red), var(--rmlp-ink) 15%);
}

.bl-main {
  width: min(100%, var(--bl-content-width));
  margin-inline: auto;
  padding: var(--rmlp-space-4) var(--rmlp-space-4) var(--rmlp-space-8);
  font-size: var(--rmlp-text-base);
}

.bl-hint,
.bl-save-status,
.bl-intro {
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-sm);
}

.bl-hint,
.bl-save-status {
  margin: 0 0 var(--rmlp-space-2);
}

.bl-intro {
  margin: 0 0 var(--rmlp-space-3);
  line-height: 1.45;
}

.bl-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--rmlp-space-2);
  margin-bottom: var(--rmlp-space-3);
  font-size: var(--rmlp-text-sm);
}

.bl-save-status {
  margin: 0;
}

.bl-notice {
  padding: var(--rmlp-space-4);
  margin-bottom: var(--rmlp-space-4);
  border: 1px solid var(--rmlp-rule);
  border-inline-start: var(--rmlp-space-1) solid var(--rmlp-accent-teal);
  border-radius: var(--rmlp-radius-md);
  background: var(--rmlp-paper-raised);
  font-size: var(--rmlp-text-sm);
}

.bl-notice h2 {
  margin: 0 0 var(--rmlp-space-2);
  font-size: var(--rmlp-text-base);
}

.bl-notice p {
  margin: 0 0 var(--rmlp-space-3);
}

.bl-stats,
.bl-tutorial-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rmlp-space-2);
  margin: var(--rmlp-space-3) 0;
  color: var(--rmlp-ink-muted);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-xs);
  text-align: center;
}

.bl-stats b,
.bl-tutorial-stats b {
  display: block;
  color: var(--rmlp-ink);
  font-size: var(--rmlp-text-lg);
}

.bl-board-panel,
.bl-word-panel,
.bl-accepted,
.bl-answer,
.bl-share-panel {
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-lg);
  background: var(--rmlp-paper-raised);
}

.bl-board-panel {
  padding: var(--rmlp-space-3);
}

.bl-board {
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
  aspect-ratio: 1;
}

.bl-tile,
.bl-tutorial-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  clip-path: polygon(50% 0, 94% 24%, 94% 76%, 50% 100%, 6% 76%, 6% 24%);
  color: var(--rmlp-ink);
  background: var(--bl-inactive);
  font-family: var(--rmlp-font-display);
  font-size: clamp(1.2rem, 8vw, 2rem);
  font-weight: var(--rmlp-font-weight-bold);
  line-height: 1;
}

.bl-tile {
  position: absolute;
  left: var(--hex-x);
  top: var(--hex-y);
  width: var(--bl-hex-width);
  height: var(--bl-hex-height);
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--bl-transition-duration) ease, filter var(--bl-transition-duration) ease;
}

.bl-tile:hover:not(:disabled) {
  filter: brightness(0.96);
}

.bl-tile.is-active,
.bl-tutorial-tile.is-active {
  color: var(--bl-active-ink);
  background: var(--bl-active);
}

.bl-tile.is-selected,
.bl-tutorial-tile.is-selected {
  color: var(--rmlp-ink);
  background: var(--bl-selected);
}

.bl-board.is-answer .bl-tile.is-selected {
  background: var(--bl-revealed);
}

.bl-tile.is-wildcard,
.bl-tutorial-tile.is-wildcard {
  border-style: dashed;
}

.bl-tile:disabled {
  cursor: default;
}

.bl-path-order,
.bl-wildcard-symbol {
  position: absolute;
  bottom: 0.2rem;
  left: 0.25rem;
  font-family: var(--rmlp-font-mono);
  font-size: 0.65rem;
}

.bl-wildcard-symbol {
  top: 0.2rem;
  bottom: auto;
}

.bl-board-loading {
  display: grid;
  min-height: min(70vw, 520px);
  place-items: center;
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-sm);
}

.bl-word-panel,
.bl-accepted,
.bl-answer,
.bl-share-panel {
  padding: var(--rmlp-space-4);
  margin-top: var(--rmlp-space-3);
  text-align: center;
}

.bl-accepted {
  padding: var(--rmlp-space-3) var(--rmlp-space-4);
  margin-top: var(--rmlp-space-3);
}

.bl-accepted h2 {
  margin: 0 0 var(--rmlp-space-2);
  font-family: var(--rmlp-font-display);
  font-size: var(--rmlp-text-base);
}

.bl-accepted-words {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rmlp-space-1) var(--rmlp-space-3);
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-sm);
  font-weight: var(--rmlp-font-weight-bold);
}

.bl-current-word {
  min-height: 2.5rem;
  margin-bottom: var(--rmlp-space-2);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-lg);
  font-weight: var(--rmlp-font-weight-bold);
  letter-spacing: 0.12em;
}

.bl-wildcard-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--rmlp-space-2);
  margin-bottom: var(--rmlp-space-3);
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-sm);
}

.bl-wildcard-control input {
  width: var(--bl-control-height);
  min-height: var(--bl-control-height);
  padding: var(--rmlp-space-1);
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-sm);
  color: var(--rmlp-ink);
  background: var(--rmlp-paper);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-lg);
  font-weight: var(--rmlp-font-weight-bold);
  text-align: center;
  text-transform: uppercase;
}

.bl-actions,
.bl-share-actions {
  justify-content: center;
}

.bl-message {
  min-height: 1.4em;
  margin: var(--rmlp-space-2) 0 0;
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-sm);
}

.bl-message.is-error {
  color: var(--rmlp-invalid);
}

.bl-message.is-success {
  color: var(--rmlp-accent-teal);
}

.bl-answer h2 {
  margin: 0 0 var(--rmlp-space-1);
  font-family: var(--rmlp-font-display);
  font-size: var(--rmlp-text-lg);
}

.bl-answer p {
  margin: var(--rmlp-space-1) 0;
}

.bl-answer-words {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--rmlp-space-2);
  margin: var(--rmlp-space-3) 0;
}

.bl-answer-word {
  min-height: 40px;
  padding: var(--rmlp-space-1) var(--rmlp-space-3);
  font-family: var(--rmlp-font-mono);
}

.bl-answer-word.is-active {
  border-color: var(--rmlp-accent-teal);
  background: var(--bl-selected);
}

.bl-share-panel canvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--rmlp-radius-md);
}

.bl-share-status {
  min-height: 1.2em;
  margin: var(--rmlp-space-2) 0 0;
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-xs);
}

.bl-share-manual {
  margin-top: var(--rmlp-space-3);
  text-align: left;
}

.bl-share-manual label {
  display: block;
  margin-bottom: var(--rmlp-space-2);
  font-size: var(--rmlp-text-sm);
  font-weight: var(--rmlp-font-weight-semibold);
}

.bl-share-manual textarea {
  width: 100%;
  padding: var(--rmlp-space-3);
  resize: vertical;
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-sm);
  color: var(--rmlp-ink);
  background: var(--rmlp-paper);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-sm);
}

.bl-wildcard-control input:focus-visible,
.bl-share-manual textarea:focus-visible,
.bl-tile:focus-visible {
  outline: var(--rmlp-focus-outline-width) solid var(--rmlp-accent-gold);
  outline-offset: var(--rmlp-focus-outline-offset);
}

.bl-footer {
  width: min(100%, var(--bl-content-width));
  margin: 0 auto;
  padding: var(--rmlp-space-3) var(--rmlp-space-4) var(--rmlp-space-6);
  border-top: 1px solid var(--rmlp-rule);
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-sm);
}

.bl-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--rmlp-space-2) var(--rmlp-space-4);
}

.bl-footer-links a {
  display: inline-flex;
  min-height: var(--bl-control-height);
  align-items: center;
  text-align: center;
}

.bl-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--bl-modal-layer);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rmlp-space-4);
  background: rgb(from var(--rmlp-ink) r g b / var(--bl-modal-backdrop-opacity));
}

.bl-modal {
  position: relative;
  width: 100%;
  max-width: var(--bl-modal-width);
  max-height: calc(100dvh - 2 * var(--rmlp-space-4));
  overflow-y: auto;
  padding: var(--rmlp-space-6);
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-lg);
  background: var(--rmlp-paper);
}

.bl-modal-close {
  position: absolute;
  top: var(--rmlp-space-2);
  right: var(--rmlp-space-2);
  min-width: var(--bl-control-height);
  min-height: var(--bl-control-height);
  padding: var(--rmlp-space-1);
  border: 0;
  color: var(--rmlp-ink-muted);
  background: transparent;
  font-size: var(--rmlp-text-lg);
  cursor: pointer;
}

.bl-modal-title {
  margin: 0 var(--bl-control-height) var(--rmlp-space-3) 0;
  font-family: var(--rmlp-font-display);
  font-size: var(--rmlp-text-xl);
  line-height: 1.2;
}

.bl-modal-actions {
  justify-content: flex-end;
  margin-top: var(--rmlp-space-4);
}

.bl-completion-modal {
  --bl-modal-width: 420px;
  text-align: center;
}

.bl-completion-stat {
  color: var(--rmlp-ink-muted);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-sm);
}

.bl-tutorial-modal {
  --bl-modal-width: 680px;
}

.bl-tutorial-eyebrow {
  margin: 0 0 var(--rmlp-space-1);
  color: var(--rmlp-ink-muted);
  font-family: var(--rmlp-font-mono);
  font-size: var(--rmlp-text-xs);
  text-transform: uppercase;
}

.bl-tutorial-description {
  min-height: 3rem;
  line-height: 1.45;
}

.bl-tutorial-example {
  padding: var(--rmlp-space-3);
  border: 1px solid var(--rmlp-rule);
  border-radius: var(--rmlp-radius-md);
  background: var(--rmlp-paper-raised);
  text-align: center;
}

.bl-tutorial-board {
  position: relative;
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.bl-tutorial-path {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bl-tutorial-path line {
  stroke: var(--rmlp-accent-teal);
  stroke-linecap: round;
  stroke-width: 2.4;
}

.bl-tutorial-tile {
  position: absolute;
  z-index: 2;
  left: var(--hex-x);
  top: var(--hex-y);
  width: var(--bl-hex-width);
  height: var(--bl-hex-height);
  font-size: clamp(1rem, 5vw, 1.4rem);
}

.bl-tutorial-current-word {
  min-height: 1.5rem;
  margin: var(--rmlp-space-2) 0 0;
  font-family: var(--rmlp-font-mono);
  font-weight: var(--rmlp-font-weight-bold);
  letter-spacing: 0.08em;
}

.bl-tutorial-word-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--rmlp-space-1);
  min-height: 1.75rem;
  margin-top: var(--rmlp-space-2);
}

.bl-tutorial-word-chip {
  padding: 2px var(--rmlp-space-2);
  border: 1px solid var(--rmlp-rule);
  border-radius: 999px;
  background: var(--rmlp-paper);
  font-family: var(--rmlp-font-mono);
  font-size: 0.75rem;
  font-weight: var(--rmlp-font-weight-bold);
}

.bl-tutorial-word-chip.is-replaced {
  color: var(--rmlp-invalid);
  text-decoration: line-through;
}

.bl-tutorial-word-chip.is-optimal {
  color: var(--rmlp-accent-teal);
}

.bl-tutorial-progress-row,
.bl-tutorial-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rmlp-space-2);
  margin-top: var(--rmlp-space-3);
}

.bl-tutorial-progress-row {
  color: var(--rmlp-ink-muted);
  font-size: var(--rmlp-text-xs);
}

.bl-tutorial-dots {
  display: flex;
  gap: var(--rmlp-space-1);
}

.bl-tutorial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rmlp-rule);
}

.bl-tutorial-dot.is-current {
  background: var(--rmlp-accent-red);
}

@media (max-width: 480px) {
  .bl-title-lockup {
    --bl-game-logo-size: 2.5rem;
  }

  .bl-publisher-lockup {
    font-size: 0.65rem;
  }

  .bl-logo {
    width: 1.2rem;
    height: 1.2rem;
  }

  .bl-header-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

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

  .bl-modal {
    padding: var(--rmlp-space-4);
  }

  .bl-tutorial-description {
    min-height: 0;
  }
}

@media (max-width: 340px) {
  .bl-main {
    padding-inline: var(--rmlp-space-2);
  }

  .bl-board-panel,
  .bl-word-panel,
  .bl-accepted,
  .bl-answer,
  .bl-share-panel {
    padding: var(--rmlp-space-2);
  }

  .bl-actions .bl-btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bl-pill,
  .bl-btn,
  .bl-tile,
  .bl-answer-word {
    transition: none;
  }
}


