/* Team Synergy: balanced comparison and an accessible image viewer. */
.disc-character-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-block:32px; }
.disc-character,.disc-character:first-child { grid-row:auto; min-height:0; padding:24px 20px; background:color-mix(in srgb,var(--disc-color) 9%,var(--card)); border-color:color-mix(in srgb,var(--disc-color) 25%,var(--border)); border-radius:16px; }
.disc-character:nth-child(1) { --disc-color:#168153; }
.disc-character:nth-child(2) { --disc-color:#d43b4e; }
.disc-character:nth-child(3) { --disc-color:#1687b3; }
.disc-character:nth-child(4) { --disc-color:#b58212; }
.disc-character img,.disc-character:first-child img { height:220px; width:100%; object-fit:contain; }
.disc-character h3 { font-size:clamp(18px,1.5vw,23px); line-height:1.5; margin:20px 0 0; text-align:center; text-wrap:balance; }
.legacy-section { padding-block:64px; }
.legacy-section h2 { font-size:clamp(28px,3vw,44px); line-height:1.3; text-wrap:balance; margin:0 0 24px; }
.legacy-section .shell>p:not(.page-kicker) { max-width:75ch; }
.legacy-section .shell>.legacy-grid { margin-block:28px 40px; }
.legacy-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.legacy-gallery a { position:relative; display:block; aspect-ratio:4/3; overflow:hidden; border-radius:12px; background:var(--card); cursor:zoom-in; }
.legacy-gallery img { width:100%; height:100%; aspect-ratio:auto; object-fit:cover; object-position:center 35%; border-radius:0; transition:transform .2s ease-out; }
.legacy-gallery a::after { content:'ดูภาพเต็ม'; position:absolute; bottom:12px; right:12px; padding:6px 12px; border-radius:6px; background:#171719e6; color:#fff; font-size:13px; }
@media(hover:hover) { .legacy-gallery a:hover img { transform:scale(1.035); } }
.legacy-gallery a:focus-visible { outline:3px solid var(--accent,#cc2034); outline-offset:4px; }
.synergy-lightbox { position:fixed; inset:0; box-sizing:border-box; width:100%; height:100%; height:100dvh; max-width:none; max-height:none; margin:0; padding:24px; border:0; background:#171719; color:#fff; overscroll-behavior:contain; }
.synergy-lightbox::backdrop { background:#171719ed; }
.synergy-lightbox[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:16px; }
.synergy-lightbox__bar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.synergy-lightbox button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:48px; min-height:48px; padding:10px 16px; border:1px solid #77777d; border-radius:8px; background:#29292d; color:#fff; font:inherit; cursor:pointer; }
.synergy-lightbox button:hover { background:#44444a; }
.synergy-lightbox button:focus-visible { outline:3px solid #ff9ba5; outline-offset:3px; }
.synergy-lightbox svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; }
.synergy-lightbox__stage { position:relative; display:grid; place-items:center; min-height:0; touch-action:pan-y pinch-zoom; }
.synergy-lightbox__stage img { width:100%; height:100%; min-height:0; object-fit:contain; }
.synergy-lightbox__status { position:absolute; padding:12px 20px; background:#171719; text-align:center; }
.synergy-lightbox__status[hidden] { display:none; }
.synergy-lightbox__caption { margin:0; font-size:14px; color:#dfdfe3; text-align:center; }
@media(max-width:767px) {
 .disc-character-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-block:24px; }
 .disc-character,.disc-character:first-child { padding:16px 12px; }
 .disc-character img,.disc-character:first-child img { height:156px; }
 .disc-character h3 { font-size:17px; margin-top:12px; }
 .legacy-section { padding-block:36px; }
 .legacy-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .legacy-gallery a::after { font-size:11px; padding:4px 8px; bottom:8px; right:8px; }
 .synergy-lightbox { padding:16px; padding-top:max(16px,env(safe-area-inset-top)); padding-bottom:max(16px,env(safe-area-inset-bottom)); }
 .synergy-lightbox__bar { gap:8px; }
}
@media(prefers-reduced-motion:reduce) { .legacy-gallery img { transition:none; } }
