:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --c0: #ffffff;
  --c1: #fff6fb;
  --c2: #ffe8f3;
  --c3: #ffd0e8;
  --c4: #ffb3da;
  --c5: #ff8cc8;
  --c6: #e85a9c;
  --c7: #b83d7a;
  --c8: #4a2c3d;
  --c9: #2a1822;
  --edge: #ffffff;
  --shadow: #c94b86;
  --slot: 4px;
}

/* —— 全局像素渲染 —— */
.pixel-root {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pixel-root,
.pixel-root * {
  border-radius: 0 !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--c8);
  overflow-x: hidden;
  /* 阶梯色带：伪渐变 */
  background-color: var(--c2);
  background-image: repeating-linear-gradient(
      0deg,
      var(--c0) 0px,
      var(--c0) 4px,
      var(--c1) 4px,
      var(--c1) 8px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 8px,
      rgba(255, 140, 200, 0.06) 8px,
      rgba(255, 140, 200, 0.06) 16px
    ),
    linear-gradient(180deg, var(--c0) 0%, var(--c2) 38%, var(--c4) 72%, var(--c3) 100%);
  background-blend-mode: normal, normal, normal;
  background-attachment: fixed;
}

img,
canvas {
  image-rendering: crisp-edges;
}

/* 背景爱心：更小块、更像素 */
.bg-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffb3da' d='M4 7H3V6H2V5H1V3H2V2H3V3H4V2H5V3H6V5H5V6H4V7Z'/%3E%3C/svg%3E");
  /* 拉大平铺间距，同屏爱心数量少很多 */
  background-size: clamp(112px, 28vw, 168px) clamp(112px, 28vw, 168px);
  animation: drift 36s linear infinite;
}

@keyframes drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 200px 140px;
  }
}

/* 轻微扫描线 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.35) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

/* 未通过密码前：整站主体不渲染在版心里，避免透视 / 滚动看到 */
.site-body.site-body--locked {
  display: none !important;
}

.site-body {
  position: relative;
  z-index: 1;
}

.site-header,
.main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  text-align: center;
  padding: 20px 12px 8px;
}

.pixel-tag {
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--c7);
  margin: 0 0 12px;
  text-shadow: 2px 2px 0 var(--c1);
}

.site-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--c9);
  text-shadow:
    2px 0 0 var(--edge),
    -2px 0 0 var(--edge),
    0 2px 0 var(--edge),
    0 -2px 0 var(--edge),
    4px 4px 0 rgba(232, 90, 156, 0.45);
}

.heart-pixel {
  color: var(--c6);
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  vertical-align: middle;
  animation: blink 1.2s steps(2, end) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.35;
  }
}

.site-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c7);
  text-shadow: 1px 1px 0 var(--c0);
}

.main {
  padding: 8px 10px 28px;
  max-width: 520px;
  margin: 0 auto;
}

.wall-section {
  background: var(--c1);
  border: var(--slot) solid var(--edge);
  box-shadow: var(--slot) var(--slot) 0 var(--shadow), calc(var(--slot) * 2) calc(var(--slot) * 2) 0 rgba(74, 44, 61, 0.12);
  padding: 10px 8px 12px;
  position: relative;
}

.wall-section::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(232, 90, 156, 0.35);
  pointer-events: none;
}

.wall-intro {
  text-align: center;
  padding: 0 6px 10px;
}

/* 叠在大相框照片上方，顶部铺满渐变保证字可读 */
.wall-intro--frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 12px 10px 16px;
  margin: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 252, 254, 0.98) 0%,
    rgba(255, 245, 250, 0.82) 35%,
    rgba(255, 236, 246, 0.35) 65%,
    transparent 100%
  );
}

.wall-badge {
  display: inline-block;
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.6;
  padding: 8px 10px;
  background: var(--c5);
  color: var(--c0);
  border: var(--slot) solid var(--c7);
  box-shadow: var(--slot) var(--slot) 0 var(--c7);
}

.wall-badge--gift {
  cursor: pointer;
  font-size: 11px;
  padding: 9px 12px;
  border: var(--slot) solid var(--c7);
  pointer-events: auto;
}

.wall-intro--frame .wall-badge--gift {
  pointer-events: auto;
}

.wall-hint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c8);
}

.wall-intro--frame .wall-hint {
  color: var(--c9);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(255, 255, 255, 0.9);
}

/* 大相框：加高，标题区与爱心都在同一张底图上，上面不再空一条 */
.heart-frame-wrap {
  position: relative;
  width: min(96vw, 480px);
  aspect-ratio: 9 / 13;
  margin: 0 auto;
  border: var(--slot) solid var(--edge);
  box-shadow:
    var(--slot) var(--slot) 0 var(--shadow),
    inset 0 0 0 3px rgba(255, 255, 255, 0.45);
  overflow: hidden;
  background: var(--c3);
}

.heart-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.heart-grid {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 3.5vw, 20px);
  top: auto;
  transform: translateX(-50%);
  z-index: 3;
  width: min(80vw, 360px);
  aspect-ratio: 1 / 1.05;
  image-rendering: auto;
}

.photo-slot {
  position: absolute;
  width: var(--slot-size, 10%);
  height: var(--slot-size, 10%);
  left: var(--x, 0%);
  top: var(--y, 0%);
  transform: translate(-50%, -50%);
  border: var(--slot) solid var(--edge);
  background: repeating-linear-gradient(
      180deg,
      var(--c2) 0px,
      var(--c2) 3px,
      var(--c3) 3px,
      var(--c3) 6px
    );
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.75), 2px 2px 0 rgba(185, 61, 122, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: clamp(7px, 1.8vw, 9px);
  line-height: 1;
  color: var(--c7);
}

.photo-slot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed rgba(232, 90, 156, 0.45);
  pointer-events: none;
}

.photo-slot span {
  position: relative;
  z-index: 1;
  opacity: 0.85;
}

.photo-slot.has-photo {
  padding: 0;
  overflow: hidden;
}

.photo-slot.has-photo img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  display: block;
  pointer-events: none;
  image-rendering: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.photo-slot.has-photo::after {
  z-index: 2;
}

/* 手机端：爱心区域更大、单格更大、相框略加长，照片更易辨认 */
@media (max-width: 540px) {
  .heart-frame-wrap {
    aspect-ratio: 10 / 15;
  }

  .heart-grid {
    width: min(90vw, 420px);
    bottom: clamp(6px, 2.2vw, 14px);
  }

  .photo-slot {
    border-width: 2px;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.65), 1px 1px 0 rgba(185, 61, 122, 0.35);
  }

  .photo-slot::after {
    inset: 3px;
  }

  .photo-slot.has-photo img {
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
  }
}

.site-footer {
  text-align: center;
  padding: 0 12px 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--c7);
  text-shadow: 1px 1px 0 var(--c0);
}

/* —— 领取今日鲜花弹窗（仅站内，高于音乐播放器） —— */
.flower-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.flower-modal.is-hidden {
  display: none !important;
}

.flower-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 24, 34, 0.55);
}

.flower-modal__panel {
  position: relative;
  width: min(100%, 340px);
  max-height: min(88dvh, 620px);
  overflow: auto;
  padding: 44px 14px 16px;
  background: linear-gradient(180deg, #fffefb, #fff0f7);
  border: var(--slot) solid var(--c6);
  box-shadow: var(--slot) var(--slot) 0 var(--c7), 0 12px 40px rgba(74, 44, 61, 0.2);
  -webkit-overflow-scrolling: touch;
}

html.pixel-root .flower-modal__panel {
  border-radius: 12px !important;
}

.flower-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  color: var(--c7);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--c4);
  box-shadow: 2px 2px 0 rgba(232, 90, 156, 0.25);
}

.flower-modal__close:active {
  transform: translate(1px, 1px);
}

.flower-modal__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--c9);
}

.flower-modal__img-wrap {
  margin: 0 auto 12px;
  max-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border: 2px solid var(--c4);
}

.flower-modal__img {
  display: block;
  max-width: 100%;
  max-height: 48vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.flower-modal__err {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #c62828;
}

.flower-modal__err.is-hidden {
  display: none;
}

.flower-modal__hint {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c8);
  text-align: center;
}

.flower-modal__code {
  margin: 0 0 14px;
  padding: 12px 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--c6);
  background: rgba(255, 200, 228, 0.45);
  border: 2px dashed var(--c6);
}

.flower-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.flower-btn {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: var(--slot) solid transparent;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

.flower-btn__icon {
  margin-right: 4px;
  font-weight: 800;
}

.flower-btn--like {
  background: linear-gradient(180deg, #43a047, #2e7d32);
  color: #fff;
  border-color: #1b5e20;
}

.flower-btn--dislike {
  background: linear-gradient(180deg, #ef5350, #c62828);
  color: #fff;
  border-color: #8b0000;
}

.flower-btn--ok {
  display: block;
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(180deg, var(--c5), var(--c6));
  color: #fff;
  border-color: var(--c7);
}

.flower-modal__step.is-hidden {
  display: none !important;
}

body.flower-modal-open {
  overflow: hidden;
}

/* —— 右上角迷你黑胶播放器（参考常见黑胶+唱臂+底栏 UI；在密码层之上、告白信之下） —— */
/* 站点全局禁止圆角时，单独恢复播放器圆角 */
html.pixel-root .vinyl-player {
  border-radius: 14px !important;
}

html.pixel-root .vinyl-player__disc,
html.pixel-root .vinyl-player__disc-label,
html.pixel-root .vinyl-player__disc-shine,
html.pixel-root .vinyl-player__arm-pivot,
html.pixel-root .vinyl-player__tbtn--main {
  border-radius: 50% !important;
}

html.pixel-root .vinyl-player__tbtn:not(.vinyl-player__tbtn--main) {
  border-radius: 8px !important;
}

html.pixel-root .vinyl-player__switch {
  border-radius: 8px !important;
}

html.pixel-root .vinyl-player__arm-rod,
html.pixel-root .vinyl-player__arm-head {
  border-radius: 2px !important;
}

.vinyl-player {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 88;
  width: 132px;
  padding: 10px 10px 8px;
  background: linear-gradient(165deg, #ffffff 0%, #faf7fb 55%, #f5eef6 100%);
  border: 1px solid rgba(232, 90, 156, 0.35);
  border-radius: 14px !important;
  box-shadow:
    0 8px 24px rgba(74, 44, 61, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  pointer-events: auto;
}

.vinyl-player__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  min-height: 22px;
}

.vinyl-player__track {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--c8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinyl-player__switch {
  flex: 0 0 auto;
  min-width: 30px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid rgba(232, 90, 156, 0.45);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--c7);
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--font);
}

.vinyl-player__switch:hover {
  background: rgba(232, 90, 156, 0.12);
  color: var(--c6);
}

.vinyl-player__switch:focus-visible {
  outline: 2px solid var(--c6);
  outline-offset: 2px;
}

.vinyl-player__deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 8px;
}

.vinyl-player__disc-btn {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  position: relative;
}

.vinyl-player__disc-btn:focus-visible {
  outline: 2px solid var(--c6);
  outline-offset: 2px;
  border-radius: 12px !important;
}

.vinyl-player__disc {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  clip-path: circle(50% at 50% 50%);
  border-radius: 50% !important;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, rgba(255, 255, 255, 0.04) 2px 3px),
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    conic-gradient(from 0deg, #1a1a1a, #0d0d0d, #252525, #111, #1a1a1a);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 3px 10px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 50%;
  position: relative;
}

.vinyl-player__disc-shine {
  position: absolute;
  inset: 0;
  border-radius: 50% !important;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22) 0%, transparent 38%, transparent 62%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

.vinyl-player__disc-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #ffb8dc, var(--c6));
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.vinyl-player__arm {
  position: relative;
  width: 44px;
  height: 56px;
  flex-shrink: 0;
}

.vinyl-player__arm-pivot {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #f2f2f2, #b8b8b8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.vinyl-player__arm-rod {
  position: absolute;
  right: 10px;
  top: 14px;
  width: 3px;
  height: 34px;
  background: linear-gradient(90deg, #eaeaea, #c4c4c4);
  transform-origin: 50% 0;
  transform: rotate(18deg);
  border-radius: 2px !important;
  z-index: 1;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease;
}

.vinyl-player__arm-head {
  position: absolute;
  right: 5px;
  bottom: 10px;
  width: 10px;
  height: 6px;
  background: #3a3a3a;
  border-radius: 2px !important;
  transform: rotate(18deg);
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.vinyl-player.is-playing .vinyl-player__disc {
  animation: vinyl-spin 5.6s linear infinite;
  will-change: transform;
}

.vinyl-player.is-playing .vinyl-player__arm-rod {
  transform: rotate(10deg);
}

.vinyl-player.is-playing .vinyl-player__arm-head {
  transform: rotate(10deg);
}

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

.vinyl-player__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 2px;
  border-top: 1px solid rgba(232, 90, 156, 0.15);
}

.vinyl-player__hint {
  margin: 6px 0 0;
  padding: 0 2px;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  color: var(--c7);
  opacity: 0.88;
}

.vinyl-player__tbtn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--c8);
  font-size: 15px;
  line-height: 1;
  border-radius: 8px !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.vinyl-player__tbtn:hover {
  background: rgba(232, 90, 156, 0.12);
  color: var(--c6);
}

.vinyl-player__tbtn--main {
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: 50% !important;
  background: linear-gradient(145deg, var(--c5), var(--c6));
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 90, 156, 0.45);
}

.vinyl-player__tbtn--main:hover {
  background: linear-gradient(145deg, var(--c6), var(--c7));
  color: #fff;
}

.vinyl-player__tbtn:focus-visible {
  outline: 2px solid var(--c6);
  outline-offset: 2px;
}

/* —— 告白信：无模糊，硬边面板 —— */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  /* 底色加实，避免已解锁时底下主页透出来 */
  background-color: rgba(36, 22, 30, 0.94);
  background-image: repeating-linear-gradient(
      0deg,
      rgba(42, 24, 34, 0.55),
      rgba(42, 24, 34, 0.55) 2px,
      rgba(74, 44, 61, 0.45) 2px,
      rgba(74, 44, 61, 0.45) 4px
    );
  opacity: 1;
  transition: opacity 0.2s steps(3, end), visibility 0.2s steps(3, end);
}

.letter-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.letter-panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(88dvh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--c1);
  border: var(--slot) solid var(--c6);
  box-shadow: var(--slot) var(--slot) 0 var(--c7), calc(var(--slot) * 2) calc(var(--slot) * 2) 0 var(--edge);
  overflow: hidden;
}

.letter-envelope-top,
.letter-envelope-bottom {
  height: 12px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--c4) 0px,
    var(--c4) 6px,
    var(--c0) 6px,
    var(--c0) 12px
  );
  border-bottom: var(--slot) solid var(--c6);
}

.letter-envelope-bottom {
  border-top: var(--slot) solid var(--c6);
  border-bottom: none;
}

.letter-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 8px;
  -webkit-overflow-scrolling: touch;
}

.letter-kicker {
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.6;
  color: var(--c6);
  margin: 0 0 6px;
  text-align: center;
  text-shadow: 2px 2px 0 var(--c0);
}

.letter-to {
  text-align: center;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--c9);
}

.letter-body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--c8);
}

.letter-highlight {
  color: var(--c6);
  font-size: 14px !important;
  font-weight: 700;
  text-align: center;
  padding: 10px 8px;
  background: var(--c3);
  border: var(--slot) dashed var(--c6);
  box-shadow: inset 0 0 0 2px var(--c0);
}

.letter-sign {
  margin-top: 6px !important;
  color: var(--c9);
  font-weight: 700;
}

.pixel-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.5;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--c0);
  background: var(--c6);
  border: var(--slot) solid var(--c0);
  box-shadow: var(--slot) var(--slot) 0 var(--c9);
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--c9);
}

/* —— 访问密码门（在告白信之后） —— */
body.gate-active {
  overflow: hidden;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: repeating-linear-gradient(
      0deg,
      rgba(42, 24, 34, 0.62),
      rgba(42, 24, 34, 0.62) 2px,
      rgba(74, 44, 61, 0.5) 2px,
      rgba(74, 44, 61, 0.5) 4px
    );
  opacity: 1;
  transition: opacity 0.2s steps(3, end), visibility 0.2s steps(3, end);
}

.gate-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-panel {
  width: min(100%, 360px);
  padding: 20px 16px 18px;
  background: var(--c1);
  border: var(--slot) solid var(--c6);
  box-shadow: var(--slot) var(--slot) 0 var(--c7), calc(var(--slot) * 2) calc(var(--slot) * 2) 0 var(--edge);
}

.gate-panel--shake {
  animation: gate-shake 0.35s steps(2, end);
}

@keyframes gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.gate-title {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.6;
  color: var(--c6);
  text-align: center;
  text-shadow: 2px 2px 0 var(--c0);
}

.gate-hint {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c8);
  text-align: center;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.gate-input {
  width: 100%;
  padding: 12px 10px;
  font-size: 15px;
  line-height: 1.35;
  font-family: var(--font);
  color: var(--c9);
  background: var(--c0);
  border: var(--slot) solid var(--c8);
  box-shadow: inset 3px 3px 0 var(--c2);
}

.gate-input:focus {
  outline: none;
  border-color: var(--c6);
  box-shadow: inset 3px 3px 0 var(--c2), 0 0 0 2px var(--c4);
}

.gate-error {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--c6);
  font-weight: 700;
  text-align: center;
}

.gate-error.is-hidden {
  display: none;
}

.gate-submit {
  margin-top: 4px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.6;
  cursor: pointer;
  color: var(--c0);
  background: var(--c6);
  border: var(--slot) solid var(--c7);
  box-shadow: var(--slot) var(--slot) 0 var(--c7);
}

.gate-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--c7);
}

/* —— 全站随机浮层照片（单张、约 1/3 视口；z 高于黑胶 88，低于告白信 90 / 鲜花 96） —— */
.float-photo-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 89;
  overflow: hidden;
  transform: translateZ(0);
}

.float-photo-layer.is-hidden {
  visibility: hidden;
}

.float-photo-img {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 14px 44px rgba(74, 44, 61, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: scale(0.92) translate3d(0, 12px, 0);
  transition: opacity 0.22s cubic-bezier(0.26, 0.88, 0.32, 0.98), transform 0.22s cubic-bezier(0.26, 0.88, 0.32, 0.98);
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.pixel-root .float-photo-layer .float-photo-img {
  border-radius: 10px !important;
}

.float-photo-img.float-photo-img--in {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
}

.float-photo-img.float-photo-img--out {
  opacity: 0;
  transform: scale(0.94) translate3d(0, -10px, 0);
}

@media (min-width: 480px) {
  .site-title {
    font-size: 26px;
  }

  .letter-body p {
    font-size: 15px;
  }
}
