:root {
  color-scheme: light;
  --paper: #fafaf8;
  --card: #fff;
  --ink: #202321;
  --muted: #606561;
  --line: #d9dcd6;
  --night: #242925;
  --brand: #064a96;
  --brand-dark: #08386d;
  --accent: #ff7a00;
  --accent-ink: #884410;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", SimSun, serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(main .exhibition) { min-width: 300px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; }
:focus-visible { outline: 2px solid #1768b2; outline-offset: 3px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
.shell { width: min(calc(100% - clamp(48px, 8vw, 160px)), 1600px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 10; left: 12px; top: 12px; padding: 12px; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }

.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.mast-inner, .brand, .mast-actions { display: flex; align-items: center; }
.mast-inner { min-height: 66px; justify-content: space-between; gap: 14px; }
.brand { text-decoration: none; gap: 12px; }
.brand-logo { height: 48px; width: auto; margin-left: -6px; }
.brand-sub { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.mast-actions { gap: 28px; }
.text-button { background: none; border: 0; padding: 10px 0; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.text-button:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 5px; }
.test-tag { font-size: .76rem; color: var(--muted); }

.exhibition { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-block: clamp(34px, 4vw, 66px) clamp(28px, 3.4vw, 54px); }
.edition-line { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 13px; }
.edition { color: var(--muted); font-size: .81rem; letter-spacing: .075em; font-weight: 550; }
.exhibition h1 { font-size: clamp(40px, 4.5vw, 80px); font-weight: 650; line-height: 1.16; letter-spacing: -.055em; }
.exhibition h1 span { display: inline-block; white-space: nowrap; }
.exhibition h1 span:first-child { margin-left: -.42em; margin-right: .08em; }
.collection-size { display: flex; align-items: baseline; gap: 9px; flex-shrink: 0; color: var(--muted); font-size: .85rem; }
#total-works { color: var(--ink); font-size: clamp(30px, 3.1vw, 50px); font-weight: 400; line-height: 1; letter-spacing: -.07em; font-variant-numeric: lining-nums tabular-nums; }

.gallery { padding-bottom: clamp(35px, 5vw, 90px); }
.gallery-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "tabs search" "info info"; align-items: center; }
.categories { grid-area: tabs; display: flex; align-items: stretch; gap: clamp(22px, 3.2vw, 54px); height: 53px; border-bottom: 1px solid var(--line); }
.category { background: transparent; border: 0; padding: 0 0 2px; display: inline-flex; align-items: center; gap: 7px; position: relative; font-size: 1.14rem; font-weight: 530; color: var(--muted); }
.category small { font: 500 .76rem/1 var(--sans); font-variant-numeric: tabular-nums; align-self: center; transform: translateY(-.15em); }
.category:hover, .category[aria-pressed="true"] { color: var(--ink); }
.category[aria-pressed="true"] { font-weight: 700; }
.category[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: var(--brand); }
.search { grid-area: search; height: 53px; display: flex; align-items: center; justify-content: end; border-bottom: 1px solid var(--line); }
.search input { width: 99px; height: 36px; border: 0; background: #eeefeb; font-size: .84rem; border-radius: 0 24px 24px 0; padding: 0 12px 0 0; }
.search input::placeholder { color: #626862; opacity: 1; }
.search input:focus { outline-offset: 0; }
.search button { width: 34px; height: 36px; padding: 0; border: 0; border-radius: 24px 0 0 24px; background: #eeefeb; display: grid; place-items: center; }
.glass { position: relative; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 100%; margin: -2px 0 0 3px; }
.glass::after { content: ""; position: absolute; top: 9px; left: 8px; width: 6px; height: 1.5px; background: currentColor; transform: rotate(46deg); transform-origin: left; }
.gallery-context { min-height: 48px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; }
.gallery-context { grid-area: info; flex-wrap: wrap; }
.gallery-context .text-button { font-size: inherit; color: var(--brand); }
.activity { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.state { display: inline-flex; align-items: center; gap: 7px; }
.state::before { content: ""; width: 6px; height: 6px; background: #90958f; border-radius: 50%; }
.state.open::before { background: #3e745b; }
.grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: clamp(15px, 1.65vw, 33px); row-gap: clamp(26px, 3.2vw, 50px); }
.work { min-width: 0; }
.work-preview { width: 100%; position: relative; display: grid; place-items: center; isolation: isolate; cursor: zoom-in; overflow: hidden; border: 0; padding: 0; background: #eeede9; aspect-ratio: 4 / 3; border-radius: 3px; }
.work-preview:focus-visible { outline-offset: 2px; }
.work-preview img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.work-preview.photo img { object-fit: cover; transition: transform .25s ease; }
.work-preview.seal { aspect-ratio: 1 / 1; }
.work-preview.ink, .work-preview.art { aspect-ratio: 5 / 6; }
.work-preview:not(.photo) { padding: clamp(10px, 1.2vw, 22px); }
.work-preview.seal { padding: clamp(15px, 2.2vw, 36px); }
@media (hover: hover) { .work-preview.photo:hover img { transform: scale(1.025); } }
.media-tag { position: absolute; right: 9px; bottom: 9px; background: #191d1ccc; color: white; border-radius: 3px; padding: 4px 7px; font-size: .72rem; font-weight: 540; line-height: 1.2; }
.work-meta { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; margin-top: 13px; }
.work-info { min-width: 0; display: grid; gap: 4px; }
.work-code { color: var(--muted); font-size: .74rem; letter-spacing: .07em; font-variant-numeric: tabular-nums; }
.work h3 { font-size: clamp(1rem, 1.23vw, 1.3rem); font-weight: 640; line-height: 1.43; overflow-wrap: anywhere; }
.work h3 button { font: inherit; background: none; border: 0; text-align: left; padding: 0; }
.work h3 button:hover { text-decoration: underline; text-underline-offset: 4px; }
.ai-suffix { margin-left: .3em; color: var(--brand); font-size: .78em; font-weight: 650; }
.credit { color: var(--muted); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.credit span { margin: 0 .1em; }
.pick { display: grid; place-items: center; position: relative; flex: 0 0 40px; min-height: 40px; padding: 0; background: transparent; border: 0; font-size: 1.12rem; line-height: 1; color: var(--ink); isolation: isolate; }
.pick::before { content: ""; position: absolute; z-index: -1; inset: 4px; border: 1px solid #c9cec8; border-radius: 100%; background: transparent; }
.pick:not(:disabled):hover::before { border-color: var(--brand); background: #e9eff4; }
.pick[aria-pressed=true] { color: #fff; }
.pick[aria-pressed=true]::before, .pick[aria-pressed=true]:hover::before { border-color: var(--brand); background: var(--brand); }
.pick:disabled { flex-basis: auto; min-width: 36px; padding: 0 3px; font-size: .7rem; line-height: 1.3; color: var(--muted); opacity: .9; max-width: 50px; }
.pick:disabled::before { display: none; }
.footer { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 22px 0 108px; font-size: .82rem; color: var(--muted); }
.footer a, #pdf-open { text-underline-offset: 4px; }

.ballot-bar { position: fixed; z-index: 2; inset: auto 0 0; border-top: 1px solid var(--line); background: #fffffff7; padding-bottom: env(safe-area-inset-bottom, 0px); }
.ballot-inner { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ballot-inner > div { display: flex; align-items: baseline; gap: 15px; }
#selection-count { font-size: .98rem; font-weight: 650; }
#selection-summary { color: var(--muted); font-size: .83rem; }
.primary { padding: 9px 21px; min-height: 42px; border: 1px solid var(--brand); border-radius: 24px; background: var(--brand); color: #fff; font-weight: 600; }
.primary:not(:disabled):hover { background: var(--brand-dark); }
.primary:disabled { background: #e7e9e5; color: #686e69; border-color: #e7e9e5; opacity: 1; }
.error { color: #8d2518; padding: 9px 11px; border: 1px solid #e0b6a9; background: #f9ebe4; border-radius: 3px; line-height: 1.5; }
.empty { grid-column: 1/-1; color: var(--muted); padding: 28px 0; }
dialog { padding: 0; max-width: min(680px, calc(100% - 24px)); width: 100%; max-height: min(92dvh, 950px); border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 20px 75px #20222235; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #1e201fb5; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font: 700 1.58rem/1.25 var(--sans); }
.dialog-head .credit { margin-top: 5px; }
.close { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; border-radius: 9px; font-size: 1.4rem; line-height: 1; }
.close:hover { background: #eeefed; }
.eyebrow { color: var(--brand); font-size: .8rem; font-weight: 700; margin-bottom: 5px; }
.dialog-scroll, .detail-body { overflow: auto; overscroll-behavior: contain; }
.rules-body, .review-body { padding: 18px 20px 22px; line-height: 1.6; }
.rules-body ul { padding-left: 1.3em; margin: .7em 0 1em; }
.rules-body li + li { margin-top: .5em; }
dialog.detail { max-width: min(980px, calc(100% - 24px)); }
.detail-stage { display: grid; place-items: center; background: #efeeea; padding: 12px; }
.detail-enlarge { position: relative; display: block; min-width: 0; max-width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: zoom-in; }
.detail-enlarge img { margin-inline: auto; width: auto; height: auto; max-height: min(51dvh, 570px); object-fit: contain; border-radius: 5px; }
.enlarge-icon { position: absolute; bottom: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; color: white; background: #202322dc; box-shadow: 0 2px 8px #06142b44; }
.detail-enlarge:hover .enlarge-icon { background: var(--brand); }
.enlarge-icon::before, .enlarge-icon::after { content: ""; position: absolute; }
.enlarge-icon::before { top: 9px; left: 9px; width: 14px; height: 14px; border: 2px solid; border-radius: 50%; }
.enlarge-icon::after { top: 22px; left: 21px; width: 8px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(45deg); }
.image-controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 10px 12px; color: var(--muted); font-size: .86rem; }
.image-controls button, .frames button { border: 1px solid var(--line); background: transparent; border-radius: 3px; }
.image-controls button { min-height: 36px; padding-inline: 12px; }
.frames { display: flex; overflow: auto; gap: 7px; padding: 4px 12px 11px; }
.frames button { flex: 0 0 62px; padding: 2px; background: #f3f2ef; }
.frames button[aria-pressed="true"] { border: 2px solid var(--brand); padding: 1px; }
.frames img { width: 100%; height: 46px; object-fit: contain; }
.detail-footer { border-top: 1px solid var(--line); padding: 11px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-footer .primary { margin-left: auto; }
#pdf-open { color: var(--brand); font-size: .87rem; font-weight: 630; padding-block: 8px; }
dialog.zoom { inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; background: #111211; color: white; }
dialog.zoom[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.zoom-head { display: flex; align-items: center; gap: 12px; padding: 8px max(13px, env(safe-area-inset-right, 0px)) 8px max(13px, env(safe-area-inset-left, 0px)); background: #1c1e1e; border-bottom: 1px solid #8196bd3d; }
.zoom-heading { flex: 1; min-width: 0; }
.zoom-heading h2 { font-size: clamp(.88rem, 2vw, 1.12rem); overflow-wrap: anywhere; line-height: 1.3; }
#zoom-count { color: #cacdcf; font-size: .75rem; }
.zoom-navigation { display: flex; gap: 5px; }
.zoom-head button { border: 1px solid #555959; color: white; }
.zoom-navigation button { min-height: 40px; padding: 0 8px; background: transparent; border-radius: 8px; white-space: nowrap; font-size: .82rem; }
.zoom-head button:not(:disabled):hover { background: #393d3d; }
.zoom-canvas { overflow: auto; overscroll-behavior: contain; }
.zoom-image { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; background: transparent; border: 0; width: 100%; height: 100%; padding: 12px; cursor: zoom-in; }
.zoom-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.zoom-canvas.original .zoom-image { width: max-content; height: max-content; min-width: 100%; min-height: 100%; grid-template-rows: auto; align-content: center; cursor: zoom-out; }
.zoom-canvas.original img { max-width: none; max-height: none; }
.zoom :focus-visible { outline-color: #ffb060; }
.zoom-image:focus-visible { outline-offset: -4px; }
.review-group { margin-bottom: 13px; }
.review-group h3 { font-size: .92rem; color: var(--brand-dark); }
.review-group ul { margin: 4px 0 0; padding: 0; list-style: none; }
.review-group li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-block: 4px; }
.review-group button { background: none; border: 0; padding: 6px 2px; color: var(--brand-dark); flex-shrink: 0; }
fieldset { border: 0; padding: 0; margin: 17px 0 10px; min-width: 0; }
legend { font-size: 1.02rem; font-weight: 700; padding: 0; margin-bottom: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-grid label { display: grid; gap: 4px; color: var(--muted); font-size: .89rem; }
.form-grid input { width: 100%; min-height: 41px; background: white; border: 1px solid #c9d4e5; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 1rem; }
.form-hint { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.submit { width: 100%; margin-top: 10px; }
.receipt { text-align: center; padding: 10px 0; }.receipt h3 { font: 700 1.6rem var(--sans); }.receipt p { margin: 8px 0 14px; }
.toast { z-index: 10; position: fixed; inset: auto auto 80px 50%; transform: translateX(-50%); background: var(--night); color: white; width: max-content; max-width: calc(100% - 28px); border-radius: 4px; padding: 10px 14px; text-align: center; box-shadow: 0 3px 12px #1114; }


.dialog-head { align-items: center; padding: 17px 23px; }
.dialog-head h2 { letter-spacing: -.025em; }
.close { border-radius: 50%; width: 38px; height: 38px; flex-basis: 38px; background: #f1f2ef; border-color: transparent; }
.review-body { padding: 0 23px 22px; }
.review-guide { display: flex; align-items: center; gap: 16px; padding: 9px 0 12px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.review-guide img { width: 54px; height: 76px; object-fit: contain; }
.review-guide h3 { font-size: 1.08rem; }
.review-guide p { font-size: .84rem; color: var(--muted); }
.review-group h3 { font-weight: 650; color: var(--ink); }
.review-group li { font-size: .93rem; }
.receipt { padding: 21px 6px 12px; }
.receipt img { width: auto; height: clamp(100px, 17dvh, 142px); max-width: 80%; object-fit: contain; margin: 0 auto 16px; }
.receipt h3 { font: 650 1.6rem/1.25 var(--sans); }
.receipt .thanks { margin: 6px 0 18px; }
#receipt-text { font-size: .84rem; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; border-top: 1px solid var(--line); padding: 14px 0 0; }
#share { max-width: min(400px, calc(100% - 24px)); }
.share-body { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 22px 24px 26px; }
#share-qr { width: 208px; height: auto; max-width: 75%; }
#share-message { font-size: .91rem; line-height: 1.65; }
#share-url { font-size: .88rem; color: var(--brand); overflow-wrap: anywhere; text-underline-offset: 4px; }
@media (max-width: 1020px) {
  .shell { width: calc(100% - 48px); }
  .grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 36px); }
  .mast-inner { min-height: 56px; }
  .brand-logo { height: 40px; margin-left: -5px; }
  .brand-sub { display: none; }
  .mast-actions { gap: 17px; }
  .mast-actions .text-button { min-height: 44px; font-size: .79rem; }
  .exhibition { gap: 12px; padding-block: 28px 20px; align-items: end; }
  .exhibition h1 { font-size: clamp(32px,6vw,42px); line-height: 1.19; letter-spacing: -.045em; }
  .exhibition h1 span { display: block; }
  .exhibition h1 span:first-child { margin-right: 0; }
  .edition-line { gap: 11px; margin-bottom: 10px; }
  .edition, .activity, .test-tag { font-size: .7rem; }
  .state { gap: 5px; }
  .collection-size { flex-direction: column; align-items: end; gap: 4px; font-size: .72rem; }
  #total-works { font-size: 30px; }
  .gallery-toolbar { grid-template-areas: "tabs tabs" "info search"; column-gap: 4px; }
  .categories { height: 46px; align-items: stretch; gap: 0; justify-content: space-between; }
  .category { justify-content: center; gap: 5px; font-size: 1rem; min-width: 45px; }
  .category small { font-size: .7rem; }
  .gallery-context { font-size: .74rem; gap: 5px; min-height: 52px; }
  .search { height: 52px; border: 0; }
  .search button { min-width: 34px; height: 38px; }
  .search input { width: 93px; font-size: .82rem; height: 38px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 12px; row-gap: 24px; }
  .work-meta { margin-top: 8px; gap: 2px; }
  .work-info { gap: 2px; }
  .work-code { font-size: .69rem; letter-spacing: .02em; }
  .work h3 { font-size: 1rem; line-height: 1.4; }
  .work .credit { font-size: .74rem; }
  .work-preview { border-radius: 2px; }
  .media-tag { bottom: 5px; right: 5px; font-size: .65rem; padding: 3px 5px; }
  .pick { margin-right: -4px; margin-top: -5px; flex-basis: 40px; min-height: 44px; }
  .pick::before { inset: 8px 6px; }
  .footer { font-size: .73rem; padding-bottom: 102px; }
  .ballot-inner { min-height: 61px; gap: 8px; }
  .ballot-inner > div { flex-direction: column; gap: 1px; }
  #selection-summary { font-size: .73rem; }
  .ballot-inner .primary { font-size: .85rem; padding-inline: 16px; }
  .dialog-head { gap: 8px; padding: 12px 15px; }
  .dialog-head h2 { font-size: 1.27rem; }
  .detail-footer, .rules-body { padding: 12px 15px; }
  .review-body { padding: 0 15px 18px; }
  .detail-stage { padding: 6px; }
  .detail-enlarge img { max-height: min(49dvh, 420px); }
  .form-grid { gap: 8px; }
  .zoom-head { gap: 7px; }
  .zoom-image { padding: 4px; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 28px); }
  .mast-actions { gap: 12px; }
  .collection-size { font-size: .68rem; }
  .exhibition h1 { font-size: 29px; }
  .grid { column-gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .work-preview img { transition: none; } }