/* One popup style for the whole site (Rainey: "one uniform style across the whole codebase").
   Every modal card and dialog (the sign-in cards, Add a Record, Friends, Trash, Notifications, Settings, and the older .od-dialog boxes) is
   drawn here, once, with the toolbar's own surface (the .fm-dock-stack in features.css): the page's background colour at 96%, a hairline edge, 18px
   corners and the same light blur. So a popup is always the same as the toolbar under it, in every theme, on every page. This sheet is linked
   last by base.html and filemanager.html (the only two page shells), and its selectors out-rank every older popup rule, so a popup never
   needs a style of its own. */
html:not(#pp0):not(#pp1):not(#pp2):not(#pp3):not(#pp4):not(#pp5):not(#pp6):not(#pp7):not(#pp8):not(#pp9):not(#pp10):not(#pp11):not(#pp12):not(#pp13):not(#pp14):not(#pp15):not(#pp16):not(#pp17):not(#pp18):not(#pp19):not(#pp20):not(#pp21):not(#pp22):not(#pp23):not(#pp24):not(#pp25):not(#pp26):not(#pp27):not(#pp28):not(#pp29):not(#pp30):not(#pp31):not(#pp32):not(#pp33):not(#pp34):not(#pp35):not(#pp36):not(#pp37):not(#pp38):not(#pp39):not(#pp40):not(#pp41):not(#pp42):not(#pp43):not(#pp44):not(#pp45):not(#pp46):not(#pp47):not(#pp48):not(#pp49):not(#pp50):not(#pp51):not(#pp52):not(#pp53):not(#pp54):not(#pp55):not(#pp56):not(#pp57):not(#pp58):not(#pp59):not(#pp60):not(#pp61):not(#pp62):not(#pp63):not(#pp64):not(#pp65):not(#pp66):not(#pp67):not(#pp68):not(#pp69):not(#pp70):not(#pp71):not(#pp72):not(#pp73):not(#pp74):not(#pp75):not(#pp76):not(#pp77):not(#pp78):not(#pp79):not(#pp80):not(#pp81):not(#pp82):not(#pp83):not(#pp84):not(#pp85):not(#pp86):not(#pp87):not(#pp88):not(#pp89):not(#pp90):not(#pp91):not(#pp92):not(#pp93):not(#pp94):not(#pp95):not(#pp96):not(#pp97):not(#pp98):not(#pp99) body :is(.rm-card, .addm__box, .od-dialog__box, .rv-gset, .fm-profmodal__card) {
  /* Opaque, so the dim behind the dialog cannot show through and turn the card greyer than the toolbar. Same layers as the toolbar: the scene foot under its ink wash, and the toolbar's edge. */
  background-color: var(--fm-foot, var(--bg-solid, var(--bg))) !important;
  background-image: linear-gradient(var(--dock-fill, color-mix(in srgb, var(--ink, #fff) 12%, transparent)), var(--dock-fill, color-mix(in srgb, var(--ink, #fff) 12%, transparent))) !important;
  color: var(--ink, #f4f4f2) !important; border: 1px solid var(--line, rgba(255, 255, 255, .12)) !important; border-radius: 18px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  opacity: 1 !important;
}
html[data-theme="light"]:not(#pp0):not(#pp1):not(#pp2):not(#pp3):not(#pp4):not(#pp5):not(#pp6):not(#pp7):not(#pp8):not(#pp9):not(#pp10):not(#pp11):not(#pp12):not(#pp13):not(#pp14):not(#pp15):not(#pp16):not(#pp17):not(#pp18):not(#pp19):not(#pp20):not(#pp21):not(#pp22):not(#pp23):not(#pp24):not(#pp25):not(#pp26):not(#pp27):not(#pp28):not(#pp29):not(#pp30):not(#pp31):not(#pp32):not(#pp33):not(#pp34):not(#pp35):not(#pp36):not(#pp37):not(#pp38):not(#pp39):not(#pp40):not(#pp41):not(#pp42):not(#pp43):not(#pp44):not(#pp45):not(#pp46):not(#pp47):not(#pp48):not(#pp49):not(#pp50):not(#pp51):not(#pp52):not(#pp53):not(#pp54):not(#pp55):not(#pp56):not(#pp57):not(#pp58):not(#pp59):not(#pp60):not(#pp61):not(#pp62):not(#pp63):not(#pp64):not(#pp65):not(#pp66):not(#pp67):not(#pp68):not(#pp69):not(#pp70):not(#pp71):not(#pp72):not(#pp73):not(#pp74):not(#pp75):not(#pp76):not(#pp77):not(#pp78):not(#pp79):not(#pp80):not(#pp81):not(#pp82):not(#pp83):not(#pp84):not(#pp85):not(#pp86):not(#pp87):not(#pp88):not(#pp89):not(#pp90):not(#pp91):not(#pp92):not(#pp93):not(#pp94):not(#pp95):not(#pp96):not(#pp97):not(#pp98):not(#pp99) body :is(.rm-card, .addm__box, .od-dialog__box, .rv-gset, .fm-profmodal__card) {
  border-color: var(--line, rgba(0, 0, 0, .12)) !important; box-shadow: 0 12px 40px rgba(0, 0, 0, .14) !important;
  background-image: linear-gradient(var(--dock-fill, color-mix(in srgb, var(--ink, #000) 9%, transparent)), var(--dock-fill, color-mix(in srgb, var(--ink, #000) 9%, transparent))) !important;
}
/* The dim behind a popup is the same everywhere too: no blur, no brightness filter, no page colour. */
html:not(#pp0):not(#pp1):not(#pp2):not(#pp3):not(#pp4):not(#pp5):not(#pp6):not(#pp7):not(#pp8):not(#pp9):not(#pp10):not(#pp11):not(#pp12):not(#pp13):not(#pp14):not(#pp15):not(#pp16):not(#pp17):not(#pp18):not(#pp19):not(#pp20):not(#pp21):not(#pp22):not(#pp23):not(#pp24):not(#pp25):not(#pp26):not(#pp27):not(#pp28):not(#pp29):not(#pp30):not(#pp31):not(#pp32):not(#pp33):not(#pp34):not(#pp35):not(#pp36):not(#pp37):not(#pp38):not(#pp39):not(#pp40):not(#pp41):not(#pp42):not(#pp43):not(#pp44):not(#pp45):not(#pp46):not(#pp47):not(#pp48):not(#pp49):not(#pp50):not(#pp51):not(#pp52):not(#pp53):not(#pp54):not(#pp55):not(#pp56):not(#pp57):not(#pp58):not(#pp59):not(#pp60):not(#pp61):not(#pp62):not(#pp63):not(#pp64):not(#pp65):not(#pp66):not(#pp67):not(#pp68):not(#pp69):not(#pp70):not(#pp71):not(#pp72):not(#pp73):not(#pp74):not(#pp75):not(#pp76):not(#pp77):not(#pp78):not(#pp79):not(#pp80):not(#pp81):not(#pp82):not(#pp83):not(#pp84):not(#pp85):not(#pp86):not(#pp87):not(#pp88):not(#pp89):not(#pp90):not(#pp91):not(#pp92):not(#pp93):not(#pp94):not(#pp95):not(#pp96):not(#pp97):not(#pp98):not(#pp99) body .od-dialog { background: rgba(0, 0, 0, .6) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html[data-theme="light"]:not(#pp0):not(#pp1):not(#pp2):not(#pp3):not(#pp4):not(#pp5):not(#pp6):not(#pp7):not(#pp8):not(#pp9):not(#pp10):not(#pp11):not(#pp12):not(#pp13):not(#pp14):not(#pp15):not(#pp16):not(#pp17):not(#pp18):not(#pp19):not(#pp20):not(#pp21):not(#pp22):not(#pp23):not(#pp24):not(#pp25):not(#pp26):not(#pp27):not(#pp28):not(#pp29):not(#pp30):not(#pp31):not(#pp32):not(#pp33):not(#pp34):not(#pp35):not(#pp36):not(#pp37):not(#pp38):not(#pp39):not(#pp40):not(#pp41):not(#pp42):not(#pp43):not(#pp44):not(#pp45):not(#pp46):not(#pp47):not(#pp48):not(#pp49):not(#pp50):not(#pp51):not(#pp52):not(#pp53):not(#pp54):not(#pp55):not(#pp56):not(#pp57):not(#pp58):not(#pp59):not(#pp60):not(#pp61):not(#pp62):not(#pp63):not(#pp64):not(#pp65):not(#pp66):not(#pp67):not(#pp68):not(#pp69):not(#pp70):not(#pp71):not(#pp72):not(#pp73):not(#pp74):not(#pp75):not(#pp76):not(#pp77):not(#pp78):not(#pp79):not(#pp80):not(#pp81):not(#pp82):not(#pp83):not(#pp84):not(#pp85):not(#pp86):not(#pp87):not(#pp88):not(#pp89):not(#pp90):not(#pp91):not(#pp92):not(#pp93):not(#pp94):not(#pp95):not(#pp96):not(#pp97):not(#pp98):not(#pp99) body .od-dialog { background: rgba(0, 0, 0, .35) !important; }

/* Stacking: a record opened over the list sits in a drawer (.fm-sheet, inside the file manager at z-index 100, under the toolbar). Every popup and menu belongs above it, so the ⋯ menu, the dropdowns,
   the Add / Friends / Settings popups and a toast are never drawn under the record's picture. */
html:not(#z0):not(#z1):not(#z2):not(#z3):not(#z4) body :is(.od-dialog, .fm-popdlg) { z-index: 2147483004 !important; }
html:not(#z0):not(#z1):not(#z2):not(#z3):not(#z4) body :is(.rv-optpop, .rv-colpop, .rv-licpop, .rv-recmenu__list, .me-menu, .fm-themepop, .fm-filterpop, .fm-viewpop, .fm-userbar, .fm-userpop, .fm-dock__find, .fm-acct__menu) { z-index: 2147483005 !important; }
html:not(#z0):not(#z1):not(#z2):not(#z3):not(#z4) body .rv-toast { z-index: 2147483006 !important; }

/* Add to group: each row is a name on the left and its check at the right edge (a later generic menu-row rule had made the rows plain blocks, so the check followed the name). */
html:not(#g0):not(#g1):not(#g2):not(#g3):not(#g4) body .rv-grppop .rv-grppop__row, html:not(#g0):not(#g1):not(#g2):not(#g3):not(#g4) body .rv-grppop .rv-grppop__new { display: flex !important; align-items: center !important; justify-content: flex-start; gap: 10px; width: 100%; box-sizing: border-box; }
html:not(#g0):not(#g1):not(#g2):not(#g3):not(#g4) body .rv-grppop .rv-grppop__name { flex: 1 1 auto; min-width: 0; text-align: left; }
html:not(#g0):not(#g1):not(#g2):not(#g3):not(#g4) body .rv-grppop .rv-grppop__row .rv-grppop__check { flex: none; margin-left: auto; width: 18px; height: 18px; }

/* The < back arrow on a popup opened from another one (Keys, Archiving, Earnings from Settings): the Add dialog hides its own arrow except on its later steps, so these popups show theirs here. */
html body .addm.fm-popdlg .rm-card .rm-head .rm-ico--back { display: grid; }

/* Every popup lines up with the toolbar: it is centred on the toolbar's centre rather than the window's (filemanager.js sets --pop-dx; it is 0 where there is no toolbar). */
html:not(#c0):not(#c1):not(#c2):not(#c3):not(#c4) body .od-dialog :is(.rm-card, .addm__box, .od-dialog__box, .rv-gset, .fm-profmodal__card) { position: relative; left: var(--pop-dx, 0px); }

/* The Archive flow's < back arrow (its second step); the Add dialog's own rules hide the arrow on classes this modal shares. */
html body .addm .rm-card.pub .rm-head .rm-ico--back:not([hidden]) { display: grid; }

/* On a phone the toolbar is an opaque fill: the text colour mixed 12% into a neutral base (the scene's bottom colour where a palette sets one). Popups wear exactly that fill there, so they are not darker than the bar under them. */
html { --dock-base: #1b1d22; }
html[data-theme="light"] { --dock-base: #f1f1f4; }
@media (max-width: 820px) {
  html:not(#pq0):not(#pq1):not(#pq2):not(#pq3):not(#pq4):not(#pq5):not(#pq6):not(#pq7):not(#pq8):not(#pq9):not(#pq10):not(#pq11):not(#pq12):not(#pq13):not(#pq14):not(#pq15):not(#pq16):not(#pq17):not(#pq18):not(#pq19):not(#pq20):not(#pq21):not(#pq22):not(#pq23):not(#pq24):not(#pq25):not(#pq26):not(#pq27):not(#pq28):not(#pq29):not(#pq30):not(#pq31):not(#pq32):not(#pq33):not(#pq34):not(#pq35):not(#pq36):not(#pq37):not(#pq38):not(#pq39):not(#pq40):not(#pq41):not(#pq42):not(#pq43):not(#pq44):not(#pq45):not(#pq46):not(#pq47):not(#pq48):not(#pq49):not(#pq50):not(#pq51):not(#pq52):not(#pq53):not(#pq54):not(#pq55):not(#pq56):not(#pq57):not(#pq58):not(#pq59):not(#pq60):not(#pq61):not(#pq62):not(#pq63):not(#pq64):not(#pq65):not(#pq66):not(#pq67):not(#pq68):not(#pq69):not(#pq70):not(#pq71):not(#pq72):not(#pq73):not(#pq74):not(#pq75):not(#pq76):not(#pq77):not(#pq78):not(#pq79) body :is(.rm-card, .addm__box, .od-dialog__box, .rv-gset, .fm-profmodal__card, .fm-profpop, .fm-userbar, .rv-optpop, .rv-colpop, .rv-recmenu__list) {
    background-color: color-mix(in srgb, var(--ink, #fff) 12%, var(--fm-foot, var(--dock-base))) !important; background-image: none !important;
  }
  /* The profile sheet sits in the toolbar stack, so it stays clear and shows the toolbar's own fill. */
  html:not(#pq0):not(#pq1):not(#pq2):not(#pq3):not(#pq4):not(#pq5):not(#pq6):not(#pq7):not(#pq8):not(#pq9):not(#pq10):not(#pq11):not(#pq12):not(#pq13):not(#pq14):not(#pq15):not(#pq16):not(#pq17):not(#pq18):not(#pq19):not(#pq20):not(#pq21):not(#pq22):not(#pq23):not(#pq24):not(#pq25):not(#pq26):not(#pq27):not(#pq28):not(#pq29):not(#pq30):not(#pq31):not(#pq32):not(#pq33):not(#pq34):not(#pq35):not(#pq36):not(#pq37):not(#pq38):not(#pq39):not(#pq40):not(#pq41):not(#pq42):not(#pq43):not(#pq44):not(#pq45):not(#pq46):not(#pq47):not(#pq48):not(#pq49):not(#pq50):not(#pq51):not(#pq52):not(#pq53):not(#pq54):not(#pq55):not(#pq56):not(#pq57):not(#pq58):not(#pq59):not(#pq60):not(#pq61):not(#pq62):not(#pq63):not(#pq64):not(#pq65):not(#pq66):not(#pq67):not(#pq68):not(#pq69):not(#pq70):not(#pq71):not(#pq72):not(#pq73):not(#pq74):not(#pq75):not(#pq76):not(#pq77):not(#pq78):not(#pq79) body .fm-dock-stack > .fm-userbar {
    background: transparent !important; background-color: transparent !important; background-image: none !important;
  }
}

/* Sign Out at the foot of Settings is the accent button, with the label centred. */
html:not(#sx0):not(#sx1):not(#sx2):not(#sx3):not(#sx4):not(#sx5):not(#sx6):not(#sx7):not(#sx8):not(#sx9):not(#sx10):not(#sx11):not(#sx12):not(#sx13):not(#sx14):not(#sx15):not(#sx16):not(#sx17):not(#sx18):not(#sx19):not(#sx20):not(#sx21):not(#sx22):not(#sx23):not(#sx24):not(#sx25):not(#sx26):not(#sx27):not(#sx28):not(#sx29):not(#sx30):not(#sx31):not(#sx32):not(#sx33):not(#sx34):not(#sx35):not(#sx36):not(#sx37):not(#sx38):not(#sx39):not(#sx40) body .fm-popdlg .fm-card--out .fm-kid.fm-kid--logout,
html:not(#sx0):not(#sx1):not(#sx2):not(#sx3):not(#sx4):not(#sx5):not(#sx6):not(#sx7):not(#sx8):not(#sx9):not(#sx10):not(#sx11):not(#sx12):not(#sx13):not(#sx14):not(#sx15):not(#sx16):not(#sx17):not(#sx18):not(#sx19):not(#sx20):not(#sx21):not(#sx22):not(#sx23):not(#sx24):not(#sx25):not(#sx26):not(#sx27):not(#sx28):not(#sx29):not(#sx30):not(#sx31):not(#sx32):not(#sx33):not(#sx34):not(#sx35):not(#sx36):not(#sx37):not(#sx38):not(#sx39):not(#sx40) body .fm-popdlg .fm-card--out .fm-kid.fm-kid--logout:hover,
html:not(#sx0):not(#sx1):not(#sx2):not(#sx3):not(#sx4):not(#sx5):not(#sx6):not(#sx7):not(#sx8):not(#sx9):not(#sx10):not(#sx11):not(#sx12):not(#sx13):not(#sx14):not(#sx15):not(#sx16):not(#sx17):not(#sx18):not(#sx19):not(#sx20):not(#sx21):not(#sx22):not(#sx23):not(#sx24):not(#sx25):not(#sx26):not(#sx27):not(#sx28):not(#sx29):not(#sx30):not(#sx31):not(#sx32):not(#sx33):not(#sx34):not(#sx35):not(#sx36):not(#sx37):not(#sx38):not(#sx39):not(#sx40) body .fm-popdlg .fm-card--out .fm-kid.fm-kid--logout:focus-visible {
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: 100% !important; box-sizing: border-box; margin: 0; padding: 10px 14px !important;
  border: 0 !important; border-radius: 12px !important;
  background: var(--sel, var(--pe-accent, var(--accent, #1f6fe5))) !important; background-image: none !important;
  color: var(--sel-ink, #fff) !important; text-align: center !important; font-weight: 500;
}
html:not(#sx0):not(#sx1):not(#sx2):not(#sx3):not(#sx4):not(#sx5):not(#sx6):not(#sx7):not(#sx8):not(#sx9):not(#sx10):not(#sx11):not(#sx12):not(#sx13):not(#sx14):not(#sx15):not(#sx16):not(#sx17):not(#sx18):not(#sx19):not(#sx20):not(#sx21):not(#sx22):not(#sx23):not(#sx24):not(#sx25):not(#sx26):not(#sx27):not(#sx28):not(#sx29):not(#sx30):not(#sx31):not(#sx32):not(#sx33):not(#sx34):not(#sx35):not(#sx36):not(#sx37):not(#sx38):not(#sx39):not(#sx40) body .fm-popdlg .fm-card--out .fm-kid.fm-kid--logout b {
  flex: none; color: inherit !important; text-align: center; font-weight: inherit;
}
html:not(#sx0):not(#sx1):not(#sx2):not(#sx3):not(#sx4):not(#sx5):not(#sx6):not(#sx7):not(#sx8):not(#sx9):not(#sx10):not(#sx11):not(#sx12):not(#sx13):not(#sx14):not(#sx15):not(#sx16):not(#sx17):not(#sx18):not(#sx19):not(#sx20):not(#sx21):not(#sx22):not(#sx23):not(#sx24):not(#sx25):not(#sx26):not(#sx27):not(#sx28):not(#sx29):not(#sx30):not(#sx31):not(#sx32):not(#sx33):not(#sx34):not(#sx35):not(#sx36):not(#sx37):not(#sx38):not(#sx39):not(#sx40) body .fm-popdlg .fm-card--out .fm-kid.fm-kid--logout:hover { filter: brightness(1.08); }

/* Wallet popup: the passkey step, then the balance, earnings, records sold and the latest transactions. */
html body .fm-popdlg .wl-gate { padding: 12px 4px 4px; }
html body .fm-popdlg .wl-k { margin: 4px 2px; color: var(--muted); font-size: 12px; }
html body .fm-popdlg .wl-bal { margin: 0 2px 12px; font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
html body .fm-popdlg .wl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
html body .fm-popdlg .wl-stats div { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
html body .fm-popdlg .wl-stats small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
html body .fm-popdlg .wl-stats b { font-size: 16px; font-weight: 600; }
html body .fm-popdlg .wl-tx { list-style: none; margin: 0; padding: 0; }
html body .fm-popdlg .wl-tx li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
html body .fm-popdlg .wl-tx li span { display: flex; flex-direction: column; min-width: 0; }
html body .fm-popdlg .wl-tx small { color: var(--muted); font-size: 12px; }
html body .fm-popdlg .wl-empty { margin: 8px 2px; color: var(--muted); font-size: 14px; }
