/* 群像时间线 · 可点草稿 */

:root {
  --paper: #f3eadc;
  --paper-2: #faf6ee;
  --paper-3: #efe4d0;
  --ink: #2b2218;
  --ink-soft: #5e5346;
  --ink-faint: #8a7d6c;
  --line: #e2d4be;
  --line-strong: #cbbca3;
  --accent: #c45a28;
  --accent-deep: #9a3e16;
  --accent-soft: #f0d3c0;
  --gold: #c49a4a;
  --ok: #4f6d45;
  --ok-soft: #e4eddc;
  --danger: #9a3b2a;
  --danger-soft: #f4e0d8;
  --shadow: 0 12px 40px rgba(60, 36, 16, 0.12);
  --shadow-sm: 0 2px 10px rgba(60, 36, 16, 0.08);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --radius: 16px;
  --header-h: 64px;
  --z-bar: 30;
  --z-modal: 180;
  --z-light: 200;
  --z-toast: 220;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% -10%, rgba(196, 90, 40, 0.07), transparent 48%),
    radial-gradient(ellipse at 100% 100%, rgba(180, 140, 70, 0.08), transparent 42%),
    var(--paper);
  min-height: 100dvh;
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { max-width: 100%; display: block; }
a { color: var(--accent-deep); }

#app { min-height: 100dvh; }

/* ---- cover ---- */
.cover {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 48px 24px 64px;
  position: relative;
  overflow: hidden;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.cover-inner {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
}
.cover-seal {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.02em;
  transform: rotate(-8deg);
  background: rgba(196, 90, 40, 0.06);
}
.cover h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 8.6vw, 56px);
  letter-spacing: 0.18em;
  margin: 0 0 12px 0.18em;
  line-height: 1;
}
.cover .subtitle {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.cover .meta {
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.12em;
  margin: 0 0 36px;
}
.cover-actions { display: grid; gap: 12px; }
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper-2);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #fffaf5; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger-soft); }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.cover-note {
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* ---- app shell ---- */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(64px + var(--safe-b));
}
@media (min-width: 880px) {
  .app { padding-bottom: 0; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--paper) 86%, white);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0 8px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.12em;
}
.brand small {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.top-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
@media (min-width: 880px) {
  .top-nav { display: flex; }
}
.nav-btn {
  background: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
}
.nav-btn:hover { background: var(--paper-3); color: var(--ink); }
.nav-btn.is-on {
  background: var(--ink);
  color: var(--paper-2);
}
.topbar-spacer { flex: 1; }
.role-chip, .icon-btn {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.role-chip:hover, .icon-btn:hover { border-color: var(--line-strong); }
.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  flex: none;
}
.avatar.lg { width: 40px; height: 40px; font-size: 16px; }
.draft-flag {
  display: none;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-right: 8px;
}
@media (min-width: 880px) {
  .draft-flag { display: inline; }
}

/* mobile tab bar */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-bar);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--paper-2) 90%, white);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
@media (min-width: 880px) {
  .tabbar { display: none; }
}
.tabbar button {
  background: none;
  border: 0;
  color: var(--ink-faint);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
}
.tabbar button.is-on { color: var(--accent-deep); }
.tabbar .glyph { font-size: 18px; line-height: 1; font-family: var(--serif); }

/* ---- pages ---- */
.page {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 20px 20px 48px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.crumb button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.crumb button:hover { color: var(--ink); }
.crumb .here {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.zoom-switch {
  display: flex;
  background: var(--paper-3);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--line);
}
.zoom-switch button {
  background: none;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
}
.zoom-switch button.is-on {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* years overview */
.year-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 720px) {
  .year-grid { grid-template-columns: 1fr 1fr; }
}
.year-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.year-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.year-card .mosaic {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 96px 96px;
  height: 192px;
  gap: 2px;
  background: var(--line);
}
.year-card .mosaic img:first-child { grid-row: 1 / span 2; }
.year-card .mosaic img, .year-card .mosaic .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper-3);
}
.year-card .body { padding: 16px 18px 18px; }
.year-card .yr {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: 0.06em;
  line-height: 1;
}
.year-card .count { color: var(--ink-faint); font-size: 13px; margin-top: 4px; }
.year-card .titles {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* month map */
.month-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .month-map { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
.month-cell {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: var(--ink);
}
.month-cell.has-events .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
.month-cell.has-events::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 18, 10, 0.62) 0%, rgba(28, 18, 10, 0.05) 55%);
}
.month-cell .lab {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 22px;
}
.month-cell.has-events .lab,
.month-cell.has-events .n { color: #faf6ee; }
.month-cell .n {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 1;
  font-size: 12px;
  color: var(--ink-faint);
}
.month-cell.empty .lab { color: var(--ink-faint); top: 12px; bottom: auto; }
.month-cell:hover { border-color: var(--line-strong); }
.month-cell.is-on { outline: 2px solid var(--accent); outline-offset: 2px; }

.year-events { margin-top: 28px; }

/* calendar */
.cal-wrap {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px 12px;
  margin-bottom: 24px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.cal-grid .wd {
  font-size: 11px;
  color: var(--ink-faint);
  padding: 4px 0 8px;
  letter-spacing: 0.08em;
}
.cal-wrap { width: 100%; }
.cal-grid { width: 100%; }
.cal-day {
  background: none;
  border: 0;
  border-radius: 8px;
  min-width: 0;
  height: 40px;
  padding: 0;
  color: var(--ink-soft);
  position: relative;
  font-size: 14px;
}
.cal-day:hover { background: var(--paper-3); }
.cal-day.empty { visibility: hidden; }
.cal-day.has::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
}
.cal-day.has { font-weight: 600; color: var(--ink); }
.cal-day.is-on {
  background: var(--ink);
  color: var(--paper-2);
}
.cal-day.is-on.has::after { background: var(--gold); }

/* event cards */
.event-list { display: flex; flex-direction: column; gap: 18px; }
.event-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
  padding: 0;
  color: inherit;
}
@media (min-width: 720px) {
  .event-card { grid-template-columns: 88px 1fr; gap: 22px; }
}
.event-date {
  text-align: center;
  padding-top: 4px;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}
.event-date .d {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  display: block;
}
.event-date .m {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.event-main {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
button.event-card:hover .event-main,
.event-card:focus-visible .event-main {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.event-main h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
}
.event-main p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.thumbs .cell {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1612;
}
.thumbs img, .thumbs video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbs .more {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 8, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-family: var(--serif);
}
.play-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(20, 14, 8, 0.7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
}
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, white);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
  background: var(--ok-soft);
}

/* event detail */
.detail {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 16px 20px 64px;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.detail .when {
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.detail h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 10px;
  line-height: 1.2;
}
.detail .story {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 0 0 22px;
  max-width: 42em;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .media-grid { grid-template-columns: 1fr 1fr; }
  .media-grid .span2 { grid-column: 1 / -1; }
}
.media-grid button, .media-grid .vid {
  padding: 0;
  border: 0;
  background: #1a1612;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.media-grid img, .media-grid video {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.nas-path {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.nas-path code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--ink);
  display: block;
  margin-top: 4px;
  word-break: break-all;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-light);
  background: #16110c;
  display: flex;
  flex-direction: column;
  color: #f6eee3;
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 8px;
}
.lightbox-bar button {
  background: rgba(255,255,255,0.08);
  border: 0;
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
}
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px 24px;
  min-height: 0;
}
.lightbox-stage img, .lightbox-stage video {
  max-height: calc(100dvh - 120px);
  max-width: min(100%, 1100px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.nav-arrow {
  background: rgba(255,255,255,0.08);
  border: 0;
  color: inherit;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  font-size: 20px;
}
@media (max-width: 639px) {
  .nav-arrow { display: none; }
}

/* compose / panels */
.panel-page {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 20px 20px 80px;
}
.panel-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 8px;
}
.lede { color: var(--ink-soft); margin: 0 0 22px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="date"],
.field textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.file-drop {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper-2);
  padding: 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.file-drop input { margin-top: 10px; }
.preview-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.preview-row .cell {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1612;
  position: relative;
}
.preview-row img, .preview-row video {
  width: 100%; height: 100%; object-fit: cover;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* upload pipeline */
.pipeline {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.pipeline ol { list-style: none; margin: 0; padding: 0; }
.pipeline li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 0;
  color: var(--ink-faint);
  align-items: start;
}
.pipeline li .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  margin-top: 2px;
}
.pipeline li.is-on { color: var(--ink); }
.pipeline li.is-on .dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.pipeline li.is-done { color: var(--ok); }
.pipeline li.is-done .dot {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}
.pipeline .done-msg {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* members */
.member-list { display: flex; flex-direction: column; gap: 8px; }
.member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.member .who { flex: 1; min-width: 0; }
.member .who strong { display: block; font-weight: 600; }
.member .who span { font-size: 12px; color: var(--ink-faint); }
.role-tag {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.invite-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 20px;
}
.invite-link {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.invite-link input {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--paper);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}

/* library */
.lib-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.lib-path button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.folder, .lib-file {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  min-height: 88px;
}
.folder .ico, .lib-file .ico {
  font-size: 22px;
  margin-bottom: 8px;
  font-family: var(--serif);
  color: var(--accent-deep);
}
.folder strong, .lib-file strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}
.folder em, .lib-file em {
  font-style: normal;
  color: var(--ink-faint);
  font-size: 12px;
}
.lib-file { padding: 0 0 10px; overflow: hidden; }
.lib-file img, .lib-file video {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 8px;
}
.lib-file strong, .lib-file em { padding: 0 10px; }

/* dialogs */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 12, 0.45);
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  background: var(--paper-2);
  border-radius: 16px;
  padding: 22px 20px 18px;
  width: min(400px, 100%);
  box-shadow: var(--shadow);
}
.modal h3 { font-family: var(--serif); margin: 0 0 8px; font-weight: 500; }
.modal p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.modal .form-actions { margin-top: 0; }

.toast {
  pointer-events: none;
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper-2);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: var(--z-toast);
  box-shadow: var(--shadow);
  animation: up 0.25s ease;
}
@media (min-width: 880px) {
  .toast { bottom: 28px; }
}
@keyframes up {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-faint);
}
.empty p { margin: 0 0 12px; }

.hint {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 8px;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-drop .pick { margin-top: 10px; }
.lightbox-bar {
  background: #16110c;
  position: relative;
  z-index: 1;
}

#day-events { scroll-margin-top: calc(var(--header-h) + 12px); }
@media (max-width: 879px) {
  .page-head { align-items: flex-start; }
  .cal-day { height: 42px; }
}

/* ===== 事件标记时间线 ===== */
.marker-line {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.marker-line::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent-soft), var(--line-strong) 20%, var(--line-strong) 80%, var(--accent-soft));
  border-radius: 2px;
}
.marker { position: relative; }
.marker-pin {
  position: absolute;
  left: -22px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.marker-date { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.marker-date .d { font-family: var(--serif); font-size: 20px; }
.marker-date .y { font-size: 12px; color: var(--ink-faint); letter-spacing: .04em; }
.marker-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.marker-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
@media (min-width: 720px) { .marker-card { grid-template-columns: 220px 1fr; gap: 20px; padding: 12px; } }
.marker-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1612;
}
.marker-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-tag {
  position: absolute;
  left: 6px; top: 6px;
  font-size: 10px;
  letter-spacing: .1em;
  color: #fffaf3;
  background: rgba(154, 62, 22, .85);
  padding: 1px 6px;
  border-radius: 3px;
}
.marker-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.marker-body strong { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.3; }
.marker-text {
  font-size: 13px; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 719px) { .marker-text { display: none; } .marker-body strong { font-size: 17px; } }
.marker-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mchip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--paper);
}
.mchip-video { color: #3f5a78; border-color: #c6d3e0; }
.mchip-gif { color: var(--accent-deep); border-color: var(--accent-soft); }
.mchip-sticker { color: #8a6a12; border-color: #ecdca8; background: #fbf4dc; }

/* ===== 封面背景详情 ===== */
.cover-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.cover-img {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  filter: blur(28px) saturate(1.1);
  transform: scale(1.08);
  animation: fadein .45s ease;
}
.cover-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,13,8,.55) 0%, rgba(20,13,8,.72) 45%, rgba(20,13,8,.86) 100%);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.detail.on-cover { position: relative; z-index: 1; color: #f6eee3; }
.detail.on-cover .when { color: rgba(246,238,227,.75); }
.detail.on-cover .story { color: rgba(246,238,227,.9); }
.detail.on-cover .event-meta { color: rgba(246,238,227,.85); }
.detail.on-cover .mchip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #f6eee3; }
.crumb-light, .crumb-light button { color: rgba(246,238,227,.75) !important; text-decoration-color: rgba(246,238,227,.35) !important; }
.crumb-light { margin-bottom: 14px; font-size: 13px; }
.btn-glass { background: rgba(255,255,255,.12); color: #f6eee3; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.2); }
.btn-danger.on-dark { color: #ffd9cc; border-color: rgba(255,190,170,.6); }
.btn-danger.on-dark:hover { background: rgba(154,59,42,.35); }
.hero { display: flex; gap: 18px; align-items: flex-end; margin-bottom: 16px; }
.hero-cover {
  width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transform: rotate(-2deg); flex: none;
}
@media (max-width: 639px) { .hero-cover { width: 84px; } }
.detail.on-cover h2 { color: #fffaf3; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.nas-path.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: rgba(246,238,227,.85); }
.nas-path.glass code { color: #fff; }
.app:has(.cover-backdrop) .topbar { background: rgba(28,18,12,.55); border-bottom-color: rgba(255,255,255,.1); }
.app:has(.cover-backdrop) .topbar .brand,
.app:has(.cover-backdrop) .topbar .nav-btn { color: #f6eee3; }
.app:has(.cover-backdrop) .topbar .nav-btn.is-on { background: #f6eee3; color: var(--ink); }
.app:has(.cover-backdrop) .draft-flag { color: rgba(246,238,227,.6); }

/* 混合素材网格 */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; grid-auto-flow: dense; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
.tile {
  position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  aspect-ratio: 1; background: rgba(0,0,0,.35);
  transition: transform .15s ease;
}
.tile:hover { transform: scale(1.015); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile-sticker {
  background: rgba(255,255,255,.1);
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 14px 14px;
}
.tile-sticker img { object-fit: contain; padding: 12%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.tile-badge {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 11px; letter-spacing: .06em; color: #fff;
  background: rgba(20,14,8,.72); padding: 2px 7px; border-radius: 999px;
}
.lightbox-stage img.lb-sticker { max-width: min(70vw, 420px); filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }

/* 上传：选封面 */
.sticker-toggle { display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; font-size: 13px; color: var(--ink-soft); }
.pick-cell { padding: 0; border: 2px solid transparent; cursor: pointer; }
.pick-cell.is-cover { border-color: var(--accent); }
.cell-sticker { background: var(--paper-3) !important; }
.cell-sticker img { object-fit: contain !important; padding: 8%; }
.cover-pick { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cover-preview {
  position: relative; width: 160px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  background: var(--paper-3); border: 1px dashed var(--line-strong);
  display: grid; place-items: center; color: var(--ink-faint); font-size: 12px;
}
.cover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-sticker img { object-fit: contain; background: var(--paper-3); padding: 10%; }

/* ===== 横向时间轴（剪辑轨道） ===== */
.track-page { width: 100%; padding: 14px 0 28px; }
.track-head {
  width: min(1240px, 100%); margin: 0 auto; padding: 0 16px 12px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
}
.track-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.track-title .here { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.track-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zoom-ctl {
  display: flex; align-items: center; gap: 6px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px;
}
.zoom-ctl button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--paper); font-size: 18px; line-height: 1; padding: 0;
}
.zoom-ctl button:hover { background: var(--accent-soft); }
.zoom-ctl input[type="range"] { width: 150px; accent-color: var(--accent); }
.lvl {
  font-size: 12px; color: var(--accent-deep); background: var(--accent-soft);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.jump { display: inline-flex; gap: 4px; align-items: center; }
.jump select {
  border: 1px solid var(--line-strong); background: var(--paper-2); border-radius: 999px;
  padding: 6px 8px; font-size: 13px;
}
.track-vp {
  --ruler-h: 54px; --lane-h: 172px;
  position: relative;
  height: calc(var(--ruler-h) + 22px + var(--lane-h) * 2.6);
  margin: 0 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%),
    #2a2019;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), var(--shadow);
  overflow: hidden;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  cursor: grab;
  outline: none;
}
.track-vp:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.track-vp.dragging { cursor: grabbing; }
.track-vp img { -webkit-user-drag: none; pointer-events: none; }
@media (max-width: 719px) {
  .track-vp { --ruler-h: 58px; --lane-h: 140px; margin: 0 8px; height: calc(var(--ruler-h) + 22px + var(--lane-h) * 2.55); }
  .track-head { padding: 0 12px 10px; }
  .zoom-ctl input[type="range"] { width: 110px; }
}
.tk-ruler {
  position: absolute; left: 0; right: 0; top: 0; height: var(--ruler-h);
  background: #1d1611; border-bottom: 1px solid rgba(255, 220, 190, .22);
  color: #eadfcd; z-index: 2; overflow: hidden;
}
.r-top, .r-bot { position: absolute; left: 0; right: 0; }
.r-top { top: 0; height: 26px; }
.r-bot { bottom: 0; height: 28px; }
.r-major { position: absolute; top: 0; height: var(--ruler-h); border-left: 1px solid rgba(255, 230, 200, .55); }
.r-mlab {
  position: absolute; top: 5px; font-family: var(--serif); font-size: 14px; color: #fff6ea;
  white-space: nowrap; letter-spacing: .04em;
}
.r-tick { position: absolute; bottom: 0; height: 8px; border-left: 1px solid rgba(255, 230, 200, .35); }
.r-tick.long { height: 15px; border-left-color: rgba(255, 230, 200, .6); }
.r-lab {
  position: absolute; bottom: 12px; font-size: 11px; color: rgba(246, 238, 227, .75);
  white-space: nowrap; transform: translateX(-50%); font-variant-numeric: tabular-nums;
}
.r-lab.wk { color: #ffb48a; }
.tk-grid { position: absolute; left: 0; right: 0; top: var(--ruler-h); bottom: 0; overflow: hidden; }
.g-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(255, 255, 255, .06); }
.g-line.strong { border-left-color: rgba(255, 220, 190, .16); }
.g-wk { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .035); }
.tk-items { position: absolute; inset: 0; z-index: 1; }
.t-item { position: absolute; left: 0; top: 0; will-change: transform; }
.t-stem {
  position: absolute; left: var(--sx); top: calc(-1 * var(--sh)); height: var(--sh);
  width: 2px; margin-left: -1px; background: linear-gradient(#ff8f5a, rgba(255, 143, 90, .4));
}
.t-dot {
  position: absolute; left: var(--sx); top: calc(-1 * var(--sh) - 6px);
  width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: #ff7a45; border: 2px solid #fff3e6; box-shadow: 0 0 0 3px rgba(255, 122, 69, .25);
}
.t-marker {
  display: block; width: 100%; padding: 6px; border: 0; border-radius: 12px; text-align: left;
  background: var(--paper-2); color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
.t-marker:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(0, 0, 0, .45); }
.t-cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #111; }
.t-cover img { width: 100%; height: 100%; object-fit: cover; }
.t-title {
  display: block; margin: 6px 2px 0; font-family: var(--serif); font-weight: 500;
  font-size: 16px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-meta { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--ink-faint); margin: 0 2px; white-space: nowrap; overflow: hidden; }
.t-meta .avatar { width: 16px; height: 16px; font-size: 9px; }
@media (max-width: 719px) { .t-title { font-size: 13px; } .t-meta span:last-child { display: none; } }
.t-cluster {
  position: relative; display: block; width: 100%; height: 132px; padding: 8px 10px;
  text-align: left; color: #f6eee3; overflow: hidden;
  background: linear-gradient(180deg, rgba(196, 90, 40, .42), rgba(196, 90, 40, .22));
  border: 1px solid rgba(255, 180, 130, .55); border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .3);
}
.t-cluster:hover { background: linear-gradient(180deg, rgba(196, 90, 40, .55), rgba(196, 90, 40, .3)); }
.t-stack { position: relative; display: block; width: 96px; height: 66px; }
.t-stack img {
  position: absolute; width: 78px; height: 54px; object-fit: cover; border-radius: 6px;
  border: 2px solid #fff3e6; box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
.t-stack img:nth-child(1) { left: 0; top: 10px; transform: rotate(-7deg); z-index: 3; }
.t-stack img:nth-child(2) { left: 10px; top: 4px; transform: rotate(4deg); z-index: 2; }
.t-stack img:nth-child(3) { left: 18px; top: 0; transform: rotate(10deg); z-index: 1; }
.c-lab { display: block; margin-top: 6px; font-size: 14px; white-space: nowrap; }
.c-lab b { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.c-sub { display: block; font-size: 11px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-playhead {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 3; pointer-events: none;
  border-left: 2px solid #ff5a36;
}
.tk-playhead span {
  position: absolute; top: 2px; left: 3px; font-size: 10px; color: #fff; background: #ff5a36;
  padding: 0 5px; border-radius: 3px; white-space: nowrap;
}
.track-help { width: min(1240px, 100%); margin: 10px auto 0; padding: 0 16px; }

/* ===== Live 图 ===== */
.live-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #fff;
  background: rgba(20, 14, 8, .62); border: 1px solid rgba(255, 255, 255, .55);
  padding: 1px 7px 1px 18px; border-radius: 999px;
}
.live-badge::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 7px; height: 7px; margin-top: -4.5px;
  border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}
.tile-live, .lb-live { position: relative; -webkit-touch-callout: none; user-select: none; }
.tile-live .live-video, .lb-live .live-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease;
}
.tile-live.is-playing .live-video, .lb-live.is-playing .live-video { opacity: 1; }
.is-playing .live-badge { background: #ff5a36; border-color: #ff5a36; }
.lb-live { display: inline-block; max-width: min(100%, 1100px); }
.lb-live img { max-height: calc(100dvh - 120px); max-width: 100%; display: block; border-radius: 4px; }
.lb-live .live-video { object-fit: contain; }
.live-btn { cursor: pointer; top: 12px; left: 12px; font-size: 12px; padding: 4px 12px 4px 22px; }
.live-btn::before { left: 8px; }
.lib-live { position: relative; }
.mchip-live { color: #2f5e6e; border-color: #bcd8df; background: #e8f3f5; }
#c-kind { border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 6px; background: var(--paper); font-size: 13px; }
.pick-cell { position: relative; }
.lib-file { position: relative; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.lib-file .play-badge { top: 8px; bottom: auto; }

/* ===== v3：刻度尺在底部、上方大面积标记、动态背景 ===== */
.track-page { position: relative; }
.track-page > *:not(.tk-bg) { position: relative; z-index: 1; }
.tk-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-layer {
  position: absolute; inset: -48px;
  background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0; transition: opacity .4s ease;
}
.bg-layer.show { opacity: 1; }
.bg-shade {
  position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease;
  background: linear-gradient(180deg, rgba(20,13,8,.62) 0%, rgba(20,13,8,.5) 40%, rgba(20,13,8,.78) 100%);
}
.track-page.bg-on .bg-shade { opacity: 1; }
.track-page.bg-on .track-title .here { color: #fff8ee; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.track-page.bg-on .track-title .hint,
.track-page.bg-on .track-help { color: rgba(246,238,227,.78); }
.app:has(.track-page.bg-on) .topbar { background: rgba(28,18,12,.5); border-bottom-color: rgba(255,255,255,.1); }
.app:has(.track-page.bg-on) .topbar .brand,
.app:has(.track-page.bg-on) .topbar .nav-btn { color: #f6eee3; }
.app:has(.track-page.bg-on) .topbar .nav-btn.is-on { background: #f6eee3; color: var(--ink); }
.app:has(.track-page.bg-on) .draft-flag { color: rgba(246,238,227,.6); }

.track-vp {
  --ruler-h: 60px;
  height: max(420px, calc(100dvh - 200px));
  background: rgba(34, 25, 18, .86);
  transition: background .4s ease;
}
.track-page.bg-on .track-vp {
  background: linear-gradient(180deg, rgba(12,8,5,.08), rgba(12,8,5,.32));
  box-shadow: inset 0 0 0 1px rgba(255,235,210,.16), 0 20px 50px rgba(0,0,0,.25);
}
@media (max-width: 719px) {
  .track-vp { --ruler-h: 60px; height: max(380px, calc(100dvh - 330px)); }
}
/* 刻度尺移到底部，刻度线从上沿往下 */
.tk-ruler { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid rgba(255, 220, 190, .3); background: rgba(22, 16, 11, .9); }
.r-bot { top: 0; bottom: auto; height: 30px; }
.r-top { top: auto; bottom: 0; height: 28px; }
.r-tick { top: 0; bottom: auto; }
.r-lab { top: 14px; bottom: auto; }
.r-mlab { top: auto; bottom: 6px; }
.tk-grid { top: 0; bottom: var(--ruler-h); }
/* 卡片在上方，竖线向下连到刻度尺 */
.t-stem { top: 100%; height: var(--sh); background: linear-gradient(rgba(255,143,90,.45), #ff8f5a); }
.t-dot { top: calc(100% + var(--sh) - 6px); }
.t-item > button { height: 100%; }
.t-marker { display: flex; flex-direction: column; padding: 7px; }
.t-cover { flex: 1; min-height: 0; }
.t-title { font-size: 16px; margin-top: 8px; }
.t-meta { margin-top: 2px; }
.t-date {
  display: block; margin: 2px 2px 0; font-weight: 400;
  font-size: 12px; line-height: 1.2; letter-spacing: .02em; color: var(--ink-faint);
}
.t-marker.has-cover .t-title { color: var(--ink); }
.t-marker.has-cover .t-date { color: var(--ink-faint); }
.t-marker.is-text { justify-content: center; align-items: center; text-align: center; background: var(--paper-2); }
.t-marker.is-text .t-title { margin: 0; font-size: 18px; }
.t-marker.is-text .t-date { margin-top: 2px; font-size: 11px; }
.track-page.bg-on .t-marker.is-text { background: rgba(250, 244, 232, .94); }
.tile-wrap { position: relative; min-width: 0; }
.tile-wrap .tile { width: 100%; }
.tile-wrap.tile-big, .tile-wrap:has(.tile-big) { grid-column: span 2; grid-row: span 2; }
.tile-head { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.tile-cover-action {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  color: #fff6ea; background: rgba(20, 14, 8, .82);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile-wrap:hover .tile-cover-action,
  .tile-wrap:focus-within .tile-cover-action { opacity: 1; pointer-events: auto; }
}
.tile-wrap.show-cover-action .tile-cover-action,
.tile-grid.is-editing-cover .tile-cover-action { opacity: 1; pointer-events: auto; }
.tile-grid.is-editing-cover .tile-wrap:not(.is-cover) { cursor: pointer; outline: 2px solid transparent; }
.tile-grid.is-editing-cover .tile-wrap:not(.is-cover):hover { outline-color: rgba(255, 180, 130, .7); }
.detail .tile-wrap .cover-tag { position: absolute; left: 8px; top: 8px; z-index: 2; pointer-events: none; }
.tile-wrap.is-cover .tile { box-shadow: inset 0 0 0 2px rgba(255, 180, 130, .85); }
.tile-pin-action {
  position: absolute; right: 8px; bottom: 44px; z-index: 3;
  border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  color: #fff6ea; background: rgba(20, 14, 8, .82);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.tile-wrap.is-cover .tile-pin-action { bottom: 8px; }
@media (hover: hover) and (pointer: fine) {
  .tile-wrap:hover .tile-pin-action,
  .tile-wrap:focus-within .tile-pin-action { opacity: 1; pointer-events: auto; }
}
.tile-wrap.show-cover-action .tile-pin-action,
.tile-grid.is-editing-cover .tile-pin-action { opacity: 1; pointer-events: auto; }
.tile-wrap.is-pinned {
  border-radius: 8px;
  box-shadow: 0 0 0 1.5px rgba(250, 244, 232, 0.38);
}
.t-cluster { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; }
.t-stack { width: 100%; flex: 1; min-height: 0; height: auto; }
.t-stack img { width: 72%; height: auto; aspect-ratio: 16 / 10; max-height: 80%; }
.c-first { display: block; font-size: 10px; opacity: .7; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-item.is-current .t-marker,
.t-item.is-current .t-cluster { outline: 3px solid #ff8f5a; outline-offset: 2px; }
.t-item.is-current .t-dot { transform: scale(1.35); background: #ffd2b8; }
/* 跟随光标的竖线（播放头） */
.tk-cursor {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 4; pointer-events: none;
  border-left: 2px solid rgba(255, 246, 234, .95);
  box-shadow: 0 0 12px rgba(255, 220, 180, .6);
}
.tk-cursor.is-center { border-left-style: solid; }
.cur-chip {
  position: absolute; top: 10px; left: 8px; white-space: nowrap;
  font-size: 12px; color: var(--ink); background: #fff6ea; border-radius: 999px; padding: 3px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); max-width: 320px; overflow: hidden; text-overflow: ellipsis;
}
.cur-chip.flip { left: auto; right: 8px; }
@media (max-width: 719px) { .cur-chip { max-width: 180px; font-size: 11px; } }
.tk-today { position: absolute; left: 0; top: 0; bottom: var(--ruler-h); width: 0; z-index: 3; pointer-events: none; border-left: 1px dashed #ff5a36; }
.tk-today span { position: absolute; bottom: 4px; left: 3px; font-size: 10px; color: #fff; background: #ff5a36; padding: 0 5px; border-radius: 3px; }
.track-page.bg-on .track-head .btn-ghost,
.track-page.bg-on .track-head .quiet-btn {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  color: #f6eee3;
}
.tk-cursor.is-center .cur-chip { left: 0; right: auto; transform: translateX(-50%); }

/* ===== v4：自适应刻度与固定年/月角标 ===== */
.tk-context {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 6;
  pointer-events: none;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #fff8ee;
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
  background: rgba(22, 16, 11, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 246, 234, .2);
  border-radius: 10px;
  padding: 5px 12px 6px;
  white-space: nowrap;
}
@media (max-width: 719px) {
  .tk-context { font-size: 18px; left: 8px; top: 8px; padding: 4px 10px 5px; }
}
.tk-ruler.days-only .r-top { display: none; }
.tk-ruler.days-only .r-bot { height: 100%; }
.tk-ruler.days-only .r-lab { bottom: 16px; font-size: 12px; }
.cur-chip.under-ctx { top: 46px; }
@media (max-width: 719px) { .cur-chip.under-ctx { top: 42px; } }
@media (max-width: 719px) { .tk-cursor.is-center .cur-chip { top: 46px; transform: translateX(-50%); } }

/* ===== v5：组 / 项目入口、更强的年与月分界 ===== */
.hub-page .lede { max-width: 46em; }
.hub-card .yr { font-size: 30px; }
.hub-create { margin: 22px 0 8px; max-width: 520px; }
.hub-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.hub-form input, .hub-form select, .field select {
  border: 1px solid var(--line-strong); background: var(--paper-2); border-radius: 999px;
  padding: 8px 12px; font-size: 14px; min-width: 180px;
}
.field-row { display: grid; gap: 12px; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } }

.crumb-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.crumb-btn {
  background: none; border: 0; padding: 0; font-family: var(--serif); font-size: 22px;
  color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong);
}
.crumb-btn:hover { color: var(--ink); }
.track-title .sep { color: var(--ink-faint); font-size: 22px; }
.track-page.bg-on .crumb-btn,
.track-page.bg-on .track-title .sep { color: rgba(255, 248, 238, .82); text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.track-page.bg-on .crumb-btn { text-decoration-color: rgba(255,248,238,.35); }

/* 年分界最强：粗亮竖线贯穿轨道和刻度；月分界次强 */
.tk-grid { overflow: visible; }
.g-line.g-year {
  top: 0;
  bottom: calc(-1 * var(--ruler-h));
  border-left: 4px solid #ffe7b8;
  box-shadow: 0 0 18px 2px rgba(255, 210, 140, .6);
  z-index: 2;
  pointer-events: none;
}
.g-line.g-month {
  top: 0;
  bottom: calc(-1 * var(--ruler-h));
  border-left: 2px solid rgba(255, 224, 190, .72);
  z-index: 1;
  pointer-events: none;
}
.r-major.r-year {
  border-left: 4px solid #ffe9c0;
  z-index: 3;
}
.r-major.r-month {
  border-left: 2px solid rgba(255, 226, 190, .85);
}
.r-mlab.r-yearlab {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff8e8;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
  background: rgba(20, 14, 10, .45);
  border-radius: 6px;
  padding: 2px 8px 3px;
}
.r-mlab.r-monthlab {
  font-size: 15px;
  color: #fff6ea;
  padding: 1px 6px 2px;
  background: rgba(20, 14, 10, .35);
  border-radius: 5px;
}
.r-tick.year-tick { height: 20px; border-left-width: 2px; border-left-color: rgba(255, 230, 200, .95); }

@media (max-width: 719px) {
  .year-card .mosaic { grid-template-rows: 70px 70px; height: 140px; }
  .hub-card .yr { font-size: 26px; }
}

/* ===== v6：组 / 项目入口改为圈子列表，去掉相册墙 ===== */
.hub-page { width: min(760px, 100%); }
.hub-page .page-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 16px;
}
.hub-page .lede {
  max-width: none;
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.hub-list { display: flex; flex-direction: column; gap: 8px; }
.hub-item { position: relative; display: flex; flex-direction: column; gap: 8px; }
.hub-item .hub-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}
.group-edit-form { flex-direction: column; align-items: stretch; max-width: 520px; }
.group-edit-form .field { width: 100%; }
.group-edit-box { margin: 0; }
.hub-item .group-edit-box { margin-top: 0; }
.hub-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.hub-item .hub-row { padding-right: 72px; }
.hub-row:hover {
  border-color: var(--line-strong);
  background: var(--paper);
}
.hub-row.is-all { background: transparent; }
.hub-row.is-all:hover { background: var(--paper-2); }
.hub-mark {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  margin-top: 1px;
}
.hub-main { flex: 1; min-width: 0; }
.hub-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.hub-name {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}
.hub-meta { font-size: 13px; color: var(--ink-faint); white-space: nowrap; }
.hub-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.hub-people {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.hub-people .avatars { display: flex; align-items: center; }
.hub-people .avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
  margin-right: -7px;
  border: 2px solid var(--paper-2);
  box-sizing: content-box;
}
.hub-people .avatar:last-child { margin-right: 0; }
.hub-row.is-all .hub-people .avatar { border-color: var(--paper); }
.hub-people .names {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
@media (max-width: 719px) {
  .hub-row { padding: 12px 12px; gap: 10px; }
  .hub-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  .hub-name { font-size: 22px; }
  .hub-people .names { font-size: 13px; }
}

/* ===== v7：时间线上的项目切换；手机竖向时间线 ===== */
.proj-switch {
  width: min(1240px, 100%);
  margin: 0 auto 10px;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.proj-chip {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}
.proj-chip.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.proj-chip.proj-new-btn { border-style: dashed; color: var(--ink-soft); }
.proj-chip.is-fresh {
  box-shadow: 0 0 0 2px var(--accent);
  animation: chip-fresh 1.2s ease 3;
}
@keyframes chip-fresh {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent); }
  50% { box-shadow: 0 0 0 5px var(--accent-soft); }
}
.tk-empty {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(42, 32, 25, .28), rgba(42, 32, 25, .55));
}
.tk-empty-card {
  pointer-events: auto;
  max-width: 380px;
  background: rgba(250, 246, 238, .96);
  color: var(--ink);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
}
.tk-empty-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 8px;
}
.tk-empty-hint {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
.proj-new-form,
.hub-form.new-project-form {
  width: min(520px, 100%);
  margin: -4px auto 10px 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.hub-form.new-project-form { margin: 8px 0 0; }
.proj-new-form[hidden] { display: none !important; }
.proj-new-form .field,
.hub-form.new-project-form .field { margin-bottom: 8px; width: 100%; }
.proj-new-form input[type="text"],
.proj-new-form input[type="date"],
.proj-new-form input[name="name"],
.hub-form.new-project-form input[type="text"],
.hub-form.new-project-form input[type="date"],
.hub-form.new-project-form input[name="name"] {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 0;
  width: 100%;
}
.proj-new-hint,
.proj-new-files-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: normal;
  line-height: 1.5;
}
.detail-add {
  margin: 8px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.detail-add .hint { margin: 0; color: rgba(246,238,227,.75); }
.detail.on-cover .detail-add .hint { color: rgba(246,238,227,.75); }
.track-page.bg-on .proj-chip {
  background: rgba(250, 246, 238, .9);
  border-color: transparent;
  color: var(--ink);
}
.track-page.bg-on .proj-chip.is-on { background: #1c120c; color: #fff8ee; }
@media (max-width: 719px) {
  .proj-switch { padding: 0 12px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .proj-chip { flex: none; }
}

.vt-world { position: absolute; inset: 0; }
.track-vp.is-vert {
  overflow: hidden;
  touch-action: pan-y;
  cursor: default;
  height: max(420px, calc(100dvh - 300px));
}
.track-vp.is-vert .vt-world {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.track-vp.is-vert .vt-strut { width: 1px; pointer-events: none; }
.track-vp.is-vert .tk-ruler { display: none; }
.track-vp.is-vert .tk-grid,
.track-vp.is-vert .tk-items { top: 0; bottom: 0; left: 0; right: 0; overflow: visible; }
.track-vp.is-vert .tk-cursor {
  left: 0; right: 0; width: auto; height: 0;
  top: 136px; bottom: auto;
  border-left: 0;
  border-top: 2px solid rgba(255, 246, 234, .95);
  box-shadow: 0 0 12px rgba(255, 220, 180, .6);
  transform: none !important;
  z-index: 5;
}
.track-vp.is-vert .cur-chip {
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  max-width: 70%;
}
.track-vp.is-vert .tk-today {
  left: 0; right: 0; width: auto; height: 0;
  top: 0; bottom: auto;
  border-left: 0;
  border-top: 1px dashed #ff5a36;
  z-index: 3;
}
.track-vp.is-vert .tk-today span {
  left: 10px; top: -9px; bottom: auto;
}
.track-vp.is-vert .t-stem {
  top: 50%;
  height: 2px;
  width: var(--sh);
  margin: 0;
  background: #ff8f5a;
}
.track-vp.is-vert .t-dot {
  top: 50%;
  width: 12px;
  height: 12px;
  margin: 0;
}
.track-vp.is-vert .t-item.is-left .t-stem { left: 100%; right: auto; }
.track-vp.is-vert .t-item.is-left .t-dot { left: calc(100% + var(--sh)); transform: translate(-50%, -50%); }
.track-vp.is-vert .t-item.is-right .t-stem { left: auto; right: 100%; }
.track-vp.is-vert .t-item.is-right .t-dot { left: auto; right: calc(100% + var(--sh)); transform: translate(50%, -50%); }
.track-vp.is-vert .t-item.is-current .t-dot { transform: translate(-50%, -50%) scale(1.35); }
.track-vp.is-vert .t-item.is-right.is-current .t-dot { transform: translate(50%, -50%) scale(1.35); }

.vt-spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 0;
  border-left: 2px solid rgba(255, 226, 190, .55);
  z-index: 0;
}
.vt-year-line {
  position: absolute; left: 6%; right: 6%; height: 0; z-index: 2;
  border-top: 3px solid #ffe7b8;
  box-shadow: 0 0 12px rgba(255, 210, 140, .55);
}
.vt-year-lab {
  position: absolute; left: 50%; z-index: 3;
  transform: translate(-50%, -120%);
  font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .04em;
  color: #fff8e8; background: rgba(20, 14, 10, .5);
  padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.vt-month-line {
  position: absolute; left: 28%; right: 28%; height: 0; z-index: 1;
  border-top: 2px solid rgba(255, 224, 190, .7);
}
.vt-month-lab {
  position: absolute; left: 50%; z-index: 2;
  transform: translate(-50%, -110%);
  font-size: 12px; color: #fff6ea;
  background: rgba(20, 14, 10, .4);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.vt-day-tick {
  position: absolute; left: 50%; width: 8px; margin-left: -4px; height: 0;
  border-top: 1px solid rgba(255, 230, 200, .4);
}
.vt-day-tick.long { width: 14px; margin-left: -7px; }
.vt-day-lab {
  position: absolute; left: 50%;
  transform: translate(-50%, 3px);
  font-size: 9px; color: rgba(246, 238, 227, .72);
  white-space: nowrap; pointer-events: none;
}
.vt-day-lab.wk { color: #ffb48a; }
.track-vp.is-vert .tk-context { left: 10px; top: 8px; }
@media (max-width: 719px) {
  .track-page.bg-on .track-help { padding: 0 12px; }
}


/* ===== v8：手机顶部收紧，把空间让给竖向时间线 ===== */
@media (min-width: 720px) {
  .track-chrome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title tools"
      "switch switch"
      "form form";
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 0 16px 12px;
  }
  .track-head {
    grid-area: title;
    width: auto;
    margin: 0;
    padding: 0;
  }
  .track-tools {
    grid-area: tools;
    position: static;
    display: flex;
    width: auto;
  }
  .proj-switch {
    grid-area: switch;
    width: auto;
    margin: 0;
    padding: 0;
  }
  .proj-new-form {
    grid-area: form;
    width: auto;
    margin: 4px 0 0;
    padding: 0;
  }
  .track-page.bg-on .track-tools .btn-ghost,
  .track-page.bg-on .track-tools .quiet-btn {
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #f6eee3;
  }
  .track-page.bg-on .track-tools .btn-ghost:hover,
  .track-page.bg-on .track-tools .quiet-btn:hover,
  .track-page.bg-on .track-head .btn-ghost:hover,
  .track-page.bg-on .track-head .quiet-btn:hover {
    background: transparent;
    color: #fff8ee;
    box-shadow: 0 1px 0 currentColor;
  }
  .track-page.bg-on .jump select,
  .track-page.bg-on .zoom-ctl,
  .track-page.bg-on .zoom-ctl button,
  .track-page.bg-on .lvl {
    background: transparent;
    color: #f6eee3;
    border-color: rgba(246, 238, 227, 0.35);
  }
  .track-page.bg-on .zoom-ctl button:hover {
    background: transparent;
    color: #fff8ee;
  }
}
.track-more-btn { display: none; }
.crumb-back { display: none; }
.tk-flash-lvl {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%) translateY(-6px);
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 12px;
  color: #fff6ea;
  background: rgba(20, 14, 10, .62);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tk-flash-lvl.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 719px) {
  :root { --header-h: 48px; }
  .topbar { padding: 0 12px; }
  .brand { font-size: 18px; letter-spacing: 0.1em; }
  .brand small { display: none; }
  .role-chip { padding: 4px 8px; font-size: 12px; }
  .avatar { width: 20px; height: 20px; }

  .app:has(.track-page) {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .track-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 2px 0 6px;
    overflow: visible;
  }
  .track-page { isolation: isolate; }
  .track-page > .track-chrome {
    position: relative;
    z-index: 40;
    flex: none;
  }
  .track-page > .track-vp { z-index: 1; }
  .track-head {
    position: relative;
    width: 100%;
    padding: 2px 10px 0;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .track-title { flex: 1; min-width: 0; gap: 0; }
  .crumb-row { flex-wrap: nowrap; gap: 6px; overflow: hidden; align-items: center; }
  .crumb-home, .crumb-home-sep { display: none; }
  .crumb-back {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    padding: 0 2px 0 0;
    color: inherit;
  }
  .crumb-btn, .track-title .sep { font-size: 16px; }
  .track-title .here { font-size: 16px; }
  .track-title #tk-range { display: none; }

  .track-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--paper-2);
    font-size: 13px;
    color: var(--ink);
  }
  .track-page.bg-on .track-more-btn {
    background: transparent;
    border-color: transparent;
    color: #f6eee3;
  }
  .track-tools {
    display: none;
    position: absolute;
    right: 8px;
    top: calc(100% + 4px);
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(300px, calc(100vw - 20px));
    padding: 10px;
    border-radius: 14px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .track-tools.is-open { display: flex; }
  .zoom-ctl { width: 100%; justify-content: space-between; }
  .zoom-ctl input[type="range"] { flex: 1; width: auto; min-width: 0; }
  .zoom-ctl .lvl { display: none; }
  .jump { width: 100%; display: flex; }
  .jump select { flex: 1; min-width: 0; }
  .track-tools > .btn { width: 100%; justify-content: center; }

  .proj-switch { margin: 4px auto 6px; padding: 0 10px; gap: 5px; flex: none; }
  .proj-chip { padding: 4px 10px; font-size: 12px; }
  .proj-new-form { margin: 0 auto 6px; padding: 0 10px; flex: none; }
  .track-help { display: none; }

  .track-vp,
  .track-vp.is-vert {
    flex: 1;
    height: auto;
    min-height: 0;
    margin: 0 8px;
  }
}


/* 邀请进入 */
.invite-accept { margin-top: 20px; display: grid; gap: 14px; }
.invite-accept .field { display: grid; gap: 6px; text-align: left; }
.invite-accept .field span { font-size: 13px; color: var(--ink-soft); }
.invite-accept input {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 16px;
  width: 100%;
}
.btn[disabled] { opacity: .6; cursor: wait; }


/* per-file upload thumbs + progress */
.upq { margin: 10px 0 16px; }
.upq-overall { margin-bottom: 12px; }
.upq-overall-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 13px; margin-bottom: 6px; }
.upq-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.upq-bar > span, .upq-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .15s linear; }
.upq-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.upq-item { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.upq-thumb { position: relative; aspect-ratio: 1; background: #2a2019; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.upq-thumb img, .upq-thumb video { width: 100%; height: 100%; object-fit: cover; }
.upq-ph { color: #fff8ee; font-size: 13px; }
.upq-badge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.62); color: #fff8ee; border-radius: 999px; padding: 2px 7px; font-size: 11px; }
.upq-meta { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.upq-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upq-label { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.upq-item.is-done .upq-bar-fill { background: var(--ok); }
.upq-item.is-error .upq-bar-fill { background: #b2432e; }
.upq-item.is-error .upq-label { color: #b2432e; }
.upq-item.is-saving .upq-label { color: var(--ink); }
.upq-pre { margin-top: 8px; }
.detail.on-cover .upq-item { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #f6eee3; }
.detail.on-cover .upq-bar { background: rgba(255,255,255,.16); }
.detail.on-cover .upq-label, .detail.on-cover .upq-name, .detail.on-cover .upq-overall { color: #f6eee3; }
.detail.on-cover .upq-overall-top strong { color: #fffaf3; }


/* public static site */
.app.is-public .detail-add,
.app.is-public [data-tab-compose],
.app.is-public [data-tab="compose"],
.app.is-public [data-tab="members"],
.app.is-public [data-act="logout"] { display: none !important; }

.app.is-public .proj-new-btn,
.app.is-public .proj-new-form,
.app.is-public .tk-empty [data-tab-compose] { display: none !important; }


/* tile wall: slight size variation, keep the same language */
.tile-wrap.tile-wide, .tile-wrap:has(.tile-wide) { grid-column: span 2; }
.tile-wide { aspect-ratio: 4 / 3; }
.tile-wrap.tile-wide .tile { aspect-ratio: 4 / 3; }

/* lightbox: fixed stage + fixed chrome, custom video controls */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-light);
  background: #120e0a;
  color: #f6eee3;
  display: block;
  overflow: hidden;
}
.lb-close,
.lb-nav {
  position: fixed;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff8ee;
  background: rgba(20, 14, 8, .55);
  border: 1px solid rgba(255, 235, 210, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: background .18s ease, opacity .2s ease, transform .18s ease;
}
.lb-close {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  border-radius: 50%;
}
.lb-close svg { width: 20px; height: 20px; display: block; }
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 72px;
  border-radius: 18px;
}
.lb-nav svg { width: 22px; height: 22px; display: block; }
.lb-prev { left: max(10px, env(safe-area-inset-left)); }
.lb-next { right: max(10px, env(safe-area-inset-right)); }
.lb-close:hover, .lb-nav:hover, .lb-icon:hover, .lb-play-center:hover {
  background: rgba(255, 122, 69, .88);
  border-color: rgba(255, 180, 130, .7);
}
.lb-close:active, .lb-nav:active { transform: translateY(-50%) scale(.96); }
.lb-close:active { transform: scale(.96); }
.lb-nav[hidden] { display: none !important; }
.lightbox-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: block;
  padding: max(64px, calc(env(safe-area-inset-top) + 52px)) 80px max(108px, calc(env(safe-area-inset-bottom) + 96px));
  box-sizing: border-box;
  min-height: 0;
}
.lb-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lb-frame img,
.lb-frame video,
.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #000;
  animation: lbIn .22s ease;
}
.lb-frame .lb-live {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-frame .lb-live img,
.lb-frame .lb-live video {
  max-height: 100%;
  max-width: 100%;
}
.lightbox-stage img.lb-sticker { background: transparent; }
@keyframes lbIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.lb-play-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  color: #fff8ee;
  background: rgba(20, 14, 8, .55);
  border: 1px solid rgba(255, 235, 210, .28);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.lb-play-center svg { width: 28px; height: 28px; margin-left: 3px; }
.lightbox:not(.is-playing) .lb-play-center { display: inline-flex; }
.lb-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 28px 88px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(12, 8, 5, .78) 45%);
  pointer-events: none;
  transition: opacity .25s ease;
}
.lb-dock > * { pointer-events: auto; }
.lb-meta {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .02em;
  color: #f6eee3;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
  margin-bottom: 10px;
}
.lb-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.lb-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff8ee;
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lb-icon svg { width: 18px; height: 18px; display: block; }
.lb-icon .ico-pause, .lightbox.is-playing .lb-icon .ico-play { display: none; }
.lightbox.is-playing .lb-icon .ico-pause { display: block; }
.lb-icon .ico-mute, .lightbox.is-muted .lb-icon .ico-vol { display: none; }
.lightbox.is-muted .lb-icon .ico-mute { display: block; }
/* 全屏播放：按钮图标切换 + 去留白铺满 */
.lb-icon .ico-fs-exit { display: none; }
.lightbox.is-fs .lb-icon .ico-fs { display: none; }
.lightbox.is-fs .lb-icon .ico-fs-exit { display: block; }
/* 视频在灯箱里始终撑满可用区域（object-fit: contain 保证不变形），小分辨率片源也能放大看 */
.lb-frame > video {
  flex: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}
.lightbox.is-video:fullscreen,
.lightbox.is-video:-webkit-full-screen,
.lightbox.is-video.is-fill { background: #000; }
.lightbox.is-video:fullscreen .lightbox-stage,
.lightbox.is-video:-webkit-full-screen .lightbox-stage,
.lightbox.is-video.is-fill .lightbox-stage { padding: 0; }
.lightbox.is-video:fullscreen .lb-frame > video,
.lightbox.is-video:-webkit-full-screen .lb-frame > video,
.lightbox.is-video.is-fill .lb-frame > video {
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}
.lightbox.is-fill .lb-close { opacity: .55; }
.lightbox.is-fill .lb-close:hover { opacity: 1; }
@media (min-width: 640px) {
  /* 横屏视频默认就尽量占满可视区，少留黑边 */
  .lightbox.is-video .lightbox-stage {
    padding: max(48px, calc(env(safe-area-inset-top) + 40px)) 72px max(96px, calc(env(safe-area-inset-bottom) + 88px));
  }
}
.lb-time {
  flex: none;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(246, 238, 227, .8);
  min-width: 92px;
  font-variant-numeric: tabular-nums;
}
.lb-seek {
  flex: 1;
  position: relative;
  height: 32px;
  min-width: 64px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.lb-seek-track,
.lb-seek-bufs,
.lb-seek-fill {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 99px;
  top: 50%;
  margin-top: -3px;
  pointer-events: none;
}
.lb-seek-track { background: rgba(255, 255, 255, .28); }
.lb-seek-bufs { z-index: 1; }
.lb-seek-bufs i {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: rgba(255, 255, 255, .5);
}
.lb-seek-fill {
  right: auto;
  width: 0;
  background: #ff7a45;
  z-index: 2;
}
.lb-seek-knob {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff8ee;
  box-shadow: 0 0 0 2px #ff7a45, 0 1px 5px rgba(0, 0, 0, .45);
  top: 50%;
  left: 0;
  margin: -8px 0 0 -8px;
  pointer-events: none;
  z-index: 3;
}
.lb-status {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(246, 238, 227, .88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
  min-height: 16px;
}
.lb-status[hidden] { display: none; }
.lightbox.is-idle .lb-dock,
.lightbox.is-idle .lb-play-center { opacity: 0; pointer-events: none; }
.lightbox.is-idle .lb-close,
.lightbox.is-idle .lb-nav { opacity: .28; }
/* Video progress stays visible and tappable after chrome fades. */
.lightbox.is-video.is-idle .lb-dock {
  opacity: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(12, 8, 5, .62) 55%);
}
.lightbox.is-video.is-idle .lb-meta { opacity: 0; }
.lightbox.is-video.is-idle .lb-ctrl,
.lightbox.is-video.is-idle .lb-status {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 639px) {
  .lb-nav { width: 48px; height: 64px; border-radius: 16px; }
  .lightbox-stage { padding: max(60px, calc(env(safe-area-inset-top) + 48px)) 16px max(116px, calc(env(safe-area-inset-bottom) + 100px)); }
  .lb-dock { padding: 24px 16px max(16px, env(safe-area-inset-bottom)); }
  .lb-time { min-width: 78px; font-size: 11px; }
  .lb-meta { font-size: 14px; }
  .lb-seek { height: 40px; }
  .lb-seek-track,
  .lb-seek-bufs,
  .lb-seek-fill { height: 8px; margin-top: -4px; }
  .lb-seek-knob { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
}

/* ===== c4：克制的光影与动效；去掉目录横条与项目胶囊 ===== */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-move: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 16px 44px rgba(36, 22, 10, 0.14);
  --shadow-sm: 0 2px 10px rgba(36, 22, 10, 0.07);
  --shadow-contact:
    0 1px 0 rgba(255, 252, 246, 0.55) inset,
    0 10px 28px rgba(24, 14, 6, 0.16),
    0 2px 6px rgba(24, 14, 6, 0.1);
  --shadow-contact-hover:
    0 1px 0 rgba(255, 252, 246, 0.72) inset,
    0 18px 36px rgba(24, 14, 6, 0.22),
    0 4px 12px rgba(24, 14, 6, 0.12);
}
body {
  background:
    radial-gradient(ellipse 70% 55% at 16% -8%, rgba(196, 90, 40, 0.08), transparent 52%),
    radial-gradient(ellipse 50% 45% at 96% 8%, rgba(210, 170, 100, 0.08), transparent 48%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(120, 80, 40, 0.06), transparent 50%),
    var(--paper);
}

.app.is-public,
.app.is-studio { padding-bottom: 0; }

.topbar-quiet {
  height: 56px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(10px) saturate(1.05);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-quiet .brand {
  font-size: 20px;
  letter-spacing: 0.22em;
  font-weight: 500;
  color: var(--ink);
  padding: 0;
  transition: opacity 0.35s var(--ease-out);
}
.topbar-quiet .brand:hover { opacity: 0.62; }

.quiet-btn {
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 6px 2px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  line-height: 1.2;
  transition: color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: 0 0 0 0 transparent;
}
.quiet-btn:hover {
  color: var(--ink);
  box-shadow: 0 1px 0 currentColor;
}
.quiet-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-tools { position: relative; }
.site-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 196px;
  padding: 10px 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-contact);
  z-index: 60;
}
.site-menu[hidden] { display: none !important; }
/* 管理员「换一组」下拉可能列出全部组，组多时可滚动 */
#view-switch { max-height: min(60vh, 420px); overflow-y: auto; }
.site-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.04em;
  transition: background 0.28s var(--ease-out), color 0.28s var(--ease-out);
}
.site-menu button:hover { background: color-mix(in srgb, var(--paper-3) 80%, white); }
.site-menu button.is-on { color: var(--accent-deep); }
.site-menu .site-menu-foot {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* typographic project title + list */
.track-title { position: relative; align-items: baseline; gap: 16px; }
.proj-current {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  max-width: min(72vw, 640px);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  transition: opacity 0.35s var(--ease-out);
}
.proj-current:hover { opacity: 0.78; }
.proj-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  opacity: 0.45;
  flex: none;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}
.proj-current[aria-expanded="true"] .proj-caret {
  transform: rotate(225deg) translateY(-3px);
  opacity: 0.8;
}
.proj-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 50;
  min-width: min(320px, 86vw);
  padding: 8px 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-contact);
}
.proj-menu[hidden] { display: none !important; }
.proj-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 10px 18px 10px 16px;
  text-align: left;
  box-shadow: inset 2px 0 0 transparent;
  transition: background 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}
.proj-option:hover { background: color-mix(in srgb, var(--paper-3) 75%, white); }
.proj-option.is-on {
  box-shadow: inset 2px 0 0 var(--accent);
}
.proj-option-name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.04em;
}
.proj-option-note {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.proj-option-new {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  font-size: 13px;
}
.proj-option.is-fresh .proj-option-name { color: var(--accent-deep); }
.track-title .proj-new-form,
.track-title .upload-queue {
  flex-basis: 100%;
  width: min(520px, 100%);
  margin: 8px 0 0;
}

/* hide leftover chip row if any */
.proj-switch { display: none !important; }

@media (min-width: 720px) {
  .track-chrome {
    grid-template-areas:
      "title tools"
      "form form";
  }
  .track-tools .btn-ghost {
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    padding: 6px 2px;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
  }
  .track-tools .btn-ghost:hover {
    background: transparent;
    color: var(--ink);
    box-shadow: 0 1px 0 currentColor;
  }
  .zoom-ctl {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0 0 4px;
  }
  .zoom-ctl button {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 2px 8px;
    color: var(--ink-soft);
  }
  .zoom-ctl button:hover { background: transparent; color: var(--ink); }
  .lvl {
    background: none;
    border-radius: 0;
    padding: 0 4px;
    color: var(--ink-faint);
    letter-spacing: 0.12em;
  }
  .jump select {
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    padding: 4px 2px;
  }
}

@media (max-width: 719px) {
  .proj-name { font-size: 22px; letter-spacing: 0.06em; }
  .track-more-btn {
    height: auto;
    padding: 6px 2px;
    border: 0;
    border-radius: 0;
    background: none;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
  }
  .track-page.bg-on .track-more-btn {
    background: none;
    border-color: transparent;
    color: rgba(246, 238, 227, 0.86);
  }
  .track-tools {
    border-radius: 8px;
  }
}

/* cover + timeline volume light */
.cover::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 30% 18%, rgba(255, 230, 190, 0.28), transparent 62%),
    radial-gradient(ellipse 40% 36% at 78% 82%, rgba(196, 90, 40, 0.14), transparent 70%);
  animation: volume-breath 16s var(--ease-move) infinite;
}
.tk-bg::after {
  content: "";
  position: absolute;
  inset: -12%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 48% at 28% 18%, rgba(255, 224, 180, 0.22), transparent 64%),
    radial-gradient(ellipse 46% 40% at 82% 78%, rgba(160, 90, 40, 0.16), transparent 70%);
  mix-blend-mode: soft-light;
  animation: volume-breath 16s var(--ease-move) infinite;
}
@keyframes volume-breath {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}
.bg-layer { transition: opacity 0.9s var(--ease-out); }
.bg-shade {
  transition: opacity 0.9s var(--ease-out);
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(40, 24, 12, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(16, 10, 6, 0.58) 0%, rgba(16, 10, 6, 0.42) 42%, rgba(12, 8, 5, 0.78) 100%);
}

.track-page.bg-on .proj-name,
.track-page.bg-on .proj-current { color: #fff8ee; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.track-page.bg-on .track-range,
.track-page.bg-on .track-help { color: rgba(246, 238, 227, 0.78); }
.app:has(.track-page.bg-on) .topbar-quiet {
  background: rgba(22, 14, 10, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.app:has(.track-page.bg-on) .topbar-quiet .brand,
.app:has(.track-page.bg-on) .quiet-btn { color: #f6eee3; }

/* cards, tiles, contact shadow */
.t-marker {
  border-radius: 10px;
  background: var(--paper-2);
  box-shadow: var(--shadow-contact);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.t-marker:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-contact-hover);
}
.t-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 18px 28px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.4s var(--ease-out);
}
.t-item.is-current .t-marker,
.t-item.is-current .t-cluster {
  outline: 1px solid rgba(255, 214, 170, 0.7);
  outline-offset: 2px;
}

.event-main {
  transition: box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  box-shadow: var(--shadow-contact);
}
button.event-card:hover .event-main,
.event-card:focus-visible .event-main {
  transform: translateY(-2px);
  box-shadow: var(--shadow-contact-hover);
}

.tile-wrap,
.tile {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.tile {
  box-shadow: 0 8px 22px rgba(20, 10, 4, 0.14);
  border-radius: 6px;
  overflow: hidden;
}
.tile-wrap:hover .tile,
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(20, 10, 4, 0.2);
}
.lib-file {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

/* quieter ruler / year lines — less neon */
.g-line.g-year {
  border-left: 2px solid rgba(255, 230, 196, 0.72);
  box-shadow: 0 0 14px rgba(255, 210, 140, 0.22);
}
.t-dot {
  box-shadow: 0 0 0 2px rgba(255, 122, 69, 0.18);
}

/* lightbox: short, expensive easing; light on the dock */
.lightbox { background: rgba(8, 5, 3, 0.86); }
.lightbox-stage img,
.lightbox-stage video {
  animation: lbIn 0.4s var(--ease-out);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
@keyframes lbIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.lb-dock {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: opacity 0.4s var(--ease-out);
}
.lb-nav, .lb-close { transition: opacity 0.4s var(--ease-out), background 0.35s var(--ease-out); }

.track-help {
  letter-spacing: 0.04em;
  font-size: 12px;
  color: var(--ink-faint);
}
.track-range {
  letter-spacing: 0.08em;
  font-size: 12px;
}

.page-head h1,
.detail h2 {
  letter-spacing: 0.06em;
}

@media (prefers-reduced-motion: reduce) {
  .cover::after,
  .tk-bg::after { animation: none; }
  .t-marker,
  .tile,
  .tile-wrap,
  .lightbox-stage img,
  .lightbox-stage video,
  .bg-layer,
  .bg-shade { animation: none; transition-duration: 0.01ms !important; }
}

.app:has(.cover-backdrop) .topbar-quiet {
  background: rgba(22, 14, 10, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.app:has(.cover-backdrop) .topbar-quiet .brand,
.app:has(.cover-backdrop) .quiet-btn { color: #f6eee3; }
.cover-backdrop::after {
  content: "";
  position: absolute;
  inset: -12%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 48% at 30% 20%, rgba(255, 224, 180, 0.22), transparent 64%),
    radial-gradient(ellipse 46% 40% at 80% 85%, rgba(160, 90, 40, 0.16), transparent 70%);
  mix-blend-mode: soft-light;
  animation: volume-breath 16s var(--ease-move) infinite;
}
.btn-glass {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  border-radius: 0;
  padding-left: 0;
}
.btn-glass:hover { background: transparent; box-shadow: 0 1px 0 currentColor; }

/* c1：封面背景下缩放栏保持排印，不被旧 bg-on 白块规则盖住 */
@media (min-width: 720px) {
  .track-page.bg-on .track-tools .btn-ghost,
  .track-page.bg-on .track-head .btn-ghost,
  .track-page.bg-on .track-tools .quiet-btn,
  .track-page.bg-on .track-head .quiet-btn {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #f6eee3;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  }
  .track-page.bg-on .track-tools .btn-ghost:hover,
  .track-page.bg-on .track-head .btn-ghost:hover,
  .track-page.bg-on .track-tools .quiet-btn:hover,
  .track-page.bg-on .track-head .quiet-btn:hover,
  .track-page.bg-on .track-tools .btn-ghost:focus-visible,
  .track-page.bg-on .track-tools .quiet-btn:focus-visible {
    background: transparent;
    color: #fff8ee;
    box-shadow: 0 1px 0 currentColor;
  }
  .track-page.bg-on .jump select {
    background: transparent;
    color: #f6eee3;
    border-color: rgba(246, 238, 227, 0.45);
  }
  .track-page.bg-on .zoom-ctl,
  .track-page.bg-on .zoom-ctl button,
  .track-page.bg-on .lvl {
    background: transparent;
    color: #f6eee3;
    border-color: rgba(246, 238, 227, 0.35);
  }
  .track-page.bg-on .zoom-ctl button:hover {
    background: transparent;
    color: #fff8ee;
  }
}

/* public view gate */
.view-gate .view-form { display: grid; gap: 14px; margin-top: 8px; text-align: left; }
.view-gate .field span { display: block; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-faint); margin-bottom: 6px; }
.view-gate input[type="password"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  letter-spacing: 0.12em;
}
.view-gate .status { min-height: 1.4em; font-size: 13px; color: var(--danger); margin: 0; }
.view-recents { display: grid; gap: 8px; margin-top: 28px; justify-items: center; }
.view-recents .quiet-btn { font-size: 15px; }
.lb-download {
  margin-left: 14px;
  font-family: var(--sans, inherit);
  font-size: 13px;
  letter-spacing: .08em;
  color: #f6eee3;
  text-decoration: none;
  border-bottom: 1px solid rgba(246, 238, 227, .45);
  padding-bottom: 1px;
}
.lb-download:hover { border-bottom-color: #f6eee3; }

/* public gate under the shared topbar */
.app:has(.view-gate) .cover.view-gate {
  min-height: calc(100dvh - 56px);
}
.quiet-btn.is-on {
  color: var(--ink);
  box-shadow: 0 1px 0 currentColor;
}

/* in-site upload */
.upload-page {
  width: min(36rem, 100%);
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.upload-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.16em;
  margin: 8px 0 10px;
}
.upload-page .lede {
  color: var(--ink-soft);
  margin: 0 0 28px;
  font-size: 15px;
}
.upload-page .field { display: grid; gap: 8px; margin-bottom: 18px; }
.upload-page .field > span {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.upload-page input[type="password"],
.upload-page select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
}
.upload-page .status { min-height: 1.4em; font-size: 14px; margin: 8px 0 16px; }
.upload-page .status.is-ok { color: var(--ok, #4f6d45); }
.upload-page .status.is-err { color: var(--danger); }
.upload-drop {
  display: grid;
  gap: 4px;
  padding: 22px 16px;
  border: 1px dashed var(--line-strong);
  cursor: pointer;
  text-align: center;
  background: color-mix(in srgb, var(--paper-2) 70%, transparent);
}
.upload-drop.is-over { border-color: var(--accent); background: var(--accent-soft, #f0d3c0); }
.upload-drop .drop-title { letter-spacing: 0.08em; }
.upload-drop .drop-hint { font-size: 12px; color: var(--ink-faint); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.upload-queue { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.upload-queue .item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.upload-queue .thumb {
  width: 56px;
  height: 56px;
  background: var(--paper-3, #efe4d0);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-faint);
}
.upload-queue .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-queue .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-queue .size, .upload-queue .msg { font-size: 12px; color: var(--ink-faint); }
.upload-queue .bar { height: 2px; background: var(--line); margin: 6px 0; }
.upload-queue .bar > span { display: block; height: 100%; width: 0; background: var(--accent); }
.upload-queue .item.is-ok .msg { color: var(--ok, #4f6d45); }
.upload-queue .item.is-err .msg { color: var(--danger); }
.upload-page .form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* mobile vertical track: no full-screen cross */
@media (max-width: 719px) {
  .track-vp.is-vert.is-empty .vt-spine,
  .track-vp.is-vert.is-empty .vt-year-line,
  .track-vp.is-vert.is-empty .vt-month-line,
  .track-vp.is-vert.is-empty .vt-day-tick,
  .track-vp.is-vert.is-empty .vt-year-lab,
  .track-vp.is-vert.is-empty .vt-month-lab,
  .track-vp.is-vert.is-empty .vt-day-lab,
  .track-vp.is-vert.is-empty .tk-cursor,
  .track-vp.is-vert.is-empty .tk-today,
  .track-vp.is-vert.is-empty .tk-context {
    display: none !important;
  }
  .track-vp.is-vert .vt-spine {
    bottom: auto;
    border-left-width: 1px;
    border-left-color: rgba(255, 226, 190, .28);
  }
  .track-vp.is-vert .tk-cursor {
    border-top-color: transparent;
    box-shadow: none;
  }
  .track-vp.is-vert .tk-today {
    left: 40%;
    right: 40%;
    border-top-color: rgba(255, 90, 54, .32);
  }
  .track-vp.is-vert .vt-year-line {
    left: 38%;
    right: 38%;
    border-top-width: 1px;
    border-top-color: rgba(255, 231, 184, .32);
    box-shadow: none;
  }
  .track-vp.is-vert .vt-month-line {
    left: 46%;
    right: 46%;
    border-top-width: 1px;
    border-top-color: rgba(255, 224, 190, .25);
  }
}

/* upload: already inside a group */
.up-current-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.up-current-row strong { font-size: 16px; }
.up-current .btn-sm { padding: 6px 12px; font-size: 13px; min-height: 0; }
.upload-page [hidden] { display: none !important; }
.up-back-bar { max-width: 640px; margin: 12px auto 0; padding: 0 16px; }
.up-back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 8px 14px; }


/* 封面和网格按原图比例显示，不再强制竖幅裁切 */
.hero-cover {
  width: auto;
  max-width: min(240px, 46vw);
  height: auto;
  max-height: 220px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  flex: none;
}
.tile { aspect-ratio: auto; height: auto; }
.tile img,
.tile video {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.tile-wide,
.tile-wrap.tile-wide .tile { aspect-ratio: auto; }
.tile-wrap.tile-big,
.tile-wrap:has(.tile-big) { grid-row: auto; }
.tile-live { position: relative; }
.tile-live img { width: 100%; height: auto; display: block; }
.tile-live .live-video { object-fit: contain; }
.t-cover img,
.marker-cover img,
.thumbs img,
.thumbs video {
  object-fit: contain;
  background: #1a1612;
}


/* 事件分享、公开站管理操作 */
.event-share, .event-edit {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0 20px;
}
.event-share h3, .event-edit h3 { margin: 0 0 8px; font-size: 16px; }
.event-share .hub-form, .event-edit .hub-form { display: grid; gap: 10px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.share-url {
  flex: 1; min-width: 180px;
  font-size: 12px; word-break: break-all;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px;
}
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tile-del-action {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  color: #fff6ea; background: rgba(120, 30, 20, .82);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile-wrap:hover .tile-del-action,
  .tile-wrap:focus-within .tile-del-action { opacity: 1; pointer-events: auto; }
}
.tile-wrap.show-cover-action .tile-del-action,
.tile-grid.is-editing-cover .tile-del-action { opacity: 1; pointer-events: auto; }


/* 事件详情：顶部宽主图 + 整齐画廊（同一行齐高，不再和标题挤在一起） */
.detail { width: min(880px, 100%); }
.detail-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
/* 顶部封面按原图比例完整显示：宽高都自适应，不受容器宽度拉伸，也不被高度上限压扁 */
.detail-hero .hero-cover,
.detail .detail-hero img.hero-cover {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(84vh, 820px);
  margin: 0 auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  transform: none;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  background: transparent;
}
.detail-head { margin: 0 0 18px; }
.detail-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.detail-edit-hint { margin: 0 0 14px; color: rgba(246,238,227,.75); }
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  --gallery-row: 148px;
}
@media (min-width: 640px) {
  .tile-grid { gap: 10px; --gallery-row: 176px; }
}
.tile-grid::after {
  content: "";
  flex: 12 1 32%;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.tile-grid .tile-wrap {
  position: relative;
  flex: 1 1 calc(var(--gallery-row) * var(--ar, 1.5));
  width: auto;
  height: var(--gallery-row);
  min-width: 0;
  max-width: 100%;
}
.tile-grid .tile-wrap.tile-big,
.tile-grid .tile-wrap.tile-wide,
.tile-grid .tile-wrap:has(.tile-big) {
  grid-column: auto;
  grid-row: auto;
}
.tile-grid .tile,
.tile-grid .tile.tile-big,
.tile-grid .tile.tile-wide {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}
.tile-grid .tile img,
.tile-grid .tile video,
.tile-grid .tile-live img,
.tile-grid .tile-live .live-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.tile-grid .tile-sticker img {
  object-fit: contain;
  padding: 10%;
}

/* ===== 视频缩略图：暗色遮罩 + 中央播放键（2026-11-29） ===== */
.tile-video, .cell-video, .tile-video-set { position: relative; overflow: hidden; }
.tile-video::before, .cell-video::before, .tile-video-set::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, .4);
  z-index: 1;
  pointer-events: none;
}
.tile-video::after, .cell-video::after, .tile-video-set::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent rgba(255, 255, 255, .96);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .55));
  z-index: 2;
  pointer-events: none;
}
.tile-video .tile-badge, .cell-video .tile-badge { display: none; }
@media (min-width: 720px) {
  .tile-video::after { border-width: 18px 0 18px 30px; }
}
/* 库存页：视频缩略图压暗，保留原有 ▶ 角标 */
.lib-video img { filter: brightness(.62) saturate(.95); }
/* 前置：1px 暖色细线 + 极淡外晕 */
.tile-wrap.is-pinned {
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 176, 120, .55), 0 0 0 4px rgba(255, 176, 120, .1);
}

/* 视频文件夹展开区 */
.set-panel {
  margin: 14px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}
.set-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.set-item { margin: 0; }
.set-item video { width: 100%; border-radius: 10px; background: #1a1612; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.set-item figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-faint); word-break: break-all; }

/* ===== 时间轴：按素材量相对分级（左侧竖色条 + 2px 描边） ===== */
.marker-card.lv-0 { border-left: 4px solid rgba(120, 108, 92, 0.35); }
.marker-card.lv-1 { border-left: 4px solid #5b8def; border-color: transparent; box-shadow: inset 0 0 0 2px #5b8def, var(--shadow-sm); }
.marker-card.lv-2 { border-left: 4px solid #c9962b; border-color: transparent; box-shadow: inset 0 0 0 2px #c9962b, var(--shadow-sm); }
.marker-card.lv-3 { border-left: 4px solid #cf4a35; border-color: transparent; box-shadow: inset 0 0 0 2px #cf4a35, 0 0 0 3px rgba(207, 74, 53, 0.16), var(--shadow-sm); }
.marker-card.lv-1:hover { box-shadow: inset 0 0 0 2px #5b8def, var(--shadow); }
.marker-card.lv-2:hover { box-shadow: inset 0 0 0 2px #c9962b, var(--shadow); }
.marker-card.lv-3:hover { box-shadow: inset 0 0 0 2px #cf4a35, 0 0 0 3px rgba(207, 74, 53, 0.16), var(--shadow); }

/* ===== 轨道视图：按素材量相对分级 ===== */
.t-marker.lv-1 { box-shadow: inset 0 0 0 2px #5b8def, var(--shadow-contact); }
.t-marker.lv-2 { box-shadow: inset 0 0 0 2px #c9962b, var(--shadow-contact); }
.t-marker.lv-3 { box-shadow: inset 0 0 0 2px #cf4a35, 0 0 0 3px rgba(207, 74, 53, 0.18), var(--shadow-contact); }


/* ==========================================================================
   ROUTE A: Gallery Editorial Theme (美术馆画册风 · 2026-11-30)
   ========================================================================== */
:root {
  --paper: #f7f5f0;
  --paper-2: #ffffff;
  --paper-3: #efece5;
  --ink: #1b1917;
  --ink-soft: #635e57;
  --ink-faint: #969087;
  --line: rgba(27, 25, 23, 0.08);
  --line-strong: rgba(27, 25, 23, 0.16);
  --accent: #b84a24;
  --accent-deep: #8f3516;
  --accent-soft: rgba(184, 74, 36, 0.10);
  --shadow-sm: 0 2px 10px rgba(27, 25, 23, 0.04);
  --shadow: 0 12px 32px rgba(27, 25, 23, 0.07);
  --shadow-contact: 0 2px 8px rgba(27, 25, 23, 0.05), 0 1px 2px rgba(27, 25, 23, 0.04);
  --shadow-contact-hover: 0 10px 26px rgba(27, 25, 23, 0.09), 0 2px 6px rgba(27, 25, 23, 0.04);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --radius: 10px;
}

body {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* ---- 去掉多余线框与印章装饰 ---- */
.cover::before { display: none; }
.cover-seal {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  transform: none;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.cover h1 {
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0 0 12px 0.1em;
}
.stamp {
  transform: none;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ---- 统一克制的按钮与控件圆角（告别满屏 999px 药丸） ---- */
.btn {
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.btn:hover { transform: none; filter: brightness(0.97); }
.btn-small { padding: 6px 12px; font-size: 13px; border-radius: 7px; }

.topbar,
.topbar-quiet {
  background: rgba(247, 245, 240, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.tabbar {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
}
.draft-flag { display: none !important; }

.nav-btn,
.role-chip,
.icon-btn,
.quiet-btn {
  border-radius: 8px;
  font-size: 13px;
}
.nav-btn.is-on {
  background: var(--ink);
  color: #fff;
}
.role-chip,
.icon-btn {
  background: var(--paper-2);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(27, 25, 23, 0.03);
}

/* ---- 彻底去掉全屏糊图背景与黑框覆盖 ---- */
.tk-bg,
.bg-layer,
.bg-shade {
  display: none !important;
}
.app:has(.track-page.bg-on) .topbar,
.app:has(.track-page.bg-on) .topbar-quiet {
  background: rgba(247, 245, 240, 0.88) !important;
  border-bottom-color: var(--line) !important;
}
.app:has(.track-page.bg-on) .topbar .brand,
.app:has(.track-page.bg-on) .topbar .nav-btn,
.app:has(.track-page.bg-on) .topbar-quiet .brand,
.app:has(.track-page.bg-on) .quiet-btn,
.track-page.bg-on .track-title .here,
.track-page.bg-on .proj-name,
.track-page.bg-on .proj-current {
  color: var(--ink) !important;
  text-shadow: none !important;
}
.app:has(.track-page.bg-on) .topbar .nav-btn.is-on {
  background: var(--ink) !important;
  color: #fff !important;
}
.track-page.bg-on .track-title .hint,
.track-page.bg-on .track-range,
.track-page.bg-on .track-help {
  color: var(--ink-soft) !important;
}
.track-page.bg-on .crumb-btn,
.track-page.bg-on .track-title .sep {
  color: var(--ink-soft) !important;
  text-shadow: none !important;
}
.track-page.bg-on .proj-chip.is-on {
  background: var(--ink) !important;
  color: #fff !important;
}

/* ---- 时间轴画布：融入浅色画廊底色，发丝线刻度 ---- */
.track-vp,
.track-page.bg-on .track-vp {
  margin: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tk-ruler {
  background: rgba(247, 245, 240, 0.94);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.r-major { border-left: 1px solid rgba(27, 25, 23, 0.16); }
.r-mlab {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.r-tick { border-left: 1px solid rgba(27, 25, 23, 0.10); }
.r-tick.long { border-left-color: rgba(27, 25, 23, 0.26); }
.r-lab {
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.r-lab.wk { color: var(--accent); font-weight: 500; }

.g-line { border-left: 1px solid rgba(27, 25, 23, 0.045); }
.g-line.strong { border-left-color: rgba(27, 25, 23, 0.10); }
.g-line.g-year {
  border-left: 1px solid rgba(27, 25, 23, 0.18);
  box-shadow: none;
}
.g-wk { background: rgba(27, 25, 23, 0.018); }

.tk-today { border-left: 1px dashed var(--accent); }
.tk-today span { background: var(--accent); border-radius: 4px; }
.tk-playhead { border-left: 1.5px solid var(--accent); }
.tk-playhead span { background: var(--accent); border-radius: 4px; }

/* ---- 极细连线与克制圆点 ---- */
.t-stem {
  width: 1px;
  margin-left: 0;
  background: rgba(27, 25, 23, 0.16);
}
.t-dot {
  width: 6px;
  height: 6px;
  margin-left: -3px;
  top: calc(100% + var(--sh) - 3px);
  background: var(--accent);
  border: 1.5px solid var(--paper);
  box-shadow: none;
}

/* ---- 画廊卡纸风格时间轴卡片 ---- */
.t-marker {
  background: var(--paper-2);
  border: 1px solid rgba(27, 25, 23, 0.07);
  border-radius: 8px;
  padding: 7px 7px 9px;
  box-shadow: var(--shadow-contact);
}
.t-marker:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-contact-hover);
  border-color: rgba(27, 25, 23, 0.14);
}
.t-cover {
  border-radius: 5px;
  background: var(--paper-3);
}
.t-cover::after { display: none; }
.t-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 7px 2px 0;
}
.t-date {
  font-size: 11px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  margin: 2px 2px 0;
}
.t-item.is-current .t-marker,
.t-item.is-current .t-cluster {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

/* 聚合簇卡片转为浅色画廊叠卡 */
.t-cluster {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-contact);
}
.t-cluster:hover {
  background: var(--paper-2);
  box-shadow: var(--shadow-contact-hover);
}
.t-stack img {
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(27, 25, 23, 0.14);
}
.c-lab b { font-family: var(--sans); font-weight: 600; font-size: 15px; }
.c-sub { color: var(--ink-soft); opacity: 1; }

/* 克制的素材量分级指示（去掉刺眼 2px 霓虹框） */
.t-marker.lv-1,
.marker-card.lv-1 {
  border-color: rgba(91, 141, 239, 0.35);
  box-shadow: var(--shadow-contact);
}
.t-marker.lv-2,
.marker-card.lv-2 {
  border-color: rgba(201, 150, 43, 0.45);
  box-shadow: var(--shadow-contact);
}
.t-marker.lv-3,
.marker-card.lv-3 {
  border-color: rgba(184, 74, 36, 0.55);
  box-shadow: var(--shadow-contact);
}
.marker-card.lv-0 { border-left: 2px solid var(--line-strong); }
.marker-card.lv-1 { border-left: 2px solid #5b8def; }
.marker-card.lv-2 { border-left: 2px solid #c9962b; }
.marker-card.lv-3 { border-left: 2px solid var(--accent); }

/* ---- 工具栏控件去粗糙感 ---- */
.zoom-ctl {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: 0 1px 2px rgba(27, 25, 23, 0.03);
}
.zoom-ctl button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 15px;
  color: var(--ink-soft);
}
.zoom-ctl button:hover { background: var(--paper-3); color: var(--ink); }
.zoom-ctl input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--line-strong);
  border-radius: 2px;
  outline: none;
}
.zoom-ctl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.lvl {
  border-radius: 6px;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--paper-3);
  color: var(--ink-soft);
}
.jump select {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 5px 10px;
  font-size: 13px;
  color: var(--ink);
}

/* ---- 列表、年份卡片与事件详情页 ---- */
.event-main,
.year-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-contact);
}
.event-main h3,
.detail h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.detail-hero,
.detail-hero .hero-cover,
.detail .detail-hero img.hero-cover {
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.tile {
  border-radius: 6px;
  box-shadow: var(--shadow-contact);
}
.tile-wrap:hover .tile,
.tile:hover {
  box-shadow: var(--shadow-contact-hover);
}
.nas-path {
  border-style: solid;
  border-color: var(--line);
  background: var(--paper-2);
  border-radius: 8px;
}
