/* Profile content flows from the balance down; spare viewport height never
   separates the balance from history. The native screen remains scrollable. */
#screen-profile > .profile-content {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(62px + var(--app-bottom-safe-area, 0px) + 16px);
}

#screen-profile > .profile-content > * { flex-shrink: 0; }

#screen-profile .profile-card {
  height: 150px;
  gap: 10px;
  margin: 8px auto 0;
  padding-block: 14px;
}

#screen-profile .profile-history {
  flex: 0 0 auto;
  gap: 12px;
  margin: 24px auto 0;
}

#screen-profile .profile-history__card {
  min-height: 116px;
  height: 116px;
  gap: 8px;
  padding-block: 10px;
}

#screen-profile .empty-sticker { width: 64px; height: 64px; }

#screen-profile .profile-history__empty-title {
  height: auto;
  font-size: 14px;
  line-height: 20px;
}

#screen-profile .profile-link-group {
  width: calc(100% - 2 * var(--app-inline-gutter));
  margin: 28px auto 0;
}

#screen-profile .profile-link-group__title {
  margin: 0 12px 6px;
  color: var(--color-secondary, #A4ABB7);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

#screen-profile .profile-link-group__rows {
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-surface, #25282E);
}

#screen-profile .profile-link-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  color: #E0E5EC;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

#screen-profile .profile-link-row + .profile-link-row::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 50px;
  height: 1px;
  background: rgb(255 255 255 / 6%);
  content: '';
}

#screen-profile .profile-link-row__icon {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #33373E;
  color: #B4BBC6;
}

#screen-profile .profile-link-row__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-profile .profile-link-row__icon--support,
#screen-profile .profile-link-row__icon--news { background: transparent; }
#screen-profile .profile-link-row__icon--support img,
#screen-profile .profile-link-row__icon--news img { display: block; width: 28px; height: 28px; object-fit: contain; }

#screen-profile .profile-link-row__label { flex: 1; min-width: 0; }

#screen-profile .profile-link-row__chevron {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: #858D9A;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-profile .profile-link-row:active { background: rgb(255 255 255 / 5%); }
#screen-profile .profile-link-row:focus-visible { outline: 2px solid #48AEF2; outline-offset: -2px; border-radius: 10px; }

@media (hover: hover) {
  #screen-profile .profile-link-row:hover { background: rgb(255 255 255 / 3%); }
}

/* Mirror the same profile geometry while owner-bound content is loading. */
.screen-loading__shell:has(> .screen-loading__profile) {
  padding-bottom: calc(62px + var(--app-bottom-safe-area, 0px) + 16px);
}

.screen-loading__profile { max-width: none; margin-top: 8px; }
.screen-loading__profile .screen-loading__balance-panel { height: 150px; padding-block: 14px; }
.screen-loading__profile .screen-loading__balance-button { margin-top: 10px; }
.screen-loading__profile .screen-loading__history { margin-top: 24px; }
.screen-loading__profile .screen-loading__history-panel { height: 116px; }
.screen-loading__profile .screen-loading__empty-artwork { width: 64px; height: 64px; }
.screen-loading__profile .screen-loading__line--empty-title { height: 20px; }
.screen-loading__profile .screen-loading__line--empty-description { display: none; }
.screen-loading__profile .screen-loading__profile-links { margin-top: 28px; }
.screen-loading__profile .screen-loading__line--profile-group-title { width: 84px; height: 18px; margin: 0 12px 6px; }
.screen-loading__profile .screen-loading__profile-link-rows { border-radius: 16px; }

.screen-loading__profile .screen-loading__profile-link-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 12px;
}

.screen-loading__profile .screen-loading__profile-link-row + .screen-loading__profile-link-row::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 50px;
  height: 1px;
  background: rgb(255 255 255 / 6%);
  content: '';
}

.screen-loading__profile .screen-loading__profile-link-icon { flex: 0 0 28px; height: 28px; border-radius: 8px; background: #343840; }
.screen-loading__profile .screen-loading__line--profile-link-label { flex: 1; max-width: 70%; height: 12px; }
.screen-loading__profile .screen-loading__profile-link-chevron { width: 6px; height: 10px; margin-left: auto; border-radius: 2px; background: #343840; }
.screen-loading__profile .screen-loading__history-operation-rows { box-sizing: border-box; min-height: 116px; padding: 2px 12px; }
.screen-loading__profile .screen-loading__history-operation-rows:has(> .screen-loading__history-operation:only-child) { min-height: 60px; }
.screen-loading__profile .screen-loading__history-operation { display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 56px; padding: 8px 0; }
.screen-loading__profile .screen-loading__history-operation-media { flex: 0 0 40px; height: 40px; border-radius: 10px; background: #343840; }
.screen-loading__profile .screen-loading__history-operation-copy { flex: 1; min-width: 0; }
.screen-loading__profile .screen-loading__line--history-operation-title { width: 80%; height: 12px; }
.screen-loading__profile .screen-loading__line--history-operation-date { width: 64%; height: 10px; margin-top: 6px; }
.screen-loading__profile .screen-loading__line--history-operation-amount { flex: 0 0 60px; height: 12px; }
.screen-loading__profile .screen-loading__history-more { display: block; height: 36px; }

.screen-loading__profile .screen-loading__history-operation--grouped { display: block; padding: 0; }
.screen-loading__profile .screen-loading__history-operation-games { display: grid; }
.screen-loading__profile .screen-loading__history-operation-game { display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 56px; padding: 8px 0; }
