/* 演示页样式：延续家谱站的纸本、朱砂与松绿 */
html { scroll-behavior: smooth; }
.section { scroll-margin-top: 84px; }

:root {
  --demo-max: 1180px;
  --demo-gutter: clamp(18px, 4vw, 48px);
}

.demo-body {
  overflow-x: hidden;
  background:
    radial-gradient(1100px 680px at 0% -12%, rgba(255,255,255,.88), transparent 62%),
    radial-gradient(900px 620px at 100% 18%, rgba(177,138,84,.10), transparent 62%),
    var(--paper);
}

.demo-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 32px;
  padding: 6px var(--demo-gutter);
  background: var(--ink);
  color: #efe4d3;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-align: center;
}
.ribbon-tag {
  flex: none;
  padding: 2px 7px;
  border: 1px solid rgba(246,240,228,.42);
  border-radius: 999px;
  color: #fff8ee;
  font-weight: 800;
  letter-spacing: .16em;
}

.demo-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--demo-max);
  margin: 0 auto;
  padding: 13px var(--demo-gutter);
  background: rgba(246,240,228,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(196,176,154,.48);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: var(--ink);
}
.nav-seal {
  width: 35px; height: 35px;
  display: grid; place-items: center;
  flex: none;
  border-radius: 10px 10px 10px 3px;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 18px;
  box-shadow: 0 7px 16px rgba(168,68,50,.18);
}
.nav-brand b {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .08em;
}
.nav-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
}
.nav-links {
  display: flex;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: .05em;
}
.nav-links a { color: inherit; }
.nav-links a:hover { color: var(--cinnabar); }
.nav-cta {
  flex: none;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,250,241,.6);
  font-size: 11.5px;
  transition: .18s;
}
.nav-cta:hover { border-color: var(--cinnabar); color: var(--cinnabar-deep); }

.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--demo-max);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 88px) var(--demo-gutter) clamp(38px, 5vw, 58px);
}
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .03em;
}
.hero h1 span { color: var(--cinnabar); }
.hero-ko {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .12em;
}
.lede {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.95;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.hero-actions .btn { min-width: 150px; }
.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .03em;
}
.hero-visual {
  position: relative;
  margin: 0;
  padding: 10px;
  background: rgba(255,250,241,.68);
  border: 1px solid rgba(196,176,154,.68);
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 24px 60px rgba(66,48,30,.16);
  transform: rotate(1.2deg);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(177,138,84,.26);
  pointer-events: none;
}
.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(.88) contrast(.98);
}
.hero-visual figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 6px 4px;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-soft);
}
.hero-visual figcaption small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .08em;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--demo-max);
  margin: 0 auto;
  padding: 0 var(--demo-gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 22px;
  border-right: 1px solid rgba(196,176,154,.42);
}
.feature-strip > div:last-child { border-right: 0; }
.feature-strip b {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .14em;
}
.feature-strip span {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .05em;
}
.feature-strip small { color: var(--muted); font-size: 10.5px; }

.section {
  max-width: var(--demo-max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 104px) var(--demo-gutter) 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.section-head h2 {
  max-width: 760px;
  margin: 9px 0 8px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .02em;
}
.section-head p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
}
.mode-switch {
  flex: none;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,250,241,.65);
}
.mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: .18s;
}
.mode-btn.active {
  background: var(--ink);
  color: #fff8ee;
  box-shadow: 0 2px 8px rgba(47,40,35,.16);
}

.tree-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}
.tree-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #efe4d3;
  box-shadow: var(--shadow-soft);
}
.tree-stage {
  position: relative;
  height: clamp(500px, 46vw, 610px);
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 20%, rgba(255,250,241,.72), transparent 72%),
    linear-gradient(180deg, #f1e7d8, #e6d7c2);
}
.tree-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.tree-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.stage-hud {
  position: absolute;
  z-index: 5;
  top: 13px;
  left: 13px;
  right: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
  padding: 7px 11px;
  border: 1px solid rgba(196,176,154,.64);
  border-radius: 999px;
  background: rgba(255,250,241,.74);
  backdrop-filter: blur(10px);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.4;
}
.stage-chip b { font-family: var(--serif); font-size: 12px; color: var(--ink); }
.stage-chip i {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 4px rgba(168,68,50,.10);
}
.stage-chip.soft { color: var(--muted); }
.stage-hint {
  position: absolute;
  z-index: 5;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47,40,35,.64);
  color: #fff8ee;
  font-size: 9.5px;
  letter-spacing: .04em;
  pointer-events: none;
  text-align: center;
}
.stage-panpad {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 50px;
  display: grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(3, 32px);
  gap: 4px;
  user-select: none;
  touch-action: none;
}
.stage-panpad button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(196,176,154,.72);
  border-radius: 8px;
  background: rgba(255,250,241,.86);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(66,48,30,.10);
  backdrop-filter: blur(8px);
  touch-action: none;
}
.stage-panpad button:hover { background: #fffdf8; color: var(--cinnabar-deep); }
.stage-panpad button:active { transform: scale(.94); background: #fffdf8; }
.stage-panpad .pan-up { grid-column: 2; grid-row: 1; }
.stage-panpad .pan-left { grid-column: 1; grid-row: 2; }
.stage-panpad .pan-right { grid-column: 3; grid-row: 2; }
.stage-panpad .pan-down { grid-column: 2; grid-row: 3; }
.tree-controls #stage-fullscreen.is-open {
  border-color: var(--cinnabar);
  background: var(--cinnabar);
  color: #fff8ee;
}
.tree-panel.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: #efe4d3;
  box-shadow: none;
}
.tree-panel.is-fullscreen .tree-stage,
.tree-panel.is-fullscreen .flat-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
}
.tree-panel.is-fullscreen .tree-controls { flex: none; }
body.demo-stage-full .tree-section { transform: none !important; transition: none !important; }
body.demo-stage-full { overflow: hidden; }
.tree-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid rgba(196,176,154,.55);
  background: rgba(255,250,241,.82);
}
.tree-controls button {
  height: 33px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.55);
  color: var(--ink-soft);
  font-size: 12px;
  transition: .16s;
}
.tree-controls button:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar-deep);
  background: rgba(255,250,241,.9);
}
.control-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: .02em;
}

.flat-wrap {
  height: clamp(500px, 46vw, 610px);
  background:
    radial-gradient(60% 55% at 50% 28%, rgba(255,250,241,.82), transparent 75%),
    linear-gradient(180deg, #f1e7d8, #e7d8c4);
}
.flat-board {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.flat-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.flat-lines path {
  stroke: rgba(138,124,109,.62);
  stroke-width: .32;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.flat-lines path.focus-line { stroke: rgba(168,68,50,.74); stroke-width: .42; }
.flat-lines path.sibling-line { stroke: rgba(177,138,84,.72); stroke-dasharray: 2 1.4; stroke-width: .3; }
.flat-person {
  position: absolute;
  z-index: 3;
  width: 118px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 11px 8px 9px;
  background: rgba(255,250,241,.94);
  box-shadow: 0 8px 22px rgba(66,48,30,.10);
  text-align: center;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.flat-person:hover {
  transform: translate(-50%, -52%);
  border-color: var(--cinnabar);
  box-shadow: 0 12px 28px rgba(66,48,30,.16);
}
.flat-person.focus {
  border: 3px solid var(--cinnabar);
  background: #fff8ed;
}
.flat-person .flat-avatar {
  width: 31px; height: 31px;
  display: grid; place-items: center;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
}
.flat-person.focus .flat-avatar { background: var(--cinnabar); color: #fff8ee; }
.flat-person b {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .03em;
  line-height: 1.2;
}
.flat-person small {
  display: block;
  margin-top: 3px;
  color: var(--cinnabar);
  font-size: 9.5px;
}

.kin-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px;
  background: rgba(255,250,241,.62);
  box-shadow: var(--shadow-soft);
}
.kin-head h3 {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}
.kin-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}
.path-preview {
  margin-top: 16px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(168,68,50,.24);
  border-radius: 12px;
  background: rgba(168,68,50,.055);
}
.path-preview small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}
.path-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
}
.path-line span {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255,250,241,.84);
}
.path-line i {
  color: var(--cinnabar);
  font-style: normal;
  font-size: 11px;
}
.path-ko {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: .03em;
}
.kin-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  overflow-y: auto;
}
.kin-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 7px 7px;
  background: transparent;
  text-align: left;
  transition: .16s;
}
.kin-row:hover, .kin-row.active {
  background: rgba(88,111,91,.08);
}
.kin-row .kin-dot {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
}
.kin-row.active .kin-dot { background: var(--green); color: #fff8ee; }
.kin-row b { display: block; font-size: 11.5px; font-weight: 600; }
.kin-row small { display: block; color: var(--muted); font-size: 9px; }
.kin-row em {
  color: var(--cinnabar);
  font-size: 9.5px;
  font-style: normal;
}
.panel-note {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(196,176,154,.5);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.device-layout {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: clamp(22px, 4vw, 50px);
  align-items: start;
}
.device-demo {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,250,241,.9), rgba(236,224,205,.62));
  box-shadow: var(--shadow-soft);
}
.device-card {
  padding: 18px;
  border: 1px solid rgba(88,111,91,.28);
  border-radius: 15px;
  background: rgba(255,250,241,.76);
}
.device-card.is-new {
  border-color: rgba(168,68,50,.3);
  background: rgba(255,248,237,.88);
}
.device-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}
.device-icon {
  width: 37px; height: 37px;
  display: grid; place-items: center;
  flex: none;
  border-radius: 50%;
  background: rgba(88,111,91,.13);
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
}
.device-card.is-new .device-icon {
  background: rgba(168,68,50,.1);
  color: var(--cinnabar);
  font-size: 14px;
}
.device-card-top b { display: block; font-size: 14px; }
.device-card-top small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.device-card p {
  margin: 0 0 15px;
  min-height: 48px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}
.device-card .input { margin-bottom: 9px; display: none; }
.device-card.is-new .input { display: block; }
.device-card .btn.block { margin-bottom: 7px; }
.device-other {
  display: block;
  width: 100%;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.device-foot {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  text-align: center;
}
.device-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.device-steps li {
  position: relative;
  min-height: 126px;
  padding: 19px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,250,241,.56);
}
.device-steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  right: 15px;
  top: 13px;
  color: rgba(177,138,84,.48);
  font-family: var(--serif);
  font-size: 18px;
}
.device-steps b {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}
.device-steps span {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.privacy-grid article {
  min-height: 218px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,250,241,.56);
}
.privacy-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(168,68,50,.08);
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 22px;
}
.privacy-grid h3 {
  margin: 17px 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}
.privacy-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
}
.path-demo {
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid rgba(88,111,91,.24);
  border-radius: 15px;
  background: rgba(88,111,91,.055);
}
.path-demo-label {
  color: var(--green);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.path-demo-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 17px;
}
.path-demo-flow span {
  padding: 5px 11px;
  border: 1px solid rgba(88,111,91,.22);
  border-radius: 9px;
  background: rgba(255,250,241,.7);
}
.path-demo-flow i { color: var(--gold); font-style: normal; font-size: 13px; }

.closing {
  max-width: var(--demo-max);
  margin: clamp(64px, 9vw, 110px) auto 0;
  padding: clamp(56px, 8vw, 92px) var(--demo-gutter) 72px;
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(255,255,255,.10), transparent 70%),
    var(--ink);
  color: #f6f0e4;
  text-align: center;
}
.closing-seal {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  margin: 0 auto 22px;
  border-radius: 15px 15px 15px 4px;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 30px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.closing .eyebrow { color: #c4a57c; }
.closing h2 {
  margin: 12px auto 14px;
  font-family: var(--serif);
  font-size: clamp(27px, 3.5vw, 38px);
  font-weight: 500;
  line-height: 1.5;
}
.closing > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0 auto 25px;
  color: rgba(246,240,228,.66);
  font-size: 12px;
  line-height: 1.8;
}
.closing .btn {
  border-color: rgba(246,240,228,.4);
  background: transparent;
  color: #f6f0e4;
}
.closing .btn:hover { background: rgba(255,255,255,.08); box-shadow: none; }
.demo-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--demo-max);
  margin: 0 auto;
  padding: 18px var(--demo-gutter) 24px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}
.site-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.site-legal {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(196, 176, 154, .45);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.9;
  text-align: left;
}
.site-legal p { margin: 0 0 5px; }
.site-legal b { color: var(--ink-soft); font-weight: 700; }
.site-legal a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 110, 82, .35);
}
.site-legal a:hover { color: var(--cinnabar-deep); }
.site-legal-copy { margin-top: 8px !important; color: var(--muted); }

/* 人物档案抽屉 */
.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}
.sheet-layer[hidden] { display: none; }
.sheet-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: rgba(37,30,25,.42);
  backdrop-filter: blur(3px);
}
.person-sheet {
  position: relative;
  z-index: 2;
  width: min(440px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 24px 26px 34px;
  background: var(--paper-light);
  box-shadow: -20px 0 70px rgba(37,30,25,.26);
  animation: sheetIn .28s ease-out;
}
@keyframes sheetIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.sheet-close {
  position: absolute;
  right: 16px; top: 14px;
  z-index: 2;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,250,241,.82);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1;
}
.sheet-photo {
  position: relative;
  display: grid;
  place-items: center;
  height: 185px;
  margin: 2px 0 22px;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(60% 60% at 50% 30%, rgba(255,250,241,.62), transparent 70%),
    linear-gradient(145deg, #d9c5ab, #b8936c);
  color: #fff8ee;
}
.sheet-photo span {
  font-family: var(--serif);
  font-size: 64px;
  text-shadow: 0 4px 18px rgba(66,48,30,.22);
}
.sheet-photo small {
  position: absolute;
  left: 12px; bottom: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(47,40,35,.44);
  color: #fff8ee;
  font-size: 9px;
  letter-spacing: .06em;
}
.person-sheet h2 {
  margin: 5px 0 6px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: .04em;
}
.sheet-path {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid rgba(168,68,50,.24);
  border-radius: 7px;
  background: rgba(168,68,50,.055);
  color: var(--cinnabar-deep);
  font-family: var(--serif);
  font-size: 13px;
}
.sheet-story {
  margin: 18px 0 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.95;
}
.voice-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(88,111,91,.22);
  border-radius: 12px;
  background: rgba(88,111,91,.055);
}
.voice-play {
  width: 38px; height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff8ee;
  font-size: 13px;
}
.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 58px;
  height: 26px;
}
.voice-wave i {
  width: 3px;
  border-radius: 3px;
  background: rgba(88,111,91,.52);
  animation: wave 1.3s ease-in-out infinite;
}
.voice-wave i:nth-child(1) { height: 9px; animation-delay: -.1s; }
.voice-wave i:nth-child(2) { height: 18px; animation-delay: -.4s; }
.voice-wave i:nth-child(3) { height: 13px; animation-delay: -.7s; }
.voice-wave i:nth-child(4) { height: 23px; animation-delay: -.2s; }
.voice-wave i:nth-child(5) { height: 16px; animation-delay: -.6s; }
.voice-wave i:nth-child(6) { height: 20px; animation-delay: -.9s; }
.voice-wave i:nth-child(7) { height: 11px; animation-delay: -.3s; }
.voice-wave i:nth-child(8) { height: 24px; animation-delay: -.8s; }
.voice-wave i:nth-child(9) { height: 14px; animation-delay: -.5s; }
@keyframes wave { 0%,100% { transform: scaleY(.4); opacity: .5; } 50% { transform: scaleY(1); opacity: .95; } }
.voice-meta b { display: block; font-size: 11px; }
.voice-meta small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.sheet-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.sheet-meta div { min-width: 0; }
.sheet-meta dt { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.sheet-meta dd {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  max-width: min(410px, calc(100vw - 32px));
  padding: 10px 15px;
  border-radius: 10px;
  background: rgba(47,40,35,.92);
  color: #fff8ee;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: .22s;
}
.demo-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr .92fr; gap: 30px; }
  .hero h1 { font-size: clamp(34px, 5.3vw, 48px); }
  .tree-layout { grid-template-columns: minmax(0,1fr) 268px; }
  .device-layout { grid-template-columns: 1fr; }
  .device-steps { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-cta { padding: 8px 12px; }
  .hero { grid-template-columns: 1fr; padding-top: 38px; }
  .hero-visual { order: -1; margin: 0 4px 2px; transform: rotate(.8deg); }
  .hero-copy { padding: 0 2px; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-strip > div:nth-child(2) { border-right: 0; }
  .feature-strip > div:nth-child(-n+2) { border-bottom: 1px solid rgba(196,176,154,.42); }
  .section-head { display: block; }
  .mode-switch { margin-top: 17px; }
  .tree-layout { grid-template-columns: 1fr; }
  .kin-panel { max-height: none; }
  .kin-list { max-height: 300px; }
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-grid article { min-height: 0; }
  .device-steps { grid-template-columns: repeat(2, 1fr); }
  .closing { border-radius: 18px 18px 0 0; }
  .demo-footer { display: flex; text-align: center; }
  .site-legal { text-align: left; }
}

@media (max-width: 560px) {
  .section { scroll-margin-top: 64px; }
  .demo-ribbon { font-size: 9px; line-height: 1.5; }
  .ribbon-tag { font-size: 8px; }
  .demo-nav { gap: 10px; padding-top: 10px; padding-bottom: 9px; }
  .nav-brand b { font-size: 14px; }
  .nav-seal { width: 31px; height: 31px; font-size: 16px; }
  .nav-cta { font-size: 10.5px; }
  .hero { padding-top: 26px; gap: 24px; }
  .hero h1 { font-size: clamp(31px, 9vw, 40px); }
  .lede { margin-top: 19px; font-size: 13.5px; line-height: 1.85; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 1; min-width: 0; text-align: center; }
  .hero-visual figcaption small { display: none; }
  .feature-strip > div { padding: 15px 14px; }
  .feature-strip span { font-size: 15px; }
  .section { padding-top: 58px; }
  .section-head h2 { font-size: 27px; }
  .tree-stage, .flat-wrap { height: 56vh; min-height: 400px; max-height: 520px; }
  .stage-hud { top: 9px; left: 9px; right: 9px; }
  .stage-chip { max-width: 66%; padding: 5px 8px; font-size: 9px; }
  .stage-chip b { font-size: 10px; }
  .stage-chip.soft { display: none; }
  .stage-hint { bottom: 9px; font-size: 8.5px; }
  .stage-panpad { right: 9px; bottom: 48px; }
  .tree-controls { flex-wrap: wrap; gap: 5px; padding: 8px; }
  .tree-controls button { height: 31px; min-width: 35px; padding: 0 9px; font-size: 11px; }
  .control-hint { display: none; }
  .tree-layout { gap: 12px; }
  .kin-panel { padding: 16px 14px; }
  .kin-head h3 { font-size: 19px; }
  .flat-person { width: 88px; padding: 8px 5px 7px; }
  .flat-person .flat-avatar { width: 25px; height: 25px; font-size: 12px; margin-bottom: 3px; }
  .flat-person b { font-size: 12px; }
  .flat-person small { font-size: 8px; }
  .device-demo { padding: 13px; }
  .device-card { padding: 15px; }
  .device-steps { grid-template-columns: 1fr; }
  .device-steps li { min-height: 0; }
  .path-demo { padding: 16px; }
  .path-demo-flow { gap: 6px; font-size: 14px; }
  .path-demo-flow span { padding: 4px 8px; }
  .closing { margin-top: 58px; padding-top: 50px; }
  .person-sheet {
    align-self: flex-end;
    width: 100%;
    height: auto;
    max-height: 90vh;
    margin-top: auto;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px calc(26px + env(safe-area-inset-bottom));
    animation: sheetUp .28s ease-out;
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .sheet-layer { align-items: flex-end; }
  .sheet-photo { height: 145px; margin-bottom: 17px; }
  .sheet-photo span { font-size: 52px; }
  .person-sheet h2 { font-size: 27px; }
  .sheet-story { font-size: 12.5px; }
  .sheet-meta dd { font-size: 13px; }
}

/* 背景音乐：官方影像嵌入，不在本站存音频 */
.bgm-dock {
  position: fixed;
  z-index: 75;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.bgm-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 13px 0 9px;
  border: 1px solid rgba(196,176,154,.8);
  border-radius: 999px;
  background: rgba(255,250,241,.9);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(66,48,30,.16);
  backdrop-filter: blur(12px);
}
.bgm-dock:not(.is-open) .bgm-toggle { display: inline-flex; }
.bgm-note {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 15px;
}
.bgm-toggle-copy b {
  display: block;
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1.1;
  text-align: left;
}
.bgm-toggle-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .04em;
}
.bgm-body {
  position: relative;
  display: none;
  width: 344px;
  padding: 10px;
  border: 1px solid rgba(196,176,154,.82);
  border-radius: 16px;
  background: rgba(255,250,241,.94);
  box-shadow: 0 22px 60px rgba(37,30,25,.22);
  backdrop-filter: blur(18px);
}
.bgm-dock.is-open .bgm-body { display: grid; grid-template-columns: 144px minmax(0,1fr); gap: 10px; }
.bgm-close {
  position: absolute;
  right: 5px; top: 4px;
  z-index: 3;
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(47,40,35,.7);
  color: #fff8ee;
  font-size: 13px;
  line-height: 1;
}
.bgm-video {
  position: relative;
  width: 144px;
  height: 81px;
  overflow: hidden;
  border-radius: 9px;
  background: #1e1a17;
}
#bgm-player, #bgm-player iframe {
  width: 144px !important;
  height: 81px !important;
  display: block;
  border: 0;
}
.bgm-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  border: 0;
  background: rgba(37,30,25,.38);
  color: #fff8ee;
  font-size: 22px;
  transition: .18s;
}
.bgm-dock.is-playing .bgm-play { opacity: 0; pointer-events: none; }
.bgm-dock.is-playing .bgm-video { box-shadow: inset 0 0 0 2px rgba(168,68,50,.5); }
.bgm-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 9px;
  background: rgba(37,30,25,.82);
  color: #fff8ee;
  text-align: center;
  font-size: 10px;
}
.bgm-fallback[hidden] { display: none; }
.bgm-fallback a { color: #fff8ee; text-decoration: underline; }
.bgm-text {
  min-width: 0;
  padding: 5px 24px 4px 0;
}
.bgm-kicker {
  margin: 0 0 4px;
  color: var(--cinnabar);
  font-size: 8px;
  letter-spacing: .14em;
  font-weight: 700;
}
.bgm-text b {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bgm-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.bgm-status {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(88,111,91,.1);
  color: var(--green);
  font-size: 8px;
  letter-spacing: .04em;
}
.bgm-source {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}
.bgm-body:hover .bgm-close { background: var(--ink); }
@media (max-width: 560px) {
  .bgm-body { width: min(304px, calc(100vw - 24px)); grid-template-columns: 112px minmax(0,1fr) !important; }
  .bgm-video, #bgm-player, #bgm-player iframe { width: 112px !important; height: 63px !important; }
  .bgm-text b { font-size: 12px; }
  .bgm-toggle { height: 42px; }
}

/* 3D-only badge、旁系展开与海外分享码 */
.mode-note {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,250,241,.68);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .04em;
}
.mode-note i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 4px rgba(168,68,50,.10);
}
.tree-controls .expand-btn {
  border-color: rgba(168,68,50,.35);
  color: var(--cinnabar-deep);
  background: rgba(168,68,50,.055);
  font-family: var(--serif);
}
.tree-controls .expand-btn.is-open {
  background: var(--cinnabar);
  color: #fff8ee;
  border-color: var(--cinnabar);
}
.kin-row.extra { display: none; }
.kin-panel.is-expanded .kin-row.extra { display: grid; }
.kin-panel.is-expanded .panel-note { color: var(--cinnabar-deep); }

.share-layout {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: clamp(20px, 4vw, 46px);
  align-items: start;
}
.share-demo {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,250,241,.72);
  box-shadow: var(--shadow-soft);
}
.share-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .16em;
  font-weight: 700;
}
.share-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 15px;
  border: 1px dashed rgba(168,68,50,.38);
  border-radius: 11px;
  background: rgba(168,68,50,.045);
}
.share-code-row b {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .12em;
  color: var(--cinnabar-deep);
}
.share-code-row button {
  flex: none;
  border: 1px solid rgba(168,68,50,.3);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255,250,241,.72);
  color: var(--cinnabar-deep);
  font-size: 10px;
}
.share-fields { margin-top: 16px; }
.share-fields label {
  display: block;
  margin: 9px 0 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: .04em;
}
.share-fields .input { font-size: 12px; }
.share-fields .btn.block { margin-top: 12px; }
.share-result {
  margin: 12px 0 0;
  padding: 10px;
  border: 1px solid rgba(88,111,91,.22);
  border-radius: 9px;
  background: rgba(88,111,91,.06);
  color: var(--green);
  font-size: 10.5px;
  line-height: 1.65;
}
.share-result[hidden] { display: none; }
.share-foot {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  text-align: center;
}
.share-rules ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.share-rules li {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,250,241,.56);
}
.share-rules b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}
.share-rules span {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.7;
}
.share-note {
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(88,111,91,.22);
  border-radius: 12px;
  background: rgba(88,111,91,.055);
}
.share-note b { display: block; color: var(--green); font-size: 11px; }
.share-note span { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }

@media (max-width: 800px) {
  .mode-note { margin-top: 14px; }
  .share-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .share-rules li { grid-template-columns: 1fr; gap: 4px; }
  .share-code-row b { font-size: 21px; letter-spacing: .06em; }
  .tree-controls .expand-btn { order: 5; }
}
.share-result.is-error {
  border-color: rgba(168,68,50,.28);
  background: rgba(168,68,50,.06);
  color: var(--cinnabar-deep);
}
.share-result { white-space: pre-line; }

/* 韩文旁注与家人自愿支持 */
.hero-ko span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}
.bgm-title b span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .04em;
}
.support-section .section-head { margin-bottom: 18px; }
.support-card {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 20px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 12%, rgba(168,68,50,.055), transparent 36%),
    rgba(255,250,241,.72);
  box-shadow: var(--shadow-soft);
}
.support-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .14em;
  font-weight: 700;
}
.support-copy h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 500;
}
.support-copy p {
  margin: 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}
.support-action { padding-left: 18px; border-left: 1px solid var(--line); }
.support-hint {
  margin: 0 0 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,250,241,.7);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}
.support-hint span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.tip-amounts {
  display: flex;
  gap: 7px;
  margin-bottom: 11px;
}
.tip-amounts button {
  flex: 1;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,250,241,.7);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.tip-amounts button span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
}
.tip-amounts button.active {
  border-color: rgba(168,68,50,.5);
  background: rgba(168,68,50,.08);
  color: var(--cinnabar-deep);
}
.tip-amounts button.active span { color: var(--cinnabar-deep); }
.tip-result {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(88,111,91,.06);
  color: var(--green);
  font-size: 10px;
  line-height: 1.7;
}
.tip-result[hidden] { display: none; }
.legal-note {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-left: 2px solid rgba(168,68,50,.35);
  background: rgba(168,68,50,.035);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.85;
}
.legal-note b { color: var(--cinnabar-deep); }

@media (max-width: 800px) {
  .support-card { grid-template-columns: 1fr; }
  .support-action { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--line); }
}

/* 补齐家谱 */
.panel-add {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(168,68,50,.28);
  border-radius: 10px;
  background: rgba(168,68,50,.05);
  color: var(--cinnabar-deep);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .04em;
}
.panel-add:hover { background: rgba(168,68,50,.1); }
.add-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(43, 35, 28, .34);
  backdrop-filter: blur(8px);
}
.add-layer[hidden] { display: none; }
.add-card {
  width: min(560px, 100%);
  max-height: min(88vh, 780px);
  overflow: auto;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf1;
  box-shadow: 0 24px 70px rgba(40, 30, 22, .22);
}
.add-close {
  float: right;
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,250,241,.84);
  color: var(--muted);
  font-size: 16px;
}
.add-card h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
}
.add-sub {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}
.add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.add-card .field { margin-bottom: 10px; }
.add-card .field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
}
.add-preview {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-left: 2px solid rgba(168,68,50,.35);
  background: rgba(168,68,50,.04);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.modal-actions .btn { width: auto; min-width: 104px; }
@media (max-width: 560px) {
  .add-grid { grid-template-columns: 1fr; gap: 0; }
  .add-card { max-height: 92vh; }
}

/* 展开后把 3D 舞台铺满整行，避免 15 人挤在窄栏 */
.tree-layout.is-expanded { grid-template-columns: 1fr; }
.tree-layout.is-expanded .tree-stage { min-height: min(62vh, 560px); }
.tree-layout.is-expanded .kin-panel { margin-top: 14px; }
.tree-layout.is-expanded .kin-list { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 18px; }
@media (max-width: 800px) {
  .tree-layout.is-expanded .kin-list { grid-template-columns: 1fr; }
}

/* 配偶线：姻亲链 */
.flat-lines .spouse-line, #flat-lines .spouse-line { stroke: #c08a52; stroke-width: 2.2; stroke-dasharray: 3 5; opacity: .9; }
.flat-lines .sibling-line, #flat-lines .sibling-line { stroke: #b28a52; stroke-width: 1.4; stroke-dasharray: 2 4; }

/* 한국어 우선 · 중국어는 작은 주석으로 */
.zh {
  display: block;
  margin-top: .38rem;
  color: var(--muted);
  font-size: .78em;
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: .01em;
  opacity: .9;
}
.zh-inline {
  display: inline;
  margin-left: .32em;
  color: var(--muted);
  font-size: .78em;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .01em;
  opacity: .82;
}
.hero-zh {
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: .04em;
}
.lede-zh { max-width: 540px; margin-top: 8px; }
.sheet-name-zh {
  margin: -6px 0 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .06em;
}
.sheet-story-zh {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.path-ko { white-space: pre-line; }
.sheet-path-zh { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }

/* public onboarding band */
.start-band {
  width: min(1180px, calc(100% - 48px));
  margin: 34px auto 0;
  padding: clamp(22px, 3.6vw, 38px);
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(168, 68, 50, .10), transparent 70%),
    linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(248, 239, 224, .88));
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 18px 50px rgba(73, 48, 29, .08);
}
.start-band-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.3;
  letter-spacing: -.04em;
}
.start-band-text { margin: 14px 0 0; max-width: 580px; color: #5b5044; font-size: 13px; line-height: 1.85; }
.start-band-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.start-band-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line, rgba(70, 50, 34, .16)); }
.start-band-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; padding: 14px 0; border-bottom: 1px solid var(--line, rgba(70, 50, 34, .16)); }
.start-band-steps b { grid-row: span 2; align-self: center; color: var(--gold, #b08a52); font-family: var(--serif); font-size: 17px; }
.start-band-steps span { font-size: 13px; font-weight: 700; }
.start-band-steps small { color: var(--muted, #74695c); font-size: 11.5px; line-height: 1.6; }
@media (max-width: 860px) {
  .start-band { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .start-band { width: calc(100% - 28px); margin-top: 24px; padding: 20px 16px; border-radius: 18px; }
  .start-band-copy h2 { font-size: 23px; }
  .start-band-actions .btn { width: 100%; text-align: center; }
}

.demo-nav .nav-brand { flex: 0 0 auto; }
.demo-nav .nav-brand b { white-space: nowrap; }
