:root {
  --cream: #1d2440;
  --paper: #2b2b2b;
  --card: #2b2b2b;
  --sand: #2b2b2b;
  --sky: #ff9bb5;
  --blue: #d4d4d4;
  --pink: #ff9bb5;
  --mist: #2b2b2b;
  --ink: #d4d4d4;
  --on-light: #2b2b2b;
  --clay: var(--sky);
  --clay-deep: var(--pink);
  --moss: #ff9bb5;
  --ink-soft: #d4d4d4;
  --line: rgba(212, 212, 212, 0.28);
  --shadow: 0 16px 40px rgba(43, 43, 43, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Palatino Linotype", Palatino, "Times New Roman", serif;
  --kai: "KaiTi", "STKaiti", "楷体", "Palatino Linotype", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scrollbar-color: #2b2b2b transparent; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--cream);
  letter-spacing: 0.01em;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; appearance: none; }
img { max-width: 100%; display: block; }
::selection { background: #ff9bb5; color: #2b2b2b; }
:focus-visible { outline: 2px solid #ff9bb5; outline-offset: 3px; }
[hidden] { display: none !important; }

.cursor { display: none; }

@media (any-pointer: fine) {
  body, body * { cursor: none !important; }
  body input, body textarea, body select { cursor: text !important; }

  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: block;
    pointer-events: none;
    opacity: 0;
    transform-origin: 12px 12px;
  }

  .cursor__inner { fill: #ff9bb5; }
}

.door {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #1d2440;
}

.door[hidden] { display: none; }

.door-card {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 36px 28px 32px;
  border-radius: 32px;
  background: #2b2b2b;
  box-shadow: 0 30px 80px rgba(8, 10, 24, 0.45);
}

.door-card.is-wrong { animation: door-shake 0.42s var(--ease); }

@keyframes door-shake {
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.door-mark {
  margin: 0 0 -6px;
  transform: translateY(-16px);
  font-family: var(--serif);
  letter-spacing: 0.42em;
  font-size: 13px;
  color: #ff9bb5;
}

.door-title {
  margin: 0;
  font-family: "KaiTi", "STKaiti", "楷体", "Palatino Linotype", serif;
  font-weight: normal;
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
  color: #d4d4d4;
}

.door-guest {
  margin: 6px 0 0;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  padding: 8px 18px;
  background: transparent;
  color: #d4d4d4;
  font-size: 14px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.door-guest:hover { color: #ff9bb5; border-color: #ff9bb5; }

.door-ask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(29, 36, 64, 0.72);
}

.door-ask[hidden] { display: none; }

.door-ask-title {
  margin: 0;
  font-family: "KaiTi", "STKaiti", "楷体", "Palatino Linotype", serif;
  font-weight: normal;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  padding-left: 0.14em;
  color: #d4d4d4;
}

body.is-guest .only-edit,
body.is-guest .owner-only { display: none !important; }

body.is-guest .place-chip,
body.is-guest .who { pointer-events: none; }

.door-card input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #d4d4d4;
  color: #2b2b2b;
  text-align: center;
  letter-spacing: 0.14em;
  outline: none;
}

.door-card input:focus { box-shadow: inset 0 0 0 2px #ff9bb5; }

.door-hint {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #ff9bb5;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #1d2440;
}

.gate-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.gate.is-ready .gate-inner,
.gate.is-ready .gate-side {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}

.orb { display: none; }

.orb-a { width: 280px; height: 280px; background: #ff9bb5; top: 6%; left: -60px; animation: drift 16s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; background: #ff9bb5; right: -100px; bottom: -40px; animation: drift 20s ease-in-out infinite reverse; }
.orb-c { width: 160px; height: 160px; background: #d4d4d4; top: 18%; right: 14%; animation: drift 18s ease-in-out infinite; }

@keyframes drift {
  50% { transform: translateY(18px); }
}

.wordmark {
  font-family: var(--serif);
  letter-spacing: 0.42em;
  font-size: 14px;
  color: #ff9bb5;
}

button.wordmark { background: none; border: 0; padding: 8px 0; }
.gate .wordmark { margin: 0 0 22px; padding-left: 0.42em; }

.gate-kicker {
  margin: 0;
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  font-size: 14px;
  color: var(--ink-soft);
}

.date-lockup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 36px);
  margin: 10px 0 0;
}

.dot-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.circ {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 4px auto 6px;
  perspective: 560px;
}

.circ-tilt,
.circ-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.circ-letter {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.date-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.date-num {
  font-family: var(--serif);
  font-size: clamp(64px, 7vw, 100px);
  line-height: 0.82;
  font-weight: 500;
  font-variant-numeric: lining-nums;
}

#gate-month-num { color: var(--clay-deep); }
#gate-day-num { color: var(--moss); }

.date-zh {
  font-family: var(--kai);
  font-size: 22px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.date-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff9bb5;
  box-shadow: 0 0 0 8px rgba(255, 155, 181, 0.25);
  align-self: center;
  margin-bottom: 28px;
}

.gate-line {
  font-family: var(--kai);
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  margin: 22px 0 0;
}

.hero-names {
  position: relative;
  z-index: 5;
  width: min(1180px, 100%);
  height: clamp(96px, 16vh, 170px);
  margin: 0;
  perspective: 640px;
  perspective-origin: 50% 130%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero-back,
.hero-front {
  grid-area: 1 / 1;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform-style: preserve-3d;
}

.hero-back {
  font-size: clamp(84px, 16.4vw, 228px);
  color: #d4d4d4;
  transform: rotateX(34deg) translateY(-8%) scale(1.04, 0.92);
}

.hero-front {
  font-size: clamp(72px, 13.2vw, 184px);
  color: #ff9bb5;
  transform: rotateX(27deg) translateY(28%) translateZ(36px) scale(0.92, 0.9);
}

.vp-letter {
  display: inline-block;
  transform-origin: 50% 80%;
  paint-order: stroke fill;
  -webkit-text-stroke: 0 currentColor;
}

.vp-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-faces {
  position: relative;
  z-index: 2;
  flex: 1;
  width: min(1100px, 100%);
  min-height: 0;
  margin-top: -4vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 56px;
}

.pair {
  position: relative;
  width: min(1100px, 100%);
  height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pcard {
  position: relative;
  width: auto;
  margin: 0 -0.6vw;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  perspective: 800px;
  transition: translate 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 22px 18px rgba(0, 0, 0, 0.38));
}

.pcard-tilt {
  display: block;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center 58%;
}

.pcard img {
  width: auto;
  height: min(64vh, calc(100dvh - 190px));
  max-width: 58vw;
  user-select: none;
  -webkit-user-drag: none;
}

.pcard-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(farthest-corner circle at var(--tc-gx, 50%) var(--tc-gy, 50%), rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 58%);
  opacity: var(--tc-glare, 0);
  mix-blend-mode: screen;
  -webkit-mask-image: var(--face);
  mask-image: var(--face);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pcard-him {
  z-index: 1;
  --face: url("assets/face-him.png");
  translate: 7.6vw -48px;
  rotate: -15deg;
  transform-origin: 72% 100%;
}

.pcard-her {
  z-index: 2;
  --face: url("assets/face-her.png");
  translate: -7.6vw -42px;
  rotate: 15deg;
  transform-origin: 28% 100%;
}

.pcard-her img { height: min(68vh, calc(100dvh - 160px)); max-width: 62vw; }

.pair.is-open .pcard-him { translate: -3.2vw -48px; }
.pair.is-open .pcard-her { translate: 3.2vw -42px; }

.pair-gap {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  translate: -50% -50%;
  pointer-events: none;
}

.pair.is-open .pair-gap { pointer-events: auto; }

.glass-pop {
  position: relative;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #d4d4d4;
  background: hsl(0 0% 100% / 0.08);
  -webkit-backdrop-filter: url("#glass-filter") blur(12px) saturate(1.6) brightness(1.06);
  backdrop-filter: url("#glass-filter") blur(12px) saturate(1.6) brightness(1.06);
  box-shadow:
    inset 0 1px 0 hsl(0 0% 100% / 0.72),
    inset 0 -1px 0 hsl(0 0% 100% / 0.16),
    inset 0 0 12px 2px hsl(0 0% 100% / 0.14),
    0 10px 22px rgba(0, 0, 0, 0.28);
  opacity: 0;
  scale: 0.35;
  transition: opacity 0.4s ease, scale 0.55s cubic-bezier(0.22, 1, 0.36, 1), translate 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.glass-pop img {
  width: 70%;
  height: auto;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.glass-pop::before,
.glass-pop::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.glass-pop::before {
  background: linear-gradient(135deg, hsl(0 0% 100% / 0.42) 0%, transparent 42%, transparent 64%, hsl(0 0% 100% / 0.16) 100%);
}

.glass-pop::after {
  padding: 1.5px;
  background: linear-gradient(150deg, hsl(0 0% 100% / 0.7), hsl(0 0% 100% / 0.08) 46%, hsl(0 0% 100% / 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.glass-camera { translate: 0 10px; }
.glass-mail { translate: 0 10px; }
.pair.is-open .glass-pop { opacity: 1; scale: 1; }
.pair.is-open .glass-camera { translate: 0 -2px; }
.pair.is-open .glass-mail { translate: 0 2px; }

@media (hover: none) {
  .glass-pop { opacity: 1; scale: 1; pointer-events: auto; }
  .pair-gap { pointer-events: auto; }
}

.hero-days {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 7;
  transform: translateX(-50%);
  border: 0;
  background: none;
  padding: 8px 12px;
  color: #d4d4d4;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.hero-days:hover { color: #ff9bb5; }

.home-player {
  position: fixed;
  right: 26px;
  bottom: 22px;
  z-index: 45;
  width: 104px;
  height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.32));
  transition: transform 0.46s cubic-bezier(0.16, 1.15, 0.3, 1);
}

.home-player-bob {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.2, 1.35, 0.32, 1);
}

.home-player:hover .home-player-bob { transform: translateY(-8px) scale(1.06); }
.home-player:active .home-player-bob { transform: translateY(1px) scale(0.92); }

.home-player.is-playing .home-player-bob { animation: home-player-float 2.8s ease-in-out infinite; }
.home-player.is-playing:hover .home-player-bob,
.home-player.is-playing:active .home-player-bob { animation: none; }

.home-player.is-open {
  z-index: 270;
  transform: translateY(calc(-1 * var(--pick-lift, 0px)));
}

.home-player img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.48s cubic-bezier(0.2, 1.3, 0.32, 1);
}

.home-player .face-on { opacity: 0; transform: scale(0.84) rotate(-10deg); }
.home-player .face-off { opacity: 1; transform: none; }
.home-player.is-playing .face-on { opacity: 1; transform: none; animation: home-player-sway 3.6s ease-in-out infinite; }
.home-player.is-playing .face-off { opacity: 0; transform: scale(0.84) rotate(8deg); }

@keyframes home-player-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes home-player-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}

.gate.is-people .hero-names,
.gate.is-people .hero-faces,
.gate.is-people .hero-days { visibility: hidden; }

.home-board {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  background: #1d2440;
}

#home-drift { position: absolute; inset: 0; }

.home-back { position: fixed; top: 16px; right: 18px; z-index: 40; }

.home-empty {
  margin: 18vh 0 0;
  text-align: center;
  color: #d4d4d4;
  letter-spacing: 0.08em;
}

.drift-wall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: var(--dw-perspective, 1200px);
  perspective-origin: 50% 46%;
  --dw-tile-w: 200px;
  --dw-tile-h: 252px;
  --dw-gap: 18px;
  --dw-radius: 14px;
  --dw-lift: 64px;
  --dw-overlay: #e8b14a;
}

.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
  animation: drift-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes drift-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drift-wall__col {
  position: relative;
  width: calc(var(--dw-tile-w) + var(--dw-gap));
  transform-style: preserve-3d;
}

.drift-wall__track {
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  will-change: transform;
}

.drift-wall__tile {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--dw-tile-h) + var(--dw-gap));
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  transform-style: preserve-3d;
}

.drift-wall__inner {
  position: absolute;
  inset: calc(var(--dw-gap) / 2);
  display: block;
  overflow: hidden;
  border-radius: var(--dw-radius);
  background: #e7c98a;
  pointer-events: none;
  transform: translateZ(0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.5) saturate(1.65) brightness(1.06) contrast(0.98);
  transition: filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__overlay {
  position: absolute;
  inset: 0;
  background: var(--dw-overlay);
  opacity: 0.38;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile.is-active .drift-wall__inner {
  transform: translateZ(var(--dw-lift));
  box-shadow: 0 24px 50px -18px rgba(40, 24, 8, 0.55);
}

.drift-wall__tile.is-active img { filter: sepia(0.06) saturate(1.12) brightness(1.03); }
.drift-wall__tile.is-active .drift-wall__overlay { opacity: 0; }

.hero-date {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 8;
  transform: translateX(-50%);
  padding: 14px 16px 16px;
  border-radius: 18px;
  background: #2b2b2b;
}

.gate-days {
  margin: 12px 0 0;
  letter-spacing: 0.14em;
  padding-left: 0.14em;
  color: var(--ink-soft);
  font-size: 15px;
}

.gate-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.date-editor {
  margin-top: 8px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  background: transparent;
  transition: transform 0.45s var(--ease), background 0.45s ease, box-shadow 0.45s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--on-light);
  box-shadow: 0 10px 22px rgba(8, 10, 24, 0.28);
}

.btn-primary:hover { transform: translateY(-2px); background: #ff9bb5; box-shadow: 0 14px 26px rgba(43, 43, 43, 0.34); }
.btn-primary:active { transform: translateY(0); background: #ff9bb5; }

.btn-pink {
  background: var(--pink);
  color: var(--on-light);
  box-shadow: 0 10px 22px rgba(8, 10, 24, 0.28);
}

.btn-pink:hover { transform: translateY(-2px); background: #d4d4d4; }
.btn-pink:active { transform: translateY(0); background: #d4d4d4; }

.btn-quiet {
  color: var(--ink);
  background: var(--mist);
  letter-spacing: 0.08em;
}

.btn-quiet:hover { background: #ff9bb5; color: var(--on-light); }
.btn-small { padding: 8px 16px; font-size: 14px; }

.btn-line {
  background: var(--sky);
  border: 0;
  color: var(--on-light);
}

.btn-line:hover { background: #d4d4d4; color: var(--on-light); }

.topbar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 12px 18px 16px;
}

.vtitle {
  writing-mode: vertical-rl;
  border: 0;
  background: transparent;
  font-family: var(--kai);
  font-size: 26px;
  letter-spacing: 0.22em;
  padding: 6px 2px;
  color: var(--ink-soft);
}

.vtitle.nav-btn {
  writing-mode: horizontal-tb;
  font-family: "Palatino Linotype", Palatino, "Times New Roman", serif;
  text-transform: uppercase;
  text-orientation: mixed;
  font-size: 15px;
  letter-spacing: 0.14em;
  padding: 6px 2px;
  transition: color 0.35s var(--ease), letter-spacing 0.4s var(--ease);
}

.vtitle.nav-btn:hover {
  color: #ff9bb5;
  letter-spacing: 0.2em;
}

.vtitle.is-active,
.vtitle.nav-btn.is-active { color: #ff9bb5; background: transparent; }

.brand {
  writing-mode: horizontal-tb;
  font-family: var(--serif);
  letter-spacing: 0.08em;
  padding: 4px 2px 8px;
  color: #ff9bb5;
}

.vrow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.photo-subs {
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  padding: 0 0 0 22px;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    max-height 0.5s var(--ease),
    opacity 0.35s var(--ease),
    transform 0.5s var(--ease),
    margin 0.5s var(--ease);
}

body.is-photos .photo-subs {
  max-height: 460px;
  margin-top: 8px;
  padding-top: 6px;
  padding-bottom: 6px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.branch-trunk {
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  border-radius: 1px;
  background: rgba(212, 212, 212, 0.35);
}

.branch-trace {
  position: absolute;
  left: 4px;
  top: var(--trace, 18px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff9bb5;
  box-shadow: 0 0 0 4px rgba(255, 155, 181, 0.28);
  transition: top 0.45s var(--ease);
}

.sub-btn {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  color: #d4d4d4;
  font-family: "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 13px;
  border-radius: 14px;
  padding: 5px 2px;
  letter-spacing: 0.12em;
  position: relative;
  transition: color 0.3s var(--ease), letter-spacing 0.4s var(--ease), transform 0.4s var(--ease);
}

.sub-btn::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 12px;
  height: 1px;
  border-radius: 1px;
  background: rgba(212, 212, 212, 0.4);
  transform: translateY(-50%) scaleX(0.35);
  transform-origin: left center;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease);
}

.sub-btn:hover,
.sub-btn.is-on {
  color: #ff9bb5;
}

.sub-btn:hover {
  letter-spacing: 0.2em;
  transform: translateX(4px);
}

.sub-btn:hover::before,
.sub-btn.is-on::before {
  background: #ff9bb5;
  transform: translateY(-50%) scaleX(1);
}

.sub-btn.is-on { letter-spacing: 0.16em; }

body.is-photos .sub-btn {
  animation: sub-in 0.45s var(--ease) both;
}

body.is-photos .sub-btn:nth-child(3) { animation-delay: 0.05s; }
body.is-photos .sub-btn:nth-child(4) { animation-delay: 0.1s; }
body.is-photos .sub-btn:nth-child(5) { animation-delay: 0.15s; }
body.is-photos .sub-btn:nth-child(6) { animation-delay: 0.2s; }

@keyframes sub-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-subs,
  .sub-btn,
  .sub-btn::before,
  .branch-trace,
  .vtitle.nav-btn { transition: none; animation: none; }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.topbar .wordmark { letter-spacing: 0.18em; font-size: 13px; padding-right: 0.18em; }

.topbar nav { display: flex; gap: 4px; }

.nav-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 16px;
  letter-spacing: 0.12em;
}

.nav-btn.is-active { background: #d4d4d4; color: var(--on-light); }

.shell {
  isolation: isolate;
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  height: 100vh;
  overflow: hidden;
}

.shell main {
  grid-column: 2;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 84px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.view {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 12px 0 22px;
}

.view-head h1 {
  font-family: var(--kai);
  font-weight: normal;
  font-size: clamp(40px, 6vw, 56px);
  margin: 0;
  letter-spacing: 0.08em;
}

.view-head p { margin: 8px 0 0; color: var(--ink-soft); }
.local-note { font-size: 13px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
  align-items: start;
}

.uploader {
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  border: 1.5px dashed rgba(140, 104, 94, 0.45);
  background: rgba(255, 251, 247, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  padding: 16px;
  transition: background 0.45s ease, border-color 0.45s ease;
}

.uploader-title { font-family: var(--kai); font-size: 28px; letter-spacing: 0.08em; }
.uploader small { color: var(--ink-soft); }
.uploader:hover, #photo-board.is-over .uploader { background: rgba(231, 213, 204, 0.85); }
#photo-board.is-over .uploader { border-style: solid; }

.shot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  transition: transform 0.6s var(--ease);
}

.shot:hover { transform: translateY(-4px); }

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.shot:hover .photo-frame img,
.shot:focus-visible .photo-frame img { transform: scale(1.04); }

.stamp, .voice-flag, .music-flag {
  position: absolute;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(247, 242, 236, 0.88);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.stamp { left: 10px; bottom: 10px; }
.voice-flag { top: 10px; right: 10px; }

.excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  padding: 0 4px;
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.empty-copy { color: var(--ink-soft); margin-top: 18px; }

.composer, .invite-card, .empty-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.composer, .invite-list { max-width: 720px; }
.composer { margin-bottom: 18px; }
.invite-list { display: grid; gap: 16px; }

.composer-kicker, .empty-card p:first-child, .invite-card h2 {
  font-family: var(--kai);
  font-weight: normal;
  letter-spacing: 0.06em;
}

.composer-kicker { margin: 0; font-size: 28px; }
.invite-card h2 { margin: 0 0 6px; font-size: 32px; word-break: break-word; }
.empty-card p:first-child { font-size: 28px; margin: 0 0 8px; color: var(--ink); }
.empty-card p { color: var(--ink-soft); margin: 0; }

.when-line {
  font-family: var(--serif);
  letter-spacing: 0.08em;
  color: var(--clay-deep);
  margin: 0 0 12px;
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--ink-soft);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay-deep);
  display: inline-block;
}

.status.accepted .dot { background: var(--moss); }
.status.rescheduled .dot { background: #d4d4d4; }

.was, .hint, .meta-line { color: var(--ink-soft); font-size: 13px; margin: 4px 0; }
.note { white-space: pre-wrap; line-height: 1.75; margin: 8px 0 0; }
.note.soft { color: var(--ink-soft); }

.card-actions, .editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
}

.reschedule {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

label, .field-label {
  display: block;
  margin: 14px 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea {
  width: min(100%, 420px);
  border: 1px solid rgba(29, 36, 64, 0.12);
  background: #d4d4d4;
  color: #2b2b2b;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.composer input[type="text"],
.composer textarea,
.modal-side textarea,
.reschedule input { width: 100%; }

textarea { min-height: 110px; line-height: 1.75; resize: vertical; }

input:focus, textarea:focus {
  border-color: #ff9bb5;
  box-shadow: 0 0 0 4px rgba(255, 155, 181, 0.35);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }

.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink-soft);
}

.chip {
  background: var(--mist);
  border-color: transparent;
}

.chip:hover { background: var(--sky); color: var(--on-light); }

.chip.is-on {
  background: var(--pink);
  color: var(--on-light);
  border-color: transparent;
}

.musicbar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
}

.musicbar:empty { display: none; }

.musicbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 18px;
  border-radius: 28px;
  background: #2b2b2b;
  border: 1px solid rgba(249, 252, 244, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -14px 28px rgba(149, 206, 232, 0.16),
    0 16px 36px rgba(71, 160, 201, 0.14);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}

.musicbar-inner p { margin: 0; flex: 1; font-size: 14px; color: var(--ink-soft); }
.track { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.track-page { font-size: 11px; letter-spacing: 0.14em; color: #d4d4d4; white-space: nowrap; }
.track-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.music-icon {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d4d4d4;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
}

.music-icon svg { width: 22px; height: 22px; display: block; }
.music-icon.play { background: #1d2440; }
.music-icon.is-on,
.music-icon:hover { color: #ff9bb5; }
.music-icon:disabled { opacity: 0.4; }

.music-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.musicbar-inner .btn { flex: 0 0 auto; white-space: nowrap; }

input[type="range"] { width: 90px; accent-color: var(--clay-deep); }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 24, 0.72);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: min(980px, calc(100vw - 28px));
  height: min(820px, calc(100vh - 40px));
  max-height: min(820px, calc(100vh - 40px));
  overflow: visible;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) min(440px, 46%);
  align-items: center;
  animation: rise 0.55s var(--ease);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

body.modal-open { overflow: hidden; }
body.modal-open .ring-stage,
body.modal-open .ring-block,
body.modal-open .cc { visibility: hidden; }

.modal-photo {
  position: relative;
  z-index: 3;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: min(680px, calc(100vh - 80px));
  overflow: visible;
  padding: 0 52px;
}

.modal-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(680px, calc(100vh - 80px));
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(40, 28, 22, 0.28));
}

.modal-photo .tilted-card {
  position: relative;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  perspective: 900px;
  z-index: 2;
}

.tilted-card__shadow { display: none; }

.tilted-card__body {
  position: relative;
  width: auto;
  height: auto;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilted-card__face {
  position: relative;
  width: auto;
  height: auto;
  overflow: visible;
  background: transparent;
}

.tilted-card__glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(farthest-corner circle at var(--tc-gx, 50%) var(--tc-gy, 50%), rgba(255, 255, 255, calc(var(--tc-glare, 0) * 0.42)) 0%, rgba(255, 255, 255, 0) 58%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.tilted-card__rim { display: none; }

.photo-player {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 251, 247, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 10px 24px rgba(40, 28, 22, 0.16);
  backdrop-filter: blur(16px);
}

.photo-player-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #1d2440;
  color: #d4d4d4;
  flex: 0 0 auto;
}

.photo-player-btn svg { width: 14px; height: 14px; }

.photo-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #2b2b2b;
}

.modal-side {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 22px 28px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(63, 55, 50, 0.18);
}

.photo-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 251, 247, 0.88);
  color: #2b2b2b;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(60, 42, 30, 0.12);
}

.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }
.photo-nav:disabled { opacity: 0.28; }
.modal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.published { font-family: var(--serif); letter-spacing: 0.06em; margin: 8px 0; }

.close-x {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 251, 247, 0.8);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.voice-box { margin-top: 22px; }

.msg {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.msg .note { margin: 6px 0 0; }

.excerpt-count {
  padding: 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.piece {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.piece .hint { flex: 1 1 100%; margin: 0; }

.music-flag { top: 10px; left: 10px; }
.danger-zone { margin-top: 28px; }

.messages { margin-top: 16px; }

.note-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 251, 247, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 10px 24px rgba(60, 42, 30, 0.05);
  outline: none;
}

.note-select {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  z-index: 0;
  border-radius: 16px;
  background: rgba(149, 206, 232, 0.38);
  box-shadow: inset 0 0 0 1px rgba(71, 160, 201, 0.25);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.note-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  border-radius: 16px;
  animation: note-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.note-text {
  flex: 1;
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  color: #2b2b2b;
}

.note-text.is-her,
.flip-notes .is-her { color: #ff9bb5; }

.note-text.is-him,
.flip-notes .is-him { color: #4c8dff; }

.note-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2b2b2b;
  opacity: 0;
}

.note-row:hover .note-x,
.note-row.is-on .note-x,
.note-row:focus-within .note-x { opacity: 1; }

.note-row.is-edit { animation: none; }
.note-row.is-edit textarea {
  flex: 1;
  min-height: 44px;
  margin: 0;
  color: #2b2b2b;
}

.note-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 251, 247, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 10px 24px rgba(60, 42, 30, 0.05);
}

.note-compose {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  animation: note-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.note-plus {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 251, 247, 0.78);
  color: #ff9bb5;
  font-size: 28px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 8px 18px rgba(60, 42, 30, 0.08);
  backdrop-filter: blur(16px);
}

.note-dialog {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: #d4d4d4;
  color: #2b2b2b;
  box-shadow: inset 0 0 0 1px rgba(222, 228, 233, 0.95);
}

.tool-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #2b2b2b;
  animation: note-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tool-row svg { width: 22px; height: 22px; }
.tool-row.is-on { color: #ff9bb5; }
.tool-row.is-live,
.tool-row.is-danger { color: #ff9bb5; }
.tool-row #rec-time:empty { display: none; }
.tool-row #rec-time { font-size: 12px; letter-spacing: 0.04em; }

.note-audio {
  width: 100%;
  height: 32px;
  margin-top: 8px;
}

@keyframes note-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.voice-box audio { width: 100%; margin: 8px 0; }

.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #1d2440;
  color: #d4d4d4;
  letter-spacing: 0.06em;
  transition: background 0.35s ease, transform 0.35s var(--ease);
}

.voice-pill.is-live { background: var(--pink); transform: scale(1.04); }

.voice-bars {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.voice-pill.is-live .voice-bars { display: flex; }

.voice-bars span {
  width: 3px;
  height: 30%;
  border-radius: 3px;
  background: #d4d4d4;
  animation: eq 0.85s ease-in-out infinite;
}

.voice-bars span:nth-child(2) { animation-delay: 0.1s; }
.voice-bars span:nth-child(3) { animation-delay: 0.2s; }
.voice-bars span:nth-child(4) { animation-delay: 0.05s; }
.voice-bars span:nth-child(5) { animation-delay: 0.18s; }
.voice-bars span:nth-child(6) { animation-delay: 0.28s; }
.voice-bars span:nth-child(7) { animation-delay: 0.12s; }

@keyframes eq {
  50% { height: 100%; }
}

.home-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.emotion-dock {
  position: fixed;
  z-index: 36;
  top: 108px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.emotion-plus {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: #2b2b2b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 24px rgba(223, 140, 173, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.emotion-look {
  margin-top: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.emotion-panel {
  position: absolute;
  top: 86px;
  right: 0;
  width: min(300px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 28px;
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -18px 30px rgba(223, 140, 173, 0.1),
    0 22px 48px rgba(71, 160, 201, 0.16);
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
}

.emotion-panel .emotion-list { margin-bottom: 12px; }
.emotion-panel .emotion-add { margin: 0; }
.emotion-panel .emotion-add input {
  width: auto;
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 252, 249, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  padding: 10px 16px;
}
.emotion-panel .btn { border-radius: 999px; }

.emotion-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.emotion-add input { flex: 1; min-width: 0; }

.emotion-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.emotion-chip { display: inline-flex; align-items: center; gap: 2px; }

.chip-x {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  line-height: 1;
}

#music-pick {
  position: fixed;
  z-index: 260;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

#music-pick.is-in { pointer-events: auto; }
#music-pick[hidden] { display: none; }

.music-pick-card {
  transform-origin: var(--ox, 100%) var(--oy, 100%);
  transform: scale(0.08);
  opacity: 0;
  transition: transform 0.46s cubic-bezier(0.16, 1.2, 0.3, 1), opacity 0.28s ease;
}

#music-pick.is-in .music-pick-card {
  transform: scale(1);
  opacity: 1;
}

.music-pick-card {
  padding: 16px;
  border-radius: 28px;
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 48px rgba(71, 160, 201, 0.14);
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
}

#music-query,
input[type="search"] {
  width: 100%;
  border: 1px solid rgba(29, 36, 64, 0.12);
  border-radius: 999px;
  background: #d4d4d4;
  color: #2b2b2b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 12px 18px;
  font-size: 15px;
  outline: none;
  appearance: none;
}

#music-query:focus,
input[type="search"]:focus {
  border-color: #ff9bb5;
  background: #d4d4d4;
}

#music-query::-webkit-search-cancel-button { appearance: none; }

#music-results {
  position: relative;
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 4px;
  padding: 2px;
}

.song-indicator {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 0;
  z-index: 0;
  border-radius: 16px;
  background: #ff9bb5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.song-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 6px;
}

.song-row.is-in { animation: song-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; }

.song-row.is-out {
  animation: none;
  max-height: 0;
  min-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(12px) scale(0.96);
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease, margin 0.22s ease;
}

@keyframes song-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.music-hit {
  display: block;
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(212, 212, 212, 0.22);
  color: #d4d4d4;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.music-hit span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row.is-on .music-hit,
.song-row:hover .music-hit {
  background: transparent;
  color: #2b2b2b;
}

.song-row:active .music-hit { transform: scale(0.985); }

.song-x {
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2b2b2b;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.song-x svg { width: 14px; height: 14px; }

.song-row:hover .song-x,
.song-row.is-on .song-x,
.song-row:focus-within .song-x {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .song-row.is-in,
  .song-row.is-out,
  .song-x { animation: none; transition: none; }
}

.music-pick-card .editor-actions { margin-top: 8px; }
.music-pick-card .btn { border-radius: 999px; }
.music-pick-card .hint { margin: 4px 8px; }

.intake-card {
  width: min(840px, 100%);
  max-height: min(900px, calc(100vh - 28px));
  overflow: auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(14, 14, 14, 0.16);
}

.intake-card img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  border-radius: 18px;
}
#bgm, #piece { position: fixed; width: 0; height: 0; opacity: 0; pointer-events: none; }

.rec-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9bb5;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(166, 92, 88, 0.45);
  animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(166, 92, 88, 0); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: 0.5s var(--ease);
  background: #d4d4d4;
  color: #2b2b2b;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 80;
  font-size: 14px;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 800px) {
  .modal-card {
    grid-template-columns: 1fr;
    grid-template-rows: min(42vh, 320px) minmax(0, 1fr);
    align-items: stretch;
  }
  .modal-photo {
    height: 100%;
    margin-right: 0;
  }
  .modal-photo img { max-height: 100%; }
  .modal-photo img { max-height: none; }
  .view-head { align-items: flex-start; flex-direction: column; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .date-zh { font-size: 18px; }
  .gate { overflow: visible; }
  .pcard img { height: min(48vh, 420px); max-width: 54vw; }
  .pcard-her img { height: min(52vh, 460px); }
  .pcard { margin: 0 -3vw; }
  .gate-side { width: min(340px, 100%); }
  .photo-layout { grid-template-columns: 1fr; }
  .line-list { flex-direction: row; overflow-x: auto; padding-left: 0; }
  .line-bar { display: none; }
  .line-item { white-space: nowrap; }
  .ring-stage { height: 440px; }
  .musicbar-inner { border-radius: 22px; flex-wrap: wrap; }
  .musicbar-inner input[type="range"] { display: none; }
  .track { flex: 1 1 120px; min-width: 0; }
  .music-actions { flex: 1 1 100%; justify-content: flex-end; }
  .home-player { width: 84px; height: 84px; right: 14px; bottom: 14px; }
}

@media (max-width: 360px) {
  .photo-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.gate-side {
  position: relative;
  z-index: 1;
  width: min(280px, 100%);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.gate .date-lockup::before { width: min(380px, 100%); height: 140px; }
.gate .gate-line { font-size: clamp(22px, 3vw, 30px); }

.profile {
  position: relative;
  width: min(250px, 100%);
  margin: 0 auto;
  padding: 14px 14px 16px;
  border-radius: 26px;
  text-align: left;
  background: #2b2b2b;
  border: 1px solid rgba(249, 252, 244, 0.18);
  box-shadow:
    0 24px 50px rgba(120, 90, 70, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.12s linear;
  overflow: hidden;
  transform-style: preserve-3d;
}

.profile-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.22;
  border-radius: inherit;
  background-image: radial-gradient(rgba(249, 252, 244, 0.28) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
  mix-blend-mode: normal;
}

.profile-foil { display: none; }

.profile-frame,
.profile-role,
.profile-name,
.profile-line,
.profile .btn,
.profile-form { position: relative; z-index: 1; }

.profile-frame {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #d4d4d4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 0 0 6px rgba(255, 251, 247, 0.35);
}

.profile-frame img { width: 100%; height: 100%; object-fit: cover; }

.profile-mark {
  font-family: var(--kai);
  font-size: 64px;
  color: rgba(29, 36, 64, 0.45);
}

.profile-role {
  margin: 12px 0 0;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--ink-soft);
}

.profile-name {
  margin: 2px 0 0;
  font-family: var(--kai);
  font-weight: normal;
  font-size: 32px;
  letter-spacing: 0.08em;
}

.profile-line {
  margin: 4px 0 0;
  min-height: 44px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.profile-form { display: grid; gap: 6px; margin-top: 12px; }
.profile-form textarea { min-height: 72px; }

.pile-wrap { margin-top: 18px; }

.stack {
  position: relative;
  width: 200px;
  height: 256px;
  margin: 0 auto;
  outline: none;
  touch-action: none;
}

.stack-card {
  position: absolute;
  inset: 0;
  transform-origin: 90% 90%;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.stack-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.45), 0 3px 8px -2px rgba(0, 0, 0, 0.18);
}

.stack-card-content,
.stack-card-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.stack-card-shade {
  position: absolute;
  inset: 0;
  background: #000;
  border-radius: inherit;
  pointer-events: none;
}

.pile-empty {
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1.5px dashed rgba(140, 104, 94, 0.4);
  background: rgba(255, 251, 247, 0.35);
  animation: none;
}

.pile-empty p {
  margin: 0;
  padding: 0 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.pile-caption {
  margin: 8px 0 0;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--ink-soft);
}

@keyframes pile-float {
  50% { transform: translateY(-8px); }
}

.photo-view {
  width: min(1180px, calc(100% - 24px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-layout,
.photo-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.photo-stage:has(.line-list) { overflow: auto; }

.line-kicker {
  margin: 8px 0 14px;
  font-family: var(--kai);
  font-size: 42px;
  letter-spacing: 0.08em;
}

.line-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
}

.line-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(140, 104, 94, 0.22);
}

.line-bar::after {
  content: "";
  position: absolute;
  left: -1px;
  top: var(--glow, 10px);
  width: 4px;
  height: 28px;
  border-radius: 4px;
  background: var(--clay-deep);
  box-shadow: 0 0 12px rgba(140, 104, 94, 0.45);
  transition: top 0.28s var(--ease);
}

.line-item {
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  padding: 11px 8px;
  border-radius: 12px;
  transform: translateX(var(--shift, 0px));
  transition: transform 0.18s linear, color 0.18s ease, background 0.18s ease;
}

.line-item.is-on { color: var(--ink); background: rgba(255, 251, 247, 0.55); }

.uploader-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 6px;
}

.uploader.uploader-compact {
  aspect-ratio: auto;
  width: auto;
  min-width: 168px;
  padding: 16px 20px;
}

.uploader-compact .uploader-title { font-size: 24px; }

.disco {
  position: relative;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.disco-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  height: auto;
  --jewel: min(420px, 50vh);
  perspective: 1200px;
  perspective-origin: 50% 46%;
  cursor: ew-resize;
  touch-action: pan-y;
}

.jewel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--jewel);
  height: var(--jewel);
  margin: calc(var(--jewel) / -2) 0 0 calc(var(--jewel) / -2);
  padding: 0;
  border: 0;
  background: transparent;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: ew-resize;
}

.jewel.is-front { cursor: pointer; }

.jewel.is-front .jewel-case {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 155, 180, 0.95),
    0 0 28px rgba(255, 155, 180, 0.55),
    0 0 56px rgba(249, 252, 244, 0.14),
    0 28px 40px rgba(60, 42, 30, 0.22);
}

.jewel-case {
  display: grid;
  grid-template-columns: 22px 1fr;
  width: 100%;
  height: 100%;
  padding: 8px 8px 9px 6px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16) 34%, rgba(150, 140, 128, 0.18)),
    #d9d3c9;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(80, 64, 50, 0.16),
    0 26px 36px rgba(60, 42, 30, 0.16);
}

.jewel-spine {
  margin: 5px 0 5px 2px;
  background: linear-gradient(90deg, #101010, #2a2a2a 46%, #0c0c0c);
}

.jewel-tray {
  position: relative;
  margin: 5px 4px 5px 7px;
  overflow: hidden;
  background: #f4efe8;
}

.jewel-tray img,
.cover-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }

.jewel-gloss {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 26%, transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 16%);
  pointer-events: none;
}

.jewel-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--kai);
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.disco-bar {
  display: flex;
  justify-content: center;
  margin-top: -8px;
}

.disco-copy { text-align: center; }

.disco-copy h2 {
  position: relative;
  display: inline-block;
  margin: 4px 0 0;
  padding: 0 0.04em;
  font-family: "Gabriola", "Segoe Script", "Palatino Linotype", serif;
  font-style: normal;
  font-weight: normal;
  font-size: 58px;
  line-height: 0.82;
  letter-spacing: 0.06em;
}

.disco-copy h2.is-han,
.spread-caption h2.is-han {
  font-family: "KaiTi", "STKaiti", "楷体", "Palatino Linotype", serif;
  font-size: 50px;
  line-height: 1;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
}

.jewel-count,
.album-count {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  color: rgba(212, 212, 212, 0.72);
  text-shadow: 0 1px 8px rgba(29, 36, 64, 0.4);
  line-height: 1;
}

.jewel-count { right: 8px; bottom: 2px; }
.album-count { right: 16px; bottom: 10px; }

.jewel-count b,
.album-count b {
  font-family: "Gabriola", "Segoe Script", "Palatino Linotype", serif;
  font-weight: normal;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.disco-nav {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #d4d4d4;
  font-size: 18px;
}

.disco-nav.prev { justify-self: start; background: transparent; color: var(--ink); }

.disco-nav.next { justify-self: end; }

.disco-nav:disabled { opacity: 0.28; }

.cover-pick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cover-choice {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mist);
}

.cover-choice.is-on { border-color: var(--pink); }

.spread {
  position: relative;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  perspective: 1400px;
  animation: spread-in 0.55s var(--ease);
}

.spread-book { transform-style: preserve-3d; will-change: transform; }

.spread-close {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 0 0 12px;
  letter-spacing: 0.12em;
}

.spread-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 1 520px;
  height: min(520px, 100%);
  min-height: 0;
  filter: drop-shadow(0 26px 28px rgba(60, 42, 30, 0.16));
}

.lid,
.tray {
  position: relative;
  min-height: 0;
  height: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
}

.lid {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.08) 42%, rgba(170, 160, 148, 0.18)),
    #d7d1c7;
  border-radius: 3px 0 0 3px;
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.28);
  transform: perspective(1100px) rotateY(8deg);
  transform-origin: right center;
}

.tray {
  display: grid;
  place-items: center;
  background: #141414;
  border-radius: 0 3px 3px 0;
  box-shadow: inset 0 0 0 12px #2a2a2a;
  transform: perspective(1100px) rotateY(-7deg);
  transform-origin: left center;
}

.orbit { position: absolute; left: 50%; top: 52%; width: 0; height: 0; }

.orbit-photo {
  position: absolute;
  width: 92px;
  height: 92px;
  max-width: none;
  margin: -46px 0 0 -46px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 10px 18px rgba(40, 28, 18, 0.2);
}

.cd {
  position: relative;
  width: min(76%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cd img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cd-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 10px, rgba(0, 0, 0, 0.22) 11px 12px);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 16%, #000 18% 42%, transparent 44% 100%);
  mask: radial-gradient(circle at 50% 50%, transparent 0 16%, #000 18% 42%, transparent 44% 100%);
}

.cd-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  height: 18%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #3a3a3a 0 22%, #0c0c0c 28% 68%, #4a4a4a 74% 100%);
  box-shadow: 0 0 0 7px rgba(0, 0, 0, 0.45);
}

.cd.is-on { animation: cd-spin 8s linear infinite; }

.spread-caption { text-align: center; margin-top: 18px; }

.spread-caption h2 {
  margin: 2px 0 8px;
  font-family: "Gabriola", "Segoe Script", "Palatino Linotype", serif;
  font-style: normal;
  font-weight: normal;
  font-size: 52px;
  line-height: 0.8;
  letter-spacing: 0.08em;
}

.level-nav {
  position: fixed;
  z-index: 40;
  top: 16px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.level-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 251, 247, 0.88);
  color: #2b2b2b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 8px 18px rgba(60, 42, 30, 0.1);
}

.level-btn svg { width: 22px; height: 22px; }

.photo-stage:has(.level-nav) .add-photo { top: 82px; }
.photo-stage:has(.level-btn + .level-btn) .add-photo { top: 148px; }

.zoom-bar { display: flex; gap: 8px; margin: 8px 0; }

@keyframes cd-spin { to { transform: rotate(360deg); } }

@keyframes spread-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.record-back { margin: 8px 0 4px; }

@media (max-width: 800px) {
  .disco-stage { height: auto; perspective: 900px; --jewel: min(220px, 34vh); }
  .disco-copy h2 { font-size: 44px; }
  .disco-copy h2.is-han,
  .spread-caption h2.is-han { font-size: 38px; }
  .jewel-count b, .album-count b { font-size: 24px; }
  .spread-book, .lid, .tray { min-height: 280px; }
  .lid, .tray { transform: none; }
  .orbit-photo { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .spread-caption h2 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .jewel { transition: none; }
  .cd.is-on, .spread { animation: none; }
}

.ring-block { margin: 8px 0 10px; }

.ring-head h2 {
  margin: 0;
  font-family: var(--kai);
  font-weight: normal;
  font-size: 32px;
  letter-spacing: 0.08em;
}

.ring-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; letter-spacing: 0.06em; }

.cc-stack {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 12px;
}

.cc {
  position: relative;
  flex: 0 0 auto;
  height: min(640px, calc(100vh - 150px));
  min-height: 460px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.cc.is-dragging { cursor: grabbing; }

.cc-view { position: absolute; inset: 0 0 54px; }

.cc-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 2000px;
  perspective-origin: 50% 46%;
}

.cc-camera,
.cc-ring,
.cc-card {
  transform-style: preserve-3d;
}

.cc-camera { position: relative; width: 0; height: 0; }

.cc-ring,
.cc-card {
  position: absolute;
  left: 0;
  top: 0;
}

.cc-card {
  width: 210px;
  height: 270px;
  margin: -135px 0 0 -105px;
  translate: 0 0 0;
  transition: translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-card:hover:not(:has(.is-flipped)),
.cc-card:has(.is-flipped) {
  translate: 0 -16px 0;
}

@media (prefers-reduced-motion: reduce) {
  .cc-card { transition: none; }
  .cc-card:hover:not(:has(.is-flipped)),
  .cc-card:has(.is-flipped) { translate: 0 0 0; }
}

.cc-plate {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #161616 center / cover no-repeat;
  transform: rotateY(180deg);
  backface-visibility: hidden;
}

.cc-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.cc-card .flip { width: 100%; height: 100%; }

.cc-card .flip-face { border-radius: 12px; }

.cc-card .flip-back { visibility: hidden; }

.cc-card .flip.is-flipped .flip-back { visibility: visible; }

.cc-shade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--cc-depth, 0);
  pointer-events: none;
}

.cc-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  margin: 0;
  text-align: center;
  font-family: "Gabriola", "Segoe Script", "Palatino Linotype", serif;
  font-style: normal;
  font-weight: normal;
  font-size: 44px;
  line-height: 0.8;
  letter-spacing: 0.08em;
}

.ring-stage {
  position: relative;
  height: 520px;
  display: grid;
  place-items: center;
  cursor: default;
  touch-action: pan-y;
  user-select: none;
}

.ring-stage.is-dragging { cursor: grabbing; }

.ring-rail {
  position: absolute;
  width: var(--dx);
  height: var(--dy);
  border-radius: 50%;
  border: 1.5px solid rgba(140, 104, 94, 0.38);
  box-shadow:
    0 0 0 10px rgba(255, 251, 247, 0.35),
    inset 0 0 40px rgba(196, 163, 148, 0.16);
  pointer-events: none;
}

.ring-rail::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -14px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 90, 70, 0.16), transparent);
}

.ring {
  position: relative;
  width: 0;
  height: 0;
}

.ring-slot {
  position: absolute;
  left: 0;
  top: 0;
  width: 196px;
  height: 248px;
  margin: -124px 0 0 -98px;
  transform-origin: center center;
}

.flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.2, 0.85, 0.2, 1);
  cursor: pointer;
}

.flip.is-flipped { transform: rotateY(180deg); }

.flip.is-flipped .flip-front { pointer-events: none; }

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
  background: #d4d4d4;
  box-shadow: 0 18px 40px rgba(90, 60, 40, 0.18);
}

.flip-front img { width: 100%; height: 100%; object-fit: cover; }

.flip-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #2b2b2b;
}

.flip-notes {
  flex: 1;
  overflow: auto;
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.55;
}

.flip-notes p { margin: 0 0 8px; white-space: pre-wrap; }
.split-ch { display: inline-block; white-space: pre; }
.flip.is-flipped .split-ch {
  animation: split-rise 0.55s var(--ease) both;
}
@keyframes split-rise {
  from { opacity: 0; transform: translateY(70%); }
  to { opacity: 1; transform: none; }
}
.flip-time, .flip-song, .flip-empty { margin: 0; color: var(--ink-soft); font-size: 12px; }
.flip-back .btn { align-self: flex-start; }

.tag-box { margin: 8px 0 4px; }

.sheet { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

.sheet-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 18px;
  background: #d4d4d4;
  color: #2b2b2b;
  box-shadow: inset 0 0 0 1px rgba(222, 228, 233, 0.95);
}

.sheet-row svg { width: 22px; height: 22px; flex: 0 0 auto; }
.map-ico, .date-ico { width: 30px; height: 30px; align-self: center; }

.sheet-date {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.sheet-row input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.place-row { padding-right: 48px; align-items: flex-start; }

.place-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.place-chip {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: #d4d4d4;
  color: #2b2b2b;
}

.place-chip.is-on { background: #ff9bb5; color: #2b2b2b; }

.place-new {
  width: 92px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #d4d4d4;
  color: #2b2b2b;
}

.place-plus {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ff9bb5;
  color: #2b2b2b;
  font-size: 20px;
  line-height: 1;
}

.who-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 6px 0 2px;
}

.who {
  width: 78px;
  height: 78px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

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

.who.is-on { box-shadow: 0 0 0 3px #ff9bb5; }

.tool-line {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 14px;
}

.tool-dot {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #d4d4d4;
  color: #2b2b2b;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1.5px #d4d4d4;
}

.tool-dot svg { width: 20px; height: 20px; }
.tool-dot.is-on { color: #ff9bb5; box-shadow: inset 0 0 0 1.5px #ff9bb5; }
.tool-dot.is-live,
.tool-dot.is-danger { background: #ff9bb5; color: #2b2b2b; box-shadow: none; }
.tool-dot #rec-time:empty { display: none; }
.tool-dot #rec-time {
  position: absolute;
  bottom: 4px;
  font-size: 9px;
}

.place-dock {
  margin-top: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
}

.place-dock input {
  width: 140px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #d4d4d4;
}

.note-actions {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.note-compose {
  background: #d4d4d4;
  border-radius: 18px;
  padding: 6px 10px;
  box-shadow: inset 0 0 0 1px rgba(222, 228, 233, 0.95);
}

.note-plus {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d4d4d4;
  box-shadow: none;
  font-size: 22px;
  color: #2b2b2b;
}

.note-dialog {
  background: transparent;
  box-shadow: none;
}
.tag-custom { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag-custom input { flex: 1; min-width: 0; }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .topbar {
    position: sticky;
    top: 0;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    z-index: 5;
    background: rgba(228, 231, 242, 0.92);
    backdrop-filter: blur(10px);
  }
  .shell { grid-template-rows: auto minmax(0, 1fr); }
  .shell main { grid-column: 1; height: auto; }
  .vtitle { font-size: 18px; }
  body.is-photos .photo-subs { flex-direction: column; max-height: 70vh; overflow: auto; }
  .topbar { background: #1d2440; }
  .intake-card { grid-template-columns: 1fr; }
  .intake-card img { height: 280px; min-height: 0; }
  .gate-side { width: min(340px, 100%); }
  .photo-layout { grid-template-columns: 1fr; }
  .line-list { flex-direction: row; overflow-x: auto; padding-left: 0; }
  .line-bar { display: none; }
  .line-item { white-space: nowrap; }
  .ring-stage { height: 400px; }
  .cc { height: min(520px, 70vh); min-height: 360px; }
  .cc-card { width: 148px; height: 196px; margin: -98px 0 0 -74px; }
  .ring-slot { width: 132px; height: 172px; margin: -86px 0 0 -66px; }
  .line-kicker { font-size: 34px; margin-bottom: 8px; }
}

.nav-toggle {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 0;
  background: #d4d4d4;
  box-shadow: 0 8px 18px rgba(8, 10, 24, 0.28);
  color: #2b2b2b;
  font-size: 22px;
  line-height: 1;
}

.add-photo {
  position: fixed;
  z-index: 35;
  top: 16px;
  right: 18px;
  width: 48px;
  height: 48px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 0;
  background: #d4d4d4;
  box-shadow: 0 12px 24px rgba(8, 10, 24, 0.28);
  color: #2b2b2b;
  cursor: pointer;
}

.add-photo span {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

body.nav-collapsed .shell { display: block; }

body.nav-collapsed .shell main {
  width: 100%;
  height: 100vh;
}

body.nav-collapsed .topbar {
  position: fixed;
  z-index: 40;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 0;
  gap: 0;
  background: transparent;
  pointer-events: none;
}

body.nav-collapsed .topbar > :not(.nav-toggle) { display: none; }

body.nav-collapsed .nav-toggle { pointer-events: auto; }
