.profile-page .main-scroll.profile-main {
  padding: 0 16px calc(76px + var(--safe-bottom));
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.profile-hero {
  position: relative;
  flex-shrink: 0;
  padding-bottom: 8px;
}

.profile-hero__banner {
  height: 148px;
  overflow: hidden;
  background: var(--wallpaper) center top / cover no-repeat;
}

.profile-hero__banner img {
  display: none;
}

.profile-hero__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

.profile-hero__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.profile-hero__logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, #0f9d58, #0b6b3f);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(15, 157, 88, 0.35);
  border: 3px solid var(--bg-card);
}

.profile-identity h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.2;
}

.profile-identity__sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-card {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 4px 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2ef;
}

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

.profile-row__label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.profile-row__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.profile-account-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--green-dark);
}

.profile-row__inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-copy {
  width: 40px;
  height: 40px;
  border: 1px solid #dce5e0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--green-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.profile-copy--sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
}

.profile-copy:hover {
  border-color: var(--green);
  background: rgba(15, 157, 88, 0.08);
}

.profile-copy.is-copied {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.profile-section {
  margin-bottom: 16px;
}

.profile-section__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.profile-section__sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.profile-support-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  position: relative;
  transition: border-color 0.15s, transform 0.1s;
}

.profile-support-card:hover {
  border-color: rgba(15, 157, 88, 0.45);
}

.profile-support-card:active {
  transform: scale(0.99);
}

.profile-support-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.profile-support-card__icon--chat {
  background: rgba(15, 157, 88, 0.12);
  color: var(--green-dark);
}

.profile-support-card__icon--tg {
  background: rgba(34, 158, 217, 0.12);
  color: #2298d9;
}

.profile-support-card__icon--wa {
  background: rgba(37, 211, 102, 0.12);
  color: #1da851;
}

.profile-support-card__text {
  flex: 1;
  min-width: 0;
}

.profile-support-card__text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.profile-support-card__text small {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-support-card__arrow {
  color: var(--text-muted);
  font-size: 16px;
}

.profile-badge {
  position: absolute;
  top: 10px;
  right: 36px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-aff-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 10px;
}

/* Live chat — fullscreen overlay */
html.profile-chat-open,
html.profile-chat-open body {
  overflow: hidden;
}

html.profile-chat-open .bottom-nav {
  display: none;
}

.profile-chat {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass-strong);
}

.profile-chat.hidden {
  display: none;
}

.profile-chat__sheet {
  flex: 1;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: profileChatIn 0.22s ease;
}

@keyframes profileChatIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-chat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  border-bottom: 1px solid #eef2ef;
  background: var(--bg-glass-strong);
}

.profile-chat__head strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.profile-chat__head p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.profile-chat__close {
  width: 36px;
  height: 36px;
  border: 1px solid #dce5e0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
}

.profile-chat__messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.profile-chat__empty {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin: auto 0;
  padding: 24px 12px;
}

.profile-chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.profile-chat-bubble time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.65;
}

.profile-chat-bubble--mine {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.profile-chat-bubble--theirs {
  align-self: flex-start;
  background: #eef2ef;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.profile-chat__composer {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid #eef2ef;
  background: var(--bg-glass-strong);
}

.profile-chat__composer input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #dce5e0;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
}

.profile-chat__composer input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.12);
}

.profile-chat__send {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-chat__send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.profile-card--push {
  margin-bottom: 16px;
  padding: 0;
  overflow: visible;
}

.profile-push-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.profile-push-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0f9d58, #0b6b3f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 157, 88, 0.28);
}

.profile-push-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-push-card__body strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.profile-push-card__body small {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.profile-push-card__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #eef2ef;
  color: var(--text-secondary);
}

.profile-push-card__badge.is-on {
  background: rgba(15, 157, 88, 0.14);
  color: var(--green-dark);
}

.profile-push-card__badge.is-off {
  background: #f4f5f4;
  color: var(--text-muted);
}

.profile-push-card__badge.is-denied {
  background: #fff3cd;
  color: #856404;
}

.profile-push-toggle {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #dce5e0;
  background: #e8eeea;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-push-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.profile-push-toggle.is-on {
  background: var(--green);
  border-color: #0b6b3f;
  box-shadow: 0 4px 12px rgba(15, 157, 88, 0.35);
}

.profile-push-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-push-toggle.is-on .profile-push-toggle__knob {
  transform: translateX(22px);
}

