:root {
  --bg: #0a0c0b;
  --text: #f0e2c4;
  --text-dim: rgba(210, 196, 170, 0.72);
  --brass: #c4a574;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 50% 18%, rgba(196, 165, 116, 0.1), transparent 65%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(30, 40, 36, 0.7), transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.012) 2px,
      rgba(255, 255, 255, 0.012) 3px
    ),
    linear-gradient(165deg, #12100e 0%, #0a0c0b 48%, #080a09 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: calc(36px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
}

.page--hub {
  width: min(1080px, calc(100% - 40px));
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 28px;
}

.masthead__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4.2rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 0.95;
  color: #f0e2c4;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 0 48px rgba(196, 165, 116, 0.28);
}

.masthead__rule {
  width: min(220px, 48%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 165, 116, 0.75), transparent);
}

.lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  background: rgba(12, 14, 16, 0.72);
}

.lang__btn {
  min-width: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(230, 210, 150, 0.65);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.lang__btn.is-active {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.28), rgba(138, 106, 40, 0.35));
  color: #f0d78a;
}

.profile-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 40;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  background: rgba(12, 14, 16, 0.72);
  backdrop-filter: blur(10px);
  color: rgba(240, 226, 196, 0.92);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.profile-btn:hover {
  border-color: rgba(220, 190, 130, 0.75);
  background: rgba(22, 18, 14, 0.9);
  color: #f4ead4;
}

.profile-btn__initials {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}

.masthead__title {
  margin: 4px 0 0;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 220, 200, 0.78);
  border: 1px solid rgba(196, 165, 116, 0.35);
  background: rgba(196, 165, 116, 0.06);
}

.masthead__lead {
  margin: 0;
  max-width: 34em;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.module {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  background: linear-gradient(165deg, rgba(18, 22, 20, 0.88), rgba(10, 12, 11, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
}

.module:hover {
  border-color: rgba(220, 190, 130, 0.55);
  transform: translateY(-1px);
}

.module__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 4px 8px;
  border: 1px solid rgba(196, 165, 116, 0.35);
}

.module--soon .module__tag {
  color: rgba(210, 196, 170, 0.55);
  border-color: rgba(210, 196, 170, 0.22);
}

.module__name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-indent: 0.08em;
  line-height: 1;
}

.module__text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-dim);
  flex: 1;
}

.module__cta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f4ead4;
}

.module--done .module__tag {
  color: #d8c49a;
  border-color: rgba(196, 165, 116, 0.55);
  background: rgba(196, 165, 116, 0.12);
}

.module--life {
  grid-column: 1 / -1;
}

.module--life.module--unlocked {
  border-color: rgba(220, 190, 130, 0.5);
  background: linear-gradient(165deg, rgba(28, 32, 26, 0.92), rgba(10, 12, 11, 0.94));
}

.module__checklist {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.module__check {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid rgba(196, 165, 116, 0.12);
  padding-top: 6px;
}

.module__check--done {
  color: #e8d7b0;
}

.module__check--pending {
  color: rgba(210, 196, 170, 0.55);
}

.module__check--soon {
  color: rgba(210, 196, 170, 0.38);
}

.foot {
  margin-top: 28px;
  text-align: center;
}

.foot p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(210, 196, 170, 0.45);
}

.stub {
  width: min(560px, calc(100% - 40px));
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}

.stub__brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: #f0e2c4;
}

.stub__module {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(196, 165, 116, 0.4);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--brass);
}

.stub__title {
  margin: 0 0 10px;
  font-family: var(--font-retro, var(--font-mono));
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.stub__text {
  margin: 0 auto 22px;
  max-width: 32em;
  color: var(--text-dim);
  line-height: 1.55;
}

.stub__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 24px;
  border: 1px solid rgba(196, 165, 116, 0.55);
  background:
    linear-gradient(180deg, rgba(196, 165, 116, 0.22), rgba(90, 70, 40, 0.35)),
    #1a1612;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f4ead4;
}

@media (max-width: 720px) {
  .modules {
    grid-template-columns: 1fr;
  }
}

/* ---------- главная: профиль + уведомления ---------- */

.hub {
  margin-top: 8px;
}

.hub--home {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}

/* display:grid выше иначе перебивает [hidden] и карточка торчит на логине */
.hub--home[hidden],
.hub--gate[hidden],
[data-view][hidden] {
  display: none !important;
}

.profile-card,
.notice-panel {
  padding: 22px 20px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  background: linear-gradient(165deg, rgba(18, 22, 20, 0.88), rgba(10, 12, 11, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-card__eyebrow,
.notice-panel__eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.profile-card__name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.profile-card__hint {
  margin: 0 0 18px;
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* ---------- красивая форма входа ---------- */

body.is-gate {
  background:
    radial-gradient(ellipse 90% 55% at 50% 8%, rgba(196, 165, 116, 0.16), transparent 58%),
    radial-gradient(ellipse 70% 45% at 18% 85%, rgba(40, 55, 48, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 88% 70%, rgba(55, 42, 28, 0.35), transparent 50%),
    linear-gradient(180deg, #100e0c 0%, #0a0c0b 45%, #070807 100%);
}

body.is-gate .page--hub {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.is-gate .masthead {
  position: relative;
  min-height: 0;
  padding: 16px 0 0;
  margin: 0;
}

body.is-gate .masthead__brand,
body.is-gate .masthead__rule,
body.is-gate .masthead__title,
body.is-gate .masthead__lead,
body.is-gate .masthead .lang {
  display: none;
}

body.is-gate .masthead {
  display: none;
}

body.is-gate .hub--gate {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 0;
  width: 100%;
}

body.is-gate .hub--home {
  display: none !important;
}

body.is-gate .foot {
  display: none;
}

.hub--gate {
  margin-top: 4px;
}

.gate-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(68dvh, 640px);
  padding: 12px 0 8px;
  overflow: hidden;
}

.gate-stage__glow {
  position: absolute;
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(240, 220, 170, 0.18), transparent 42%),
    radial-gradient(circle at 55% 60%, rgba(196, 165, 116, 0.12), transparent 55%);
  filter: blur(2px);
  animation: gate-breathe 8s ease-in-out infinite;
  pointer-events: none;
}

.gate-stage__ring {
  position: absolute;
  width: min(340px, 72vw);
  height: min(340px, 72vw);
  border-radius: 50%;
  border: 1px solid rgba(196, 165, 116, 0.18);
  box-shadow:
    inset 0 0 40px rgba(196, 165, 116, 0.06),
    0 0 60px rgba(196, 165, 116, 0.08);
  animation: gate-spin 48s linear infinite;
  pointer-events: none;
}

.gate-stage__ring::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(196, 165, 116, 0.14);
}

.gate-stage__dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(240, 226, 196, 0.45), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(240, 226, 196, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 64% 72%, rgba(240, 226, 196, 0.4), transparent),
    radial-gradient(1px 1px at 28% 78%, rgba(240, 226, 196, 0.3), transparent),
    radial-gradient(1px 1px at 88% 58%, rgba(240, 226, 196, 0.28), transparent);
  opacity: 0.55;
  animation: gate-dust 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.gate-stack {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(440px, 100%);
  animation: gate-shell-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gate-stack__lang {
  margin: 0;
  justify-self: center;
}

.gate-shell {
  position: relative;
  width: 100%;
  padding: clamp(28px, 5vw, 40px) clamp(22px, 4vw, 36px) 28px;
  border: 1px solid rgba(196, 165, 116, 0.38);
  background:
    linear-gradient(165deg, rgba(28, 24, 18, 0.92), rgba(10, 12, 11, 0.94)),
    rgba(8, 9, 8, 0.9);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 240, 210, 0.08),
    inset 0 0 0 1px rgba(196, 165, 116, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gate-shell__brand {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
  text-align: center;
}

.gate-shell__mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  line-height: 0.95;
  color: #f4ead4;
  text-shadow: 0 0 40px rgba(196, 165, 116, 0.35);
}

.gate-shell__line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(196, 165, 116, 0.85);
}

.gate-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  background: rgba(0, 0, 0, 0.28);
}

.gate-mode__btn {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: rgba(210, 196, 170, 0.55);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.gate-mode__btn.is-active {
  color: #f4ead4;
  background: linear-gradient(180deg, rgba(196, 165, 116, 0.28), rgba(120, 90, 45, 0.28));
  box-shadow: inset 0 0 0 1px rgba(196, 165, 116, 0.35);
}

.gate-shell__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  color: #f0e2c4;
}

.gate-shell__lead {
  margin: 0 0 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

.gate-shell--totem {
  width: min(1120px, 96vw);
}

.gate-stack--totem {
  width: min(1120px, 96vw);
}

body.is-gate [data-view='totem'] .gate-stage {
  min-height: auto;
  padding: 18px 0 28px;
  overflow: visible;
}

.wizard-steps,
.wizard-steps__item {
  display: none !important;
}

.totem-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: stretch;
  margin: 0 0 12px;
  min-height: min(58dvh, 560px);
}

.totem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin: 0;
  max-height: min(58dvh, 560px);
  overflow: auto;
  padding: 4px 4px 8px 0;
  -webkit-overflow-scrolling: touch;
  align-content: start;
}

.totem-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  background:
    linear-gradient(165deg, rgba(28, 24, 18, 0.92), rgba(10, 12, 11, 0.94)),
    rgba(8, 9, 8, 0.9);
  min-height: 0;
  overflow: hidden;
}

.totem-panel__empty {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: rgba(210, 196, 170, 0.55);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
}

.totem-panel__empty[hidden],
.totem-panel__body[hidden] {
  display: none !important;
}

.totem-panel__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.totem-panel__img {
  width: min(168px, 42%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.totem-panel__name {
  margin: 0;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #f4ead4;
  text-align: center;
}

.totem-panel__text {
  margin: 0;
  flex: 0 1 auto;
  color: rgba(232, 220, 200, 0.9);
  font-size: 1.02rem;
  line-height: 1.65;
  text-align: center;
  max-width: 34em;
}

.totem-panel .gate-submit {
  margin-top: auto;
  flex: 0 0 auto;
  width: 100%;
}

.totem-panel .gate-error {
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .totem-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .totem-grid {
    max-height: min(38dvh, 320px);
    order: 1;
  }

  .totem-panel {
    order: 2;
    position: sticky;
    bottom: 0;
    z-index: 2;
    max-height: none;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.35);
  }

  .totem-panel__img {
    width: 96px;
  }

  .totem-panel__name {
    font-size: 1.45rem;
  }

  .totem-panel__text {
    font-size: 0.9rem;
  }
}

.totem-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 12px 14px;
  border: 1px solid rgba(196, 165, 116, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(232, 220, 200, 0.78);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.totem-card img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.totem-card span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
}

.totem-card:hover {
  border-color: rgba(232, 210, 150, 0.55);
  background: rgba(196, 165, 116, 0.1);
}

.totem-card.is-selected {
  border-color: rgba(232, 210, 150, 0.85);
  background: rgba(196, 165, 116, 0.18);
  color: #f4ead4;
  transform: translateY(-1px);
}

.gate-shell--onboard {
  position: relative;
  width: min(1080px, 96vw);
  padding-top: clamp(28px, 4vw, 36px);
}

.gate-shell__step {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(196, 165, 116, 0.35);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 210, 150, 0.9);
  line-height: 1;
}

body.is-gate [data-view='onboard'] .gate-stage {
  min-height: auto;
  padding: 18px 0 28px;
  overflow: visible;
}

body.is-gate [data-view='onboard'] .gate-stack {
  width: min(1080px, 96vw);
}

.gate-shell__brand--compact {
  margin-bottom: 14px;
}

.gate-shell__brand--compact .gate-shell__mark {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.gate-form--onboard {
  gap: 18px;
}

.gate-group {
  margin: 0;
  padding: 14px 14px 12px;
  border: 1px solid rgba(196, 165, 116, 0.22);
  background: rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 12px;
  min-width: 0;
}

.gate-group__legend {
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196, 165, 116, 0.9);
}

.gate-form--onboard .gate-field input {
  padding: 12px 12px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 0;
  background: rgba(8, 10, 9, 0.55);
  min-height: 46px;
}

.gate-form--onboard .gate-field input:focus {
  border-color: rgba(232, 210, 150, 0.7);
  box-shadow: 0 0 0 1px rgba(196, 165, 116, 0.35);
}

.gate-form--onboard .gate-field input::placeholder {
  color: rgba(210, 196, 170, 0.35);
}

.gate-field.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.gate-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: rgba(232, 220, 200, 0.78);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.gate-check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #c4a574;
  flex-shrink: 0;
}

.gate-hint {
  margin: 0;
  color: rgba(210, 196, 170, 0.55);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.gate-shell--onboard .mp-place-ac__list {
  background: #161410;
  border-color: rgba(196, 165, 116, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.gate-shell--onboard .mp-place-ac__item {
  color: #f0e2c4;
  border-bottom-color: rgba(196, 165, 116, 0.14);
}

.gate-shell--onboard .mp-place-ac__item:hover,
.gate-shell--onboard .mp-place-ac__item.is-active {
  background: rgba(196, 165, 116, 0.18);
}

.gate-form {
  display: grid;
  gap: 16px;
}

.gate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gate-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.gate-group--left,
.gate-group--place {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  height: 100%;
  box-sizing: border-box;
}

.gate-field--place {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.gate-field--place input {
  height: auto !important;
  min-height: 46px !important;
}

.gate-group--place .gate-hint {
  flex: 0 0 auto;
}

.gate-group--place .city-chips {
  flex: 1 1 auto;
  align-content: flex-start;
  min-height: 0;
}

@media (max-width: 560px) {
  .gate-duo {
    grid-template-columns: 1fr;
  }

  .gate-group--left,
  .gate-group--place {
    height: auto;
  }
}

.gate-split-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(196, 165, 116, 0.22);
  background: rgba(0, 0, 0, 0.18);
}

.gate-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.gate-split--pair {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px 14px;
  align-items: stretch;
}

.gate-split__date {
  grid-column: 1;
  grid-row: 1;
}

.gate-split__time {
  grid-column: 1;
  grid-row: 2;
}

.gate-split__place {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  height: 100%;
}

.gate-split__place input {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch;
}

@media (max-width: 560px) {
  .gate-split,
  .gate-split--pair {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .gate-split__date,
  .gate-split__time,
  .gate-split__place {
    grid-column: 1;
    grid-row: auto;
  }

  .gate-split__place input {
    min-height: 46px !important;
    height: auto !important;
  }
}

.gate-field--grow {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.gate-field--grow input {
  min-height: 96px !important;
  height: 100%;
}

.city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.city-chips__btn {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(196, 165, 116, 0.3);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(240, 226, 196, 0.88);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.city-chips__btn:hover,
.city-chips__btn.is-active {
  border-color: rgba(232, 210, 150, 0.7);
  background: rgba(196, 165, 116, 0.16);
  color: #f4ead4;
}

.gate-stack-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .gate-row {
    grid-template-columns: 1fr;
  }
}

.gate-field {
  display: grid;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(210, 196, 170, 0.62);
}

.gate-field input[type='date'],
.gate-field input[type='time'] {
  color-scheme: dark;
}

.gate-field input {
  width: 100%;
  padding: 14px 4px 12px;
  border: 0;
  border-bottom: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 0;
  background: transparent;
  color: #f4ead4;
  font-family: var(--font-body);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: none;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.gate-field input:focus {
  border-bottom-color: rgba(232, 210, 150, 0.85);
  box-shadow: 0 1px 0 rgba(196, 165, 116, 0.55);
}

.gate-field input::placeholder {
  color: transparent;
}

.gate-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 164, 0.35);
  background: rgba(80, 30, 24, 0.35);
  color: #f0cfc6;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gate-submit {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  min-height: 52px;
  border: 1px solid rgba(220, 190, 130, 0.55);
  background:
    linear-gradient(180deg, rgba(214, 180, 110, 0.38), rgba(90, 68, 36, 0.55)),
    #1a1510;
  color: #fff6e4;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    filter 0.2s ease;
}

.gate-submit:hover {
  border-color: rgba(240, 215, 160, 0.8);
  filter: brightness(1.06);
}

.gate-submit:active {
  transform: translateY(1px);
}

.gate-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gate-submit__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 35%,
    rgba(255, 245, 220, 0.18) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  animation: gate-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.gate-shell__foot {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(210, 196, 170, 0.42);
}

@keyframes gate-shell-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gate-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes gate-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gate-dust {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }
  to {
    opacity: 0.65;
    transform: translateY(-6px);
  }
}

@keyframes gate-shine {
  0%,
  55% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-stage__glow,
  .gate-stage__ring,
  .gate-stage__dust,
  .gate-shell,
  .gate-submit__shine {
    animation: none !important;
  }
}

@media (max-width: 520px) {
  .gate-stage {
    min-height: min(78dvh, 700px);
    padding: 8px 0;
  }

  .gate-shell {
    padding: 26px 18px 22px;
  }

  .gate-shell__mark {
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }

  .gate-mode__btn {
    letter-spacing: 0.1em;
    font-size: 0.64rem;
  }
}

.hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(196, 165, 116, 0.4);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

.hub-btn--primary {
  background: linear-gradient(180deg, rgba(196, 165, 116, 0.28), rgba(90, 70, 40, 0.35));
  border-color: rgba(196, 165, 116, 0.55);
  color: #f4ead4;
}

.hub-btn--ghost {
  background: transparent;
}

.hub-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.sign-out {
  display: block;
  margin: 16px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.sign-out--inline {
  margin: 0 0 0 8px;
  padding: 6px 10px;
  border: 1px solid rgba(196, 165, 116, 0.35);
}

.profile-card__meta {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}

.profile-card__meta div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 10px;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px solid rgba(196, 165, 116, 0.12);
}

.profile-card__meta dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.profile-card__meta dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.notice {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 12px 12px 10px;
  border: 1px solid rgba(196, 165, 116, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.notice p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.notice__mark {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(210, 196, 170, 0.45);
}

.notice--ok .notice__mark {
  background: #c4a574;
}

.notice--advice .notice__mark {
  background: #9bb7c9;
}

.notice--soft .notice__mark {
  background: rgba(240, 180, 164, 0.75);
}

@media (max-width: 860px) {
  .hub--home {
    grid-template-columns: 1fr;
  }
}


.gate-dev-token {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(196, 165, 116, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: #e8dcc0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.4;
}
