.auth-root[hidden],
.tutorial-root:empty {
  display: none;
}

body.auth-gated {
  overflow: hidden;
}

body.auth-gated .app-shell {
  visibility: hidden;
  pointer-events: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  color: #e7e5df;
  background:
    linear-gradient(rgba(25, 20, 17, 0.72), rgba(18, 17, 15, 0.88)),
    url("../assets/mirage-background.png") center / cover no-repeat;
}

.auth-gate::before {
  position: absolute;
  inset: 0;
  content: "";
  backdrop-filter: blur(13px);
}

.auth-panel {
  position: relative;
  width: min(430px, calc(100vw - 42px));
  padding: 32px 34px 28px;
  border-top: 2px solid #91c6d9;
  background: rgba(29, 30, 29, 0.96);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
}

.auth-kicker,
.market-kicker,
.trade-kicker {
  color: #8fa7ac;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.auth-panel h1 {
  margin: 5px 0 11px;
  font-size: 31px;
  font-weight: 400;
  letter-spacing: 0.025em;
}

.auth-panel p {
  margin: 0 0 22px;
  color: rgba(232, 231, 225, 0.7);
  font-size: 13px;
  line-height: 1.45;
}

.google-sign-in {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #252525;
  background: #f4f4f3;
  font: 700 13px var(--font-ui);
  letter-spacing: 0.07em;
}

.google-sign-in:hover {
  background: #fff;
}

.google-sign-in img {
  width: 19px;
  height: 19px;
}

.auth-panel > small {
  display: block;
  margin-top: 13px;
  color: rgba(232, 231, 225, 0.42);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.auth-loading {
  margin-top: 18px;
  color: #a8cbd7;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.tutorial-overlay {
  position: fixed;
  z-index: 4100;
  top: calc(var(--header-height) + 14px);
  right: 18px;
  bottom: auto;
  width: min(350px, calc(100vw - 36px));
  color: #eceae4;
  pointer-events: none;
}

.tutorial-overlay.is-blocking {
  inset: 0;
  width: auto;
  display: grid;
  place-items: center;
  background: rgba(13, 14, 13, 0.66);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.tutorial-panel {
  border-top: 2px solid #86c6d9;
  padding: 18px 20px 20px;
  background: rgba(29, 30, 29, 0.97);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
}

.is-blocking .tutorial-panel {
  width: min(480px, calc(100vw - 42px));
  padding: 24px 26px 26px;
}

.tutorial-header {
  display: flex;
  align-items: center;
  gap: 13px;
}

.tutorial-step-number {
  color: #a9d9e7;
  font-size: 26px;
  font-weight: 300;
}

.tutorial-header small {
  color: rgba(234, 233, 227, 0.43);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.tutorial-header h2 {
  margin: 2px 0 0;
  font-size: 18px;
  letter-spacing: 0.045em;
}

.tutorial-copy {
  margin: 15px 0 0;
  color: rgba(234, 233, 227, 0.7);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.035em;
}

.tutorial-action {
  width: 100%;
  height: 38px;
  margin-top: 18px;
  border: 0;
  color: #f4f6ef;
  background: #658d35;
  font: 700 11px var(--font-ui);
  letter-spacing: 0.08em;
}

.player-account {
  display: grid;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

@media (max-width: 900px) {
  .tutorial-overlay {
    right: 14px;
    top: calc(var(--header-height) + 10px);
  }
}
