:root {
  --bg: #1F2023;
  --bg-2: #2A2B30;
  --fg: #FFFFFF;
  --fg-2: #D4D4D8;
  --fg-3: #B4B4B8;
  --fg-4: #8A8A90;
  --line: #3A3B40;
  --line-2: #55555A;
  --mask: rgba(0, 0, 0, 0.62);
  --wrap: 1600px;   /* 2026-11-17 由 1280 放寬：iMac 上兩側留白過多 */
  --gutter: clamp(20px, 5vw, 64px);
  --sans: 'Roboto', 'Noto Sans TC', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg-2); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.eyebrow { display: block; font-size: 13px; letter-spacing: 0.3em; color: var(--fg-3); text-transform: uppercase; }
.fill { color: #F2C14E; opacity: 0.8; }
.ph { background: var(--bg-2); color: var(--fg-4); display: flex; align-items: center; justify-content: center; font-size: 13px; text-align: center; padding: 16px; }

.btn { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; padding: 14px 28px; border: 1px solid var(--fg); border-radius: 999px; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,0.08); color: var(--fg); }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.solid:hover { background: var(--fg-2); }
.link { display: inline-block; font-size: 13px; letter-spacing: 0.15em; border-bottom: 1px solid currentColor; padding-bottom: 4px; }

/* nav */
.nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter); }
.brand { font-size: 18px; font-weight: 900; letter-spacing: 0.2em; }
.nav nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; color: var(--fg-3); }
.nav nav a[aria-current] { color: var(--fg); border-bottom: 2px solid var(--fg); padding-bottom: 4px; }

/* home hero */
.hero { display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 112px 20px 80px; text-align: center; }
.hero h1 { font-size: clamp(44px, 5.5vw, 68px); font-weight: 900; letter-spacing: 0.02em; line-height: 1; }
.hero .role { margin-top: -26px; font-size: 18px; letter-spacing: 0.32em; color: var(--fg-3); }
.hero .intro { max-width: 520px; font-size: 16px; line-height: 1.9; color: var(--fg-2); }
.icons { display: flex; gap: 28px; }
.icons a { display: flex; padding: 8px; }
.anchors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; font-size: 14px; }
.anchors a { padding: 10px 0; color: var(--fg-2); }

/* category blocks (home): two panels side by side, hover expands */
.cats { --cut: 7vw; display: flex; height: 100vh; min-height: 600px; background: var(--bg); }
.cat { flex: 1 1 0; min-width: 0; container-type: inline-size; transition: flex .7s cubic-bezier(.2,.8,.2,1); }
/* diagonal seam: left panel loses a wedge at its bottom-right, right panel overlaps and loses the matching wedge at its top-left */
.cat:first-child .cat-card { clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.cat + .cat { margin-left: calc(-1 * var(--cut) + 2px); }
.cat + .cat .cat-card { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%); }
.cat:first-child .cat-text, .cat:first-child .cat-foot { right: calc(clamp(28px, 4vw, 64px) + var(--cut)); }
.cats:hover .cat { flex: 0.8; }
.cats .cat:hover { flex: 1.6; }
.cat-card { position: relative; display: block; height: 100%; overflow: hidden; background: var(--bg-2); color: var(--fg); }
.cat-card:hover { color: var(--fg); }
.cat-bg { position: absolute; inset: 0; background: radial-gradient(130% 95% at 18% 0%, #36373D 0%, var(--bg-2) 52%, #212226 100%); transition: filter .6s; }
.cat + .cat .cat-bg { background: radial-gradient(130% 95% at 82% 0%, #3A3539 0%, #2D2A2F 52%, #212024 100%); } /* 2026-11-23 不放圖：右塊略偏暖，和左塊的冷灰區分 */
.cat-card:hover .cat-bg { filter: brightness(1.14); }
.cat-text { position: absolute; left: clamp(28px, 4vw, 64px); right: clamp(28px, 4vw, 64px); bottom: clamp(88px, 12vh, 128px); display: flex; flex-direction: column; gap: 12px; }
.cat-text .eyebrow { color: var(--fg-2); font-size: 64px; font-weight: 900; letter-spacing: 0; line-height: 1; opacity: .35; }
/* heading scales with the panel width (cqw) so it never wraps while panels push each other */
.cat-text h2 { font-weight: 900; font-size: clamp(36px, 9cqw, 92px); line-height: 1; white-space: nowrap; }
.cat-text p { font-size: clamp(14px, 1.2vw, 17px); color: var(--fg-2); letter-spacing: 0.06em; opacity: 0; transform: translateY(8px); transition: opacity .5s .1s, transform .5s .1s; }
.cat-card:hover .cat-text p { opacity: 1; transform: none; }
.cat-foot { position: absolute; left: clamp(28px, 4vw, 64px); right: clamp(28px, 4vw, 64px); bottom: clamp(24px, 5vh, 44px); display: flex; justify-content: space-between; font-size: 13px; letter-spacing: 0.25em; color: var(--fg-2); }
.cat-foot .go { letter-spacing: 0; color: var(--fg); border-bottom: 1px solid currentColor; padding-bottom: 4px; }

/* blocks */
.block { border-top: 1px solid var(--line); padding: 88px var(--gutter); }
.block h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 900; margin-top: 8px; }
.block h2.big-en { margin-top: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.sub-zh { display: block; margin-top: 12px; font-size: 15px; letter-spacing: 0.2em; color: var(--fg-3); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px 64px; align-items: start; }
.about .grid2 { grid-template-columns: 4fr 6fr; }
.about .facts { grid-template-columns: 1fr; gap: 20px; }
.about-body .link { align-self: flex-start; }
.about-photo { margin-top: 32px; width: min(100%, 360px); aspect-ratio: 3 / 4; object-fit: cover; }
.about-body { display: flex; flex-direction: column; gap: 24px; font-size: 16px; line-height: 1.9; color: var(--fg-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin: 0; }
.facts dt { font-size: 12px; letter-spacing: 0.25em; color: var(--fg-4); }
.facts dd { margin: 4px 0 0; font-size: 14px; line-height: 1.8; }
.contact { display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; padding-top: 96px; padding-bottom: 96px; }
.contact p { color: var(--fg-3); }
.contact .btn { margin-top: 12px; }
.foot { border-top: 1px solid var(--line); padding: 48px 20px; text-align: center; font-size: 13px; color: #9A9AA0; }

/* list pages */
.page-head { padding: 64px 0 40px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(40px, 5.5vw, 64px); font-weight: 900; line-height: 1; }
.page-head .sub-zh { margin-top: 0; }
.page-head h1 small { font-size: 0.45em; font-weight: 600; color: var(--fg-3); letter-spacing: 0.1em; margin-left: 8px; }
.page-head p { max-width: 100%; font-size: 16px; line-height: 1.85; color: var(--fg-2); word-break: keep-all; overflow-wrap: anywhere; }
.filters { display: flex; flex-direction: column; gap: 16px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.filters .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters .row > span { font-size: 12px; letter-spacing: 0.2em; color: var(--fg-4); width: 72px; }
.chip { font-size: 14px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-2); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cards { padding: 48px 0 96px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 56px 24px; }
.card { display: flex; flex-direction: column; gap: 18px; }
.card[hidden] { display: none; }
/* cover: 7:5 rounded box; the link fills it, the image covers it */
.card-media { position: relative; width: 100%; overflow: hidden; border-radius: 6px; background: var(--bg-2); isolation: isolate; }
.card-media::before { content: ''; display: block; padding-top: 71.4286%; } /* 7:5 */
.card-go { position: absolute; inset: 0; display: block; }
.card-media .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
/* hover layer: dark veil + logo (or name); lets clicks through to the cover link */
.card-hover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; background: rgba(0,0,0,0.76); opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.card-logo { max-width: 140px; max-height: 68px; width: auto; height: auto; object-fit: contain; }
.card-logo-text { font-size: 20px; font-weight: 700; color: #fff; text-align: center; line-height: 1.4; max-width: 100%; }
@media (hover: hover) {
  .card-media:hover .card-img, .card-media:focus-within .card-img { transform: scale(1.08); }
  .card-media:hover .card-hover, .card-media:focus-within .card-hover { opacity: 1; }
}
@media (hover: none) { .card-hover { display: none; } } /* touch: no hover layer; the ext icon under the name opens the site */
/* caption: name (+ external-link icon) on top, 產業｜類型 below */
.card-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.card-meta .name { font-size: 18px; font-weight: 700; line-height: 1.4; transition: color .3s; }
.card-meta .name:hover { color: var(--fg-3); }
.card-meta .ext { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-top: -4px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--fg-3); transition: color .3s, border-color .3s; }
.card-meta .ext:hover { color: var(--fg); border-color: var(--fg); }
.card-meta .sub { display: flex; flex-wrap: wrap; font-size: 14px; line-height: 1; color: var(--fg-3); }
.card-meta .sub span + span { border-left: 1px solid var(--line-2); margin-left: 12px; padding-left: 12px; }
/* scroll reveal: cards rise in as they enter the viewport (JS adds .in) */
@media (prefers-reduced-motion: no-preference) {
  .card { opacity: 0; transform: translateY(24px); transition: opacity .8s ease-in-out, transform .8s ease-in-out; }
  .card.in { opacity: 1; transform: none; }
}

/* case */
/* work page top: title column on the left, iMac mockup (60%) on the right, standing on the section's bottom edge */
.case-top { background: var(--bg-2); padding: clamp(56px, 8vw, 112px) var(--gutter) 0; }
.case-grid { --gap: clamp(32px, 5vw, 72px); display: grid; grid-template-columns: 4fr 6fr; gap: var(--gap); align-items: start; container-type: inline-size; }
/* Left column spans from the iMac's top edge to the bottom of its screen: iMac width = (grid - gap) * .6; screen bottom = 2.4% top bezel + 95.2% * 9/16 = .5595 of iMac width */
.case-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; height: calc((100cqw - var(--gap)) * 0.6 * 0.5595); }
.crumb { font-size: 13px; color: var(--fg-3); display: flex; gap: 10px; }
.case-intro h1 { font-size: clamp(50px, 4vw, 64px); font-weight: 900; line-height: 1.15;
  text-wrap: balance; word-break: keep-all; overflow-wrap: break-word; }
.case-intro h1 .h1-brand { display: block; font-size: 0.5em; font-weight: 700; line-height: 1.3; color: var(--fg-2); margin-bottom: 0.2em; }
.case-intro .en { margin-top: 10px; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-3); }
.case-intro .btn { margin-top: auto; }
/* CSS-drawn iMac: bezel + screen + chin, then neck and base. Heights use aspect-ratio so everything scales with width. */
.imac { width: 100%; min-width: 0; }
/* 2020 27" iMac, silver: black glass bezel around the screen, tall aluminium chin, L-shaped aluminium stand */
.imac-body { background: #0B0B0D; padding: 2.4% 2.4% 0; border-radius: clamp(10px, 1.1vw, 16px) clamp(10px, 1.1vw, 16px) 0 0; box-shadow: 0 40px 90px rgba(0,0,0,0.55); position: relative; z-index: 1; }
.imac-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.imac-screen img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.imac-screen .ph { width: 100%; height: 100%; background: #34353B; }
.imac-chin { aspect-ratio: 100 / 9; margin: 0 -2.4%; background: linear-gradient(180deg, #E6E7E9 0%, #D5D6D9 55%, #C6C7CB 100%); border-radius: 0 0 clamp(8px, .9vw, 12px) clamp(8px, .9vw, 12px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.18), 0 40px 90px rgba(0,0,0,0.55); position: relative; z-index: 1; }
.imac-neck { width: 22%; aspect-ratio: 22 / 6.5; margin: 0 auto; background: linear-gradient(90deg, #B9BABE 0%, #DADBDE 18%, #E2E3E5 50%, #DADBDE 82%, #B9BABE 100%); box-shadow: inset 0 14px 18px -12px rgba(0,0,0,0.45); }
.imac-base { width: 32%; aspect-ratio: 32 / 0.9; margin: 0 auto; background: linear-gradient(180deg, #EDEEF0, #C9CACD); border-radius: 2px 2px 4px 4px; box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.facts.row4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; padding: 72px 0; border-top: 0; border-bottom: 1px solid var(--line); }
.facts.row4 dd { font-size: 16px; font-weight: 500; }
.notes { padding: 88px 0; }
.notes h2 { font-size: 40px; font-weight: 900; line-height: 1; }
.notes .bg { margin-top: 20px; font-size: 15px; line-height: 1.9; color: var(--fg-2); }
.notes ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 32px; }
.notes li { display: flex; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.notes li:first-child { border-top: 0; padding-top: 0; }
.notes .no { font-size: 12px; font-weight: 700; color: #F2C14E; min-width: 32px; }
.notes h3 { font-size: 17px; font-weight: 700; }
.notes li p { margin-top: 6px; font-size: 14px; line-height: 1.9; color: var(--fg-2); }
.visual { padding-bottom: 88px; }
.swatches { margin-top: 16px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 120px); justify-content: start; gap: 12px; } /* any number of colours share one row; capped so 3 colours don't become huge squares */
.swatches > div { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--fg-3); }
.sw { aspect-ratio: 1 / 1; border: 1px solid rgba(255,255,255,0.12); }
.type-box { margin-top: 16px; border: 1px solid var(--line); padding: 28px 24px; font-size: 17px; line-height: 1.5; color: var(--fg); display: flex; flex-direction: column; gap: 28px; }
.type-row { display: flex; flex-direction: column; gap: 10px; }
.type-label { font-size: 14px; font-weight: 700; letter-spacing: 0.15em; color: #ffffff; }
.type-weight { font-size: 13px; color: var(--fg-3); margin-left: 4px; }
.pages { padding-bottom: 88px; display: flex; flex-direction: column; gap: 24px; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.pages figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pages figure.wide { grid-column: span 2; }
.pages figcaption { font-size: 13px; color: var(--fg-3); }
.pages .ph.tall { aspect-ratio: 16 / 10; }
/* extended design (print pieces for the same client): extra-*.jpg in the work folder, shown after PAGES.
   Text (## 延伸設計 in the md) on the left, mockup on the right; stacks on narrow screens via .grid2 */
.pages:has(+ .extras) { padding-bottom: 48px; }
.extras { padding-bottom: 88px; }
@media (min-width: 900px) { .extras.grid2 { grid-template-columns: 5fr 5fr; align-items: center; } }
.extras h2 { margin-top: 14px; font-size: 28px; font-weight: 900; line-height: 1.2; }
.extras .bg { margin-top: 20px; font-size: 15px; line-height: 1.9; color: var(--fg-2); }
.extras .bg p + p { margin-top: 1em; }
.extras-media { display: flex; flex-direction: column; gap: 24px; }
/* 2nd, 3rd… extras: a full-width 2-up row under the text/first-mockup pair (user 2026-11-19: 文字左名片右，下方兩張並排) */
.extras-more { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 40px; align-items: center; }
@media (min-width: 700px) { .extras-more { grid-template-columns: 1fr 1fr; gap: 32px; } }
.extras-more figure { justify-content: start; }
.extras figure { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.extras img { display: block; width: auto; max-width: 100%; max-height: 560px; height: auto; border-radius: 6px; } /* kept small on purpose: a big mockup looked cheap (user, 2026-11-18) */
.extras figcaption { font-size: 13px; color: var(--fg-3); }
/* phone mockup: CSS-drawn frame, the screen is a scroll container holding the stacked mobile screenshots */
.pages figure.mobile { align-items: center; }
.phone-mock { width: min(390px, 100%); background: #0c0c0e; border-radius: 52px; padding: 14px; box-shadow: inset 0 0 0 2px #2a2a2e, 0 30px 60px rgba(0,0,0,0.45); }
.phone-screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 38px; overflow-y: auto; overflow-x: hidden; background: #000; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; } /* scrollbar hidden: it ate screen width and broke the phone proportions */
.phone-screen::-webkit-scrollbar { display: none; width: 0; height: 0; }
.phone-screen img { display: block; width: 100%; height: auto; }
.phone-screen .ph { aspect-ratio: 9 / 19.5; }
.phone-mock { position: relative; }
.phone-mock::after { content: ''; position: absolute; top: 24px; left: 50%; width: 110px; height: 30px; transform: translateX(-50%); background: #0c0c0e; border-radius: 999px; pointer-events: none; } /* dynamic-island notch */
.crumb a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
/* prev / all / next: a slim bar fixed to the bottom of the viewport (user, 2026-11-18: easier to hit than a block at the page end) */
.prevnext { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  background: rgba(31, 32, 35, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body:has(.prevnext) { padding-bottom: 78px; } /* keep the footer reachable above the bar */
.prevnext a { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prevnext a.r { text-align: right; align-items: flex-end; }
.prevnext a.all { text-align: center; align-items: center; }
.prevnext a.all strong { font-size: 13px; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.prevnext span { font-size: 11px; letter-spacing: 0.25em; color: var(--fg-4); white-space: nowrap; }
.prevnext strong { font-size: 16px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prevnext a:hover strong { color: #F2C14E; }

/* graphic */
.masonry { padding: 48px 0 96px; columns: 3; column-gap: 24px; } /* 2026-11-19: fixed 3 columns; wide banners got too small at 5 */
@media (max-width: 900px) { .masonry { columns: 2; column-gap: 20px; } }
@media (max-width: 560px) { .masonry { columns: 1; } }
.tile { display: block; width: 100%; break-inside: avoid; margin: 0 0 20px; position: relative; overflow: hidden; text-align: left; }
.tile[hidden] { display: none; }
.tile img { width: 100%; }
.tile .ph.sq { aspect-ratio: 1 / 1; }
.tile .lottie { width: 100%; background: #fff; }
.tile .lottie svg { display: block; }
/* 2026-11-19: the name sits in a hover veil (same 76% black as the web cards), not on the image; touch devices see the clean grid and get the name on the piece's page */
.tile { border-radius: 6px; background: var(--bg-2); color: inherit; }
.tile img { display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.tile-hover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; background: rgba(0,0,0,0.76); opacity: 0; transition: opacity .6s ease; }
.tile-hover span { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.4; }
.tile-hover small { font-size: 12px; letter-spacing: 0.08em; color: rgba(255,255,255,0.72); }
@media (hover: hover) {
  .tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
  .tile:hover .tile-hover, .tile:focus-visible .tile-hover { opacity: 1; }
}
@media (hover: none) { .tile-hover { display: none; } }
/* graphic detail page */
.gfx-head { padding: 64px 0 40px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.gfx-head h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 900; line-height: 1.15; word-break: keep-all; overflow-wrap: anywhere; }
.gfx-head .facts.row4 { width: 100%; padding: 36px 0; margin-top: 24px; border-top: 1px solid var(--line); } /* 2026-11-24 上下線與文字等距（原本下方沒 padding，底線貼著字） */
.gfx-desc { max-width: 760px; font-size: 15px; line-height: 1.9; color: var(--fg-2); }
.gfx-desc p + p { margin-top: 12px; }
/* 2026-11-19 user: three images per row on the graphic page (≤900px two, ≤560px one) */
/* 2026-11-24 翻頁書（page-flip）：書本置中、最寬 1000px（每頁 500），下方 PREV／頁碼／NEXT */
.gfx-book { padding: 8px 0 72px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.book-stage { width: 100%; max-width: 1000px; }
.book-stage .stf__parent { margin: 0 auto; }
#flipbook { transition: transform .7s ease; }
.book-stage .page { background: #fff; overflow: hidden; }
.book-stage .page img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-bar { display: flex; align-items: center; gap: 28px; font-size: 12px; letter-spacing: 0.25em; color: var(--fg-3); }
.book-bar button { background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 9px 20px; cursor: pointer; font: inherit; font-size: 12px; letter-spacing: 0.2em; transition: background .2s; }
.book-bar button:hover { background: rgba(255,255,255,0.08); }
.gfx-gallery { padding: 16px 0 96px; display: flex; flex-direction: column; align-items: center; gap: 48px; } /* 2026-11-23 使用者：一張一列、電腦版在上手機版在下（原本三欄格） */
.gfx-item { margin: 0; min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gfx-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gfx-item img { display: block; max-width: 100%; max-height: min(82vh, 920px); width: auto; height: auto; margin: 0 auto; border-radius: 4px; } /* 直式 EDM／方形 banner 以高度封頂，橫幅吃滿寬 */
.gfx-item .lottie { width: 100%; background: #fff; }
.gfx-item figcaption { font-size: 12px; letter-spacing: 0.2em; color: var(--fg-3); }
.gfx-row { display: flex; align-items: center; justify-content: center; gap: 32px; width: 100%; } /* 2026-11-24 檔名 1a-／1b- 同編號的圖左右並排 */
.gfx-row:has(> :nth-child(3)) { align-items: flex-start; } /* 三張以上（人火食的三張整頁長圖）頂端對齊 */
.gfx-row .gfx-item { flex: 1 1 0; }
.gfx-row .gfx-item img { max-height: none; width: 100%; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 64px 72px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox img[hidden], .lightbox button[hidden] { display: none; }
.lb-anim { width: min(100%, 1100px); max-height: 100%; background: #fff; }
.lb-anim[hidden] { display: none; }
.lb-anim svg { display: block; width: 100%; height: auto; }
.lb-cap small { display: block; margin-top: 4px; font-size: 12px; color: var(--fg-3, var(--fg-2)); max-width: 720px; margin-left: auto; margin-right: auto; }
.lightbox button { position: absolute; font-size: 40px; line-height: 1; padding: 16px; color: var(--fg-2); }
.lightbox button:hover { color: var(--fg); }
.lb-close { top: 12px; right: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--fg-2); }
.lb-pdf { position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%); font-size: 12px; padding: 10px 20px; }
.lb-pdf[hidden] { display: none; }

@media (max-width: 760px) {
  .prevnext { gap: 12px; padding-top: 10px; }
  .prevnext span { font-size: 10px; }
  .prevnext strong { font-size: 13px; }
  .prevnext a.all span { display: none; }
  .case-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-intro { height: auto; }
  .case-intro .btn { margin-top: 32px; }
  .imac { width: 90%; margin: 0 auto; }
  .about .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .gfx-row { flex-direction: column; gap: 48px; }
  .cats { flex-direction: column; height: auto; }
  .cat, .cats:hover .cat, .cats .cat:hover { flex: none; }
  .cat-card { height: 70vh; min-height: 420px; clip-path: none !important; }
  .cat + .cat { margin-left: 0; margin-top: 2px; }
  .cat:first-child .cat-text, .cat:first-child .cat-foot { right: clamp(28px, 4vw, 64px); }
  .cat-text p { opacity: 1; transform: none; }
  .cat-text { max-width: 80%; }
  .pages figure.wide { grid-column: span 1; }
  .pages figure.mobile.empty { display: none; } /* single column: the empty phone slot would only add a gap */
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox { padding: 56px 12px; }
}
