:root {--background:#0b1720; --text:#f3f6f8; --muted:#aac4dd; --accent:#ff4949; --line:#3a4c58;}
* {box-sizing:border-box;}
html {background:var(--background);}
body {margin:0; min-width:320px; background:var(--background); color:var(--text); font-family:Inter,"Segoe UI",Arial,sans-serif; -webkit-font-smoothing:antialiased;}
a {color:inherit; text-decoration:none;}
button {font:inherit;}
.gallery-page {width:min(calc(100% - 110px),1440px); margin:0 auto; padding:55px 0 47px;}
.gallery-intro {display:grid; grid-template-columns:minmax(0,1.08fr) minmax(360px,.72fr); gap:clamp(56px,8vw,135px); align-items:end; margin-bottom:45px;}
.gallery-label {margin:0 0 25px; color:var(--accent); font-size:12px; font-weight:850; letter-spacing:.09em;}
.gallery-intro > * {min-width:0;}
h1 {overflow-wrap:anywhere; margin:0; max-width:560px; font-size:clamp(66px,5.65vw,84px); line-height:.96; letter-spacing:-.066em;}
.gallery-copy {padding-bottom:3px; color:var(--muted); font-size:17px; line-height:1.55;}
.gallery-copy>p {max-width:490px; margin:0 0 23px;}
.instagram-link {display:inline-block; padding-bottom:7px; border-bottom:1px solid #dce7ef; color:#fff; font-size:13px; font-weight:800;}
.feed-note {position:relative; margin:17px 0 0!important; padding-left:12px;}
.feed-note:before {content:""; position:absolute; left:0; top:.72em; width:5px; height:5px; border-radius:50%; background:var(--accent); box-shadow:0 0 10px var(--accent);}
.feed-note[data-state="loading"]:before {animation:feedPulse 1s infinite;}
.feed-note[data-state="live"]:before {background:#63d68d; box-shadow:0 0 10px #63d68d;}
.gallery-grid {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px;}
.instagram-section {margin-top:64px; padding-top:48px; border-top:1px solid var(--line);}
.instagram-heading > * {min-width:0;}
.instagram-heading h2 {overflow-wrap:anywhere;}
.instagram-heading {display:flex;flex-wrap:wrap; justify-content:space-between; align-items:end; gap:28px;}
.instagram-heading h2 {margin:0; max-width:760px; font-size:clamp(28px,3.2vw,46px); line-height:1.1; letter-spacing:-.045em;}
.instagram-heading p {margin:15px 0 0; color:var(--muted); font-size:16px; line-height:1.55;}
.instagram-heading>.instagram-link {flex-shrink:0;}
.instagram-section>.feed-note {color:var(--muted); font-size:14px; line-height:1.55;}
.instagram-grid, .instagram-empty {margin-top:25px;}
.instagram-empty {padding:32px; border:1px solid var(--line); background:#111d25;}
.instagram-empty p {margin:0 0 18px; color:var(--muted); line-height:1.55;}
.instagram-grid[hidden], .instagram-empty[hidden] {display:none;}
.instagram-grid .gallery-card img {object-position:center;}
.gallery-card {position:relative; min-width:0; aspect-ratio:1; overflow:hidden; border:1px solid var(--line); background:#111d25;}
.gallery-card img {width:100%; height:100%; display:block; object-fit:cover; transition:transform .45s ease,filter .45s ease;}
.gallery-card:after {content:""; position:absolute; inset:43% 0 0; background:linear-gradient(transparent,rgba(3,8,12,.9)); pointer-events:none;}
.gallery-card:first-child img {object-position:46% center;}
.gallery-card:nth-child(2) img, .gallery-card:nth-child(4) img {object-position:54% center;}
.gallery-card:hover img, .gallery-card:focus-visible img {transform:scale(1.025); filter:brightness(1.06);}
.gallery-card:focus-visible {outline:2px solid var(--accent); outline-offset:3px;}
.gallery-grid.is-refreshing {opacity:.7; transition:opacity .2s;}
.card-copy {position:absolute; z-index:1; left:16px; right:16px; bottom:16px; display:grid; gap:4px; font-weight:800;}
.card-copy strong {font-size:12px; line-height:1.35; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;}
.card-copy small {color:#cbd8de; font-size:9px; letter-spacing:.08em;}
.card-type {position:absolute; z-index:2; top:12px; right:12px; padding:5px 7px; background:#071018d9; border:1px solid #60727b; color:#fff; font-size:9px; font-weight:850; letter-spacing:.08em;}
@keyframes feedPulse {50%{opacity:.35;transform:scale(.75)}}
@media(max-width:900px) {
  .gallery-page {width:min(calc(100% - 48px),1440px);}
  .gallery-intro {grid-template-columns:minmax(0,1fr); gap:32px; align-items:start;}
  .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .gallery-card {aspect-ratio:1;}
  .instagram-heading {align-items:start; flex-direction:column; gap:20px;}
}
@media(max-width:560px) {
  .gallery-page {width:min(calc(100% - 32px),1440px); padding:36px 0;}
  .gallery-intro {margin-bottom:32px;}
  h1 {font-size:clamp(54px,17vw,72px);}
  .gallery-copy {font-size:16px;}
  .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .gallery-card {aspect-ratio:1;}
  .card-copy {left:10px;right:10px;bottom:10px;}
  .card-copy strong {font-size:11px;}
  .card-copy small {font-size:8px;letter-spacing:0;}
  .card-type {top:8px;right:8px;font-size:8px;letter-spacing:0;padding:3px 5px;}
  .instagram-section {margin-top:40px; padding-top:32px;}
  .instagram-empty {padding:24px;}
}
@media(prefers-reduced-motion:reduce) {
  .gallery-card img {transition:none;}
  .feed-note[data-state="loading"]:before {animation:none;}
}

.instagram-grid {grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; width:100%; margin-inline:auto;}
.instagram-grid .instagram-gallery-card {display:block; aspect-ratio:3/4; padding:0; border:0; color:inherit; text-align:left; cursor:pointer;}
.instagram-grid .instagram-gallery-card img {position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}
.instagram-more {text-align:center;}
.instagram-more button {margin-top:28px; min-height:48px; padding:12px 24px; border:1px solid var(--line); background:#111d25; color:var(--text); border-radius:3px; cursor:pointer;}
.instagram-more button:hover {border-color:var(--accent);}
.instagram-more button:focus-visible {outline:2px solid var(--accent); outline-offset:4px;}
.instagram-grid .instagram-gallery-card:after, .instagram-grid .card-copy {display:none;}
.instagram-grid .card-type {font-size:10px; letter-spacing:0;}
#instagram-title {scroll-margin-top:110px;}
.instagram-viewer-open {overflow:hidden;}
.instagram-viewer {width:min(calc(100% - 48px),1120px); max-width:none; max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--line); background:var(--background); color:var(--text); overflow:auto;}
.instagram-viewer::backdrop {background:rgba(0,0,0,.85);}
.viewer-layout {display:grid; grid-template-columns:minmax(0,1fr) 320px;}
.viewer-stage {position:relative; min-width:0; height:min(78dvh,780px); background:#05090c;}
.viewer-media {width:100%; height:100%; display:flex; align-items:center; justify-content:center;}
.viewer-media img, .viewer-media video {display:block; width:100%; height:100%; object-fit:contain;}
.viewer-close {position:absolute; z-index:3; top:10px; right:10px; width:40px; height:40px; border:1px solid #70828e; border-radius:50%; color:#fff; background:#071018ed; font-size:28px; line-height:1; cursor:pointer;}
.viewer-details {min-width:0; max-height:min(78dvh,780px); overflow:auto; padding:64px 24px 28px;}
.viewer-account {margin:0 0 12px; font-size:14px; font-weight:800;}
.viewer-details h2 {margin:0 0 22px; font-size:24px; line-height:1.2; letter-spacing:-.03em;}
.viewer-caption {margin:0 0 24px; font-size:14px; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere;}
.viewer-details time {color:var(--muted); font-size:11px;}
.viewer-controls {position:absolute; z-index:2; bottom:64px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:14px; padding:6px; border:1px solid var(--line); border-radius:28px; background:#071018ed; font-size:13px;}
.viewer-controls button {width:40px; height:40px; padding:0; border:0; border-radius:50%; background:#1e303b; color:#fff; font-size:28px; cursor:pointer;}
.viewer-controls button:disabled {opacity:.35; cursor:default;}
.viewer-controls span {white-space:nowrap;}
.viewer-error {position:absolute; inset:0; display:grid; place-items:center; padding:30px; margin:0; text-align:center; background:#05090cee; pointer-events:none;}
.viewer-controls[hidden], .viewer-error[hidden] {display:none;}
.instagram-viewer button:focus-visible {outline:2px solid var(--accent); outline-offset:3px;}
@media(max-width:700px) {
  .instagram-grid {grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px;}
  .instagram-grid .card-type {top:6px; right:6px; padding:3px 5px; font-size:8px;}
  .instagram-viewer {width:calc(100% - 16px); max-height:calc(100dvh - 16px);}
  .viewer-layout {grid-template-columns:1fr;}
  .viewer-stage {height:min(66dvh,600px);}
  .viewer-details {max-height:24dvh; padding:20px;}
  .viewer-details h2 {font-size:20px; margin-bottom:14px;}
  .viewer-caption {font-size:13px;}
}
