.profile-page {
  --profile-gold: #c8a96b;
  --profile-gold-bright: #ead39b;
  --profile-line: rgba(200, 169, 107, 0.25);
  --profile-line-soft: rgba(255, 255, 255, 0.09);
  --profile-surface: rgba(10, 11, 12, 0.88);
  --profile-surface-strong: rgba(8, 9, 10, 0.96);
  --profile-muted: rgba(232, 232, 228, 0.58);
  --profile-positive: #7ecb91;
  min-width: 320px;
  background: #090a0b;
}

.profile-page [hidden] {
  display: none !important;
}

.profile-page-bg {
  position: fixed;
}

.profile-page-bg .aern-page-bg-img {
  height: 100%;
  object-position: center center;
  filter: saturate(0.7) brightness(0.72) contrast(1.08);
}

.profile-page-bg .aern-page-bg-overlay {
  background:
    linear-gradient(180deg, rgba(5, 7, 9, 0.32), rgba(8, 9, 10, 0.68) 58%, rgba(9, 10, 11, 0.82) 100%),
    linear-gradient(90deg, rgba(4, 5, 6, 0.55), transparent 35%, transparent 70%, rgba(4, 5, 6, 0.45));
}

.profile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  border-bottom: 1px solid rgba(200, 169, 107, 0.2);
  background: rgba(6, 7, 8, 0.94);
  backdrop-filter: blur(14px);
}

.profile-header-inner {
  width: min(1440px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}

.profile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display, sans-serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.profile-brand img,
.profile-header-avatar img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}

.profile-site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-site-nav a {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-family: var(--font-display, sans-serif);
  font-size: 0.83rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 160ms ease, background-color 160ms ease;
}

.profile-site-nav a:hover,
.profile-site-nav a:focus-visible {
  color: var(--profile-gold-bright);
  background: rgba(200, 169, 107, 0.06);
}

.profile-account-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.profile-header-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.profile-header-avatar img {
  width: 100%;
  height: 100%;
}

.profile-header-name {
  max-width: 150px;
  overflow: hidden;
  color: #f4f2ec;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-logout {
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-left: 1px solid var(--profile-line-soft);
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.profile-logout:hover,
.profile-logout:focus-visible {
  color: #fff;
}

.profile-main {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 40px));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 34px 0 56px;
  box-sizing: border-box;
}

.profile-state-card {
  width: min(480px, 100%);
  margin: 12vh auto 0;
  padding: 36px;
  box-sizing: border-box;
  border: 1px solid var(--profile-line);
  border-radius: 4px;
  background: rgba(8, 9, 10, 0.94);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.profile-state-card img {
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.44));
}

.profile-state-card h1 {
  margin: 16px 0 4px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.profile-state-card p {
  margin: 0 0 22px;
  color: var(--profile-muted);
}

.profile-loader {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border: 2px solid rgba(200, 169, 107, 0.2);
  border-top-color: var(--profile-gold);
  border-radius: 50%;
  animation: profile-spin 800ms linear infinite;
}

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

.profile-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.profile-sidebar,
.profile-surface {
  border: 1px solid var(--profile-line-soft);
  border-radius: 4px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent 40%),
    var(--profile-surface);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.3);
}

.profile-sidebar {
  position: sticky;
  top: 84px;
  overflow: hidden;
}

.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 282px;
  padding: 28px 20px 20px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--profile-line-soft);
  background: radial-gradient(circle at 50% 22%, rgba(200, 169, 107, 0.08), transparent 50%);
}

.profile-crest {
  position: relative;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.profile-crest img {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.52));
}

.profile-identity > strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--profile-gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity > span:not(.profile-online) {
  margin-top: 2px;
  color: var(--profile-muted);
  font-size: 0.72rem;
}

.profile-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--profile-positive);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-online i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px rgba(126, 203, 145, 0.5);
}

.profile-tabs {
  display: grid;
  padding: 10px 0;
}

.profile-tab {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  transition: color 160ms ease, background-color 160ms ease;
}

.profile-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
}

.profile-tab > span {
  width: 20px;
  color: var(--profile-gold);
  font-size: 1rem;
  text-align: center;
}

.profile-tab:hover,
.profile-tab:focus-visible,
.profile-tab.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(200, 169, 107, 0.13), rgba(200, 169, 107, 0.02));
}

.profile-tab.is-active::before {
  background: var(--profile-gold);
}

.profile-admin-link {
  margin-top: 4px;
  border-top: 1px solid var(--profile-line-soft);
  color: var(--profile-gold-bright);
  text-decoration: none;
}

.profile-admin-link:hover,
.profile-admin-link:focus-visible {
  color: #fff;
}

.profile-content,
.profile-panel {
  min-width: 0;
}

.profile-titlebar {
  min-height: 118px;
  padding: 4px 2px 18px;
  box-sizing: border-box;
}

.profile-titlebar p {
  margin: 0 0 4px;
  color: var(--profile-gold);
  font-family: var(--font-display, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-titlebar h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

.profile-titlebar > span {
  display: block;
  margin-top: 4px;
  color: var(--profile-muted);
  font-size: 0.83rem;
}

.profile-titlebar-compact {
  min-height: 124px;
  padding-top: 16px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.profile-stat {
  min-height: 82px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  box-sizing: border-box;
  border: 1px solid var(--profile-line-soft);
  border-radius: 4px;
  background: rgba(8, 9, 10, 0.86);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.23);
}

.profile-stat.is-highlighted {
  border-color: rgba(200, 169, 107, 0.5);
}

.profile-stat-mark,
.profile-binding-mark {
  display: grid;
  place-items: center;
  color: var(--profile-gold);
  border: 1px solid rgba(200, 169, 107, 0.32);
  background: rgba(200, 169, 107, 0.05);
}

.profile-stat-mark {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.profile-stat div {
  min-width: 0;
}

.profile-stat small,
.profile-status-row small {
  display: block;
  color: var(--profile-muted);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-stat strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #f1eee7;
  font-size: 0.8rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(209, 154, 64, 0.38);
  background: rgba(132, 89, 20, 0.15);
  color: #e9c77d;
  font-size: 0.82rem;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.9fr);
  gap: 14px;
}

.profile-surface {
  padding: 22px;
  box-sizing: border-box;
}

.profile-surface h2 {
  margin: 0 0 16px;
  color: #f6f3ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  font-weight: 400;
  letter-spacing: 0;
}

.profile-data-list {
  margin: 0 0 20px;
}

.profile-data-list > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.profile-data-list dt {
  color: var(--profile-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.profile-data-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.8rem;
}

.profile-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  box-sizing: border-box;
  border: 1px solid rgba(200, 169, 107, 0.48);
  border-radius: 2px;
  background: rgba(200, 169, 107, 0.05);
  color: var(--profile-gold-bright);
  cursor: pointer;
  font-family: var(--font-display, sans-serif);
  font-size: 0.77rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.profile-action:hover,
.profile-action:focus-visible {
  border-color: var(--profile-gold-bright);
  background: rgba(200, 169, 107, 0.13);
  color: #fff;
}

.profile-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.profile-action-primary {
  background: #d8c39a;
  color: #15120d;
}

.profile-action-primary:hover,
.profile-action-primary:focus-visible {
  background: #efe0bc;
  color: #0d0b08;
}

.profile-action-danger {
  border-color: rgba(213, 98, 89, 0.52);
  color: #efa39d;
}

.profile-security-card {
  position: relative;
  min-height: 276px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  overflow: hidden;
}

.profile-security-copy {
  position: relative;
  z-index: 2;
}

.profile-security-copy > strong {
  display: block;
  max-width: 220px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.35;
}

.profile-security-copy p {
  max-width: 235px;
  margin: 12px 0 22px;
  color: var(--profile-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.profile-security-emblem {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 210px;
  height: 210px;
  opacity: 0.16;
  filter: grayscale(1) contrast(1.2);
}

.profile-security-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-activity-preview {
  margin-top: 14px;
}

.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.profile-section-heading h2 {
  margin-bottom: 0;
}

.profile-section-heading button,
.profile-text-link {
  padding: 4px;
  border: 0;
  background: none;
  color: var(--profile-gold);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-section-heading button:hover,
.profile-section-heading button:focus-visible,
.profile-text-link:hover,
.profile-text-link:focus-visible {
  color: #fff;
}

.profile-activity-list {
  display: grid;
}

.profile-activity-list-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-activity-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.065);
}

.profile-activity-item:first-child {
  border-left: 0;
}

.profile-activity-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 169, 107, 0.3);
  color: var(--profile-gold);
  font-size: 0.75rem;
}

.profile-activity-item strong,
.profile-activity-item time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-activity-item strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 500;
}

.profile-activity-item time {
  margin-top: 2px;
  color: var(--profile-muted);
  font-size: 0.62rem;
}

.profile-security-grid,
.profile-settings-grid,
.profile-bindings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-security-status {
  align-self: start;
}

.profile-status-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.profile-status-row:last-child {
  border-bottom: 0;
}

.profile-status-row strong {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 500;
}

.profile-status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(219, 161, 66, 0.35);
  color: #dca859;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-status-badge.is-ok {
  border-color: rgba(126, 203, 145, 0.34);
  color: var(--profile-positive);
}

.profile-security-actions > section > p,
.profile-password-card p,
.profile-binding-card p,
.profile-muted {
  margin: -6px 0 18px;
  color: var(--profile-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.profile-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.profile-field > span:first-child,
.profile-theme-fieldset legend {
  color: var(--profile-muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.profile-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  outline: 0;
  background: rgba(3, 4, 5, 0.72);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
}

.profile-field input:focus {
  border-color: rgba(200, 169, 107, 0.65);
  box-shadow: 0 0 0 2px rgba(200, 169, 107, 0.08);
}

.profile-totp-setup {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--profile-line-soft);
}

.profile-totp-qr {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--profile-line-soft);
  background: rgba(0, 0, 0, 0.2);
}

.profile-totp-qr img {
  display: block;
  width: 168px;
  height: 168px;
  padding: 8px;
  border: 1px solid rgba(200, 169, 107, 0.42);
  background: #fff;
  image-rendering: pixelated;
}

.profile-totp-qr p {
  margin: 0;
  color: var(--profile-muted);
  line-height: 1.55;
}

@media (max-width: 560px) {
  .profile-totp-qr {
    grid-template-columns: 1fr;
  }

  .profile-totp-qr img {
    justify-self: center;
  }
}

.profile-copy-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.profile-copy-row code {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 4, 5, 0.72);
  color: #e7d5ad;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy-row button {
  padding: 0 12px;
  border: 1px solid rgba(200, 169, 107, 0.35);
  border-left: 0;
  background: rgba(200, 169, 107, 0.06);
  color: var(--profile-gold);
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
}

.profile-message {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  color: #e99b93;
  font-size: 0.76rem;
}

.profile-message.is-ok {
  color: var(--profile-positive);
}

.profile-password-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.profile-password-card h2,
.profile-password-card p {
  margin-bottom: 0;
}

.profile-theme-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-theme-fieldset legend {
  margin-bottom: 8px;
}

.profile-settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--profile-line-soft);
  background: rgba(5, 7, 9, 0.72);
}

.profile-settings-actions .profile-message {
  margin: 0;
}

.profile-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.profile-segmented button {
  min-height: 42px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 4, 5, 0.52);
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
}

.profile-segmented button:first-child {
  border-left: 0;
}

.profile-segmented button.is-active {
  background: rgba(200, 169, 107, 0.14);
  color: var(--profile-gold-bright);
}

.profile-binding-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
}

.profile-binding-card .profile-action {
  grid-column: 1 / -1;
  justify-self: start;
}

.profile-binding-mark {
  width: 56px;
  height: 56px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.profile-binding-card h2 {
  margin-bottom: 8px;
}

.profile-binding-card p {
  margin-bottom: 4px;
}

.profile-binding-card strong {
  color: var(--profile-gold-bright);
  font-size: 0.75rem;
  font-weight: 500;
}

.profile-activity-list-full .profile-activity-item {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 12px 4px;
  border-left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.profile-activity-list-full .profile-activity-item:last-child {
  border-bottom: 0;
}

.profile-activity-list-full .profile-activity-icon {
  width: 36px;
  height: 36px;
}

.profile-activity-list-full .profile-activity-item strong {
  font-size: 0.78rem;
}

.profile-activity-list-full .profile-activity-item time {
  text-align: right;
}

@media (max-width: 1120px) {
  .profile-header-inner,
  .profile-main {
    width: min(100% - 28px, 1120px);
  }

  .profile-header-inner {
    gap: 20px;
  }

  .profile-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .profile-stats,
  .profile-activity-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-activity-item:nth-child(3) {
    border-left: 0;
  }

  .profile-overview-grid {
    grid-template-columns: 1fr;
  }

  .profile-security-card {
    min-height: 230px;
  }
}

@media (max-width: 840px) {
  .profile-header-inner {
    grid-template-columns: auto 1fr;
  }

  .profile-site-nav {
    display: none;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }

  .profile-identity {
    min-height: 104px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    justify-items: start;
    align-content: center;
    column-gap: 14px;
    padding: 14px 16px;
  }

  .profile-crest {
    width: 68px;
    height: 68px;
    grid-row: 1 / 4;
    margin: 0;
  }

  .profile-crest img {
    width: 48px;
    height: 48px;
  }

  .profile-identity > strong {
    align-self: end;
    font-size: 1.08rem;
  }

  .profile-online {
    margin-top: 2px;
  }

  .profile-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0;
    scrollbar-width: thin;
  }

  .profile-tab {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 10px 15px;
    white-space: nowrap;
  }

  .profile-tab::before {
    top: auto;
    right: 0;
    width: auto;
    height: 2px;
  }

  .profile-titlebar,
  .profile-titlebar-compact {
    min-height: auto;
    padding: 8px 2px 18px;
  }

  .profile-security-grid,
  .profile-settings-grid,
  .profile-bindings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .profile-header-inner,
  .profile-main {
    width: min(100% - 20px, 600px);
  }

  .profile-header-inner {
    gap: 10px;
  }

  .profile-header-name,
  .profile-header-avatar {
    display: none !important;
  }

  .profile-main {
    padding-top: 18px;
  }

  .profile-titlebar h1 {
    font-size: 1.8rem;
  }

  .profile-stats {
    gap: 8px;
  }

  .profile-stat {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 74px;
    gap: 7px;
    padding: 10px;
  }

  .profile-stat-mark {
    width: 27px;
    height: 27px;
  }

  .profile-stat strong {
    font-size: 0.72rem;
  }

  .profile-surface {
    padding: 18px 15px;
  }

  .profile-security-card {
    grid-template-columns: minmax(0, 1fr) 80px;
  }

  .profile-security-emblem {
    right: -42px;
    width: 170px;
    height: 170px;
  }

  .profile-activity-list-compact {
    grid-template-columns: 1fr;
  }

  .profile-activity-item,
  .profile-activity-item:nth-child(3) {
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .profile-activity-item:last-child {
    border-bottom: 0;
  }

  .profile-password-card {
    grid-template-columns: 1fr;
  }

  .profile-password-card .profile-action {
    justify-self: start;
  }

  .profile-activity-list-full .profile-activity-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .profile-activity-list-full .profile-activity-item time {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 410px) {
  .profile-brand span {
    display: none;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-data-list > div {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .profile-security-card {
    grid-template-columns: 1fr;
  }

  .profile-copy-row {
    grid-template-columns: 1fr;
  }

  .profile-copy-row button {
    min-height: 36px;
    border-left: 1px solid rgba(200, 169, 107, 0.35);
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-loader {
    animation-duration: 1600ms;
  }
}
