.view-profile {
  --profile-gap: 5px;
  --profile-canvas: #1a1d23;
  --profile-tile: #22262d;
  --profile-ink: #f2f4f8;
  --profile-muted: #aab1bd;
  color: var(--profile-ink);
}
.profile-overview, .profile-balances {
  background: var(--profile-canvas);
  padding: 14px;
  border-radius: 24px;
}
.profile-overview { position: relative; border-radius: 24px 24px 14px 14px; }
.profile-balances { border-radius: 14px; }
.profile-status { display: flex; align-items: center; gap: 12px; }
.profile-identity {
  position: relative;
  padding: 18px 12px 20px;
  text-align: center;
}
.profile-id-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
  overflow: hidden;
  border-radius: 50%;
  background: #2a2a2d;
  box-shadow: 0 0 0 4px #ffffff1a;
  color: #f2f4f8;
  font-size: 44px;
  font-weight:600;
}
.profile-id-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-identity h1 { margin: 0; font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
.profile-identity p {
  display: inline-block;
  margin: 9px 0 0;
  padding: 6px 14px;
  border-radius: 99px;
  background: #ffffff17;
  color: #ffffffcc;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-balances h2 { margin: 0; font-size: 20px; font-weight: 550; }
.profile-status { margin-top: 14px; justify-content: space-between; font-size: 13px; }
.profile-status .profile-control {
  flex: none;
  min-height: 34px;
  padding-inline: 10px;
  border: 0;
  border-radius: 9px;
  background: #2a2d33;
  color: var(--profile-ink);
  font-size: 13px;
  font-weight: 500;
}
.profile-status .profile-control:hover { background: #353942; }
.profile-status .profile-control:focus-visible {
  outline: 2px solid var(--profile-muted);
  outline-offset: 2px;
}
.profile-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 12px; }
.profile-metrics > div { display: grid; gap: 3px; padding: 10px 12px; background: var(--profile-tile); }
.profile-metrics > div:first-child { border-radius: 13px 6px 6px 13px; }
.profile-metrics > div:last-child { border-radius: 6px 13px 13px 6px; }
.profile-metrics small { color: var(--profile-muted); font-size: 13px; }
.profile-metrics strong { font-weight: 550; }
.profile-balances { margin-top: var(--profile-gap); }
.profile-balance-rows { display: grid; gap: 5px; margin-top: 10px; }
.profile-balance-row {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--profile-tile);
}
.profile-balance-row strong { font-weight: 550; }
.profile-detail { margin-top: 5px; }
.profile-detail > summary {
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--profile-canvas);
  cursor: pointer;
}
.profile-detail:first-of-type > summary { border-radius: 14px 14px 6px 6px; }
.profile-detail:last-of-type:not([open]) > summary { border-radius: 6px 6px 14px 14px; }
body:has(.view-profile) .snow-layer { display: none; }
.profile-shortcuts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--profile-gap);
  margin-top: var(--profile-gap);
}
.profile-shortcuts > button {
  min-width: 0;
  min-height: 46px;
  padding: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--profile-tile);
  color: var(--profile-ink);
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 450;
}
.profile-shortcuts > button:first-child { border-radius: 6px 6px 6px 24px; }
.profile-shortcuts > button:last-child { border-radius: 6px 6px 24px 6px; }
.profile-shortcuts > button:hover,
.profile-shortcuts > button[aria-expanded=true] { background: #29313e; color: #b7d1ff; }
.profile-shortcut-icon {
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  mask: center / contain no-repeat;
}
.profile-detail[hidden] { display: none !important; }
.profile-portfolio > summary {
  border-radius: 0;
  background: transparent;
  color: var(--profile-muted);
  font-size: 13px;
  padding: 10px 12px;
}
@media (max-width: 600px) {
  body:has(.view-profile) .workspace,
  body:has(.view-profile) .topbar,
  #content.view-profile {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body:has(.view-profile) .account-tools { flex: 1 1 auto; justify-content: flex-end; gap: 5px; }
  body:has(.view-profile) .account-tools .choice-control { min-width: 0; }
  body:has(.view-profile) .dock-search { flex: 0 0 36px; width: 36px; }
  .profile-identity > div { min-width: 0; overflow-wrap: anywhere; }
  .profile-shortcuts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-shortcuts > button { flex-direction: column; flex-wrap: nowrap; font-size: clamp(9px, 2.8vw, 12px); }
  .profile-shortcuts > button > span:last-child { max-width: 100%; }
}
.profile-shortcuts { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; grid-template-columns: none; }
.profile-overview .profile-status {
  min-height: 46px;
  padding: 4px 5px 4px 12px;
  border-radius: 14px 14px 6px 6px;
  background: var(--profile-tile);
}
.profile-overview .profile-metrics { margin-top: var(--profile-gap); }
.profile-overview .profile-metrics > div:first-child { border-radius: 6px 6px 6px 14px; }
.profile-overview .profile-metrics > div:last-child { border-radius: 6px 6px 14px 6px; }
.profile-balance-row { border-radius: 6px; }
.profile-balance-row:first-child { border-radius: 14px 14px 6px 6px; }
.profile-balance-row:last-child { border-radius: 6px 6px 14px 14px; }
.profile-balance-row:only-child { border-radius: 14px; }
.profile-overview { padding: 0; background: transparent; }
.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  isolation: isolate;
  overflow: hidden;
  padding: 22px 14px 12px;
  border-radius: 28px 28px 14px 14px;
  text-align: center;
  background: #1a1d23;
}
.profile-identity::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 50%;
  z-index: -1;
  width: 280px;
  height: 160px;
  background: url("/static/profile-pattern-field.svg") center / contain no-repeat;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.profile-id-avatar {
  flex: none;
  width: 70px;
  height: 70px;
  margin: 0;
  background: #28282a;
  box-shadow: none;
  color: #ddd;
  font-size: 26px;
}
.profile-identity h1 { font-size: 15px; font-weight: 650; letter-spacing: 0; }
.profile-identity p {
  margin: 3px 0 0;
  padding: 0;
  background: none;
  color: #8db9ff;
  font-size: 12px;
  font-weight: 450;
}
.profile-overview-data {
  margin-top: var(--profile-gap);
  padding: 10px;
  border-radius: 14px;
  background: var(--profile-canvas);
}
.profile-overview-data .profile-status { margin-top: 0; }

/* Apply the profile surface colors to the shared shell and subscriptions. */
body { background: #000; }
.topbar, .topbar.is-scrolled { background: #1a1d23 !important; }
.account-tools .dock-search,
.account-tools .choice-trigger { background-color: #22262d; color: #f2f4f8; }
.mavro-dock #navigation,
.mavro-dock.compact #navigation { background: #1a1d23; }
.mavro-dock .dock-tab { color: #aab1bd; }
.mavro-dock .dock-tab[aria-current=page],
.mavro-dock.compact .dock-tab[aria-current=page] {
  background: #2a2d33;
  color: #f2f4f8;
}
.view-subscriptions .mavro-hero[data-wallpaper="default"] {
  background: #1a1d23;
  box-shadow: none;
}
.view-subscriptions .mavro-hero[data-wallpaper="default"]::before { background: none; }
.view-subscriptions .mavro-hero[data-wallpaper="default"] .hero-state,
.view-subscriptions .mavro-hero[data-wallpaper="default"] .hero-control,
.view-subscriptions .mavro-hero[data-wallpaper="default"] .hero-wallpaper,
.view-subscriptions .stat-tile,
.view-subscriptions .search-field input,
.view-subscriptions .choice-trigger {
  background: #22262d;
  color: #f2f4f8;
  box-shadow: none;
}
.view-subscriptions .search-field input::placeholder { color: #aab1bd; }

.topbar, .topbar.is-scrolled {
  width: min(100% - 24px, 1120px);
  margin: 6px auto 8px;
  min-height: 56px;
  padding: 5px 6px 5px 14px;
  gap: 8px;
  border-radius: 24px;
  background: #1a1d23 !important;
  box-shadow: none;
}
.topbar .mobile-brand { flex: 0 0 auto; color: #f2f4f8; }
.topbar .account-tools {
  display: flex;
  flex: 0 1 auto;
  gap: 4px;
  max-width: min(72%, 280px);
  min-width: 0;
  background: transparent;
}
.topbar .account-tools .choice-control { flex: 1 1 auto; min-width: 0; }
.topbar .account-tools .choice-trigger {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: 8px 17px 17px 8px !important;
  background: #2a2d33 !important;
}
.topbar .account-tools .choice-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .account-tools .dock-search {
  flex: 0 0 38px;
  width: 38px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aab1bd;
}
.topbar .account-tools .dock-search:hover { background: #2a2d33; }
.topbar .dock-search .icon { width: 19px; height: 19px; }
.mavro-dock #navigation {
  gap: 4px;
  border-radius: 22px 22px 0 0;
}
.mavro-dock .dock-tab { border-radius: 8px; }
.mavro-dock .dock-tab:first-child { border-radius: 17px 8px 8px 17px; }
.mavro-dock .dock-tab:last-child { border-radius: 8px 17px 17px 8px; }
.mavro-dock.compact #navigation { border-radius: 99px; }
@media (max-width: 600px) {
  body:has(.view-profile) .topbar { width: calc(100% - 24px); }
  body:has(.view-profile) .topbar .account-tools { flex: 0 1 auto; gap: 4px; }
}
.dock-search-glyph {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
}

.topbar, .topbar.is-scrolled {
  width: 100%;
  max-width: none;
  min-height: calc(68px + var(--safe-top));
  margin: 0 0 8px;
  padding: calc(5px + var(--safe-top)) 6px 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-radius: 0 0 22px 22px;
}
.topbar .mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-width: 0;
}
.topbar .account-tools,
body:has(.view-profile) .topbar .account-tools { display: contents; }
.topbar .account-tools .dock-search,
body:has(.view-profile) .topbar .account-tools .dock-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 56px;
  border-radius: 8px;
  font-size: 11px;
}
.topbar .account-tools .choice-control {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.topbar .account-tools .choice-trigger {
  height: 56px;
  padding: 4px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-radius: 8px 17px 17px 8px !important;
}
.topbar .account-tools .choice-trigger .choice-art { width: 22px; height: 22px; min-width: 22px; }
.topbar .account-tools .choice-trigger-label { display: block; max-width: 100%; font-size: 11px; }
@media (max-width: 600px) {
  body:has(.view-profile) .topbar { width: 100%; }
}

.gift-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 7px 6px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: #2e333c;
  color: #a9b0bc;
}
.gift-search-input { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.gift-search-input .dock-search-glyph { flex: 0 0 18px; }
.gift-search input,
.gift-search input:hover,
.gift-search input:focus {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.gift-search input::placeholder { color: #959ca8; }
.gift-search input::-webkit-search-cancel-button { display: none; }
.gift-search .gift-search-clear { width: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; }
.gift-search .gift-search-clear[hidden] { display: none; }
.gift-search-shortcuts { display: flex; gap: 5px; min-width: 0; flex: 0 1 auto; }
.gift-search-shortcuts button {
  display: flex;
  min-width: 0;
  min-height: 34px;
  gap: 5px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: #232730;
  color: #e9ebf1;
  font-size: 13px;
  font-weight: 450;
}
.gift-search-shortcuts button:first-child { border-radius: 17px 9px 9px 17px; }
.gift-search-shortcuts button:last-child { border-radius: 9px 17px 17px 9px; }
.gift-search-shortcuts button[aria-pressed=true] { background: #42516a; }
.gift-search-shortcuts button img { flex: none; object-fit: contain; }
.gift-search-shortcuts button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .gift-search { display: grid; padding: 5px 7px 7px; }
  .gift-search-input { padding-inline: 5px; }
  .gift-search-shortcuts button { flex: 1; padding-inline: 5px; font-size: 12px; }
}

.topbar, .topbar.is-scrolled {
  grid-template-columns: minmax(0, 1fr) minmax(44px, 30%) auto;
  align-items: center;
  min-height: calc(60px + var(--safe-top));
  padding: calc(7px + var(--safe-top)) 9px 8px;
  gap: 6px;
}
.topbar-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 42px;
  border-radius: 15px;
  background: #22262d;
  color: #aab1bd;
}
.topbar-search .dock-search-glyph { flex: 0 0 16px; height: 16px; }
.topbar-search input,
.topbar-search input:hover,
.topbar-search input:focus {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f2f4f8;
  font-size: 13px;
}
.topbar-search input::placeholder { color: #aab1bd; }
.topbar .account-tools .choice-trigger {
  height: 42px;
  min-height: 42px;
  flex-direction: row;
  padding-inline: 5px;
  border-radius: 15px !important;
}
.topbar .topbar-create {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #22262d;
  color: #aab1bd;
}
.topbar .topbar-create:hover { background: #2a2d33; color: #f2f4f8; }
.topbar-create-glyph {
  width: 15px;
  height: 15px;
  background: linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat;
}
.topbar .topbar-create[hidden] { display: none; }

/* Connected controls use a larger radius only at the ends of the group. */
.topbar, .topbar.is-scrolled { gap: 3px; }
.topbar .topbar-search {
  border-radius: 17px 6px 6px 17px;
  background: #22262d;
}
.topbar .account-tools .choice-trigger {
  border-radius: 6px !important;
  background: #22262d !important;
}
.topbar .topbar-create { border-radius: 6px 17px 17px 6px; }
.topbar:has(.topbar-create[hidden]) {
  grid-template-columns: minmax(0, 1fr) minmax(44px, 30%);
}
.topbar:has(.topbar-create[hidden]) .account-tools .choice-trigger {
  border-radius: 6px 17px 17px 6px !important;
}
.topbar, .topbar.is-scrolled {
  grid-template-columns: minmax(0, 1fr) clamp(92px, 22%, 138px) auto;
}
.topbar:has(.topbar-create[hidden]) {
  grid-template-columns: minmax(0, 1fr) clamp(92px, 22%, 138px);
}
.topbar .account-tools .choice-trigger,
.topbar .account-tools .choice-trigger:disabled {
  gap: 5px;
  opacity: 1;
  background: #22262d !important;
  color: #aab1bd;
}
.topbar .account-tools .choice-trigger-label {
  min-width: 0;
  color: #aab1bd;
  font-weight: 450;
}
.topbar, .topbar.is-scrolled {
  grid-template-columns: minmax(0, 1fr) max-content auto;
  padding-inline: clamp(9px, 5vw, 36px);
}
.topbar:has(.topbar-create[hidden]) {
  grid-template-columns: minmax(0, 1fr) max-content;
}
.topbar .account-tools .choice-trigger { padding-inline: 8px; }
.topbar .account-tools .choice-trigger-label {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
@media (max-width: 360px) {
  .topbar .account-tools .choice-trigger:has(.choice-trigger-label) .choice-art { display: none; }
}

.view-profile .profile-detail:not([hidden]) { margin-top: 9px; }
.view-profile .profile-detail .section-caption { margin: 12px 0 6px; font-size: 15px; font-weight: 550; }
.view-profile .profile-detail .section-caption:first-child { margin-top: 0; }
#profile-diagnostics .section-caption-rps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
#profile-diagnostics .section-caption-rps > span:first-child { flex: 1 1 auto; }
#profile-diagnostics .diagnostics-refresh {
  min-height: 32px;
  padding: 3px 8px;
  border-radius: 9px;
  font-size: 11px;
}
#profile-diagnostics .reader-list, #profile-connections .profile-grid { gap: 5px; }
#profile-diagnostics .reader-card,
#profile-connections .market-card,
#profile-connections .trading-buyer-card {
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #1a1d23;
  box-shadow: none;
}
#profile-diagnostics .reader-card:first-child,
#profile-connections .profile-grid > :first-child { border-radius: 18px 18px 8px 8px; }
#profile-diagnostics .reader-card:last-child,
#profile-connections .profile-grid > :last-child { border-radius: 8px 8px 18px 18px; }
#profile-diagnostics .reader-head { margin: 0; }
#profile-diagnostics .reader-main { margin: 7px 0; gap: 6px; min-height: 0; }
#profile-diagnostics .reader-rps { margin: 0; gap: 5px; }
#profile-diagnostics .reader-rps strong { font-size: 24px; font-weight: 650; }
#profile-diagnostics .reader-trend { min-width: 0; }
#profile-diagnostics .reader-trend small { font-size: 11px; }
#profile-diagnostics .reader-metrics { gap: 4px; }
#profile-diagnostics .reader-metrics > div {
  padding: 7px 6px;
  border-radius: 6px;
  background: #22262d;
}
#profile-diagnostics .reader-metrics > :first-child { border-radius: 12px 6px 6px 12px; }
#profile-diagnostics .reader-metrics > :last-child { border-radius: 6px 12px 12px 6px; }
#profile-diagnostics .reader-metrics small { font-size: 10px; }
#profile-diagnostics .reader-metrics strong { font-size: 14px; font-weight: 600; }
#profile-diagnostics .setting-hint { margin: 6px 0 0; font-size: 11px; }
#profile-settings .setting-list { display: grid; gap: 5px; }
#profile-settings .setting-row {
  min-height: 56px;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: #22262d;
  box-shadow: none;
}
#profile-settings .setting-list > :first-child { border-radius: 16px 16px 8px 8px; }
#profile-settings .setting-list > :last-child { border-radius: 8px 8px 16px 16px; }
#profile-settings .setting-row .setting-icon { width: 30px; height: 30px; flex-basis: 30px; }
#profile-settings .setting-text strong { font-size: 14px; font-weight: 600; }
#profile-settings .setting-text small { font-size: 12px; line-height: 1.3; }
#profile-connections .market-card h2 { font-size: 16px; font-weight: 600; }
#profile-connections .market-info { gap: 5px; margin-block: 8px; }
#profile-connections .market-info > div { padding: 8px; background: #22262d; border-radius: 8px; }
#profile-connections .market-info strong { font-size: 14px; }
#profile-connections .connection-token { margin-top: 7px; }
#profile-connections .connection-token > summary {
  border-radius: 10px;
  padding: 8px 10px;
  background: #22262d;
  cursor: pointer;
  font-size: 13px;
}
#profile-connections .connection-token form { margin-top: 8px; }
#profile-connections .market-card .actions button { min-height: 36px; border-radius: 10px; font-size: 12px; }
#profile-connections .credential-note { margin: 8px 0 0; font-size: 11px; }
.view-profile .profile-shortcuts button {
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .view-profile .profile-shortcuts button { transition: none; }
}

#profile-connections .connection-card .market-card-head { margin-bottom: 8px; }
.connection-facts { margin: 0; display: grid; gap: 3px; }
.connection-facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 6px;
  background: #22262d;
}
.connection-facts > div:first-child { border-radius: 11px 11px 6px 6px; }
.connection-facts > div:last-child { border-radius: 6px 6px 11px 11px; }
.connection-facts dt { color: #aab1bd; font-size: 12px; }
.connection-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 13px; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.connection-actions button { min-height: 34px; padding: 3px 9px; border-radius: 8px; font-size: 12px; }
.connection-actions button.plain { background: #2a2d33; }
#profile-settings .adm-entry {
  min-height: 54px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: #22262d;
}
#profile-settings .adm-entry-icon { width: 30px; height: 30px; flex-basis: 30px; background: #2a2d33; }
#profile-settings .adm-entry-text strong { font-size: 14px; font-weight: 600; }
#profile-settings .adm-entry-text small { font-size: 12px; font-weight: 450; }
#profile-settings .setting-text p { margin: 1px 0 0; font-size: 12px; }
#profile-diagnostics .reader-main { align-items: center; }
#profile-diagnostics .reader-rps { flex-direction: row; align-items: baseline; }
#profile-diagnostics .reader-rps span { font-size: 11px; font-weight: 500; }
#profile-diagnostics .reader-card .reader-trend:has(.reader-spark:empty) { display: none; }
#profile-diagnostics .reader-card .reader-metrics > div { background: #22262d; }

.connection-form { display: grid; gap: 12px; }
.connection-token-field {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 14px;
  border: 1px solid #3b414b;
  border-radius: 16px;
  background: #1a1d23;
}
.connection-token-field > span { color: #aab1bd; font-size: 13px; font-weight: 500; }
.connection-form .connection-token-field input,
.connection-form .connection-token-field input:focus,
.connection-form .connection-token-field input:hover {
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #f2f4f8;
  font-size: 16px;
}
.connection-token-field:focus-within { border-color: #6a92ce; }
.connection-form .form-error:empty { display: none; }
.connection-form .connection-actions { display: grid; gap: 6px; margin: 0; }
.connection-form .connection-actions button.primary,
.connection-form .connection-actions button.primary:hover:not(:disabled) {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  background: #3b82ee;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.connection-form .connection-actions button.text-button {
  justify-self: center;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  color: #aab1bd;
}

.dialog-panel .dialog-head h2 {
  font: 550 19px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -.025em;
}
.dialog-panel .dialog-head .glass-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: rgb(255 255 255 / 5%);
  box-shadow: 0 0 10px rgb(0 0 0 / 10%);
  backdrop-filter: blur(8px);
}
.glass-close::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  background: linear-gradient(8deg, transparent, rgb(255 255 255 / 32%) 35% 65%, transparent);
}
.glass-close img { display: block; width: 28px; height: 28px; filter: brightness(0) invert(1); }


.view-subscriptions .subscription-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  min-height: 0;
  gap: 7px;
  padding: 10px 12px 12px;
  border-radius: 22px;
}
.subscription-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.subscription-status-head h2 { margin: 0; font-size: 15px; font-weight: 550; }
.subscription-status-head .hero-wallpaper { width: 30px; min-height: 30px; height: 30px; padding: 0; }
.subscription-status-focus { text-align: center; padding-bottom: 4px; }
.subscription-count { line-height: 1; font-variant-numeric: tabular-nums; }
.subscription-count strong { font-size: 42px; font-weight: 600; letter-spacing: -.05em; }
.subscription-count span { color: #aab1bd; font-size: 20px; }
.subscription-status-caption { margin: 4px 0 7px; color: #aab1bd; font-size: 12px; }
.subscription-status-focus .hero-state { margin: 0; padding: 3px 8px; min-height: 23px; font-size: 11px; }
.subscription-status-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.subscription-secondary-stats { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; }
.subscription-secondary-stats > span { display: grid; align-content: center; gap: 2px; min-width: 0; padding: 5px 6px; border-radius: 6px; background: #22262d; }
.subscription-secondary-stats > span:first-child { border-radius: 13px 6px 6px 13px; }
.subscription-secondary-stats > span:last-child { border-radius: 6px 13px 13px 6px; }
.subscription-secondary-stats small { color: #aab1bd; font-size: 10px; }
.subscription-secondary-stats strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.subscription-status-foot .subscription-power { min-height: 36px; border: 0; padding: 3px 8px; border-radius: 99px; background: #2a2d33; font-size: 11px; gap: 4px; }
.subscription-status-foot .subscription-power .icon { width: 13px; height: 13px; }
.subscription-search-surface { margin-top: 8px; padding: 5px; border-radius: 16px; background: #1a1d23; }
.view-subscriptions .subscription-search-surface .search-field input { border-radius: 12px 12px 6px 6px; min-height: 39px; font-size: 14px; }
.subscription-filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; margin: 4px 0 0; }
.subscription-filter-grid .choice-control { min-width: 0; }
.view-subscriptions .subscription-filter-grid .choice-trigger { width: 100%; min-width: 0; min-height: 32px; border-radius: 6px !important; padding: 3px 8px; font-size: 12px; }
.view-subscriptions .subscription-filter-grid > :nth-last-child(2) .choice-trigger { border-bottom-left-radius: 12px !important; }
.view-subscriptions .subscription-filter-grid > :last-child .choice-trigger { border-bottom-right-radius: 12px !important; }
body:has(.view-subscriptions) .snow-layer { display: none; }

.subscription-control-group { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px; }
.subscription-mode {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 9px;
  border-radius: 12px 6px 6px 12px;
  background: #22262d;
  color: #aab1bd;
  font-size: 11px;
}
.subscription-mode:only-child { border-radius: 12px; }
.subscription-control-group .subscription-power {
  min-height: 34px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px 12px 12px 6px;
  background: #2a2d33;
  font-size: 11px;
  gap: 5px;
}
.subscription-control-group .subscription-power .icon { width: 14px; height: 14px; }
.view-subscriptions .subscription-filter-grid .choice-trigger {
  background: #22262d !important;
  border: 0 !important;
}
.batch-dialog .batch-lead {
  padding: 8px 10px;
  margin: 0 0 8px;
  border-radius: 12px;
  background: #22262d;
  font-size: 12px;
}
.batch-dialog .batch-group {
  margin: 0 0 5px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #22262d;
}
.batch-dialog .batch-group h3 {
  margin: 0 0 5px;
  color: #f2f4f8;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}
.batch-dialog .batch-row + .batch-row { margin-top: 4px; }
.batch-dialog .batch-row-label { font-size: 12px; color: #aab1bd; }
.batch-dialog .batch-chips { gap: 3px; }
.batch-dialog .batch-chip {
  min-height: 33px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: #2a2d33;
  font-size: 12px;
}
.batch-dialog .batch-chip:first-child { border-radius: 12px 6px 6px 12px; }
.batch-dialog .batch-chip:last-child { border-radius: 6px 12px 12px 6px; }
.batch-dialog .batch-chip:only-child { border-radius: 12px; }
.batch-dialog .batch-chip[aria-pressed=true] { background: #42516a; color: #f2f4f8; }
.subscription-editor-field { margin: 0 0 7px; }
.subscription-editor-input {
  display: grid;
  gap: 1px;
  padding: 7px 12px;
  border: 1px solid #3b414b;
  border-radius: 14px;
  background: #1a1d23;
}
.subscription-editor-input > span { color: #aab1bd; font-size: 12px; }
.subscription-editor-input:focus-within { border-color: #6a92ce; }
.subscription-editor .subscription-editor-input input,
.subscription-editor .subscription-editor-input input:focus,
.subscription-editor .subscription-editor-input input:hover {
  height: 24px;
  min-height: 24px;
  padding: 0;
  outline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f2f4f8;
  font-size: 15px;
}
.subscription-editor-field > small { display: block; padding: 4px 4px 0; color: #aab1bd; font-size: 11px; }
.subscription-editor .editor-analytics-tools {
  padding: 7px;
  border: 0;
  border-radius: 12px;
  background: #22262d;
}
.subscription-editor .editor-analytics-buttons { gap: 4px; }
.subscription-editor .editor-analytics-buttons button { min-height: 35px; border-radius: 8px; background: #2a2d33; font-size: 11px; }
.batch-dialog .dialog-actions button.primary,
.subscription-editor .dialog-actions button.primary,
.batch-dialog .dialog-actions button.primary:hover:not(:disabled),
.subscription-editor .dialog-actions button.primary:hover:not(:disabled) {
  min-height: 44px;
  background: #3b82ee;
  color: white;
}
.batch-dialog .dialog-actions button.plain,
.subscription-editor .dialog-actions button.plain { min-height: 44px; background: #22262d; }

.dialog-panel:has(.batch-dialog),
.dialog-panel:has(.batch-dialog) .dialog-body {
  scrollbar-width: none;
}
.dialog-panel:has(.batch-dialog)::-webkit-scrollbar,
.dialog-panel:has(.batch-dialog) .dialog-body::-webkit-scrollbar { display: none; }
.dialog-panel:has(.batch-dialog)::before,
#modal:has(.batch-dialog)::before { display: none; }
.dialog-panel:has(.batch-dialog) .dialog-head {
  min-height: 55px;
  padding-top: 6px;
  padding-bottom: 6px;
  background: #1a1d23;
  box-shadow: none;
}
.dialog-panel:has(.batch-dialog) .batch-dialog > .dialog-actions:last-child {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0;
  background: #1a1d23;
}
.batch-dialog .dialog-actions button.primary {
  display: flex;
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
}
.dialog-panel:has(.batch-dialog) .dialog-head::before { display: none; }
.dialog-panel:has(.batch-dialog) .dialog-body { scrollbar-gutter: auto; }

.dialog-panel.is-scrolled .dialog-head { box-shadow: none; }
.dialog-panel .dialog-head { border-bottom-color: transparent; }
.dialog-panel.is-scrolled .dialog-head::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--sheet, #1a1d23), transparent);
}
.dialog-panel.has-more-below .dialog-body > .dialog-actions:last-child,
.dialog-panel.has-more-below .dialog-body > form:last-child > .dialog-actions:last-child {
  border-top-color: transparent;
}
.dialog-panel.has-more-below .dialog-body > .dialog-actions:last-child::before,
.dialog-panel.has-more-below .dialog-body > form:last-child > .dialog-actions:last-child::before {
  content: "";
  position: absolute;
  inset: auto 0 100%;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to top, var(--sheet, #1a1d23), transparent);
}

.subscription-editor .collection-field { margin: 0 0 7px; }
.subscription-editor .collection-field .choice-control { width: 100%; }
.subscription-editor .collection-field .choice-trigger,
.subscription-editor .collection-field .choice-trigger:hover:not(:disabled),
.subscription-editor .collection-field .choice-trigger[aria-expanded=true] {
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none;
  color: #f2f4f8;
  font-size: 15px;
  font-weight: 450;
}
.subscription-editor .subscription-editor-input { min-height: 57px; }
.subscription-editor .editor-analytics-tools,
.subscription-editor .backdrop-prices { margin-block: 8px; }
.dialog-panel:has(.subscription-editor) .dialog-body,
.dialog-panel:has(.wallpaper-dialog) .dialog-body {
  scrollbar-width: none;
  scrollbar-gutter: auto;
}
.wallpaper-dialog .wallpaper-grid { gap: 6px; }
.wallpaper-dialog .wallpaper-option { border-radius: 12px; }
.wallpaper-dialog .wallpaper-option[hidden] { display: none; }
.wallpaper-dialog .wallpaper-option[data-id=default] {
  aspect-ratio: auto;
  min-height: 64px;
  background: #22262d;
}
.wallpaper-dialog .wallpaper-option[data-id=default] span {
  position: static;
  display: block;
  padding: 12px;
  background: none;
}

.choice-popover.choice-segmented.is-sheet { padding: 10px 12px calc(10px + var(--safe-bottom)) !important; }
.choice-segmented .choice-grabber { display: none; }
.choice-segmented .choice-sheet-title { padding: 4px 4px 8px; font-size: 15px; font-weight: 550; }
.choice-popover.choice-segmented .choice-options {
  display: grid;
  gap: 3px;
  padding: 0 !important;
  scrollbar-width: none;
}
.choice-popover.choice-segmented .choice-option {
  min-height: 41px;
  padding: 6px 10px;
  border-radius: 6px !important;
  background: #22262d;
  color: #f2f4f8;
  font-size: 13px;
  font-weight: 450;
}
.choice-popover.choice-segmented .choice-option:first-of-type { border-radius: 14px 14px 6px 6px !important; }
.choice-popover.choice-segmented .choice-option:last-of-type { border-radius: 6px 6px 14px 14px !important; }
.choice-popover.choice-segmented .choice-option:hover:not(:disabled) { background: #2a2d33; }
.choice-popover.choice-segmented .choice-option[aria-selected=true] { background: #29364a; color: #d3e2ff; }
.choice-popover.choice-segmented .choice-option .choice-check { width: 15px; height: 15px; }
.view-subscriptions .subscription-wallpaper-button,
.view-subscriptions .subscription-wallpaper-button:active:not(:disabled) {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #22262d;
  color: #aab1bd;
  transform: none;
  transition: background-color .16s ease, color .16s ease;
}
.view-subscriptions .subscription-wallpaper-button:hover:not(:disabled) { background: #2a2d33; color: #f2f4f8; }

body:has(.view-history) .snow-layer { display: none; }
.view-history .page-heading { margin-bottom: 8px; }
.view-history .page-heading h1 { font-size: 24px; font-weight: 600; }
.view-history .page-heading > .actions button { width: 36px; height: 36px; min-height: 36px; border-radius: 12px; }
.history-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  padding: 5px;
  border-radius: 16px;
  background: #1a1d23;
}
.history-summary-metrics > div { display: grid; gap: 2px; padding: 7px 10px; background: #22262d; }
.history-summary-metrics > :first-child { border-radius: 11px 6px 6px 11px; }
.history-summary-metrics > :last-child { border-radius: 6px 11px 11px 6px; }
.history-summary-metrics small { color: #aab1bd; font-size: 11px; }
.history-summary-metrics strong { font-size: 16px; font-weight: 600; }
.view-history .history-controls { gap: 5px; margin: 6px 0 8px; }
.view-history .history-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0,1fr);
  gap: 3px;
  padding: 4px;
  border-radius: 15px;
  background: #1a1d23;
  box-shadow: none;
}
.view-history .history-tabs.has-glider button {
  min-width: 0;
  min-height: 44px;
  padding: 3px 1px;
  gap: 1px;
  flex-direction: column;
  border-radius: 6px;
  background: #22262d !important;
  color: #aab1bd;
  font-size: clamp(9px, 2.8vw, 13px);
  white-space: normal;
  line-height: 1.1;
}
.view-history .history-tabs.has-glider button:first-of-type { border-radius: 11px 6px 6px 11px; }
.view-history .history-tabs.has-glider button:last-of-type { border-radius: 6px 11px 11px 6px; }
.view-history .history-tabs.has-glider button[aria-pressed=true] {
  background: transparent !important;
  color: #e2eaff;
}
.view-history .history-tab-glider { background: #34425a; border-radius: 8px; }
.view-history .history-tab-count,
.view-history .history-tabs button[aria-pressed=true] .history-tab-count {
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 10px;
}
.view-history .history-search-row { max-width: none; }
.view-history .history-search > input { min-height: 44px; border-radius: 15px; font-size: 13px; }
.view-history .history-search .history-market .choice-trigger { border-radius: 7px 11px 11px 7px !important; background: #22262d !important; }
.history-empty {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border-radius: 15px;
  background: #1a1d23;
}
.history-empty-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 10px; background: #22262d; color: #aab1bd; }
.history-empty h2 { margin: 0; font-size: 14px; font-weight: 600; }
.history-empty p { margin: 2px 0 0; color: #aab1bd; font-size: 12px; }
.view-history .purchase-card { border-radius: 15px; background: #1a1d23; }
.view-history .history-tabs {
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
}
.view-history .history-tabs.has-glider button {
  min-height: 34px;
  flex-direction: row;
  gap: 4px;
  padding: 3px 4px;
  background: transparent !important;
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 500;
}
.view-history .history-tabs.has-glider button[aria-pressed=true] { color: #f2f4f8; }
:root[data-accent] .view-history .history-tab-glider,
.view-history .history-tab-glider { background: #2a2d33; border-radius: 8px; }
.view-history .history-tab-count:empty { display: none; }
.choice-segmented .choice-option .choice-art {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  background: #2a2d33;
}
.choice-segmented .choice-option .choice-art img { width: 16px; height: 16px; }
.choice-segmented .choice-option[aria-selected=true] .choice-check {
  border-color: #b7d1ff;
  background-color: #b7d1ff;
}
