/* Auth screens — login / register / verify */

/* Homepage forest deck (login / register / forgot / verify) */
.auth-page .home-stage {
  overflow: auto;
  height: auto;
  min-height: 100svh;
}

.auth-page-dashboard {
  grid-template-rows: auto minmax(0, 1fr);
}

.auth-page .kmz-gallery-results {
  display: block;
  overflow: auto;
}

.auth-page a.btn,
.auth-page a.btn:hover,
.auth-page a.btn:focus {
  text-decoration: none;
}

.auth-page .auth-steps,
.auth-page .auth-sub,
.auth-page .auth-form,
.auth-page .auth-err,
.auth-page .auth-ok,
.auth-page .auth-foot {
  max-width: 26rem;
}

.auth-page .auth-form {
  gap: 0.2rem;
}

.auth-page .auth-sub {
  margin: 0 0 0.85rem;
  color: var(--deck-muted);
  font-size: 0.52rem;
  line-height: 1.45;
}

.auth-page .auth-field {
  margin-top: 0.55rem;
}

.auth-page .auth-field label {
  margin: 0 0 0.28rem;
  color: var(--deck-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.auth-page .auth-field .hint {
  margin: 0.28rem 0 0;
  font-size: 0.52rem;
  line-height: 1.45;
  color: var(--deck-muted);
}

.auth-page .auth-field .hint.bad {
  color: #f0b4b4;
}

.auth-page .auth-field .hint.ok {
  color: var(--deck-accent);
}

.auth-page .auth-input-wrap input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 8px;
  color: var(--deck-ink);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font: 600 0.78rem/1.25 var(--deck-font);
  color-scheme: dark;
  transition: box-shadow 0.18s ease;
}

.auth-page .auth-input-wrap input::placeholder {
  color: var(--deck-muted);
}

.auth-page .auth-input-wrap input:hover {
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.45);
}

.auth-page .auth-input-wrap input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.75);
}

.auth-page .auth-input-wrap input.is-invalid {
  box-shadow: inset 0 0 0 1px rgba(224, 106, 90, 0.75);
}

.auth-page .auth-input-wrap input.is-valid {
  box-shadow: inset 0 0 0 1px rgba(95, 191, 122, 0.55);
}

.auth-page .auth-input-wrap:has(.auth-eye) input {
  padding-right: 3.4rem;
}

.auth-page .auth-eye {
  color: var(--deck-muted);
  font-size: 0.52rem;
  font-weight: 700;
}

.auth-page .auth-eye:hover {
  color: var(--deck-ink);
}

.auth-page .auth-meter {
  margin-top: 0.4rem;
}

.auth-page .auth-meter span {
  height: 0.18rem;
  background: rgba(255, 255, 255, 0.12);
}

.auth-page .auth-actions {
  margin-top: 0.95rem;
  gap: 0.4rem;
}

.auth-page .auth-actions .btn,
.auth-page .auth-foot-btn {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.68rem;
}

.auth-page .auth-resend-wait {
  min-height: 2.25rem;
  font-size: 0.52rem;
  color: var(--deck-muted);
}

.auth-page .auth-err,
.auth-page .auth-ok {
  min-height: 0;
  margin-top: 0.55rem;
  font-size: 0.68rem;
}

.auth-page .auth-err {
  color: #f0b4b4;
}

.auth-page .auth-ok {
  color: var(--deck-accent);
}

.auth-page .auth-foot {
  font-size: 0.52rem;
}

.auth-page .auth-foot-cta {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(241, 244, 238, 0.12);
}

.auth-page .auth-foot-label {
  font-size: 0.52rem;
  color: var(--deck-muted);
}

.auth-page .auth-foot-btn {
  border: 0;
  background: transparent;
  color: #e8d48a;
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.45);
}

.auth-page .auth-foot-btn:hover {
  background: rgba(156, 173, 78, 0.16);
  color: #f1f4ee;
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.75);
}

.auth-page .auth-steps {
  margin: 0 0 0.75rem;
}

.auth-page .auth-step {
  font-size: 0.52rem;
  color: var(--deck-muted);
}

.auth-page .auth-step-num {
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 0.52rem;
}

.auth-page .auth-step.is-active {
  color: var(--deck-ink);
}

.auth-page .auth-step.is-active .auth-step-num {
  background: var(--deck-accent);
  color: #151b11;
  box-shadow: none;
}

.auth-page .auth-step.is-done {
  color: var(--deck-accent);
}

.auth-page .auth-step.is-done .auth-step-num {
  color: var(--deck-accent);
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.55);
}

.auth-page .auth-step-line {
  background: rgba(241, 244, 238, 0.14);
}

.auth-page .auth-verify-card {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(156, 173, 78, 0.28);
}

.auth-page .auth-verify-to {
  color: var(--deck-muted);
  font-size: 0.52rem;
}

.auth-page .auth-verify-to strong {
  color: var(--deck-ink);
}

.auth-page .auth-code-input {
  letter-spacing: 0.28em;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .auth-page .auth-field label,
  .auth-page .auth-input-wrap input,
  .auth-page .auth-actions .btn,
  .auth-page .auth-foot-btn {
    font-size: 0.78rem;
  }

  .auth-page .auth-sub,
  .auth-page .auth-field .hint,
  .auth-page .auth-foot-label,
  .auth-page .auth-eye,
  .auth-page .auth-step,
  .auth-page .auth-verify-to {
    font-size: 0.62rem;
  }
}

.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr min(440px, 100%);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(900px 480px at 8% 0%, rgba(201, 162, 39, 0.14), transparent 55%),
    radial-gradient(700px 420px at 70% 100%, rgba(95, 191, 122, 0.1), transparent 50%),
    linear-gradient(160deg, #07100c 0%, #0a110e 45%, #0d1812 100%);
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 3.25rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.auth-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 16, 12, 0.08) 0%, transparent 22%, rgba(7, 16, 12, 0.82) 100%),
    linear-gradient(90deg, rgba(7, 16, 12, 0.12), transparent 42%);
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  animation: authRise 0.7s ease both;
}

.auth-hero .brand {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

.auth-hero .brand small {
  margin-top: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 239, 233, 0.62);
}

.auth-hero-lead {
  margin: 0;
  color: rgba(232, 239, 233, 0.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: rgba(10, 17, 14, 0.72);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(16px);
  padding: 1.25rem 1.5rem 2rem;
  animation: authSlide 0.55s ease both;
  position: relative;
}

.auth-panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.auth-panel-top .nav-account {
  position: relative;
}

.auth-panel-top .nav-account-menu {
  z-index: 40;
}

.auth-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(360px, 100%);
  margin: 0 auto;
}

.auth-panel h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
}

.auth-sub {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 0.15rem;
}

.auth-form[hidden],
.auth-panel-stage[hidden] {
  display: none !important;
}

.auth-field {
  margin-top: 0.7rem;
}

.auth-field label {
  margin: 0 0 0.35rem;
}

.auth-field .hint {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.auth-field .hint.bad {
  color: var(--danger);
}

.auth-field .hint.ok {
  color: var(--live);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  font-family: var(--font-ui);
  padding-right: 2.75rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.auth-input-wrap input.is-invalid {
  border-color: rgba(224, 106, 90, 0.7);
}

.auth-input-wrap input.is-valid {
  border-color: rgba(95, 191, 122, 0.45);
}

.auth-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.auth-eye:hover {
  color: var(--ink);
}

.auth-meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.auth-meter span {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.auth-meter[data-level="1"] span:nth-child(1) {
  background: #e06a5a;
}
.auth-meter[data-level="2"] span:nth-child(-n + 2) {
  background: #c9a227;
}
.auth-meter[data-level="3"] span {
  background: #5fbf7a;
}

.auth-count {
  float: right;
  font-variant-numeric: tabular-nums;
}

.auth-actions {
  margin-top: 1.35rem;
  display: grid;
  gap: 0.55rem;
}

.auth-actions .btn {
  min-height: 2.75rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.auth-actions .btn:active:not(:disabled) {
  transform: scale(0.985);
}

.auth-actions .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-resend-wait {
  margin: 0;
  min-height: 2.6rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-align: center;
}

.auth-resend-wait[hidden] {
  display: none !important;
}

.auth-err {
  min-height: 1.25rem;
  margin-top: 0.85rem;
  color: var(--danger);
  font-size: 0.88rem;
}

.auth-ok {
  min-height: 1.25rem;
  margin-top: 0.55rem;
  color: var(--live);
  font-size: 0.88rem;
}

.auth-foot {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-foot-cta {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.auth-foot-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.auth-foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  width: 100%;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: transparent;
  color: #e8d48a;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.auth-foot-btn:hover {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.7);
  color: #f0e0a8;
  text-decoration: none;
  filter: none;
}

.auth-foot-btn:active {
  transform: scale(0.985);
}

.auth-steps {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.auth-step-num {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(12, 20, 16, 0.8);
}

.auth-step.is-active {
  color: var(--ink);
}

.auth-step.is-active .auth-step-num {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.auth-step.is-done {
  color: var(--live);
}

.auth-step.is-done .auth-step-num {
  border-color: rgba(95, 191, 122, 0.45);
  color: var(--live);
}

.auth-step-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  list-style: none;
  min-width: 1.25rem;
}

.auth-verify-card {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background:
    linear-gradient(135deg, rgba(201, 162, 39, 0.1), transparent 55%),
    rgba(12, 20, 16, 0.85);
}

.auth-verify-to {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-verify-to strong {
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
}

.auth-code-input {
  letter-spacing: 0.35em;
  font-size: 1.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Team onboarding */
.team-choices {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.team-choice {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.72);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.team-choice:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(16, 26, 20, 0.92);
  text-decoration: none;
  transform: translateY(-1px);
}

.team-choice-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-choice strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.team-choice-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(232, 239, 233, 0.68);
}

.team-join {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.team-op-list {
  display: grid;
  gap: 0.65rem;
}

.team-op {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 20, 16, 0.72);
  overflow: hidden;
}

.team-op-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.team-op-logo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.team-op-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-op-logo-fallback {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

.team-op-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.team-op-meta strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-op-meta span {
  font-size: 0.78rem;
  color: var(--muted);
}

.team-op-chevron {
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}

.team-op-body {
  padding: 0 0.95rem 0.95rem;
  border-top: 1px solid transparent;
}

.team-force-label {
  margin: 0.75rem 0 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.team-forces {
  display: grid;
  gap: 0.45rem;
}

.team-force {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 11, 0.65);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.team-force:hover {
  border-color: rgba(201, 162, 39, 0.4);
}

.team-force-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.team-form {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.25rem;
}

.team-mine {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.45rem;
}

.team-mine-card code {
  font-family: var(--font-ui);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.team-mine-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.55);
  color: inherit;
  text-decoration: none;
}

.team-mine-card--brand {
  gap: 0.35rem;
  justify-items: start;
}

.team-logo-block {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  margin: 0 0 0.85rem;
}

.team-logo-stage {
  position: relative;
  width: 112px;
  height: 112px;
}

.team-logo-frame {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: #0c1410;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.team-logo-frame.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
}

.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-logo-fallback {
  font-family: var(--font-display, "Unbounded", sans-serif);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--accent, #c9a227);
}

.team-logo-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 2;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 24, 20, 0.92);
  color: rgba(255, 220, 220, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.team-logo-remove:hover,
.team-logo-remove:focus-visible {
  background: rgba(120, 36, 36, 0.95);
  border-color: rgba(255, 140, 140, 0.45);
  color: #fff;
  outline: none;
  transform: scale(1.04);
}

.team-logo-remove:active {
  transform: scale(0.96);
}

.team-logo-remove:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.team-logo-remove .ico {
  width: 14px;
  height: 14px;
}

.team-logo-upload {
  cursor: pointer;
  margin: 0;
  font-size: 0.82rem;
  padding: 0.4rem 0.7rem;
}

.team-logo-upload.is-busy {
  opacity: 0.7;
}

/* Entity page tabs (team / org) */
.entity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.entity-tab {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(232, 239, 233, 0.72);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.entity-tab:hover {
  color: #e8efe9;
  background: rgba(255, 255, 255, 0.04);
}

.entity-tab.is-on {
  color: #0c1410;
  background: var(--accent, #c9a227);
}

.entity-tab-panel[hidden] {
  display: none !important;
}

.entity-ops-section {
  margin: 0 0 1.1rem;
}

.entity-ops-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
}

.entity-ops-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8d48b;
}

.entity-ops-count {
  font-size: 0.8rem;
}

.entity-ops-grid {
  display: grid;
  gap: 0.55rem;
}

.entity-ops-empty {
  margin: 0.5rem 0 0;
}

.entity-ops-loading {
  margin: 0.5rem 0 0;
}

.team-page .entity-op-card.game-card-compact {
  background: rgba(12, 20, 16, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 12px;
}

.team-page .entity-op-card .game-card-main {
  padding: 0.55rem 0.65rem;
  gap: 0.65rem;
}

.team-page .entity-op-card .game-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.team-page .entity-op-card .game-title {
  font-size: 0.95rem;
}

.team-page .entity-op-card .game-format {
  font-size: 0.78rem;
}

.team-mine-name {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
  text-align: center;
}

.team-profile-fields {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  justify-items: stretch;
}

.profile-wrap {
  max-width: 36rem;
  padding-top: 1.25rem;
}

.profile-account-actions {
  display: grid;
  gap: 0.75rem;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.profile-tab {
  appearance: none;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: rgba(12, 20, 16, 0.65);
  color: var(--muted, #7a8f82);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profile-tab:hover {
  color: var(--text, #e8efe9);
  border-color: rgba(255, 255, 255, 0.22);
}

.profile-tab.is-active {
  background: rgba(201, 162, 39, 0.18);
  border-color: rgba(201, 162, 39, 0.55);
  color: #e8d48a;
}

.profile-pane[hidden] {
  display: none !important;
}

.profile-kmz-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-kmz-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(14, 22, 18, 0.55);
}

.profile-kmz-card:hover {
  border-color: rgba(201, 162, 39, 0.45);
}

.profile-kmz-progress {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e8d48b;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.1);
  white-space: nowrap;
}

.profile-pane h1 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
}

.profile-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.profile-step {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  background: rgba(10, 16, 13, 0.55);
}

.profile-step-title {
  display: block;
  font-size: 0.95rem;
}

.profile-guide {
  margin: 0.55rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 12px;
  background: rgba(12, 20, 16, 0.72);
}

.profile-guide-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent, #c9a227);
  letter-spacing: 0.02em;
}

.profile-guide-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: var(--ink, #e8efe9);
  font-size: 0.86rem;
  line-height: 1.5;
}

.profile-guide-list li + li {
  margin-top: 0.45rem;
}

.profile-guide-list code {
  font-size: 0.84em;
  color: #e8d48a;
}

.profile-guide-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted, #7a8f82);
}

.profile-guide-details > summary {
  cursor: pointer;
  color: var(--muted, #7a8f82);
  font-size: 0.88rem;
  line-height: 1.4;
}

.profile-guide-details[open] > summary {
  color: var(--accent, #c9a227);
}

.team-profile-fields .team-mine-name {
  justify-self: center;
}

.team-field-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}

.team-edit-input {
  width: 100%;
  box-sizing: border-box;
}

.team-edit-short,
.team-city-line {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.team-code-box {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding: 0.95rem 1rem;
  margin: 0 0 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.12), rgba(12, 20, 16, 0.75));
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.12);
}

.team-code-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-code-value {
  font-family: var(--font-ui);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  line-height: 1.1;
}

.team-code-copy {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
}

.team-mine-card:hover {
  text-decoration: none;
  border-color: rgba(201, 162, 39, 0.35);
}

.team-mine-card span {
  font-size: 0.8rem;
  color: var(--muted);
}

.team-pending {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.55rem;
}

.team-pending-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.08);
}

.team-pending-card strong {
  font-size: 0.95rem;
}

.team-pending-card .muted {
  font-size: 0.82rem;
  margin: 0;
}

/* Team page: members on the left instead of map mesh */
.team-page .auth-hero::before {
  background:
    linear-gradient(180deg, rgba(7, 16, 12, 0.2) 0%, transparent 30%, rgba(7, 16, 12, 0.55) 100%),
    linear-gradient(90deg, rgba(7, 16, 12, 0.08), transparent 50%);
}

.team-page .team-hero {
  justify-content: flex-start;
  padding-top: 2.5rem;
}

.team-page .team-hero-inner {
  max-width: min(36rem, 100%);
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.team-hero-title {
  margin: 1.25rem 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.team-hero-meta {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.team-member-list {
  display: grid;
  gap: 0.45rem;
  overflow: auto;
  padding-right: 0.25rem;
  max-height: calc(100vh - 12rem);
}

.team-member-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 16, 13, 0.55);
}

.team-member-row.is-commander {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.08);
}

.team-member-row.is-deputy {
  border-color: rgba(138, 149, 136, 0.4);
}

.team-member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.team-member-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.team-member-name strong {
  font-size: 0.98rem;
}

.team-kick-btn {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(224, 112, 112, 0.45);
  background: rgba(224, 112, 112, 0.1);
  color: #e07070;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-kick-btn:hover {
  background: rgba(224, 112, 112, 0.22);
  border-color: rgba(224, 112, 112, 0.7);
}

.team-star {
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(201, 162, 39, 0.55));
}

.team-star-deputy {
  filter: none;
}

.team-member-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.team-member-meta-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.team-move-squad,
.team-role-sel {
  margin: 0;
  flex: 1 1 auto;
  width: auto;
  min-width: 6.5rem;
  max-width: 11rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 20, 16, 0.9);
  color: var(--ink);
  font-family: var(--font-ui);
}

.team-role-sel {
  flex: 0 1 auto;
  min-width: 7.5rem;
  max-width: 9.5rem;
}

.team-member-squad {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .team-member-list {
    max-height: none;
  }
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes authSlide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  html:has(body.auth-body),
  body.auth-body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .auth-body {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    min-height: 100svh;
  }

  /* Compact brand strip — no capture animation / empty hero plane */
  .auth-hero {
    min-height: 0;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) 1rem 0.55rem;
    justify-content: flex-start;
  }

  .auth-mesh {
    display: none !important;
  }

  .auth-hero::before {
    background: none;
  }

  .auth-hero .brand {
    font-size: 1.35rem;
    margin-bottom: 0;
  }

  .auth-hero .brand small {
    margin-top: 0.25rem;
    font-size: 0.78rem;
  }

  .auth-hero .lead,
  .auth-hero-lead {
    display: none;
  }

  .auth-hero-inner {
    animation: none;
    max-width: none;
  }

  .auth-panel {
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.85rem 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
    animation: none;
    width: 100%;
    max-width: 100%;
  }

  .auth-panel-body {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
  }

  .auth-panel h1 {
    font-size: 1.35rem;
  }

  .auth-steps {
    margin-bottom: 0.85rem;
    gap: 0.4rem;
  }

  .auth-step-label {
    font-size: 0.78rem;
  }

  .auth-foot-cta {
    margin-top: 1.15rem;
    padding-top: 1rem;
  }

  .auth-code-input {
    letter-spacing: 0.22em;
    font-size: 1.2rem;
  }

  .team-layout .auth-hero {
    min-height: 0;
  }
}

.team-choice-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.team-invite-hint {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.team-invite-box {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding: 0.95rem 1rem;
  margin: 0 0 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.12), rgba(12, 20, 16, 0.75));
}

.team-invite-ttl {
  margin: 0;
  font-size: 0.78rem;
  text-align: center;
}

.team-invite-url {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--accent);
  text-align: center;
}

.team-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.team-invite-qr {
  margin-top: 0.35rem;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.teams-side-actions {
  display: grid;
  gap: 0.55rem;
}

.teams-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.2rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(12, 20, 16, 0.55);
}

.teams-section-tab {
  flex: 1 1 auto;
  min-width: 7rem;
  text-align: center;
  text-decoration: none;
  color: #c5cec4;
  font-family: var(--font-ui, "Unbounded", "Outfit", system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.teams-section-tab:hover {
  color: #e8efe9;
  background: rgba(201, 162, 39, 0.08);
}

.teams-section-tab.is-active {
  color: #1a1408;
  background: var(--accent, #c9a227);
  border-color: transparent;
  font-weight: 600;
}

.teams-dir-page .teams-side-actions:empty {
  display: none;
}

.orgs-dir-note {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(12, 20, 16, 0.45);
  color: #c5cec4;
  font-size: 0.82rem;
  line-height: 1.4;
}

.org-member-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.org-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.45);
}

.org-member-row strong {
  font-size: 0.9rem;
}

.org-invite-box {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  background: rgba(12, 20, 16, 0.5);
  display: grid;
  gap: 0.4rem;
}

.org-invite-url {
  display: block;
  word-break: break-all;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.teams-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.65rem;
}

.teams-toolbar .btn.is-active {
  border-color: rgba(201, 162, 39, 0.55);
  color: #e8d48a;
}

.teams-filters {
  margin-bottom: 0.85rem;
}

.teams-tile {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.55);
}

.teams-tile-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.teams-tile-link:hover {
  border-color: rgba(201, 162, 39, 0.7);
  background: rgba(201, 162, 39, 0.14);
}

.teams-tile.is-mine {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.08);
}

.teams-tile-star-wrap {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  left: auto;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: rgba(10, 16, 13, 0.85);
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.teams-tile-star {
  display: block;
  filter: drop-shadow(0 0 4px rgba(201, 162, 39, 0.55));
}

.teams-dir-page .teams-dir-main {
  max-width: 1100px;
  padding-top: 1.25rem;
}

.teams-dir-page .teams-side-actions {
  margin: 0 0 1rem;
}

.teams-dir-page .teams-side-actions .btn {
  width: 100%;
  max-width: 28rem;
}

.team-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
  min-height: calc(100vh - 4.5rem);
}

@media (max-width: 900px) {
  .team-page-layout {
    grid-template-columns: 1fr;
  }
}

/* Team / org pages: single column like operation room */
.entity-room-body .entity-onboard-lead {
  margin: 0 0 1rem;
  max-width: 36rem;
  line-height: 1.45;
}

.entity-room-body .team-member-list,
.entity-room-body .org-member-list {
  max-height: none;
  overflow: visible;
}

.entity-room-body .op-room-scroll > #teamsSectionTabs {
  margin-bottom: 0.65rem;
}

.entity-room-body .op-room-scroll h1 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.teams-dir-page .teams-dir-hero {
  justify-content: flex-start;
  padding: 1.5rem 1.5rem 2rem;
  min-height: 0;
  overflow: auto;
}

.teams-dir-page .teams-dir-catalog {
  max-width: none;
  width: 100%;
}

.teams-dir-page .auth-panel-body.teams-dir-actions {
  justify-content: center;
  width: min(320px, 100%);
}

.teams-dir-page .teams-invite-note {
  margin-top: 0.85rem;
}

.teams-invite-note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
  font-size: 0.86rem;
  line-height: 1.45;
}

.teams-filter-meta {
  margin: 0;
  font-size: 0.8rem;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.teams-tile-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0c1410;
}

.teams-tile-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teams-tile-fallback {
  font-family: var(--font-display, "Unbounded", sans-serif);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
}

.teams-tile-name {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.teams-tile-city {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.teams-tile-flag {
  font-size: 1rem;
  margin-left: 0.2rem;
}

.teams-tile-count {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .teams-filters .games-filters-row {
    grid-template-columns: 1fr;
  }
}
