/* Corporate theme overrides only; original page structure and content behaviour retained. */
:root { --bg:#10100f; --bg-soft:#171613; --card:#1b1a18; --text:#ecebe5; --text-2:#b3aea3; --text-3:#90897e; --accent:#bca484; --line:rgba(188,164,132,.16); --line-strong:rgba(188,164,132,.3); --header-h:56px; }
body { padding-top:64px; }
.noise { display:none; }
.hero-bg { background:radial-gradient(ellipse at 65% 30%,rgba(188,164,132,.10),transparent 65%); }
.hero-visual::before { background:radial-gradient(circle,rgba(188,164,132,.12),transparent 65%); }
.hero-title,.stat-value { background-image:linear-gradient(172deg,#ecebe5 18%,#c2b397 80%); }
.btn-primary { background:#bca484; color:#141310; box-shadow:none; }
.btn-primary:hover { background:#d0b693; box-shadow:none; }
.filter-tabs,.site-header,.stories-toc { background:rgba(20,19,17,.94); }
.filter-btn.active { background:rgba(188,164,132,.2); color:#ecebe5; }
.site-header { top:64px; }
.header-inner { justify-content:flex-end; }
.site-header .logo,.site-header .lang-switch { display:none; }
.nav-link:hover,.nav-link.is-current { color:#dfc297; }
.corporate-header { position:fixed; inset:0 0 auto; height:64px; z-index:100; padding:0 32px; display:flex; align-items:center; justify-content:space-between; background:rgba(0,0,0,.6); backdrop-filter:blur(8px); }
.corporate-logo { display:flex; flex:none; }
.corporate-logo img { width:96px; height:31px; }
.corporate-header .site-nav { position:absolute; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:48px; height:64px; white-space:nowrap; }
.corporate-header .site-nav-link { font:400 16px/24px var(--font); color:#9f9b93; text-decoration:none; border:0; background:none; cursor:pointer; padding:8px 0; }
.corporate-header .site-nav-link:hover { color:#dfc297; }
.corporate-header .site-nav-link[aria-current] { color:#ecebe5; }
#lang_toggle { width:88px; height:44px; position:relative; border:0; background:none; color:#ecebe5; cursor:pointer; font:14px var(--font); }
#lang_img { position:absolute; inset:6px 0; width:88px; height:32px; opacity:0; }
#lang_toggle:hover #lang_img,#lang_toggle:focus-visible #lang_img { opacity:1; }
#lang_toggle:hover #lang_text,#lang_toggle:focus-visible #lang_text { opacity:0; }
.site-toast { position:fixed; bottom:32px; left:50%; transform:translateX(-50%); background:#29251f; padding:12px 24px; border-radius:8px; color:#ecebe5; z-index:150; opacity:0; pointer-events:none; }
.site-toast.is-visible { opacity:1; }
@media(max-width:1100px) { .corporate-header .site-nav { gap:20px; } }
@media(max-width:700px) { body{padding-top:108px} .corporate-header{height:108px;align-items:flex-start;padding-top:10px} .corporate-header .site-nav{top:60px;width:calc(100% - 32px);height:48px;overflow-x:auto;gap:24px} .site-header{top:108px} }

.stories-toc { top:144px; }
.story { scroll-margin-top:144px; }
@media(max-width:900px) { .stories-toc { top:120px; } }
@media(max-width:700px) { .stories-toc { top:164px; } .story { scroll-margin-top:188px; } }

.works-head { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 0; border-bottom: 0; }

/* Keep the original brand title and centre the content-level navigation. */
.site-header .header-inner { position:relative; justify-content:space-between; min-height:72px; }
.site-header .logo { display:flex; }
.site-header .header-nav { position:absolute; left:50%; transform:translateX(-50%); gap:8px; }
.site-header .nav-link { padding:8px 20px; font-size:16px; line-height:24px; letter-spacing:0; border-radius:6px; }
.site-header .nav-link:hover { background:rgba(188,164,132,.10); }
.site-header .nav-link.is-current { background:rgba(188,164,132,.18); color:#ecebe5; }
.stories-toc { top:160px; }
@media(max-width:900px) { .stories-toc { top:136px; } }
@media(max-width:700px) {
 .site-header .header-inner { min-height:112px; align-items:flex-start; padding-top:12px; }
 .site-header .header-nav { top:60px; }
 .site-header .logo-mark { font-size:18px; }
 .site-header .logo-sub { font-size:11px; }
 .stories-toc { top:220px; }
}

.works-head { border-bottom: 1px solid rgba(188,164,132,.12); }

/* Quiet gilded silk and cloud ornament for the two content switches. */
.site-header .header-nav { gap:12px; }
.site-header .nav-link {
 position:relative; isolation:isolate; min-width:112px; height:44px;
 display:flex; align-items:center; justify-content:center; padding:0 24px;
 border:1px solid rgba(188,164,132,.10); border-radius:6px;
 background:linear-gradient(110deg,rgba(188,164,132,.035),rgba(188,164,132,.075),rgba(188,164,132,.025));
 color:#b3aea3; transition:background .2s,border-color .2s,color .2s;
}
.site-header .nav-link::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; border-radius:inherit; background:url('./tab-cloud-gold.svg') center/100% 100% no-repeat; opacity:.42; }
.site-header .nav-link:hover { background:rgba(188,164,132,.11); border-color:rgba(188,164,132,.23); color:#dfc297; }
.site-header .nav-link.is-current { background:linear-gradient(110deg,rgba(188,164,132,.12),rgba(188,164,132,.21),rgba(188,164,132,.10)); border-color:rgba(188,164,132,.32); color:#e8d5b4; }
.site-header .nav-link.is-current::before { opacity:.85; }
.site-header .nav-link:focus-visible { outline:2px solid #bca484; outline-offset:3px; }

/* One glass treatment across both navigation levels. */
.corporate-header,.site-header {
 background:rgba(0,0,0,.60);
 backdrop-filter:blur(8px);
 -webkit-backdrop-filter:blur(8px);
}
.site-header { border-bottom:1px solid rgba(188,164,132,.12); }
/* Quiet gold surfaces replace the illustrated cloud ornament. */
.site-header .nav-link::before { content:none; }
.site-header .nav-link {
 background:linear-gradient(180deg,rgba(188,164,132,.06),rgba(188,164,132,.025));
 border-color:rgba(188,164,132,.13);
}
.site-header .nav-link:hover {
 background:linear-gradient(180deg,rgba(188,164,132,.14),rgba(188,164,132,.07));
 border-color:rgba(188,164,132,.26);
}
.site-header .nav-link.is-current {
 background:linear-gradient(180deg,rgba(188,164,132,.23),rgba(188,164,132,.13));
 border-color:rgba(188,164,132,.32);
 color:#e8d5b4;
}

/* Illustrated landscape plaque, with clear centre for the label. */
.site-header .nav-link,.site-header .nav-link:hover,.site-header .nav-link.is-current { min-width:128px; background:transparent; border-color:transparent; }
.site-header .nav-link::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; border-radius:inherit; background:url('./tab-landscape-gold-20261123.png') center / 100% 180% no-repeat; opacity:.45; transition:opacity .2s; }
.site-header .nav-link:hover::before { opacity:.65; }
.site-header .nav-link.is-current::before { opacity:.85; }

/* Content Factory navigation: matching 90% opacity and plain gold tabs. */
.corporate-header { background:rgba(0,0,0,.90); }
.site-header { background:rgba(20,19,17,.90); }
.site-header .header-nav { gap:8px; }
.site-header .nav-link,.site-header .nav-link:hover,.site-header .nav-link.is-current {
 min-width:0; height:auto; padding:8px 20px; border:0;
 background:transparent; border-radius:6px;
}
.site-header .nav-link::before { content:none; }
.site-header .nav-link { color:#b3aea3; }
.site-header .nav-link:hover { background:rgba(188,164,132,.10); color:#dfc297; }
.site-header .nav-link.is-current { background:rgba(188,164,132,.18); color:#ecebe5; }

/* Retain the approved scenic cloud buttons with the 90% navigation surfaces. */
.site-header .header-nav { gap:12px; }
.site-header .nav-link,.site-header .nav-link:hover,.site-header .nav-link.is-current {
 min-width:128px; height:44px; padding:0 24px; border:1px solid transparent; background:transparent;
}
.site-header .nav-link::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; border-radius:inherit; background:url('./tab-landscape-gold-20261123.png') center / 100% 180% no-repeat; opacity:.45; transition:opacity .2s; }
.site-header .nav-link:hover::before { opacity:.65; }
.site-header .nav-link.is-current::before { opacity:.85; }
.site-header .nav-link.is-current { color:#e8d5b4; }

.site-header .nav-link[data-i18n="navStories"]::before { background-image:url('./tab-story-silhouettes-20261123.png'); }

/* Preserve artwork aspect ratio: no stretching or cropping. */
.site-header .nav-link::before { background-size:contain; background-position:center; }

/* Original painterly scenery, enlarged at its natural aspect ratio. */
.site-header .nav-link,.site-header .nav-link:hover,.site-header .nav-link.is-current { width:224px; min-width:224px; height:44px; flex:none; }
.site-header .nav-link::before { background-size:100% auto; }
.site-header .nav-link[data-i18n="navStories"]::before { background-image:url('./tab-story-ensemble-20261123.png'); }
@media(max-width:1000px) {
 .site-header .header-inner { min-height:120px; align-items:flex-start; padding-top:12px; }
 .site-header .header-nav { top:62px; }
 .stories-toc { top:184px; }
}
@media(max-width:700px) {
 .site-header .header-nav { width:100%; overflow-x:auto; justify-content:flex-start; padding:0 4px; }
 .stories-toc { top:228px; }
}

.site-header .nav-link[data-i18n="navStories"]::before { background-image:url('./tab-story-mixed-20261123.png'); }
.site-header .nav-link[data-i18n="navWorks"]::before { background-image:url('./tab-works-architecture-20261123.png'); }
/* Open story directory with a quiet divider, selected item alone is highlighted. */
.stories-toc { background:transparent; border-right:1px solid rgba(188,164,132,.16); padding-right:20px; }
.toc-list { gap:4px; }
.toc-item { font-size:16px; line-height:24px; padding:10px 12px; border:0; border-radius:6px; color:#b3aea3; }
.toc-no { font-size:12px; line-height:20px; padding-top:2px; }
.toc-item:hover { background:rgba(188,164,132,.07); color:#dfc297; }
.toc-item.is-active { background:rgba(188,164,132,.18); color:#e8d5b4; }
@media(max-width:900px) { .stories-toc { border-right:0; border-bottom:1px solid rgba(188,164,132,.16); padding-right:4%; background:rgba(20,19,17,.9); } .toc-item { font-size:14px; line-height:20px; } }

.site-header .nav-link[data-i18n="navStories"]::before { background-image:url("./tab-story-immortals-soft-20261123.png"); }

.site-header .nav-link:not(.is-current) { color:#a18c6c; }
.story-toggle { padding:8px 16px; border:1px solid rgba(188,164,132,.3); border-radius:6px; line-height:20px; background:transparent; transition:color .2s,background .2s,border-color .2s; }
.story-toggle:hover,
.story-toggle[aria-expanded="true"] {
  color: rgb(244, 226, 182);
  background: rgba(188, 164, 132, .07);
  border-color: rgba(188, 164, 132, .42);
}
.story-text { white-space:pre-line; }

.story-toggle { border-radius:999px; align-items:center; justify-content:center; gap:8px; }
.story-toggle .toggle-text { display:block; line-height:20px; }
.story-toggle .toggle-arrow { display:grid; place-items:center; flex:0 0 16px; width:16px; height:20px; line-height:20px; }
.story-toggle .toggle-arrow svg { display:block; width:16px; height:16px; }

.toc-item { font-size:14px; line-height:20px; }
.site-footer { padding:72px 0 24px; }
.footer-logo { display:flex; align-items:center; justify-content:center; margin-bottom:20px; letter-spacing:0; }
.footer-logo img { display:block; width:72px; height:96px; object-fit:contain; }
.footer-note { max-width:900px; margin:0 auto 8px; line-height:20px; letter-spacing:0; }
.footer-copy { line-height:20px; letter-spacing:.5px; }
@media(max-width:700px) { .site-footer { padding:56px 0 24px; } .footer-copy { letter-spacing:0; } }

/* Centre the complete footer group within the divider-to-bottom area. */
.site-footer { min-height:262px; padding:32px 0; display:flex; align-items:center; justify-content:center; }
.footer-logo img { width:64px; height:auto; }

.story-head { align-items: center; }

/* Compensate for the serif title’s lower visual centre. */
.story-head .story-tag { transform: translateY(3px); }
@media (max-width: 700px) {
  .story-head .story-tag { transform: translateY(2px); }
}

.toc-picker { display: none; }

@media (max-width: 900px) {
  body {
    --factory-primary-height: 64px;
    --factory-secondary-height: 73px;
    padding-top: var(--factory-primary-height);
    overflow-x: clip;
  }
  .site-header { top: var(--factory-primary-height); }
  .site-header .header-inner {
    height: calc(var(--factory-secondary-height) - 1px);
    min-height: 0;
    padding: 0;
    align-items: center;
  }
  .site-header .logo { gap: 8px; }
  .site-header .logo-sub { display: block; }
  .site-header .header-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(52%, 432px);
    padding: 0;
    overflow: visible;
    transform: none;
  }
  .site-header .header-nav .nav-link {
    min-width: 0;
    width: auto;
    padding: 0 8px;
    line-height: 20px;
  }
  .stories-toc {
    top: calc(var(--factory-primary-height) + var(--factory-secondary-height));
    margin: 0 0 24px;
    padding: 6px 0;
    border: 0;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .stories-toc .toc-list { display: none; }
  .toc-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 48px;
    gap: 12px;
    padding: 8px 12px;
    color: var(--text);
    font: 500 14px/20px var(--font);
    background: var(--bg-soft);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
  }
  .toc-picker-label { color: var(--text-2); }
  .toc-picker-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
  .toc-sheet {
    position: fixed;
    inset: auto 0 0;
    margin: 0 auto;
    width: min(100%, 560px);
    max-width: none;
    max-height: none;
    padding: 0;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
  }
  .toc-sheet::backdrop { background: rgba(0, 0, 0, .66); }
  html:has(.toc-sheet[open]) { overflow: hidden; }
  .toc-sheet-content {
    display: flex;
    flex-direction: column;
    max-height: min(75dvh, 620px);
    padding: 0 16px max(12px, env(safe-area-inset-bottom));
  }
  .toc-sheet-header {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    padding-left: 12px;
    border-bottom: 1px solid var(--line);
  }
  .toc-sheet-header h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
  .toc-sheet-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
  }
  .toc-sheet-list {
    position: relative;
    display: grid;
    gap: 4px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 0;
  }
  .toc-sheet-list .toc-item {
    align-items: center;
    min-height: 48px;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 15px;
    line-height: 22px;
    white-space: normal;
  }
  .toc-sheet-list .toc-no { display: block; flex: 0 0 22px; color: var(--accent); padding: 0; }
  .toc-picker:focus-visible, .toc-sheet-close:focus-visible, .toc-sheet-list .toc-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .works-head { position: static; }
  .filter-btn { min-height: 44px; letter-spacing: .2px; }
  .page-stories .story-toggle { min-height: 44px; }
}

@media (max-width: 700px) {
  body { --factory-secondary-height: 99px; }
  .site-header .header-inner { flex-direction: column; justify-content: center; gap: 4px; }
  .site-header .header-nav { width: min(100%, 440px); }
  .site-header .logo-mark { font-size: 16px; line-height: 24px; }
  .works-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .filter-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .filter-btn { padding: 4px; font-size: 13px; line-height: 18px; }
  .works-count { justify-self: end; }
}

/* 与官网 common.css 保持一致的细滚动条（页面整体 6px，故事目录极细 2px，无两端小三角） */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.toc-list::-webkit-scrollbar,
.toc-sheet-list::-webkit-scrollbar {
  width: 2px;
  height: 2px;
}
::-webkit-scrollbar-button,
.toc-list::-webkit-scrollbar-button,
.toc-sheet-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
::-webkit-scrollbar-track,
.toc-list::-webkit-scrollbar-track,
.toc-sheet-list::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(236, 235, 229, 0.28);
  border-radius: 999px;
}
.toc-list::-webkit-scrollbar-thumb,
.toc-sheet-list::-webkit-scrollbar-thumb {
  background: rgba(236, 235, 229, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover,
.toc-list::-webkit-scrollbar-thumb:hover,
.toc-sheet-list::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 235, 229, 0.45);
}
::-webkit-scrollbar-corner,
.toc-list::-webkit-scrollbar-corner,
.toc-sheet-list::-webkit-scrollbar-corner {
  background: transparent;
}

@supports (-moz-appearance: none) {
  html,
  .toc-list,
  .toc-sheet-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 235, 229, 0.28) transparent;
  }
}
