:root {
  --ink: #f4efe6;
  --muted: #aaa49a;
  --black: #080706;
  --surface: #100f0d;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #d8b36a;
  --gold-light: #f2d69a;
  --abba-blue: #1664c0;
  --abba-blue-light: #65a9ff;
  --abba-red: #e63d43;
  --silver: #e6e8ed;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, a, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}

.ambient { position: fixed; z-index: -2; pointer-events: none; border-radius: 50%; filter: blur(100px); opacity: .16; }
.ambient-one { width: 42vw; height: 42vw; top: -18vw; left: 20vw; background: linear-gradient(90deg, #1c64bd, #bb8a3e); }
.ambient-two { width: 32vw; height: 32vw; bottom: 8vh; right: -16vw; background: #7d2332; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 600; letter-spacing: .25em; }
.abba-wordmark { display: inline-flex; align-items: center; color: var(--silver); font-family: Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.1em; line-height: 1; }
.abba-wordmark i { font-style: normal; }
.abba-wordmark i:nth-child(2) { color: var(--gold-light); transform: scaleX(-1); }
.abba-wordmark i:nth-child(3) { color: var(--abba-blue-light); }
.brand-divider { width: 1px; height: 20px; margin-left: 3px; background: rgba(255,255,255,.25); }
.brand-name { font-size: 9px; }
.brand-mark { width: 26px; height: 18px; display: flex; align-items: flex-end; gap: 3px; transform: skew(-13deg); }
.brand-mark i { width: 6px; background: var(--gold); display: block; }
.brand-mark i:nth-child(1) { height: 11px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 14px; }
.nav-actions { display: flex; align-items: center; gap: 25px; }
.nav-link { display: inline-flex; align-items: center; gap: 12px; color: #c7c1b6; font-size: 12px; transition: color .25s; }
.nav-link:hover { color: var(--ink); }
.nav-link svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { position: relative; min-height: 286px; padding: 42px 7% 34px; display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: center; gap: 70px; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: -8%; right: 18%; bottom: 9px; height: 1px; opacity: .55; background: linear-gradient(90deg, transparent, var(--abba-blue-light), var(--gold), transparent); }
.hero-copy { position: relative; z-index: 1; }
.hero-overline { display: flex; align-items: center; gap: 13px; color: var(--gold-light); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; }
.hero-overline span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(242,214,154,.38); border-radius: 50%; color: #f5ead3; font-size: 8px; letter-spacing: 0; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--gold-light); font-size: 10px; text-transform: uppercase; letter-spacing: .25em; }
.eyebrow > span { width: 20px; height: 1px; background: var(--gold); }
h1, h2, p { margin-top: 0; }
.gallery-intro h1 {
  margin: 20px 0 25px;
  font-family: var(--serif);
  font-size: clamp(54px, 6.5vw, 94px);
  line-height: .92;
  font-weight: 500;
  letter-spacing: -.045em;
}
.hero h1 { margin: 15px 0 14px; font-family: var(--serif); font-size: clamp(52px, 5.3vw, 78px); line-height: .89; font-weight: 500; letter-spacing: -.05em; }
.hero h1 em, .gallery-intro h1 em, .result-copy h2 em { color: var(--gold-light); font-weight: 500; }
.hero-copy > p { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .025em; }
.hero-pass { position: relative; width: 250px; aspect-ratio: 1.55; padding: 20px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-self: end; overflow: hidden; border: 1px solid rgba(242,214,154,.36); border-radius: 7px; background: radial-gradient(circle at 25% 15%, rgba(101,169,255,.2), transparent 40%), linear-gradient(135deg, rgba(22,100,192,.1), rgba(216,179,106,.08) 53%, rgba(230,61,67,.1)), #0b0a09; box-shadow: 0 24px 70px rgba(0,0,0,.38); transform: rotate(2.5deg); }
.hero-pass::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 3px; }
.hero-pass::after { content: ""; position: absolute; width: 80px; height: 220%; background: rgba(255,255,255,.035); transform: rotate(28deg); }
.pass-label, .pass-event, .hero-pass small { position: relative; z-index: 1; text-transform: uppercase; }
.pass-label { color: var(--gold-light); font-size: 7px; letter-spacing: .34em; }
.hero-pass strong { position: relative; z-index: 1; margin: 11px 0 4px; display: flex; color: var(--silver); font-family: Arial, Helvetica, sans-serif; font-size: 47px; line-height: .8; letter-spacing: -.1em; }
.hero-pass strong i { display: inline-block; font-style: normal; }
.hero-pass strong i:nth-child(2) { color: var(--gold-light); transform: scaleX(-1); }
.hero-pass strong i:nth-child(3) { color: var(--abba-blue-light); }
.pass-event { color: #eee6d8; font-size: 8px; font-weight: 600; letter-spacing: .37em; }
.hero-pass small { margin-top: 10px; color: #777168; font-size: 6px; letter-spacing: .22em; }

.studio-card { position: relative; width: min(916px, 100%); margin: 0 auto; }
.studio-card::before { content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1px; background: linear-gradient(120deg, rgba(101,169,255,.68), rgba(238,199,122,.44) 35%, rgba(255,255,255,.08) 65%, rgba(230,61,67,.55)); pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.stage { position: relative; min-height: 516px; overflow: hidden; border-radius: 24px; background: radial-gradient(circle at 50% 23%, rgba(148,110,53,.11), transparent 36%), rgba(14,13,11,.93); box-shadow: 0 35px 100px rgba(0,0,0,.4); }
.stage-idle { min-height: 516px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.portrait-outline { position: relative; width: 116px; height: 116px; margin-bottom: 25px; }
.portrait-outline svg { width: 100%; height: 100%; fill: none; stroke: rgba(230,199,139,.28); stroke-width: 1.2; }
.portrait-outline .corner { position: absolute; width: 14px; height: 14px; border-color: rgba(237,204,142,.5); }
.portrait-outline .tl { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.portrait-outline .tr { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.portrait-outline .bl { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.portrait-outline .br { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }
.stage-idle h2 { margin-bottom: 9px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.stage-idle > p { margin-bottom: 27px; color: var(--muted); font-size: 13px; }
.stage-idle small { margin-top: 19px; color: #6f6b64; font-size: 9px; }
.action-row, .result-buttons { display: flex; gap: 11px; }
.button { min-height: 47px; padding: 0 24px; border: 1px solid transparent; border-radius: 100px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-size: 12px; font-weight: 600; transition: transform .25s, background .25s, border-color .25s; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .icon-button:focus-visible, .shutter:focus-visible, .text-button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.button.primary { color: white; background: linear-gradient(135deg, #2376d7, #12458e); box-shadow: 0 8px 30px rgba(30,102,190,.25), inset 0 1px rgba(255,255,255,.2); }
.button.primary:hover { background: linear-gradient(135deg, #3588e8, #1854a7); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,.025); }
.button.secondary:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.06); }
.button.subtle { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(6,6,5,.42); backdrop-filter: blur(10px); }

.camera-state, .preview-state, .loading-state, .result-state { min-height: 516px; }
.camera-state { position: relative; display: grid; place-items: center; background: #050505; }
.camera-viewfinder { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.camera-viewfinder video { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scaleX(-1); }
.camera-state.rear .camera-viewfinder video { transform: none; }
.camera-shade { position: absolute; z-index: 2; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 25%, transparent 65%, rgba(0,0,0,.68)); }
.camera-top, .camera-bottom { position: absolute; z-index: 3; left: 0; right: 0; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; }
.camera-top { top: 0; }
.camera-top > span { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.camera-top > span i { width: 6px; height: 6px; border-radius: 50%; background: #e36551; box-shadow: 0 0 10px #e36551; }
.camera-bottom { bottom: 0; justify-content: center; gap: 42px; }
.icon-button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; cursor: pointer; background: rgba(0,0,0,.25); }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.glass { backdrop-filter: blur(10px); }
.shutter { width: 68px; height: 68px; padding: 5px; border: 2px solid white; border-radius: 50%; background: transparent; cursor: pointer; }
.shutter span { width: 100%; height: 100%; display: block; border-radius: inherit; background: white; transition: transform .15s; }
.shutter:active span { transform: scale(.88); }
.camera-spacer { width: 42px; }

.preview-state { position: relative; display: grid; place-items: center; background: #050505; }
.preview-state > img { position: absolute; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.preview-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent 42%); }
.preview-controls { position: absolute; z-index: 2; left: 50%; bottom: 26px; width: min(470px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 11px; transform: translateX(-50%); }
.preview-actions { display: flex; justify-content: center; gap: 11px; }
.cover-name { width: 100%; padding: 9px 14px 10px; display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; background: rgba(5,5,5,.68); backdrop-filter: blur(16px); }
.cover-name span { color: var(--gold-light); font-size: 7px; letter-spacing: .18em; text-transform: uppercase; }
.cover-name input { width: 100%; height: 23px; padding: 0; border: 0; outline: 0; color: white; background: transparent; font-size: 13px; }
.cover-name input::placeholder { color: rgba(255,255,255,.46); }
.cover-name:focus-within { border-color: rgba(101,169,255,.75); box-shadow: 0 0 0 3px rgba(22,100,192,.12); }
.glam-toggle { width: 100%; min-height: 43px; padding: 7px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(5,5,5,.62); cursor: pointer; backdrop-filter: blur(16px); }
.glam-toggle > input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; flex: 0 0 auto; width: 34px; height: 19px; border: 1px solid rgba(255,255,255,.25); border-radius: 100px; background: rgba(255,255,255,.08); transition: .25s; }
.toggle-track i { position: absolute; width: 13px; height: 13px; top: 2px; left: 2px; border-radius: 50%; background: #aaa49a; transition: .25s; }
.toggle-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.toggle-copy strong { color: #e8e2d8; font-size: 9px; font-weight: 600; }
.toggle-copy small { color: #77716a; font-size: 7px; }
.glam-toggle > input:checked + .toggle-track { border-color: var(--abba-blue-light); background: var(--abba-blue); box-shadow: 0 0 16px rgba(22,100,192,.28); }
.glam-toggle > input:checked + .toggle-track i { left: 17px; background: white; }
.glam-toggle > input:focus-visible + .toggle-track { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.loading-state { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.loading-portrait { position: relative; height: 516px; overflow: hidden; background: #0b0a09; }
.loading-portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3) brightness(.55) sepia(.18); }
.loading-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,7,6,.2), transparent 50%, rgba(8,7,6,.5)); }
.scan-line { position: absolute; z-index: 1; top: -5%; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); box-shadow: 0 0 34px 12px rgba(228,188,111,.18); animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 50% { top: 103%; } 100% { top: -5%; } }
.loading-copy { padding: 40px; text-align: center; }
.loading-copy h2 { margin: 22px 0 10px; font-family: var(--serif); font-size: 29px; font-weight: 500; }
.loading-copy p { color: var(--muted); font-size: 12px; }
.spark { height: 26px; display: flex; justify-content: center; align-items: center; gap: 7px; }
.spark span { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.spark span:nth-child(2) { animation-delay: .2s; }
.spark span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 50% { transform: scale(2); opacity: .25; } }

.result-state { display: grid; grid-template-columns: 52% 48%; }
.result-image-wrap { min-height: 516px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle, rgba(22,100,192,.12), transparent 65%), #070706; }
.result-image-wrap img { width: 100%; height: 516px; object-fit: contain; object-position: center; }
.result-copy { padding: 55px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.result-copy .eyebrow { justify-content: flex-start; }
.result-copy h2 { margin: 22px 0 18px; font-family: var(--serif); font-size: clamp(40px, 4vw, 58px); line-height: .95; font-weight: 500; letter-spacing: -.03em; }
.result-copy > p { color: var(--muted); font-size: 13px; }
.band-identity { width: 100%; margin-top: 3px; padding: 16px 0 17px; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.band-identity small { margin-bottom: 7px; color: var(--gold-light); font-size: 8px; letter-spacing: .22em; text-transform: uppercase; }
.band-identity strong { color: var(--silver); font-size: 15px; letter-spacing: .055em; }
.band-identity span { margin-top: 4px; color: #c6c1b9; font-size: 9px; line-height: 1.5; }
.band-identity p { margin: 9px 0 0; color: #7f7a72; font-family: var(--serif); font-size: 11px; font-style: italic; line-height: 1.5; }
.result-buttons { margin-top: 18px; flex-wrap: wrap; }
.text-button { margin-top: 22px; padding: 0; border: 0; border-bottom: 1px solid #64543a; color: #a99575; background: none; cursor: pointer; font-size: 10px; line-height: 1.8; }

.how-it-works { width: min(740px, 100%); margin: 57px auto 90px; display: flex; align-items: center; justify-content: center; }
.how-it-works > div { display: flex; align-items: center; gap: 12px; }
.how-it-works b { color: var(--gold); font-family: var(--serif); font-size: 18px; font-style: italic; font-weight: 500; }
.how-it-works span { display: flex; flex-direction: column; gap: 3px; }
.how-it-works strong { font-size: 10px; font-weight: 500; }
.how-it-works small { color: #716e67; font-size: 8px; }
.how-it-works > i { width: 55px; height: 1px; margin: 0 26px; background: rgba(255,255,255,.1); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; max-width: min(450px, calc(100% - 32px)); padding: 13px 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; opacity: 0; pointer-events: none; color: #eee7dc; background: rgba(24,20,16,.92); box-shadow: 0 16px 50px rgba(0,0,0,.4); transform: translate(-50%,20px); transition: .3s; font-size: 12px; text-align: center; backdrop-filter: blur(15px); }
.toast.visible { opacity: 1; transform: translate(-50%,0); }

/* Gallery */
.gallery-main { padding-top: 72px; }
.gallery-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; margin-bottom: 60px; }
.gallery-intro .eyebrow { justify-content: flex-start; }
.gallery-intro h1 { margin-bottom: 0; font-size: clamp(54px, 6vw, 82px); }
.gallery-intro > p { width: 330px; margin-bottom: 5px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.gallery-wall { min-height: 520px; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 110px; gap: 12px; }
.gallery-tile { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; cursor: zoom-in; background: #13110e; animation: reveal .8s both; }
.gallery-tile:nth-child(8n+1), .gallery-tile:nth-child(8n+6) { grid-column: span 4; grid-row: span 4; }
.gallery-tile:nth-child(8n+2), .gallery-tile:nth-child(8n+5) { grid-column: span 3; grid-row: span 3; }
.gallery-tile:nth-child(8n+3), .gallery-tile:nth-child(8n+4), .gallery-tile:nth-child(8n+7), .gallery-tile:nth-child(8n+8) { grid-column: span 5; grid-row: span 3; }
.gallery-tile img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #050505; transition: opacity .75s, transform .7s; }
.gallery-tile:hover img { transform: scale(1.025); }
.gallery-tile.is-changing img { opacity: 0; transform: scale(1.03); }
.gallery-tile::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; opacity: .72; background: linear-gradient(transparent, rgba(0,0,0,.88)); transition: .3s; }
.gallery-tile::after { display: none; }
.gallery-tile:hover::after { opacity: 1; transform: none; }
.tile-identity { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; color: #f1e5cd; font-size: 8px; letter-spacing: .13em; text-align: left; text-shadow: 0 2px 12px #000; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }
.gallery-loading { grid-column: 1/-1; min-height: 450px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.gallery-loading span { width: 22px; height: 22px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,.14); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-gallery { min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; background: rgba(255,255,255,.018); }
.portrait-outline.small { width: 80px; height: 80px; margin-bottom: 15px; }
.empty-gallery h2 { margin-bottom: 8px; font-family: var(--serif); font-size: 30px; font-weight: 500; }
.empty-gallery p { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.lightbox { position: fixed; z-index: 30; inset: 0; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(5,4,3,.93); backdrop-filter: blur(20px); }
.lightbox > .icon-button { position: absolute; top: 25px; right: 25px; }
.lightbox img { max-width: min(620px, 90vw); max-height: 78vh; border-radius: 5px; box-shadow: 0 40px 100px #000; }
.lightbox-identity { max-width: 520px; margin-top: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lightbox-identity small { color: var(--gold-light); font-size: 7px; letter-spacing: .22em; text-transform: uppercase; }
.lightbox-identity strong { margin-top: 5px; font-size: 15px; letter-spacing: .06em; }
.lightbox-identity span { margin-top: 3px; color: #aaa49a; font-size: 9px; }
.lightbox-identity p { margin: 6px 0 0; color: #77716a; font-family: var(--serif); font-size: 10px; font-style: italic; }
.lightbox > .button { min-height: 38px; margin-top: 13px; }

/* Immersive generated-poster state */
.poster-mode { overflow: hidden; }
.poster-mode .site-header,
.poster-mode .hero,
.poster-mode .how-it-works { display: none; }
.poster-mode main,
.poster-mode .studio-card { width: 100%; margin: 0; }
.poster-mode .studio-card::before { display: none; }
.poster-mode .stage { width: 100%; height: 100dvh; min-height: 100dvh; border-radius: 0; }
.poster-mode .result-state { position: relative; display: block; width: 100%; height: 100%; min-height: 100%; background: #030303; }
.poster-mode .result-image-wrap { position: absolute; inset: 0 0 92px; height: auto; min-height: 0; background: #030303; }
.poster-mode .result-image-wrap img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.poster-mode .result-copy { position: absolute; z-index: 2; left: 50%; bottom: 0; width: min(540px, calc(100% - 32px)); height: 92px; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); align-items: center; justify-content: center; background: #070706; transform: translateX(-50%); }
.poster-mode .result-copy > .eyebrow,
.poster-mode .result-copy > h2 { display: none; }
.poster-mode .band-identity { margin: 0; padding: 24px 0; }
.poster-mode .band-identity small { margin-bottom: 14px; }
.poster-mode .band-identity strong { max-width: 620px; font-size: clamp(30px, 4vw, 64px); line-height: .94; letter-spacing: -.025em; }
.poster-mode .band-identity span { margin-top: 13px; font-size: clamp(10px, .85vw, 14px); }
.poster-mode .band-identity p { max-width: 480px; margin-top: 18px; font-size: clamp(13px, 1.1vw, 18px); }
.poster-mode .result-buttons { width: 100%; margin-top: 0; justify-content: center; }
.poster-mode .text-button { margin-top: 12px; }

/* Dedicated monitor display */
.display-page { overflow: hidden; background: #030303; }
.display-page::before { z-index: 5; opacity: .11; }
.display-shell { position: relative; width: 100vw; height: 100vh; margin: 0; overflow: hidden; }
.display-grid { width: 100%; height: 100%; padding: 0; display: grid; grid-template-columns: repeat(var(--column-count, 9), var(--frame-width, 11.11vw)); grid-template-rows: repeat(3, var(--frame-height, 33.333vh)); grid-auto-flow: dense; align-content: center; justify-content: center; gap: 0; background: #030303; }
.display-frame { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #050505; }
.display-frame.featured { grid-column: span 2; grid-row: span 2; }
.display-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center; opacity: 1; background: #050505; transform: scale(1.002); transition: opacity 1.1s ease, transform 1.1s ease; }
.display-frame.changing img { opacity: 0; transform: scale(1.025); }
.display-frame::after { display: none; }
.frame-identity { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; color: #f4e5c9; font-size: clamp(7px, .55vw, 11px); letter-spacing: .14em; text-shadow: 0 2px 12px #000; }
.display-frame:first-child .frame-identity { display: none; }
.display-chrome { display: none; }
.display-chrome .brand { text-shadow: 0 2px 14px #000; }
.display-status { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.72); font-size: clamp(9px, .75vw, 13px); text-transform: uppercase; letter-spacing: .16em; }
.display-status i { width: 7px; height: 7px; border-radius: 50%; background: #70d38d; box-shadow: 0 0 14px #70d38d; }
.display-title { position: absolute; z-index: 6; left: clamp(24px, 3vw, 54px); bottom: clamp(25px, 3.5vw, 62px); display: flex; flex-direction: column; text-shadow: 0 3px 24px #000; pointer-events: none; }
.display-title small { margin-bottom: 5px; color: var(--gold-light); font-size: clamp(9px, .8vw, 14px); letter-spacing: .34em; }
.display-title strong { max-width: 540px; font-size: clamp(28px, 3.7vw, 70px); line-height: .9; letter-spacing: -.045em; }
.display-title > span { max-width: 500px; margin-top: 11px; color: rgba(255,255,255,.72); font-size: clamp(8px, .7vw, 12px); letter-spacing: .08em; }
.display-empty { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at center, rgba(22,100,192,.17), transparent 30%), radial-gradient(circle at 60% 45%, rgba(230,61,67,.08), transparent 32%), #070706; }
.display-empty::before { content: ""; width: min(35vw, 480px); aspect-ratio: 1; position: absolute; border: 1px solid rgba(255,255,255,.08); transform: rotate(45deg); }
.abba-wordmark.large { position: relative; font-size: clamp(55px, 8vw, 120px); }
.display-empty h1 { position: relative; margin: 30px 0 7px; font-family: var(--serif); font-size: clamp(35px, 4vw, 68px); font-weight: 500; }
.display-empty p { position: relative; color: var(--muted); font-size: clamp(11px, 1vw, 16px); }
.fullscreen-button { position: absolute; z-index: 10; right: 24px; bottom: 22px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 100px; opacity: .25; color: white; background: rgba(0,0,0,.38); cursor: pointer; transition: opacity .25s, background .25s; backdrop-filter: blur(10px); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.fullscreen-button:hover, .fullscreen-button.active { opacity: 1; background: rgba(0,0,0,.7); }
.fullscreen-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

@media (max-width: 760px) {
  .site-header, main { width: min(100% - 32px, 1180px); }
  .studio-card::before { display: none; }
  .site-header { height: 64px; }
  .nav-link { font-size: 0; gap: 0; }
  .monitor-link { display: none; }
  .nav-link svg { width: 21px; }
  .hero { min-height: 0; padding: 24px 3px 22px; display: block; }
  .hero::before { right: 0; bottom: 4px; }
  .hero-overline { gap: 9px; font-size: 7px; letter-spacing: .18em; }
  .hero-overline span { width: 22px; height: 22px; font-size: 7px; }
  .hero h1 { margin: 11px 0 0; font-size: clamp(40px, 11.8vw, 54px); line-height: .87; }
  .hero-copy > p, .hero-pass { display: none; }
  .stage, .stage-idle, .camera-state, .preview-state, .loading-state, .result-state { min-height: 460px; }
  .stage-idle { min-height: 460px; padding: 26px 20px 22px; }
  .stage-idle .portrait-outline { width: 86px; height: 86px; margin-bottom: 17px; }
  .stage-idle h2 { margin-bottom: 5px; font-size: 24px; }
  .stage-idle > p { margin-bottom: 18px; font-size: 11px; }
  .stage-idle small { display: none; }
  .action-row { flex-direction: column; width: min(270px, 100%); }
  .action-row .button { min-height: 44px; }
  .button { width: 100%; }
  .loading-state { grid-template-columns: 1fr; align-content: stretch; }
  .loading-portrait { position: absolute; inset: 0; height: auto; opacity: .5; }
  .loading-copy { position: relative; z-index: 2; align-self: center; }
  .result-state { grid-template-columns: 1fr; background: #0d0c0a; }
  .result-image-wrap { min-height: 430px; }
  .result-image-wrap img { height: 430px; }
  .result-copy { padding: 35px 28px 40px; }
  .result-buttons { width: 100%; }
  .result-state { min-height: auto; }
  .camera-top { padding: 20px; }
  .camera-bottom { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .camera-viewfinder { width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .how-it-works { margin: 40px auto 60px; flex-direction: column; align-items: flex-start; width: max-content; }
  .how-it-works > i { width: 1px; height: 24px; margin: 8px 0 8px 9px; }
  .gallery-main { padding-top: 52px; }
  .gallery-intro { display: block; margin-bottom: 40px; }
  .gallery-intro > p { width: auto; margin-top: 25px; }
  .gallery-wall { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; gap: 8px; }
  .gallery-tile:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery-tile:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }
  .lightbox { padding: 20px; }

  /* Camera, preview and loading become a focused, no-scroll workspace. */
  .studio-active { overflow: hidden; }
  .studio-active .hero,
  .studio-active .how-it-works { display: none; }
  .studio-active main,
  .studio-active .studio-card { width: 100%; margin: 0; }
  .studio-active .studio-card::before { display: none; }
  .studio-active .stage,
  .studio-active .camera-state,
  .studio-active .preview-state,
  .studio-active .loading-state { height: calc(100dvh - 64px); min-height: calc(100dvh - 64px); border-radius: 0; }
  .studio-active .preview-controls { left: 16px; right: 16px; bottom: clamp(32px, 6vh, 58px); width: auto; transform: none; }
  .studio-active .preview-actions .button { min-height: 46px; padding-inline: 14px; }

  /* The generated portrait becomes the entire mobile viewport. */
  .poster-mode .stage { height: 100dvh; min-height: 100dvh; }
  .poster-mode .result-state { height: 100dvh; min-height: 100dvh; }
  .poster-mode .result-image-wrap { position: absolute; inset: 0 0 86px; height: auto; min-height: 0; }
  .poster-mode .result-image-wrap::after { display: none; }
  .poster-mode .result-image-wrap img { height: 100%; object-fit: contain; }
  .poster-mode .result-copy { left: 16px; right: 16px; bottom: 0; width: auto; height: 86px; padding: 7px 0 max(7px, env(safe-area-inset-bottom)); background: #070706; transform: none; }
  .poster-mode .band-identity { padding: 0 0 14px; border: 0; }
  .poster-mode .band-identity small { margin-bottom: 7px; font-size: 7px; }
  .poster-mode .band-identity strong { font-size: clamp(28px, 9vw, 42px); line-height: .9; }
  .poster-mode .band-identity span { margin-top: 8px; font-size: 9px; }
  .poster-mode .band-identity p { margin-top: 8px; color: #aaa39a; font-size: 10px; }
  .poster-mode .result-buttons { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .poster-mode .result-buttons .button { min-height: 42px; padding: 0 12px; }
  .poster-mode .text-button { align-self: center; margin-top: 11px; }

  .display-title { bottom: 28px; }
  .display-title strong { max-width: 260px; }
  .fullscreen-button { right: 12px; bottom: 12px; }
  .fullscreen-button span { display: none; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .camera-viewfinder { width: 100%; height: 100%; aspect-ratio: auto; }
}

@media (max-width: 760px) and (max-height: 650px) {
  .poster-mode .band-identity p { display: none; }
  .poster-mode .band-identity strong { font-size: 27px; }
  .poster-mode .result-buttons .button { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
