@font-face {
  font-family: "Material Symbols Outlined";
  src: url("/assets/fonts/MaterialSymbolsOutlined_e177d49310da41b01a2c1b7df170a00f.ttf");
}

.hidden {
  display: none !important;
}

body {
  margin: 0px;
  background-color: #f4f4f5;
  color: #18181b;
  font-family: "Segoe UI", sans-serif;
}

.username-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0px 4px 12px #0000001f;
}

.username-summary {
  padding: 8px 12px;
  cursor: pointer;
  text-align: right;
  list-style: none;
}

.username-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.username-profile-image {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.username-profile-image-placeholder {
  font-size: 32px;
}

.username-summary::-webkit-details-marker {
  display: none;
}

.username-name {
  text-decoration: underline;
}

.username-hint {
  display: block;
  margin-top: 4px;
  color: #71717a;
  font-size: 12px;
  line-height: 1.25;
}

.username-panel {
  min-width: min(220px, calc(100vw - 34px));
  max-width: 100%;
  box-sizing: border-box;
  padding: 0px 12px 12px;
}

.username-panel .crumble--field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.username-panel input {
  min-width: 0px;
  max-width: 100%;
  box-sizing: border-box;
}

.username-panel > form {
  display: grid;
  gap: 10px;
}

.username-profile-image-field {
  margin-top: 8px;
}

.profile-image-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
}

.selected-profile-image-picker {
  border-color: #16a34a;
  background-color: #dcfce7;
  color: #166534;
}

.profile-image-selection-status {
  flex-basis: 100%;
  color: #166534;
  font-size: 12px;
}

.hidden-profile-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0px;
  margin: -1px;
  overflow: hidden;
  clip-path: "inset(50%)";
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  border: 0px;
}

.username-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.primary-action {
  display: inline-block;
  padding: 10px 16px;
  border: 0px;
  border-radius: 6px;
  background-color: #2563eb;
  color: white;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-action:hover {
  background-color: #1d4ed8;
}

body:has(.crumble--cookie--consent--banner) {
  padding-bottom: 112px;
}

.crumble--cookie--consent--banner {
  left: 50%;
  right: auto;
  bottom: 16px;
  width: calc(100% - 32px);
  max-width: 640px;
  padding: 16px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  box-shadow: 0px 4px 12px #0000001f;
  transform: translateX(-50%);
}

.crumble--cookie--consent--banner p {
  margin: 0px;
  line-height: 1.5;
}

.crumble--cookie--consent--banner form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.crumble--cookie--consent--banner button {
  border: 0px;
  border-radius: 6px;
  background-color: #2563eb;
  color: white;
  font-weight: 600;
}

.crumble--cookie--consent--banner button:hover {
  background-color: #1d4ed8;
}

.public-page {
  max-width: 640px;
  margin-top: 48px;
  margin-bottom: 48px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
}

.game-panel {
  display: grid;
  gap: 8px;
}

.game-instructions {
  margin-bottom: 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background-color: white;
}

.game-instructions-summary {
  padding: 10px 12px;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
}

.game-instructions-content {
  display: grid;
  gap: 16px;
  padding: 4px 16px 16px;
}

.game-instructions-content p {
  margin: 0px;
  line-height: 1.5;
}

.game-instructions-content form {
  text-align: center;
}

.feedback-legend {
  display: grid;
  gap: 10px;
  margin: 0px;
  padding: 0px;
  list-style: none;
}

.feedback-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.instruction-tile {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  font-size: 18px;
}

.attempt-hint {
  margin: 0px;
  color: #71717a;
  text-align: center;
}

.game-board {
  display: grid;
  gap: 8px;
}

.game-context-navigation {
  text-align: center;
}

.guess-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.game-navigation {
  justify-self: center;
  margin-top: 12px;
  text-align: center;
}

.game-completion {
  text-align: center;
}

.letter-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.correct-letter {
  background-color: #15803d;
}

.present-letter {
  background-color: #ca8a04;
}

.absent-letter {
  background-color: #b91c1c;
}

.revealed-letter {
  box-sizing: border-box;
  border: 2px solid #71717a;
  background-color: transparent;
  color: #18181b;
}

.empty-letter {
  box-sizing: border-box;
  border: 2px solid #a1a1aa;
  background-color: white;
  color: #18181b;
}

.submit-guess {
  flex: 0 0 48px;
  padding: 0px;
  border: 0px;
  background-color: #2563eb;
}

.submit-guess[disabled] {
  background-color: #a1a1aa;
  cursor: not-allowed;
}

.guess-interface {
  display: block;
}

.guess-interface > form {
  display: grid;
  gap: 20px;
}

.hidden-guess-input {
  display: none;
}

.keyboard {
  display: grid;
  gap: 6px;
  touch-action: manipulation;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.keyboard-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 48px;
  padding: 0px 8px;
  border: 0px;
  border-radius: 6px;
  background-color: #d4d4d8;
  color: #18181b;
  font-size: 18px;
  font-weight: 700;
}

.keyboard-key.correct-letter {
  background-color: #15803d;
  color: white;
}

.keyboard-key.present-letter {
  background-color: #ca8a04;
  color: white;
}

.disabled-key {
  background-color: #71717a;
  color: #d4d4d8;
  cursor: not-allowed;
}

.backspace-key {
  min-width: 52px;
}

.material-icon {
  font-family: "Material Symbols Outlined";
  font-size: 24px;
  font-weight: normal;
  line-height: 1;
}

.summary-list {
  display: grid;
  gap: 32px;
  padding: 0px;
  list-style: none;
}

.space-summary-page {
  max-width: 1100px;
}

.results-hint {
  margin-top: 0px;
  color: #71717a;
}

.leaderboard {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
  padding-left: 32px;
}

.leaderboard-entry {
  min-width: 0px;
}

.leaderboard-entry-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background-color: white;
  position: relative;
  top: 8px;
}

.leaderboard-entry::marker {
  font-weight: 700;
}

.leaderboard-score {
  color: #71717a;
  font-size: 0.875em;
}

.summary-word > h3 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d4d4d8;
  font-size: 1.5em;
}

.summary-word > h3 > a {
  color: #18181b;
}

.censored-word-hint {
  color: #71717a;
  font-size: 0.6em;
  font-weight: 400;
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0px;
}

.player-result {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  min-width: 0px;
  max-width: 260px;
  padding: 8px;
  border-radius: 8px;
  background-color: white;
}

.current-player-result {
  border: 2px solid #2563eb;
  background-color: #eff6ff;
}

.result-profile-image {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.result-profile-image-placeholder {
  flex-shrink: 0;
  font-size: 32px;
}

.player-result-details {
  display: grid;
  gap: 4px;
  min-width: 0px;
  overflow-wrap: anywhere;
}

.attempt-dots {
  display: flex;
  gap: 4px;
}

.failed-attempt-dot, .successful-attempt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.failed-attempt-dot {
  background-color: #dc2626;
}

.successful-attempt-dot {
  background-color: #16a34a;
}

@media (prefers-color-scheme: dark) {
  .correct-letter, .keyboard-key.correct-letter {
    background-color: #22c55e;
    color: #18181b;
  }

  .present-letter, .keyboard-key.present-letter {
    background-color: #eab308;
    color: #18181b;
  }

  .absent-letter, .disabled-key {
    background-color: #ef4444;
    color: #18181b;
  }
}

input {
  padding: 10px;
  font-size: 18px;
}

input.uppercase-input {
  text-transform: uppercase;
}

button {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 16px;
  padding-right: 16px;
  cursor: pointer;
}

@media (max-width: 520px) {
  body:has(.crumble--cookie--consent--banner) {
    padding-bottom: 184px;
  }

  .crumble--cookie--consent--banner {
    flex-direction: column;
    align-items: stretch;
  }

  .crumble--cookie--consent--banner form {
    display: grid;
  }

  .public-page {
    padding: 12px;
  }

  .guess-row {
    gap: 5px;
  }

  .letter-tile {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .submit-guess {
    flex-basis: 42px;
  }

  .keyboard-row {
    gap: 3px;
  }

  .keyboard-key {
    min-width: 0px;
    height: 44px;
    padding: 0px 6px;
    flex: 1;
  }

  .backspace-key {
    flex: 1.35;
  }

  .player-result {
    max-width: none;
    flex-basis: 100%;
  }
}