@layer bilgiIslands {
  html body #rtProfileBackdrop.au-centre-backdrop {
    padding-bottom: var(--dm-profile-dock-space, calc(102px + env(safe-area-inset-bottom, 0px))) !important;
  }

  html body #rtProfileBackdrop.au-centre-backdrop.pa-cards-backdrop {
    position: fixed !important;
  }

  html body #rtProfileBackdrop.au-centre-backdrop.pa-cards-backdrop,
  html body #rtProfileBackdrop .rt-profile.au-centre.pa-cards {
    --centre-paper: #fff;
    --centre-line: #bdc0ca;
    --pa-lip: #e5e5eb;
    --pa-ink: #191629;
    --pa-icon-ink: #374054;
    --pa-icon-muted: #868c9a;
    --pa-soft: #e5effa;
    --pa-coral: #c82b41;
    background: var(--centre-paper) !important;
  }

  html[data-dm-theme="night"] body #rtProfileBackdrop.pa-cards-backdrop,
  html[data-dm-theme="night"] body #rtProfileBackdrop .rt-profile.au-centre.pa-cards {
    --centre-paper: #20283c;
    --centre-line: #67718a;
    --pa-lip: #131b2d;
    --pa-ink: #f3f3fc;
    --pa-icon-ink: #daddec;
    --pa-icon-muted: #a9adc0;
    --pa-soft: #35475e;
    --pa-coral: #ff8491;
  }

  html body #rtProfileBackdrop .rt-profile.au-centre.pa-cards {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: clamp(6px, 1.25dvh, 12px) !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 4px !important;
    color: var(--pa-ink);
  }

  #rtProfileBackdrop .pa-cards,
  #rtProfileBackdrop .pa-cards * {
    box-sizing: border-box;
  }

  #rtProfileBackdrop .pa-cards :is(.pa-hero, .pa-body) {
    width: 100%;
    max-width: 620px;
    min-width: 0;
  }

  html body #rtProfileBackdrop .pa-cards .pa-hero {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(4px, 1.6vw, 12px) !important;
    align-items: center;
    flex: none;
  }

  #rtProfileBackdrop .pa-hero-papi {
    display: block;
    width: clamp(33px, 10vw, 62px);
  }

  #rtProfileBackdrop .pa-hero-papi svg {
    display: block;
    width: 100%;
    overflow: hidden;
  }

  #rtProfileBackdrop .pa-wordmark {
    display: block;
    color: var(--pa-coral);
    font: 850 clamp(11px, 3vw, 16px)/1.2 Nunito, system-ui, sans-serif;
  }

  html body #rtProfileBackdrop .pa-cards .pa-hero h2 {
    margin: 0 !important;
    color: var(--pa-ink) !important;
    -webkit-text-fill-color: var(--pa-ink) !important;
    font: 950 clamp(15px, 4.65vw, 31px)/1.1 Nunito, system-ui, sans-serif !important;
  }

  #rtProfileBackdrop .pa-toolbar {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.4vw, 8px);
  }

  html body #rtProfileBackdrop .pa-cards .pa-toolbar :is(.rt-close, .dm-theme-toggle),
  #rtProfileBackdrop .pa-cards .pa-edit {
    display: grid !important;
    place-items: center;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: none;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--centre-line) !important;
    border-radius: 13px !important;
    background: var(--centre-paper) !important;
    box-shadow: 0 2px 0 var(--pa-lip) !important;
    color: var(--pa-ink) !important;
    -webkit-text-fill-color: var(--pa-ink) !important;
  }

  #rtProfileBackdrop .pa-cards .pa-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(7px, 1dvh, 11px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 2px 4px;
  }

  #rtProfileBackdrop .pa-cards .pa-body > * { flex-shrink: 0; }

  #rtProfileBackdrop .pa-cards > .pa-support-row {
    width: 100%;
    max-width: 620px;
    padding: 0 2px 4px;
    flex: 0 0 auto;
  }

  /* Native iOS already reserves the status bar using an inline border. */
  html.dm-native-ios body #rtProfileBackdrop .rt-profile.au-centre.pa-cards[data-dm-ios-safe] {
    padding-top: 8px !important;
  }

  #rtProfileBackdrop .pa-cards :is(.pa-user, .pa-grid, .dm-profile-shop-row) {
    margin: 0 !important;
  }

  #rtProfileBackdrop .pa-cards .pa-user {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 2px 8px 3px;
    min-width: 0;
    text-align: center;
  }
  #rtProfileBackdrop .pa-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 3vw, 20px);
  }
  #rtProfileBackdrop .pa-avatar-frame {
    position: relative;
    width: clamp(68px, 11.4dvh, 125px);
    aspect-ratio: 1;
    padding: 4px;
    border: 2px solid #e5ab3e;
    border-radius: 50%;
    background: #ffdf95;
    box-shadow: 0 2px 0 #b88125;
  }
  #rtProfileBackdrop .pa-cards .pa-avatar {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 2px solid var(--centre-paper);
    border-radius: 50%;
    background: #dce9fa;
  }
  #rtProfileBackdrop .pa-avatar :is(svg, img) { width: 100%; height: 100%; object-fit: contain; }
  html body #rtProfileBackdrop .pa-cards .pa-avatar-frame .pa-edit {
    position: absolute !important;
    inset: auto -6px -3px auto !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    font-size: 18px;
  }
  #rtProfileBackdrop .pa-laurel {
    color: #d3a24b;
    width: clamp(29px, 5dvh, 55px);
    flex: none;
  }
  #rtProfileBackdrop .pa-laurel svg { display: block; width: 100%; }
  #rtProfileBackdrop .pa-laurel-right { transform: scaleX(-1); }
  #rtProfileBackdrop .pa-user-copy { width: 100%; min-width: 0; }
  #rtProfileBackdrop .pa-name-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }
  #rtProfileBackdrop .pa-name-row strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--pa-ink);
    font: 850 clamp(19px, 5.3vw, 29px)/1.12 Nunito, system-ui, sans-serif;
  }
  #rtProfileBackdrop .pa-level {
    border-radius: 999px;
    padding: 2px 12px;
    background: #fff0cc;
    color: #553b1a;
    font: 800 clamp(11px, 3.1vw, 15px)/1.25 Nunito, system-ui, sans-serif;
  }
  #rtProfileBackdrop .pa-level span { color: #b77b08; }
  #rtProfileBackdrop .pa-xp-row {
    margin-top: 5px;
    color: var(--pa-ink);
    font: 850 clamp(13px, 3.9vw, 19px)/1.2 Nunito, system-ui, sans-serif;
  }
  #rtProfileBackdrop .pa-xp-track {
    position: relative;
    width: 100%;
    height: clamp(11px, 1.8dvh, 18px);
    margin: 7px auto 0;
    border-radius: 999px;
    background: var(--pa-lip);
    box-shadow: inset 0 1px 2px #1a21301c;
    overflow: hidden;
  }
  #rtProfileBackdrop .pa-xp-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--pa-progress, 0%);
    overflow: hidden;
    border-radius: inherit;
    background: linear-gradient(180deg,#fff0a9 0%,#ffc95a 20%,#e29517 62%,#ffcb5d 100%);
    box-shadow: inset 0 1px 1px #fff8d2, inset 0 -1px 2px #a45e1590;
  }
  #rtProfileBackdrop .pa-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(6px, 1.05dvh, 10px);
  }
  #rtProfileBackdrop .dm-profile-shop-row {
    display: grid;
    gap: clamp(6px, 1.05dvh, 10px);
  }

  html body #rtProfileBackdrop .pa-cards :is(.pa-grid, .dm-profile-shop-row)>button {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(6px, 2vw, 13px) !important;
    min-width: 0;
    height: auto !important;
    min-height: clamp(40px, 6.2dvh, 56px) !important;
    margin: 0 !important;
    padding: 4px clamp(8px, 2.2vw, 14px) !important;
    border: 1px solid var(--centre-line) !important;
    border-radius: 14px !important;
    background: var(--centre-paper) !important;
    box-shadow: 0 2px 0 var(--pa-lip) !important;
    color: var(--pa-ink) !important;
    -webkit-text-fill-color: var(--pa-ink) !important;
    font: 800 clamp(12px, 3.6vw, 16.5px)/1.14 Nunito, system-ui, sans-serif !important;
    text-align: start !important;
    white-space: normal !important;
    cursor: pointer;
  }

  html body #rtProfileBackdrop .pa-cards .dm-profile-shop-row>button {
    min-height: clamp(38px, 5.4dvh, 47px) !important;
  }

  html body #rtProfileBackdrop .pa-cards .dm-profile-shop-row>button:disabled,
  html body #rtProfileBackdrop .pa-cards .dm-profile-shop-row>button[aria-disabled="true"] {
    opacity: .46 !important;
    filter: grayscale(.85);
    cursor: not-allowed !important;
    box-shadow: none !important;
  }

  html body #rtProfileBackdrop .pa-cards :is(.pa-grid, .dm-profile-shop-row)>button b {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    font: inherit !important;
    overflow-wrap: anywhere;
  }

  #rtProfileBackdrop .pa-card-icon {
    width: clamp(24px, 4.1dvh, 34px);
    height: clamp(24px, 4.1dvh, 34px);
    flex: none;
    display: block;
  }

  #rtProfileBackdrop .dm-profile-shop-row .pa-card-icon { width: clamp(22px, 3.3dvh, 27px); height: clamp(22px, 3.3dvh, 27px); }

  #rtProfileBackdrop .dm-profile-shop-row em {
    display: block !important;
    margin-inline-start: auto !important;
    font-size: 24px;
    font-style: normal;
    line-height: 1;
    width: auto;
    height: auto;
    flex: none;
    background: none;
    color: var(--pa-icon-ink);
    -webkit-text-fill-color: currentColor;
  }

  html body #rtProfileBackdrop .pa-cards .pa-grid>button {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 6px 3px !important;
    min-height: clamp(62px, 9dvh, 92px) !important;
    text-align: center !important;
    font: 800 clamp(10px, 2.8vw, 15px)/1.15 Nunito, system-ui, sans-serif !important;
  }
  #rtProfileBackdrop .pa-grid .pa-card-icon {
    width: clamp(25px, 4.5dvh, 42px);
    height: clamp(25px, 4.5dvh, 42px);
    filter: drop-shadow(0 1px 1px #26364a18);
  }
  html body #rtProfileBackdrop .pa-cards .dm-profile-shop-row>[data-profile="shop"] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(#f35b68, #c72d45) !important;
    border-color: #ba2940 !important;
    box-shadow: inset 0 1px 0 #ffb6bb, 0 2px 0 #a21e34 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  #rtProfileBackdrop .dm-profile-shop-row [data-profile="shop"] em { color: #fff; }
  #rtProfileBackdrop .pa-xp-fill::after,
  #rtProfileBackdrop .dm-profile-shop-row [data-profile="shop"]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg,transparent 39%,#fff9 47%,#fff2 57%,transparent 65%);
    transform: translateX(-110%);
    animation: dm-profile-light 4s ease-in-out infinite;
  }
  #rtProfileBackdrop .dm-profile-shop-row [data-profile="shop"]::after {
    background: linear-gradient(115deg,transparent 39%,#fff4 48%,#fff1 57%,transparent 65%);
    animation-delay: 1.1s;
  }
  @keyframes dm-profile-light {
    0%, 55% { transform: translateX(-110%); }
    85%, 100% { transform: translateX(110%); }
  }
  @media (prefers-reduced-motion: reduce) {
    #rtProfileBackdrop .pa-xp-fill::after,
    #rtProfileBackdrop .dm-profile-shop-row [data-profile="shop"]::after { animation: none; }
  }
  #rtProfileBackdrop .pa-cards button:focus-visible { outline: 2px solid var(--pa-coral); outline-offset: -3px; }
}
