:root {
    --ink: #0b1220;
    --muted: #64748b;
    --quiet: #94a3b8;
    --line: rgba(11, 18, 32, 0.12);
    --paper: #f7f6f3;
    --white: #ffffff;
    --accent: #258da9;
    --accent-bright: #5ec8e0;
    --danger: #b42318;
    --success: #157347;
    --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
    --sans: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --shadow: 0 22px 60px -30px rgba(15, 23, 42, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 10px 16px;
    color: #fff;
    background: var(--ink);
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.demo-notice {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 8px 24px;
    color: #dbeafe;
    background: var(--ink);
    font-size: 0.78rem;
    text-align: center;
}

.demo-notice a {
    color: #fff;
    text-underline-offset: 4px;
}

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 86px;
    padding: 20px clamp(24px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
    background: rgba(247, 246, 243, 0.94);
    backdrop-filter: blur(16px);
}

.identity {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.identity-zh {
    font-family: var(--serif);
    font-size: 1.45rem;
    letter-spacing: 0.12em;
}

.identity-en {
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 2.4vw, 34px);
    font-size: 0.88rem;
}

.primary-nav a,
.nav-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
    color: var(--accent);
}

.flash {
    width: min(1120px, calc(100% - 40px));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 20px auto 0;
    padding: 14px 18px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.9rem;
}

.flash-success {
    color: #14532d;
    background: #f0fdf4;
    border-color: #86efac;
}

.flash-error {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fecaca;
}

.flash button {
    flex: none;
    padding: 0 4px;
    color: currentColor;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
}

.style-picker {
    width: min(1380px, calc(100% - 48px));
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.8fr);
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 84px) 0;
}

.style-picker h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.2;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.style-option {
    min-width: 0;
    min-height: 158px;
    display: flex;
    flex-direction: column;
    padding: 22px;
    color: inherit;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.style-option:hover,
.style-option:focus-visible {
    border-color: rgba(37, 141, 169, 0.65);
    transform: translateY(-3px);
}

.style-option.is-active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.style-option > span {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.style-option.is-active > span {
    color: var(--accent-bright);
}

.style-option strong {
    margin-top: 12px;
    font-family: var(--serif);
    font-size: 1.2rem;
}

.style-option small {
    margin-top: auto;
    padding-top: 14px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.style-option.is-active small {
    color: #cbd5e1;
}

.gallery-hero {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(34px, 5vw, 74px) 0 clamp(90px, 10vw, 150px);
}

.hero-copy {
    max-width: 720px;
    margin: 0 auto clamp(50px, 6vw, 86px);
    text-align: center;
}

.hero-copy h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1;
}

.hero-en {
    margin: 18px 0 30px;
    color: var(--quiet);
    font-family: var(--mono);
    letter-spacing: 0.42em;
}

.hero-lead {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    font-family: var(--serif);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 2;
}

.gallery-hero-art {
    margin: 0;
}

.gallery-hero-art > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e8e5de;
}

.gallery-hero-art figcaption {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 14px;
    color: var(--quiet);
    font-size: 0.8rem;
}

.works-section,
.literature-section,
.timeline-section {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(76px, 8vw, 130px) 0;
}

.gallery-works {
    border-top: 1px solid var(--line);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 38px;
}

.section-heading.centered {
    display: block;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.section-heading h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 400;
    line-height: 1.25;
}

.section-heading > p,
.section-heading > div + p {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto;
    gap: 18px;
    align-items: center;
    margin: 34px 0 40px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 38px;
    padding: 7px 14px;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip:focus-visible {
    border-color: var(--accent);
}

.filter-chip.is-active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.search-field {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.search-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 141, 169, 0.14);
}

.search-field svg {
    width: 18px;
    flex: none;
    fill: none;
    stroke: var(--quiet);
    stroke-width: 1.8;
}

.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.filter-summary {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.filter-summary strong {
    color: var(--ink);
    font-size: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 58px);
}

.work-card {
    min-width: 0;
}

.work-card[hidden] {
    display: none !important;
}

.work-card-button {
    width: 100%;
    display: block;
    padding: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.work-image {
    display: block;
    overflow: hidden;
    background: #e8e5de;
}

.work-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-card-button:hover .work-image img,
.work-card-button:focus-visible .work-image img {
    transform: scale(1.025);
}

.work-card-button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 6px;
}

.work-index {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.7rem;
}

.work-index code {
    font: inherit;
}

.work-card strong {
    display: block;
    margin-top: 7px;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
}

.work-card small {
    display: block;
    margin-top: 3px;
    color: var(--accent);
}

.filter-empty,
.empty-state {
    padding: 36px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 10px;
    text-align: center;
}

.archive-shell {
    width: min(1380px, calc(100% - 48px));
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    margin: 20px auto clamp(90px, 10vw, 150px);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.archive-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 60px;
    padding: 44px 34px;
    border-right: 1px solid var(--line);
}

.archive-name {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.8rem;
    letter-spacing: 0.08em;
}

.archive-since {
    margin: 4px 0 42px;
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
}

.archive-sidebar ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

.archive-sidebar a,
.archive-sidebar button {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    color: inherit;
    background: transparent;
    border-bottom: 1px solid rgba(11, 18, 32, 0.07);
    cursor: pointer;
    font-size: 0.92rem;
    text-decoration: none;
}

.archive-sidebar li:last-child button {
    border-bottom: 0;
}

.archive-sidebar span {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.68rem;
}

.archive-count {
    margin: 0;
    color: var(--quiet);
    font-size: 0.75rem;
}

.archive-main {
    min-width: 0;
}

.archive-intro {
    padding: clamp(36px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
}

.archive-intro h2 {
    margin: 0 0 18px;
    font-family: var(--serif);
    font-size: clamp(2.1rem, 4.5vw, 4.2rem);
    font-weight: 400;
}

.archive-intro > p:last-child {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

.archive-main .filter-bar {
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
}

.archive-grid .work-card {
    padding: 18px;
    background: #fff;
}

.archive-grid .work-card strong {
    font-family: var(--sans);
    font-size: 0.95rem;
}

.archive-grid .work-image img {
    aspect-ratio: 1 / 0.84;
}

.archive-main > .filter-empty {
    margin: 30px;
}

.theme-immersive {
    color: #f8fafc;
    background: #0a0a0a;
}

.theme-immersive .demo-notice {
    color: #cbd5e1;
    background: #111827;
}

.theme-immersive .site-header {
    color: #fff;
    background: rgba(10, 10, 10, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
}

.theme-immersive .style-picker {
    color: #fff;
}

.theme-immersive .style-option {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.14);
}

.theme-immersive .style-option:not(.is-active) small {
    color: #94a3b8;
}

.theme-immersive .style-option.is-active {
    background: #fff;
    color: var(--ink);
}

.theme-immersive .style-option.is-active small {
    color: var(--muted);
}

.immersive-hero {
    position: relative;
    min-height: min(820px, calc(100vh - 40px));
    overflow: hidden;
}

.immersive-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.immersive-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 36%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.93), transparent 66%);
}

.immersive-copy {
    position: absolute;
    right: clamp(24px, 6vw, 90px);
    bottom: clamp(44px, 8vw, 110px);
    left: clamp(24px, 6vw, 90px);
    max-width: 1000px;
}

.immersive-copy h2 {
    max-width: 950px;
    margin: 0 0 24px;
    font-family: var(--serif);
    font-size: clamp(2.6rem, 6.5vw, 6.4rem);
    font-weight: 300;
    line-height: 1.13;
}

.immersive-copy > p:not(.eyebrow) {
    max-width: 580px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
}

.text-link,
.text-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0;
    color: inherit;
    background: transparent;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    text-decoration: none;
}

.immersive-stories {
    width: min(1360px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(90px, 11vw, 170px) 0;
}

.immersive-story {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: clamp(40px, 7vw, 100px);
    align-items: center;
    margin-bottom: clamp(90px, 12vw, 180px);
}

.immersive-story.reverse {
    grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
}

.immersive-story.reverse .story-image {
    order: 2;
}

.story-image {
    padding: 0;
    background: #151515;
    cursor: pointer;
}

.story-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.story-copy h3 {
    margin: 0 0 18px;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 300;
}

.story-copy > p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.9;
}

.immersive-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding-top: 54px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.immersive-strip .work-card small,
.immersive-strip .work-index {
    color: rgba(255, 255, 255, 0.48);
}

.immersive-strip .work-image img {
    aspect-ratio: 1 / 0.8;
}

.theme-immersive .literature-section,
.theme-immersive .timeline-section {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.theme-immersive .section-heading > p,
.theme-immersive .section-heading > div + p,
.theme-immersive .timeline p {
    color: rgba(255, 255, 255, 0.58);
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.document-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    color: inherit;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.document-card:hover,
.document-card:focus-visible {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.document-card span {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.7rem;
}

.document-card strong {
    margin: 22px 0;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.45;
}

.document-card small {
    margin-top: auto;
    color: var(--muted);
}

.theme-immersive .document-card {
    background: #151515;
    border-color: rgba(255, 255, 255, 0.14);
}

.theme-immersive .document-card small {
    color: rgba(255, 255, 255, 0.52);
}

.timeline {
    padding: 0;
    margin: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 28px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

.timeline time {
    color: var(--accent);
    font-family: var(--mono);
}

.timeline strong {
    font-family: var(--serif);
    font-size: 1.18rem;
    font-weight: 500;
}

.timeline p {
    margin: 7px 0 0;
    color: var(--muted);
}

.theme-immersive .timeline li {
    border-color: rgba(255, 255, 255, 0.14);
}

.contact-section {
    padding: clamp(90px, 12vw, 170px) 24px;
    color: #dbeafe;
    background: var(--ink);
    text-align: center;
}

.contact-section h2 {
    max-width: 820px;
    margin: 0 auto 20px;
    color: #fff;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    font-weight: 300;
    line-height: 1.3;
}

.contact-section > p:not(.eyebrow) {
    max-width: 680px;
    margin: 0 auto 30px;
    color: #94a3b8;
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.primary-button {
    color: #fff;
    background: var(--accent);
}

.primary-button:hover,
.primary-button:focus-visible {
    background: #16738d;
}

.secondary-button {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
}

.danger-button {
    color: #fff;
    background: var(--danger);
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.5fr) auto;
    gap: 32px;
    align-items: center;
    padding: 48px clamp(24px, 5vw, 72px);
    color: var(--muted);
    background: #fff;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
}

.site-footer > div:first-child {
    display: flex;
    flex-direction: column;
}

.site-footer strong {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.1rem;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.theme-immersive .site-footer {
    color: rgba(255, 255, 255, 0.5);
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.14);
}

.theme-immersive .site-footer strong {
    color: #fff;
}

.detail-dialog {
    width: min(1040px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: auto;
    color: var(--ink);
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.detail-dialog::backdrop {
    background: rgba(5, 10, 20, 0.82);
    backdrop-filter: blur(4px);
}

.dialog-layout {
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.dialog-art {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 28px;
    background: #111;
}

.dialog-art img {
    width: 100%;
    height: 100%;
    max-height: 660px;
    object-fit: contain;
}

.dialog-content {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px 40px;
}

.dialog-close {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.5rem;
}

.dialog-close:hover,
.dialog-close:focus-visible {
    color: var(--ink);
    background: #f1f5f9;
}

.dialog-content > .dialog-close {
    position: absolute;
    top: 22px;
    right: 22px;
}

.dialog-content h2,
.reader h2,
.inquiry-form h2 {
    margin: 8px 0;
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 500;
    line-height: 1.3;
}

.dialog-en {
    margin: 0 0 28px;
    color: var(--quiet);
    letter-spacing: 0.05em;
}

.metadata {
    margin: 0 0 26px;
}

.metadata div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(11, 18, 32, 0.07);
}

.metadata dt {
    color: var(--quiet);
}

.metadata dd {
    margin: 0;
}

.dialog-description {
    margin-bottom: auto;
    color: var(--muted);
    line-height: 1.9;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.reader {
    padding: clamp(26px, 5vw, 58px);
}

.reader header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.reader header p:last-child {
    margin: 4px 0 24px;
    color: var(--muted);
}

.reader > img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    margin: 16px 0 24px;
    border-radius: 8px;
}

.reader-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.8rem;
}

.reader-controls button {
    min-width: 44px;
    min-height: 40px;
    background: #f1f5f9;
    border-radius: 7px;
    cursor: pointer;
}

.reader article {
    color: #334155;
    font-family: var(--serif);
    font-size: 1.08rem;
    line-height: 2;
}

.inquiry-dialog {
    width: min(640px, calc(100% - 32px));
}

.inquiry-form {
    display: grid;
    gap: 18px;
    padding: clamp(26px, 5vw, 48px);
}

.form-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.form-heading p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
}

.inquiry-form label,
.admin-form label,
.status-form label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea,
.status-form select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(11, 18, 32, 0.18);
    border-radius: 7px;
    outline: 0;
    font-weight: 400;
}

.inquiry-form textarea,
.admin-form textarea {
    min-height: 120px;
    resize: vertical;
}

.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.status-form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 141, 169, 0.14);
}

/* Admin */
.admin-body {
    color: #111827;
    background: #f1f5f9;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px clamp(20px, 4vw, 52px);
    color: #fff;
    background: rgba(16, 24, 39, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.82rem;
}

.admin-header-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-underline-offset: 4px;
}

.session-badge {
    padding: 6px 10px;
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(134, 239, 172, 0.28);
    border-radius: 999px;
}

.admin-shell {
    width: min(1520px, 100%);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    margin: 0 auto;
}

.admin-sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    padding: 34px 24px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

.admin-sidebar > div > strong {
    font-size: 1.25rem;
}

.admin-sidebar nav {
    display: grid;
    gap: 4px;
    margin-top: 30px;
}

.admin-sidebar nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 7px;
    text-decoration: none;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a:focus-visible {
    background: #f1f5f9;
}

.admin-sidebar nav span {
    min-width: 24px;
    padding: 2px 6px;
    color: var(--muted);
    background: #e2e8f0;
    border-radius: 999px;
    font-size: 0.7rem;
    text-align: center;
}

.admin-sidebar > p {
    margin: auto 0 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.admin-main {
    min-width: 0;
    padding: clamp(24px, 4vw, 56px);
}

.admin-main > .flash {
    width: 100%;
    margin: 0 0 24px;
}

.admin-section {
    scroll-margin-top: 92px;
    margin-bottom: 30px;
    padding: clamp(24px, 3.5vw, 44px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 40px -34px rgba(15, 23, 42, 0.55);
}

.admin-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.admin-section-heading h1,
.admin-section-heading h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 500;
    line-height: 1.2;
}

.admin-section-heading p:last-child {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-grid article {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.metric-grid span {
    color: var(--muted);
    font-size: 0.78rem;
}

.metric-grid strong {
    margin: 12px 0 auto;
    color: var(--ink);
    font-size: 2.4rem;
    line-height: 1;
}

.metric-grid .metric-label {
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.3;
}

.metric-grid small {
    margin-top: 14px;
    color: var(--quiet);
}

.admin-two-column {
    display: grid;
    grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1.12fr);
    gap: 28px;
    align-items: start;
}

.admin-form {
    display: grid;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.form-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.form-title strong {
    font-size: 1.15rem;
}

.form-title span {
    color: var(--muted);
    font-size: 0.72rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.record-list {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.record-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.record-card > img {
    width: 78px;
    height: 64px;
    object-fit: cover;
    border-radius: 5px;
}

.record-card > div:nth-child(2) {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.record-card span,
.record-card small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-card strong {
    overflow: hidden;
    margin: 2px 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}

.record-actions form {
    margin: 0;
}

.record-actions a,
.danger-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    background: transparent;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.danger-link {
    color: var(--danger);
}

.document-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    border-radius: 8px;
    font-family: var(--serif);
    font-size: 1.4rem;
}

.document-record {
    grid-template-columns: 64px minmax(0, 1fr) auto;
}

.section-counter {
    flex: none;
    padding: 7px 12px;
    color: var(--muted);
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 0.78rem;
}

.inquiry-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.inquiry-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.inquiry-card header,
.inquiry-person {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.inquiry-card header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inquiry-card time {
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.68rem;
}

.status-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
}

.status-new {
    color: #9a3412;
    background: #ffedd5;
}

.status-in_progress {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-closed {
    color: #166534;
    background: #dcfce7;
}

.inquiry-person {
    margin-top: 22px;
}

.inquiry-person a {
    overflow-wrap: anywhere;
    color: var(--accent);
    font-size: 0.78rem;
}

.inquiry-card > p {
    min-height: 52px;
    margin: 14px 0 20px;
    color: #475569;
}

.status-form {
    display: flex;
    align-items: end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.status-form label {
    flex: 1;
}

.settings-form {
    display: grid;
    gap: 22px;
}

.settings-form fieldset {
    padding: 0;
    margin: 0;
    border: 0;
}

.settings-form legend {
    margin-bottom: 12px;
    font-weight: 700;
}

.settings-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.settings-option {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}

.settings-option:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 141, 169, 0.12);
}

.settings-option input {
    position: absolute;
    top: 16px;
    right: 16px;
}

.settings-option > span {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.68rem;
}

.settings-option strong {
    margin: 12px 0;
    font-family: var(--serif);
    font-size: 1.2rem;
}

.settings-option small {
    margin-top: auto;
    color: var(--muted);
}

.reset-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 32px;
    padding: 22px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
}

.reset-panel p {
    max-width: 720px;
    margin: 6px 0 0;
    color: #9a3412;
}

@media (max-width: 1100px) {
    .style-picker {
        grid-template-columns: 1fr;
    }

    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-bar {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    }

    .filter-summary {
        grid-column: 1 / -1;
    }

    .immersive-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .primary-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px 18px;
    }

    .style-options,
    .document-grid,
    .settings-options {
        grid-template-columns: 1fr;
    }

    .style-option {
        min-height: 136px;
    }

    .archive-shell {
        grid-template-columns: 1fr;
    }

    .archive-sidebar {
        position: static;
        padding: 30px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .archive-sidebar ol {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .archive-sidebar a,
    .archive-sidebar button {
        justify-content: center;
        gap: 6px;
        border: 1px solid var(--line) !important;
        border-radius: 7px;
    }

    .archive-count {
        display: none;
    }

    .immersive-story,
    .immersive-story.reverse {
        grid-template-columns: 1fr;
    }

    .immersive-story.reverse .story-image {
        order: 0;
    }

    .dialog-layout {
        grid-template-columns: 1fr;
    }

    .dialog-art {
        min-height: 320px;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .admin-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 20px;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .admin-sidebar nav {
        display: flex;
        overflow-x: auto;
        margin-top: 16px;
        padding-bottom: 4px;
    }

    .admin-sidebar nav a {
        flex: none;
    }

    .admin-sidebar > p {
        margin-top: 14px;
    }

    .inquiry-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 16px;
    }

    .demo-notice {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding: 10px 16px;
        text-align: left;
    }

    .site-header {
        min-height: 0;
        padding: 18px 20px;
    }

    .identity {
        flex-wrap: wrap;
    }

    .identity-en {
        font-size: 0.6rem;
    }

    .primary-nav a,
    .nav-button {
        min-height: 40px;
    }

    .style-picker,
    .gallery-hero,
    .works-section,
    .literature-section,
    .timeline-section,
    .archive-shell,
    .immersive-stories {
        width: calc(100% - 32px);
    }

    .style-picker {
        padding: 38px 0;
    }

    .style-picker h1 {
        font-size: 2rem;
    }

    .gallery-hero {
        padding-bottom: 76px;
    }

    .hero-copy {
        margin-bottom: 42px;
    }

    .gallery-hero-art > img {
        aspect-ratio: 4 / 3;
    }

    .gallery-hero-art figcaption {
        flex-direction: column;
        gap: 3px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .filter-summary {
        grid-column: auto;
    }

    .gallery-grid,
    .archive-grid,
    .immersive-strip {
        grid-template-columns: 1fr;
    }

    .archive-sidebar ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .archive-sidebar {
        padding: 24px 18px;
    }

    .archive-intro {
        padding: 30px 20px;
    }

    .archive-main .filter-bar {
        border-width: 0 0 1px;
    }

    .immersive-hero {
        min-height: 680px;
    }

    .immersive-copy {
        right: 20px;
        bottom: 42px;
        left: 20px;
    }

    .immersive-copy h2 {
        font-size: 2.55rem;
    }

    .immersive-story {
        gap: 28px;
        margin-bottom: 88px;
    }

    .story-copy h3 {
        font-size: 2rem;
    }

    .timeline li {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 14px;
    }

    .site-footer {
        padding: 38px 20px;
    }

    .detail-dialog {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 10px;
    }

    .dialog-art {
        min-height: 260px;
        padding: 16px;
    }

    .dialog-content,
    .reader,
    .inquiry-form {
        padding: 26px 20px;
    }

    .metadata div {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .admin-main {
        padding: 16px;
    }

    .admin-section {
        padding: 20px 16px;
    }

    .admin-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .metric-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: auto;
    }

    .record-card,
    .document-record {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .record-card > img {
        width: 64px;
        height: 56px;
    }

    .record-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        border-top: 1px solid #e2e8f0;
    }

    .inquiry-card header,
    .inquiry-person,
    .status-form,
    .reset-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-form label,
    .status-form .secondary-button,
    .reset-panel form,
    .reset-panel .danger-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
