.timeline-view { position: fixed; inset: 0; z-index: 80; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; }
.timeline-view[hidden] { display: none; }
.timeline-header { flex: 0 0 auto; min-height: 82px; padding: max(14px, env(safe-area-inset-top)) 22px 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.timeline-header > .icon-button { justify-self: start; }
.timeline-header__title { text-align: center; }
.timeline-header__title h2 { margin: 2px 0 0; font-size: 20px; }
.timeline-tools { justify-self: end; display: flex; gap: 8px; }
.timeline-canvas { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; cursor: grab; background-image: radial-gradient(color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 1px); background-size: 28px 28px; touch-action: none; }
.timeline-canvas.is-dragging { cursor: grabbing; }
.timeline-world { position: absolute; top: 0; left: 0; width: 4200px; height: 100%; transform-origin: 0 0; will-change: transform; }
.timeline-line { position: absolute; top: 48%; left: 240px; right: 240px; height: 5px; background: var(--ink); border-radius: 999px; opacity: .88; }
.timeline-node { position: absolute; top: calc(48% - 17px); width: 34px; height: 34px; border-radius: 50%; border: 6px solid var(--bg); background: var(--ink); box-shadow: 0 0 0 2px var(--ink); cursor: pointer; transition: .18s ease; }
.timeline-node:hover, .timeline-node.is-selected { transform: scale(1.18); }
.timeline-node.is-adopted { background: var(--accent); box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px color-mix(in srgb, var(--accent) 20%, transparent); }
.timeline-node__label { position: absolute; top: 49px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--muted); font-size: 12px; pointer-events: none; }
.timeline-node__version { position: absolute; bottom: 49px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; pointer-events: none; }
.timeline-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); padding: 8px 13px; border-radius: 999px; color: var(--muted); font-size: 12px; pointer-events: none; }
.version-panel { position: absolute; z-index: 4; bottom: 26px; right: 26px; width: min(390px, calc(100% - 52px)); padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.version-panel h3 { margin: 0 0 5px; font-size: 23px; }
.version-panel p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.version-panel__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.version-panel__stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 10px; }
.version-panel__stats strong { display: block; }
.version-panel__stats span { color: var(--muted); font-size: 11px; }
.version-panel__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 11px 16px; font-weight: 700; font-size: 13px; transition: .24s ease; box-shadow: var(--shadow); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.import-choice:disabled { opacity: .55; cursor: progress; transform: none !important; }
@media (max-width: 920px) { .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .app-shell { padding: 0 16px 44px; }
  .app-header { height: 72px; }
  .brand span { display: none; }
  .brand img { width: 34px; height: 34px; }
  .header-actions .button span { display: none; }
  .header-actions .button { width: 44px; padding: 0; }
  .section-head { padding-top: 32px; }
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .import-grid { grid-template-columns: 1fr; }
  .import-choice { min-height: 108px; }
  .drop-zone { align-items: flex-start; flex-wrap: wrap; }
  .drop-zone span { width: 100%; margin-inline-start: 38px; }
  .sheet__panel { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .console-row { grid-template-columns: 58px 45px 1fr; gap: 6px; }
  .timeline-header { grid-template-columns: auto 1fr auto; padding-inline: 14px; }
  .timeline-header__title { text-align: right; min-width: 0; }
  .timeline-header__title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
  .timeline-hint { display: none; }
  .version-panel { right: 14px; bottom: 14px; width: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
