html:has(.client-studio, .wb-verse, #pv-workshop-home),
body:has(.client-studio, .wb-verse, #pv-workshop-home) {
  margin: 0;
  background-color: #121018;
}

html:has(.client-studio.brand-bya), body:has(.client-studio.brand-bya) { background-color: #0c1c37; }
html:has(.client-studio.brand-penned), body:has(.client-studio.brand-penned) { background-color: #3e0c24; }

.client-studio .studio-projects button strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pv-mobile-nav {
  display: none;
}

.pv-install {
  width: min(100% - 2rem, 36rem);
  margin: 1.5rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
  border: 1px solid #bd946a;
  border-radius: .75rem;
  background: #261420;
  color: #fff3e7;
  font: 1rem/1.5 system-ui, sans-serif;
}

.pv-install summary {
  padding-block: .75rem;
  cursor: pointer;
}

.pennyverse-installed .pv-install { display: none; }
@media (display-mode: standalone) { .pv-install { display: none; } }

.studio-proof-full {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: .75rem;
  color: inherit;
}

@media (max-width: 760px) {
  body.pennyverse-mobile {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .pv-mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .15rem;
    padding: .35rem max(.35rem, env(safe-area-inset-right, 0px))
      calc(.35rem + env(safe-area-inset-bottom, 0px)) max(.35rem, env(safe-area-inset-left, 0px));
    border-top: 1px solid #956b58;
    background: #261420;
    color: #fff3e7;
    font: 600 .75rem/1.2 system-ui, sans-serif;
  }

  .pv-mobile-nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    gap: .25rem;
    padding: .3rem .15rem;
    border-radius: .5rem;
    color: inherit;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .pv-mobile-nav svg { width: 1.35rem; height: 1.35rem; flex: none; }
  .pv-mobile-nav a[aria-current] { background: #f2d4ac; color: #261420; }
  .pv-mobile-nav a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

  .pennyverse-mobile :is(input, textarea, select) { font-size: max(16px, 1rem); }
  .pennyverse-mobile :is(.pv-account, .client-studio, .wb-verse) { overflow-wrap: anywhere; }
  .pennyverse-mobile :is(.pv-account, .client-studio, .wb-verse) button { min-height: 44px; }

  .pennyverse-mobile .client-studio .studio-sidebar { padding: .25rem 1rem; }
  .studio-sidebar-content { padding-block: .75rem 1rem; }
  .client-studio .studio-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  }
  .client-studio .studio-projects button { min-width: 0; }
  .client-studio .studio-sidebar .studio-aside-note { display: block; }
  .client-studio .studio-top > span { display: block; }
  .client-studio .studio-top { height: auto; min-height: 58px; flex-wrap: wrap; gap: .5rem; padding-block: .65rem; }
  .client-studio .studio-top > * { min-width: 0; }
  .pv-account .pv-home-hero,
  .pv-account .pv-home-content,
  .pv-account .pv-home-lower { min-width: 0; }
  .pv-account .pv-home-hero h1 { font-size: clamp(2.65rem, 11vw, 4.7rem); }
  .pv-account .pv-home-content .pv-door-grid { grid-template-columns: minmax(0, 1fr); }
  .pv-account .pv-home-content .pv-door { min-height: auto; padding-bottom: 4rem; }
  .client-studio .studio-sidebar-content nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  }
  .client-studio .studio-sidebar-content nav button { white-space: normal; }
  .client-studio .studio-content { min-width: 0; }

  .pv-reader .pv-brand-nav { flex-wrap: wrap; }
  .pv-reader header { padding-block: 1.5rem; }
  .pv-reader .pv-reader-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
    align-items: end;
  }
  .pv-reader .pv-reader-tools input { width: 100%; box-sizing: border-box; }
  .pv-reader .pv-reader-tools a { display: flex; align-items: center; min-height: 44px; }
  .pv-reader iframe { height: 65vh; min-height: 18rem; }

  .pennyverse-mobile #main { min-width: 0; }
  .pennyverse-mobile #main :is(img, iframe, video, textarea, select) { max-width: 100%; }
  .pennyverse-mobile #main :is(button, .btn) { min-height: 44px; }
}

.pv-workshop-logo { display: block; width: min(34vw, 160px); height: auto; }
body:has(#pv-workshop-home) {
  background: radial-gradient(ellipse 100% 38rem at 85% 18rem, #49213b, transparent) #121018;
  color: #f8eee5;
}

body:has(#pv-workshop-home) :is(.top, .footer) {
  background: transparent;
  color: #f8eee5;
}

body:has(#pv-workshop-home) .top nav a { color: #f8eee5; }
body:has(#pv-workshop-home) .footer a { color: #f2d4ac; }
body:has(#pv-workshop-home) .footer strong,
#pv-workshop-home :is(h1, h2) { color: #fff2e6; }
#pv-workshop-home :is(.pv-workshop-hero, .pv-workshop-shelf) {
  max-width: 76rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 4rem);
}
.pv-workshop-hero { display: grid; gap: 1.5rem; align-items: center; }
.pv-workshop-hero h1 { margin: 0 0 1rem; font-size: clamp(3rem, 8vw, 6rem); }
.pv-workshop-hero p, .pv-workshop-shelf p { color: #f1dce7; }
.pv-workshop-hero img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 1rem; }
.pv-workshop-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.pv-workshop-actions .btn { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; }
.pv-workshop-shelf { border-top: 1px solid #c794ac66; }
.pv-workshop-shelf h2 { margin-top: 0; font-size: clamp(1.65rem, 5vw, 2.75rem); }
@media (min-width: 48rem) {
  .pv-workshop-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); }
}

body:has(#pv-workshop-home) > #main { padding-bottom: clamp(1rem, 4vw, 3rem); }
body:has(#pv-workshop-home) > .footer { font-size: .875rem; line-height: 1.55; }

@media (max-width: 760px) {
  body.pennyverse-mobile { padding-bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px)); }
  .pennyverse-mobile .pv-mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-block: .2rem calc(.2rem + env(safe-area-inset-bottom, 0px));
    font-size: clamp(.625rem, 2.65vw, .75rem);
  }
  .pennyverse-mobile .pv-mobile-nav a { box-sizing: border-box; min-height: 44px; gap: .16rem; padding: .15rem .05rem; }
  .pennyverse-mobile .pv-mobile-nav svg { width: 1.1rem; height: 1.1rem; }
  .pennyverse-mobile .portal-masthead :is(#navigation, .nav-controls) { display: none !important; }
  .pennyverse-mobile .portal-masthead .navbar { min-height: 0; padding-block: .45rem; }
  .pennyverse-mobile .portal-masthead .portal-brand img { width: clamp(5rem, 24vw, 7rem); height: auto; }
  .pennyverse-mobile .client-studio .studio-top { min-height: 0; padding-block: .4rem; }
  .pennyverse-mobile .client-studio .studio-top > a { display: none; }
  .pennyverse-mobile .client-studio .studio-top > span { font-size: .65rem; line-height: 1.35; }
  .pennyverse-mobile .client-studio .studio-heading h2 { font-size: clamp(1.8rem, 8vw, 3rem); }
  .pennyverse-mobile .client-studio .studio-content { min-width: 0; }
  .pennyverse-mobile .studio-body:not(.studio-screen-open) .studio-back-to-desk { display: none; }
  .pv-signed-in:not(.pv-account-settings-view) .pv-account-tools { display: none; }
}
.pv-account-settings-view.pv-signed-in > .pv-account-tools {
  max-width: 48rem;
  margin: clamp(1.25rem, 5vw, 4rem) auto;
}
