:root {
  --d1-orange: #ff5417;
  --d1-ink: #101f38;
  --d1-muted: #6d7c91;
  --d1-line: #d8e3ed;
  --d1-green: #16b968;
}

body:has(.profile-command-page[data-profile-design1="ready"]) {
  background:
    linear-gradient(rgba(218, 230, 240, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(218, 230, 240, .16) 1px, transparent 1px),
    #f8fafc !important;
  background-size: 46px 46px, 46px 46px, auto !important;
}

.profile-command-page[data-profile-design1="ready"] {
  display: block !important;
  width: min(1660px, calc(100% - 22px)) !important;
  max-width: none !important;
  margin: 14px auto 44px !important;
  padding: 0 !important;
}

.profile-d1-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.92fr) minmax(450px, .98fr);
  align-items: start;
  gap: 14px;
}

.profile-d1-main,
.profile-d1-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.profile-d1-layout :is(.profile-command-hero, .profile-inbox, .profile-command-grid) {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.profile-d1-main > .profile-command-hero {
  display: grid !important;
  grid-template-columns: minmax(390px, 1.45fr) minmax(255px, .78fr) minmax(210px, .66fr) !important;
  min-height: 225px !important;
  padding: 20px 22px !important;
  overflow: hidden !important;
}

.profile-d1-main > .profile-command-hero::after,
.profile-d1-main > .profile-command-grid::after,
.profile-d1-side > section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(var(--d1-orange), var(--d1-orange)) left top / 28px 2px no-repeat,
    linear-gradient(var(--d1-orange), var(--d1-orange)) left top / 2px 28px no-repeat,
    linear-gradient(var(--d1-orange), var(--d1-orange)) right bottom / 34px 2px no-repeat,
    linear-gradient(var(--d1-orange), var(--d1-orange)) right bottom / 2px 34px no-repeat;
}

.profile-d1-main .profile-command-cover {
  opacity: .24 !important;
  background-position: 58% center !important;
}

.profile-d1-main .profile-command-identity {
  z-index: 6;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 20px !important;
  min-width: 0;
}

.profile-d1-main .profile-command-avatar-shell {
  width: 145px !important;
  height: 170px !important;
}

.profile-d1-main .profile-command-avatar {
  width: 132px !important;
  height: 154px !important;
  border-radius: 5px 20px 5px 20px !important;
}

.profile-d1-main .profile-command-avatar > img:first-child {
  border-radius: 4px 18px 4px 18px !important;
}

.profile-d1-main .profile-name-row h1 {
  color: var(--d1-ink);
  font-size: clamp(31px, 2.7vw, 42px) !important;
}

.profile-d1-main .player-profile-identity > p {
  max-width: 430px;
  font-size: 9px !important;
}

.profile-d1-main .profile-meta {
  gap: 13px !important;
  font-size: 7px !important;
}

.profile-d1-main .profile-command-actions {
  display: none !important;
}

.profile-d1-main .profile-command-metrics {
  z-index: 6;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: center;
  gap: 7px !important;
  min-width: 0;
  background: rgba(255, 255, 255, .82) !important;
  border-left: 1px solid var(--d1-line);
  border-right: 1px solid var(--d1-line);
  padding: 4px 15px !important;
}

.profile-d1-main :is(.profile-command-level, .profile-command-trust, .profile-command-community) {
  min-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #e1e8ef !important;
  border-radius: 0 !important;
  padding: 6px 0 !important;
  box-shadow: none !important;
}

.profile-d1-main .profile-command-level > div,
.profile-d1-main .profile-command-trust > div {
  width: 47px !important;
  height: 47px !important;
}

.profile-d1-availability {
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding-left: 15px;
}

.profile-d1-availability > span,
.profile-d1-summary > header,
.profile-d1-tools > header {
  color: var(--d1-ink);
  letter-spacing: .04em;
  font-size: 8px;
  font-weight: 950;
}

.profile-d1-availability > strong {
  color: var(--d1-green);
  font-size: 9px;
}

.profile-d1-availability > strong i,
.profile-d1-bot header i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--d1-green);
  border-radius: 50%;
}

.profile-d1-availability > small {
  color: var(--d1-muted);
  font-size: 7px;
}

.profile-d1-availability > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-d1-availability > div b {
  color: #42516a;
  background: #f7fafc;
  border: 1px solid var(--d1-line);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 6px;
}

.profile-d1-availability > a,
.profile-d1-availability > button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 7px 2px;
  font-size: 8px;
  font-weight: 900;
  text-decoration: none;
}

.profile-d1-availability > a {
  color: #fff;
  background: linear-gradient(135deg, #ff641f, #ef4310);
  border: 1px solid #e9440f;
}

.profile-d1-availability > button {
  color: #2c3c54;
  background: #fff;
  border: 1px solid #cad7e4;
  cursor: pointer;
}

.profile-d1-tabs {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  background: #fff;
  border: 1px solid var(--d1-line);
  border-radius: 6px 18px 0 0;
  overflow-x: auto;
}

.profile-d1-tabs button {
  flex: 1;
  min-width: 95px;
  color: #516078;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 10px;
  font-size: 7px;
  font-weight: 850;
  cursor: pointer;
}

.profile-d1-tabs button.active {
  color: #f14f16;
  border-bottom-color: var(--d1-orange);
}

.profile-d1-summary {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--d1-line);
  border-top: 0;
  padding: 12px;
}

.profile-d1-summary > header {
  display: flex;
  justify-content: space-between;
  padding: 0 3px 10px;
}

.profile-d1-summary > header span {
  color: var(--d1-muted);
  font-size: 6px;
}

.profile-d1-summary > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.profile-d1-summary article {
  position: relative;
  min-height: 85px;
  background: #fff;
  border: 1px solid #dce5ed;
  border-radius: 9px 3px;
  padding: 12px;
  overflow: hidden;
}

.profile-d1-summary article span,
.profile-d1-summary article small {
  display: block;
  color: var(--d1-muted);
  font-size: 6px;
}

.profile-d1-summary article strong {
  display: block;
  color: var(--d1-ink);
  margin: 8px 0 5px;
  font-size: 22px;
}

.profile-d1-summary article i {
  position: absolute;
  right: 12px;
  bottom: 20px;
  width: 25px;
  height: 25px;
  border: 2px dotted #91a5bc;
  border-radius: 50%;
}

.profile-d1-main > .profile-command-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-content: start !important;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--d1-line);
  border-radius: 5px 18px;
  padding: 12px !important;
  overflow: hidden;
}

.profile-d1-main .profile-command-card {
  min-height: 0 !important;
  border-radius: 9px 3px !important;
}

.profile-d1-main .profile-command-game {
  grid-column: span 7 !important;
}

.profile-d1-main .profile-command-schedule {
  grid-column: span 5 !important;
}

.profile-d1-main :is(.profile-command-badges, .profile-command-history, .profile-command-clip) {
  grid-column: span 4 !important;
}

.profile-d1-main :is(.profile-command-commendations, .profile-command-program-editor) {
  grid-column: 1 / -1 !important;
}

.profile-d1-side > .profile-inbox {
  min-height: 420px !important;
  max-height: 520px !important;
  background: #fff !important;
  border: 1px solid var(--d1-line) !important;
  border-radius: 6px 18px 6px 18px !important;
  padding: 14px !important;
  overflow: hidden !important;
}

.profile-d1-side > .profile-inbox > header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e9f0;
}

.profile-d1-side .profile-inbox-list {
  max-height: 390px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.profile-d1-side .profile-inbox-list > a {
  min-height: 59px;
  border-bottom: 1px solid #e5ebf1;
  border-radius: 8px 3px;
}

.profile-d1-bot {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 150px;
  border: 1px solid var(--d1-line) !important;
  border-radius: 6px 17px 6px 17px !important;
  padding: 12px !important;
  overflow: hidden;
}

.profile-d1-bot > img {
  align-self: end;
  width: 122px;
  max-height: 140px;
  object-fit: contain;
}

.profile-d1-bot > div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.profile-d1-bot header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--d1-ink);
  font-size: 10px;
}

.profile-d1-bot p {
  color: #526279;
  background: #f8fafc;
  border: 1px solid #dde6ee;
  border-radius: 8px 3px;
  margin: 0;
  padding: 8px 10px;
  font-size: 8px;
  line-height: 1.45;
}

.profile-d1-bot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-d1-bot nav a {
  color: #3e4e66;
  background: #fff;
  border: 1px solid #d5e0ea;
  border-radius: 6px 2px;
  padding: 6px 8px;
  font-size: 6px;
  font-weight: 800;
  text-decoration: none;
}

.profile-d1-bot small {
  color: #8290a2;
  font-size: 6px;
}

.profile-d1-tools {
  position: relative;
  border: 1px solid var(--d1-line) !important;
  border-radius: 6px 17px 6px 17px !important;
  padding: 14px !important;
  overflow: hidden;
}

.profile-d1-tools > header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e9f0;
}

.profile-d1-tools > header b {
  color: #fff;
  background: var(--d1-orange);
  border-radius: 5px 2px;
  padding: 4px 7px;
  font-size: 6px;
}

.profile-d1-tool-grid {
  display: grid;
  grid-template-columns: 74px minmax(100px, .6fr) minmax(0, 1.7fr);
  gap: 11px;
  margin: 12px 0;
}

.profile-d1-tool-grid > div {
  min-width: 0;
}

.profile-d1-tool-grid span {
  display: block;
  color: #415169;
  margin-bottom: 7px;
  font-size: 6px;
  font-weight: 850;
}

.profile-d1-current-avatar {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--d1-orange);
  border-radius: 50%;
}

.profile-d1-frames,
.profile-d1-backgrounds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.profile-d1-frames img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.profile-d1-backgrounds img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border: 1px solid #dce5ed;
  border-radius: 6px 2px;
}

.profile-d1-tools > button {
  width: 100%;
  min-height: 34px;
  color: #ec4e16;
  background: #fff;
  border: 1px solid #cdd9e4;
  border-radius: 7px 2px;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}

body:has(.profile-command-page[data-profile-design1="ready"]) .clutchbot-widget {
  display: none !important;
}

@media (max-width: 1280px) {
  .profile-d1-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .profile-d1-main > .profile-command-hero {
    grid-template-columns: minmax(330px, 1.3fr) minmax(210px, .7fr);
  }

  .profile-d1-availability {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    padding: 8px 0 0;
  }

  .profile-d1-availability > small,
  .profile-d1-availability > div {
    display: none;
  }

  .profile-d1-summary > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .profile-d1-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-d1-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-d1-side > .profile-inbox {
    grid-row: span 2;
  }
}

@media (max-width: 680px) {
  .profile-d1-main > .profile-command-hero,
  .profile-d1-side {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .profile-d1-main .profile-command-identity {
    grid-template-columns: 105px minmax(0, 1fr) !important;
  }

  .profile-d1-main .profile-command-avatar-shell {
    width: 102px !important;
    height: 118px !important;
  }

  .profile-d1-main .profile-command-avatar {
    width: 92px !important;
    height: 108px !important;
  }

  .profile-d1-main .profile-command-metrics {
    grid-column: 1;
    border: 0;
  }

  .profile-d1-availability {
    display: flex;
  }

  .profile-d1-summary > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-d1-main :is(.profile-command-game, .profile-command-schedule, .profile-command-badges, .profile-command-history, .profile-command-clip) {
    grid-column: 1 / -1 !important;
  }

  .profile-d1-tool-grid {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .profile-d1-tool-grid > div:last-child {
    grid-column: 1 / -1;
  }
}
