.ui-icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.danger-solid {
  background: var(--down-text);
  border-color: var(--down-text);
  color: var(--on-accent);
}

.btn.danger-solid:hover {
  filter: brightness(0.94);
}

/* Hero */

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto 1fr;
  grid-template-areas:
    "avatar name actions"
    "avatar user actions"
    "avatar badges badges"
    "avatar meta meta"
    "avatar . .";
  align-items: start;
  gap: 0 24px;
  padding: 24px;
  background:
    radial-gradient(80% 160% at 100% 0%, var(--accent-weak), transparent 62%),
    var(--surface);
}

.ph-avatar {
  --ph-size: 120px;
  grid-area: avatar;
  align-self: start;
  width: var(--ph-size);
  height: var(--ph-size);
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(165deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 72%, var(--border-strong)));
  box-shadow: inset 0 0 0 1px var(--border);
}

.ph-avatar .gicon {
  --icon-size: var(--ph-size) !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ph-avatar-skeleton {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.ph-main {
  display: contents;
}

.ph-name {
  grid-area: name;
  align-self: end;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.ph-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-name .verified {
  width: 22px;
  height: 22px;
}

.ph-user {
  grid-area: user;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14.5px;
}

.ph-badges {
  grid-area: badges;
  margin-top: 12px;
}

.ph-badges:empty {
  display: none;
}

.ph-badge-row {
  gap: 6px;
}

.ph-meta {
  grid-area: meta;
  min-width: 0;
  margin-top: 12px;
  overflow: hidden;
}

.ph-meta-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 2px;
  margin-left: -17px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ph-meta-list > span {
  position: relative;
  padding-left: 17px;
  white-space: nowrap;
}

.ph-meta-list > span::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--faint);
}

.ph-actions {
  grid-area: actions;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.profile-hero.is-skeleton .ph-main {
  grid-area: 1 / 2 / 6 / 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

/* Popovers */

.popover-wrap {
  position: relative;
}

.popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 14px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
}

.popover[hidden] {
  display: none;
}

.give-pop {
  width: 380px;
  max-height: min(640px, calc(100vh - var(--header-h) - 48px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -4px -8px 10px 0;
}

.pop-title {
  font-size: 14.5px;
}

.pop-close {
  width: 32px;
  height: 32px;
}

.pop-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
}

.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.setting-text {
  min-width: 0;
}

.setting-label {
  font-size: 13.5px;
  font-weight: 500;
}

.setting-hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 24px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color .2s;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform .2s var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--accent);
}

.switch[aria-checked="true"] .switch-thumb {
  transform: translateX(16px);
}

.switch[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

/* Custom badges popover */

.give-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.give-empty {
  padding: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.give-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.give-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.give-item + .give-item {
  border-top: 1px solid var(--border);
}

.give-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.give-name,
.give-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.give-name {
  font-size: 13.5px;
  font-weight: 500;
}

.give-desc {
  color: var(--muted);
  font-size: 12px;
}

.give-toggle {
  min-width: 72px;
}

.give-toggle[aria-disabled="true"],
.give-delete[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.give-toggle.is-given {
  border-color: transparent;
  background: var(--up-weak);
  color: var(--up-text);
}

.give-delete {
  width: 32px;
  height: 32px;
  color: var(--faint);
}

.give-delete:hover {
  background: var(--down-weak);
  color: var(--down-text);
}

.give-create {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.give-create-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 2px;
  border-radius: 6px;
  color: var(--accent-text);
  font-size: 13.5px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.give-create-summary::-webkit-details-marker {
  display: none;
}

.give-create[open] .give-create-summary .ui-icon {
  transform: rotate(45deg);
}

.give-create-summary .ui-icon {
  transition: transform .2s var(--ease);
}

.create-badge {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.create-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.create-preview-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.create-preview-name,
.create-preview-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-preview-name {
  font-size: 13.5px;
  font-weight: 600;
}

.create-preview-desc {
  color: var(--muted);
  font-size: 12.5px;
}

.pick-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pick-group legend {
  margin-bottom: 6px;
  padding: 0;
}

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

.pick-icon,
.pick-color {
  position: relative;
  display: grid;
  place-items: center;
}

.pick-icon input,
.pick-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pick-box {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 42px;
  aspect-ratio: 1;
  border: 1.5px solid transparent;
  border-radius: 11px;
  transition: background-color .12s, border-color .12s;
}

.pick-art {
  display: block;
  -webkit-user-drag: none;
}

.pick-icon:hover .pick-box {
  background: var(--surface-2);
}

.pick-icon input:checked + .pick-box {
  border-color: var(--accent);
  background: var(--accent-weak);
}

.pick-icon input:focus-visible + .pick-box,
.pick-color input:focus-visible + .pick-swatch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pick-colors {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
}

.pick-color {
  height: 34px;
}

.pick-swatch {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  transition: box-shadow .12s;
}

.pick-color input:checked + .pick-swatch {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.pick-icon.is-taken,
.pick-color.is-taken {
  opacity: 0.3;
}

.pick-icon.is-taken input,
.pick-color.is-taken input {
  cursor: not-allowed;
}

.pick-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pick-hint[hidden] {
  display: none;
}

.create-actions {
  display: flex;
  justify-content: flex-end;
}

.give-pop .create-actions {
  position: sticky;
  bottom: -16px;
  z-index: 1;
  margin: 0 -16px -16px;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Hidden banner */

[data-part="banner"]:empty {
  display: none;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.profile-banner > .ui-icon {
  color: var(--warn);
}

.profile-banner-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-banner-text strong {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

/* KPIs and chart */

.profile-kpis {
  margin-top: 16px;
}

.kpis.profile-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profile-kpis .kpi-sub a {
  min-width: 0;
  color: var(--muted);
}

.profile-kpis .kpi-sub a:hover {
  color: var(--text);
}

.profile-chart-card {
  margin-top: 16px;
}

.profile-chart-head {
  flex-wrap: wrap;
  row-gap: 10px;
}

.pch-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-chart-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-legend {
  margin-top: 12px;
}

.profile-legend[hidden] {
  display: none;
}

.profile-legend .legend-item {
  min-width: 0;
  max-width: 100%;
}

.legend-name {
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-value {
  flex-shrink: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Games and studios */

.profile-games,
.profile-studios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-game,
.profile-studio {
  display: flex;
  min-width: 0;
}

.profile-games:not(.is-expanded) .profile-game.is-extra {
  display: none;
}

.game-card,
.studio-mini {
  flex: 1;
  min-width: 0;
  color: var(--text);
  transition: border-color .15s, box-shadow .2s var(--ease);
}

a.game-card:hover,
a.studio-mini:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.gc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gc-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gc-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-by {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.gc-now {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.gc-players {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  min-width: 0;
}

.gc-ccu {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.gc-ccu-label {
  color: var(--muted);
  font-size: 12.5px;
}

.gc-players .delta {
  font-size: 12.5px;
}

.gc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.profile-more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.studio-mini {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 40px 14px 14px;
}

.sm-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sm-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.sm-role {
  color: var(--muted);
  font-size: 12.5px;
}

.sm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.sm-stats b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sm-open {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--faint);
}

a.studio-mini:hover .sm-open {
  color: var(--muted);
}

/* Badges, activity, about */

.profile-duo {
  display: grid;
  align-items: start;
  gap: var(--gap);
  margin-top: 28px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-card-empty {
  padding: 18px 4px 6px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.activity-item + .activity-item::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 15.5px;
  width: 1px;
  height: 14px;
  background: var(--border-strong);
}

.activity-text {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-text a {
  color: var(--text);
  font-weight: 500;
}

.activity-time {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.about-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.about-text.is-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.about-toggle {
  margin: 8px 0 0 -11px;
}

.about-toggle[hidden] {
  display: none;
}

/* Messages and empty states */

.profile-message,
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.profile-message {
  max-width: 560px;
  margin: 32px auto 0;
  padding: 36px 28px;
}

.profile-empty {
  margin-top: 16px;
  padding: 36px 20px;
}

.profile-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 15px;
  background: var(--accent-weak);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-mark.is-busy .ui-icon {
  animation: profile-spin 1s linear infinite;
}

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

.profile-message-title {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.profile-empty-title {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.profile-message-text,
.profile-empty-text {
  max-width: 48ch;
  color: var(--muted);
  font-size: 14px;
}

.profile-message-actions {
  justify-content: center;
  margin-top: 10px;
}

/* Your account */

.profile-account {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.profile-account-note {
  color: var(--faint-text);
  font-size: 12.5px;
}

[data-part="suggestions"]:not(:empty) {
  margin-bottom: var(--gap);
}

.account-suggestions.studios-suggest {
  margin-bottom: 0;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.account-card {
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.account-card:focus {
  outline: none;
}

.account-card .card-head {
  margin-bottom: 10px;
}

.account-card.is-highlight {
  animation: settings-flash 1.8s var(--ease);
}

@keyframes settings-flash {
  0%, 35% { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-weak); }
  100% { box-shadow: 0 0 0 1px transparent, 0 0 0 5px transparent; }
}

.account-text {
  color: var(--muted);
  font-size: 13.5px;
}

.account-actions {
  margin-top: auto;
  padding-top: 14px;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--down) 26%, var(--border));
}

.danger-zone.is-highlight {
  animation-name: danger-flash;
}

@keyframes danger-flash {
  0%, 35% { box-shadow: 0 0 0 1px var(--down), 0 0 0 5px var(--down-weak); }
  100% { box-shadow: 0 0 0 1px transparent, 0 0 0 5px transparent; }
}

[data-part="admin-users"]:not(:empty) {
  margin-top: var(--gap);
}

.admin-users .card-title:focus {
  outline: none;
}

.admin-users-help {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.admin-users-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
}

.table-scroll {
  position: relative;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 18px;
  vertical-align: middle;
}

.admin-table tbody tr + tr td {
  border-top: 1px solid var(--border);
}

.admin-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.au-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  color: var(--text);
}

.au-player:hover {
  text-decoration: none;
}

.au-player:hover .au-name .truncate {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.au-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.au-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 500;
}

.au-user {
  color: var(--muted);
  font-size: 12.5px;
}

.au-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.au-role {
  white-space: nowrap;
}

.au-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.au-note {
  color: var(--faint-text);
  font-size: 12.5px;
}

[data-role-change][aria-disabled="true"],
[data-remove-user][aria-disabled="true"] {
  pointer-events: none;
}

[data-role-change][aria-disabled="true"]:not(.is-busy),
[data-remove-user][aria-disabled="true"]:not(.is-busy) {
  opacity: 0.55;
}

/* Site roles (also used by the account menu) */

.role-chip {
  height: 20px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 600;
}

.role-chip.is-owner {
  border-color: transparent;
  background: color-mix(in srgb, var(--badge-gold) 14%, transparent);
  color: color-mix(in srgb, var(--badge-gold) 55%, var(--text));
}

.role-chip.is-admin {
  border-color: transparent;
  background: var(--accent-weak);
  color: var(--accent-text);
}

.role-chip.am-role {
  flex-shrink: 0;
  height: 18px;
  margin-left: 2px;
  padding: 0 6px;
  font-size: 11px;
}

/* Confirm dialog */

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(8, 8, 10, 0.5);
}

.confirm-body {
  padding: 22px;
}

.confirm-title {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.confirm-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.confirm-list {
  margin-top: 14px;
}

.confirm-list-title {
  font-size: 13.5px;
  font-weight: 600;
}

.confirm-list ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.confirm-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Responsive */

@media (min-width: 960px) {
  .profile-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-duo.is-badges {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .profile-duo.is-single,
  .profile-duo.is-badges:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1099.98px) {
  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto 1fr;
    grid-template-areas:
      "avatar name"
      "avatar user"
      "avatar badges"
      "avatar meta"
      "avatar actions"
      "avatar .";
  }

  .ph-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .profile-hero.is-skeleton .ph-main {
    grid-area: 1 / 2 / 7 / 3;
  }

  .kpis.profile-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 959.98px) {
  .profile-games,
  .profile-studios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719.98px) {
  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
      "avatar name"
      "avatar user"
      "badges badges"
      "meta meta"
      "actions actions";
    gap: 0 14px;
    padding: 18px 16px;
  }

  .ph-avatar {
    --ph-size: 76px;
    align-self: center;
    border-radius: 16px;
  }

  .profile-hero.is-skeleton .ph-main {
    grid-area: 1 / 2 / 3 / 3;
  }

  .ph-name {
    margin-top: 0;
    font-size: 23px;
  }

  .ph-name .verified {
    width: 19px;
    height: 19px;
  }

  .ph-user {
    align-self: start;
    font-size: 14px;
  }

  .ph-badges {
    margin-top: 14px;
  }

  .ph-badge-row {
    gap: 5px;
  }

  .ph-badge-row .badge-tile,
  .ph-badge-row .badge-more {
    --badge-size: 28px !important;
  }

  .ph-actions {
    margin-top: 16px;
  }

  .ph-actions > .btn,
  .ph-actions > .popover-wrap {
    flex: 1 1 calc(50% - 4px);
  }

  .ph-actions > .popover-wrap > .btn {
    width: 100%;
  }

  .popover,
  .give-pop {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 60;
    width: auto;
    max-width: none;
    max-height: min(78vh, calc(100vh - 24px));
    max-height: min(78dvh, calc(100dvh - 24px));
    overflow-y: auto;
    box-shadow: var(--shadow), 0 0 0 100vmax rgb(0 0 0 / 0.4);
  }

  .kpis.profile-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-kpis .kpi {
    padding-right: 12px;
    padding-left: 12px;
  }

  .profile-kpis .kpi-label {
    font-size: 12px;
  }

  .profile-chart-controls {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .profile-chart-controls .tab {
    padding: 0 10px;
  }

  .profile-games,
  .profile-studios,
  .account-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-banner-text {
    flex-basis: calc(100% - 30px);
  }

  .profile-banner .btn {
    margin-left: 30px;
  }

  .profile-message {
    margin-top: 12px;
    padding: 28px 18px;
  }

  .profile-account .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .admin-table th,
  .admin-table td {
    padding-right: 12px;
    padding-left: 14px;
  }

  .admin-users-help {
    padding-right: 14px;
    padding-left: 14px;
  }
}
