/* =========================================================
   優秀作品 gallery.html（搭配 labs.css；深色展廳風格）
   ========================================================= */
.gal-page {
	--ink: #f3f1ec; --ink-2: #c3c1bb; --ink-3: #8c8a85; --bg: #111214; --paper: #1b1c1f; --line: #2c2d31;
	--brand: #ffd24d; --yellow: #ffd24d; --rd: #E30613;
	background: var(--bg); color: var(--ink);
}
.gal-page [hidden] { display: none !important; }
.gal-page .labs-intro h2 { color: #fff; }
.gal-page .labs-intro h2 em { background: linear-gradient(transparent 62%, rgba(227,6,19,.85) 62%); }
.gal-page .labs-intro .labs-mono { color: var(--yellow); }
.gal-page .labs-stats { border-top-color: #fff; }
.gal-page .labs-stats b { color: #fff; }
.gal-page .labs-stats div:nth-child(3) b { color: var(--yellow); }
.gal-page .labs-updated { color: var(--ink-3); }

/* ---------- Best of the Best ---------- */
.spot { position: relative; margin: 16px 0 56px; padding: 34px 34px 36px; border-radius: 26px; background:
	radial-gradient(120% 90% at 0% 0%, rgba(227,6,19,.28), transparent 55%), linear-gradient(180deg, #1a1b1e, #131416); border: 1px solid #2c2d31; overflow: hidden; }
.spot::before { content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 3px; background: var(--rd); }
.spot-h { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 280px); gap: 20px 34px; align-items: end; margin-bottom: 26px; }
.spot-ttl .labs-mono { color: #ff5a5f; font-size: 11px; }
.spot-ttl h3 { margin: 10px 0 0; font-size: clamp(28px, 3.4vw, 44px); font-weight: 900; line-height: 1.18; color: #fff; font-family: var(--serif-title, serif); }
.spot-ttl h3 em { font-style: normal; color: var(--rd); font-family: "Noto Serif TC", serif; letter-spacing: .01em; }
.spot-num { display: flex; align-items: flex-end; gap: 12px; padding-left: 26px; border-left: 1px solid #3a3b40; }
.spot-num b { font-size: clamp(64px, 7vw, 96px); line-height: .85; font-weight: 900; color: #fff; font-family: var(--serif-title, serif); }
.spot-num span { font-size: 13px; line-height: 1.6; color: var(--ink-2); padding-bottom: 4px; }
.spot-note { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-3); }
.spot-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.sp-card { grid-column: span var(--span, 4); position: relative; display: block; padding: 0; border: 0; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; -webkit-tap-highlight-color: transparent; isolation: isolate; }
.sp-card.big { aspect-ratio: 16 / 10; }
.sp-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2,.8,.2,1), filter .5s; filter: brightness(.9); }
.sp-card:hover img, .sp-card:focus-visible img { transform: scale(1.06); filter: brightness(1); }
.sp-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: box-shadow .3s; pointer-events: none; }
.sp-card:hover::after { box-shadow: inset 0 0 0 2px var(--rd); }
.sp-yr { position: absolute; top: 12px; right: 14px; z-index: 1; font-family: var(--serif-title, serif); font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.sp-card.big .sp-yr { font-size: 34px; top: 16px; right: 20px; }
.sp-tx { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 70px 18px 16px; background: linear-gradient(transparent, rgba(0,0,0,.9)); text-align: left; color: #fff; }
.sp-tx em { line-height: 1.25; white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--rd); align-self: flex-start; padding: 4px 9px; border-radius: 4px; }
.sp-tx b { font-size: 20px; font-weight: 900; font-family: var(--serif-title, serif); margin-top: 6px; line-height: 1.3; }
.sp-tx small { font-size: 12.5px; opacity: .75; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sp-card.big .sp-tx { padding: 110px 26px 24px; }
.sp-card.big .sp-tx b { font-size: clamp(26px, 2.8vw, 36px); }
.sp-card.big .sp-tx small { font-size: 14px; -webkit-line-clamp: 2; }
.sp-team { font-size: 12.5px; color: rgba(255,255,255,.7); margin-top: 4px; }
.sp-card:focus { outline: none; }
.sp-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- 篩選 ---------- */
.gf { position: sticky; top: 70px; z-index: 20; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin-bottom: 30px; background: rgba(17,18,20,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid #34353a; border-radius: 16px; }
.gf-top { display: flex; align-items: center; gap: 14px; }
.gf-q { position: relative; flex: 1; margin: 0; font-weight: 400; }
.gf-q i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.gf-q input { width: 100%; height: 42px; border: 1px solid #3a3b40; border-radius: 999px; background: #1b1c1f; color: #fff; padding: 0 16px 0 40px; font: 15px/1 inherit; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.gf-q input::placeholder { color: #77767a; }
.gf-q input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,210,77,.25); }
.gf-count { flex: none; font-size: 14px; color: var(--ink-2); }
.gf-count b { color: #fff; font-size: 18px; }
.gf-count button { appearance: none; border: 0; background: none; color: var(--yellow); font: 700 13px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: underline; margin-left: 6px; }
.gf-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-row button { appearance: none; border: 1px solid #3a3b40; background: transparent; color: var(--ink-2); border-radius: 999px; padding: 6px 13px; font: 600 13.5px/1.2 inherit; font-family: inherit; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; -webkit-tap-highlight-color: transparent; }
.gf-row button small { font-weight: 400; opacity: .6; margin-left: 4px; font-size: 11.5px; }
.gf-row button:hover { border-color: #fff; color: #fff; transform: translateY(-1px); }
.gf-row button[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }
.gf-row button:focus { outline: none; }
.gf-row button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.gf-empty { text-align: center; color: var(--ink-2); padding: 40px 0; }

/* ---------- 年份區塊 ---------- */
.gy { margin-bottom: 46px; scroll-margin-top: 240px; }
.gy-h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid #34353a; }
.gy-h h3 { margin: 0; font-size: clamp(40px, 5vw, 64px); font-weight: 900; line-height: 1; color: #fff; font-family: var(--serif-title, serif); letter-spacing: -.01em; }
.gy-h span { font-size: 14px; color: var(--ink-3); }
.gy-h span b { color: #fff; }
.gy-h em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; color: #111; background: var(--yellow); padding: 4px 10px; border-radius: 999px; }
.gy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* 作品卡 */
.gw { display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; background: transparent; color: inherit; cursor: zoom-in; -webkit-tap-highlight-color: transparent; animation: gwIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes gwIn { from { opacity: 0; transform: translateY(14px); } }
.gw-ph { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #1b1c1f; }
.gw-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .4s; }
.gw:hover .gw-ph img, .gw:focus-visible .gw-ph img { transform: scale(1.05); filter: brightness(1.05); }
.gw-ph::after { content: "看作品"; position: absolute; right: 12px; bottom: 12px; font-size: 12px; font-weight: 700; color: #111; background: #fff; padding: 5px 11px; border-radius: 999px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.gw:hover .gw-ph::after, .gw:focus-visible .gw-ph::after { opacity: 1; transform: none; }
.gw-bob { position: absolute; left: 10px; top: 10px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--rd); padding: 3px 8px; border-radius: 4px; }
.gw-n { position: absolute; right: 10px; top: 10px; font-style: normal; font-size: 11px; color: #fff; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 999px; }
.gw-tx { display: flex; flex-direction: column; gap: 3px; padding: 12px 2px 0; }
.gw-meta { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.gw-tx b { font-size: 19px; font-weight: 900; color: #fff; line-height: 1.35; font-family: var(--serif-title, serif); }
.gw-tx small { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.gw-bd { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.gw-bd span { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: #26272b; color: var(--ink-2); line-height: 1.3; }
.gw-bd .b-rd { background: rgba(227,6,19,.18); color: #ff6b6b; }
.gw-bd .b-rd.top { background: var(--rd); color: #fff; }
.gw-bd .b-adc { background: #f3f1ec; color: #111; }
.gw-bd .top { box-shadow: inset 0 0 0 1px var(--yellow); }
.gw-bd .b-more { background: transparent; border: 1px solid #3a3b40; }
.gw:focus { outline: none; }
.gw:focus-visible .gw-ph { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- 延伸 ---------- */
.gal-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.gal-more a { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 60px 22px 22px; border: 1px solid #34353a; border-radius: 16px; color: #fff !important; transition: background .25s, border-color .25s, transform .25s; }
.gal-more a:hover { background: #1f2024; border-color: #fff; transform: translateY(-3px); }
.gal-more .labs-mono { color: var(--yellow); font-size: 11px; }
.gal-more b { font-size: 18px; font-weight: 900; font-family: var(--serif-title, serif); }
.gal-more small { font-size: 13px; color: var(--ink-3); }
.gal-more i { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-weight: 700; }

/* ---------- 燈箱 ---------- */
.glb { position: fixed; inset: 0; z-index: 100000; background: #0b0b0d; display: flex; align-items: center; justify-content: center; padding: 30px; animation: glbIn .3s ease; }
@keyframes glbIn { from { opacity: 0; } }
.glb-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; width: min(1400px, 100%); height: min(88vh, 900px); }
.glb-media { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.glb-media img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; opacity: 0; transform: scale(.985); transition: opacity .35s, transform .35s; }
.glb-media img.on { opacity: 1; transform: none; }
.glb-prev, .glb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff; font-size: 26px; cursor: pointer; display: none; place-items: center; }
.glb-prev { left: 8px; } .glb-next { right: 8px; }
.glb.multi .glb-prev, .glb.multi .glb-next { display: grid; }
.glb-prev:hover, .glb-next:hover { background: rgba(255,255,255,.2); }
.glb-dots { position: absolute; bottom: -22px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.glb-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.3); cursor: pointer; }
.glb-dots button.on { background: #fff; width: 22px; border-radius: 99px; }
.glb-info { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; color: #fff; padding: 10px 4px 10px 0; }
.glb-meta { margin: 0; font-size: 13px; color: #9b9a95; letter-spacing: .06em; }
.glb-info h3 { margin: 8px 0 4px; font-size: clamp(28px, 3vw, 40px); font-weight: 900; color: #fff; line-height: 1.25; font-family: var(--serif-title, serif); }
.glb-en { margin: 0 0 18px; font-size: 14px; color: #b5b3ae; line-height: 1.5; }
.glb-aw { list-style: none; margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid #333; display: flex; flex-direction: column; gap: 8px; }
.glb-aw li { position: relative; padding-left: 22px; font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.glb-aw li::before { content: "★"; position: absolute; left: 0; top: 0; color: var(--yellow); }
.glb-aw li.none { color: #9b9a95; font-weight: 400; }
.glb-aw li.none::before { content: "·"; }
.glb-team { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.glb-team div { display: flex; flex-direction: column; gap: 3px; }
.glb-team dt { font-size: 12px; color: #9b9a95; font-weight: 400; letter-spacing: .06em; }
.glb-team dd { margin: 0; font-size: 14.5px; line-height: 1.7; }
.glb-nav { margin-top: auto; padding-top: 22px; display: flex; gap: 8px; }
.glb-nav button { flex: 1; appearance: none; border: 1px solid #444; background: transparent; color: #fff; border-radius: 10px; padding: 10px; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }
.glb-nav button:hover { background: #fff; color: #111; }
.glb-x { position: absolute; top: 14px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.4); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.glb-x:hover { background: #fff; color: #111; }

@media (max-width: 1100px) {
	.glb-in { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; height: 92vh; gap: 30px; }
	.glb-info { max-height: 36vh; }
}
@media (max-width: 991px) {
	.spot-h { grid-template-columns: 1fr auto; }
	.spot-note { grid-column: 1 / -1; }
	.sp-card { grid-column: span 6; }
	.sp-card.big, .sp-card.m-full { grid-column: span 12; }
	.gy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gal-more { grid-template-columns: 1fr; }
	.gf { top: 60px; }
}
@media (max-width: 767px) {
	.gf { position: static; padding: 10px; }
	.gf-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.gf-row::-webkit-scrollbar { display: none; }
	.gf-row button { white-space: nowrap; }
	.spot { padding: 24px 16px 20px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
	.spot::before { left: 16px; right: 16px; }
	.spot-h { grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
	.spot-num { padding-left: 0; border-left: 0; }
	.spot-num b { font-size: 64px; }
	.spot-row { gap: 10px; }
	.sp-card.big { aspect-ratio: 4 / 3; }
	.sp-card.big .sp-tx { padding: 70px 16px 16px; }
	.sp-card.big .sp-yr { font-size: 26px; }
	.sp-card.m-full { grid-column: span 12; aspect-ratio: 16 / 10; }
	.sp-tx { padding: 50px 12px 12px; }
	.sp-tx b { font-size: 16px; }
	.sp-tx small { display: none; }
	.sp-card.big .sp-tx small { display: -webkit-box; }
	.sp-tx em { font-size: 9.5px; padding: 3px 7px; }
	.sp-yr { font-size: 17px; }
	.gy-grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
	.gw-tx b { font-size: 15.5px; }
	.gw-tx small { display: none; }
	.gw-bd span:nth-child(n+2) { display: none; }
	.gw-bd .b-more { display: none; }
	.glb { padding: 12px 10px; }
	.glb-info h3 { font-size: 26px; }
	.glb-prev, .glb-next { width: 38px; height: 38px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.gw { animation: none; }
	.gw-ph img, .sp-card img, .glb-media img { transition: none; }
}
