/* 基础样式：此文件仅影响诗词纹展厅。 */
.poetry-body {
    margin: 0;
    background: #070808;
}

.poetry-hall {
    position: relative;
    overflow: hidden;
    padding: 25px 3% 0;
    color: #d8bf98;
    background: #080a09;
    font-family: "SimSun", "Songti SC", Georgia, serif;
    font-size: 16px;
    isolation: isolate;
}

.poetry-hall::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, #050706a8, #050706db 52%, #050706 85%), url("assets/bb9d6415966e0b0c6fcf92502289564c8571cebf.webp") center top / cover;
    opacity: .62;
}

.poetry-hall * {
    box-sizing: border-box;
}

.poetry-hall button,
.poetry-hall a {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.poetry-hall button {
    cursor: pointer;
    border: 0;
    background: none;
}

.poetry-hall button:disabled {
    cursor: default;
    opacity: .4;
}

.poetry-hall :focus-visible {
    outline: 2px solid #e2bf83;
    outline-offset: 5px;
}

.poetry-hall [hidden] {
    display: none !important;
}

.poetry-hall img {
    max-width: 100%;
}

.poetry-hall p,
.poetry-hall h1,
.poetry-hall h2,
.poetry-hall h3,
.poetry-hall h4,
.poetry-hall h5 {
    margin: 0;
}

.hall-eyebrow {
    font: 11px Georgia, serif;
    letter-spacing: 2px;
    color: #9f927d;
}

/* 导航和标题 */
.hall-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.hall-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 22px !important;
}

.hall-brand small {
    display: block;
    margin-top: 5px;
    font: 10px Georgia, serif;
    letter-spacing: 2px;
}

.hall-brand__seal {
    padding: 6px 9px;
    color: #292119;
    background: #d0b38a;
    border-radius: 3px;
    font-size: 28px;
}

.hall-nav__links {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 13px;
}

.hall-nav__links span {
    display: block;
    margin-top: 6px;
    font: 10px Georgia, serif;
    letter-spacing: 1.5px;
}

.hall-nav__links b {
    font-weight: normal;
}

.hall-intro {
    display: flex;
    gap: 30px;
    margin-top: 44px;
    align-items: flex-start;
}

.hall-intro__number {
    padding-top: 9px;
    color: #9e865e;
    font: 15px Georgia, serif;
}

.hall-intro__number span {
    display: block;
    width: 1px;
    height: 110px;
    margin: 15px auto;
    background: #78614470;
}

.hall-intro__copy h1,
.hall-intro__copy h2 {
    font-size: 52px;
    font-weight: normal;
    letter-spacing: 8px;
    line-height: 1.2;
}

.hall-intro__copy .hall-eyebrow {
    margin-top: 10px;
    color: #d5bc98;
    font-size: 16px;
}

.hall-intro__description {
    margin-top: 18px !important;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 2px;
}

.hall-intro__english {
    margin-top: 9px !important;
    color: #94846d;
    font: 11px/1.6 Georgia, serif;
}

.hall-motto {
    margin-left: auto !important;
    padding: 12px 10px;
    line-height: 1.8;
    letter-spacing: 3px;
}

.hall-motto small {
    display: block;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #756043;
    color: #93836b;
    font: 9px/1.6 Georgia, serif;
    letter-spacing: 1px;
}

/* 器物陈列：Flex 底部对齐，每张透明 PNG 是独立的器物。 */
.hall-explore {
    margin-top: -120px;
}

.hall-explore__instruction {
    margin-top: 8px !important;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
    color: #b8a17e;
}

.hall-explore__instruction > span:last-child {
    display: block;
    margin-top: 6px;
    font: 8px Georgia, serif;
    letter-spacing: 1.5px;
    color: #827661;
}

.hall-light-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: #d7b87a;
    box-shadow: 0 0 12px #d7b87a;
}

.hall-artifacts {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 13px;
    padding: 0 1%;
}

.artifact {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 0;
    text-align: center;
}

.artifact--featured {
    flex: 1.43;
}

.artifact__number {
    display: block;
    opacity: 0;
    font: 9px Georgia, serif;
    color: #b79b6c;
    letter-spacing: 2px;
    transition: opacity .4s;
}

.artifact__stage {
    position: relative;
    display: block;
    height: 245px;
    margin-bottom: -6px;
}

.artifact--featured .artifact__stage {
    height: 340px;
}

.artifact__body,
.artifact__lit,
.artifact__inscription {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
}

.artifact__body {
    filter: brightness(.48) saturate(.75) drop-shadow(0 15px 15px #000);
    transition: filter .65s;
}

.artifact__lit {
    opacity: 0;
    mask-image: radial-gradient(circle 110px at var(--light-x, 50%) var(--light-y, 50%), #000 15%, transparent 100%);
    transition: opacity .25s;
}

.artifact__inscription {
    z-index: 2;
    opacity: 0;
    filter: drop-shadow(0 0 8px #c68b3570);
    transition: opacity .7s, transform 1s;
}

.artifact:hover .artifact__body,
.artifact:focus .artifact__body,
.artifact.is-selected .artifact__body {
    filter: brightness(.78) saturate(.85) drop-shadow(0 15px 15px #000);
}

.artifact:hover .artifact__lit,
.artifact:focus .artifact__lit,
.artifact:hover .artifact__number,
.artifact:focus .artifact__number {
    opacity: 1;
}

.artifact:hover .artifact__inscription,
.artifact:focus .artifact__inscription {
    opacity: .95;
    transform: translate(15px,-35px) scale(1.06);
}

.artifact.is-extracting .artifact__inscription {
    opacity: 1;
    transform: translate(25px,-60px) scale(1.13);
}

.artifact__hint {
    position: absolute;
    top: 12%;
    left: 8%;
    z-index: 3;
    padding: 8px 12px;
    opacity: 0;
    border-left: 1px solid #b18e58;
    background: #090b09e0;
    font-size: 12px;
    text-align: left;
    pointer-events: none;
    transition: opacity .3s;
}

.artifact__hint span {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: #a38c68;
}

.artifact:hover .artifact__hint,
.artifact:focus .artifact__hint {
    opacity: 1;
}

.artifact__plinth {
    display: block;
    padding: 23px 8px 20px;
    border-top: 5px solid #343028;
    border-bottom: 1px solid #4d402c;
    background: linear-gradient(145deg,#28261f,#090a09 35%,#161713 75%,#050606);
    box-shadow: 0 15px 18px #0008;
    font-size: 15px;
    letter-spacing: 1px;
}

.artifact__plinth small {
    display: block;
    margin-top: 9px;
    font: 9px Georgia, serif;
    letter-spacing: 1.5px;
    color: #948164;
}

.artifact.is-selected .artifact__plinth {
    border-bottom-color: #dab774;
}

.hall-source-note {
    color: #948b7c;
    font: 11px/1.8 "SimSun", serif;
}

.hall-explore > .hall-source-note {
    margin: 21px 0 16px;
    text-align: right;
    font-size: 10px;
}

/* 提取区：原器、透明题字和原始细节分开呈现。 */
.extraction {
    display: flex;
    gap: 22px;
    padding: 27px 24px;
    border: 1px solid #6b573783;
    border-radius: 14px;
    background: #050706de;
    box-shadow: inset 0 0 50px #7b59300b;
    scroll-margin-top: 20px;
}

.extraction__guide {
    width: 16%;
}

.extraction__guide .hall-eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
}

.extraction__guide h3 {
    margin-top: 12px;
    font-size: 26px;
    font-weight: normal;
}

.extraction__subtitle {
    margin-top: 8px !important;
    font: 9px Georgia, serif;
    color: #9f8c6b;
}

.extraction__steps {
    list-style: none;
    margin: 26px 0;
    padding: 0;
    font-size: 12px;
    color: #807665;
}

.extraction__steps li {
    margin: 18px 0;
}

.extraction__steps span {
    margin-left: 10px;
}

.extraction__steps .is-current {
    color: #f0cd8b;
    text-shadow: 0 0 14px #d8a33f50;
}

.extraction__status {
    color: #ab987a;
    font-size: 11px;
    line-height: 1.8;
}

.extraction__object {
    width: 22%;
    text-align: center;
}

.archive-code {
    display: block;
    color: #847357;
    font: 10px Georgia, serif;
    letter-spacing: 3px;
}

.extraction__object > img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px #000);
}

.extraction__object h4 {
    font-size: 14px;
    font-weight: normal;
    margin: 4px 0 12px;
}

.hall-text-link {
    font-size: 11px !important;
    color: #aa9270 !important;
    border-bottom: 1px solid #6d563c;
    padding-bottom: 3px;
}

.extraction__pattern {
    width: 32%;
}

.pattern-controls {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #473b28;
    padding-bottom: 10px;
}

.pattern-controls button {
    padding: 0;
    font-size: 11px;
    color: #807768;
}

.pattern-controls button[aria-pressed="true"] {
    color: #edcc90;
}

.pattern-scan {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 235px;
    margin: 12px 0;
    background: radial-gradient(ellipse at center,#4c351522,transparent 70%);
}

.pattern-scan > img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.pattern-scan.is-revealing > img {
    animation: pattern-arrive 1.25s ease-out both;
}

.pattern-scan__empty {
    text-align: center;
    font-size: 22px;
    color: #776952;
    letter-spacing: 3px;
}

.pattern-scan__empty span {
    display: block;
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 0;
}

.pattern-scan__corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #715b37;
}

.pattern-scan__corner--tl {
    top: 0;
    left: 0;
    border-top: 1px solid;
    border-left: 1px solid;
}

.pattern-scan__corner--br {
    bottom: 0;
    right: 0;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.pattern-scan__line {
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: #e7c183;
    box-shadow: 0 0 10px #ebbb69;
    opacity: 0;
}

.pattern-scan.is-revealing .pattern-scan__line {
    animation: scan-line 1.3s ease-out;
}

.pattern-provenance {
    color: #968263;
    text-align: center;
    font-size: 9px;
    letter-spacing: 1px;
}

.pattern-provenance span {
    display: block;
    margin-top: 6px;
}

.archive-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.archive-action {
    flex: 1;
    display: block;
    padding: 12px 8px !important;
    border: 1px solid #6b5536 !important;
    background: #29201438 !important;
    text-align: center;
    font-size: 12px !important;
}

.archive-action small {
    display: block;
    margin-top: 6px;
    color: #8e7c61;
    font: 8px Georgia, serif;
    letter-spacing: 1px;
}

.archive-action:hover {
    border-color: #d8b776 !important;
}

.extraction__detail {
    width: 25%;
    padding-left: 20px;
    border-left: 1px solid #5b482d60;
}

.extraction__detail h4 {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 8px;
}

.extraction__detail .hall-eyebrow {
    font-size: 9px;
}

.detail-photo {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 0;
}

.detail-photo img {
    display: block;
    width: 100%;
    height: 165px;
    object-fit: cover;
    border: 1px solid #6b5737;
    border-radius: 3px;
}

.detail-photo span {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 5px 8px;
    background: #0b0906d9;
    font-size: 10px;
}

.detail-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 8px;
    color: #958368;
}

.extraction__detail h5 {
    margin-top: 19px;
    font-size: 12px;
    font-weight: normal;
}

.color-swatches {
    display: flex;
    gap: 9px;
    margin: 10px 0;
}

.color-swatches span {
    flex: 1;
    height: 20px;
    border: 1px solid #bca48440;
    border-radius: 2px;
}

.hall-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    color: #9b8665;
    font-size: 11px;
}

.hall-footer p {
    letter-spacing: 3px;
}

/* 微光尘埃，减少动态偏好时关闭。 */
.hall-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.hall-atmosphere i {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 2px;
    height: 2px;
    background: #e4c583;
    opacity: .25;
    border-radius: 50%;
    animation: dust-drift 14s ease-in-out infinite alternate;
}

.hall-atmosphere i:nth-child(2) { left: 55%; top: 12%; animation-delay: -5s; }
.hall-atmosphere i:nth-child(3) { left: 73%; top: 25%; animation-delay: -9s; }
.hall-atmosphere i:nth-child(4) { left: 18%; top: 50%; animation-delay: -7s; }
.hall-atmosphere i:nth-child(5) { left: 46%; top: 55%; animation-delay: -3s; }
.hall-atmosphere i:nth-child(6) { left: 88%; top: 40%; animation-delay: -11s; }

/* 放大镜和收藏档案 */
.hall-dialog {
    width: min(840px,92vw);
    max-height: 88vh;
    margin: auto;
    padding: 26px;
    border: 1px solid #856c43;
    border-radius: 8px;
    background: #10120f;
    color: #d8bf98;
}

.hall-dialog::backdrop {
    background: #000d;
    backdrop-filter: blur(5px);
}

.hall-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.hall-dialog h3 {
    margin-top: 10px;
    font-size: 22px;
    font-weight: normal;
}

.hall-dialog [data-close-dialog] {
    padding: 5px 12px;
    font: 32px Georgia, serif;
}

.microscope-control {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    font-size: 13px;
}

.microscope-control input {
    flex: 1;
    accent-color: #bc985e;
}

.microscope-view {
    height: 50vh;
    overflow: auto;
    background: #050606;
    border: 1px solid #4d402e;
}

.microscope-view img {
    display: block;
    width: 100%;
    max-width: none;
}

.hall-dialog > .hall-source-note {
    margin-top: 15px;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
    border-bottom: 1px solid #51422c;
}

.collection-item img {
    width: 90px;
    height: 110px;
    object-fit: contain;
}

.collection-item h4 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 12px;
}

.collection-item p {
    margin-bottom: 15px;
    font-size: 11px;
    color: #978569;
}

.collection-item a {
    font-size: 12px;
    border-bottom: 1px solid #987746;
}

.collection-empty {
    padding: 45px 0;
    line-height: 2;
    text-align: center;
    color: #a28e6d;
}

.ink-flight {
    position: fixed;
    z-index: 100;
    pointer-events: none;
    object-fit: contain;
    filter: drop-shadow(0 0 12px #e7ae4d70);
}

@keyframes pattern-arrive {
    from { opacity: 0; transform: translateY(28px) scale(.85); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes scan-line {
    0% { top: 0; opacity: 0; }
    20% { opacity: .6; }
    100% { top: 100%; opacity: 0; }
}

@keyframes dust-drift {
    from { transform: translate(0,0); opacity: .1; }
    to { transform: translate(25px,-65px); opacity: .5; }
}

/* 小屏幕：器物横向浏览，档案上下排列。 */
@media (min-width: 1600px) {
    .artifact__stage { height: 320px; }
    .artifact--featured .artifact__stage { height: 450px; }
    .extraction__object > img { height: 330px; }
    .pattern-scan { height: 280px; }
    .detail-photo img { height: 200px; }
}

@media (max-width: 1050px) {
    .hall-explore { margin-top: 10px; }
    .extraction { flex-wrap: wrap; }
    .extraction__guide { width: 24%; }
    .extraction__object { width: 30%; }
    .extraction__pattern { width: 38%; }
    .extraction__detail { width: 100%; padding: 20px 0 0; border-left: 0; border-top: 1px solid #4c3d27; }
    .detail-photo { max-width: 430px; }
    .detail-photo img { height: 220px; }
    .color-swatches { max-width: 300px; }
}

@media (max-width: 650px) {
    .poetry-hall { padding: 20px 5% 0; }
    .hall-nav { flex-wrap: wrap; }
    .hall-nav__links { width: 100%; justify-content: space-between; gap: 12px; }
    .hall-nav__links span { font-size: 8px; }
    .hall-intro { gap: 16px; margin-top: 30px; }
    .hall-intro__copy h1, .hall-intro__copy h2 { font-size: 40px; }
    .hall-intro__copy .hall-eyebrow { font-size: 12px; }
    .hall-motto { display: none; }
    .hall-intro__description { font-size: 15px; }
    .hall-explore__instruction { text-align: left; line-height: 1.8; }
    .hall-artifacts { overflow-x: auto; justify-content: flex-start; padding: 25px 5px 16px; scroll-snap-type: x proximity; }
    .artifact, .artifact--featured { flex: 0 0 180px; scroll-snap-align: center; }
    .artifact__stage, .artifact--featured .artifact__stage { height: 250px; }
    .artifact__plinth { font-size: 12px; }
    .artifact__number { opacity: .7; }
    .extraction { padding: 20px 16px; gap: 24px; }
    .extraction__guide { width: 100%; }
    .extraction__steps { display: flex; flex-wrap: wrap; gap: 13px; margin: 18px 0; }
    .extraction__steps li { margin: 0; font-size: 10px; }
    .extraction__steps span { margin-left: 3px; }
    .extraction__object { width: 100%; }
    .extraction__object > img { height: 245px; }
    .extraction__pattern { width: 100%; }
    .pattern-scan { height: 300px; }
    .hall-footer { flex-wrap: wrap; gap: 20px; }
    .hall-footer p { display: none; }
    .hall-dialog { padding: 20px; }
    .hall-dialog h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .poetry-hall *, .poetry-hall *::before, .poetry-hall *::after { animation: none !important; transition: none !important; }
}
