/* ==========================================================================
   Erico
   All colour, type and rhythm come from CSS custom properties written into
   the page by App\Support\Appearance. Nothing here hard-codes a palette, so
   switching themes in the admin restyles the whole site with no rebuild.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 350;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .4s ease, color .4s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection { background: var(--ink); color: var(--bg); }

.wrap { width: min(100% - 48px, 1320px); margin-inline: auto; }
.wrap-narrow { width: min(100% - 48px, 760px); margin-inline: auto; }

/* --------------------------------------------------------------- type ---- */

h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: var(--tracking);
    line-height: 1.08;
    margin: 0;
}

.h-hero  { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.h-page  { font-size: clamp(1.9rem, 4vw, 3rem); }
.h-piece { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }

.lede {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--muted);
    max-width: 54ch;
    line-height: 1.6;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.dim { color: var(--muted); }

/* ------------------------------------------------------------- header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 20px 0;
}

.brand {
    font-family: var(--font-display);
    /* Scales with the viewport so it stays the anchor of the header on a wide
       screen without crowding the menu on a laptop. */
    font-size: clamp(24px, 2.3vw, 34px);
    font-weight: var(--display-weight);
    letter-spacing: .24em;
    text-transform: uppercase;
    line-height: 1;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    padding: 4px 0;
    transition: color .25s ease;
}
.nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* --------------------------------------------------------------- hero ---- */

.hero { padding: clamp(56px, 11vh, 130px) 0 clamp(40px, 7vh, 80px); }
.hero .h-hero { margin-bottom: 24px; }
.hero-meta {
    display: flex; gap: 28px; flex-wrap: wrap;
    margin-top: 36px; padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px; color: var(--muted);
}

/* --------------------------------------------------------------- grid ---- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
    gap: var(--grid-gap);
    padding-bottom: 40px;
}

.tile { display: block; }

.tile-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    /* The source photographs have a white ground and a baked-in drop shadow.
       On a dark palette that would read as a glaring white box, so the palette
       supplies a mat colour and the white becomes an intentional gallery mat. */
    background: var(--mat);
    padding: var(--mat-pad);
    transition: transform .5s cubic-bezier(.2,.7,.3,1), box-shadow .4s ease;
}
.tile-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform .7s cubic-bezier(.2,.7,.3,1), opacity .4s ease;
}
.tile:hover .tile-frame img { transform: scale(1.045); }

/* image treatments - set by a body class from the admin */
.treat-framed .tile-frame  { background: var(--surface); padding: 8%; }
.treat-shadow .tile-frame  { box-shadow: 0 14px 40px -14px rgb(0 0 0 / .3); }
.treat-shadow .tile:hover .tile-frame { box-shadow: 0 26px 60px -18px rgb(0 0 0 / .42); transform: translateY(-4px); }

.tile-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding-top: 16px;
}
.tile-title {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    letter-spacing: var(--tracking);
    font-size: 1.02rem;
}
.tile-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* the whole caption block sits quiet until hover on airy layouts */
.density-airy .tile-meta { opacity: .78; transition: opacity .3s ease; }
.density-airy .tile:hover .tile-meta { opacity: 1; }

/* ------------------------------------------------------- single piece ---- */

.piece {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(250px, .68fr);
    gap: clamp(36px, 5vw, 80px);
    padding: clamp(28px, 5vh, 56px) 0;
    align-items: start;
}

.piece-figure {
    border-radius: var(--radius);
    overflow: hidden;
    /* No padding here: at this size the photograph's own white ground already
       reads as the mat, and adding another band just doubles it up. */
    background: var(--mat);
}
.treat-framed .piece-figure { background: var(--surface); padding: 3%; }
.treat-shadow .piece-figure { box-shadow: 0 24px 60px -22px rgb(0 0 0 / .38); }

.piece-figure img { width: 100%; cursor: zoom-in; }

.piece-detail { margin-top: 28px; }
.piece-detail figcaption { margin-top: 10px; }

.piece-aside { position: sticky; top: 96px; }
.piece-aside .h-piece { margin-bottom: 18px; }

.spec-list { margin: 0 0 4px; padding: 0; list-style: none; }
.spec-list li {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.spec-list dt, .spec-list .k { color: var(--muted); }

.badge {
    display: inline-block;
    margin-top: 18px;
    padding: 5px 13px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}
.badge.sold { border-color: var(--accent); color: var(--accent); }

.piece-nav {
    display: flex; justify-content: space-between; gap: 20px;
    margin-top: 40px; padding: 26px 0 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
}
.piece-nav a { color: var(--muted); transition: color .25s ease; }
.piece-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------ lightbox --- */

.lightbox {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--bg) 94%, #000);
    padding: 3vmin;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .3s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 100%; max-height: 94vh; object-fit: contain; }

/* --------------------------------------------------------------- prose --- */

.prose { max-width: 68ch; font-size: 1.02rem; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin: 1.6em 0; border-radius: var(--radius); }

/* -------------------------------------------------------------- footer --- */

.site-footer {
    margin-top: clamp(64px, 12vh, 130px);
    padding: 30px 0 46px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--muted);
}
.site-footer a:hover { color: var(--ink); }

/* ------------------------------------------------------- reveal on scroll */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ================================================== forms / admin chrome == */

label { display: block; font-size: 12.5px; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; }

input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.field { margin-bottom: 20px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 30px;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--bg);
    font: inherit; font-size: 14px;
    cursor: pointer;
    transition: opacity .2s ease;
}
.btn:hover { opacity: .85; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; }

.error { color: #d14343; font-size: 13px; margin-top: 6px; }
.notice {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 13px 17px; margin-bottom: 28px; font-size: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: var(--surface); }
.thumb { width: 52px; height: 52px; object-fit: cover; background: var(--surface); border-radius: var(--radius); }

/* --------------------------------------------------- appearance chooser -- */

.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 8px; }

.opt {
    display: block; cursor: pointer;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.opt:hover { transform: translateY(-2px); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt-name { display: block; font-size: 14px; margin-bottom: 4px; }
.opt-note { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }

.swatch { display: flex; height: 34px; border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.swatch span { flex: 1; }

.preview-frame {
    width: 100%; height: 640px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.sticky-actions {
    position: sticky; bottom: 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 16px 0; margin-top: 32px;
    display: flex; gap: 12px; align-items: center;
}

/* ------------------------------------------------------------ responsive - */

@media (max-width: 900px) {
    .piece { grid-template-columns: 1fr; }
    .piece-aside { position: static; }
    .row { grid-template-columns: 1fr; }
    .wrap, .wrap-narrow { width: min(100% - 32px, 1320px); }
}

@media (max-width: 620px) {
    .nav { gap: 18px; }
    .nav a { font-size: 12px; letter-spacing: .06em; }
    .brand { font-size: 20px; letter-spacing: .18em; }
    .site-header .bar { padding: 14px 0; }
}

/* ==========================================================================
   Demo bar
   Client-facing theme switcher. Keeps its own dark chrome deliberately - it
   must stay legible on every palette and never be mistaken for site design.
   Single row, compact dropdowns: it must never wrap over the site's own menu.
   ========================================================================== */

.demo-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: #101012;
    color: #e9e9ec;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
    font-size: 12px;
    border-bottom: 1px solid #26262b;
    box-shadow: 0 2px 18px rgb(0 0 0 / .28);
}
.demo-inner {
    display: flex; align-items: center; gap: 16px;
    padding: 0 16px; height: 44px;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
}
.demo-inner::-webkit-scrollbar { display: none; }

.demo-controls { display: flex; align-items: center; gap: 14px; flex: none; }
.demo-bar.collapsed .demo-controls { display: none; }

.demo-toggle {
    display: flex; align-items: center; gap: 8px;
    background: none; border: 0; padding: 0;
    color: #e9e9ec; font: inherit; cursor: pointer; flex: none;
}
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.demo-bar.collapsed .demo-dot { background: #666; }
.demo-label { letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; }

.demo-field { display: flex; align-items: center; gap: 6px; margin: 0; flex: none; }
.demo-key {
    color: #75757e; letter-spacing: .12em; text-transform: uppercase;
    font-size: 9.5px; margin: 0;
}

.demo-field select {
    appearance: none; -webkit-appearance: none;
    background: #1b1b20 url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%2390909a' d='M0 0h10L5 6z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 8px;
    border: 1px solid #2e2e35; border-radius: 5px;
    color: #e9e9ec; font: inherit; font-size: 12px;
    padding: 5px 24px 5px 9px;
    width: auto; min-width: 0; cursor: pointer;
    transition: border-color .18s ease;
}
.demo-field select:hover { border-color: #4a4a55; }
.demo-field select:focus { outline: none; border-color: #6a6a78; }
.demo-field select option { background: #1b1b20; color: #e9e9ec; }

.demo-colour input[type=color] {
    appearance: none; -webkit-appearance: none;
    width: 30px; height: 24px; padding: 0; cursor: pointer;
    background: none; border: 1px solid #2e2e35; border-radius: 5px;
}
.demo-colour input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.demo-colour input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.demo-colour input[type=color]:hover { border-color: #4a4a55; }

.demo-reset { color: #75757e; text-decoration: underline; white-space: nowrap; flex: none; }
.demo-reset:hover { color: #fff; }

/* Push the site down so the bar never covers the header. */
body.has-demo-bar .site-header { top: 44px; }
body.has-demo-bar { padding-top: 44px; }

@media (max-width: 900px) {
    .demo-bar { position: static; }
    body.has-demo-bar { padding-top: 0; }
    body.has-demo-bar .site-header { top: 0; }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pager {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 56px 0 8px; flex-wrap: wrap;
}
.pager a, .pager span {
    min-width: 38px; padding: 8px 12px;
    text-align: center; font-size: 13px;
    border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--muted); transition: all .2s ease;
}
.pager a:hover { border-color: var(--accent); color: var(--ink); }
.pager .current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pager .disabled { opacity: .35; }
.pager .gap { border: 0; min-width: 0; padding: 8px 2px; }
.pager-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ==========================================================================
   Templates
   Six genuinely different layouts for the same work. Chosen per-site in the
   admin, or tried live by the client via the demo bar.
   ========================================================================== */

/* ---- 2. Masonry: true proportions, columns flow ------------------------- */
.masonry { columns: 3; column-gap: var(--grid-gap); padding-bottom: 40px; }
.masonry-item { break-inside: avoid; display: block; margin-bottom: var(--grid-gap); }
.masonry-frame {
    display: block; overflow: hidden; border-radius: var(--radius);
    background: var(--mat); padding: var(--mat-pad);
}
.masonry-frame img { width: 100%; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.masonry-item:hover .masonry-frame img { transform: scale(1.04); }
.treat-shadow .masonry-frame { box-shadow: 0 14px 40px -14px rgb(0 0 0 / .3); }
.treat-framed .masonry-frame { background: var(--surface); padding: 7%; }
.density-airy .masonry { columns: 2; }
.density-dense .masonry { columns: 5; }
@media (max-width: 1000px) { .masonry, .density-dense .masonry { columns: 2; } }
@media (max-width: 620px)  { .masonry, .density-dense .masonry, .density-airy .masonry { columns: 1; } }

/* ---- 3. Editorial: one work per row, alternating sides ------------------ */
.editorial { display: flex; flex-direction: column; gap: clamp(60px, 9vh, 130px); padding-bottom: 40px; }
.ed-row {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(200px, .6fr);
    gap: clamp(28px, 4vw, 64px); align-items: center;
}
.ed-row.flip .ed-figure { order: 2; }
.ed-figure {
    display: block; overflow: hidden; border-radius: var(--radius);
    background: var(--mat); padding: var(--mat-pad);
}
/* Cap the height so one work occupies roughly one screen - without this a
   square painting on a wide monitor runs to 900px+ and scrolling drags. */
.ed-figure { display: flex; align-items: center; justify-content: center; }
.ed-figure img {
    width: auto; max-width: 100%; max-height: 68vh;
    transition: transform .9s cubic-bezier(.2,.7,.3,1);
}
.ed-row:hover .ed-figure img { transform: scale(1.03); }
.treat-shadow .ed-figure { box-shadow: 0 24px 60px -22px rgb(0 0 0 / .35); }
.treat-framed .ed-figure { background: var(--surface); padding: 4%; }
.ed-text { display: flex; flex-direction: column; gap: 5px; }
.ed-index { font-size: 11px; letter-spacing: .2em; color: var(--muted); margin-bottom: 8px; }
.ed-title { font-size: clamp(1.5rem, 3vw, 2.4rem); margin-bottom: 10px; }
.ed-spec { font-size: 14px; color: var(--muted); }
@media (max-width: 820px) {
    .ed-row { grid-template-columns: 1fr; gap: 20px; }
    .ed-row.flip .ed-figure { order: 0; }
}

/* ---- 4. Filmstrip: full-height horizontal scroll ------------------------ */
.filmstrip-outer { margin: 0 calc(50% - 50vw); padding-bottom: 20px; }
.filmstrip {
    display: flex; gap: clamp(24px, 3vw, 56px);
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 10px clamp(24px, 6vw, 90px) 26px;
    scrollbar-width: thin;
}
.film-item { flex: 0 0 auto; scroll-snap-align: center; max-width: 78vw; }
.film-frame {
    display: flex; align-items: center; justify-content: center;
    height: min(62vh, 560px); border-radius: var(--radius);
    background: var(--mat); padding: var(--mat-pad); overflow: hidden;
}
.film-frame img { max-height: 100%; width: auto; max-width: none; transition: transform .7s ease; }
.film-item:hover .film-frame img { transform: scale(1.03); }
.treat-shadow .film-frame { box-shadow: 0 20px 50px -20px rgb(0 0 0 / .35); }
.treat-framed .film-frame { background: var(--surface); padding: 3%; }
.film-meta { display: flex; flex-direction: column; gap: 3px; padding-top: 14px; }
.film-hint { text-align: center; margin: 4px 0 0; opacity: .6; }

/* ---- 5. Index: typographic list, image follows the cursor --------------- */
.idx { position: relative; padding-bottom: 20px; }
.idx-head, .idx-row {
    display: grid; grid-template-columns: 2.2fr 1.4fr .8fr .7fr;
    gap: 20px; padding: 14px 4px; align-items: baseline;
    border-bottom: 1px solid var(--line);
}
.idx-head {
    font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--muted); border-bottom-width: 1px;
}
.idx-row { transition: padding-left .28s ease, color .2s ease; }
.idx-row:hover { padding-left: 16px; }
.idx-title {
    font-family: var(--font-display); font-weight: var(--display-weight);
    letter-spacing: var(--tracking); font-size: clamp(1.05rem, 1.7vw, 1.5rem);
}
.idx-peek {
    position: fixed; top: 0; left: 0; margin: 0; z-index: 60;
    width: 260px; pointer-events: none; opacity: 0;
    transition: opacity .22s ease; border-radius: var(--radius);
    background: var(--mat); overflow: hidden;
    box-shadow: 0 20px 50px -20px rgb(0 0 0 / .4);
}
.idx-peek.on { opacity: 1; }
.idx-peek img { width: 100%; }
@media (max-width: 760px) {
    .idx-head { display: none; }
    .idx-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- 6. Salon hang: dense mixed-size wall ------------------------------- */
.salon {
    display: grid; grid-auto-flow: dense;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 150px; gap: 14px; padding-bottom: 40px;
}
.salon-item {
    position: relative; overflow: hidden; border-radius: var(--radius);
    background: var(--mat); display: flex; align-items: center; justify-content: center;
}
.salon-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.salon-item:hover img { transform: scale(1.06); }
/* a repeating but irregular rhythm, so it reads as a hung wall not a grid */
.salon-item.s0 { grid-column: span 2; grid-row: span 2; }
.salon-item.s3 { grid-column: span 2; grid-row: span 1; }
.salon-item.s4 { grid-row: span 2; }
.salon-cap {
    position: absolute; inset: auto 0 0 0; padding: 8px 10px;
    background: linear-gradient(transparent, rgb(0 0 0 / .72));
    color: #fff; font-size: 11.5px; opacity: 0; transition: opacity .25s ease;
}
.salon-item:hover .salon-cap { opacity: 1; }
.density-airy .salon { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 210px; }
.density-dense .salon { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); grid-auto-rows: 115px; gap: 9px; }

/* ---------------------------------------------------- detail indicator --- */
/* Flags the pieces that have a close-up, so the viewer knows before clicking. */

.detail-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 7px; padding: 2px 7px 2px 5px;
    border: 1px solid var(--line); border-radius: 999px;
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); line-height: 1.6;
    transition: border-color .25s ease, color .25s ease;
}
.detail-badge svg { flex: none; }
.tile:hover .detail-badge,
.masonry-item:hover .detail-badge,
.ed-row:hover .detail-badge,
.film-item:hover .detail-badge { border-color: var(--accent); color: var(--ink); }

/* The badge is a sibling of the caption row, not a flex item inside it -
   inside, flex-basis and max-width fought over the wrap and it came out
   stretched on some tiles and inline on others. */
.tile > .detail-badge,
.masonry-item > .detail-badge,
.film-item > .detail-badge { display: inline-flex; margin-top: 8px; }

/* Salon and collage caption over the image, so the badge is a bare dot there. */
.salon-item .detail-badge, .col-item .detail-badge {
    position: absolute; top: 8px; right: 8px; margin: 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(6px);
}
.salon-item .detail-badge span:last-child,
.col-item .detail-badge span:last-child { display: none; }
.salon-item .detail-badge, .col-item .detail-badge { padding: 4px; }

/* Index rows get it inline next to the title. */
.idx-row .detail-badge { margin: 0 0 0 10px; vertical-align: middle; }
