:root {
  --paper: #f7f6f1;
  --ink: #20242a;
  --muted: #69717d;
  --line: #d9d8ce;
  --panel: #ffffff;
  --panel-strong: #eef1ed;
  --steel: #42606c;
  --copper: #b65d35;
  --mint: #85a891;
  --purple: #7c5cff;
  --purple-soft: rgba(124, 92, 255, 0.13);
  --shadow: 0 18px 60px rgba(32, 36, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(66, 96, 108, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 96, 108, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.08rem 0.32rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(32, 36, 42, 0.12);
  background: rgba(247, 246, 241, 0.92);
  padding: 12px clamp(18px, 4vw, 56px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: 0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  user-select: text;
  -webkit-user-select: text;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.tab-nav {
  position: absolute;
  right: 12px;
  bottom: 0;
  z-index: 80;
  margin-left: 0;
}

.tab-button,
.button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 13px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tab-button {
  min-width: 150px;
  padding: 12px 20px;
  border-color: rgba(32, 36, 42, 0.28);
  border-bottom-color: rgba(32, 36, 42, 0.18);
  border-radius: 8px 8px 4px 4px;
  background: rgba(255, 255, 255, 0.72);
  color: #2d333a;
  cursor: pointer;
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1;
}

.tab-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px rgba(32, 36, 42, 0.16);
}

.tab-button:hover,
.tab-button:focus-visible,
.button:hover,
.button:focus-visible {
  border-color: rgba(32, 36, 42, 0.2);
  background: rgba(255, 255, 255, 0.68);
  outline: none;
}

.tab-button.is-active:hover,
.tab-button.is-active:focus-visible {
  border-color: var(--ink);
  background: #353b43;
}

.tab-stage {
  height: calc(100vh - 83px);
  height: calc(100dvh - 83px);
  overflow: hidden;
}

.tab-track {
  display: flex;
  height: 100%;
  transform: translateX(0);
  transition: transform 280ms ease;
}

.tab-track[data-active-tab="portfolio"] {
  transform: translateX(-100%);
}

.tab-panel {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.panel-scroll {
  min-height: 100%;
}

.resume-tab {
  background: #e8e9ef;
  overflow: auto;
}

.resume-pdf-viewer {
  min-width: max-content;
  min-height: 100%;
  padding: 28px 36px 42px;
}

.resume-pdf-spread {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.resume-pdf-page {
  width: 794px;
  height: 1123px;
  border: 1px solid #c5c9d2;
  background: #fff;
  box-shadow: 0 4px 18px rgba(22, 28, 36, 0.12);
  overflow: hidden;
}

.resume-pdf-page iframe,
.resume-pdf-page img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.resume-pdf-page img {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.resume-pdf-viewer {
  cursor: grab;
  user-select: none;
}

.resume-tab.is-panning,
.resume-tab.is-panning .resume-pdf-viewer {
  cursor: grabbing;
}

.resume-zoom-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(32, 36, 42, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(22, 28, 36, 0.18);
  padding: 8px 14px;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.tab-track[data-active-tab="portfolio"] ~ .resume-zoom-bar {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.resume-zoom-step,
.resume-zoom-reset {
  border: 1px solid rgba(32, 36, 42, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.resume-zoom-step:hover,
.resume-zoom-step:focus-visible,
.resume-zoom-reset:hover,
.resume-zoom-reset:focus-visible {
  border-color: rgba(32, 36, 42, 0.42);
  background: #f0f1f5;
  outline: none;
}

.resume-zoom-step {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.resume-zoom-slider {
  width: 150px;
  accent-color: #353b43;
  cursor: pointer;
}

.resume-zoom-value {
  min-width: 44px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.resume-zoom-reset {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.resume-frame-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 980px;
  min-height: 100%;
  padding: 24px 36px 36px;
}

.resume-doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  border: 1px solid rgba(32, 36, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 18px;
}

.resume-doc-toolbar h1 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.resume-doc-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.resume-doc-link {
  flex: 0 0 auto;
  border: 1px solid rgba(32, 36, 42, 0.22);
  border-radius: 6px;
  background: #20242a;
  color: #fff;
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
}

.resume-doc-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 168px);
  border: 1px solid rgba(32, 36, 42, 0.18);
  background: #dfe1e8;
  box-shadow: 0 4px 18px rgba(22, 28, 36, 0.12);
}

.resume-document-viewer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  min-width: max-content;
  min-height: 100%;
  padding: 28px 36px 48px;
}

.resume-page {
  width: 794px;
  min-height: 1123px;
  border: 1px solid #c5c9d2;
  background: #fff;
  box-shadow: 0 4px 18px rgba(22, 28, 36, 0.12);
  color: #111827;
  font-family: "SimSun", "Songti SC", "Microsoft YaHei", serif;
  font-size: 15px;
  line-height: 1.52;
  padding: 54px 66px;
}

.resume-page--dense {
  box-sizing: border-box;
  padding: 40px 52px;
  font-size: 12.2px;
  line-height: 1.34;
}

.resume-page--dense .resume-page-header {
  margin-bottom: 14px;
}

.resume-page--dense .resume-page-header h1 {
  margin-bottom: 8px;
  font-size: 28px;
}

.resume-page--dense .resume-page-header p {
  margin: 3px 0;
  font-size: 12.5px;
}

.resume-page--dense .resume-doc-section {
  margin-top: 10px;
}

.resume-page--dense .resume-doc-section h2 {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.28;
}

.resume-page--dense .resume-doc-section h3 {
  margin: 6px 0 4px;
  font-size: 12.2px;
  line-height: 1.34;
}

.resume-page--dense .resume-doc-section ul {
  margin: 0 0 5px 14px;
  padding-left: 14px;
}

.resume-page--dense .resume-doc-section li {
  margin: 2px 0;
}

.resume-page--dense .resume-row {
  margin: 4px 0 6px;
  font-size: 12.3px;
}

.resume-row--single {
  grid-template-columns: 0.8fr 1.6fr 1.1fr;
}

.resume-row--work {
  grid-template-columns: 0.65fr 1.8fr;
}

.resume-page-header {
  margin-bottom: 24px;
  text-align: center;
}

.resume-page-header h1 {
  margin: 0 0 18px;
  font-size: 32px;
  line-height: 1.1;
}

.resume-page-header p {
  margin: 0;
  font-size: 16px;
}

.resume-doc-section {
  margin-top: 16px;
}

.resume-doc-section h2 {
  margin: 0 0 10px;
  border-bottom: 2px solid #cfcfcf;
  color: #38536d;
  font-family: "Microsoft YaHei", "SimSun", serif;
  font-size: 18px;
  line-height: 1.45;
}

.resume-doc-section h3 {
  margin: 9px 0 5px;
  font-size: 15px;
  line-height: 1.45;
}

.resume-doc-section ul {
  margin: 0 0 6px 18px;
  padding-left: 18px;
}

.resume-doc-section li {
  margin: 4px 0;
}

.resume-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.2fr;
  gap: 18px;
  margin: 6px 0 10px;
  font-size: 15px;
}

.resume-game-table {
  width: 520px;
  min-width: 0;
  margin: 18px auto 24px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.25;
}

.resume-game-table--full {
  width: 100%;
  margin: 10px auto 18px;
  font-size: 11.4px;
  line-height: 1.2;
}

.resume-game-table--full th,
.resume-game-table--full td {
  padding: 3px 5px;
}

.resume-game-table th,
.resume-game-table td {
  border: 1px solid #575757;
  padding: 3px 7px;
  text-align: center;
  vertical-align: middle;
}

.resume-game-table th {
  position: static;
  background: #fff;
  color: #111827;
  font-size: 13px;
}

.resume-game-table--full th,
.resume-game-table--full td {
  padding: 3px 5px;
  font-size: 11.4px;
  line-height: 1.2;
}

.resume-advantage {
  margin-top: 28px;
}

.resume-advantage ul {
  margin-left: 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.65fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: min(690px, calc(100vh - 132px));
  padding: clamp(56px, 8vw, 104px) clamp(18px, 6vw, 88px) 54px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--copper);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(3.5rem, 11vw, 8.8rem);
  font-weight: 700;
  line-height: 0.92;
}

.hero-lead {
  max-width: 740px;
  margin: 28px 0 0;
  color: #3f464e;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.hero-tags span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(66, 96, 108, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  padding: 4px 10px;
  color: #35424a;
  font-size: 0.88rem;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #353b43;
}

.button.ghost {
  border-color: rgba(32, 36, 42, 0.22);
  background: rgba(255, 255, 255, 0.64);
}

.hero-board {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(32, 36, 42, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 241, 237, 0.88)),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-board::before {
  content: "";
  display: block;
  height: 168px;
  border-bottom: 1px solid rgba(32, 36, 42, 0.14);
  background:
    linear-gradient(90deg, rgba(182, 93, 53, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(66, 96, 108, 0.2) 1px, transparent 1px),
    radial-gradient(circle at 28% 35%, rgba(133, 168, 145, 0.46), transparent 26%),
    linear-gradient(135deg, rgba(66, 96, 108, 0.78), rgba(32, 36, 42, 0.88));
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.board-header span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.board-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.board-grid div {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 16px 18px;
}

.metric {
  color: var(--steel);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.board-grid p {
  margin: 0;
}

.section {
  padding: 64px clamp(18px, 6vw, 88px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.15;
}

.section-note {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
}

.resume-grid,
.portfolio-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resume-panel,
.portfolio-strip article {
  border: 1px solid rgba(32, 36, 42, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 22px;
}

.resume-panel h3,
.portfolio-strip h3 {
  margin: 0 0 10px;
}

.resume-panel p,
.portfolio-strip p {
  margin: 0;
  color: #47505a;
}

.portfolio-strip span {
  display: block;
  margin-bottom: 22px;
  color: var(--copper);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.portfolio-section {
  padding: 10px 18px 18px;
  background: rgba(255, 255, 255, 0.52);
}

.portfolio-board {
  display: grid;
  grid-template-columns: 360px minmax(720px, 1fr);
  gap: 18px;
  height: calc(100vh - 111px);
  height: calc(100dvh - 111px);
  min-height: 620px;
}

.portfolio-list-panel,
.portfolio-preview-panel {
  min-width: 0;
  border: 1px solid rgba(32, 36, 42, 0.26);
  background: rgba(255, 255, 255, 0.88);
}

.portfolio-list-panel {
  overflow: hidden;
}

.portfolio-list-panel h3,
.portfolio-preview-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 2vw, 2.35rem);
  line-height: 1.1;
}

.portfolio-list-panel h3 {
  display: grid;
  min-height: 56px;
  place-items: center;
  border-bottom: 1px solid rgba(32, 36, 42, 0.26);
  background: #d9e2f3;
  font-size: clamp(1.05rem, 1.3vw, 1.3rem);
}

.portfolio-list {
  overflow: auto;
  height: calc(100% - 56px);
  transform: translateZ(0);
}

.portfolio-group,
.portfolio-chapter {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.portfolio-group {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid rgba(32, 36, 42, 0.22);
  padding: 10px 16px;
}

.portfolio-group:hover,
.portfolio-group:focus-visible,
.portfolio-chapter:hover,
.portfolio-chapter:focus-visible {
  border-color: transparent;
  background: var(--purple-soft);
  outline: none;
}

.portfolio-group.is-active {
  background: rgba(32, 36, 42, 0.04);
}

.portfolio-arrow {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid var(--ink);
  transition: transform 160ms ease;
}

.portfolio-group.is-expanded .portfolio-arrow {
  transform: rotate(90deg);
}

.portfolio-group-text {
  min-width: 0;
}

.portfolio-group strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
  line-height: 1.35;
}

.portfolio-chapter-list {
  border-bottom: 1px solid rgba(32, 36, 42, 0.22);
  background: rgba(32, 36, 42, 0.035);
  padding: 10px 12px 12px 44px;
}

.portfolio-chapter {
  display: block;
  min-height: 38px;
  margin: 4px 0;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 10px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.portfolio-chapter.is-draft {
  color: var(--muted);
  font-weight: 500;
}

.portfolio-chapter.is-draft:hover,
.portfolio-chapter.is-draft:focus-visible {
  color: #5d6470;
}

.portfolio-draft-group {
  margin: 12px 4px 8px 16px;
  border-radius: 10px;
  background: rgba(32, 36, 42, 0.055);
  padding: 4px 8px 10px;
}

.portfolio-chapter-divider {
  margin: 10px 4px 6px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.chapter-draft-notice {
  max-width: 900px;
  margin: 0 0 18px;
  border: 1px dashed rgba(105, 113, 125, 0.45);
  border-radius: 8px;
  background: rgba(105, 113, 125, 0.08);
  padding: 12px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.portfolio-chapter.is-active {
  border-color: var(--purple);
  background: rgba(124, 92, 255, 0.08);
  color: #5d43d6;
}

.portfolio-item {
  display: block;
  width: 100%;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid rgba(32, 36, 42, 0.22);
  background: transparent;
  padding: 14px 18px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.portfolio-item:hover,
.portfolio-item:focus-visible {
  background: rgba(66, 96, 108, 0.08);
  outline: none;
}

.portfolio-item.is-active {
  background: rgba(32, 36, 42, 0.08);
}

.portfolio-item strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.35;
}

.portfolio-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.portfolio-preview-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portfolio-preview-header {
  border-bottom: 1px solid rgba(32, 36, 42, 0.26);
  padding: 18px 22px;
}

.portfolio-reader-layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.portfolio-reader-layout.is-toc-collapsed {
  grid-template-columns: 54px minmax(0, 1fr);
}

.portfolio-preview-body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 24px 50px;
}

.portfolio-preview-body .markdown-body {
  max-width: 900px;
}

.portfolio-toc-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: auto;
  border-right: 1px solid rgba(32, 36, 42, 0.18);
  background: rgba(255, 255, 255, 0.68);
  transform: translateZ(0);
}

.portfolio-toc-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(32, 36, 42, 0.16);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 12px;
}

.portfolio-toc-header strong {
  font-size: 0.98rem;
}

.toc-toggle {
  border: 0;
  border-radius: 5px;
  background: rgba(124, 92, 255, 0.1);
  color: #5d43d6;
  cursor: pointer;
  padding: 4px 8px;
}

.toc-toggle:hover,
.toc-toggle:focus-visible {
  background: var(--purple-soft);
  outline: none;
}

.portfolio-toc-list {
  display: grid;
  gap: 2px;
  padding: 10px 8px 18px;
}

.toc-link {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4d5560;
  cursor: pointer;
  padding: 6px 8px 6px calc(8px + var(--toc-depth) * 14px);
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.35;
  transition: background-color 100ms ease, color 100ms ease;
}

.toc-link:hover,
.toc-link:focus-visible {
  background: var(--purple-soft);
  color: #5d43d6;
  outline: none;
}

.toc-link.is-active {
  background: rgba(124, 92, 255, 0.16);
  color: #4d34cf;
  font-weight: 800;
}

.toc-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.portfolio-reader-layout.is-toc-collapsed .portfolio-toc-list {
  display: none;
}

.portfolio-reader-layout.is-toc-collapsed .portfolio-toc-header {
  align-items: center;
  flex-direction: column;
  min-height: 100%;
  padding: 12px 8px;
}

.portfolio-reader-layout.is-toc-collapsed .portfolio-toc-header strong {
  writing-mode: vertical-rl;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(32, 36, 42, 0.1);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1ed;
  color: #3e4750;
  font-size: 0.82rem;
  font-weight: 700;
}

tbody tr {
  cursor: pointer;
  transition: background 160ms ease;
}

tbody tr:hover,
tbody tr:focus-visible {
  background: rgba(133, 168, 145, 0.16);
  outline: none;
}

tbody tr.is-selected {
  background: rgba(182, 93, 53, 0.14);
}

td strong {
  display: block;
  line-height: 1.35;
}

.markdown-body {
  max-width: 760px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  line-height: 1.25;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body p:first-child {
  margin-top: 0;
}

.markdown-body blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--copper);
  background: rgba(182, 93, 53, 0.08);
  padding: 10px 14px;
  color: #49515a;
}

.markdown-body table {
  min-width: 0;
  margin: 18px 0;
  background: #fff;
}

.markdown-body pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f0f2ef;
  padding: 12px;
}

.obsidian-md {
  margin: 0;
  color: #24262b;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  --md-list-indent: 1.4em;
}

.obsidian-md h1,
.obsidian-md h2,
.obsidian-md h3,
.obsidian-md h4,
.obsidian-md h5,
.obsidian-md h6 {
  color: #25272d;
  font-weight: 800;
  line-height: 1.28;
  scroll-margin-top: 18px;
}

.obsidian-md h1 {
  margin: 1.2em 0 0.6em;
  font-size: 30px;
}

.obsidian-md h2 {
  margin: 1.1em 0 0.5em;
  font-size: 28px;
}

.obsidian-md h3 {
  margin: 1em 0 0.45em;
  font-size: 25px;
}

.obsidian-md h4 {
  margin: 0.9em 0 0.4em;
  font-size: 23px;
}

.obsidian-md h5 {
  margin: 0.8em 0 0.35em;
  font-size: 22px;
}

.obsidian-md h6 {
  margin: 0.7em 0 0.3em;
  font-size: 21px;
}

.obsidian-md p,
.obsidian-md li {
  color: #3a3d44;
}

.obsidian-md p {
  margin: 0.58em 0;
}

.obsidian-md ul {
  margin: 0.28em 0 0.58em 0;
  padding-left: var(--md-list-indent);
  list-style-position: outside;
}

.obsidian-md ul ul {
  margin-top: 0.18em;
  margin-bottom: 0.18em;
  padding-left: 1.28em;
}

.obsidian-md ul ul ul {
  padding-left: 1.18em;
}

.obsidian-md li {
  margin: 0.12em 0;
  padding-left: 0.08em;
}

.obsidian-md li::marker {
  color: #5f6670;
}

.obsidian-md .list-continuation,
.obsidian-md .md-indented-line {
  color: #4d535c;
}

.obsidian-md .list-continuation {
  margin: 0.08em 0 0.18em;
  padding-left: 0.72em;
  color: #525863;
}

.obsidian-md .md-indented-line {
  margin: 0.18em 0 0.36em;
  padding-left: min(calc(var(--md-indent, 1) * 0.72em), 2.2em);
}

.obsidian-md blockquote {
  border-left-color: var(--purple);
  background: rgba(124, 92, 255, 0.08);
}

.obsidian-md mark {
  border-radius: 3px;
  background: rgba(124, 92, 255, 0.16);
  color: #3d2c91;
  padding: 0 0.18em;
}

.obsidian-md .internal-link,
.obsidian-md .internal-image-ref {
  color: #5d43d6;
}

.obsidian-md .internal-image-ref {
  display: inline-block;
  border-radius: 4px;
  background: rgba(124, 92, 255, 0.09);
  padding: 0.05em 0.35em;
}

.obsidian-md img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
}

.zoomable-image {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto;
}

.obsidian-md .zoomable-image img {
  margin: 0;
  cursor: zoom-in;
}

.zoomable-image-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(24, 26, 30, 0.55);
  backdrop-filter: blur(3px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.zoomable-image-badge svg {
  width: 18px;
  height: 18px;
}

.zoomable-image:hover .zoomable-image-badge,
.zoomable-image:focus-within .zoomable-image-badge {
  opacity: 1;
}

.obsidian-md .zoomable-image img.lazy-image {
  min-height: 140px;
  background-color: #eceef1;
  background-image: linear-gradient(100deg, #eceef1 18%, #f7f8fa 38%, #eceef1 58%);
  background-size: 220% 100%;
  animation: lazy-image-shimmer 1.4s ease-in-out infinite;
}

.obsidian-md .zoomable-image img.lazy-image.is-loaded {
  min-height: 0;
  background-image: none;
  animation: lazy-image-fade 0.24s ease-out;
}

.obsidian-md .zoomable-image img.lazy-image.is-error {
  min-height: 90px;
  background-image: none;
  border: 1px dashed #d0a3a3;
}

@keyframes lazy-image-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

@keyframes lazy-image-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.zoomable-image[data-lazy="pending"]::after,
.zoomable-image[data-lazy="loading"]::after {
  content: "动图较大，正在加载…";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24, 26, 30, 0.62);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.zoomable-image[data-lazy="done"]::after {
  content: none;
}

.zoomable-image[data-lazy="error"]::after {
  content: "图片加载失败";
  background: rgba(163, 45, 45, 0.9);
}

.media-video {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 18px auto;
}

.obsidian-md .media-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 160px;
  border-radius: 8px;
  background: #0f1115;
}

.obsidian-md .media-video video.is-loaded {
  min-height: 0;
}

.media-video[data-lazy="loading"]::after {
  content: "视频较大，正在加载…";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24, 26, 30, 0.62);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.media-video[data-lazy="done"]::after {
  content: none;
}

.obsidian-md .markdown-table-wrap {
  overflow: auto;
  margin: 18px 0;
}

.obsidian-md table {
  min-width: 0;
  border-collapse: collapse;
  background: #fff;
}

.obsidian-md th,
.obsidian-md td {
  border: 1px solid rgba(32, 36, 42, 0.18);
  padding: 8px 10px;
  vertical-align: top;
  line-height: 1.68;
}

.obsidian-md th:first-child,
.obsidian-md td:first-child {
  vertical-align: middle;
}

.obsidian-md th {
  position: static;
  background: #f4f3ee;
  color: #2f343b;
}

.notice {
  border: 1px solid rgba(182, 93, 53, 0.28);
  border-radius: 8px;
  background: rgba(182, 93, 53, 0.08);
  padding: 14px;
  color: #5a4237;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 26, 30, 0.9);
  backdrop-filter: blur(6px);
}

.lightbox-image {
  max-width: 94vw;
  max-height: 94vh;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-image.is-grabbing {
  cursor: grabbing;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.lightbox-hud {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  justify-items: end;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(20, 22, 26, 0.74);
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  line-height: 1.5;
}

.lightbox-hud strong {
  color: #fff;
  font-size: 1.15rem;
}

/* ============ Excel 式配置表查看器 ============ */

.xlsx-sheetbar-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(32, 36, 42, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
}

.xlsx-sheetbar-nav:hover {
  background: #eef1ed;
}

.xlsx-sheetbar-nav-left {
  left: 4px;
}

.xlsx-sheetbar-nav-right {
  right: 4px;
}

.portfolio-preview-body.is-xlsx-mode {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 内嵌预览铺满整个阅读区，不留边框和内边距 */
  padding: 0;
}

.xlsx-native {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

/* Luckysheet 在 showtoolbar:false 下仍保留 90px 的工具栏占位层，
   叠在网格上方并让鼠标坐标计算多算一层——直接隐藏 */
.xlsx-native .luckysheet-work-area {
  display: none !important;
}

/* 网格窗口默认背景是 #0ff，画布没盖住底部会露出青色 */
.xlsx-native .luckysheet-grid-window {
  background: #fff !important;
}

/* 关键对齐：cell-main（选中框等覆盖层容器）被 Luckysheet 内部布局下移了
   约 39px/45px，与画布行的绘制原点不一致（点选会偏 2~3 行、1 列）。
   强制其原点与画布数据区重合：列头 19px + 行头 45px */
.xlsx-native .luckysheet-cell-main {
  position: absolute !important;
  top: 19px !important;
  left: 45px !important;
}

/* 只藏表头残留标记（行/列头壳层内的选中块，坐标错位悬浮在数据区左缘），
   不能动 #luckysheet-cell-selected / #luckysheet-cell-selected-focus——
   那两个是数据区拖选框与单格焦点框本体，隐藏后拖选只剩数字角标没有选区 */
.luckysheet-rows-h-selected,
.luckysheet-cols-h-selected {
  display: none !important;
}

/* 选中行/列数满 4 时引擎在选区边缘弹的数字角标（竖排"N行/N列"），
   坐标按完整表头布局计算，嵌入布局下悬浮在数据区中间，预览模式隐藏 */
#luckysheet-row-count-show,
#luckysheet-column-count-show {
  display: none !important;
}

/* 鼠标悬停时列头/行头上的半透明高亮浮层，同样隐藏 */
.luckysheet-cols-h-hover,
.luckysheet-rows-h-hover {
  display: none !important;
}

/* 行号/列标的 DOM 壳层整体隐藏：数字与字母实际由引擎画在 canvas 上，
   壳层是空壳；但引擎点选时会往壳层里塞表头选中标记
   （.luckysheet-rows-h-selected 灰底+蓝右描边、.luckysheet-cols-h-selected 蓝底描边），
   嵌入布局下壳层坐标错位（横跨行号列与数据区边界），
   标记随之渲染成数据区左缘的蓝色竖线/灰白条（随行高拉长）——连壳一起隐藏根治 */
.xlsx-native #luckysheet-rows-h,
.xlsx-native #luckysheet-cols-h-c {
  display: none !important;
}

/* WPS 式表头灰罩：行号/列标由引擎画在 canvas 上（DOM 表头是空壳，
   上面的 #ececec 会被 canvas 白底盖住），灰罩必须叠加在 canvas 上方才可见。
   尺寸用 inset 撑满，随窗口自适应；三块互不重叠，避免角格双重叠色 */
.xlsx-header-tint {
  position: absolute;
  z-index: 4;
  background: rgba(120, 130, 140, 0.16);
  pointer-events: none;
}

.xlsx-header-tint-rows {
  left: 0;
  top: 19px;
  bottom: 0;
  width: 45px;
  box-shadow: inset -1px 0 0 #b8bfc7;
}

.xlsx-header-tint-cols {
  left: 45px;
  right: 0;
  top: 0;
  height: 19px;
  box-shadow: inset 0 -1px 0 #b8bfc7;
}

.xlsx-header-tint-corner {
  left: 0;
  top: 0;
  width: 45px;
  height: 19px;
}

/* 行号/列号点选高亮（自绘，覆盖行号格/列标格） */
.xlsx-header-highlight {
  position: absolute;
  z-index: 6;
  background: rgba(66, 133, 244, 0.16);
  box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.55);
  pointer-events: none;
}

/* 表头批注预览气泡 */
.xlsx-comment-tip {
  position: absolute;
  z-index: 200;
  max-width: 320px;
  border: 1px solid rgba(32, 36, 42, 0.4);
  border-radius: 6px;
  background: #fffbe6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 8px 12px;
  color: #3c3428;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-all;
  pointer-events: none;
}

/* 页签栏加高到完整高度 + 实底衬底，保证 Sheet 栏完整且优先显示 */
.xlsx-native .luckysheet-sheet-area {
  height: 40px !important;
  background: #e8eae6 !important;
  border-top: 1px solid #c9c9c9;
  box-shadow: 0 -2px 6px rgba(32, 36, 42, 0.06);
  transition: none !important;
  z-index: 30 !important;
}

/* ===== 滚动条：几何修正 + 经典桌面样式 ===== */
/* 本 build 引擎不读取 create 传入的 sheetBarHeight/statisticBarHeight，
   内部固定按 31px/23px 预算底部高度；页签栏实底已强制加高到 40px，
   横向滚动条（锚定网格窗口底边）随之压进页签栏约 10px——
   把网格窗口底边同步抬高到 40px，与页签栏顶边对齐 */
.xlsx-native #luckysheet-grid-window-1 {
  bottom: 40px !important;
}

/* 滚动条从引擎的 12px 谷歌式加宽到 16px 经典桌面式（引擎内联写死 12px，
   需用 !important 对冲）。横竖两条首尾相接互不重叠：
   横条让出右侧竖条宽度（左偏移 44px + 竖条 16px），
   竖条让出底部横条高度 */
.xlsx-native #luckysheet-scrollbar-x {
  height: 16px !important;
  width: calc(100% - 60px) !important;
}

.xlsx-native #luckysheet-scrollbar-y {
  width: 16px !important;
  height: calc(100% - 16px) !important;
}

/* 轨道：浅灰实底，朝向数据区一侧加 1px 深描边形成明确分界 */
.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar {
  height: 16px;
  background: #f2f3f5;
}

.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar {
  width: 16px;
  background: #f2f3f5;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-track {
  background: #f2f3f5;
  border: none;
  border-top: 1px solid #b7bdc5;
}

.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-track {
  background: #f2f3f5;
  border: none;
  border-left: 1px solid #b7bdc5;
}

/* 滑块：方形实心，替代引擎的半透明圆角胶囊 */
.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-thumb,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-thumb {
  background-color: #c3c9d1;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-thumb:hover,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-thumb:hover {
  background-color: #a7aeb7;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-thumb:active,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-thumb:active {
  background-color: #8e959e;
}

/* 两端箭头按钮：引擎引用的 waffle_sprite.png 未随包分发（箭头原本空白），
   改用内联 SVG 三角箭头。display 需按变体显式控制：
   Chromium 会为 display:block 的按钮实例化四个位置（每端两个），
   只保留 start 端递减、end 端递增，其余隐藏 */
.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button {
  width: 16px;
  height: 16px;
  background-color: #f2f3f5;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  border: none;
  border-radius: 0;
}

.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:vertical:decrement:start {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='%235b616a' d='M8 5l4 6H4z'/%3E%3C/svg%3E");
  border-bottom: 1px solid #b7bdc5;
}

.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:vertical:increment:end {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='%235b616a' d='M8 11L4 5h8z'/%3E%3C/svg%3E");
  border-top: 1px solid #b7bdc5;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:horizontal:decrement:start {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='%235b616a' d='M5 8l6-4v8z'/%3E%3C/svg%3E");
  border-right: 1px solid #b7bdc5;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:horizontal:increment:end {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath fill='%235b616a' d='M11 8L5 12V4z'/%3E%3C/svg%3E");
  border-left: 1px solid #b7bdc5;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:horizontal:decrement:end,
.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:horizontal:increment:start,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:vertical:decrement:end,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:vertical:increment:start {
  display: none;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:hover,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:hover {
  background-color: #e3e6ea;
}

.xlsx-native #luckysheet-scrollbar-x::-webkit-scrollbar-button:active,
.xlsx-native #luckysheet-scrollbar-y::-webkit-scrollbar-button:active {
  background-color: #d3d8dd;
}

/* 页签名在页签内居中：引擎为隐藏的下拉触发器预留了 19px 右内边距，
   补对称左内边距并居中文本 */
.xlsx-native .luckysheet-sheets-item {
  text-align: center;
  padding-left: 19px !important;
  padding-right: 19px !important;
}

/* 单元格编辑输入层：预览为只读，整体隐藏（行号点击时的白色小框就是它） */
#luckysheet-input-box,
#luckysheet-rich-text-editor,
.luckysheet-input-box {
  display: none !important;
}

/* 页签上的下拉菜单触发器、左上角的复制按钮：纯展示模式隐藏 */
.xlsx-native .luckysheet-sheets-item-menu,
.xlsx-native #luckysheet-copy-btn {
  display: none !important;
}

.xlsx-native #luckysheet {
  width: 100%;
  height: 100% !important;
  flex: 1 1 auto;
  min-height: 0;
}

.xlsx-native-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: #3c434c;
}

.xlsx-native-loading strong {
  font-size: 1.05rem;
}

.xlsx-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(32, 36, 42, 0.22);
  background: #fff;
}

.xlsx-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(32, 36, 42, 0.16);
  background: #f4f3ee;
  padding: 8px 10px;
}

.xlsx-namebox {
  flex: 0 0 auto;
  min-width: 64px;
  border: 1px solid rgba(32, 36, 42, 0.25);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  font-family: Consolas, monospace;
  font-size: 0.88rem;
  text-align: center;
}

.xlsx-search {
  flex: 0 1 260px;
  min-width: 140px;
  border: 1px solid rgba(32, 36, 42, 0.25);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  font-size: 0.88rem;
}

.xlsx-search:focus {
  border-color: var(--steel);
  outline: 2px solid rgba(66, 96, 108, 0.2);
}

.xlsx-cellvalue {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 36, 42, 0.18);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  color: #3c434c;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xlsx-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.xlsx-grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.xlsx-grid {
  display: table;
  width: auto;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "等线", "DengXian", Calibri, "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  line-height: 1.35;
}

.xlsx-grid th,
.xlsx-grid td {
  overflow: hidden;
  border-right: 1px solid #d8d8d8;
  border-bottom: 1px solid #d8d8d8;
  padding: 3px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.xlsx-letters-row th {
  height: 18px;
  padding: 0;
}

.xlsx-grid.can-sort .xlsx-colref[data-col] {
  cursor: pointer;
}

.xlsx-grid.can-sort .xlsx-colref[data-col]:hover {
  background: #d5dcd7;
}

.portfolio-reader-layout.is-toc-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.portfolio-reader-layout.is-toc-hidden .portfolio-toc-panel {
  display: none;
}

.portfolio-reader-layout.is-toc-hidden .portfolio-preview-body {
  grid-column: 1;
  grid-row: 1;
}

.xlsx-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eef1ed;
  border-bottom: 2px solid rgba(32, 36, 42, 0.3);
  padding: 0;
}

.xlsx-colhead {
  min-width: 72px;
}

.xlsx-colref {
  display: block;
  border-bottom: 1px solid rgba(32, 36, 42, 0.14);
  background: #e3e8e4;
  color: #525b64;
  font-family: Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
}

.xlsx-sort {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #24313a;
  cursor: pointer;
  font-weight: 700;
  padding: 6px 8px;
  text-align: left;
}

.xlsx-sort:hover {
  background: rgba(66, 96, 108, 0.14);
}

.xlsx-corner {
  position: sticky;
  left: 0;
  z-index: 4;
}

.xlsx-rowhead {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 44px;
  background: #eef1ed;
  color: #525b64;
  font-family: Consolas, monospace;
  font-size: 0.74rem;
  text-align: center;
}

.xlsx-grid tbody tr:nth-child(even) td {
  background: rgba(238, 241, 237, 0.45);
}

.xlsx-grid tbody tr:hover td {
  background: rgba(66, 96, 108, 0.1);
}

.xlsx-grid td.is-numeric {
  font-family: Consolas, monospace;
  text-align: right;
}

.xlsx-grid td.is-selected {
  position: relative;
  outline: 2px solid var(--steel);
  outline-offset: -2px;
  background: rgba(66, 96, 108, 0.16) !important;
}

.xlsx-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  border-top: 1px solid rgba(32, 36, 42, 0.16);
  background: #f4f3ee;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.xlsx-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.xlsx-zoom {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.xlsx-zoom select {
  border: 1px solid rgba(32, 36, 42, 0.25);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 2px 4px;
}

.xlsx-grid td.is-hyperlink {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.xlsx-grid tr.row-selected td,
.xlsx-grid tr.row-selected th {
  background: rgba(66, 96, 108, 0.14) !important;
}

.xlsx-pager button {
  border: 1px solid rgba(32, 36, 42, 0.25);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 3px 10px;
}

.xlsx-pager button:disabled {
  cursor: default;
  opacity: 0.45;
}

.xlsx-pager button:not(:disabled):hover {
  background: rgba(66, 96, 108, 0.12);
}

.xlsx-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  overflow-x: auto;
  border-top: 1px solid rgba(32, 36, 42, 0.2);
  background: #e8eae6;
  padding: 4px 6px;
}

.xlsx-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(32, 36, 42, 0.22);
  border-radius: 5px 5px 0 0;
  background: #dfe2dd;
  color: #3c434c;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 12px;
  white-space: nowrap;
}

.xlsx-tab:hover {
  background: #eef1ed;
}

.xlsx-tab.is-active {
  border-bottom-color: #fff;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.xlsx-toc-item {
  display: block;
  width: 100%;
  text-align: left;
}

.xlsx-toc-item strong {
  display: block;
  font-size: 0.85rem;
  line-height: 1.3;
}

.xlsx-toc-item em {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

@media (max-width: 980px) {
  .site-header {
    align-items: center;
    gap: 12px;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: end;
  }

  .tab-nav {
    position: static;
    margin-left: auto;
  }

  .tab-button {
    min-width: 92px;
  }

  .hero,
  .resume-grid,
  .portfolio-strip,
  .portfolio-board {
    grid-template-columns: 1fr;
  }

  .portfolio-board {
    height: auto;
    min-height: 0;
  }

  .portfolio-list-panel {
    min-height: 320px;
  }

  .portfolio-preview-panel {
    min-height: 620px;
  }

  .portfolio-reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-toc-panel {
    order: -1;
    grid-column: 1;
    grid-row: 1;
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(32, 36, 42, 0.18);
  }

  .portfolio-preview-body {
    grid-column: 1;
    grid-row: 2;
  }

  .portfolio-reader-layout.is-toc-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-reader-layout.is-toc-collapsed .portfolio-toc-panel {
    max-height: 48px;
  }

  .portfolio-reader-layout.is-toc-collapsed .portfolio-toc-header {
    flex-direction: row;
    min-height: 0;
  }

  .portfolio-reader-layout.is-toc-collapsed .portfolio-toc-header strong {
    writing-mode: horizontal-tb;
  }

  .hero {
    min-height: 0;
  }

  .hero-board {
    max-width: 720px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .brand {
    align-items: flex-start;
  }

  .top-nav {
    gap: 6px;
    max-width: 230px;
  }

  .tab-button {
    min-width: 68px;
    padding: 8px 9px;
    font-size: 1rem;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: clamp(3rem, 18vw, 5.4rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody tr {
    border: 1px solid rgba(32, 36, 42, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  tbody tr.is-selected {
    border-color: rgba(182, 93, 53, 0.38);
  }

  td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    padding: 7px 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
  }

  td:first-child {
    display: block;
  }

  td:first-child::before {
    display: none;
  }

  .resume-game-table {
    display: table;
    width: 100%;
    min-width: 0;
  }

  .resume-game-table thead {
    display: table-header-group;
  }

  .resume-game-table tbody {
    display: table-row-group;
  }

  .resume-game-table tr {
    display: table-row;
    width: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    margin-bottom: 0;
    padding: 0;
  }

  .resume-game-table th,
  .resume-game-table td {
    display: table-cell;
    width: auto;
    border: 1px solid #575757;
    padding: 3px 5px;
  }

  .resume-game-table td::before {
    content: none;
  }

  .resume-game-table td:first-child {
    display: table-cell;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
