/* ===== Dwell-time timeline ===== */
.dwell {
  margin-top: 56px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.dwell-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.dwell-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.dwell-legend {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.dl { display: inline-flex; align-items: center; gap: 8px; }
.dl i {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dl-atk i { background: var(--attack); box-shadow: 0 0 8px var(--attack); }
.dl-def i { background: var(--defense); box-shadow: 0 0 8px var(--defense); }

.dwell-track {
  position: relative;
  height: 140px;
  margin: 8px 0 20px;
}
.dwell-axis {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.dwell-axis span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.dwell-axis span:first-child { transform: translateX(0); }
.dwell-axis span:last-child { transform: translateX(-100%); }

.dwell-bar {
  position: absolute;
  left: 0; right: 0;
  top: 54px;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(232, 93, 36, 0.5) 0%,
    rgba(232, 93, 36, 0.25) 45%,
    rgba(93, 191, 138, 0.2) 75%,
    rgba(93, 191, 138, 0.6) 100%);
  border-radius: 2px;
}
.dwell-bar::before,
.dwell-bar::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.dwell-bar::before {
  left: -2px;
  background: var(--attack);
  box-shadow: 0 0 10px var(--attack);
}
.dwell-bar::after {
  right: -2px;
  background: var(--defense);
  box-shadow: 0 0 10px var(--defense);
}

.dwell-marks {
  position: absolute;
  left: 0; right: 0;
  top: 28px;
  height: 90px;
}
.dm {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  animation: dmRise 0.6s cubic-bezier(.22,.7,.28,1) forwards;
}
.dm-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}
.dm-tick {
  width: 1px; height: 14px;
  background: currentColor;
  opacity: 0.5;
}
.dm-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  max-width: 120px;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
}
.dm.atk { color: var(--attack); top: 0; }
.dm.def { color: var(--defense); top: 56px; flex-direction: column-reverse; }
.dm.def .dm-tick { opacity: 0.35; }
.dm:hover .dm-num { background: currentColor; color: var(--bg); }

@keyframes dmRise {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.dwell-note {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-dim);
  font-variation-settings: "opsz" 96;
  font-style: italic;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.dwell-note em {
  color: var(--attack);
  font-style: italic;
}

@media (max-width: 640px) {
  .dwell-track { height: 180px; }
  .dm-label { display: none; }
}

/* ===== Scene break ===== */
.scene {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 15% 30%, rgba(232, 93, 36, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(93, 191, 138, 0.05) 0%, transparent 50%),
    var(--bg-deep);
}
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 241, 234, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 234, 0.025) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}
.scene-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  text-align: center;
}
.scene-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 48px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: rgba(14, 14, 16, 0.6);
  backdrop-filter: blur(8px);
}
.se-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--attack);
  box-shadow: 0 0 8px var(--attack);
  animation: pulse 2.2s ease-in-out infinite;
}
.se-sep { color: var(--line-strong); }

.scene-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 5.4vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
  margin-bottom: 40px;
}
.scene-quote em {
  font-style: italic;
  font-weight: 400;
  color: var(--attack);
  position: relative;
  display: inline-block;
}
.scene-quote em::after {
  content: "";
  position: absolute;
  left: 4%; right: 4%; bottom: 12%;
  height: 3px;
  background: var(--attack);
  opacity: 0.2;
}
.scene-foot {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .scene { padding: 100px 0; }
  .scene-eyebrow { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .se-sep { display: none; }
}

/* ===== Chain node hover preview ===== */
.phase-node {
  transition: transform 0.2s;
}
.phase-node:hover { transform: translateY(-3px); }
.phase-node .pn-tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-dim);
  width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.phase-node .pn-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 6px solid transparent;
  border-top-color: var(--line-strong);
}
.phase-node .pn-tip b {
  color: var(--attack);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  display: block;
  margin-bottom: 4px;
}
.phase-node:hover .pn-tip {
  opacity: 1;
  transform: translate(-50%, -8px);
}
@media (max-width: 800px) {
  .phase-node .pn-tip { display: none; }
}
