:root {
  --bg-0: #0a0d0a;
  --bg-1: #101510;
  --bg-2: #161d17;
  --panel: rgba(19, 24, 20, 0.68);
  --panel-soft: rgba(238, 231, 217, 0.05);
  --line: rgba(236, 227, 211, 0.12);
  --line-strong: rgba(236, 227, 211, 0.2);
  --text-main: #efe7da;
  --text-soft: rgba(239, 231, 218, 0.76);
  --text-dim: rgba(239, 231, 218, 0.42);
  --sage: #94a37a;
  --gold: #c5a67f;
  --fog: #efe2c8;
  --radius-xl: 34px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-frame: 0 34px 90px rgba(0, 0, 0, 0.42);
  --shadow-panel: 0 18px 52px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text-main);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(137, 160, 103, 0.18), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(181, 148, 106, 0.14), transparent 22%),
    radial-gradient(circle at 50% 120%, rgba(108, 129, 95, 0.18), transparent 38%),
    linear-gradient(150deg, #060806 0%, #0c100d 52%, #141a15 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 0, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 100%);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 70%);
  opacity: 0.3;
}

.cinema {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  width: min(100%, 1600px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 18px clamp(16px, 2.8vw, 34px) 16px;
}

.meta-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 2px 0;
}

.meta-stack {
  display: flex;
  flex-direction: column;
}

.meta-stack-left {
  align-items: flex-start;
  gap: 10px;
}

.meta-stack-right {
  align-items: flex-end;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.day-counter {
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.meta-caption {
  padding-left: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.current-date {
  font-family: "Cormorant Garamond", "STSong", serif;
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  line-height: 0.88;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.viewer {
  min-height: 0;
}

.viewer-frame {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(12, 15, 13, 0.84), rgba(9, 12, 10, 0.96));
  border: 1px solid rgba(236, 227, 211, 0.08);
  box-shadow: var(--shadow-frame);
}

.viewer-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px solid rgba(236, 227, 211, 0.08);
  pointer-events: none;
  z-index: 2;
}

.image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: clamp(84%, 94%, 98%);
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg) scale(1.14);
  transform-origin: center;
  filter: saturate(0.95) brightness(0.97) contrast(1.03);
  pointer-events: none;
  user-select: none;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 56%, rgba(8, 10, 9, 0.1) 74%, rgba(8, 10, 9, 0.56) 100%),
    linear-gradient(180deg, rgba(8, 10, 9, 0.24), transparent 18%, transparent 82%, rgba(8, 10, 9, 0.3));
}

.timeline-dock {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--panel);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px);
  padding: 14px 16px 12px;
}

.controls-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.controls-center {
  min-width: 0;
}

.progress-bar {
  cursor: pointer;
  touch-action: none;
  padding: 8px 0;
}

.progress-track {
  position: relative;
  height: 2px;
  border-radius: var(--radius-pill);
  background: rgba(236, 227, 211, 0.14);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  box-shadow: 0 0 26px rgba(171, 185, 129, 0.26);
}

.progress-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 36%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.28)),
    var(--fog);
  border: 1px solid rgba(18, 24, 20, 0.3);
  box-shadow:
    0 0 0 7px rgba(239, 231, 218, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease;
}

.progress-bar:hover .progress-thumb {
  transform: translate(-50%, -50%) scale(1.08);
}

.btn-play,
.btn-speed,
.tick {
  appearance: none;
  border: 0;
  font: inherit;
}

.btn-play {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #121713;
  background: linear-gradient(135deg, #e9dcc1, #95a97e);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-play:hover {
  transform: scale(1.03);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.play-icon {
  fill: currentColor;
}

.btn-speed {
  min-width: 60px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn-speed:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text-main);
}

.timeline-ticks {
  display: grid;
  grid-template-columns: repeat(var(--tick-count, 1), minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(236, 227, 211, 0.08);
}

.tick {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 0 4px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tick:hover {
  color: var(--text-soft);
  transform: translateY(-1px);
}

.tick.active {
  color: var(--text-main);
}

.tick::before {
  content: "";
  width: 100%;
  height: 1px;
  margin-bottom: 2px;
  background: rgba(236, 227, 211, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.tick.active::before {
  background: linear-gradient(90deg, transparent, rgba(197, 166, 127, 0.78), transparent);
  transform: scaleX(1.1);
}

.tick-icon {
  font-size: 0.94rem;
  line-height: 1;
}

.tick-time {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .cinema {
    gap: 14px;
    padding: 14px 14px 12px;
  }

  .current-date {
    font-size: clamp(1.35rem, 5vw, 2.2rem);
  }

  .image-layer {
    height: 92%;
    transform: translate(-50%, -50%) rotate(90deg) scale(1.08);
  }

  .timeline-dock {
    padding: 12px 12px 10px;
  }
}

@media (max-width: 640px) {
  .meta-bar {
    flex-direction: column;
    gap: 12px;
  }

  .meta-stack-right {
    align-items: flex-start;
  }

  .controls-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .btn-play {
    width: 38px;
    height: 38px;
  }

  .btn-speed {
    min-width: 54px;
    height: 34px;
    padding: 0 10px;
  }

  .tick-time {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }
}
