:root {
  --ui-accent: #8af0d0;
  --desk: #17191f;
  --sheet: #20232b;
  --edge: #343842;
  --faded: #a8aebb;
}
html[data-theme="midnight"] {
  --desk: #0c1017;
  --sheet: #141b25;
  --side: #101722;
  --bg: #080c13;
  --panel: #161d27;
}
html[data-theme="plum"] {
  --desk: #221e2a;
  --sheet: #302938;
  --side: #28222f;
  --bg: #201b26;
  --panel: #302936;
}
html[data-accent="lilac"] {
  --mint: #ceb6ff;
  --ui-accent: #ceb6ff;
}
html[data-accent="blue"] {
  --mint: #91caff;
  --ui-accent: #91caff;
}
html[data-accent="peach"] {
  --mint: #ffb99b;
  --ui-accent: #ffb99b;
}
html[data-text-size="large"] .bodytext,
html[data-text-size="large"] .person-row {
  font-size: 1.08rem;
}
html[data-text-size="small"] .bodytext {
  font-size: 0.8rem;
}
html[data-spacing="compact"] .msg {
  padding-block: 3px;
}
.no-times .msghead time {
  display: none;
}
.quiet-motion * {
  animation: none !important;
  transition: none !important;
}
html[data-theme] #main,
html[data-theme] #composer {
  background: var(--desk);
}
body.friends-home #workspace {
  grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr);
}
body.friends-home #details {
  display: none;
}
body.friends-home #content {
  padding: 0;
  background: var(--desk);
}
.friends-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 215px;
  gap: 25px;
  padding: 28px;
  max-width: 1550px !important;
}
.friends-center {
  min-width: 0;
}
.circle-hero {
  background: #272652 url("/art/friends-cover.svg") center/cover;
  min-height: 182px;
  padding: 27px 30px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid #4a4670;
}
.hero-caption,
.aside-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-caption {
  color: #dfd5ff;
  font-weight: 600;
  font-size: 0.8rem;
}
.circle-hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.065em;
  margin: 10px 0;
  color: white;
}
.circle-hero p {
  max-width: 59%;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #e2dff2;
  margin: 0;
}
.home-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roster-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--edge);
  margin-top: 19px;
  overflow: auto;
}
.ftab {
  font-size: 0.83rem;
  font-weight: 600;
  padding: 13px 11px;
  border-bottom: 2px solid transparent;
  color: var(--sub);
  white-space: nowrap;
}
.ftab.selected {
  color: var(--ui-accent);
  border-color: var(--ui-accent);
}
.ftab span {
  font-size: 0.7rem;
  margin-left: 6px;
}
.friendlist-tools,
.person-row,
.account-summary,
.change-avatar,
.aside-title,
.server-short,
.desk-context,
.desk-brand,
.desk-head,
.desk-close,
.desk-link,
.footlink,
.setting-field,
.pref-row,
.group-title,
.settings-title,
.studio-save,
.desk-foot,
.wide-link {
  display: flex;
  align-items: center;
  gap: 12px;
}
.friendlist-tools {
  justify-content: space-between;
  margin-top: 20px;
}
.friendlist-tools h2,
.aside-title {
  font-size: 0.94rem;
  font-weight: 600;
}
.list-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: #13161b;
  padding: 8px 10px;
  color: var(--sub);
}
.list-search input {
  min-width: 0;
  width: 100%;
  background: none;
  border: none;
  color: var(--fg);
  outline: 0;
  font-size: 0.8rem;
}
.friends-empty {
  text-align: center;
  padding: 24px 12px 32px;
}
.friends-empty img {
  display: block;
  margin: auto;
  width: min(245px, 65%);
  height: 145px;
  object-fit: contain;
}
.friends-empty h3,
.friend-add h2 {
  letter-spacing: -0.045em;
  font-size: 1.45rem;
  margin: 4px 0 8px;
}
.friends-empty p,
.friend-add p,
.guest-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--sub);
}
.home-aside {
  min-width: 0;
}
.aside-title {
  margin: 1px 0 14px;
}
.aside-title .ico {
  width: 16px;
  color: var(--sub);
}
.aside-title span {
  margin-left: auto;
  color: var(--sub);
}
.aside-title.gap {
  margin-top: 28px;
}
.identity-card,
.guest-card,
.friend-add {
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-radius: 12px;
  overflow: hidden;
}
.guest-card,
.friend-add {
  padding: 20px;
}
.guest-logo {
  width: 44px;
  height: 44px;
  background: #243b35;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.guest-logo img {
  width: 30px;
}
.guest-card h3 {
  margin: 14px 0 4px;
}
.server-short,
.wide-link,
.footlink {
  border-radius: 7px;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  width: 100%;
  color: var(--sub);
}
.server-short:hover,
.wide-link:hover,
.footlink:hover,
.desk-link:hover {
  background: #ffffff0d;
  color: white;
}
.server-short img {
  width: 31px;
  height: 31px;
  border-radius: 7px;
}
.server-short.new {
  border: 1px dashed #47514f;
}
.wide-link {
  justify-content: center;
}
.identity-cover {
  height: 76px;
  background: var(--banner) url("/art/profile-cover.svg") center/cover;
  background-blend-mode: luminosity;
}
.identity-info {
  padding: 0 16px 16px;
}
.identity-picture {
  position: relative;
  width: 52px;
  height: 52px;
  margin-top: -24px;
}
.identity-picture img {
  width: 100%;
  height: 100%;
  border: 4px solid var(--sheet);
}
.identity-info h3 {
  font-size: 1.08rem;
  letter-spacing: -0.035em;
  margin: 8px 0 4px;
}
.ident-handle,
.ident-bio {
  color: var(--sub);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}
.ident-bio:not(:empty) {
  margin-top: 12px;
}
.friend-add {
  margin: 18px 0;
}
.featureicon,
.category-icon {
  display: grid;
  place-items: center;
  background: #383145;
  color: #d2b9fa;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.friend-add .featureicon {
  margin-bottom: 15px;
}
.studio-open #workspace,
.studio-open #top {
  display: none;
}
#studio {
  height: 100dvh;
  background: var(--desk);
  color: var(--fg);
}
.desk-frame {
  height: 100%;
  display: grid;
  grid-template-columns: clamp(200px, 20vw, 285px) minmax(0, 1fr);
  max-width: 1900px;
  margin: auto;
}
.desk-nav {
  background: #111418;
  border-right: 1px solid var(--edge);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  overflow: auto;
}
.desk-brand {
  margin: 0 10px 23px;
  text-align: left;
  font: italic 800 1.7rem Barlow;
}
.desk-brand img {
  width: 31px;
  height: 31px;
}
.desk-context {
  padding: 14px 8px;
  border-block: 1px solid #2a2e35;
}
.desk-context img {
  width: 35px;
  height: 35px;
  border-radius: 10px;
}
.desk-context strong,
.desk-context small,
.person-row strong,
.person-row small,
.change-avatar small {
  display: block;
}
.desk-context small,
.person-row small {
  font-size: 0.73rem;
  color: var(--sub);
  margin-top: 3px;
}
.desk-navgroup {
  margin: 20px 0;
}
.desk-navgroup h3 {
  margin: 0 11px 8px;
  font-size: 0.72rem;
  color: #9ca4b0;
  font-weight: 600;
}
.desk-link {
  color: #c3c8d2;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 7px;
  margin: 2px 0;
  font-size: 0.86rem;
}
.desk-link.active {
  background: #333841;
  color: #fff;
  font-weight: 600;
}
.desk-link.active .ico {
  color: var(--ui-accent);
}
.desk-foot {
  flex-direction: column;
  gap: 1px;
  margin-top: auto;
  align-items: stretch;
  border-top: 1px solid var(--edge);
  padding-top: 8px;
}
.desk-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.desk-head {
  height: 62px;
  flex: none;
  border-bottom: 1px solid var(--edge);
  padding: 0 28px;
  font-size: 0.78rem;
  color: var(--sub);
}
.desk-head .ico {
  width: 14px;
}
.desk-head b {
  color: var(--fg);
}
.desk-close {
  margin-left: auto;
  color: var(--sub);
}
.desk-scroll {
  overflow: auto;
  flex: 1;
}
.desk-body {
  max-width: 1040px;
  margin: auto;
  padding: 36px clamp(18px, 4vw, 58px) 60px;
}
.settings-title {
  margin-bottom: 25px;
}
.settings-title h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  letter-spacing: -0.065em;
  line-height: 1.1;
  margin: 0;
}
.settings-title p,
.pref-row p,
.panel-note {
  color: var(--sub);
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 6px 0 0;
}
.group-title {
  font-size: 1rem;
  letter-spacing: -0.025em;
  margin: 24px 0 10px;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(190px, 1fr);
  gap: 22px;
  align-items: start;
}
.preview-column .group-title {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--sub);
}
.identity-card.large .identity-cover {
  height: 105px;
}
.identity-card.large .identity-picture {
  width: 68px;
  height: 68px;
  margin-top: -33px;
}
.settings-block,
.studio-form[data-studioform="adminSearch"] {
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-radius: 11px;
  padding: 18px;
  margin: 10px 0;
}
.profile-grid .settings-block:first-child {
  margin-top: 0;
}
.studio-form,
.setting-field {
  display: grid;
  align-items: start;
  gap: 14px;
}
.setting-field {
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 600;
}
.studio-form input,
.studio-form textarea,
.studio-form select,
.pref-row > input {
  background: #14171c;
  border: 1px solid #414650;
  border-radius: 7px;
  color: var(--fg);
  padding: 10px 12px;
  width: 100%;
  font: inherit;
  font-weight: 400;
}
.studio-form textarea {
  min-height: 74px;
  resize: vertical;
}
.studio-save {
  justify-content: flex-end;
  border-top: 1px solid var(--edge);
  padding-top: 14px;
}
.change-avatar,
.account-summary {
  margin-bottom: 19px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--edge);
}
.change-avatar img,
.account-summary img {
  width: 56px;
  height: 56px;
}
.change-avatar small {
  font-size: 0.64rem;
  margin-top: 5px;
}
.account-summary h2 {
  margin: 0;
}
.banner-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner-swatches button,
.banner-swatches input {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  padding: 0;
}
.pref-row {
  justify-content: space-between;
  min-height: 58px;
  padding: 11px 0;
  border-bottom: 1px solid var(--edge);
  font-size: 0.85rem;
}
.pref-row:last-child {
  border: 0;
}
.switch {
  padding: 3px;
  width: 40px;
  min-width: 40px;
  height: 24px;
  border-radius: 20px;
  background: #525966;
}
.switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: 0.15s;
}
.switch[aria-checked="true"] {
  background: #30866e;
}
.switch[aria-checked="true"] span {
  transform: translateX(16px);
}
.choicebar,
.theme-strip,
.lang-grid,
.metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.choicebar button,
.language-option,
.theme-tile,
.metrics button {
  border: 1px solid var(--edge);
  background: var(--sheet);
  border-radius: 8px;
  padding: 8px;
  color: var(--sub);
  font-size: 0.8rem;
}
.choicebar .chosen,
.language-option.chosen,
.theme-tile.chosen {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}
.theme-tile {
  flex: 1;
  text-align: left;
  padding: 12px;
}
.mockwindow {
  display: block;
  height: 50px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #20252c 24%, #323740 24%);
}
.midnight .mockwindow {
  background: linear-gradient(90deg, #11151b 24%, #1c2530 24%);
}
.plum .mockwindow {
  background: linear-gradient(90deg, #271e30 24%, #413149 24%);
}
.lang-grid,
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.language-option,
.metrics button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 13px;
}
.language-option strong,
.language-option small,
.metrics b {
  display: block;
}
.metrics button {
  align-items: flex-start;
  flex-direction: column;
}
.metrics b {
  font-size: 2.3rem;
  letter-spacing: -0.05em;
  color: var(--ui-accent);
}
.language-option small {
  margin-top: 3px;
}
.person-row {
  width: 100%;
  border-bottom: 1px solid var(--edge);
  padding: 11px 2px;
  text-align: left;
  font-size: 0.85rem;
}
.person-row:last-child {
  border: 0;
}
.user-link:hover {
  background: #ffffff07;
}
.desk-mobile {
  display: none;
}
.studio-form[data-studioform="adminSearch"] {
  grid-template-columns: 2fr 1fr auto;
  align-items: end;
}
.studio-form[data-studioform="adminSearch"] .studio-save {
  padding: 0;
  border: 0;
}
.desk-body .hero {
  margin-bottom: 18px;
}
.desk-body .hero canvas {
  position: absolute;
  inset: 0;
}
.home-aside .identity-card {
  margin-bottom: 5px;
}
@media (max-width: 1150px) {
  .friends-page {
    grid-template-columns: minmax(0, 1fr) 185px;
    gap: 15px;
    padding: 18px;
  }
  .profile-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(175px, 1fr);
  }
}
@media (max-width: 940px) {
  .friends-page {
    grid-template-columns: 1fr;
  }
  .home-aside {
    display: none;
  }
  .desk-body {
    padding: 24px 18px;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .preview-column {
    max-width: 370px;
  }
  .desk-frame {
    grid-template-columns: 195px minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .desk-frame {
    display: block;
  }
  .desk-area {
    height: 100%;
  }
  .desk-nav {
    display: none;
  }
  .studio-menu .desk-nav {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    z-index: 4;
    box-shadow: 0 0 0 100vw #0008;
  }
  .desk-mobile {
    display: grid;
  }
  .desk-head {
    height: 52px;
    padding: 0 12px;
  }
  .friends-page {
    padding: 13px;
  }
  .circle-hero {
    min-height: 149px;
    padding: 18px;
  }
  .circle-hero p {
    font-size: 0.75rem;
  }
  .ftab {
    padding: 12px 8px;
  }
  .friendlist-tools .list-search {
    max-width: 52%;
  }
  .studio-form[data-studioform="adminSearch"] {
    grid-template-columns: 1fr;
  }
  .pref-row {
    flex-wrap: wrap;
  }
  .desk-foot {
    margin-top: 18px;
  }
  .friendlist-tools h2 {
    font-size: 0.85rem;
  }
}
