.gallery-hero { min-height: 370px; padding: 142px 0 55px; }
.gallery-hero h1 { font-size: clamp(3rem, 6vw, 4.9rem); }
.gallery-hero .page-hero-content { max-width: 700px; }
.gallery-hero img { object-position: center 48%; }
.gallery-experience { padding-top: 68px; }
.gallery-intro { display: flex; align-items: end; justify-content: space-between; gap: 45px; margin-bottom: 36px; }
.gallery-intro h2 { font-size: clamp(2.3rem, 4vw, 3.6rem); margin: 10px 0 0; max-width: 570px; }
.gallery-intro > p { max-width: 330px; margin: 0 0 3px; color: var(--muted); font-size: .92rem; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; border-block: 1px solid var(--line); margin-bottom: 25px; }
.gallery-categories { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: thin; }
.gallery-categories button { position: relative; flex-shrink: 0; background: none; border: 0; color: var(--muted); padding: 19px 0; font-size: .78rem; font-weight: 600; }
.gallery-categories button::after { content: ''; position: absolute; inset: auto 0 0; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.gallery-categories button[aria-pressed="true"] { color: var(--brand); }
.gallery-categories button[aria-pressed="true"]::after { transform: scaleX(1); }
.gallery-view-toggle { display: inline-flex; gap: 8px; align-items: center; flex-shrink: 0; background: none; border: 0; color: var(--ink); padding: 12px 0; font-weight: 600; font-size: .75rem; }
.gallery-view-toggle svg, .gallery-expand svg, .gallery-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gallery-stage { position: relative; background: #e9e7df; border-radius: 16px; overflow: hidden; height: clamp(350px, 53vh, 580px); touch-action: pan-y pinch-zoom; }
.gallery-featured { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; cursor: grab; }
.gallery-featured:active { cursor: grabbing; }
.gallery-expand { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid #ffffff70; border-radius: 99px; background: #172119c9; color: #fff; font-size: .74rem; backdrop-filter: blur(10px); }
.gallery-expand:hover { background: var(--brand); }
.gallery-caption-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 0 24px; }
.gallery-caption .eyebrow { font-size: .6rem; }
.gallery-caption h3 { margin: 7px 0 0; font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.3; }
.gallery-navigation { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.gallery-counter { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; margin-right: 13px; }
.gallery-arrow { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; transition: background .2s, color .2s; }
.gallery-arrow:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery-ribbon { display: flex; gap: 10px; padding: 4px 3px 12px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #b4b7a9 transparent; scroll-padding-inline: 3px; }
.gallery-thumb { display: block; padding: 3px; border: 1px solid transparent; border-radius: 9px; background: transparent; flex: 0 0 98px; opacity: .58; transition: opacity .2s, border-color .2s; }
.gallery-thumb img { width: 100%; height: 66px; object-fit: cover; border-radius: 5px; }
.gallery-thumb:hover, .gallery-thumb[aria-pressed="true"] { opacity: 1; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--brand); }
.gallery-hint { text-align: center; margin: 8px 0 0; color: var(--muted); font-size: .69rem; }
.gallery-experience .gallery-grid { columns: 3 250px; column-gap: 18px; }
.gallery-experience .gallery-item { border-radius: 10px; margin-bottom: 18px; background: var(--soft); }
.gallery-experience .gallery-item img { width: 100%; height: auto; }
.gallery-experience .gallery-item span { inset: auto 0 0; border-radius: 0; padding: 24px 15px 12px; opacity: 1; background: linear-gradient(transparent, #142018b8); font-weight: 500; text-align: left; }
.gallery-tail { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: .76rem; }
.gallery-tail a { color: var(--brand); font-weight: 700; }
.gallery-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-toolbar[hidden], .gallery-carousel[hidden], .gallery-grid[hidden], .gallery-thumb[hidden] { display: none; }
.gallery-experience :is(button, a):focus-visible, .gallery-carousel:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.photo-dialog { position: fixed; inset: 0; margin: auto; width: min(1440px, calc(100% - 32px)); max-width: none; height: calc(100dvh - 32px); max-height: none; padding: 0; border: 1px solid #ffffff26; border-radius: 16px; background: #152018; color: #fff; }
.photo-dialog::backdrop { background: #071009ee; backdrop-filter: blur(8px); }
.photo-dialog-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.photo-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 24px; border-bottom: 1px solid #ffffff21; }
.photo-dialog-brand { font: 600 .85rem 'Playfair Display', serif; letter-spacing: .15em; }
.photo-dialog-close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffffff60; border-radius: 50%; background: transparent; color: #fff; font-size: 1.5rem; }
.photo-dialog-media { position: relative; min-height: 0; padding: 18px 75px; touch-action: pan-y pinch-zoom; }
.photo-dialog-media img { width: 100%; height: 100%; object-fit: contain; user-select: none; }
.photo-dialog-media .gallery-arrow { position: absolute; top: calc(50% - 22px); border-color: #ffffff70; background: #152018ad; color: white; }
.photo-dialog-media [data-photo-prev] { left: 18px; }
.photo-dialog-media [data-photo-next] { right: 18px; }
.photo-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 18px 24px; border-top: 1px solid #ffffff21; }
.photo-dialog-footer h2 { font: 500 .98rem/1.4 'DM Sans', sans-serif; margin: 0; }
.photo-dialog-footer p { font-size: .65rem; color: #bcc7b9; margin: 4px 0 0; }
.photo-dialog-footer .gallery-counter { color: #e1e7dc; margin: 0; white-space: nowrap; }
.photo-dialog button:focus-visible { outline: 2px solid #e5ba65; outline-offset: 3px; }
html.photo-dialog-open { overflow: hidden; }
@media (max-width: 1000px) {
  .gallery-toolbar { align-items: stretch; flex-direction: column; gap: 0; }
  .gallery-categories { gap: 25px; }
  .gallery-view-toggle { align-self: flex-end; margin-bottom: 4px; }
  .gallery-experience .gallery-grid { columns: 2 220px; }
}
@media (max-width: 600px) {
  .gallery-hero { min-height: 340px; padding: 130px 0 45px; }
  .gallery-hero h1 { font-size: 3.1rem; }
  .gallery-hero p { font-size: .96rem; }
  .gallery-experience { padding-top: 43px; }
  .gallery-intro { display: block; margin-bottom: 26px; }
  .gallery-intro h2 { font-size: 2.45rem; }
  .gallery-intro > p { margin: 17px 0 0; max-width: 370px; font-size: .87rem; }
  .gallery-categories { gap: 22px; scrollbar-width: none; }
  .gallery-categories::-webkit-scrollbar { display: none; }
  .gallery-categories button { padding-block: 17px; font-size: .75rem; }
  .gallery-stage { height: clamp(330px, 105vw, 520px); border-radius: 12px; }
  .gallery-expand { right: 12px; bottom: 12px; padding: 8px 12px; font-size: .67rem; }
  .gallery-caption-row { gap: 16px; align-items: start; padding-block: 20px; }
  .gallery-caption h3 { font-size: 1.27rem; }
  .gallery-navigation { flex-wrap: wrap; justify-content: flex-end; gap: 7px; max-width: 85px; }
  .gallery-counter { width: 100%; margin: 0; text-align: right; font-size: .65rem; }
  .gallery-arrow { width: 37px; height: 37px; }
  .gallery-thumb { flex-basis: 78px; }
  .gallery-thumb img { height: 56px; }
  .gallery-hint { font-size: .63rem; }
  .gallery-experience .gallery-grid { columns: 2; column-gap: 10px; }
  .gallery-experience .gallery-item { margin-bottom: 10px; border-radius: 7px; }
  .gallery-experience .gallery-item span { font-size: .56rem; padding: 22px 9px 9px; }
  .gallery-tail { font-size: .68rem; align-items: start; }
  .gallery-tail > span { max-width: 185px; }
  .gallery-tail a { flex-shrink: 0; }
  .photo-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .photo-dialog-header { padding: 12px 16px; }
  .photo-dialog-media { padding: 10px 0 55px; }
  .photo-dialog-media .gallery-arrow { top: auto; bottom: 8px; width: 40px; height: 40px; }
  .photo-dialog-media [data-photo-prev] { left: calc(50% - 48px); }
  .photo-dialog-media [data-photo-next] { right: calc(50% - 48px); }
  .photo-dialog-footer { padding: 14px 16px max(14px, env(safe-area-inset-bottom)); gap: 16px; }
  .photo-dialog-footer h2 { font-size: .84rem; }
  .photo-dialog-footer .gallery-counter { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-categories button::after, .gallery-thumb, .gallery-arrow, .gallery-experience .gallery-item img { transition: none; }
}
