.hud {
  position: absolute;
  z-index: 20;
  inset: clamp(10px, 2vw, 24px) clamp(10px, 2vw, 24px) auto;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.hud-pill,
.icon-button {
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--soft-shadow);
}

.hud-pill {
  min-width: clamp(76px, 9vw, 126px);
  min-height: clamp(42px, 5vw, 62px);
  display: grid;
  align-content: center;
  padding: 7px 16px;
  border-radius: 18px;
}

.hud-label {
  display: block;
  color: var(--muted);
  font-size: clamp(8px, 0.8vw, 11px);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hud-pill strong {
  font-size: clamp(18px, 2.2vw, 32px);
  line-height: 1;
}

.hud-pill--stars {
  min-width: 82px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-star {
  color: #e8ab00;
  font-size: clamp(20px, 2.3vw, 34px);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.6);
}

.hud-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.icon-button {
  width: clamp(42px, 5vw, 62px);
  height: clamp(42px, 5vw, 62px);
  border-radius: 18px;
  cursor: pointer;
  font-size: clamp(17px, 2vw, 27px);
}

.screen {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  text-align: center;
}

.screen--menu {
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 255, 255, 0.85), transparent 27%),
    linear-gradient(90deg, rgba(255, 245, 251, 0.84), rgba(255, 255, 255, 0.3));
}

.brand-mark {
  width: clamp(62px, 8vw, 106px);
  height: clamp(62px, 8vw, 106px);
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  font-size: clamp(34px, 4.6vw, 62px);
}

.eyebrow {
  margin: 0;
  color: var(--pink-700);
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 900;
  letter-spacing: 0.2em;
}

.screen h1 {
  margin: -3px 0 0;
  color: var(--pink-700);
  font-size: clamp(68px, 10vw, 144px);
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-shadow:
    0 5px 0 rgba(255, 255, 255, 0.85),
    0 16px 34px rgba(163, 52, 109, 0.18);
}

.tagline {
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: clamp(14px, 1.8vw, 25px);
  font-weight: 750;
}

.menu-record {
  margin-bottom: 18px;
  display: grid;
  gap: 2px;
}

.menu-record span {
  color: var(--muted);
  font-size: clamp(9px, 0.8vw, 11px);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.menu-record strong {
  font-size: clamp(18px, 2.1vw, 28px);
}

.primary-button,
.secondary-button {
  width: min(330px, 74vw);
  min-height: clamp(48px, 5.5vw, 66px);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.08em;
  transition:
    transform 130ms ease,
    box-shadow 130ms ease,
    filter 130ms ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(180deg, #ff85bd, #e84b97);
  color: var(--white);
  box-shadow:
    0 9px 0 #b93676,
    0 18px 28px rgba(177, 54, 116, 0.24);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.text-button:hover {
  filter: brightness(1.03);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.text-button:active {
  transform: translateY(3px) scale(0.99);
}

.primary-button:active {
  box-shadow:
    0 5px 0 #b93676,
    0 12px 22px rgba(177, 54, 116, 0.2);
}

.primary-button--small {
  width: min(260px, 68vw);
}

.secondary-button {
  margin-top: 15px;
  border: 2px solid rgba(200, 63, 130, 0.2);
  background: rgba(255, 255, 255, 0.78);
  color: var(--pink-700);
  box-shadow: 0 10px 26px rgba(108, 46, 79, 0.1);
}


.secondary-action-row {
  width: min(330px, 74vw);
  margin: 15px auto 0;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 8px;
}

.secondary-button--compact {
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  padding-inline: 10px;
  font-size: clamp(10px, 1vw, 13px);
}

.text-button {
  margin-top: 13px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--pink-900);
  cursor: pointer;
  font-size: clamp(9px, 0.8vw, 11px);
  font-weight: 850;
  letter-spacing: 0.1em;
}

.menu-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: clamp(10px, 1.05vw, 14px);
  font-weight: 650;
}

.screen--panel {
  background: rgba(76, 30, 55, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.panel {
  width: min(520px, 88%);
  max-height: 90%;
  overflow: auto;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: clamp(22px, 3vw, 36px);
  background: rgba(255, 250, 253, 0.95);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 8px 0 20px;
  color: var(--ink);
  font-size: clamp(24px, 3.5vw, 44px);
  line-height: 1.04;
}

.instruction-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
  padding: 14px 18px;
  border: 1px solid rgba(200, 63, 130, 0.11);
  border-radius: 20px;
  background: var(--white);
  text-align: left;
}

.instruction-card strong {
  color: var(--pink-700);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.instruction-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.instruction-icon {
  width: 48px;
  flex: 0 0 48px;
  font-size: 34px;
}

.panel-tip {
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.pause-icon,
.game-over-icon {
  font-size: clamp(42px, 6vw, 72px);
}

.record-badge {
  width: fit-content;
  margin: -8px auto 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #704e00;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  box-shadow: 0 8px 18px rgba(170, 121, 0, 0.16);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 24px;
}

.result-grid div {
  padding: 15px 8px;
  border: 1px solid rgba(200, 63, 130, 0.11);
  border-radius: 18px;
  background: var(--white);
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: clamp(8px, 0.8vw, 10px);
  font-weight: 850;
  letter-spacing: 0.1em;
}

.result-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--pink-700);
  font-size: clamp(20px, 2.8vw, 34px);
}

.ready-overlay {
  position: absolute;
  z-index: 25;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.ready-overlay strong {
  padding: 16px 28px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--pink-700);
  font-size: clamp(26px, 5vw, 66px);
  line-height: 1;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.orientation-hint {
  display: none;
}

.toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: clamp(14px, 3vw, 30px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(88%, 620px);
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(71, 40, 58, 0.9);
  color: white;
  box-shadow: var(--soft-shadow);
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 700;
  text-align: center;
}

@media (orientation: portrait) and (max-width: 820px) {
  .orientation-hint,
  .orientation-hint.orientation-hint--dismissed,
  .orientation-hint:not(.orientation-hint--dismissed) {
    position: absolute;
    z-index: 95;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px 22px;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 34%),
      linear-gradient(180deg, rgba(71, 40, 58, 0.96), rgba(143, 36, 95, 0.96));
    color: white;
    box-shadow: none;
    text-align: center;
  }

  .orientation-hint > span {
    font-size: 58px;
    line-height: 1;
  }

  .orientation-hint strong,
  .orientation-hint small {
    display: block;
  }

  .orientation-hint strong {
    font-size: 24px;
    line-height: 1.08;
    font-weight: 950;
  }

  .orientation-hint small {
    max-width: 280px;
    margin: 7px auto 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 750;
  }

  .orientation-links {
    display: grid;
    gap: 10px;
    width: min(310px, 92%);
    margin-top: 8px;
  }

  .orientation-links a {
    display: block;
    padding: 12px 14px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: #f86fb0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  }

  .orientation-links a:nth-child(2) {
    background: #31b928;
  }

  .orientation-hint button {
    display: none;
  }

  .mobile-project-links {
    display: none !important;
  }
}

@media (orientation: landscape) {
  .orientation-links {
    display: none;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .brand-mark {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .screen h1 {
    font-size: 62px;
  }

  .tagline {
    margin: 5px 0 7px;
    font-size: 13px;
  }

  .menu-record {
    margin-bottom: 8px;
  }

  .primary-button,
  .secondary-button {
    min-height: 40px;
  }

  .secondary-button {
    margin-top: 8px;
  }

  
.secondary-action-row {
  width: min(330px, 74vw);
  margin: 15px auto 0;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 8px;
}

.secondary-button--compact {
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  padding-inline: 10px;
  font-size: clamp(10px, 1vw, 13px);
}

.text-button {
    margin-top: 7px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .menu-note {
    margin-top: 7px;
  }

  .panel {
    padding: 18px 24px;
  }

  .panel h2 {
    margin-bottom: 10px;
    font-size: 27px;
  }

  .instruction-card {
    padding: 8px 14px;
  }

  .result-grid {
    margin-bottom: 12px;
  }
}

/* v0.2.0 — Tela oficial de seleção de personagens */
.character-select-screen {
  display: block;
  padding: 0;
  text-align: initial;
  background: url("../assets/images/ui/screen-character-select.png") center / 100% 100% no-repeat;
}

.character-select-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.selected-marker {
  position: absolute;
  z-index: 35;
  width: 5.45%;
  aspect-ratio: 1 / 1;
  background: url("../assets/images/ui/marker-selected.png") center / contain no-repeat;
  transform: translateZ(0);
  pointer-events: none;
  filter: drop-shadow(0 7px 9px rgba(101, 24, 78, 0.26));
  transition: left 160ms ease, top 160ms ease, transform 160ms ease;
}

.menu-stars {
  position: absolute;
  z-index: 34;
  top: 4.25%;
  right: 3.7%;
  min-width: 17.2%;
  height: 8.3%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5.5%;
  padding-inline: 2.2% 1.1%;
  border: 0.22vw solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: linear-gradient(180deg, #6d54dc, #4e31a7);
  box-shadow: 0 0.65vw 0 rgba(49, 26, 122, 0.28), 0 1.2vw 2vw rgba(49, 26, 122, 0.18);
  color: #fff;
  font-weight: 950;
  font-size: clamp(16px, 2.35vw, 42px);
  line-height: 1;
  text-shadow: 0 0.22vw 0 rgba(44, 22, 96, 0.4);
}

.menu-stars-icon {
  color: #ffd55a;
  font-size: 1.08em;
  text-shadow: 0 0.16vw 0 #bd761f, 0 0.26vw 0.6vw rgba(0, 0, 0, 0.18);
}

.menu-stars-plus {
  width: 20%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-right: -3.5%;
  border: 0.22vw solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: linear-gradient(180deg, #ff72b0, #e53689);
  box-shadow: 0 0.36vw 0 #bd2d75;
  font-size: 1.05em;
}

.character-hitboxes {
  position: absolute;
  inset: 0;
  z-index: 36;
}

.player-badge {
  position: absolute;
  z-index: 38;
  left: 11.2%;
  top: 4.45%;
  min-width: 19%;
  max-width: 28%;
  min-height: 7.1%;
  display: flex;
  align-items: center;
  gap: 0.65vw;
  padding: 0.55vw 0.85vw;
  border: 0.2vw solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 227, 244, 0.94));
  box-shadow: 0 0.55vw 0 rgba(194, 61, 134, 0.2), 0 1vw 1.8vw rgba(119, 39, 92, 0.18);
  color: #803576;
  font-weight: 900;
  pointer-events: auto;
}

.player-badge span {
  font-size: clamp(8px, 0.75vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.player-badge strong {
  max-width: 9vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(12px, 1.2vw, 20px);
}

.player-badge button {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 0.45vw 0.7vw;
  background: linear-gradient(180deg, #ff72b0, #e53689);
  color: #fff;
  box-shadow: 0 0.22vw 0 #bd2d75;
  cursor: pointer;
  font-weight: 950;
  font-size: clamp(8px, 0.72vw, 12px);
  line-height: 1;
  white-space: nowrap;
}

.character-hotspot,
.play-hotspot,
.back-hotspot,
.diagnostic-hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  cursor: pointer;
  color: transparent;
}

.character-hotspot {
  transform: translateZ(0);
}

.character-hotspot:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.94);
  outline-offset: -4px;
}

.play-hotspot {
  z-index: 37;
  left: 72.9%;
  top: 89.7%;
  width: 24.1%;
  height: 8.9%;
  border-radius: 999px;
}

.back-hotspot {
  z-index: 37;
  left: 2.55%;
  top: 4.1%;
  width: 7.7%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.diagnostic-hotspot {
  z-index: 37;
  right: 1.5%;
  bottom: 1.2%;
  width: auto;
  height: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: rgba(96, 35, 78, 0.72);
  font-size: 10px;
  font-weight: 800;
}

.menu-hidden-status {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .selected-marker {
    width: 6.1%;
  }

  .menu-stars {
    font-size: clamp(14px, 3vw, 30px);
  }

  .player-badge {
    left: 12%;
    min-width: 24%;
    max-width: 36%;
    padding: 0.7vw 1vw;
  }

  .player-badge strong {
    max-width: 12vw;
  }
}

/* v0.2.5 — cadastro e ranking */
.register-panel {
  width: min(520px, 92vw);
  max-height: 92dvh;
  overflow: auto;
}

.register-field {
  display: block;
  margin: 10px 0;
  text-align: left;
}

.register-field span {
  display: block;
  margin: 0 0 5px;
  color: #6d3078;
  font-weight: 900;
  font-size: 0.86rem;
}

.register-field input {
  width: 100%;
  box-sizing: border-box;
  border: 3px solid rgba(248, 111, 176, 0.45);
  border-radius: 18px;
  padding: 13px 15px;
  font: inherit;
  font-weight: 800;
  color: #6b246e;
  background: #fff;
  outline: none;
}

.register-field input:focus {
  border-color: #f74ea4;
  box-shadow: 0 0 0 4px rgba(247, 78, 164, 0.15);
}

.register-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 16px;
  text-align: left;
  color: #6d3078;
  font-weight: 800;
  font-size: 0.9rem;
}

.register-consent input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: #f74ea4;
}

.ranking-status {
  margin: 12px 0 8px;
  color: #6d3078;
  font-weight: 900;
}

.ranking-preview {
  display: grid;
  gap: 6px;
  margin: 8px 0 14px;
  text-align: left;
}

.ranking-preview div {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(255, 235, 249, 0.9);
  color: #6d3078;
  font-weight: 800;
}

.ranking-preview strong {
  color: #f3469d;
}

.ranking-preview b {
  color: #4c2591;
}

@media (max-width: 760px) and (orientation: landscape) {
  .register-panel {
    width: min(520px, 86vw);
    padding: 14px 18px;
  }

  .register-panel h2 {
    font-size: 1.3rem;
    margin: 4px 0;
  }

  .register-field {
    margin: 6px 0;
  }

  .register-field input {
    padding: 9px 12px;
    border-radius: 14px;
  }
}

/* v0.2.6 — cadastro validado */
.register-field input,
.register-field select {
  width: 100%;
  box-sizing: border-box;
  border: 3px solid rgba(248, 111, 176, 0.45);
  border-radius: 18px;
  padding: 13px 15px;
  font: inherit;
  font-weight: 800;
  color: #6b246e;
  background: #fff;
  outline: none;
}

.register-field input:focus,
.register-field select:focus {
  border-color: #f74ea4;
  box-shadow: 0 0 0 4px rgba(247, 78, 164, 0.15);
}

.field-hint {
  display: block;
  margin-top: 4px;
  color: #85558a;
  font-size: 0.75rem;
  font-weight: 700;
}

.other-city-fields {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
}

.other-city-fields.is-hidden {
  display: none;
}

@media (max-width: 760px) and (orientation: landscape) {
  .register-field input,
  .register-field select {
    padding: 9px 12px;
    border-radius: 14px;
  }
}

/* v0.3.1 — Identidade visual do Mundo 1 */
.hud-world{display:flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,226,241,.94));border:3px solid rgba(255,255,255,.92);box-shadow:0 8px 18px rgba(102,47,112,.22);color:#7f2f86;font-size:13px;letter-spacing:.04em;white-space:nowrap}.hud-world span{font-size:18px}.hud-world strong{font-weight:900}@media(max-width:760px){.hud-world{padding:6px 10px;font-size:10px;gap:5px}.hud-world span{font-size:14px}}


/* v0.3.3 — Perfil do jogador e ranking completo */
.menu-gamification-actions { position:absolute; right:2.2%; bottom:2.4%; z-index:8; display:flex; gap:10px; }
.menu-gamification-actions button { border:2px solid rgba(255,255,255,.9); border-radius:999px; padding:10px 16px; background:linear-gradient(135deg,#ff4f9d,#db2f7f); color:#fff; font-weight:900; box-shadow:0 6px 18px rgba(109,21,70,.28); cursor:pointer; font-size:clamp(10px,1.15vw,15px); }
.menu-gamification-actions button:last-child { background:linear-gradient(135deg,#ffbd35,#f28a22); }
.profile-panel,.ranking-full-panel { width:min(720px,92vw); max-height:88vh; overflow:auto; }
.profile-avatar { width:82px;height:82px;border-radius:50%;display:grid;place-items:center;margin:0 auto 10px;font-size:40px;background:linear-gradient(145deg,#ffe1f0,#fff);box-shadow:0 10px 30px rgba(219,47,127,.2); }
.profile-stat-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0; }
.profile-stat-grid div { padding:14px;border-radius:18px;background:#fff5fa;border:1px solid #ffd0e4; }
.profile-stat-grid span { display:block;font-size:11px;font-weight:800;color:#a54b78; }
.profile-stat-grid strong { display:block;font-size:25px;color:#d82c7d; }
.profile-character { font-weight:800;color:#7a3b61; }
.full-ranking-list { display:grid;gap:8px;margin:14px 0 18px; }
.full-ranking-row { display:grid;grid-template-columns:58px minmax(120px,1fr) minmax(80px,.7fr) 90px;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:#fff;border:1px solid #f3d6e4;text-align:left; }
.full-ranking-row strong { font-size:18px;text-align:center; }
.full-ranking-row span { font-weight:900;color:#6b3153;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.full-ranking-row small { color:#967086;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.full-ranking-row b { color:#d82c7d;text-align:right; }
.full-ranking-row.is-current-player { background:#fff1b8;border-color:#f7b733;box-shadow:0 0 0 2px rgba(247,183,51,.18); }
@media (max-width:760px){.menu-gamification-actions{right:1.5%;bottom:1.5%;gap:6px}.menu-gamification-actions button{padding:7px 10px;font-size:9px}.full-ranking-row{grid-template-columns:44px 1fr 70px}.full-ranking-row small{display:none}.profile-stat-grid{gap:8px}.profile-stat-grid div{padding:10px}}
