:root {
  color-scheme: light;
  --paper: #fcf7f3;
  --blue: #073fc8;
  --ink: #102469;
  --muted: #5b6380;
  --line: #dcdce5;
  --yellow: #ffde42;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-padding-top: 24px; }
body { margin: 0; min-width: 0; }
body.viewer-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.page-width { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 10; background: white; padding: 14px 20px; }
.skip-link:focus { top: 10px; }

.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 112px; border-bottom: 1px solid var(--line); }
.gallery-brand { display: block; flex: 0 1 245px; }
.gallery-brand img { width: 100%; height: auto; }
.home-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.home-link:hover { text-decoration: underline; }
.home-link > span { font-size: 22px; }
.gallery-intro { padding-block: 58px 42px; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.intro-copy { min-width: 0; max-width: 800px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .12em; margin-bottom: 18px; }
.eyebrow > span { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
h1 { font-size: clamp(32px, 4.8vw, 60px); line-height: 1.22; font-weight: 900; letter-spacing: -.035em; overflow-wrap: anywhere; }
.intro-description { margin-top: 20px; max-width: 630px; color: var(--muted); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.category-count { flex: 0 0 176px; padding: 23px 20px; background: var(--yellow); border-radius: 5px 28px 5px 5px; }
.category-count > span { display: block; font-size: 12px; line-height: 1.6; }
.category-count > p { display: flex; align-items: baseline; gap: 8px; margin-block: 5px 9px; white-space: nowrap; }
.category-count strong { font-family: Arial, sans-serif; font-size: 64px; letter-spacing: -.06em; line-height: 1; }
.category-count p > span { font-size: 14px; font-weight: 700; }
.category-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 720px); gap: 10px; }
.category-nav > a { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 20px; min-height: 54px; border: 1px solid #c7cddd; border-radius: 0; text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 700; transition: background .15s, border-color .15s; }
.category-nav > a:hover { background: #e9edfc; border-color: var(--blue); }
.category-nav > a[aria-current="page"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.category-number { font-family: Arial, sans-serif; font-size: 11px; opacity: .7; font-weight: 400; }
.concept-note { margin-top: 25px; padding: 17px 0 23px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 16px; }
.concept-tag { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 5px 8px; border: 1px solid #bcc5e2; border-radius: 4px; }
.concept-note p { color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 900px; }
.gallery-section { padding-block: 32px 66px; min-height: 300px; }
.collection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.collection-heading h2 { font-size: 19px; font-weight: 800; }
.collection-heading > p { color: var(--muted); font-size: 12px; }
.gallery-state { padding: 38px 20px; border: 1px dashed #bdc5d9; border-radius: 10px; text-align: center; font-size: 14px; line-height: 1.8; }
.text-button { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 5px; padding: 8px; margin-top: 10px; font-weight: 700; }
.example-grid { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; }
.example-card { min-width: 0; }
.example-preview { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; background: #f0efec; border: 1px solid #dedde1; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.example-preview:hover, .example-preview:focus-visible { border-color: var(--blue); box-shadow: 0 8px 24px #12245412; }
.example-preview > img { width: 100%; height: 100%; object-fit: contain; }
.preview-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 28px; font-size: 13px; line-height: 1.7; background: #f0efec; }
.preview-action { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; border-radius: 5px; padding: 8px 10px; background: #fff; color: var(--ink); border: 1px solid #ddd; font-size: 11px; font-weight: 700; }
.example-caption { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; }
.example-index { font-family: Arial, sans-serif; color: var(--blue); font-size: 12px; font-weight: 700; }
.example-caption > div { min-width: 0; }
.example-caption h3 { font-size: 17px; line-height: 1.5; font-weight: 800; overflow-wrap: anywhere; }
.example-style { margin-top: 5px; font-size: 12px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.gallery-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 25px 32px; font-size: 12px; }
.gallery-footer p { font-weight: 700; }
.gallery-footer p > span { margin-left: 12px; color: var(--muted); font-weight: 400; }
.gallery-footer a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }

.image-viewer { width: min(1200px, calc(100% - 48px)); max-width: none; height: min(1000px, calc(100vh - 48px)); height: min(1000px, calc(100dvh - 48px)); max-height: none; padding: 0; border: 1px solid #cfd3df; border-radius: 16px; background: var(--paper); color: var(--ink); overflow: hidden; box-shadow: 0 20px 80px #0004; }
.image-viewer[open] { display: flex; flex-direction: column; }
.image-viewer::backdrop { background: #09112dd9; }
.viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px 17px; flex-shrink: 0; border-bottom: 1px solid var(--line); }
.viewer-heading { min-width: 0; }
.viewer-position { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.viewer-heading h2 { font-size: clamp(18px, 2vw, 25px); line-height: 1.4; overflow-wrap: anywhere; }
#viewer-style { font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.icon-button { border: 1px solid #bec6dc; border-radius: 50%; flex: 0 0 44px; width: 44px; height: 44px; font-size: 28px; line-height: 1; background: #fff; }
.icon-button:hover { background: #e9edfc; }
.viewer-stage { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; background: #e7e7e5; scrollbar-gutter: stable; position: relative; }
.viewer-stage:focus-visible { outline-offset: -4px; }
.viewer-image-container { min-height: 100%; display: grid; align-items: start; justify-items: center; }
.viewer-image-container img { width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.viewer-image-status { position: relative; text-align: center; padding: 48px 24px; color: #31384c; font-size: 14px; line-height: 1.8; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 24px; border-top: 1px solid var(--line); flex-shrink: 0; }
.viewer-navigation { display: flex; gap: 8px; }
.viewer-button { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; border: 1px solid #bbc5df; border-radius: 6px; padding: 9px 15px; background: #fff; font-size: 13px; font-weight: 700; }
.viewer-button:not(:disabled):hover { background: #e9edfc; border-color: var(--blue); }
.viewer-button:disabled { color: #777c89; background: #eeedeb; border-color: #d8d8dc; }
.original-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.viewer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 24px; padding: 0 24px 14px; flex-shrink: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 1000px) {
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-intro { gap: 24px; }
  .category-count { flex-basis: 160px; padding: 20px 16px; }
  .category-count strong { font-size: 56px; }
}

@media (max-width: 600px) {
  .page-width { width: calc(100% - 32px); }
  .gallery-header { min-height: 83px; gap: 18px; }
  .gallery-brand { flex-basis: 185px; }
  .home-link { font-size: 12px; gap: 6px; }
  .home-link > span { font-size: 18px; }
  .gallery-intro { padding-block: 34px 25px; display: block; }
  .eyebrow { font-size: 11px; margin-bottom: 14px; }
  h1 { font-size: clamp(29px, 8.3vw, 46px); }
  .intro-description { font-size: 14px; margin-top: 16px; }
  .category-count { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 5px; width: fit-content; margin-top: 20px; max-width: 100%; flex-wrap: wrap; }
  .category-count > p { margin: 0; gap: 6px; }
  .category-count strong { font-size: 25px; letter-spacing: -.02em; }
  .category-count p > span, .category-count > span { font-size: 11px; }
  .category-count > span:last-child { display: none; }
  .category-nav { gap: 7px; }
  .category-nav > a { flex-direction: column; justify-content: center; padding: 9px 4px; min-height: 58px; font-size: 12px; gap: 5px; }
  .concept-note { align-items: flex-start; gap: 9px; margin-top: 18px; padding-block: 0 20px; flex-direction: column; }
  .concept-note p { font-size: 12px; }
  .collection-heading { align-items: flex-start; gap: 10px; margin-bottom: 18px; flex-direction: column; }
  .gallery-section { padding-block: 24px 38px; }
  .example-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .example-preview { border-radius: 10px; }
  .example-caption { margin-top: 12px; }
  .example-caption h3 { font-size: 17px; }
  .gallery-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 20px; }
  .image-viewer { width: calc(100% - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 12px; }
  .viewer-header { gap: 12px; padding: 15px 14px 12px; }
  .viewer-toolbar { gap: 8px; flex-wrap: wrap; padding: 10px 12px 6px; }
  .viewer-button { gap: 6px; padding-inline: 10px; font-size: 12px; }
  .viewer-navigation { gap: 6px; }
  .original-link { font-size: 12px; }
  .viewer-note { padding: 2px 14px 12px; font-size: 10px; gap: 4px; }
  .keyboard-help { display: none; }
}

@media (max-height: 500px) {
  .viewer-header { padding-block: 10px; }
  .viewer-position { margin-bottom: 2px; }
  #viewer-style, .viewer-note { display: none; }
  .viewer-toolbar { padding-block: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
