:root, :host {
    --yx-polish-rule: rgb(202 163 99 / 28%);
    --yx-polish-text: #dac8ad;
    --yx-polish-gold: #dfba7c;
    --yx-polish-gap: clamp(18px, 4vw, 32px);
    --yx-polish-control: 44px;
}

/* Press feedback uses the existing action's shape and keeps its layout fixed. */
:where(button, [role=button], summary, input[type=submit], nav.safe-bottom a, .cc-page a, .cc-home a, #legal-main a) {
    -webkit-tap-highlight-color: transparent;
}
[data-yx-press="down"],
[data-yx-press="down"]:active {
    filter: brightness(.78);
}
:is(button, summary, input[type=submit], .yuanxi-public-entry, .cx-primary,
    .section-back, .section-search, .cc-cta, .ruhua-work-enter)[data-yx-press="down"] {
    scale: .95;
    box-shadow: inset 0 0 0 1px rgb(244 210 151 / 56%);
}
[data-yx-press="release"] {
    animation: yx-press-tone 220ms ease-out both;
}
:is(button, summary, input[type=submit], .yuanxi-public-entry, .cx-primary,
    .section-back, .section-search, .cc-cta, .ruhua-work-enter)[data-yx-press="release"] {
    animation-name: yx-press-release;
}
nav.safe-bottom a[data-yx-press="down"],
nav.safe-bottom a[data-yx-press="release"] {
    background-color: rgb(223 186 124 / 15%);
}
@keyframes yx-press-tone {
    0% { filter: brightness(.78); }
    46% { filter: brightness(1.12); }
    100% { filter: brightness(1); }
}
@keyframes yx-press-release {
    0% { scale: .95; filter: brightness(.78); }
    46% { scale: 1; filter: brightness(1.12); }
    100% { scale: 1; filter: brightness(1); }
}
:where(button, [role=button], summary, a, input[type=submit]):focus-visible {
    outline: 2px solid var(--yx-polish-gold);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    :is(button, summary, input[type=submit], .yuanxi-public-entry, .cx-primary,
        .section-back, .section-search, .cc-cta, .ruhua-work-enter)[data-yx-press] {
        scale: none;
    }
    [data-yx-press="release"] {
        animation: none !important;
        filter: brightness(.78);
    }
}

/* Home and the shared archive headers */
#home :is(.night-folio, .night-people) h2,
#home #salon-title {
    text-wrap: balance;
    line-height: 1.28;
}
#home .cc-home {
    margin-block: var(--yx-polish-gap);
    padding: clamp(17px, 4vw, 28px);
}
#home .cc-home h2 {
    font-size: clamp(23px, 5.8vw, 33px);
    line-height: 1.23;
}
#home .cc-home .cc-line {
    min-height: var(--yx-polish-control);
    padding-block: 10px;
}
#home .cc-home-intro > p:not(.cc-kicker) {
    color: var(--yx-polish-text);
    margin-block: 8px 14px;
}
.public-section-header.public-section-header {
    border-bottom-color: var(--yx-polish-rule);
}
#halls #chapter-choice .chapter-entry {
    border-color: var(--yx-polish-rule);
}
#three-volumes :is(.court-main .scroll-scene, .scene-7) > img {
    object-position: center top;
}
#three-volumes .scene-5 > img {
    object-position: center 32%;
}
#three-volumes .scene-6 > img {
    object-position: center 23%;
}
.public-realm-frame-body .ruhua-realm-header h1,
.public-realm-frame-body .ruhua-realm-gallery-head h2 {
    line-height: 1.25;
    text-wrap: balance;
}
.public-realm-frame-body .ruhua-realm-tags :is(button, a) {
    min-height: var(--yx-polish-control);
}

/* New Ming fashion */
#fashion-curation .fc-collection-intro {
    padding-bottom: clamp(20px, 5vw, 34px);
    margin-bottom: var(--yx-polish-gap);
}
#fashion-curation .fc-collection-intro :is(h1, h2) {
    line-height: 1.18;
}
#fashion-curation :is(.fc-filters button, .fc-text-back) {
    min-height: var(--yx-polish-control);
}

/* People exhibition and vitality */
#life .life-door {
    margin-bottom: var(--yx-polish-gap);
}
#life .life-door p {
    font-size: clamp(12px, 2.9vw, 14px);
    line-height: 1.58;
}
#life :is(.life-door h2, .vitality-intro-body h2, .ming-figure-gallery-register h2) {
    line-height: 1.25;
    text-wrap: balance;
}
#life .ming-figure-life-wall {
    row-gap: clamp(20px, 5vw, 34px);
}
#life .ming-figure-gallery-register h2 {
    margin-block: 0 12px;
}
#life .life-preface-link {
    min-height: var(--yx-polish-control);
    align-content: center;
}

/* Collection and personal panels */
#collection .canghua-public.cx-experience .cx-museum-intro {
    padding: clamp(22px, 5vw, 32px) clamp(18px, 5vw, 28px);
}
#collection .canghua-public.cx-experience .cx-museum-intro h1 {
    font-size: clamp(30px, 7vw, 42px);
    line-height: 1.19;
    text-wrap: balance;
}
#collection .cx-directory {
    margin-block-start: var(--yx-polish-gap);
}
#collection .cx-directory-row {
    padding-block: clamp(12px, 3vw, 18px);
}
#collection :is(.cx-volume-cover h1, .cx-topic-guide h2, .cx-crown-card h2) {
    text-wrap: balance;
    line-height: 1.25;
}
#my .public-profile {
    border-color: var(--yx-polish-rule);
}
#my :is(#personal-tab-history, #personal-tab-favorites) {
    min-height: 46px;
    font-size: clamp(15px, 4vw, 18px);
}
#my .personal-salon {
    margin-block: var(--yx-polish-gap);
}

/* Keep the modal hierarchy and close targets consistent across exhibits. */
:is(#group, .personal-dialog, #viewer) {
    border-color: var(--yx-polish-rule);
}
:is(#group, .personal-dialog, #viewer) > .close {
    min-width: var(--yx-polish-control);
    min-height: var(--yx-polish-control);
}
:is(#group, .personal-dialog) h2 {
    line-height: 1.25;
    text-wrap: balance;
}

/* The group image remains the original so long-press recognition sees the full QR. */
#group .salon-group-code .salon-qr[src="/public-meta/group-qr-20261125.jpg"] {
    --qr-width: 188.442211%;
    --qr-left: -44.221106%;
    --qr-top: -127.973199%;
}
#group .salon-help {
    line-height: 1.55;
}

/* Shared work landing, participation forms and reading documents */
.personal-landing {
    padding-block-start: var(--yx-polish-gap);
}
.personal-landing h1 {
    text-wrap: balance;
    line-height: 1.2;
}
.personal-landing-note {
    color: var(--yx-polish-text);
}
.cc-page .cc-hero {
    gap: var(--yx-polish-gap);
}
.cc-page .cc-hero h1,
.cc-page .cc-participation h1 {
    font-size: clamp(30px, 9vw, 48px);
    line-height: 1.2;
    text-wrap: balance;
}
.cc-page .cc-form {
    gap: 16px;
}
.cc-page .cc-form :is(input, select, textarea) {
    font-size: 16px;
}
.cc-page .cc-form :is(summary, .cc-cta) {
    min-height: var(--yx-polish-control);
}
#legal-main :is(h1, h2) {
    color: var(--yx-polish-gold);
    line-height: 1.32;
    text-wrap: balance;
}
#legal-main p {
    line-height: 1.75;
}

@media (max-width: 560px) {
    #home .cc-home {
        margin-inline: 0;
    }
}

@media (min-width: 960px) {
    nav.safe-bottom {
        max-width: 780px;
        border-inline: 1px solid var(--yx-polish-rule);
        border-start-start-radius: 18px;
        border-start-end-radius: 18px;
    }
}

/* Compact compliance links in the public exhibition shell. */
.site > footer.public-compliance {
  gap: 5px;
  padding-block-start: 18px;
  padding-inline: clamp(12px, 3vw, 24px);
  margin-block-start: 22px;
  line-height: 1.55;
}

.site > footer.public-compliance > nav {
  flex-wrap: nowrap;
  column-gap: clamp(5px, 1.45vw, 14px);
  font-size: clamp(10px, 3vw, 12px);
}

.site > footer.public-compliance > nav > a {
  min-height: 34px;
  white-space: nowrap;
}

.site > footer.public-compliance .compliance-contact a,
.site > footer.public-compliance .compliance-filings a {
  min-height: 27px;
}
