/* 文章路口：默认 Ghost，读完 95% 后淡入。无色块按钮。 */
.mesh-hub {
  margin: 1.75rem 0 0.5rem;
  padding: 0 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.72s ease,
    transform 0.72s ease,
    max-height 0.8s ease,
    visibility 0s linear 0.8s;
}

.mesh-hub.is-open {
  max-height: 720px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 0.72s ease,
    transform 0.72s ease,
    max-height 0.8s ease,
    visibility 0s;
}

.mesh-hub-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--m2m-muted, #8a8a93);
}

.mesh-hub-merge,
.mesh-hub-roads,
.mesh-hub-fold-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: baseline;
}

.mesh-hub-merge {
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.mesh-hub-merge-k {
  font-size: 0.68rem;
  color: var(--m2m-muted, #8a8a93);
  margin-right: 0.25rem;
}

.mesh-hub-merge-split {
  color: var(--m2m-muted, #8a8a93);
  opacity: 0.55;
}

.mesh-hub-road {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  padding: 0.1rem 0 0.12rem;
  opacity: 0.88;
}

.mesh-hub-road:hover,
.mesh-hub-road:focus-visible {
  opacity: 1;
  border-bottom-color: currentColor;
}

.mesh-hub-road-label {
  font-size: 0.95rem;
  font-weight: 560;
  line-height: 1.3;
}

.mesh-hub-road-hint {
  font-size: 0.7rem;
  color: var(--m2m-muted, #8a8a93);
}

.mesh-hub-fold {
  margin-top: 0.7rem;
}

.mesh-hub-fold > summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--m2m-muted, #8a8a93);
  list-style: none;
}

.mesh-hub-fold > summary::-webkit-details-marker {
  display: none;
}

.mesh-hub-fold-list {
  margin-top: 0.45rem;
}

@media (prefers-reduced-motion: reduce) {
  .mesh-hub,
  .mesh-hub.is-open {
    transition: none;
    transform: none;
  }
}

.stealth-internal-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}
.stealth-internal-link:hover,
.stealth-internal-link:focus-visible {
  color: inherit;
  text-decoration: none;
  border-bottom-color: currentColor;
}
html:not(.light-theme) .stealth-internal-link {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.mesh-stealth-card {
  position: fixed !important;
  z-index: 1080;
  left: 0;
  top: 0;
  width: 220px !important;
  max-width: min(220px, calc(100vw - 16px)) !important;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  background: #fff;
  color: #1a2433;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}
.mesh-stealth-card.is-on {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.mesh-stealth-card img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #e8eef5;
}
.mesh-stealth-card-body {
  padding: 0.65rem 0.75rem 0.75rem;
}
.mesh-stealth-card-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.mesh-stealth-card-status {
  display: block;
  margin-top: 0.2rem;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.72;
}
html:not(.light-theme) .mesh-stealth-card {
  background: #151a23;
  color: #e9e2d2;
  border-color: #2a3344;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
html:not(.light-theme) .mesh-stealth-card img {
  background: #0f141c;
}
@media (prefers-reduced-motion: reduce) {
  .mesh-stealth-card,
  .mesh-stealth-card.is-on {
    transition: none;
    transform: none;
  }
}

/* Path Walker：全景前挡 + 余光仪表（只作用 poss-stage） */
.possess-page.pf .poss-stage-wrap,
.poss-stage-wrap,
.poss-stage-wrap.drive-stage {
  --pw-p: 0;
  --pw-needle-deg: -120deg;
  --pw-vp-x: 50%;
  --pw-vp-y: 40%;
  --pw-car-h: calc(100vw * 9 / 16);
  --pw-mirror-z: 1;
  --pw-dash: 0.7s;
  --pw-grass-d: 1.8s;
  isolation: auto;
  z-index: 5;
  perspective: none;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  background: #b8cde3 !important;
}

.pw-sky-plate {
  display: none;
  position: fixed;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover;
  object-position: 50% 40%;
  transform: none;
  transform-origin: 50% 36%;
  perspective-origin: 50% 36%;
  filter: var(--pw-grade, none);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 44%, rgba(0, 0, 0, 0.5) 52%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 44%, rgba(0, 0, 0, 0.5) 52%, transparent 62%);
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

.pw-sky-near {
  display: none;
}

#windshield-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  overflow: visible;
  perspective: none;
  background: transparent;
  z-index: 10;
}

#windshield-view .poss-scene {
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
  background: transparent;
  z-index: 10;
}

.poss-stage-wrap .ps-cockpit,
.poss-stage-wrap .ps-tex-cockpit,
.poss-stage-wrap .ps-aura,
.poss-stage-wrap .pw-ghost-car,
.poss-stage-wrap .ps-grass,
.poss-stage-wrap .ps-horizon,
.poss-stage-wrap .ps-env,
.poss-stage-wrap .ps-cast-rear,
.poss-stage-wrap .ps-cast-front,
.poss-stage-wrap .ps-cast-bob,
.poss-stage-wrap .rs-world,
.poss-stage-wrap .rs-way,
.poss-stage-wrap .ps-road,
.poss-stage-wrap .ps-road image {
  display: none !important;
}

/* bike/walk 无照片座舱，前景（车把 / 双腿）必须由 SVG 承担 */
.poss-stage-wrap .poss-scene.mode-bike .ps-cockpit,
.poss-stage-wrap .poss-scene.mode-walk .ps-cockpit {
  display: inline !important;
}

.poss-stage-wrap .ps-bg > rect {
  fill: none !important;
}

.poss-stage-wrap .poss-scene > rect:last-child {
  fill: none;
}

.poss-stage-wrap .poss-scene .ps-env,
.poss-stage-wrap .poss-scene .pw-photo-far {
  transform: none;
  mask-image: none;
  -webkit-mask-image: none;
}

.poss-stage-wrap .poss-scene .ps-road,
.poss-stage-wrap .poss-scene .pw-photo-mid,
.poss-stage-wrap .poss-scene image.ps-cast-rear,
.poss-stage-wrap .poss-scene image.ps-cast-front,
.poss-stage-wrap .poss-scene image.ps-cast-bob {
  mask-image: none;
  -webkit-mask-image: none;
  transform: none;
}

div.pw-world {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  perspective: 460px;
  perspective-origin: 50% 38%;
  clip-path: inset(0 0 4% 0);
}
.pw-plane {
  position: absolute;
  top: 40%;
  height: 230%;
  transform: rotateX(62deg);
  transform-origin: 50% 0;
  backface-visibility: hidden;
  will-change: background-position;
}
.pw-plane-field {
  display: block;
  left: -45%;
  width: 190%;
  background-size: 135% 300%;
  background-repeat: repeat-y;
  background-position: 50% calc(90% + var(--pw-field-y, 0px));
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 100%);
  opacity: 1;
  filter: contrast(1.1) saturate(1.06);
}
.pw-plane-field-l,
.pw-plane-field-r {
  display: none;
}
.pw-plane-road {
  display: none;
}
.pw-dash-layer {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 8;
  pointer-events: none;
  background: transparent;
}
.pw-road-mesh,
.poss-stage-wrap .pw-road-mesh,
.poss-stage-wrap .pw-laser-roads {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  background: transparent;
  transform: none !important;
  clip-path: inset(12% 8% 34% 10%);
}

.poss-stage-wrap .pw-laser-roads {
  display: none !important;
}

.pw-asphalt { fill: #2a2c30; opacity: 0; }
.pw-shoulder { fill: #6e6248; opacity: 0; }
.pw-yellow {
  fill: none;
  stroke: #e8c84a;
  stroke-width: 5;
  stroke-dasharray: 16 20;
  stroke-linecap: butt;
  opacity: 0;
  animation: none;
}
@keyframes pwYellowFlow {
  to { stroke-dashoffset: -36; }
}

.pw-grass {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
  clip-path: inset(38% 0 30% 0);
}
.pw-grass-side {
  position: absolute;
  top: 38%;
  height: 34%;
  overflow: hidden;
  isolation: isolate;
}
.pw-grass-side.is-l {
  left: 0;
  width: 16%;
  clip-path: polygon(0 0, 96% 0, 20% 100%, 0 100%);
}
.pw-grass-side.is-r {
  right: 0;
  width: 48%;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 70% 100%);
}
.pw-grass-flow {
  position: absolute;
  inset: -90% -50%;
  will-change: transform;
  opacity: 0.72;
}
.pw-grass-side.is-l .pw-grass-flow {
  background: repeating-linear-gradient(
    207deg,
    rgba(70, 52, 18, 0) 0 40px,
    rgba(70, 52, 18, 0.42) 40px 58px
  );
  animation: none;
}
.pw-grass-side.is-r .pw-grass-flow {
  background: repeating-linear-gradient(
    149deg,
    rgba(70, 52, 18, 0) 0 40px,
    rgba(70, 52, 18, 0.42) 40px 58px
  );
  animation: none;
}
@keyframes pwGrassL {
  from { transform: translate(18%, -24%); }
  to { transform: translate(-24%, 32%); }
}
@keyframes pwGrassR {
  from { transform: translate(-16%, -24%); }
  to { transform: translate(22%, 32%); }
}
@media (prefers-reduced-motion: reduce) {
  .pw-yellow,
  .pw-grass-flow {
    animation: none;
  }
}

.poss-stage-wrap .pw-seg {
  fill: none;
  stroke: rgba(186, 236, 255, 0.48);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0.55;
}

.poss-stage-wrap .pw-seg.is-lit {
  opacity: 1;
  stroke: rgba(210, 248, 255, 0.95);
  filter: drop-shadow(0 0 5px rgba(120, 220, 255, 0.85));
}

.pw-flyby {
  position: fixed;
  inset: 0;
  z-index: 90050;
  clip-path: none;
  pointer-events: none;
  overflow: visible;
  perspective: none;
  transform-style: preserve-3d;
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}

.pw-sprite {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 5vw;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: none;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  filter: none;
  opacity: 0;
}
.pw-sprite.is-oncoming,
.pw-sprite.is-ahead {
  height: auto;
  max-height: 10vh;
}
.pw-sprite.is-left-grass,
.pw-sprite.is-right-grass,
.pw-sprite.is-right-far {
  max-height: 6.5vh;
}

.pw-mirror {
  display: block;
  position: fixed;
  z-index: 100002;
  pointer-events: none;
  overflow: hidden;
  background: #121416;
  border: 2px solid rgba(40, 36, 32, 0.88);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pw-mirror-c {
  top: 58px;
  left: 50%;
  width: min(280px, 32vw);
  height: 52px;
  margin-left: calc(min(280px, 32vw) / -2);
  border-radius: 10px;
}

.pw-mirror-l {
  top: 32%;
  left: 1.2%;
  width: min(128px, 15vw);
  height: min(92px, 13vh);
  margin-left: 0;
  border-radius: 12px 20px 20px 12px;
  transform: perspective(420px) rotateY(16deg);
}

.pw-mirror-r {
  top: 32%;
  right: 1.2%;
  left: auto;
  width: min(118px, 14vw);
  height: min(86px, 12vh);
  margin-left: 0;
  border-radius: 20px 12px 12px 20px;
  transform: perspective(420px) rotateY(-16deg);
}

.pw-mirror-glass {
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform: scaleX(-1);
}

.pw-mirror-inner {
  width: 100%;
  height: 140%;
  transform-origin: 50% 80%;
  transform: scale(var(--pw-mirror-z));
}

.pw-mirror-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.pw-cabin {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  pointer-events: none;
  overflow: visible;
  background: transparent;
  transform: none;
}

.pw-cabin::before {
  display: none;
}

.pw-cabin[data-pw-hull="cabin"]::before {
  display: none;
}

.pw-cabin-shell {
  display: none;
}

.pw-steer {
  display: block;
  position: absolute;
  top: auto;
  right: auto;
  bottom: 0;
  left: 0;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(22%);
  -webkit-mask-image: none;
  mask-image: none;
}

.pw-cabin[data-pw-hull="cabin"] {
  inset: 0;
  height: 100%;
  overflow: visible;
}

.pw-cabin[data-pw-hull="cabin"] .pw-steer {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  transform-origin: 50% 50%;
  transform: none !important;
}

body.pathwalker .pw-dash-persp,
.poss-stage-wrap .pw-dash-persp,
.pw-cabin .pw-dash {
  display: none;
}

.pw-dash {
  width: 100%;
  height: 100%;
  transform: none;
  transform-origin: bottom left;
}

.pw-speedo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.pw-gauge-ring {
  fill: none;
  stroke: rgba(140, 255, 170, 0.28);
  stroke-width: 2;
}

.pw-gauge-arc {
  fill: none;
  stroke: rgba(140, 255, 170, 0.7);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.pw-gauge-unit,
.pw-dash-label {
  fill: rgba(140, 255, 170, 0.7);
  font: 700 10px/1 ui-monospace, "SF Mono", monospace;
  text-anchor: middle;
}

.pw-dash-label {
  letter-spacing: 0.28em;
  font-size: 8px;
}

.pw-needle {
  fill: url(#pwNeedleGrad);
  transform: rotate(var(--pw-needle-deg));
  transform-origin: 0px 0px;
}

.pw-needle circle {
  fill: #d8ffe6;
  stroke: #06210c;
  stroke-width: 1.2;
}

.pw-hud-glass,
.poss-stage-wrap .pf-hud {
  display: none !important;
}

.pw-ar-hud {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 50;
  --pw-car-h: calc(100vw * 9 / 16);
  pointer-events: none;
  font-family: ui-sans-serif, "PingFang SC", "Noto Sans SC", sans-serif;
  color: #f4f7fa;
}

.pw-ar-warn {
  position: absolute;
  top: 16%;
  bottom: auto;
  left: 14%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.pw-ar-warn i {
  display: block;
  width: 18px;
  height: 3px;
  background: #e11d2e;
}

.pw-ar-warn span + span {
  opacity: 0.92;
}

.pw-ar-arrow {
  position: absolute;
  left: 50%;
  top: 40%;
  bottom: auto;
  width: 34px;
  height: 56px;
  margin-left: -17px;
  background: #2ee6ff;
  clip-path: polygon(50% 0, 100% 42%, 68% 42%, 68% 100%, 32% 100%, 32% 42%, 0 42%);
  opacity: 0.82;
  filter: drop-shadow(0 8px 16px rgba(20, 180, 220, 0.45));
  transform: perspective(420px) rotateX(58deg) translateY(var(--pw-ar-bob, 0px));
  transform-origin: 50% 100%;
}

.pw-ar-lane {
  position: absolute;
  left: 51%;
  top: 38%;
  bottom: auto;
  width: 5px;
  height: 9vh;
  background: linear-gradient(180deg, rgba(225, 29, 46, 0), #e11d2e 30%, #e11d2e);
  transform: perspective(500px) rotateX(55deg) rotateZ(8deg);
  transform-origin: 50% 0;
  opacity: 0.88;
}

.pw-ar-speed {
  position: absolute;
  left: 10%;
  top: 42%;
  bottom: auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.38));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.pw-ar-speed b {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.pw-ar-speed small {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.pw-ar-nav {
  position: absolute;
  right: 14%;
  top: 40%;
  bottom: auto;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.pw-ar-nav span {
  display: block;
  font-size: 13px;
  opacity: 0.9;
}

.pw-ar-nav b {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
}

.pw-hud-glass p,
.poss-stage-wrap .pf-hud-top,
.poss-stage-wrap .pf-who,
.poss-stage-wrap .pf-who-tx,
.poss-stage-wrap .pf-who-tx b,
.poss-stage-wrap .pf-who-tx span,
.poss-stage-wrap .pf-chip,
.poss-stage-wrap .pf-bar span {
  margin: 0;
  color: rgba(140, 255, 170, 0.72);
  font: 600 11px/1.55 ui-monospace, "SF Mono", monospace;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(80, 255, 140, 0.28);
  background: none;
  border: none;
}

.pw-hud-glass p + p {
  opacity: 0.62;
}

.poss-stage-wrap .pf-hud-top {
  padding-top: 0;
  gap: 2px;
}

.poss-stage-wrap .pf-who,
.poss-stage-wrap .pf-chip,
.poss-stage-wrap .pf-bar,
.poss-stage-wrap .pf-who-eye {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
}

.poss-stage-wrap .pf-who-eye,
.poss-stage-wrap .pf-bar i,
.poss-stage-wrap .pf-chips {
  display: none;
}

.poss-stage-wrap .poss-go {
  z-index: 100001;
  bottom: 8vh;
}

.poss-stage-wrap.is-coast .pw-needle,
.poss-stage-wrap.is-coast .pw-sprite {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (prefers-reduced-motion: reduce) {
  .pw-sprite,
  .pw-dash,
  .pw-needle {
    transform: none;
    transition: none;
  }
}
