/* MH Entertainment — Lake Edition enhancements: screenshot gallery & curated palettes.
   Default Lake Blue palette remains visually unchanged outside the improved image viewer. */

/* Screenshot viewer: keeps the entire image visible while providing meaningful controls. */
.lightbox-gallery{padding:clamp(12px,2vw,28px);background:transparent}
.lightbox-gallery .lightbox-backdrop{background:#030b14f2;backdrop-filter:blur(18px)}
.lightbox-gallery-inner{width:min(1220px,98vw);max-width:1220px;max-height:min(96dvh,1050px);padding:48px clamp(5px,1.8vw,24px) 16px;gap:12px;align-items:stretch;min-height:0}
.lightbox-topline{display:flex;justify-content:space-between;align-items:center;gap:20px;color:#a7d4e7;font-size:11px;font-weight:800;letter-spacing:.16em;padding-inline:4px;line-height:1.3}
.lightbox-topline span:last-child{color:#fff;font-variant-numeric:tabular-nums;letter-spacing:.09em}
.lightbox-gallery .lightbox-close{right:5px;top:0;width:41px;height:41px;background:#0e3047;border:1px solid #4984a1;z-index:4;color:#fff;font-size:26px;transition:background .18s}
.lightbox-gallery .lightbox-close:hover{background:#1a536e}
.gallery-viewport{position:relative;display:grid;place-items:center;min-height:0;flex:1 1 auto;overflow:hidden;border:1px solid #31536b;border-radius:14px;background:#071523;box-shadow:0 30px 85px #0008}
.gallery-viewport>img{width:100%;height:100%;min-height:0;max-width:100%;max-height:min(65dvh,760px);object-fit:contain;display:block;user-select:none}
.gallery-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:52px;height:62px;display:grid;place-items:center;border:1px solid #add4e872;border-radius:11px;background:#0b263dd9;color:#fff;font-size:43px;font-family:system-ui,sans-serif;line-height:1;cursor:pointer;box-shadow:0 10px 35px #0006;transition:background .17s,scale .17s}
.gallery-nav:hover{background:#1e6280;scale:1.035}
.gallery-nav-prev{left:clamp(8px,1.7vw,22px)}
.gallery-nav-next{right:clamp(8px,1.7vw,22px)}
.gallery-caption-row{display:flex;justify-content:space-between;align-items:start;gap:16px;min-width:0;padding:3px 4px;color:#e2f3fa}
.gallery-caption-row p{min-width:0;overflow-wrap:anywhere;margin:0;font-size:14px;line-height:1.5;color:#e7f6ff}
.gallery-key-hint{flex-shrink:0;color:#93b7ca;font-size:11px;letter-spacing:.025em;white-space:nowrap;margin-top:3px}
.gallery-filmstrip{display:flex;gap:9px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#477891 #11283a;padding:3px 4px 8px;align-self:center;max-width:100%;scroll-snap-type:x proximity}
.gallery-filmthumb{border:2px solid #31556a;border-radius:9px;background:#0b293a;width:82px;height:53px;flex:none;padding:2px;cursor:pointer;overflow:hidden;opacity:.62;scroll-snap-align:center;transition:opacity .15s,border-color .15s}
.gallery-filmthumb.is-active,.gallery-filmthumb:hover{opacity:1;border-color:var(--accent)}
.gallery-filmthumb img{width:100%;height:100%;object-fit:cover;border-radius:5px;display:block}
.lightbox-gallery .lightbox-inner>.gallery-viewport{width:100%}
.lightbox-gallery button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
html[data-palette] .gallery-nav{border-color:color-mix(in srgb,var(--lake-bright),#fff 22%);background:color-mix(in srgb,var(--deep),transparent 12%)}
html[data-palette] .gallery-nav:hover{background:color-mix(in srgb,var(--lake),var(--deep) 20%)}
html[data-palette] .gallery-filmthumb.is-active{border-color:var(--accent)}
@media (max-width:700px){
  .lightbox-gallery{padding:10px}
  .lightbox-gallery-inner{width:100%;max-height:96dvh;padding:49px 0 10px;gap:9px}
  .lightbox-gallery .lightbox-close{right:1px;top:0}
  .gallery-viewport{border-radius:9px;flex:0 1 auto;min-height:0}
  .gallery-viewport>img{max-height:62dvh;width:100%;height:auto;min-height:0;object-fit:contain}
  .gallery-nav{width:38px;height:47px;border-radius:8px;font-size:34px}
  .gallery-nav-prev{left:5px}.gallery-nav-next{right:5px}
  .gallery-caption-row{display:block;padding:2px 3px}
  .gallery-caption-row p{font-size:12px}
  .gallery-key-hint{display:block;font-size:10px;margin-top:5px}
  .gallery-filmthumb{width:69px;height:44px}
}
@media (max-height:640px) and (min-width:701px){.gallery-viewport>img{max-height:48dvh}.gallery-filmthumb{height:42px;width:68px}}
@media (prefers-reduced-motion:reduce){.gallery-nav,.gallery-filmthumb{transition:none}}

/* Curated colors — only design tokens change. Images remain untouched. */
html[data-palette="sapphire"]{--palette-bg:#0a1531;--palette-surface:#112340;--palette-surface-2:#162d51;--palette-secondary:#315db5;--palette-bright:#91bbff;--palette-border:#37557b;--palette-footer:#111e41;--palette-muted:#b1c4df;--palette-glow:#3459a86b;--accent:#ffc078}
html[data-palette="coastal"]{--palette-bg:#061d29;--palette-surface:#0c313c;--palette-surface-2:#12444d;--palette-secondary:#168a93;--palette-bright:#7bdbd9;--palette-border:#3a7178;--palette-footer:#0c353c;--palette-muted:#b0d3d6;--palette-glow:#168a9357;--accent:#ffb18a}
html[data-palette="evergreen"]{--palette-bg:#091d1c;--palette-surface:#12322e;--palette-surface-2:#1a453d;--palette-secondary:#247d6c;--palette-bright:#9cdccb;--palette-border:#48746b;--palette-footer:#0e322e;--palette-muted:#b5d5cc;--palette-glow:#2779625f;--accent:#eec97c}
html[data-palette="amethyst"]{--palette-bg:#161429;--palette-surface:#28223f;--palette-surface-2:#352d54;--palette-secondary:#6958ad;--palette-bright:#bdafff;--palette-border:#655b89;--palette-footer:#282041;--palette-muted:#d1c9e4;--palette-glow:#6958ad66;--accent:#f0acde}
html[data-palette="ember"]{--palette-bg:#21151d;--palette-surface:#34222c;--palette-surface-2:#472b39;--palette-secondary:#9b485f;--palette-bright:#f0a9bd;--palette-border:#785063;--palette-footer:#39232f;--palette-muted:#ddbdc8;--palette-glow:#9b485f60;--accent:#ffc07b}

/* The preset palette is an intentional re-skin, not a hue filter: media retains its true colors.
   The original Lake Edition gets no override, preserving the selected design. */
html[data-theme="dark"][data-palette]:not([data-palette="lake"]){
  --bg:var(--palette-bg);--deep:var(--palette-bg);--surface:var(--palette-surface);--surface2:var(--palette-surface-2);
  --stroke:var(--palette-border);--lake:var(--palette-secondary);--lake-bright:var(--palette-bright);--muted:var(--palette-muted);
}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) body{background:var(--palette-bg)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .header{background:color-mix(in srgb,var(--palette-bg),transparent 5%);border-bottom-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .brand-emblem{background:linear-gradient(145deg,var(--palette-secondary),var(--palette-surface-2));box-shadow:0 0 0 1px var(--palette-border),0 15px 28px #0003}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .nav-cta{background:var(--palette-surface-2);border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .hero{background:radial-gradient(ellipse at 80% 12%,var(--palette-glow),transparent 48%),radial-gradient(ellipse at 9% 87%,color-mix(in srgb,var(--palette-secondary),transparent 84%),transparent 47%),var(--palette-bg)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .hero-glow-one,html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .hero-glow-two{background:var(--palette-secondary)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.hero-text h1 em,.hero-text h1 span,h1 em,h2 em,h3 em,.section-heading em){color:var(--palette-bright)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.kicker,.small-overline,.spotlight-label,.expertise-category,.game-labels,.facts-title,.footer-links>div>span){color:var(--palette-bright)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.hero-text>p,.section-heading p,.hero-foot,.page-intro>div>p,.game-description,.project-details p,.contribution){color:var(--palette-muted)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.home-work,.library,.services-page,.game-content,.journal-home,.expertise-home,.about-section,.about-values,.statement,.contact-section){background:var(--palette-bg)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .page-intro{background:radial-gradient(circle at 84% 0%,var(--palette-glow),transparent 57%),var(--palette-bg);border-bottom-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.showcase-feature.spotlight-card,.spotlight-bottom,.project-visual,.feature-player,.media-queue,.game-facts,.expertise-card,.contact-form-wrap,.contact-form-wrap input,.contact-form-wrap textarea,.contact-form-wrap select){background:var(--palette-surface);border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .spotlight-bottom{background:linear-gradient(110deg,var(--palette-surface-2),var(--palette-surface))}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .showcase-feature.spotlight-card:hover,html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .project-card:hover .project-visual{border-color:var(--palette-bright)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.spotlight-option,.shot,.player-surface,.media-empty-feature,.playlist-tile){background:var(--palette-surface);border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.spotlight-option.active,.media-queue .playlist-tile.selected){background:var(--palette-surface-2);border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .media-queue .playlist-tile:hover{background:var(--palette-surface-2)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.media-queue-head h3,.player-meta h3,.gallery-heading h3,.project-details h3,.facts-title){color:#f4f7ff}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.gallery-heading h3 span,.read-more,.facts-title span,.spotlight-label i,.footer-mh span,.nav-cta span,.spotlight-view span,.accent-dot){color:var(--accent)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.player-main-play,.play-triangle,.shot-expand,.button-primary,.footer .button-light){background:var(--accent);color:#172032}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.button-primary:hover,.footer .button-light:hover){background:color-mix(in srgb,var(--accent),white 16%);color:#172032}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .button-outline:hover{border-color:var(--palette-bright);background:var(--palette-surface-2)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .footer{background:radial-gradient(circle at 95% 0%,var(--palette-glow),transparent 43%),var(--palette-footer);border-top-color:var(--palette-secondary)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .footer .kicker,html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .footer-identity h2 em{color:var(--palette-bright)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .footer-bottom{border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) :is(.game-detail-grid,.related-games,.hero-tail){border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .game-description:not(.expanded):after{background:linear-gradient(transparent,var(--palette-bg))}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .header-nav{background:var(--palette-bg)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .gallery-viewport{background:var(--palette-bg);border-color:var(--palette-border)}
html[data-theme="dark"][data-palette]:not([data-palette="lake"]) .lightbox-gallery .lightbox-close{background:var(--palette-surface-2);border-color:var(--palette-border)}
