/*
Theme Name: Atelier Maison
Theme URI: https://ateliermaison.example
Author: Atelier Maison
Author URI: https://ateliermaison.example
Description: Native WordPress theme for 18+ talent representation. Roster of posts in a 9:16 gallery with city category filters, profile pages, and casting notices. Zero plugins.
Version: 1.8.10
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atelier-maison
Tags: featured-images, one-column, translation-ready
*/

:root {
  --ink: #0c0b0a;
  --paper: #f4efe6;
  --gold: #c4a574;
  --mute: #8a8174;
  --line: rgba(196, 165, 116, 0.35);
  --ink-overlay: rgba(12, 11, 10, 0.82);
  --on-gold: #0c0b0a;
  --title: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html,
body {
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 300;
  letter-spacing: 0.02em;
  min-height: 100%;
}

body.custom-background {
  background-color: var(--ink) !important;
}

body { padding: 1.75rem 1.5rem 3rem; }
body { padding: 1.75rem clamp(1.1rem, 3vw, 3.25rem) 3rem; }

body.has-bg-image {
  position: relative;
  z-index: 0;
  background-color: var(--ink) !important;
  background-attachment: scroll;
}

body.has-bg-image::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ink-overlay);
}

a { color: inherit; }

a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.mast {
  max-width: 1480px;
  margin: 0 auto 2.4rem;
}

.brand {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

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

.brand .custom-logo-link {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 400px;
  line-height: 0;
}

.brand .custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-width: min(400px, 100%);
  max-height: 80px;
  object-fit: contain;
}

p.brand-title,
h1.brand-title {
  margin: 0;
  flex: 0 0 auto;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.55rem);
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.mast-search {
  position: relative;
  z-index: 50;
  flex: 0 0 auto;
  margin-left: auto;
}

.mast-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.mast-search-toggle svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.mast-search-toggle:hover {
  color: var(--paper);
}

.mast-search-toggle:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.mast-search-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.35rem 0;
  min-width: 11.5rem;
  max-width: 90vw;
  max-width: min(22rem, 90vw);
  background: var(--ink);
  border: 1px solid var(--line);
}

.mast-search.is-open .mast-search-panel {
  display: block;
}

.mast-search-field {
  display: block;
  width: 16rem;
  max-width: 70vw;
  max-width: min(22rem, 70vw);
  margin: 0;
  padding: 0.45rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.mast-search-field::-webkit-search-decoration,
.mast-search-field::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.mast-search-field:focus-visible {
  outline: none;
}

.is-light .mast-search-panel {
  box-shadow: 0 12px 28px rgba(24, 18, 32, 0.14);
}

.lede {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--gold);
}

.rule {
  width: 4.5rem;
  height: 1px;
  background: var(--gold);
  margin: 1.35rem 0 1.15rem;
  border: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem 2rem;
}

.surface {
  font-family: var(--title);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--paper);
}

.primary-nav {
  position: relative;
  z-index: 20;
  margin: 0 0 1.15rem;
  max-width: 100%;
}

.cities,
.primary-nav .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  list-style: none;
}

.cities a,
.primary-nav a {
  color: var(--mute);
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.cities a:hover,
.cities a.is-active,
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a {
  color: var(--gold);
}

.primary-nav .menu-item {
  position: relative;
}

.primary-nav .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.primary-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 0.28em solid transparent;
  border-right: 0.28em solid transparent;
  border-top: 0.32em solid var(--gold);
}

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  flex-direction: column;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0.45rem 0;
  min-width: 11.5rem;
  max-width: 90vw;
  max-width: min(22rem, 90vw);
  background: var(--ink);
  border: 1px solid var(--line);
}

.primary-nav .sub-menu a {
  display: flex;
  align-items: center;
  gap: 0.55em;
  min-height: 2.4rem;
  min-width: 0;
  padding: 0.35rem 0.9rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.primary-nav .sub-menu a::before {
  content: "";
  display: block;
  width: 0.42em;
  height: 0.42em;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold);
}

.primary-nav .menu-item-has-children.is-open {
  z-index: 30;
}

.primary-nav .menu-item-has-children.is-open > .sub-menu {
  display: flex;
}

.is-light .primary-nav .sub-menu {
  box-shadow: 0 12px 28px rgba(24, 18, 32, 0.14);
}

.is-light .primary-nav .sub-menu a {
  color: var(--paper);
}

.cities a.is-active {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.city-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.7rem;
  row-gap: 0.3rem;
}

.cities .city-parent {
  color: var(--paper);
}

.cities .city-parent:hover,
.cities .city-parent.is-active {
  color: var(--gold);
}

.city-group.has-children .city-parent::after {
  content: "–";
  margin-left: 0.55rem;
  color: var(--gold);
  font-weight: 300;
}

.home-intro {
  max-width: 1480px;
  margin: 0 auto 1.35rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--paper);
}

.home-intro p,
.home-intro ul,
.home-intro ol {
  margin: 0 0 0.7em;
}

.home-intro p:last-child,
.home-intro ul:last-child,
.home-intro ol:last-child {
  margin-bottom: 0;
}

.home-intro-long {
  margin-top: 2rem;
  margin-bottom: 0;
}

.home-banners {
  max-width: 1480px;
  margin: 0 auto 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-banner {
  display: block;
  width: 100%;
  line-height: 0;
}

.home-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery > .home-banners,
.gallery > .home-banner {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  margin: 0.35rem 0;
}

.gallery + .home-banners {
  margin-top: 1.6rem;
}

.gallery {
  max-width: 1480px;
  margin: 1.6rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: start;
}

.card {
  position: relative;
  display: block;
  width: 100%;
}

.card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.portrait {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--swatch, #1a1714);
}

@supports not (aspect-ratio: 1 / 1) {
  .portrait {
    height: 0;
    padding-top: 177.78%;
  }
}

@supports (aspect-ratio: 1 / 1) {
  .portrait {
    aspect-ratio: 9 / 16;
  }
}

.portrait span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  font-family: var(--title);
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.9;
}

.portrait img,
.portrait .portrait-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.portrait::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(to top, var(--ink-overlay), transparent);
  pointer-events: none;
}

.meta {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.85rem;
  z-index: 1;
}

.meta strong {
  display: block;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: 0.04em;
}

.meta small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.home .gallery .meta strong,
.front-page .gallery .meta strong {
  font-size: clamp(3.0375rem, 4.5vw, 3.9375rem);
}

.home .gallery .meta small,
.front-page .gallery .meta small {
  font-size: 1.395rem;
}

body.hide-card-meta .portrait::after,
body.hide-card-meta .meta {
  display: none;
}

.card:hover .portrait {
  outline: 1px solid var(--gold);
  outline-offset: -1px;
}

.empty-state {
  max-width: 1480px;
  margin: 2rem auto 0;
  color: var(--mute);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.archive-head {
  max-width: 1480px;
  margin: 0 auto 1.75rem;
}

.archive-head h1 {
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--paper);
}

.archive-desc {
  margin-top: 0.55rem;
  max-width: 40rem;
  color: var(--mute);
  font-size: 0.88rem;
  line-height: 1.6;
}

.archive-desc p { margin: 0 0 0.6em; }
.archive-desc p:last-child { margin-bottom: 0; }

.archive-feed {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 2.75rem;
}

.profile-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 2.25rem;
  align-items: start;
}

.profile-entry-shot {
  display: block;
  width: 100%;
  width: min(100%, 280px);
  color: inherit;
  text-decoration: none;
}

.profile-entry .portrait {
  width: 100%;
}

.profile-entry .portrait::after {
  content: none;
}

.profile-entry-shot:hover .portrait {
  outline: 1px solid var(--gold);
  outline-offset: -1px;
}

.profile-entry-title {
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.profile-entry-title a {
  color: inherit;
  text-decoration: none;
}

.profile-entry-title a:hover { color: var(--gold); }

.profile-entry-city {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.4rem;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.profile-entry .bio { margin: 0.95rem 0 0; }

.profile-entry-link {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.profile-entry-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.sheet {
  max-width: 1280px;
  margin: 0 auto;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.sheet-top p {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.close {
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.close:hover { color: var(--gold); }

.detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 3rem;
  align-items: start;
}

.hero-shots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  width: min(100%, 420px);
}

.hero-shot {
  width: 100%;
  width: min(100%, 420px);
  background: var(--swatch, #1a1714);
  position: relative;
  overflow: hidden;
}

@supports not (aspect-ratio: 1 / 1) {
  .hero-shot {
    height: 0;
    padding-top: 177.78%;
  }
}

@supports (aspect-ratio: 1 / 1) {
  .hero-shot {
    aspect-ratio: 9 / 16;
  }
}

.hero-shots .hero-shot {
  width: 100%;
}

.hero-shot--original {
  aspect-ratio: auto;
  margin: 0;
}

@supports not (aspect-ratio: 1 / 1) {
  .hero-shot--original {
    height: auto;
    padding-top: 0;
  }
}

.hero-shot span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  font-family: var(--title);
  font-size: 5.5rem;
  color: var(--gold);
}

.hero-shot img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero-shot--original img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-shot-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

.hero-shot-zoom:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: -3px;
}

body.hero-lightbox-open {
  overflow: hidden;
}

.hero-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1.5rem;
}

.hero-lightbox:not([hidden]) {
  display: grid;
}

.hero-lightbox-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.hero-lightbox-close {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.hero-lightbox-close:hover,
.hero-lightbox-close:focus-visible {
  background: var(--gold);
  color: var(--on-gold);
}

.hero-lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 94vw;
  max-width: min(94vw, 1100px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
}

.who h1,
.who h2 {
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.who .aka {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.45rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.aka-line {
  display: block;
}

.bio {
  margin: 1.15rem 0 1.4rem;
  max-width: 38rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--paper);
}

.bio p,
.bio ul,
.bio ol,
.bio table,
.bio figure,
.bio blockquote {
  margin: 0 0 1em;
}

.bio p:last-child,
.bio ul:last-child,
.bio ol:last-child,
.bio table:last-child,
.bio figure:last-child,
.bio blockquote:last-child {
  margin-bottom: 0;
}

.bio ul,
.bio ol {
  padding-left: 1.1rem;
}

.bio a { color: var(--gold); }

.bio h1,
.bio h2,
.bio h3,
.bio h4 {
  font-family: var(--title);
  font-weight: 500;
  color: var(--paper);
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 1.15em 0 0.4em;
}

.bio h2 { font-size: 1.25rem; }
.bio h3,
.bio h4 { font-size: 1.05rem; }

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

.bio table {
  width: 100%;
  border-collapse: collapse;
}

.bio th,
.bio td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.7rem 0.45rem 0;
  text-align: left;
  vertical-align: top;
}

.bio th {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.package-box {
  background: var(--ink);
  color: var(--paper);
  padding: 15px;
  border-left: 4px solid var(--gold);
  border-radius: 4px;
}

.bio [style] {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-left-color: var(--gold) !important;
}

.booking {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-top: 1.7rem;
}

.cta {
  display: inline-block;
  padding: 0.95rem 1.45rem;
  border: 1px solid var(--gold);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

button.cta {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.cta:hover {
  background: var(--gold);
  color: var(--on-gold);
}

body.booking-panel-open {
  overflow: hidden;
}

.booking-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 1.25rem;
}

.booking-panel.is-open {
  display: grid;
}

.booking-panel-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--ink-overlay);
  cursor: pointer;
}

.booking-panel-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  width: min(22rem, 100%);
  padding: 2.15rem 1.4rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 1px var(--line), 0 22px 48px rgba(0, 0, 0, 0.55);
}

.booking-panel-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  padding: 0.35rem 0.4rem;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.booking-panel-close:hover,
.booking-panel-close:focus-visible {
  color: var(--paper);
}

.booking-panel .contact-im {
  justify-content: center;
  gap: 0.75rem;
}

.booking-panel .im-link {
  width: 2.75rem;
  height: 2.75rem;
}

.booking-panel .im-wx {
  width: auto;
}

.booking-wx-note {
  margin-top: 0.95rem;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-align: center;
}

.contact-im {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.im-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

button.im-link {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.im-link:hover {
  background: var(--gold);
  color: var(--on-gold);
}

.im-link:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.im-link svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.im-wx {
  width: auto;
  min-width: 2.4rem;
  padding: 0 0.6rem;
  gap: 0.4rem;
}

.im-wx .im-id {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  line-height: 1;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.im-wx.is-copied {
  background: var(--gold);
  color: var(--on-gold);
}

.im-wx.is-copied .im-id {
  display: none;
}

.im-wx.is-copied::after {
  content: "已复制";
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-entry .booking {
  margin-top: 1.2rem;
}

.site-foot {
  max-width: 1480px;
  margin: 3.2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  color: var(--mute);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem 1rem;
  }

  .card:nth-child(1) { grid-column: span 2; }
  .card:nth-child(2),
  .card:nth-child(5) { margin-top: 2.75rem; }

  .detail { grid-template-columns: minmax(240px, 380px) 1fr; }
  .hero-shot,
  .hero-shots { width: 100%; }

  .profile-entry {
    grid-template-columns: minmax(180px, 260px) 1fr;
  }

  .profile-entry-shot { width: 100%; }

  .primary-nav .menu-item-has-children > a {
    padding: 0.45rem 0 0.7rem;
  }

  body.has-bg-image {
    background-attachment: fixed !important;
  }

  .primary-nav .menu-item-has-children:hover,
  .primary-nav .menu-item-has-children:focus-within {
    z-index: 30;
  }

  .primary-nav .menu-item-has-children:hover > .sub-menu,
  .primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: flex;
  }
}

@media (min-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem 1.1rem;
  }

  .card:nth-child(1) { grid-column: span 2; }
  .card:nth-child(3),
  .card:nth-child(6) { margin-top: 3.5rem; }
  .card:nth-child(2),
  .card:nth-child(5) { margin-top: 1.25rem; }
}

@media (max-width: 719px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  body.has-bg-image {
    background-attachment: scroll !important;
  }

  body {
    padding: 1.85rem 1.15rem 2.75rem;
  }

  .mast {
    margin-bottom: 1.9rem;
  }

  .brand {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    gap: 0.32rem;
  }

  /* Row 1: logo alone, centered (400x80 max, no longer squeezed by the title). */
  .brand .custom-logo-link {
    flex: 0 0 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Row 2: title takes the remaining width; search stays pinned at the end (.mast-search already has margin-left:auto). */
  p.brand-title,
  h1.brand-title {
    flex: 1 1 auto;
    min-width: 0;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* Length-tiered font size (fixed rem, no clamp/min so old/frozen mobile browsers size it safely too). */
  .brand-title-len-s {
    font-size: 1.3rem;
  }

  .brand-title-len-m {
    font-size: 1.05rem;
  }

  .brand-title-len-l {
    font-size: 0.88rem;
  }

  .brand-title-len-xl {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
  }

  /*
   * Row 1: logo. Row 2: title, centered alone. Row 3: tagline + search icon.
   * Uses display:contents to lift .brand's children into .mast's own flex-wrap
   * row order, without moving markup (desktop is untouched: this whole block
   * is mobile-only, and .mast/.brand keep their normal box on desktop).
   * Browsers without display:contents support silently ignore this block and
   * keep the row-2 (title + search together) layout above as a safe fallback.
   */
  @supports (display: contents) {
    .mast {
      display: flex;
      flex-wrap: wrap;
      row-gap: 0.5rem;
    }

    .mast > .brand {
      display: contents;
    }

    .mast > .brand > .custom-logo-link {
      order: 1;
      flex: 0 0 100%;
      max-width: 100%;
      display: flex;
      justify-content: center;
    }

    .mast > .brand > p.brand-title,
    .mast > .brand > h1.brand-title {
      order: 2;
      flex: 0 0 100%;
      text-align: center;
    }

    .mast > .lede {
      order: 3;
      flex: 1 1 auto;
      min-width: 0;
      margin-top: 0;
    }

    .mast > .brand > .mast-search {
      order: 4;
      flex: 0 0 auto;
      align-self: center;
      margin-left: 0.75rem;
    }

    .mast > .rule {
      order: 5;
      flex: 0 0 100%;
    }

    .mast > .primary-nav,
    .mast > .toolbar {
      order: 6;
      flex: 0 0 100%;
    }
  }

  .mast-search-toggle {
    width: 44px;
    height: 44px;
  }

  .mast-search-panel {
    width: max-content;
    max-width: calc(100vw - 2.3rem);
  }

  .mast-search-field {
    min-height: 44px;
    padding: 0.35rem 0.9rem;
    font-size: 1rem;
  }

  .lede {
    margin-top: 0.85rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    line-height: 1.55;
  }

  .rule {
    margin: 1.25rem 0 1.2rem;
  }

  .primary-nav .menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: unset;
    flex-wrap: unset;
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0;
    width: 100%;
  }

  .primary-nav .menu > .menu-item {
    min-width: 0;
  }

  .primary-nav .menu-item > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.45rem 0;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .primary-nav .sub-menu {
    width: max-content;
    max-width: calc(100vw - 2.3rem);
  }

  .primary-nav .menu > .menu-item:nth-child(even) > .sub-menu {
    left: auto;
    right: 0;
  }

  .primary-nav .sub-menu a {
    min-height: 44px;
    padding: 0.35rem 0.9rem;
    letter-spacing: 0.14em;
    white-space: normal;
  }

  .gallery {
    gap: 1.35rem;
    margin-top: 1.35rem;
  }

  .card { margin-top: 0 !important; }

  .meta {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.8rem;
  }

  .meta strong {
    font-size: clamp(1.35rem, 6.5vw, 1.7rem);
    overflow-wrap: anywhere;
  }

  .profile-entry {
    grid-template-columns: 1fr;
  }

  .profile-entry-shot {
    width: 100%;
    width: min(100%, 22rem);
  }

  .hero-shot,
  .hero-shots {
    width: 100%;
    max-width: 100%;
  }

  .who h1,
  .who h2 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  .bio {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .bio table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .booking {
    flex-direction: column;
    align-items: stretch;
  }

  .cta {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    text-align: center;
  }

  .mast,
  .gallery,
  .sheet,
  .archive-feed,
  .archive-head,
  .site-foot,
  .primary-nav,
  .toolbar,
  .home-intro,
  .home-banners {
    max-width: 100%;
  }

  .home .gallery,
  .front-page .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem 0.35rem;
    margin-top: 1.1rem;
  }

  .home.home-cols-2 .gallery,
  .front-page.home-cols-2 .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home.home-cols-3 .gallery,
  .front-page.home-cols-3 .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home.home-cols-4 .gallery,
  .front-page.home-cols-4 .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home.home-cols-2 .gallery > article.card:nth-of-type(n+67),
  .front-page.home-cols-2 .gallery > article.card:nth-of-type(n+67) {
    display: none;
  }

  .home .gallery > article.card:nth-of-type(n+100),
  .front-page .gallery > article.card:nth-of-type(n+100),
  .home.home-cols-3 .gallery > article.card:nth-of-type(n+100),
  .front-page.home-cols-3 .gallery > article.card:nth-of-type(n+100) {
    display: none;
  }

  .home.home-cols-4 .gallery > article.card:nth-of-type(n+100),
  .front-page.home-cols-4 .gallery > article.card:nth-of-type(n+100) {
    display: block;
  }

  .home.home-cols-4 .gallery > article.card:nth-of-type(n+133),
  .front-page.home-cols-4 .gallery > article.card:nth-of-type(n+133) {
    display: none;
  }

  .home .gallery .meta,
  .front-page .gallery .meta {
    left: 0.28rem;
    right: 0.28rem;
    bottom: 0.28rem;
  }

  .home .gallery .meta strong,
  .front-page .gallery .meta strong {
    font-size: 1.395rem;
    letter-spacing: 0.02em;
    line-height: 1.15;
  }

  .home .gallery .meta small,
  .front-page .gallery .meta small {
    font-size: 0.945rem;
    letter-spacing: 0.06em;
    margin-top: 0.08rem;
  }

  .home .gallery .portrait span,
  .front-page .gallery .portrait span {
    font-size: clamp(1.1rem, 4vw, 1.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
