:root {
  color-scheme: light;
  --ink: #25231f;
  --muted: #807763;
  --green: #856023;
  --green-dark: #513b20;
  --gold: #9a742e;
  --gold-light: #ddc993;
  --line: #e4dbc8;
  --paper: #f6f2e9;
  --white: #fffdf8;
  --app-safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --app-safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --app-safe-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
  --app-safe-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
  --app-viewport-height: var(--tg-viewport-stable-height, 100dvh);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; padding: var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left); background: radial-gradient(ellipse at 50% 0, #fffdf7 0, transparent 55%), var(--paper); }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
.preview-note { text-align: center; font-size: 12px; color: #897c60; padding: 6px 16px; background: #eae3d3; letter-spacing: .08em; }
.brandbar { min-height: 128px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--gold-light); background: #fffdf7d9; box-shadow: 0 5px 25px #71592005; }
.brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand-logo { display: block; width: 90px; height: 90px; border-radius: 50%; box-shadow: 0 0 0 1px #e9dbb8, 0 4px 18px #b49a5a16; }
.brand strong { display: block; font: 600 35px/1.3 "Songti SC", "STSong", serif; letter-spacing: .16em; color: #8a6825; }
.brand small { display: block; font-size: 13px; letter-spacing: .1em; margin-top: 9px; color: #766647; }
.header-consult { display: inline-flex; gap: 9px; justify-content: center; align-items: center; padding: 12px 20px; border: 1px solid #c6ad70; border-radius: 6px; color: #75571b; background: #fbf5e5; white-space: nowrap; font-size: 14px; transition: background .15s; }
.header-consult:hover { background: #f3e8cc; }
.header-consult svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
main { max-width: 1120px; margin: 0 auto; padding-top: 30px; }
.category-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 29px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #eae5d8; }
.category-tabs button { display: flex; align-items: center; justify-content: center; gap: 13px; min-width: 0; min-height: 61px; padding: 12px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #796b4e; font-size: 17px; line-height: 1.5; }
.category-tabs small { font-size: 12px; font-weight: 400; color: #8f836b; white-space: nowrap; }
.category-tabs button[aria-pressed=true] { background: var(--white); border-color: #d7c494; color: var(--green); font-weight: 600; box-shadow: 0 3px 9px #8068350b; }
.category-tabs button[aria-pressed=true] small { color: #8a723a; }
.catalog-heading { display: flex; align-items: center; gap: 40px; justify-content: space-between; margin-bottom: 20px; }
.heading { flex-shrink: 0; }
.eyebrow { color: #a38a50; font-size: 12px; letter-spacing: .19em; margin: 0 0 7px; }
h1 { font: 600 31px/1.35 "Songti SC", "STSong", serif; margin: 0; letter-spacing: .05em; color: var(--green-dark); }
.search { width: min(570px, 60%); height: 51px; display: flex; align-items: center; gap: 12px; border: 1px solid #d8ccb3; border-radius: 8px; padding: 0 16px; background: #fffdf8; box-shadow: 0 2px 4px #64431303; }
.search:focus-within { border-color: #b39148; box-shadow: 0 0 0 2px #cdb36e25; }
.search svg { width: 22px; height: 22px; fill: none; stroke: #9b8658; stroke-width: 1.7; flex-shrink: 0; }
.search input { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; padding: 12px 0; font-size: 16px; color: var(--ink); }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: #aaa08b; }
.clear-search { border: 0; background: none; color: #8a6825; padding: 7px 0; font-size: 14px; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.type-tabs { display: flex; gap: 32px; }
.type-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: #8b826e; padding: 13px 2px 16px; font-size: 16px; }
.type-tabs button[aria-pressed=true] { color: var(--green); border-bottom-color: var(--gold); font-weight: 600; }
.category-hint { flex-shrink: 0; font-size: 13px; color: #9c8d6d; }
.deity-shortcuts { display: flex; justify-content: space-around; gap: 20px; padding: 20px 24px 19px; margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d4c39d transparent; }
.deity-shortcuts button { background: none; border: 0; padding: 0; min-width: 74px; color: #74664b; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; flex: 1; }
.shortcut-image { display: block; width: 58px; height: 58px; border: 3px solid #fffdf7; border-radius: 50%; overflow: hidden; background: #eee8da; outline: 1px solid #dfcd9f; outline-offset: 3px; }
.shortcut-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.deity-shortcuts button[aria-pressed=true] { color: var(--green); font-weight: 600; }
.deity-shortcuts button[aria-pressed=true] .shortcut-image { outline: 2px solid var(--gold); outline-offset: 3px; }
.catalog-toolbar { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.sort-control { margin-right: auto; }
.sort-control select { min-height: 42px; font-size: 14px; padding: 7px 24px 7px 0; max-width: 210px; border: 0; color: #64573a; background: transparent; }
.toolbar-count { font-size: 13px; color: var(--muted); }
.catalog-toolbar:has(.sort-control[hidden]) .toolbar-count { margin-right: auto; }
.filter-trigger { display: flex; gap: 7px; align-items: center; color: #755c28; font-size: 14px; min-height: 42px; padding: 9px 15px; border: 1px solid #d9c9a4; border-radius: 6px; background: var(--white); }
.filter-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.filter-trigger>span { display: grid; place-items: center; color: white; background: var(--green); font-size: 12px; min-width: 19px; height: 19px; border-radius: 50%; }
.active-filters { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
#selected-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#selected-chips button { display: flex; align-items: center; gap: 10px; border: 1px solid #d0c4a6; border-radius: 5px; color: #66501e; background: #ece3ce; min-height: 36px; padding: 8px 10px; font-size: 13px; }
#selected-chips button span { font-size: 17px; line-height: 1; }
#clear-filters { border: 0; background: transparent; color: var(--muted); white-space: nowrap; padding: 9px 0; min-height: 36px; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e2d7bd; border-radius: 10px; background: var(--white); box-shadow: 0 5px 14px #6c532608; transition: transform .16s, box-shadow .16s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px #6c532612; }
.card-main { display: block; flex: 1; }
.card-visual { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #eae6dc; margin: 9px 9px 0; border-radius: 6px; }
.card-visual>img { display: block; width: 100%; height: 100%; object-fit: contain; }
.type-tag { position: absolute; top: 11px; left: 11px; background: #fffdf2ed; color: #725920; border: 1px solid #ddc991; font-size: 12px; padding: 5px 8px; border-radius: 3px; }
.card-copy { padding: 17px 18px 13px; }
.card-copy .deity { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #93783c; font-size: 12px; margin: 0 0 9px; }
.card-copy .deity span { color: #a39982; font-size: 12px; white-space: nowrap; }
.card h2 { margin: 0 0 10px; font: 600 22px/1.45 "Songti SC", "STSong", serif; color: #353322; overflow-wrap: anywhere; }
.card .meta { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.card .meta span { display: block; }
.empty { padding: 55px 24px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.empty h2 { font-size: 22px; }
.empty p { color: var(--muted); line-height: 1.7; }
.primary, .secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: 12px 22px; font-size: 16px; text-align: center; }
.primary { color: #fff8e9; background: var(--green); border: 1px solid var(--green); }
.primary:hover { background: var(--green-dark); }
.secondary { color: #77612e; background: #fffdf7; border: 1px solid #d8c7a0; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #dfd1ad; margin-top: 38px; padding: 24px 0 30px; font-size: 13px; color: #918367; }
.footer-brand { font-family: "Songti SC", "STSong", serif; color: #8d7033; letter-spacing: .08em; font-size: 16px; }
/* Details and the always available consultation action. */
#detail-view { padding-bottom: calc(136px + var(--app-safe-bottom)); }
.back { border: 0; padding: 3px 0 23px; min-height: 45px; display: inline-flex; gap: 7px; align-items: center; background: none; color: #847047; font-size: 15px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 46px; }
.gallery { position: sticky; top: 20px; min-width: 0; }
.main-photo { padding: 7px; width: 100%; aspect-ratio: 1/1; display: block; border: 1px solid #d7c79d; border-radius: 10px; background: #fffdf7; overflow: hidden; }
.main-photo img { display: block; width: 100%; height: 100%; object-fit: contain; background: #eae6dc; border-radius: 5px; }
.gallery-label { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; font-size: 13px; color: #968467; }
.main-photo, .main-photo img, #lightbox-image { -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.image-actions { margin: 0 0 14px; }
.image-action-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.image-action-buttons>a, .image-action-buttons>button { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 43px; padding: 9px 8px; border: 1px solid #d8c7a0; border-radius: 6px; background: var(--white); color: #77612e; font-size: 14px; line-height: 1.4; cursor: pointer; }
.image-action-buttons>.image-save { border-color: var(--green); background: var(--green); color: #fff8e9; }
.image-action-buttons>.image-open { grid-column: 1/-1; min-height: 32px; padding: 4px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.image-action-status { margin: 7px 0 0; color: #7a6a4b; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.image-action-status:empty { display: none; }
.thumbs { display: flex; gap: 11px; overflow-x: auto; padding: 3px; }
.thumbs button { width: 65px; height: 70px; flex-shrink: 0; padding: 3px; border: 1px solid #ded0ae; background: #fffdf7; border-radius: 5px; overflow: hidden; }
.thumbs button[aria-pressed=true] { outline: 2px solid var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { max-width: 100%; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d4c39d transparent; }
.no-photo { display: grid; place-items: center; width: 100%; height: 100%; min-height: 140px; color: var(--muted); font-size: 14px; }
.video-section { margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--line); }
.video-section h2 { margin: 0 0 13px; font-size: 18px; font-weight: 600; color: var(--green); }
.video-section figure { margin: 0 0 16px; }
.video-section video { display: block; width: 100%; max-height: min(65vh,560px); border-radius: 7px; background: #eae6dc; }
.video-section figcaption { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.detail-copy { min-width: 0; overflow-wrap: anywhere; }
.detail-copy .eyebrow { margin: 5px 0 12px; color: #aa8a45; }
.detail-copy h1 { font-size: 33px; line-height: 1.5; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin: 23px 0 0; padding: 20px; background: #fffdf7; border: 1px solid var(--line); border-radius: 8px; }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: #a28d62; margin-bottom: 7px; }
.facts dd { margin: 0; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.content-section { margin: 29px 0; }
.content-section h2, .consult h2 { font-size: 19px; color: var(--green); margin: 0 0 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.content-section h2:before, .consult h2:before { content: ''; width: 3px; height: 15px; background: var(--gold); }
.content-section p, .content-section li { font-size: 16px; line-height: 1.95; color: #655e4f; }
.content-section p { margin: 10px 0; }
.content-section ul { padding-left: 22px; margin: 0; }
.tradition-note { font-size: 13px !important; color: #a09375 !important; line-height: 1.7 !important; }
.consult { border-top: 1px solid var(--line); padding: 25px 0 0; margin-top: 25px; }
.consult p { font-size: 14px; line-height: 1.8; color: #8d7f61; margin: 10px 0; }
.copy-fallback { width: 100%; min-height: 145px; border: 1px solid var(--gold-light); border-radius: 6px; padding: 14px; background: #fffdf7; color: var(--ink); font-size: 16px; margin: 14px 0; }
.consult-dock { position: fixed; bottom: 0; left: 0; right: 0; z-index: 4; padding: 14px max(28px, var(--app-safe-right)) calc(14px + var(--app-safe-bottom)) max(28px, var(--app-safe-left)); background: #fffdf8f5; border-top: 1px solid #d8c99e; box-shadow: 0 -6px 24px #67542b0a; backdrop-filter: blur(12px); }
.consult-dock-inner { max-width: 1120px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: auto; }
.dock-product { min-width: 0; }
.dock-product span { display: block; font-size: 12px; color: #8e7d58; margin-bottom: 6px; }
.dock-product strong { display: block; font: 600 21px/1.5 "Songti SC",serif; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--green-dark); }
.dock-actions { display: flex; gap: 12px; flex-shrink: 0; }
.dock-actions .primary { min-width: 190px; }
/* Native dialogs preserve keyboard focus and escape-to-close behavior. */
.filter-dialog { margin: 0 0 0 auto; padding: 0; border: 0; width: min(480px,100vw); max-width: 100vw; height: var(--app-viewport-height); max-height: 100dvh; color: var(--ink); background: var(--white); box-shadow: -12px 0 40px #30271820; overflow: hidden; }
.filter-dialog::backdrop { background: #2c2a1b66; }
.filter-dialog form { height: 100%; display: flex; flex-direction: column; padding-left: var(--app-safe-left); padding-right: var(--app-safe-right); }
.filter-dialog-head { display: flex; gap: 16px; justify-content: space-between; align-items: start; padding: calc(25px + var(--app-safe-top)) 25px 25px; border-bottom: 1px solid var(--line); background: #f6f0df; }
.filter-dialog-head h2 { font: 600 25px/1.4 "Songti SC",serif; color: var(--green); margin: 0 0 8px; }
.filter-dialog-head p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }
.close-filters { border: 1px solid #e1d3b6; background: #fffaf0; padding: 10px 13px; min-height: 42px; font-size: 14px; color: #89754a; border-radius: 5px; }
.filter-groups { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; padding: 0 25px 20px; }
.filter-groups fieldset { min-width: 0; border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 23px 0; }
.filter-groups fieldset:last-child { border-bottom: 0; }
.filter-groups legend { float: left; padding: 0; margin: 0 0 13px; width: 100%; font-size: 16px; font-weight: 600; color: #5b5139; }
.filter-group-note { clear: both; font-size: 13px; color: #a29476; margin: 0 0 13px; line-height: 1.65; }
.filter-empty-note { padding-top: 23px; }
.filter-options { clear: both; display: flex; flex-wrap: wrap; gap: 10px; }
.filter-option { display: flex; position: relative; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dfd5bd; border-radius: 5px; background: #f6f2e7; color: #756447; min-height: 43px; padding: 10px 13px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.filter-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.filter-option:has(input:checked) { background: #eaf0e8; border-color: #608c73; color: var(--green); font-weight: 600; }
.filter-option:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.option-count { font-size: 12px; color: #a29270; }
.filter-option.zero-count:not(:has(input:checked)) { color: #aaa28f; background: #faf8f1; }
.filter-dialog-foot { display: flex; gap: 12px; border-top: 1px solid var(--line); background: var(--white); padding: 18px 25px calc(18px + var(--app-safe-bottom)); }
.filter-dialog-foot .secondary { flex: 1; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.filter-dialog-foot .primary { flex: 2; }
body:has(dialog[open]) { overflow: hidden; }
#lightbox { position: fixed; inset: var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left); margin: auto; border: none; border-radius: 8px; padding: 14px; background: #25241d; color: #fff8e5; width: min(960px, calc(100vw - var(--app-safe-left) - var(--app-safe-right) - 24px)); max-width: 100%; height: min(900px, calc(var(--app-viewport-height) - var(--app-safe-top) - var(--app-safe-bottom) - 24px)); max-height: calc(var(--app-viewport-height) - var(--app-safe-top) - var(--app-safe-bottom) - 24px); overflow: auto; overscroll-behavior: contain; }
#lightbox[open] { display: grid; grid-template-rows: auto minmax(80px,1fr) auto; gap: 10px; }
#lightbox::backdrop { background: #171711de; }
.lightbox-head { display: flex; justify-content: flex-end; }
.lightbox-image-wrap { min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
#lightbox img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#lightbox-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 10px; font-size: 13px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.lightbox-footer .image-actions { margin: 0; }
.lightbox-footer .image-action-buttons>.image-save { border-color: #aa914f; background: #ddc993; color: #39301c; }
.lightbox-footer .image-action-buttons>button { border-color: #897e60; background: #353329; color: #fff8e5; }
.lightbox-footer .image-action-buttons>.image-open, .lightbox-footer .image-action-status { color: #d7c9a7; }
.lightbox-close { padding: 9px 15px; min-height: 40px; border: 1px solid #897e60; color: #fff8e5; background: transparent; border-radius: 4px; }
#toast { position: fixed; z-index: 5; bottom: calc(115px + var(--app-safe-bottom)); left: 50%; transform: translateX(-50%); background: #143f35ef; color: #fff8e8; padding: 13px 20px; border-radius: 6px; max-width: 90vw; width: max-content; font-size: 14px; pointer-events: none; opacity: 0; transition: opacity .15s; }
#toast.visible { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1180px) { main { margin: 0 28px; } .brandbar { padding-left: 28px; padding-right: 28px; } }
@media (max-width: 700px) {
  .brandbar { padding: 14px 16px; min-height: 92px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-logo { width: 60px; height: 60px; }
  .brand strong { font-size: 25px; letter-spacing: .1em; }
  .brand small { font-size: 12px; letter-spacing: 0; margin-top: 5px; }
  .header-consult { padding: 10px 12px; font-size: 13px; gap: 6px; }
  .header-consult svg { display: none; }
  main { margin: 0 16px; padding-top: 22px; }
  .category-tabs { gap: 4px; margin-bottom: 23px; padding: 4px; border-radius: 9px; }
  .category-tabs button { flex-direction: column; gap: 3px; min-height: 65px; padding: 9px 4px; font-size: 14px; border-radius: 6px; }
  .category-tabs small { font-size: 11px; }
  .catalog-heading { display: block; margin-bottom: 6px; }
  .heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
  .heading h1 { font-size: 24px; order: -1; }
  .heading .eyebrow { margin: 0; font-size: 11px; letter-spacing: .13em; }
  .search { width: 100%; height: 48px; border-radius: 7px; padding: 0 12px; gap: 9px; }
  .search input { font-size: 15px; }
  .search svg { width: 20px; height: 20px; }
  .category-hint { display: none; }
  .type-tabs { gap: 25px; }
  .type-tabs button { font-size: 15px; padding: 15px 0 13px; }
  .deity-shortcuts { padding: 15px 13px 14px; margin-top: 13px; gap: 19px; justify-content: start; border-radius: 8px; }
  .deity-shortcuts button { flex: none; min-width: 51px; font-size: 13px; gap: 8px; }
  .shortcut-image { width: 46px; height: 46px; border-width: 2px; outline-offset: 2px; }
  .catalog-toolbar { padding: 10px 0; gap: 9px; }
  .sort-control select { max-width: 145px; padding-right: 15px; font-size: 13px; }
  .toolbar-count { font-size: 12px; white-space: nowrap; }
  .filter-trigger { padding: 8px 10px; gap: 4px; font-size: 13px; }
  .filter-trigger svg { width: 17px; height: 17px; }
  .active-filters { gap: 8px; margin-bottom: 15px; }
  #selected-chips { gap: 7px; }
  #selected-chips button { font-size: 12px; padding: 7px 8px; gap: 9px; }
  #clear-filters { font-size: 12px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .card { border-radius: 8px; }
  .card:hover { transform: none; }
  .card-visual { margin: 6px 6px 0; border-radius: 4px; }
  .type-tag { top: 7px; left: 7px; padding: 4px 6px; font-size: 12px; }
  .card-copy { padding: 12px 11px 10px; }
  .card-copy .deity { display: block; margin-bottom: 7px; }
  .card-copy .deity span { display: none; }
  .card h2 { font-size: 18px; line-height: 1.45; margin-bottom: 8px; }
  .card .meta { font-size: 13px; line-height: 1.75; }
  footer { display: block; margin-top: 28px; padding: 21px 0 28px; line-height: 1.8; font-size: 12px; }
  footer span { display: block; }
  .footer-brand { font-size: 15px; margin-bottom: 5px; }
  #detail-view { padding-bottom: calc(164px + var(--app-safe-bottom)); }
  .back { padding-bottom: 18px; font-size: 14px; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }
  .main-photo { padding: 6px; }
  .gallery-label { font-size: 12px; padding: 12px 0; }
  .thumbs button { width: 58px; height: 62px; }
  .detail-copy h1 { font-size: 29px; }
  .detail-copy .eyebrow { margin-top: 0; }
  .facts { padding: 17px; margin-top: 20px; }
  .content-section { margin: 26px 0; }
  .content-section h2, .consult h2 { font-size: 18px; }
  .consult-dock { padding: 11px max(16px, var(--app-safe-right)) calc(13px + var(--app-safe-bottom)) max(16px, var(--app-safe-left)); }
  .consult-dock-inner { display: block; }
  .dock-product { display: flex; flex-direction: row-reverse; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .dock-product span { flex-shrink: 0; font-size: 12px; margin: 0; }
  .dock-product strong { font-size: 16px; }
  .dock-actions { gap: 10px; }
  .dock-actions .secondary { flex: 1; font-size: 14px; padding: 11px 10px; }
  .dock-actions .primary { flex: 1.5; min-width: 0; font-size: 16px; }
  .filter-dialog { width: min(390px,calc(100vw - 18px)); }
  .filter-dialog-head { padding: calc(22px + var(--app-safe-top)) 18px 18px; }
  .filter-dialog-head h2 { font-size: 23px; }
  .filter-dialog-head p { font-size: 13px; }
  .filter-groups { padding: 0 18px 18px; }
  .filter-groups fieldset { padding: 21px 0; }
  .filter-options { gap: 9px; }
  .filter-option { padding: 10px 11px; }
  .filter-dialog-foot { gap: 10px; padding: 16px 18px calc(16px + var(--app-safe-bottom)); }
  .filter-dialog-foot button { font-size: 15px; }
  #lightbox { padding-left: 10px; padding-right: 10px; }
  #lightbox img { max-width: 100%; }
}
@media (max-width: 370px) { .brand-logo { width: 51px; height: 51px; } .brand strong { font-size: 23px; } .header-consult { padding: 10px; } .brand small { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Availability and loading states. */
.availability-tag { position:absolute; bottom:10px; right:10px; border-radius:4px; padding:5px 9px; background:#edf3e8ed; color:var(--green); font-size:12px; }
.availability-tag.placed { background:#f5eddeef; color:#836b48; }
.type-tabs { overflow-x:auto; min-width:0; }
.type-tabs button { white-space:nowrap; }
.load-message { max-width:720px; margin:32px auto; padding:24px; text-align:center; color:var(--muted); }
body:has(#catalog-loading:not([hidden])) #catalog-view { visibility:hidden; }

/* Gold catalogue: the same warm paper and category panel as xsyvip.com. */
body { background: var(--paper); color:#30261c; -webkit-font-smoothing:antialiased; }
.brandbar { min-height:94px; padding-top:15px; padding-bottom:15px; background:#f6f2e9f5; }
.brand-logo { width:62px; height:62px; }
.brand { gap:16px; }
.brand strong { font-size:28px; color:#604a28; }
.brand small { font-size:11px; margin-top:6px; color:#82745c; }
.header-consult { background:transparent; color:#765728; border-radius:4px; }
main { padding-top:0; }
.catalog-hero { display:flex; align-items:center; justify-content:space-between; position:relative; min-height:270px; gap:30px; padding:28px 3% 28px 0; border-bottom:1px solid #e4d8c2; margin-bottom:32px; }
.hero-copy { position:relative; z-index:1; }
.hero-copy .eyebrow { font-size:10px; letter-spacing:.15em; }
.hero-copy h2 { font:500 36px/1.5 "Songti SC","STSong",serif; letter-spacing:.08em; margin:12px 0; color:#473921; }
.hero-description { color:#87775c; font-size:13px; line-height:1.9; }
.hero-proof { margin:18px 0 0; color:#8c713f; font-size:11px; letter-spacing:.08em; }
.hero-proof span { padding:0 8px; color:#bca577; }
.hero-art { flex:none; width:260px; height:220px; position:relative; display:grid; place-items:center; }
.hero-brand-lines { position:absolute; width:100%; height:100%; stroke:#cfb986; stroke-width:.65; }
.hero-brand-diamond { fill:#c5a160; }
.hero-brand-copy { display:flex; align-items:center; flex-direction:column; }
.hero-brand-lotus { width:78px; height:52px; margin-bottom:7px; }
.hero-brand-name { font:500 33px/1.5 "Songti SC","STSong",serif; letter-spacing:.19em; color:#9a742e; margin-right:-.19em; }
.hero-brand-english { font-size:8px; letter-spacing:.2em; color:#a68a51; margin-top:4px; }
.hero-brand-divider { width:48px; height:1px; background:#c9af76; margin:12px 0 8px; }
.hero-brand-subtitle { color:#987c44; font-size:10px; letter-spacing:.08em; }
.catalog-heading { margin-bottom:0; }
.heading h1 { font-size:28px; font-weight:500; color:#443723; }
.search { border-radius:4px; height:48px; }
.catalog-filters { margin:23px 0 25px; padding:19px 22px 8px; background:linear-gradient(120deg,#f1e4c9,#faf4e7); border:1px solid #d0b57b; border-top:3px solid #9a742e; border-radius:8px; box-shadow:0 5px 18px #6f522408; }
.filter-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.filter-heading h2 { display:flex; align-items:center; gap:9px; font-size:17px; font-weight:650; color:#634619; margin:0; }
.filter-heading > span { color:#897246; font-size:12px; }
.category-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:0; padding:0; background:none; border:0; border-radius:0; }
.category-tabs button,.type-tabs button,.deity-shortcuts button { display:inline-flex; flex-direction:row; align-items:center; justify-content:center; gap:9px; min-width:0; min-height:46px; max-width:100%; flex:0 1 auto; padding:10px 16px; border:1px solid #cbb382; border-radius:5px; background:#fffdf8; color:#654a21; font-size:15px; line-height:1.45; font-weight:600; white-space:normal; overflow-wrap:anywhere; text-align:center; }
.category-tabs button { min-width:135px; }
.category-tabs small,.type-tabs small,.deity-shortcuts small { flex:none; min-width:24px; padding:2px 6px; border-radius:4px; background:#f1e6d0; color:#745324; font-size:12px; font-weight:600; line-height:1.5; white-space:nowrap; }
.category-tabs button[aria-pressed=true],.type-tabs button[aria-pressed=true],.deity-shortcuts button[aria-pressed=true] { background:linear-gradient(110deg,#946a23,#76511b); border-color:#76511b; color:#fffdf7; box-shadow:0 2px 6px #67471124,inset 0 0 0 1px #efd39a44; }
.category-tabs button[aria-pressed=true] small,.type-tabs button[aria-pressed=true] small,.deity-shortcuts button[aria-pressed=true] small { background:#ffefca; color:#674511; }
.filters,.deity-row { display:flex; align-items:flex-start; justify-content:flex-start; gap:13px; padding:17px 0 0; margin:18px 0 0; border:0; border-top:1px solid #d5bd8b; }
.filter-caption { flex:none; font-size:13px; color:#705024; font-weight:600; padding-top:13px; }
.type-tabs,.deity-shortcuts { display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-start; overflow:visible; min-width:0; padding:0; margin:0; border:0; border-radius:0; background:none; }
.type-tabs button,.deity-shortcuts button { min-height:44px; padding:9px 12px; font-size:14px; }
.category-hint { display:none; }
.catalog-toolbar { border-top:1px solid #ddcba6; margin-top:18px; padding:12px 0 4px; gap:12px; }
.sort-control select { font-size:12px; max-width:185px; }
.filter-trigger { min-height:44px; font-size:13px; border-color:#cbb382; color:#654a21; background:#fffdf8; }
.active-filters { margin-top:12px; }
.cards { gap:22px; }
.card { border-radius:5px; background:transparent; border-color:transparent; box-shadow:none; }
.card:hover { box-shadow:none; }
.card-visual { margin:0; border-radius:5px; border:1px solid #e0d2b8; background:#eeeadf; }
.card-copy { padding:15px 2px 20px; }
.card h2 { font-size:21px; font-weight:500; color:#4b3d28; }
.card .meta { font-size:13px; }
.type-tag { color:#705327; }
@media(hover:hover) { .category-tabs button[aria-pressed=false]:hover,.type-tabs button[aria-pressed=false]:hover,.deity-shortcuts button[aria-pressed=false]:hover { background:#f7ecd4; border-color:#a27b38; } }
@media(max-width:700px) {
  .brandbar { min-height:80px; padding:12px 16px; gap:8px; }
  .brand { gap:10px; }.brand-logo { width:50px; height:50px; }.brand strong { font-size:23px; }.brand small { font-size:10px; }
  .header-consult { padding:10px; font-size:12px; }
  main { padding-top:0; }
  .catalog-hero { min-height:200px; padding:22px 0; gap:6px; margin-bottom:24px; }
  .hero-copy .eyebrow { font-size:7px; letter-spacing:.1em; max-width:160px; line-height:1.7; }
  .hero-copy h2 { font-size:27px; margin:9px 0; }
  .hero-description { font-size:11px; }.hero-proof { font-size:9px; letter-spacing:0; margin-top:12px; }.hero-proof span { padding:0 3px; }
  .hero-art { width:135px; height:155px; }.hero-brand-lotus { width:49px; height:34px; margin-bottom:4px; }.hero-brand-name { font-size:23px; }.hero-brand-english { font-size:6px; letter-spacing:.08em; }.hero-brand-divider { margin:8px 0 6px; width:30px; }.hero-brand-subtitle { font-size:7px; }
  .heading h1 { font-size:23px; }.heading .eyebrow { font-size:9px; }
  .catalog-filters { margin:19px 0 21px; padding:13px 12px 9px; border-radius:7px; }
  .filter-heading { margin-bottom:13px; gap:6px; }.filter-heading h2 { font-size:16px; gap:7px; }.filter-heading > span { font-size:10px; }
  .category-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .category-tabs button { min-width:0; min-height:46px; padding:9px 7px; gap:6px; font-size:14px; border-radius:5px; }
  .category-tabs small { font-size:11px; padding:2px 5px; min-width:22px; }
  .filters,.deity-row { display:block; margin-top:15px; padding-top:13px; }
  .filter-caption { display:block; padding:0; margin-bottom:10px; font-size:12px; }
  .type-tabs,.deity-shortcuts { gap:7px; }
  .type-tabs button,.deity-shortcuts button { min-height:44px; padding:8px 10px; gap:6px; font-size:13px; }
  .type-tabs small,.deity-shortcuts small { font-size:11px; min-width:21px; padding:1px 5px; }
  .catalog-toolbar { gap:7px; margin-top:14px; flex-wrap:wrap; }.sort-control select { max-width:130px; font-size:11px; }.toolbar-count { font-size:11px; }.filter-trigger { font-size:12px; padding:8px; }
  .cards { gap:13px; }.card h2 { font-size:18px; }.card-copy { padding:12px 1px 16px; }.card .meta { font-size:12px; }
}
@media(max-width:370px) { .hero-art { width:108px; }.hero-copy h2 { font-size:25px; }.hero-copy .eyebrow { max-width:145px; }.hero-brand-name { font-size:20px; }.filter-heading > span { display:none; }.sort-control select { max-width:113px; }.catalog-toolbar { gap:6px; } }

/* Keep every image reachable in large collections. Original files remain intact. */
.gallery-navigation { display:grid; grid-template-columns:1fr 1.4fr 1fr; gap:8px; margin:8px 0 12px; }
.gallery-navigation button,.image-load-message button { min-height:44px; padding:9px 8px; background:#fffdf8; color:#705020; border:1px solid #cab382; border-radius:5px; font-size:13px; }
.gallery-navigation #all-pictures { background:#8d6625; color:#fffdf8; border-color:#8d6625; font-weight:600; }
.gallery-navigation button:disabled,.lightbox-navigation button:disabled { opacity:.4; cursor:default; }
.image-load-message { font-size:12px; line-height:1.6; color:#826430; }.image-load-message button { margin:4px 0; }.image-load-message:has(span:empty):has(button[hidden]) { display:none; }
.image-index { width:min(820px,calc(100vw - 24px)); height:min(840px,calc(var(--app-viewport-height) - 24px - var(--app-safe-top) - var(--app-safe-bottom))); max-height:calc(var(--app-viewport-height) - 24px - var(--app-safe-top) - var(--app-safe-bottom)); padding:20px; border:1px solid #d0b783; border-radius:10px; background:#f6f2e9; color:#4b3a22; overflow:auto; overscroll-behavior:contain; }
.image-index::backdrop { background:#302616b8; }
.image-index header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.image-index h2 { margin:0 0 6px; font-size:21px; }.image-index header p { margin:0; font-size:12px; line-height:1.6; color:#877354; }.image-index header button { flex:none; min-height:44px; padding:9px 14px; border:1px solid #cab382; background:#fffdf8; border-radius:5px; color:#705020; }
.image-index-search { display:flex; align-items:center; gap:12px; margin:18px 0; font-size:13px; }.image-index-search span { flex:none; }.image-index-search input { min-width:0; width:100%; min-height:44px; border:1px solid #d4c3a0; padding:10px 12px; background:#fffdf8; border-radius:5px; }
.image-index-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.image-index-list button { padding:6px; border:1px solid #dfd1b7; border-radius:6px; background:#fffdf8; min-width:0; color:#5c4829; text-align:left; }
.image-index-list button[aria-pressed=true] { border:2px solid #9a742e; padding:5px; box-shadow:0 0 0 2px #dac592; }
.index-image { display:block; aspect-ratio:1; background:#eae4d6; border-radius:3px; overflow:hidden; }.index-image img { display:block; width:100%; height:100%; object-fit:contain; }.index-label { display:flex; gap:7px; padding:9px 2px 3px; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }.index-label small { color:#a98b51; font-size:11px; font-variant-numeric:tabular-nums; flex:none; padding-top:1px; }
.lightbox-navigation { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }.lightbox-navigation button { flex:none; min-height:44px; padding:8px 10px; background:#353329; color:#fff8e5; border:1px solid #897e60; border-radius:4px; font-size:13px; }.lightbox-navigation #lightbox-label { margin:0; font-size:12px; }
#detail-view { padding-top:28px; }
@media(max-width:700px) { .image-index { padding:15px 12px; }.image-index-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.image-index h2 { font-size:19px; }.gallery-navigation { gap:6px; }.gallery-navigation button { font-size:12px; padding:8px 5px; }.lightbox-navigation button { font-size:12px; padding:8px; } }
.image-index[open] { display:flex; flex-direction:column; }
.image-index header,.image-index-search { flex:none; }
.image-index-list { flex:1; min-height:0; overflow-y:auto; align-content:start; grid-auto-rows:max-content; padding:3px; }

/* Show the selected category's children only after the customer chooses it. */
.heading-title-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.heading-title-row h1 { margin:0; }
.heading-title-row .toolbar-count { margin:0; font-size:13px; color:#8c7854; white-space:nowrap; }
.catalog-filters { padding-bottom:19px; }
.catalog-filter-tools { display:flex; align-items:center; gap:12px; margin-left:auto; min-width:0; }
.catalog-filter-tools .sort-control { margin:0; min-width:0; }
.catalog-filter-tools .sort-control select { min-height:44px; max-width:170px; color:#745528; }
.catalog-filter-tools .filter-trigger { min-height:44px; padding:9px 12px; background:#fffaf0; }
.filter-trigger > .filter-trigger-label { display:inline; padding:0; border-radius:0; background:transparent; color:inherit; font-size:inherit; }
.category-tabs button { min-width:0; padding:10px 17px; }
.category-tabs small { min-width:22px; }
.filters { margin-top:17px; padding-top:17px; }
@media(max-width:700px) {
  .catalog-filters { padding-bottom:13px; }
  .filter-heading { align-items:center; flex-wrap:wrap; gap:6px 9px; margin-bottom:11px; }
  .filter-heading h2 { font-size:14px; gap:5px; flex-shrink:0; }
  .filter-heading h2 svg { width:16px; height:16px; }
  .catalog-filter-tools { gap:5px; }
  .catalog-filter-tools .sort-control select { max-width:99px; font-size:11px; padding-left:3px; padding-right:17px; }
  .catalog-filter-tools .filter-trigger { padding:8px; gap:4px; font-size:11px; }
  .catalog-filter-tools .filter-trigger svg { width:15px; height:15px; }
  .filter-trigger-label { white-space:nowrap; }
  .category-tabs { display:flex; flex-wrap:wrap; gap:7px; }
  .category-tabs button { padding:9px 10px; min-height:44px; font-size:13px; gap:6px; }
  .heading-title-row { gap:11px; }
  .heading-title-row .toolbar-count { font-size:12px; }
  .filters { margin-top:13px; padding-top:13px; }
}
@media(max-width:370px) {
  .catalog-filter-tools .filter-trigger { padding:8px 6px; }
  .catalog-filter-tools .filter-trigger-label { font-size:0; }
  .catalog-filter-tools .filter-trigger-label::after { content:'筛选'; font-size:11px; }
  .catalog-filter-tools .sort-control select { max-width:84px; }
}
