:root:has(.fauna-app-header) {
    --paper: #f5f4ef;
    --white: #fffefb;
    --ink: #20372c;
    --muted: #52645a;
    --green: #30644a;
    --line: #d9e0d6;
    --wash: #e9efe5;
    --fauna-display: Baskerville, Georgia, serif;
    --fauna-card-radius: 18px;
    --fauna-card-shadow: 0 2px 12px #253a2610;
}
body:has(> .fauna-app-header) { background: var(--paper); color: var(--ink); }
body:has(> .fauna-app-header) :where(h1, h2) { text-wrap: balance; }
body:has(> .fauna-app-header) :is(main > h1, .intro h1, .heading h1) {
    font-family: var(--fauna-display);
    font-weight: 400;
    letter-spacing: -.022em;
}
body:has(> .fauna-app-header) :is(.inventory, .browse, .grid > .card, #artists > article) {
    border-radius: var(--fauna-card-radius);
    box-shadow: var(--fauna-card-shadow);
}
body:has(> .fauna-app-header) .intro { padding-block: clamp(24px, 3vw, 44px) clamp(18px, 2.1vw, 31px); }
body:has(> .fauna-app-header) .intro .standfirst { color: var(--muted); }
body:has(> .fauna-app-header) #artists > article { background: var(--white); border-color: var(--line); }

.fauna-app-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 10;
    display: block;
    max-width: none;
    margin: 0;
    padding: env(safe-area-inset-top, 0px) 0 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.fauna-app-bar {
    min-height: 62px;
    max-width: 1420px;
    margin-inline: auto;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 3vw, 36px);
}
.fauna-app-header a { text-decoration: none; }
.fauna-app-wordmark {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 44px;
    color: var(--ink);
    font: 600 29px/1 var(--fauna-display);
    letter-spacing: -.035em;
}
.fauna-app-bar .fauna-app-links {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 2px;
    margin: 0;
}
.fauna-app-bar nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding-inline: clamp(8px, 1.15vw, 16px);
    border-radius: 9px;
    color: var(--muted);
    font: 600 13px/1.2 system-ui, sans-serif;
    white-space: nowrap;
}
.fauna-app-bar nav a:hover, .fauna-app-menu summary:hover { background: var(--wash); color: var(--ink); }
.fauna-app-bar nav a[aria-current="page"] {
    background: #e4ede0;
    color: var(--ink);
    box-shadow: inset 0 -2px #719278;
}
.fauna-app-header :is(a, summary):focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.fauna-app-menu {
    display: none;
    position: relative;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.fauna-app-menu summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding-inline: 13px;
    border-radius: 9px;
    color: var(--ink);
    font: 600 14px/1.2 system-ui, sans-serif;
    cursor: pointer;
}
.fauna-app-menu summary::-webkit-details-marker { display: none; }
.fauna-app-menu[open] summary { background: var(--wash); }
.fauna-app-menu[open] summary span { transform: rotate(180deg); }
.fauna-app-menu nav {
    position: absolute;
    inset-block-start: calc(100% + 7px);
    inset-inline-end: 0;
    display: grid;
    gap: 2px;
    width: min(250px, calc(100vw - 32px));
    max-height: calc(100svh - 80px);
    overflow: auto;
    margin: 0;
    padding: 6px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 32px #20372c25;
}
.fauna-app-menu:not([open]) nav { display: none; }

.fauna-in-app .studio-grid {
    height: calc(100vh - 62px);
    height: calc(100svh - 62px);
    padding-top: var(--edge-gap);
}

/* The bar carries the working places; the menu holds every section, grouped. */
.fauna-app-bar { justify-content: flex-start; }
.fauna-app-bar .fauna-app-links {
    margin-inline-start: auto;
    min-width: 0;
    overflow-x: auto;
    justify-content: flex-start;
}
.fauna-app-menu { display: block; flex: none; }
.fauna-app-menu summary { justify-content: center; width: 46px; padding-inline: 0; }
.fauna-app-menu[open] summary span { transform: none; }
.fauna-app-burger, .fauna-app-burger::before, .fauna-app-burger::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.fauna-app-burger { position: relative; }
.fauna-app-burger::before, .fauna-app-burger::after { content: ""; position: absolute; inset-inline-start: 0; }
.fauna-app-burger::before { inset-block-start: -6px; }
.fauna-app-burger::after { inset-block-start: 6px; }
.fauna-app-menu nav { width: min(280px, calc(100vw - 32px)); gap: 0; padding: 8px; }
.fauna-app-group { display: grid; gap: 2px; padding-block: 4px 8px; }
.fauna-app-group + .fauna-app-group { border-top: 1px solid var(--line); padding-top: 8px; }
.fauna-app-group > span {
    padding: 4px 10px 2px;
    color: var(--muted);
    font: 700 10px/1.2 system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.fauna-app-menu nav a { min-height: 40px; font-size: 14px; }
@media (max-width: 900px) {
    .fauna-app-menu { margin-inline-start: auto; }
}

/* The Library's three shelves, under the bar on each of its pages. */
.fauna-app-shelves {
    display: flex;
    gap: 4px;
    max-width: 1420px;
    margin-inline: auto;
    padding: 0 max(16px, env(safe-area-inset-left)) 8px max(16px, env(safe-area-inset-right));
}
.fauna-app-shelves a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding-inline: 14px;
    border-radius: 999px;
    color: var(--muted);
    font: 600 13px/1.2 system-ui, sans-serif;
}
.fauna-app-shelves a:hover { background: var(--wash); color: var(--ink); }
.fauna-app-shelves a[aria-current="page"] { background: var(--ink); color: #fff; }

@media (max-width: 460px) {
  .fauna-app-bar { gap: 4px; padding-inline: 8px; }
  .fauna-app-bar .fauna-app-links { margin-inline: auto; }
  .fauna-app-bar .fauna-app-links a { padding-inline: 6px; }
}
