:root {
  color-scheme: light;
  --paper: #f5f5ef;
  --ink: #191a18;
  --muted: #555852;
  --line: #d9d9d0;
  --blue: #2539d9;
  --lime: #e3fa64;
  --sans: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(100% - clamp(2rem, 9vw, 9rem), 1320px); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: 1rem; z-index: 5; padding: .65rem 1rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 850; text-decoration: none; line-height: 1.2; }
.mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .55rem; background: var(--blue); color: white; font-size: 1.45rem; line-height: 1; }
.masthead nav { display: flex; align-items: center; gap: 1.35rem; }
.nav-link { font-size: .9rem; font-weight: 700; text-decoration: none; }
.nav-link:hover { color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: .55rem 1.05rem; border: 1px solid transparent; border-radius: .5rem; text-decoration: none; font-weight: 750; font-size: .9rem; cursor: pointer; }
.button--outline { border-color: #9d9f95; color: var(--ink); background: transparent; }
.button--outline:hover { border-color: var(--blue); color: var(--blue); }
.button--primary { background: var(--blue); color: white; }
.button--primary:hover { background: #1727b1; }

.hero { display: grid; grid-template-columns: 1fr 1.04fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6vw, 6rem); }
.hero-copy { min-width: 0; }
.kicker { display: flex; align-items: center; gap: .65rem; margin: 0; color: var(--blue); font-size: .85rem; font-weight: 850; letter-spacing: .11em; }
.kicker::before { content: ""; display: block; width: 1.5rem; height: 2px; background: currentColor; }
h1 { margin: .25em 0 .22em; font-size: clamp(3.15rem, 7.65vw, 7.85rem); line-height: 1.035; letter-spacing: -.075em; font-weight: 900; }
h1 span { display: block; color: var(--blue); }
.lede { color: var(--muted); max-width: 29rem; margin: 0; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.hero-actions .button { min-height: 3.15rem; padding-inline: 1.35rem; }
.feature { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; min-height: clamp(22rem, 34vw, 32rem); padding: 1rem; border: 1px solid #c4d74a; border-radius: 1.2rem; overflow: hidden; background: var(--lime); text-decoration: none; color: #16238e; }
.feature-top, .feature-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .42rem .5rem; }
.feature-top { font-size: .85rem; font-weight: 800; letter-spacing: .06em; }
.feature-top span:last-child { font-size: .8rem; font-weight: 650; letter-spacing: 0; }
.feature-art { position: relative; min-height: 0; margin: .3rem 0; overflow: hidden; border-radius: .65rem; background-color: var(--lime); background-image: linear-gradient(#46561320 1px, transparent 1px), linear-gradient(90deg, #46561320 1px, transparent 1px); background-size: 12.5% 12.5%; background-position: center; border: 1px solid #46561326; }
.feature-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.feature-bottom { border-top: 1px solid #46561332; margin-top: .2rem; }
.feature-bottom strong { display: block; font-size: clamp(1.12rem, 2.2vw, 1.6rem); line-height: 1.32; }
.feature-bottom small { display: block; margin-top: .18rem; font-size: .85rem; }
.feature:hover .card-open { color: white; background: var(--blue); border-color: var(--blue); }

.collection { padding-block: 2.4rem 3.5rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.15rem; }
.collection h2 { margin: .05em 0 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.14; letter-spacing: -.045em; }
.search { display: flex; align-items: center; gap: .65rem; max-width: 100%; min-width: min(100%, 18rem); min-height: 3rem; padding: 0 .8rem; border: 1px solid #9b9e91; border-radius: .55rem; background: #fff; }
.search:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search-icon { display: inline-block; width: .85rem; height: .85rem; flex: 0 0 .85rem; border: 1.8px solid #52564b; border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: .42rem; height: 2px; background: #52564b; transform: rotate(45deg); right: -.31rem; bottom: -.14rem; }
.search input { width: 100%; padding: .6rem 0 .6rem .2rem; border: 0; color: var(--ink); background: transparent; outline: none; }
.toolbar { display: flex; align-items: start; justify-content: space-between; gap: .8rem 1.2rem; margin-bottom: 1.15rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters button { min-height: 2.6rem; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 2rem; background: #fff; color: var(--ink); font-size: .875rem; font-weight: 650; cursor: pointer; }
.filters button:hover { border-color: var(--blue); color: var(--blue); }
.filters button[aria-pressed="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.count { margin: .55rem 0 0; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: .85rem; background: white; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 10px 26px #222c4010; }
.card canvas { display: block; width: 100%; aspect-ratio: 16 / 9; background: #e4e8f2; }
.card .txt { display: flex; justify-content: space-between; align-items: end; flex: 1; gap: .65rem; padding: .9rem 1rem 1rem; }
.card .category { display: block; color: var(--blue); font-size: .8rem; font-weight: 800; letter-spacing: .05em; }
.card h3 { margin: .15em 0; font-size: clamp(1.14rem, 1.7vw, 1.38rem); line-height: 1.35; letter-spacing: -.02em; }
.card p { margin: .25em 0 0; color: var(--muted); font-size: .9rem; }
.card-open { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 2rem; padding: 0 .65rem; border: 1px solid #c8cbe3; border-radius: .4rem; color: var(--blue); font-size: .8rem; font-weight: 800; white-space: nowrap; transition: background .2s, color .2s; }
.card:hover .card-open { color: white; background: var(--blue); border-color: var(--blue); }
.empty { padding: 2.5rem 1rem; border: 1px dashed #858779; border-radius: .8rem; text-align: center; }
.empty p { margin: 0 0 1rem; }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.75rem 2.5rem; font-size: .9rem; }
.footer p { margin: 0; color: var(--muted); }
.footer a { color: var(--blue); font-weight: 750; text-underline-offset: .2em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { gap: 1.75rem; }
}
@media (max-width: 650px) {
  .masthead { min-height: 4.05rem; }
  .masthead nav { gap: .6rem; }
  .nav-link { display: none; }
  .hero { grid-template-columns: 1fr; gap: 1.65rem; padding-block: 2.25rem; }
  h1 { font-size: clamp(3.1rem, 12.6vw, 5.75rem); }
  .feature { min-height: clamp(19rem, 82vw, 29rem); border-radius: .9rem; padding: .75rem; }
  .feature-art { min-height: 12rem; }
  .collection { padding-top: 1.9rem; }
  .collection-heading { display: grid; gap: 1rem; }
  .toolbar { flex-direction: column; }
  .count { margin-top: 0; }
}
@media (max-width: 500px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-open { transition: none; }
  .card:hover { transform: none; }
}
