:root {
  --bg: #020203;
  --ink: #06070a;
  --ink-2: #0a0c11;
  --ink-3: #10131a;
  --line: #20242d;
  --line-2: #343a46;
  --text: #f5f6f8;
  --muted: #8f97a6;
  --dim: #5d6572;
  --white: #ffffff;
  --cyan: #ff6575;
  --violet: #f5f6f8;
  --green: #f5f6f8;
  --red: #ff6575;
  --shadow: rgba(0, 0, 0, 0.48);
  --font: "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.075), transparent 28rem),
    #050506;
  font-family: var(--font);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 24%, black 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 52%, transparent 0%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.login-body {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.075), transparent 28rem),
    #050506;
}

.login-body::before {
  content: "";
}

button,
input {
  font: inherit;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.85rem;
  overflow: hidden;
  background: transparent;
  pointer-events: auto;
  --loader-dur: 320ms;
  --loader-ease: cubic-bezier(.22, 1, .36, 1);
}

.page-loader::before {
  content: "";
  position: fixed;
  top: -60vmax;
  right: -60vmax;
  width: 120vmax;
  height: 120vmax;
  border-radius: 50%;
  background: #050506;
  transform: scale(2.5);
  transform-origin: center;
  transition: transform var(--loader-dur) var(--loader-ease);
  will-change: transform;
}

.page-loader > span,
.page-loader > p {
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: opacity 180ms ease;
}

.page-loader > p {
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

/* hiding: circle shrinks toward top-right corner, text fades */
.page-loader.is-hiding::before { transform: scale(0); }
.page-loader.is-hiding > span,
.page-loader.is-hiding > p { opacity: 0; }
.page-loader.is-hiding > p { transform: translateY(-0.35rem); }

/* fully hidden (post-anim): no transition, just snap invisible */
.page-loader.hidden {
  visibility: hidden;
  pointer-events: none;
}
.page-loader.hidden::before { transform: scale(0); transition: none; }
.page-loader.hidden > span,
.page-loader.hidden > p { opacity: 0; transition: none; }
.page-loader.hidden > p { transform: translateY(-0.35rem); }

/* entering: initial frame (scale 0, opacity 0) committed without animating */
.page-loader.entering::before { transform: scale(0); transition: none; }
.page-loader.entering > span,
.page-loader.entering > p { opacity: 0; transition: none; }
.page-loader.entering > p { transform: translateY(0.35rem); }

/* entering.is-active: circle expands, text fades in slightly behind */
.page-loader.entering.is-active::before {
  transform: scale(2.5);
  transition: transform var(--loader-dur) var(--loader-ease);
}
.page-loader.entering.is-active > span,
.page-loader.entering.is-active > p {
  opacity: 1;
  transition: opacity 200ms ease 120ms;
}
.page-loader.entering.is-active > p {
  transform: translateY(0);
  transition: opacity 200ms ease 120ms, transform 200ms ease 120ms;
}

.page-loader span {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-2);
  border-right-color: var(--white);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
  will-change: transform;
}

.page-loader p,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0.75rem;
  gap: 0.75rem;
}

.sidebar,
.hero-console,
.tab-panel:not([data-panel="overview"]),
.metric,
.settings-grid > div,
.login-panel,
.dashboard-hero,
.claim-panel,
.public-page,
.profile-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018));
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0.75rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 1.5rem);
  border-radius: 1rem;
  padding: 0.85rem;
  background-color: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.4rem;
  border-radius: 0.8rem;
  padding: 0.35rem;
}

.brand span:last-child {
  display: grid;
  gap: 0.08rem;
}

.brand small {
  color: var(--dim);
  font-size: 0.78rem;
}

.brand-mark,
.login-mark {
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--bg);
  font-weight: 900;
}

.brand-mark {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.75rem;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.4rem;
  min-height: 0;
}

.nav-section {
  display: grid;
  gap: 0.35rem;
}

.nav-bottom {
  margin-top: auto;
}

.nav-title {
  margin: 0 0 0.35rem;
  padding: 0 0.55rem;
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.9rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0 0.8rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.logout-link:hover,
.logout-link:focus-visible {
  border-color: rgba(255, 101, 117, 0.38);
  background: rgba(255, 101, 117, 0.1);
  color: var(--red);
}

.nav-link:active,
button:active,
.auth-button:active {
  transform: translateY(1px);
}

.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.35rem rgba(255, 255, 255, 0.08), 0 0 1.25rem rgba(255, 255, 255, 0.5);
}

.workspace {
  width: 100%;
  margin: 0;
  padding: 0 clamp(0.25rem, 1.4vw, 1rem) 1.5rem;
}

.topbar,
.panel-head,
.profile-card,
.token-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar {
  width: 100%;
  min-height: 5.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.menu-toggle,
.menu-backdrop {
  display: none;
}

.menu-toggle {
  flex: 0 0 auto;
  width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.menu-toggle svg {
  width: 1.3rem;
  height: 1.3rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.profile-card {
  min-width: 13rem;
  min-height: 3.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  white-space: nowrap;
  justify-content: flex-start;
}

.profile-card img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  object-fit: cover;
  background: var(--ink-3);
}

.profile-card div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.profile-card strong,
.profile-card span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card strong {
  max-width: 13rem;
  font-size: 0.9rem;
}

.profile-card span {
  color: var(--muted);
  font-size: 0.74rem;
}

button,
.auth-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.8rem;
  background: var(--white);
  color: var(--bg);
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease, background 160ms ease;
}

button {
  min-height: 2.65rem;
  padding: 0 1rem;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.icon-button {
  width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tab-panel {
  display: none;
  animation: panelIn 220ms ease both;
}

.tab-panel.active {
  display: block;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.hero-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1rem;
  min-height: 25rem;
  align-items: end;
  overflow: hidden;
  margin-top: 0.9rem;
  border-radius: 1rem;
  padding: clamp(1rem, 4vw, 2rem);
  background-color: rgba(8, 10, 14, 0.76);
}

.dashboard-hero {
  display: flex;
  align-items: end;
  min-height: 14rem;
  margin-top: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: clamp(1rem, 4vw, 2rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 14, 0.76);
}

.dashboard-hero > div {
  max-width: 52rem;
}

.page-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.85fr);
  gap: 0.9rem;
  margin-top: 1rem;
}

.page-card,
.page-stats,
.page-controls {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  background: rgba(8, 10, 14, 0.72);
}

.page-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.page-shot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 1rem;
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.18);
}

.page-shot .brand-mark {
  flex: 0 0 auto;
}

.page-shot strong,
.page-shot small {
  display: block;
}

.page-shot strong {
  font-size: 0.98rem;
}

.page-shot small {
  color: var(--muted);
}

.page-stats {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1rem;
}

.page-stats > div {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.8rem;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.page-stats span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.page-stats strong {
  font-size: 1rem;
}

.page-controls {
  display: grid;
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 1rem;
}

.link-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.link-preview input {
  font-size: 0.88rem;
}

.link-preview button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.link-preview button svg {
  width: 1rem;
  height: 1rem;
}

.hero-console::before {
  content: "";
  position: absolute;
  inset: auto -6rem -8rem auto;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: inset 0 0 4rem rgba(255, 101, 117, 0.12), 0 0 4rem rgba(255, 101, 117, 0.08);
}

.hero-console > * {
  position: relative;
}

.terminal-lines {
  display: grid;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.32);
}

.terminal-lines span {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.terminal-lines span::before {
  content: ">";
  margin-right: 0.5rem;
  color: var(--cyan);
}

.metric-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-grid {
  margin-top: 0.75rem;
  max-width: 72rem;
}

.metric,
.settings-grid > div {
  min-height: 9.25rem;
  border-radius: 1rem;
  padding: 1rem;
  background-color: rgba(8, 10, 14, 0.72);
}

.metric span,
.pill {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong,
.settings-grid strong {
  display: block;
  margin: 0.65rem 0;
  font-size: 1.24rem;
}

.metric p,
.settings-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.52;
}

.tab-panel:not([data-panel="overview"]) {
  margin-top: 0.9rem;
  border-radius: 1rem;
  padding: 1rem;
  background-color: rgba(8, 10, 14, 0.72);
}

.claim-panel {
  max-width: 72rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)),
    rgba(8, 10, 14, 0.72);
}

.claim-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.path-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.28);
}

.path-input > span {
  padding-left: 0.9rem;
  color: var(--muted);
}

.path-input input {
  border: 0;
  background: transparent;
}

.claimed-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.claimed-link span {
  min-height: 2.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  padding: 0.82rem 0.9rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-panel[data-panel="recovery"] {
  max-width: 62rem;
}

.panel-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pill {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.token-box {
  margin-top: 1rem;
}

input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  padding: 0 0.9rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  outline: none;
}

input:focus {
  border-color: rgba(255, 255, 255, 0.38);
}

.event-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.event-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  padding: 0 0.9rem;
  background: rgba(0, 0, 0, 0.18);
}

.event-list span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cyan);
}

.event-list p,
.event-list time {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  min-width: min(22rem, calc(100vw - 2rem));
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--white);
  color: var(--bg);
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--red);
  color: var(--white);
}

.login-body {
  display: grid;
  place-items: center;
  padding: clamp(0.9rem, 4vw, 2rem);
}

.public-body {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.public-page {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  width: min(100%, 28rem);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 14, 0.76);
  text-align: center;
}

.public-page h1 {
  margin: 0;
}

.public-page p {
  margin: 0;
  color: var(--muted);
}

.login-shell {
  width: min(100%, 25.5rem);
  min-width: 0;
}

.login-panel {
  position: relative;
  display: grid;
  gap: 1.05rem;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
  padding: 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(6, 7, 10, 0.92);
  box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  text-align: left;
}

.login-mark {
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.55rem;
  box-shadow: none;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.25rem);
  line-height: 1;
}

.login-brand p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.auth-button {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  min-height: 3.05rem;
  border-radius: 0.6rem;
  padding: 0 0.8rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.auth-button svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.auth-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-button.discord {
  border-color: rgba(255, 255, 255, 0.35);
}

.auth-button.telegram {
  border-color: rgba(255, 101, 117, 0.35);
}

.recovery-form {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding-top: 0.1rem;
  border-top: 0;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.recovery-form label > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.form-result {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
}

.form-result.error {
  color: var(--red);
}

@media (max-width: 860px) {
  body.menu-open {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 0.6rem;
  }

  .hero-console {
    grid-template-columns: 1fr;
  }

  .page-workbench,
  .claim-form,
  .link-preview {
    grid-template-columns: 1fr;
  }

  .page-workbench {
    display: grid;
  }

  .sidebar {
    position: fixed;
    top: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
    z-index: 60;
    width: min(18.5rem, calc(100vw - 1.2rem));
    height: auto;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    width: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.menu-open .menu-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: flex;
    flex-direction: column;
    margin-top: 0.9rem;
  }

  .topbar {
    min-height: 4.8rem;
    align-items: center;
    gap: 0.65rem;
  }

  .topbar-title {
    flex: 1 1 auto;
    min-height: 3.2rem;
  }

  .panel-head,
  .token-box,
  .claim-form,
  .claimed-link {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .profile-card {
    flex: 0 1 11.5rem;
    min-width: 0;
    padding-right: 0.55rem;
  }

  .profile-card strong {
    max-width: 7rem;
  }

  .metric-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  button,
  .auth-button {
    width: 100%;
  }

  .menu-backdrop {
    width: auto;
  }

  .menu-toggle {
    width: 2.75rem;
  }
}

@media (max-width: 420px) {
  .login-body {
    padding: 0.7rem;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 0.9rem;
  }

  .page-loader p {
    font-size: 0.9rem;
  }
}
