#md-account-menu{position:fixed;z-index:22000;right:16px;top:60px;width:310px;max-height:calc(100dvh - 80px);overflow:auto;box-sizing:border-box;padding:12px;border:1px solid #ffffff15;border-radius:14px;background:#25262df5;color:#e8e8ec;box-shadow:0 16px 45px #0007;font:14px/1.5 sans-serif}
#md-account-menu[hidden],#md-account-sheet[hidden]{display:none!important}#md-account-menu>button{display:flex;align-items:center;gap:10px;width:100%;padding:11px 10px;border:0;border-radius:9px;background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}#md-account-menu>button:hover,#md-account-menu>button:focus-visible{background:#35363e}#md-account-menu>button i{width:22px;font-style:normal;color:#b9c5cf;font-size:19px;text-align:center}#md-account-menu>button span{flex:1}#md-account-menu>button b{color:#888;font-weight:400}#md-account-menu .md-account-identity{padding:10px 8px 16px;border-radius:0;border-bottom:1px solid #ffffff15;margin-bottom:8px}#md-account-menu .md-account-identity img{width:44px;height:44px;object-fit:cover;border-radius:50%}#md-account-menu .md-account-identity strong{display:block;overflow:hidden;text-overflow:ellipsis}#md-account-menu .md-account-identity small{display:block;margin-top:4px;font-size:11px;color:#a0a2ac}
#md-account-sheet{position:fixed;inset:0;z-index:24000;display:flex;align-items:center;justify-content:center;background:#000a;padding:18px;box-sizing:border-box;color:#eee;font:14px/1.6 sans-serif}#md-account-sheet>section{display:flex;flex-direction:column;width:min(780px,100%);max-height:90dvh;background:#1b1c22;border:1px solid #ffffff15;border-radius:16px;overflow:hidden}#md-account-sheet section>header{display:flex;align-items:center;justify-content:space-between;padding:17px 22px;border-bottom:1px solid #ffffff12;flex:none}#md-account-sheet h2{font-size:19px;margin:0}#md-account-sheet section>header button{padding:0 8px;background:none;border:0;color:inherit;font-size:26px;cursor:pointer}#md-account-sheet .md-account-body{padding:22px;overflow:auto;min-height:0}#md-account-sheet button{background:#2c2e37;color:#ddd;border:1px solid #ffffff15;border-radius:7px;padding:8px 13px;font:inherit;cursor:pointer}#md-account-sheet button:hover{background:#383b46}#md-account-sheet button:disabled{opacity:.5;cursor:default}#md-account-sheet [hidden]{display:none!important}#md-account-sheet .md-primary{background:#bfd8d1;color:#20332e}#md-account-sheet h3{font-size:16px;margin:20px 0 12px}#md-account-sheet small{font-size:12px;color:#aaa}#md-account-sheet .md-account-error,#md-account-sheet .md-im-error{color:#e8a3ad;font-size:13px;white-space:pre-wrap}.md-wallet-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.md-wallet-funds{display:flex;flex-direction:column;min-width:0;gap:12px}.md-wallet-balance{display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:116px;padding:18px;box-sizing:border-box;border:1px solid #ffffff12;border-radius:12px;background:#262c32}.md-wallet-balance>span{color:#bfc2ca;font-size:13px}.md-wallet-balance>strong{display:block;font-size:30px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.md-wallet-actions{display:flex;flex-wrap:wrap;gap:8px}.md-wallet-actions>button{flex:1 1 100%;width:100%}@media(max-width:767px){.md-wallet-summary{gap:10px}.md-wallet-balance{min-height:104px;padding:12px}.md-wallet-balance>strong{font-size:clamp(16px,4.8vw,26px)}#md-account-sheet .md-wallet-actions>button{width:100%;padding:8px 5px;font-size:12px}}.md-account-record{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 16px;padding:14px 0;border-bottom:1px solid #ffffff10}.md-account-record>strong{overflow-wrap:anywhere;font-weight:500}.md-account-record>small{grid-column:1/-1;overflow-wrap:anywhere}.md-account-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:16px 0}.md-account-plans>button{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:20px!important;text-align:left}.md-account-plans strong{font-size:16px}.md-account-plans span{color:#dfd1a5;font-size:21px}.md-account-settings{display:flex;flex-direction:column;gap:12px}.md-account-settings a{padding:9px 13px;border-radius:7px;color:#c3d9e6;text-decoration:none;border:1px solid #ffffff15}.md-author-message{display:block;margin:12px 0;padding:8px 20px;background:#30333e;color:#eee;border:1px solid #ffffff20;border-radius:20px;cursor:pointer}
.md-im-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px;min-height:440px}.md-im-layout>aside{display:flex;flex-direction:column;gap:10px;overflow:auto;max-height:65dvh}.md-im-conversations{display:flex;flex-direction:column;gap:8px}.md-im-conversation{display:flex;flex-direction:column;text-align:left;gap:3px;padding:12px!important}.md-im-conversation span{font-size:12px;color:#a9aab3;overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap}.md-im-main{display:flex;flex-direction:column;min-width:0;max-height:65dvh}.md-im-main>header{flex:none}.md-im-main>header h3{margin:0 0 12px!important}.md-im-history{flex:1;min-height:240px;overflow:auto;border:1px solid #ffffff15;border-radius:9px;padding:12px;display:flex;flex-direction:column;gap:12px}.md-im-history article{align-self:flex-start;max-width:90%;padding:9px 12px;border-radius:9px;background:#30313a}.md-im-history article.is-self{align-self:flex-end;background:#294339}.md-im-history p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.md-im-history small{display:block;font-size:10px!important;opacity:.7;margin-top:4px}.md-im-error{margin:7px 0}.md-im-main form{display:flex;gap:8px;align-items:stretch;margin-top:8px}.md-im-main textarea{resize:none;min-width:0;flex:1;height:64px;box-sizing:border-box;background:#111217;color:#eee;border:1px solid #ffffff25;border-radius:7px;padding:9px;font:14px/1.5 sans-serif}.md-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:767px){#md-account-sheet{padding:8px}#md-account-sheet>section{max-height:94dvh}#md-account-sheet .md-account-body{padding:15px}.md-im-layout{grid-template-columns:1fr;min-height:0}.md-im-layout>aside{max-height:160px}.md-im-main{min-height:360px;max-height:60dvh}.md-account-plans>button{padding:14px!important}}

.md-account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #ffffff15;
  border-radius: 10px;
  background: #ffffff05;
}
.md-account-details div { min-width: 0; overflow-wrap: anywhere; }
.md-account-details dt { margin-bottom: 4px; color: #a7a8b2; font-size: 12px; }
.md-account-details dd { margin: 0; color: #eee; }
.md-account-details-body:has(> .md-account-error) { margin-bottom: 16px; }
@media (min-width: 768px) {
  .md-account-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Desktop messages occupy their own column; mobile keeps its MD popup. */
#md-account-sheet.md-inbox > section { width: min(360px, 100%); background: #23242f; }
#md-account-sheet.md-inbox > section > header { padding: 10px 16px; }
#md-account-sheet.md-inbox h2 { font-size: 15px; }
#md-account-sheet.md-inbox .md-account-body { padding: 0; }
.md-inbox .md-im-layout { display: block; min-height: 0; }
.md-inbox .md-im-layout > aside { max-height: none; gap: 0; overflow: visible; }
.md-inbox-tools { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.md-inbox-tools input {
  min-width: 0;
  flex: 1;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: #41424e;
  color: #fff;
  font: inherit;
}
.md-inbox-tools input::placeholder { color: #d0d0d7; }
#md-account-sheet .md-inbox-tools button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
}
.md-inbox-status:not(:empty) { padding: 10px 14px; color: #b5b6c1; }
.md-inbox .md-im-conversations { gap: 0; padding: 0 10px 10px; }
#md-account-sheet.md-inbox .md-im-conversation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 8px 6px !important;
  border: 0;
  border-bottom: 1px solid #ffffff10;
  border-radius: 0;
  background: transparent;
}
#md-account-sheet.md-inbox .md-im-conversation:hover { background: #ffffff0a; }
.md-inbox .md-im-conversation img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.md-inbox-row { min-width: 0; }
.md-inbox-row > div { display: flex; align-items: baseline; gap: 8px; }
.md-inbox-row strong, .md-inbox-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-inbox-row span { display: block; padding-right: var(--md-unread-width, 0px); }
.md-inbox-row time { flex: none; margin-left: auto; font-size: 11px; color: #a3a4b2; }
#md-account-sheet.md-inbox .md-im-conversation small {
  position: absolute;
  right: 8px;
  bottom: 16px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #ff3d65;
  color: #fff;
  font: 600 11px/20px system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.md-inbox .md-im-main { min-height: 0; max-height: none; padding: 12px; }
.md-inbox .md-im-main > header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.md-inbox .md-im-main > header h3 { margin: 0 !important; overflow-wrap: anywhere; }
.md-inbox .md-im-history { min-height: 130px; max-height: min(48dvh, 470px); }
@media (min-width: 768px) {
  #md-account-sheet.md-inbox {
    inset: var(--md-topbar, 56px) 0 0 auto;
    width: clamp(280px, 23vw, 360px);
    padding: 0;
    align-items: flex-start;
    pointer-events: none;
    background: transparent;
  }
  #md-account-sheet.md-inbox > section[role] {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    max-height: 100%;
    pointer-events: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #md-account-sheet.md-inbox .md-account-body { flex: 1; min-height: 0; overscroll-behavior: contain; }
  #md-account-sheet.md-inbox .md-im-layout:has(> .md-im-main:not([hidden])) { height: 100%; }
  #md-account-sheet.md-inbox .md-im-main { height: 100%; box-sizing: border-box; }
  #md-account-sheet.md-inbox .md-im-history { flex: 1; min-height: 80px; max-height: none; }

  body:has(#md-account-sheet.md-inbox:not([hidden])) { --md-inbox-space: clamp(280px, 23vw, 360px); }
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-shell,
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-shell > .md-search-playback,
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-feature-layer { right: var(--md-inbox-space) !important; }
  body.md-app-ui:not(.md-shell-active):has(#md-account-sheet.md-inbox:not([hidden])) uni-page-wrapper {
    width: calc(100% - var(--md-sidebar, 160px) - var(--md-inbox-space)) !important;
  }
  body.md-native-player:not(.md-app-ui):has(#md-account-sheet.md-inbox:not([hidden])) uni-page-wrapper {
    width: calc(100% - var(--md-inbox-space)) !important;
  }
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-native-toolbar,
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-watch-header { right: calc(var(--md-inbox-space) + 12px) !important; }
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-native-actions { right: calc(var(--md-inbox-space) + 24px) !important; }
  body:has(#md-account-sheet.md-inbox:not([hidden])) #md-native-details {
    max-width: calc(100vw - var(--md-sidebar, 160px) - var(--md-inbox-space) - 100px) !important;
  }
}

.md-inbox .md-chat-avatar, .md-inbox .md-chat-peer-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none;
  background: #333542;
}
.md-inbox .md-im-history {
  display: flex; flex-direction: column; gap: 12px;
  background: transparent; border: 0; padding: 8px 0;
}
.md-inbox .md-im-history article {
  display: flex; align-self: flex-start; align-items: flex-start; gap: 8px;
  max-width: 88%; padding: 0; margin: 0; background: none;
}
.md-inbox .md-im-history article.is-self { align-self: flex-end; flex-direction: row-reverse; background: none; }
.md-inbox .md-chat-bubble { min-width: 0; background: #353645; border-radius: 12px; padding: 8px 10px; }
.md-inbox .is-self .md-chat-bubble { background: #493146; }
.md-inbox #md-im-send {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px;
  border-radius: 20px; background: #343542;
}
.md-inbox #md-im-send textarea { flex: 1; min-width: 0; min-height: 34px; background: transparent; border: 0; resize: vertical; }
.md-inbox .md-im-file-label { position: relative; display: grid; place-items: center; width: 28px; height: 32px; margin: 0; cursor: pointer; }
.md-inbox .md-im-file-label svg { width: 20px; height: 20px; }
.md-inbox .md-im-file { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.md-inbox .md-im-file-label:focus-within { outline: 2px solid #fff; border-radius: 4px; }
.md-inbox #md-im-send button { border: 0; padding: 0; min-width: 30px; width: 30px; height: 30px; border-radius: 50%; background: #983452; }

/* Conversation view: one contact header, grouped times and compact media bubbles. */
#md-account-sheet.md-chat-open > section { position: relative; }
#md-account-sheet.md-chat-open > section > header { min-height: 56px; box-sizing: border-box; }
#md-account-sheet.md-chat-open > section > header h2 { visibility: hidden; }
#md-account-sheet.md-chat-open .md-im-main { padding: 0 12px 12px; }
#md-account-sheet.md-chat-open .md-im-main > header {
  position: absolute; left: 0; top: 0; right: 52px; height: 55px;
  box-sizing: border-box; padding: 0 12px; margin: 0; gap: 8px; border: 0;
}
#md-account-sheet.md-chat-open .md-im-main > header h3 { font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#md-account-sheet.md-chat-open .md-im-main [data-inbox-back] { display: grid; place-items: center; flex: none; width: 28px; height: 32px; min-width: 0; padding: 0; border: 0; background: none; font-size: 26px; color: #b9bbc9; }
#md-account-sheet.md-chat-open .md-chat-peer-avatar { width: 28px; height: 28px; }
#md-account-sheet.md-chat-open .md-im-history { gap: 14px; padding: 16px 0; scrollbar-width: thin; scrollbar-color: #50515e transparent; }
#md-account-sheet.md-chat-open .md-im-history article { max-width: 94%; position: relative; outline: none; }
#md-account-sheet.md-chat-open .md-chat-avatar { width: 28px; height: 28px; }
#md-account-sheet.md-chat-open .md-chat-bubble { background: #393a46; padding: 9px 12px; border-radius: 12px; color: #eff0f4; font-size: 13px; line-height: 1.6; }
#md-account-sheet.md-chat-open .is-self .md-chat-bubble { background: #168beb; color: #fff; }
#md-account-sheet.md-chat-open article:focus-visible .md-chat-bubble,
#md-account-sheet.md-chat-open article.md-context-active .md-chat-bubble { outline: 1px solid #ffffff50; outline-offset: 2px; }
#md-account-sheet.md-chat-open .md-chat-timestamp { align-self: center; color: #9193a5; font-size: 11px; line-height: 20px; margin: 3px 0; }
#md-account-sheet.md-chat-open .md-chat-bubble:has(.md-chat-media-frame) { padding: 0; background: transparent; }
.md-chat-media-frame { position: relative; max-width: 164px; overflow: hidden; border-radius: 9px; background: #15161d; }
#md-account-sheet .md-chat-media-frame .md-im-media { display: block; width: auto; max-width: 100%; max-height: 218px; border-radius: 9px; object-fit: contain; }
#md-account-sheet .md-chat-media-frame .md-chat-media-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 9px; background: #0002; color: #fff; }
.md-chat-media-play svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 5px #0006); }
#md-account-sheet.md-chat-open #md-im-send { flex: none; margin-top: 8px; border-radius: 24px; padding: 4px 7px 4px 12px; }
#md-account-sheet.md-chat-open #md-im-send textarea { height: 40px; min-height: 40px; max-height: 100px; padding: 9px 0; resize: none; font-size: 13px; }
#md-account-sheet.md-chat-open #md-im-send button { background: #168beb; color: #fff; }
#md-account-sheet.md-chat-open .md-im-error:empty { margin: 0; }
@media (min-width:768px) {
  #md-account-sheet.md-inbox.md-chat-open > section > header { min-height:48px; padding:0 10px; }
  #md-account-sheet.md-inbox.md-chat-open > section > header > button { display:grid; place-items:center; width:32px; height:32px; padding:0; color:#b9bbc9; }
  #md-account-sheet.md-inbox.md-chat-open .md-account-body { overflow:hidden; }
  #md-account-sheet.md-inbox.md-chat-open .md-im-main { display:grid; grid-template-rows:minmax(0,1fr) auto auto auto; padding:0 12px 12px; }
  #md-account-sheet.md-chat-open .md-im-main > header { right:0; height:47px; padding:0 48px; pointer-events:none; }
  #md-account-sheet.md-chat-open .md-im-main > header h3 { flex:1; min-width:0; text-align:center; font-weight:500; }
  #md-account-sheet.md-chat-open .md-im-main [data-inbox-back] { position:absolute; left:10px; pointer-events:auto; }
  #md-account-sheet.md-chat-open .md-chat-peer-avatar { display:none; }
  #md-account-sheet.md-inbox.md-chat-open .md-im-history { min-height:0; }
  #md-account-sheet.md-chat-open #md-im-send { height:40px; box-sizing:border-box; gap:8px; background:#3b3c48; }
  #md-account-sheet.md-chat-open #md-im-send textarea { min-height:30px; height:30px; padding:5px 0; line-height:20px; }
  #md-account-sheet.md-chat-open #md-im-send button { flex:none; min-width:26px; width:26px; height:26px; font-size:18px; line-height:26px; }
}
#md-account-sheet .md-im-context-menu { position: fixed; top: 0; left: 0; z-index: 30; pointer-events: auto; width: 154px; padding: 6px; box-sizing: border-box; border: 1px solid #ffffff18; border-radius: 11px; background: #40414a; color: #f5f5f7; box-shadow: 0 8px 30px #0006; }
#md-account-sheet .md-im-context-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; text-align: left; }
#md-account-sheet .md-im-context-menu button:hover,
#md-account-sheet .md-im-context-menu button:focus-visible { background: #ffffff14; outline: none; }
.md-im-context-menu svg { flex: none; width: 18px; height: 18px; }

/* Message reply, selection and recipient confirmation remain inside the chat column. */
#md-account-sheet .md-chat-reply-preview { display:flex; align-items:center; gap:8px; border-left:3px solid #168beb; border-radius:5px; padding:8px 10px; margin-top:8px; background:#ffffff0b; color:#bfc3cf; font-size:12px; }
#md-account-sheet .md-chat-reply-preview span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#md-account-sheet .md-chat-reply-preview button { background:transparent; border:0; padding:0; font-size:20px; }
#md-account-sheet .md-chat-selection { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:5px; padding:8px 0; font-size:12px; }
#md-account-sheet .md-chat-selection button { padding:6px 10px; background:#ffffff0b; border:1px solid #ffffff18; border-radius:8px; }
#md-account-sheet .md-chat-selecting article { cursor:pointer; border-radius:8px; padding:5px; }
#md-account-sheet .md-chat-selecting article.md-chat-selected { background:#168beb20; }
#md-account-sheet .md-chat-selecting article .md-chat-check { flex:none; width:18px; height:18px; min-height:0; margin:5px 2px; padding:0; accent-color:#168beb; }
#md-account-sheet .md-chat-selecting article video,#md-account-sheet .md-chat-selecting article .md-chat-media-play { pointer-events:none; }
#md-account-sheet .md-chat-action-dialog { position:absolute; z-index:40; top:60px; right:10px; bottom:16px; width:calc(100% - 20px); max-width:340px; max-height:480px; box-sizing:border-box; display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid #ffffff20; border-radius:12px; background:#2c2d37; box-shadow:0 12px 36px #0007; }
#md-account-sheet .md-chat-action-dialog header { display:flex; align-items:center; justify-content:space-between; padding:0; border:0; }
#md-account-sheet .md-chat-action-dialog header button { padding:0 5px; font-size:24px; background:transparent; border:0; }
#md-account-sheet .md-chat-action-dialog p { margin:0; font-size:12px; color:#bfc2ce; }
#md-account-sheet .md-chat-action-dialog input { min-width:0; width:100%; box-sizing:border-box; padding:9px; border:1px solid #ffffff20; border-radius:7px; background:#ffffff09; color:#fff; }
#md-account-sheet .md-chat-action-dialog > button { padding:9px; border:0; border-radius:8px; background:#168beb; color:#fff; }
#md-account-sheet .md-chat-action-dialog > button:last-child { background:#ffffff0b; }
#md-account-sheet .md-chat-share-contacts { flex:1; min-height:50px; overflow:auto; }
#md-account-sheet .md-chat-share-contacts button { display:block; width:100%; padding:10px; margin-bottom:4px; text-align:left; background:transparent; border:1px solid transparent; border-radius:8px; }
#md-account-sheet .md-chat-share-contacts button[aria-pressed=true] { border-color:#168beb; background:#168beb20; }
#md-account-sheet .md-chat-reply-preview[hidden],#md-account-sheet .md-chat-selection[hidden] { display:none; }
#md-account-sheet .md-im-delete-confirm { position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: 220px; max-width: calc(100vw - 60px); box-sizing: border-box; padding: 12px; border: 1px solid #ffffff22; border-radius: 10px; background: #363741; box-shadow: 0 6px 20px #0005; }
#md-account-sheet article.is-self .md-im-delete-confirm { left: auto; right: 0; }
#md-account-sheet .md-im-delete-confirm button { margin-top: 10px; font-size: 12px; }

.md-payment-download {
  display: inline-flex;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}

.md-store-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#md-account-sheet .md-plan-bonus { color: #f0cc85; font-weight: 650; }


/* Mobile MD message popup. */
.md-im-list-error:not(:empty) { padding: 8px 14px; }
@media (max-width:767px) {
  #md-account-sheet.md-inbox { padding:16px; padding-top:max(16px,env(safe-area-inset-top)); padding-bottom:max(16px,env(safe-area-inset-bottom)); background:#0008; align-items:center; }
  #md-account-sheet.md-inbox > section { width:min(360px,100%); box-sizing:border-box; height:auto; max-height:calc(100dvh - 48px); border:1px solid #ffffff12; border-radius:18px; background:#242530; box-shadow:0 16px 48px #0006; }
  #md-account-sheet.md-inbox > section > header { position:relative; justify-content:space-between; min-height:56px; box-sizing:border-box; padding:0 14px; border-bottom:1px solid #ffffff12; }
  #md-account-sheet.md-inbox > section > header h2 { font-size:16px; line-height:24px; font-weight:700; }
  #md-account-sheet.md-inbox > section > header button { position:relative; inset:auto; display:grid; place-items:center; flex:none; width:40px; height:40px; padding:0; border:0; background:transparent; color:#e6e6ed; font-size:0!important; }
  #md-account-sheet.md-inbox > section > header button::before,
  #md-account-sheet.md-inbox > section > header button::after { content:''; grid-area:1/1; width:19px; height:2px; border-radius:1px; background:currentColor; transform:rotate(45deg); pointer-events:none; }
  #md-account-sheet.md-inbox > section > header button::after { transform:rotate(-45deg); }
  #md-account-sheet.md-inbox .md-account-body { flex:0 1 auto; min-height:0; padding:0; overflow:auto; overscroll-behavior:contain; }
  #md-account-sheet.md-inbox .md-im-layout > aside { max-height:none; }
  #md-account-sheet.md-inbox .md-inbox-tools { gap:8px; padding:10px 14px 8px; }
  #md-account-sheet.md-inbox .md-inbox-tools input { height:34px; box-sizing:border-box; border-radius:8px; background:#41424e; font-size:13px; }
  #md-account-sheet.md-inbox .md-inbox-tools .md-inbox-new { flex:none; width:36px; height:36px; border:1px solid #ffffff1c; border-radius:50%; color:#c5c6d1; }
  #md-account-sheet.md-inbox .md-inbox-new svg { display:block; width:22px; height:22px; pointer-events:none; }
  #md-account-sheet.md-inbox .md-im-conversations { padding:0 10px 10px; gap:0; max-height:none; }
  #md-account-sheet.md-inbox .md-im-conversation { grid-template-columns:44px minmax(0,1fr); min-height:60px; box-sizing:border-box; padding:8px 6px!important; border:0; border-bottom:1px solid #ffffff10; border-radius:0; background:transparent; }
  #md-account-sheet.md-inbox .md-im-conversation img { width:44px; height:44px; border-radius:8px; }
  #md-account-sheet.md-inbox .md-inbox-row strong { min-width:0; font-size:14px; line-height:20px; font-weight:700; }
  #md-account-sheet.md-inbox .md-inbox-row time { font-size:11px; color:#9c9eac; }
  #md-account-sheet.md-inbox .md-inbox-row span { font-size:12px; line-height:18px; margin-top:0; color:#a9abb8; }
  #md-account-sheet.md-inbox .md-im-main { min-height:0; height:clamp(320px,56dvh,460px); max-height:calc(100dvh - 128px); padding:12px; box-sizing:border-box; }
  #md-account-sheet.md-inbox .md-im-history { min-height:80px; max-height:none; }
}


/* Membership cards: restrained colors and compact coin art approved in the preview. */
#md-account-sheet.md-membership-sheet > section {
  width: min(860px, 100%);
  background: #1c1e23;
  border-color: #ffffff26;
}
#md-account-sheet.md-membership-sheet .md-account-body { padding: 22px 24px 24px; }
#md-account-sheet.md-membership-sheet .md-account-body > p:first-child { margin: 0 0 20px; }
#md-account-sheet .md-membership-plans { gap: 16px; margin: 0 0 24px; }
#md-account-sheet .md-membership-plans > button {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  min-height: 156px;
  padding: 20px 116px 20px 24px !important;
  gap: 12px;
  border: 1px solid #ffffff2b;
  border-radius: 12px;
  background: #22252b;
  color: #f0f0f2;
  transition: border-color .15s, background-color .15s;
}
#md-account-sheet .md-membership-plans > button:hover { background: #292c33; border-color: #ffffff50; }
#md-account-sheet .md-membership-plans > button:focus-visible { outline: 2px solid #d3bc93; outline-offset: 3px; }
#md-account-sheet .md-membership-plans strong { font-size: 17px; font-weight: 650; line-height: 1.4; }
#md-account-sheet .md-membership-plans strong::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 9px;
  background: #9cb39b;
}
#md-account-sheet .md-membership-plans [data-member-tier="1"] strong::after { background: #9ebbd0; }
#md-account-sheet .md-membership-plans [data-member-tier="2"] strong::after { background: #b5abc9; }
#md-account-sheet .md-membership-plans [data-member-tier="3"] strong::after { background: #c6b38c; }
#md-account-sheet .md-membership-plans .md-plan-price { color: #d9c5a5; font-size: 24px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
#md-account-sheet .md-membership-plans > button > small { color: #b9bbc3; font-size: 12px; line-height: 1.5; }
#md-account-sheet .md-membership-plans .md-member-coins {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 76px;
  height: 64px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 767px) {
  #md-account-sheet.md-membership-sheet .md-account-body { padding: 18px 14px; }
  #md-account-sheet .md-membership-plans { gap: 10px; margin-bottom: 18px; }
  #md-account-sheet .md-membership-plans > button { padding: 16px 14px !important; min-height: 156px; gap: 16px; }
  #md-account-sheet .md-membership-plans strong { max-width: calc(100% - 44px); font-size: 14px; }
  #md-account-sheet .md-membership-plans strong::after { width: 22px; margin-top: 8px; }
  #md-account-sheet .md-membership-plans .md-plan-price { font-size: clamp(17px, 5vw, 21px); }
  #md-account-sheet .md-membership-plans .md-member-coins { width: 42px; height: 40px; right: 10px; top: 16px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #md-account-sheet .md-membership-plans > button { transition: none; }
}

/* Mobile membership: small crown marks and muted gradients; desktop keeps its coin cards. */
@media (min-width: 768px) {  #md-account-sheet .md-membership-plans > button { --md-member-tint: #7a6841; }  #md-account-sheet .md-membership-plans [data-member-tier="1"] { --md-member-tint: #835d59; }  #md-account-sheet .md-membership-plans [data-member-tier="2"] { --md-member-tint: #6f5a87; }  #md-account-sheet .md-membership-plans [data-member-tier="3"] { --md-member-tint: #456b7c; }  #md-account-sheet .md-membership-plans > button {    background: radial-gradient(ellipse at 100% 110%,var(--md-member-tint),transparent 78%),#252529;  }  #md-account-sheet .md-membership-plans > button:hover {    background: radial-gradient(ellipse at 100% 110%,var(--md-member-tint),transparent 78%),#2b2b30;  }  #md-account-sheet .md-membership-plans strong::after { background: #cbb68c; }  #md-account-sheet .md-membership-plans [data-member-tier="1"] strong::after { background: #c29a96; }  #md-account-sheet .md-membership-plans [data-member-tier="2"] strong::after { background: #b5a2cc; }  #md-account-sheet .md-membership-plans [data-member-tier="3"] strong::after { background: #96b6c5; }}#md-account-sheet :is(.md-mobile-member-profile,.md-mobile-member-heading,.md-mobile-member-open,.md-mobile-member-benefits,.md-member-mobile-title,.md-member-mobile-back,.md-member-vip-label,.md-member-price-mobile,.md-member-crown) { display: none; }
#md-account-sheet .md-membership-plans .md-plan-price > span { color: inherit; font: inherit; }
@media (max-width: 767px) {
  #md-account-sheet.md-membership-sheet { padding: 0; align-items: stretch; background: #000; }
  #md-account-sheet.md-membership-sheet > section {
    position: relative; width: 100%; height: 100dvh; max-height: 100dvh;
    border: 0; border-radius: 0; color: #eee;
    background: radial-gradient(ellipse 76% 160px at 0 0,#8f733d40,transparent),radial-gradient(ellipse 65% 160px at 100% 0,#23697542,transparent),#050506;
  }
  #md-account-sheet.md-membership-sheet > section > header {
    position: relative; justify-content: center; box-sizing: border-box;
    min-height: calc(60px + env(safe-area-inset-top,0px));
    padding: env(safe-area-inset-top,0px) 54px 0; border: 0;
  }
  #md-account-sheet.md-membership-sheet h2 { font-size: 18px; line-height: 1.4; font-weight: 650; }
  #md-account-sheet.md-membership-sheet > section > header button {
    position: absolute; left: 5px; top: calc(8px + env(safe-area-inset-top,0px));
    width: 44px; height: 44px; padding: 10px; border: 0; background: none;
    display: grid; place-items: center; color: #f2f2f2;
  }
  #md-account-sheet.md-membership-sheet .md-member-mobile-back { display: block; width: 24px; height: 24px; }
  #md-account-sheet.md-membership-sheet .md-member-mobile-title { display: inline; }
  #md-account-sheet.md-membership-sheet :is(.md-member-desktop-title,.md-member-desktop-close,.md-member-desktop-intro) { display: none; }
  #md-account-sheet.md-membership-sheet .md-account-body { flex: 1; padding: 10px 16px max(28px,env(safe-area-inset-bottom,0px)); overflow-x: hidden; }
  #md-account-sheet .md-mobile-member-profile { display: flex; align-items: center; gap: 12px; margin: 2px 0 28px; }
  #md-account-sheet .md-mobile-member-profile > img { width: 54px; height: 54px; object-fit: cover; border-radius: 50%; background: #24252a; }
  #md-account-sheet .md-mobile-member-profile > div { min-width: 0; }
  #md-account-sheet .md-mobile-member-profile strong { display: block; font-size: 20px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
  #md-account-sheet .md-mobile-member-profile small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: #a5a5ad; }
  #md-account-sheet .md-mobile-member-heading { display: flex; align-items: center; gap: 7px; margin: 0 0 18px; font-size: 16px; line-height: 1.5; font-weight: 500; }
  #md-account-sheet .md-mobile-member-heading::before { content: ''; width: 4px; height: 16px; border-radius: 3px; background: #eee; }
  #md-account-sheet .md-membership-plans {
    display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 -16px 20px; padding: 1px 16px 3px; scroll-padding-inline: 16px;
  }
  #md-account-sheet .md-membership-plans::-webkit-scrollbar { display: none; }
  #md-account-sheet .md-membership-plans > button {
    --md-member-tint: #7a6841;
    flex: 0 0 clamp(164px,44vw,200px); min-height: 88px; height: auto;
    padding: 14px 54px 14px 12px !important; gap: 5px; scroll-snap-align: start;
    border: 1px solid #ffffff18; border-radius: 10px;
    background: radial-gradient(ellipse at 100% 110%,var(--md-member-tint),transparent 78%),#252529;
    box-shadow: inset 0 1px 0 #ffffff04; color: #eee;
  }
  #md-account-sheet .md-membership-plans [data-member-tier="1"] { --md-member-tint: #835d59; }
  #md-account-sheet .md-membership-plans [data-member-tier="2"] { --md-member-tint: #6f5a87; }
  #md-account-sheet .md-membership-plans [data-member-tier="3"] { --md-member-tint: #456b7c; }
  #md-account-sheet .md-membership-plans > button:hover { background: radial-gradient(ellipse at 100% 110%,var(--md-member-tint),transparent 78%),#252529; border-color: #ffffff30; }
  #md-account-sheet .md-membership-plans > button[aria-pressed="true"] { border-color: #e4c995; box-shadow: inset 0 0 0 .5px #e4c99565; }
  #md-account-sheet .md-membership-plans strong { max-width: none; font-size: 13px; line-height: 20px; font-weight: 450; white-space: nowrap; }
  #md-account-sheet .md-membership-plans strong::after { display: none; }
  #md-account-sheet .md-membership-plans .md-member-vip-label { display: inline; color: inherit; font: inherit; }
  #md-account-sheet .md-membership-plans .md-plan-price { font-size: 20px; font-weight: 650; line-height: 26px; color: #f2eee4; }
  #md-account-sheet .md-membership-plans .md-plan-price > .md-member-price-mobile { display: inline; color: inherit; font: inherit; }
  #md-account-sheet .md-membership-plans :is(.md-member-price-desktop,.md-member-coins,.md-plan-select-hint) { display: none; }
  #md-account-sheet .md-membership-plans .md-member-crown { display: block; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; pointer-events: none; }
  #md-account-sheet.md-membership-sheet .md-mobile-member-open {
    display: block; width: 82%; min-height: 46px; margin: 0 auto 28px; padding: 10px 18px;
    border: 1px solid #fff1d570; border-radius: 28px; background: linear-gradient(105deg,#f5deb0,#ebbf67);
    color: #221b10; font-size: 17px; line-height: 24px; font-weight: 550;
  }
  #md-account-sheet.md-membership-sheet .md-mobile-member-open:hover { background: linear-gradient(105deg,#f8e5c2,#efca80); }
  #md-account-sheet .md-mobile-member-benefits { display: block; font-size: 14px; line-height: 1.9; color: #d3d3d8; }
  #md-account-sheet .md-mobile-member-benefits h3 { font-size: 14px; font-weight: 450; line-height: 1.8; margin: 0 0 12px; }
  #md-account-sheet .md-mobile-member-benefits ol { padding-left: 20px; margin: 0 0 24px; }
  #md-account-sheet .md-mobile-member-benefits li { padding-left: 1px; margin-bottom: 8px; }
  #md-account-sheet .md-mobile-member-benefits p { color: #92929c; font-size: 13px; line-height: 1.9; margin: 0 0 12px; }
  #md-account-sheet .md-mobile-member-benefits a { color: #a7a7b0; font-size: 12px; text-underline-offset: 3px; }
  #md-account-sheet.md-membership-sheet .md-member-orders { display: block; margin-top: 22px; background: transparent; color: #aaaab3; font-size: 12px; border-color: #ffffff1c; }
}

/* Store and checkout share the membership page's restrained palette. */
#md-account-sheet:is(.md-store-sheet,.md-checkout-sheet) > section { background: #1d1f24; border-color: #ffffff23; box-shadow: 0 24px 80px #0005; }
#md-account-sheet.md-store-sheet > section { width: min(640px,100%); }
#md-account-sheet.md-checkout-sheet > section { width: min(520px,100%); }
#md-account-sheet:is(.md-store-sheet,.md-checkout-sheet) > section > header { padding: 18px 24px; }
#md-account-sheet:is(.md-store-sheet,.md-checkout-sheet) .md-account-body { padding: 20px 24px 24px; }
#md-account-sheet .md-commerce-intro { color: #a4a6b0; font-size: 13px; line-height: 1.7; margin: 0 0 18px; }
#md-account-sheet.md-store-sheet .md-store-options { gap: 14px; }
#md-account-sheet.md-store-sheet .md-store-option {
  --md-store-tint: #6e5a35;
  position: relative; min-width: 0; min-height: 154px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: flex-start; gap: 15px;
  padding: 17px 20px 20px; border: 1px solid #ffffff22; border-radius: 13px;
  background: radial-gradient(ellipse at 100% 115%,var(--md-store-tint),transparent 82%),#25262b;
  text-align: left; transition: border-color .15s, background-color .15s;
}
#md-account-sheet.md-store-sheet .md-store-member { --md-store-tint: #52465f; }
#md-account-sheet.md-store-sheet .md-store-option:hover { border-color: #ffffff45; background: radial-gradient(ellipse at 100% 115%,var(--md-store-tint),transparent 82%),#2a2b30; }
#md-account-sheet.md-store-sheet .md-store-option:focus-visible { outline: 2px solid #d4c099; outline-offset: 3px; }
#md-account-sheet .md-store-symbol { display: flex; align-items: center; justify-content: flex-start; height: 42px; }
#md-account-sheet .md-store-symbol img { display: block; object-fit: contain; }
#md-account-sheet .md-store-coins .md-store-symbol img { width: 64px; height: 48px; margin-left: -8px; }
#md-account-sheet .md-store-member .md-store-symbol img { width: 34px; height: 34px; }
#md-account-sheet .md-store-copy { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
#md-account-sheet .md-store-copy strong { font-size: 17px; font-weight: 600; line-height: 1.5; color: #f1eff2; }
#md-account-sheet .md-store-copy small { font-size: 12px; line-height: 1.6; color: #b5b2b5; }
#md-account-sheet .md-store-arrow { position: absolute; width: 18px; height: 18px; right: 16px; bottom: 27px; color: #d2c6b0; }
#md-account-sheet .md-store-member .md-store-arrow { color: #c0b3d1; }
#md-account-sheet .md-checkout-product {
  --md-checkout-tint: #71613f;
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px;
  border: 1px solid #ffffff1c; background: radial-gradient(ellipse at 100% 110%,var(--md-checkout-tint),transparent 85%),#27292e;
}
#md-account-sheet .md-checkout-product[data-member-tier="1"] { --md-checkout-tint: #72514f; }
#md-account-sheet .md-checkout-product[data-member-tier="2"] { --md-checkout-tint: #5f4d75; }
#md-account-sheet .md-checkout-product[data-member-tier="3"] { --md-checkout-tint: #3c6070; }
#md-account-sheet .md-checkout-art { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 10px; background: #ffffff08; }
#md-account-sheet .md-checkout-art img { display: block; width: 36px; height: 36px; object-fit: contain; }
#md-account-sheet .md-checkout-product > div:last-child { min-width: 0; }
#md-account-sheet .md-checkout-product small { font-size: 11px; color: #b7bec5; line-height: 1.5; }
#md-account-sheet .md-checkout-product h3 { font-size: 18px; line-height: 1.4; font-weight: 600; margin: 3px 0 0; overflow-wrap: anywhere; }
#md-account-sheet .md-checkout-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 24px 0; border-bottom: 1px solid #ffffff13; }
#md-account-sheet .md-checkout-total > span { font-size: 14px; color: #c9cbd2; }
#md-account-sheet .md-checkout-total small { display: block; font-size: 11px; line-height: 1.6; margin-top: 3px; color: #858893; }
#md-account-sheet .md-checkout-total > strong { font-size: 32px; line-height: 1.25; font-weight: 600; letter-spacing: -.7px; color: #f1dec0; white-space: nowrap; }
#md-account-sheet .md-checkout-gateway { display: flex; align-items: center; gap: 12px; padding: 20px 0 22px; }
#md-account-sheet .md-gateway-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #ffffff14; background: #ffffff04; border-radius: 9px; color: #b7c7cb; }
#md-account-sheet .md-gateway-icon svg { display: block; width: 21px; height: 21px; }
#md-account-sheet .md-checkout-gateway strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 500; color: #d5d8df; }
#md-account-sheet .md-checkout-gateway p { margin: 4px 0 0; color: #969aa6; font-size: 12px; line-height: 1.7; }
#md-account-sheet .md-checkout-feedback:empty { display: none; }
#md-account-sheet .md-checkout-feedback { margin: 0 0 18px; padding: 11px 13px; border: 1px solid #d9a4ad30; border-radius: 8px; background: #d9a4ad08; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
#md-account-sheet .md-checkout-actions { display: flex; flex-direction: column; gap: 9px; }
#md-account-sheet.md-checkout-sheet #md-checkout-confirm { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 18px; border: 1px solid #f3ddb270; border-radius: 10px; background: linear-gradient(105deg,#f5deb0,#ebbf67); color: #2a2113; font-size: 15px; font-weight: 600; }
#md-account-sheet.md-checkout-sheet #md-checkout-confirm:hover { background: linear-gradient(105deg,#f7e5c3,#f0cb83); }
#md-account-sheet #md-checkout-confirm svg { display: block; width: 18px; height: 18px; }
#md-account-sheet .md-checkout-actions > [data-web-account=orders] { align-self: center; min-height: 38px; padding: 7px 16px; border: 0; background: none; color: #a8adb8; font-size: 12px; }
#md-account-sheet .md-checkout-actions > [data-web-account=orders]:hover { background: #ffffff06; color: #e1e2e6; }
@media (max-width: 480px) {
  #md-account-sheet:is(.md-store-sheet,.md-checkout-sheet) .md-account-body { padding: 18px; }
  #md-account-sheet.md-store-sheet .md-store-options { grid-template-columns: 1fr; gap: 12px; }
  #md-account-sheet.md-store-sheet .md-store-option { flex-direction: row; align-items: center; min-height: 100px; padding: 18px; gap: 15px; }
  #md-account-sheet .md-store-symbol { width: 48px; height: 42px; justify-content: center; flex: none; }
  #md-account-sheet .md-store-copy { padding-right: 18px; }
  #md-account-sheet .md-store-arrow { top: calc(50% - 9px); bottom: auto; right: 16px; }
  #md-account-sheet .md-checkout-total > strong { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) { #md-account-sheet.md-store-sheet .md-store-option { transition: none; } }

/* Coin recharge uses the approved four-tier membership palette and compact coin art. */
#md-account-sheet.md-recharge-sheet > section { width: min(860px,100%); background: #1c1e23; border-color: #ffffff26; }
#md-account-sheet.md-recharge-sheet > section > header { padding: 18px 24px; }
#md-account-sheet.md-recharge-sheet .md-account-body { padding: 20px 24px 24px; }
#md-account-sheet .md-recharge-balance { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; color: #d9dae0; font-size: 14px; line-height: 1.6; }
#md-account-sheet .md-recharge-balance svg { flex: none; display: block; width: 22px; height: 22px; margin-right: 6px; color: #ddc395; }
#md-account-sheet .md-recharge-balance strong { font-size: 16px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
#md-account-sheet .md-recharge-plans { gap: 16px; margin: 0 0 22px; }
#md-account-sheet .md-recharge-plans > button {
  --md-recharge-tint: #7a6841;
  position: relative; isolation: isolate; box-sizing: border-box; min-width: 0;
  min-height: 154px; padding: 20px 112px 20px 24px !important; gap: 10px;
  border: 1px solid #ffffff2b; border-radius: 12px;
  background: radial-gradient(ellipse at 100% 110%,var(--md-recharge-tint),transparent 78%),#252529;
  color: #efeff2; text-align: left;
}
#md-account-sheet .md-recharge-plans [data-recharge-tier="1"] { --md-recharge-tint: #835d59; }
#md-account-sheet .md-recharge-plans [data-recharge-tier="2"] { --md-recharge-tint: #6f5a87; }
#md-account-sheet .md-recharge-plans [data-recharge-tier="3"] { --md-recharge-tint: #456b7c; }
#md-account-sheet .md-recharge-plans > button:hover { background: radial-gradient(ellipse at 100% 110%,var(--md-recharge-tint),transparent 78%),#2b2b30; border-color: #ffffff50; }
#md-account-sheet .md-recharge-plans > button:focus-visible { outline: 2px solid #d3bc93; outline-offset: 3px; }
#md-account-sheet .md-recharge-plans strong { font-size: 17px; line-height: 1.4; font-weight: 600; }
#md-account-sheet .md-recharge-plans strong::after { content: ''; display: block; width: 28px; height: 2px; margin-top: 9px; background: #cbb68c; }
#md-account-sheet .md-recharge-plans [data-recharge-tier="1"] strong::after { background: #c29a96; }
#md-account-sheet .md-recharge-plans [data-recharge-tier="2"] strong::after { background: #b5a2cc; }
#md-account-sheet .md-recharge-plans [data-recharge-tier="3"] strong::after { background: #96b6c5; }
#md-account-sheet .md-recharge-plans .md-plan-price { color: #f0dfc3; font-size: 25px; line-height: 1.3; font-weight: 500; white-space: nowrap; }
#md-account-sheet .md-recharge-plans .md-plan-bonus { display: inline-block; box-sizing: border-box; max-width: 100%; padding: 2px 8px; border-radius: 5px; background: #d8ae5c20; color: #ead08f; font-size: 11px; line-height: 1.6; font-weight: 500; }
#md-account-sheet .md-recharge-plans .md-plan-select-hint { font-size: 12px; line-height: 1.6; color: #c5c0be; }
#md-account-sheet .md-recharge-coins { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 76px; height: 64px; object-fit: contain; pointer-events: none; user-select: none; }
@media (max-width: 767px) {
  #md-account-sheet.md-recharge-sheet .md-account-body { padding: 16px 14px 20px; }
  #md-account-sheet .md-recharge-balance { font-size: 13px; margin-bottom: 16px; }
  #md-account-sheet .md-recharge-plans { gap: 10px; margin-bottom: 18px; }
  #md-account-sheet .md-recharge-plans > button { min-height: 164px; padding: 16px 12px !important; gap: 11px; }
  #md-account-sheet .md-recharge-plans strong { max-width: calc(100% - 34px); font-size: 14px; line-height: 1.5; }
  #md-account-sheet .md-recharge-plans .md-plan-price { font-size: 22px; }
  #md-account-sheet .md-recharge-plans .md-plan-bonus { padding: 3px 5px; font-size: 10px; line-height: 1.7; }
  #md-account-sheet .md-recharge-coins { width: 42px; height: 38px; right: 8px; top: 15px; transform: none; }
}

/* Membership plans use the same crown marks on desktop and mobile. */
@media (min-width:768px) {
  #md-account-sheet .md-membership-plans .md-member-crown { display:block; position:absolute; right:40px; top:50%; transform:translateY(-50%); width:40px; height:40px; object-fit:contain; pointer-events:none; user-select:none; }
}

/* Commerce returns one level; the separate close control always dismisses it. */
#md-account-sheet > section > header.md-commerce-header {
 display: grid;
 grid-template-columns: 40px minmax(0,1fr) 40px;
 align-items: center;
 gap: 12px;
 min-height: 72px;
 box-sizing: border-box;
 padding: 15px 22px;
}
#md-account-sheet > section > header.md-commerce-header > h2 {
 grid-column: 2;
 min-width: 0;
 text-align: center;
}
#md-account-sheet > section > header.md-commerce-header > [data-web-account="close"] {
 position: static;
 grid-column: 3;
 display: grid;
 place-items: center;
 width: 40px;
 height: 40px;
 padding: 0;
 border: 0;
 background: transparent;
 color: #eee;
 font-size: 26px;
 line-height: 1;
}
@media(max-width:767px){
 #md-account-sheet > section > header.md-commerce-header {
  min-height: calc(60px + env(safe-area-inset-top,0px));
  padding: calc(10px + env(safe-area-inset-top,0px)) 14px 10px;
  gap: 8px;
 }
}
