:root {
  --ink: #2a2a2a;
  --muted: #6f6b64;
  --paper: #fffdf8;
  --paper-deep: #f7f1e6;
  --line: #2d2a24;
  --teal: #51bfa8;
  --coral: #ff8f70;
  --blue: #72aaf6;
  --yellow: #f6c85f;
  --shadow: 0 18px 45px rgba(47, 39, 24, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Hiragino Sans GB",
    system-ui,
    sans-serif;
  background:
    linear-gradient(rgba(255, 253, 248, 0.94), rgba(255, 253, 248, 0.94)),
    repeating-linear-gradient(0deg, rgba(105, 88, 56, 0.045) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(105, 88, 56, 0.035) 0 1px, transparent 1px 9px);
}

body.egg-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app {
  min-height: 100vh;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home {
  padding: 44px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 38px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.08);
  color: #464036;
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-title {
  margin: 18px 0 0;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 4.25rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy {
  margin: 22px 0 0;
  max-width: 560px;
  color: #3f3b35;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 1.65rem;
  line-height: 1.6;
}

.hero-places {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.memory-ticket {
  position: relative;
  width: 340px;
  padding: 22px 20px;
  border: 2px dashed #d9a851;
  border-radius: 8px;
  background: #fff8dc;
  box-shadow: 10px 12px 0 rgba(246, 200, 95, 0.2);
  transform: rotate(1.5deg);
}

.memory-ticket::before,
.memory-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid #d9a851;
}

.memory-ticket::before {
  left: -11px;
}

.memory-ticket::after {
  right: -11px;
}

.ticket-main {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 1.2rem;
  line-height: 1.2;
  white-space: nowrap;
  color: #4b3d26;
}

.rolls {
  display: grid;
  gap: 26px;
}

.egg-corner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 18px;
  padding: 0 26px 6px 0;
}

.egg-pointer {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 48px;
  pointer-events: none;
  filter: drop-shadow(3px 4px 0 rgba(45, 42, 36, 0.1));
  transform: translate(9px, -14px) rotate(-2deg);
}

.egg-pointer::before,
.egg-pointer::after {
  content: "";
  position: absolute;
  display: block;
}

.egg-pointer::before {
  left: 4px;
  top: 18px;
  width: 78px;
  height: 14px;
  border-radius: 999px 4px 4px 999px;
  background: #ff4545;
  transform: skewY(-1deg);
}

.egg-pointer::after {
  right: 2px;
  top: 7px;
  width: 0;
  height: 0;
  border-top: 24px solid transparent;
  border-bottom: 24px solid transparent;
  border-left: 36px solid #ff4545;
}

.memory-egg {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 158px;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.egg-body {
  position: relative;
  display: block;
  width: 104px;
  height: 134px;
  border: 2px solid var(--line);
  border-radius: 52% 52% 48% 48% / 62% 62% 40% 40%;
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, 0.95) 0 16px, transparent 17px),
    radial-gradient(circle at 68% 70%, rgba(255, 212, 102, 0.32) 0 20px, transparent 21px),
    linear-gradient(150deg, #fffef8 0%, #fff4cf 58%, #ffe6a8 100%);
  box-shadow:
    7px 9px 0 rgba(45, 42, 36, 0.08),
    inset -10px -12px 0 rgba(246, 200, 95, 0.15);
  transform-origin: 50% 84%;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.egg-shine {
  position: absolute;
  top: 24px;
  left: 27px;
  width: 20px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transform: rotate(24deg);
}

.egg-face {
  position: absolute;
  left: 50%;
  top: 67px;
  width: 45px;
  height: 24px;
  transform: translateX(-50%);
}

.egg-face::before,
.egg-face::after {
  content: "";
  position: absolute;
  top: 0;
  width: 8px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.egg-face::before {
  left: 5px;
}

.egg-face::after {
  right: 5px;
}

.egg-body::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 90px;
  width: 22px;
  height: 10px;
  border-bottom: 3px solid var(--line);
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%);
}

.egg-body::before {
  content: "";
  position: absolute;
  left: 49%;
  top: 16px;
  width: 2px;
  height: 40px;
  border-radius: 999px;
  background: rgba(45, 42, 36, 0.14);
  opacity: 0;
  transform: rotate(-20deg);
}

.egg-shadow {
  position: absolute;
  right: 16px;
  bottom: 4px;
  width: 98px;
  height: 18px;
  border-radius: 50%;
  background: rgba(45, 42, 36, 0.12);
  filter: blur(1px);
  transition: transform 180ms ease;
}

.egg-tooltip {
  position: absolute;
  right: 112px;
  top: 24px;
  z-index: 3;
  width: max-content;
  max-width: 210px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff7a8;
  color: #4b3d26;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.11);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, 4px) rotate(-1deg);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.egg-tooltip::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  background: #fff7a8;
  transform: rotate(45deg);
}

.memory-egg:hover .egg-body,
.memory-egg:focus-visible .egg-body {
  transform: translateY(-5px) rotate(-3deg);
  box-shadow:
    9px 13px 0 rgba(45, 42, 36, 0.1),
    inset -10px -12px 0 rgba(246, 200, 95, 0.15);
}

.memory-egg:hover .egg-shadow,
.memory-egg:focus-visible .egg-shadow {
  transform: scale(0.86);
}

.memory-egg:hover .egg-tooltip,
.memory-egg:focus-visible .egg-tooltip {
  opacity: 1;
  transform: translate(0, 0) rotate(-1deg);
}

.memory-egg:focus-visible {
  outline: 3px solid #f6c85f;
  outline-offset: 4px;
  border-radius: 999px;
}

.memory-egg.egg-pop .egg-body {
  animation: eggPop 620ms cubic-bezier(0.2, 0.9, 0.2, 1.12);
}

.memory-egg.egg-pop .egg-body::before {
  animation: eggCrack 620ms ease;
}

@keyframes eggPop {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  26% {
    transform: translateY(-16px) rotate(-8deg) scale(1.03);
  }
  52% {
    transform: translateY(0) rotate(6deg) scale(0.98);
  }
  76% {
    transform: translateY(-6px) rotate(-3deg) scale(1.01);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes eggCrack {
  0%,
  18% {
    opacity: 0;
  }
  38%,
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.egg-dialog[hidden] {
  display: none;
}

.egg-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(53, 47, 38, 0.28);
  backdrop-filter: blur(5px);
  animation: eggDialogFade 180ms ease both;
}

.egg-dialog-card {
  position: relative;
  width: min(960px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 34px 34px 30px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.92)),
    repeating-linear-gradient(0deg, rgba(105, 88, 56, 0.05) 0 1px, transparent 1px 7px);
  box-shadow:
    12px 14px 0 rgba(246, 200, 95, 0.34),
    0 28px 80px rgba(45, 42, 36, 0.24);
  scrollbar-color: #f0b78f #fff8e6;
}

.egg-dialog-card::before,
.egg-dialog-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff7a8;
  box-shadow: 0 0 0 2px var(--line);
  pointer-events: none;
}

.egg-dialog-card::before {
  top: 19px;
  left: 24px;
}

.egg-dialog-card::after {
  right: 24px;
  bottom: 20px;
  background: #bfeee3;
}

.egg-dialog-close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: -12px -12px 0 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.1);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.egg-dialog-close:hover,
.egg-dialog-close:focus-visible {
  background: #fff7a8;
  transform: rotate(8deg) scale(1.04);
}

.egg-dialog-close:focus-visible {
  outline: 3px solid #f6c85f;
  outline-offset: 3px;
}

.egg-dialog-header {
  display: grid;
  justify-items: center;
  gap: 10px;
  clear: both;
  padding: 2px 48px 28px;
  text-align: center;
}

.egg-dialog-sticker {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff7a8;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.1);
  font-size: 1.65rem;
  transform: rotate(-7deg);
}

.egg-dialog-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.egg-dialog-line {
  width: min(230px, 56%);
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ff8f70 0 3px, transparent 4px) 0 0 / 20px 8px repeat-x;
}

.egg-dialog-decor {
  position: absolute;
  color: #f0a04d;
  font-size: 1.8rem;
  pointer-events: none;
}

.egg-dialog-decor-left {
  top: 94px;
  left: 34px;
  transform: rotate(-16deg);
}

.egg-dialog-decor-right {
  top: 92px;
  right: 36px;
  color: #ff8f70;
  transform: rotate(14deg);
}

.egg-credit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.egg-credit {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 126px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1.5px solid rgba(45, 42, 36, 0.35);
  border-radius: 12px;
  box-shadow: 4px 6px 0 rgba(45, 42, 36, 0.08);
}

.egg-credit::after {
  content: "✦";
  position: absolute;
  right: 12px;
  top: 8px;
  color: rgba(45, 42, 36, 0.25);
  font-size: 1rem;
  transform: rotate(12deg);
}

.egg-credit-role {
  max-width: 92%;
  color: #3f3b35;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 1.12rem;
  line-height: 1.5;
}

.egg-credit-people {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.egg-person {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1.5px solid rgba(45, 42, 36, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #3a352d;
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1.3;
}

.egg-credit-teal {
  background: #e2f6f0;
}

.egg-credit-yellow {
  background: #fff5c9;
}

.egg-credit-blue {
  background: #e4f0ff;
}

.egg-credit-coral {
  background: #ffe5dc;
}

.egg-credit-pink {
  background: #ffe6f0;
}

.egg-credit-lilac {
  background: #eee8ff;
}

.egg-credit-orange {
  background: #ffe9c8;
}

.egg-credit-mint {
  background: #e1f5df;
}

.egg-credit-sky {
  background: #def4fb;
}

.egg-credit-apricot {
  background: #fff0d9;
}

.egg-credit-rose {
  background: #ffe4e5;
}

.egg-credit-cream {
  background: #fff8e4;
}

.egg-closing {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 18px 20px;
  border: 2px dashed #d9a851;
  border-radius: 12px;
  background: #fff8dc;
  color: #4b3d26;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 1.18rem;
  line-height: 1.7;
  text-align: center;
}

.egg-team-photo {
  width: min(100%, 760px);
  margin: 18px auto 0;
  padding: 10px;
  border: 1.5px solid rgba(45, 42, 36, 0.3);
  border-radius: 10px;
  background: #fff;
  box-shadow: 5px 7px 0 rgba(45, 42, 36, 0.1);
  transform: rotate(0.6deg);
}

.egg-team-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@keyframes eggDialogFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.roll-row {
  --accent: var(--teal);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.roll-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--accent), transparent 72%);
}

.roll-label small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.roll-label strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.2rem;
}

.roll-shell {
  position: relative;
  min-width: 0;
}

.roll-shell::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -13px;
  width: 86px;
  height: 22px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent), #ffffff 58%);
  opacity: 0.75;
  transform: rotate(-2deg);
}

.film-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 216px;
  padding: 28px 32px;
  overflow-x: auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle, #fff 0 5px, transparent 6px) 16px 11px / 32px 22px repeat-x,
    radial-gradient(circle, #fff 0 5px, transparent 6px) 16px calc(100% - 11px) / 32px 22px repeat-x,
    linear-gradient(90deg, color-mix(in srgb, var(--accent), #fff 30%), color-mix(in srgb, var(--accent), #fff 63%));
  box-shadow: var(--shadow);
  scrollbar-width: none;
}

.film-strip::-webkit-scrollbar {
  display: none;
}

.film-strip:hover .open-cue {
  transform: translateX(4px);
}

.open-cue {
  position: sticky;
  right: 0;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.13);
  transition: transform 180ms ease;
}

.photo-paper {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 11px;
  border: 1.5px solid rgba(45, 42, 36, 0.35);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(45, 42, 36, 0.16);
}

.roll-row .photo-paper {
  width: 188px;
  height: 142px;
}

.roll-row .photo-paper.cover {
  width: 318px;
  height: 182px;
}

.photo-paper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
  background: #f7f4ee;
}

.cover-badge {
  position: absolute;
  top: -16px;
  left: -13px;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff7a8;
  box-shadow: 3px 4px 0 rgba(45, 42, 36, 0.12);
  font-size: 1.2rem;
  z-index: 2;
}

.empty-roll {
  padding: 38px 24px;
  color: rgba(45, 42, 36, 0.72);
  font-weight: 700;
}

.viewer {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  padding: 28px 0 24px;
}

.viewer-topbar,
.admin-topbar {
  display: flex;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.icon-button,
.text-button,
.chip-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.1);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.icon-button {
  width: 46px;
  padding: 0;
  font-size: 1.2rem;
}

.text-button,
.chip-button {
  padding: 0 14px;
}

.icon-button:hover,
.text-button:hover,
.chip-button:hover {
  transform: translateY(-1px);
  box-shadow: 5px 7px 0 rgba(45, 42, 36, 0.12);
}

.viewer-title {
  display: grid;
  gap: 3px;
  text-align: center;
}

.viewer-title strong {
  font-size: 1.3rem;
}

.viewer-title span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.viewer-stage {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 26px 0;
}

.viewer-track {
  display: flex;
  align-items: center;
  gap: 32px;
  will-change: transform;
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.viewer-track.dragging {
  transition: none;
}

.slide {
  display: grid;
  flex: 0 0 min(78vw, 820px);
  place-items: center;
  min-height: min(68vh, 680px);
  opacity: 0.42;
  transform: scale(0.9);
  transition:
    transform 520ms ease,
    opacity 520ms ease;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide-paper {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: min(68vh, 680px);
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff),
    radial-gradient(circle, rgba(45, 42, 36, 0.14) 0 1px, transparent 1px 7px);
  box-shadow: 0 22px 60px rgba(45, 42, 36, 0.18);
}

.slide-paper::before,
.slide-paper::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 14px;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), #fff 18%) 0 4px, transparent 5px) 0 0 / 24px 14px repeat-x;
  opacity: 0.55;
}

.slide-paper::before {
  top: 5px;
}

.slide-paper::after {
  bottom: 5px;
}

.slide-paper img {
  max-width: min(100%, 760px);
  max-height: calc(min(68vh, 680px) - 44px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #f3eee5;
}

.viewer-controls {
  display: flex;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border: 2px solid rgba(45, 42, 36, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 35px rgba(45, 42, 36, 0.08);
  backdrop-filter: blur(8px);
}

.progress-control {
  position: relative;
  display: grid;
  width: min(300px, 30vw);
  min-width: 150px;
  height: 26px;
  align-items: center;
}

.progress-bar {
  position: absolute;
  right: 0;
  left: 0;
  top: 50%;
  width: auto;
  height: 8px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transform: translateY(-50%);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 420ms ease;
}

.progress-slider {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  cursor: grab;
  background: transparent;
}

.progress-slider:active {
  cursor: grabbing;
}

.progress-slider:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), white 20%);
  outline-offset: 4px;
  border-radius: 999px;
}

.progress-slider:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.progress-slider::-webkit-slider-runnable-track {
  height: 8px;
  border: 0;
  background: transparent;
}

.progress-slider::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  margin-top: -5.5px;
  appearance: none;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff7a8;
  box-shadow: 2px 3px 0 rgba(45, 42, 36, 0.14);
}

.progress-slider::-moz-range-track {
  height: 8px;
  border: 0;
  background: transparent;
}

.progress-slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.progress-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff7a8;
  box-shadow: 2px 3px 0 rgba(45, 42, 36, 0.14);
}

.admin {
  padding: 32px 0 64px;
}

.admin-card,
.login-card {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(460px, calc(100% - 32px));
  margin-top: 70px;
  padding: 28px;
}

.login-card h1,
.admin-title h1 {
  margin: 0;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 2.2rem;
  letter-spacing: 0;
}

.login-card p,
.admin-title p,
.helper {
  color: var(--muted);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.field label {
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-card .text-button {
  width: 100%;
  margin-top: 18px;
  background: #fff7a8;
}

.admin-card {
  padding: 22px;
}

.admin-topbar {
  margin-bottom: 22px;
}

.admin-title {
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.album-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.chip-button.active {
  background: var(--accent);
}

.admin-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 20px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 40%), #fff7a8);
  text-align: center;
}

.upload-zone.dragover {
  background: color-mix(in srgb, var(--accent), white 70%);
}

.upload-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 1.4rem;
}

.upload-zone strong {
  display: block;
  font-size: 1.05rem;
}

.upload-zone input {
  display: none;
}

.upload-zone .text-button {
  margin-top: 16px;
  background: #fff;
}

.upload-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 14px;
  min-height: 260px;
}

.thumb-card {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1.5px solid rgba(45, 42, 36, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(45, 42, 36, 0.09);
}

.thumb-card.dragging {
  opacity: 0.42;
}

.thumb-image {
  position: relative;
  display: grid;
  place-items: center;
  height: 128px;
  border-radius: 6px;
  background: #f4efe7;
  overflow: hidden;
}

.thumb-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb-index {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.thumb-name {
  overflow: hidden;
  color: #413b32;
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-button {
  min-height: 32px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.mini-button.danger {
  background: #ffe7df;
}

.notice {
  display: none;
  width: min(560px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff7a8;
  box-shadow: 4px 5px 0 rgba(45, 42, 36, 0.08);
  font-weight: 800;
  text-align: center;
}

.notice.show {
  display: block;
}

.hidden-file {
  display: none;
}

@media (max-width: 860px) {
  .home {
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-copy {
    font-size: 1.35rem;
  }

  .memory-ticket {
    width: min(340px, 100%);
    transform: none;
  }

  .egg-pointer {
    width: 88px;
    height: 38px;
    transform: translate(8px, -12px) rotate(-2deg);
  }

  .egg-pointer::before {
    top: 14px;
    width: 60px;
    height: 12px;
  }

  .egg-pointer::after {
    top: 5px;
    border-top-width: 20px;
    border-bottom-width: 20px;
    border-left-width: 30px;
  }

  .egg-dialog {
    padding: 14px;
    align-items: start;
  }

  .egg-dialog-card {
    max-height: 92vh;
    padding: 28px 22px 24px;
  }

  .egg-dialog-header {
    padding-right: 36px;
    padding-left: 36px;
  }

  .roll-row {
    grid-template-columns: 1fr;
  }

  .film-strip {
    min-height: 196px;
    padding: 26px 24px;
  }

  .roll-row .photo-paper {
    width: 158px;
    height: 128px;
  }

  .roll-row .photo-paper.cover {
    width: 248px;
    height: 168px;
  }

  .viewer-topbar {
    align-items: start;
  }

  .viewer-title {
    text-align: right;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .page,
  .viewer-topbar,
  .admin-topbar,
  .admin-card,
  .login-card {
    width: min(100% - 20px, 1180px);
  }

  .hero-title {
    font-size: 2.45rem;
  }

  .hero-copy {
    font-size: 1.2rem;
  }

  .egg-dialog-card {
    border-radius: 14px;
    padding: 24px 14px 18px;
  }

  .egg-dialog-header {
    padding: 4px 24px 22px;
  }

  .egg-corner {
    padding-right: 6px;
  }

  .egg-pointer {
    width: 68px;
    height: 32px;
    transform: translate(9px, -12px) rotate(-2deg);
  }

  .egg-pointer::before {
    top: 12px;
    width: 45px;
    height: 10px;
  }

  .egg-pointer::after {
    top: 4px;
    border-top-width: 17px;
    border-bottom-width: 17px;
    border-left-width: 25px;
  }

  .egg-dialog-header h2 {
    font-size: 2rem;
  }

  .egg-dialog-decor-left {
    left: 18px;
  }

  .egg-dialog-decor-right {
    right: 18px;
  }

  .egg-dialog-close {
    margin: -5px -3px 0 0;
  }

  .egg-credit-grid {
    grid-template-columns: 1fr;
  }

  .egg-credit {
    min-height: 0;
    padding: 16px 14px 14px;
  }

  .egg-credit-role {
    font-size: 1.05rem;
  }

  .egg-person {
    font-size: 0.78rem;
  }

  .egg-closing {
    font-size: 1.05rem;
  }

  .egg-team-photo {
    padding: 7px;
    border-radius: 8px;
  }

  .film-strip {
    gap: 12px;
  }

  .slide {
    flex-basis: 84vw;
  }

  .viewer-controls {
    flex-wrap: wrap;
  }

  .progress-bar {
    width: 100%;
  }

  .progress-control {
    order: -1;
    width: 100%;
  }
}
