/* ============================================================
   For You · A Birthday Album
   浅粉、纸张、衬线字、留白
   ============================================================ */

:root {
  --paper: #f7f1ec;
  --paper-deep: #efe4dc;
  --white: #fffdfb;
  --ink: #2d2123;
  --muted: #806b6e;
  --line: rgba(45, 33, 35, 0.16);
  --line-soft: rgba(45, 33, 35, 0.08);
  --blush: #edd3d4;
  --blush-deep: #d9b3b7;
  --rose: #a85f68;
  --wine: #5a3036;
  --wine-deep: #47252a;
  --gold: #b08d57;
  --serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --sans: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1200px 720px at 10% -12%, #f6e2e2 0%, transparent 62%),
    radial-gradient(980px 640px at 102% -4%, #f2e6d8 0%, transparent 56%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

::selection {
  background: var(--blush);
  color: var(--ink);
}

:focus-visible {
  outline: 1px solid var(--wine);
  outline-offset: 4px;
}

/* 纸张颗粒 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ============================================================ 文字 */

h1,
h2,
h3,
figure,
p {
  margin: 0;
}

em {
  font-style: italic;
  color: var(--wine);
}

.kicker {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================ 按钮 / 输入 */

.btn-solid,
.btn-line,
.btn-text,
.text-btn,
.round-btn,
.icon-btn,
.cover-btn {
  cursor: pointer;
  border: 0;
  background: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--wine);
  border: 1px solid var(--wine);
  color: #fbf4ef;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.btn-solid:hover {
  background: var(--wine-deep);
  border-color: var(--wine-deep);
  transform: translateY(-1px);
}

.btn-solid:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-line:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.btn-line.small {
  padding: 10px 18px;
  font-size: 9px;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.btn-text:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.btn-text.danger {
  color: var(--rose);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 7px;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.text-btn:hover {
  color: var(--wine);
  border-color: var(--wine);
}

.text-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.line-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.line-field input,
.line-field select {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.03em;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.line-field input::placeholder {
  color: #bda9a7;
}

.line-field input:focus {
  border-color: var(--wine);
}

.field-row {
  display: flex;
  gap: 22px;
}

/* ============================================================ 锁屏 */

.lock {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background:
    radial-gradient(900px 620px at 24% 12%, #f4dfe0 0%, transparent 62%),
    radial-gradient(760px 560px at 82% 88%, #f0e3d5 0%, transparent 60%),
    var(--paper);
}

.lock-frame {
  position: relative;
  width: min(1120px, 100%);
  min-height: min(720px, 88vh);
  display: grid;
  place-items: center;
  padding: clamp(26px, 6vw, 80px);
  border: 1px solid var(--line);
}

.lock-frame::before,
.lock-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold);
  opacity: 0.55;
}

.lock-frame::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.lock-frame::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}

.lock-inner {
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.lock-title {
  margin: 20px 0 16px;
  font-family: var(--serif);
  font-size: clamp(54px, 9.2vw, 108px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.lock-sub {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.lock-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

.lock-form .line-field {
  width: min(320px, 80vw);
}

.lock-form .setup-fields {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 253, 251, 0.45);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lock-error {
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.lock-hint {
  margin-top: 26px;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.lock-side {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  font-size: 8.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.7;
}

/* ============================================================ 顶栏 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px clamp(20px, 4vw, 48px);
  background: rgba(247, 241, 236, 0.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
}

.site-nav button {
  position: relative;
  padding: 6px 0;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--wine);
  transition: width 0.28s var(--ease);
}

.site-nav button:hover::after {
  width: 100%;
}

/* ============================================================ Hero */

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(54px, 8.4vw, 112px) clamp(20px, 4vw, 48px) clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(34px, 5vw, 84px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  margin: 22px 0 28px;
  font-family: var(--serif);
  font-size: clamp(56px, 8.6vw, 126px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.032em;
}

.hero-title em {
  font-style: italic;
}

.hero-second {
  color: var(--muted);
  font-style: italic;
}

.hero-cn {
  margin-bottom: 12px;
  font-size: clamp(15px, 1.5vw, 18px);
  letter-spacing: 0.24em;
}

.hero-meta {
  margin-bottom: 12px;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-since {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}

.hero-days {
  margin-bottom: 32px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--rose);
}

#heroName {
  font-style: normal;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.arch {
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(160deg, #f8e8e5 0%, #efd5d3 58%, #e4c5c3 100%);
  box-shadow: 0 46px 90px -58px rgba(90, 48, 54, 0.55);
}

.arch-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
}

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

.arch-fallback {
  padding: 20px;
  text-align: center;
  color: var(--wine);
}

.arch-date {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: 0.1em;
}

.arch-note {
  display: block;
  margin-top: 20px;
  font-size: 8.5px;
  line-height: 2.2;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.68;
}

.art-caption {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ============================================================ Section */

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 86px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 84px;
}

.section-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 50px);
}

.section-no {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title h2 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ============================================================ 相册 */

.album {
  max-width: 1040px;
  margin: 0 auto;
}

.album-book {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  perspective: 2200px;
  background: linear-gradient(135deg, #fdf9f4 0%, #f5ebe3 100%);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  box-shadow:
    0 50px 100px -62px rgba(70, 35, 40, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  overflow: hidden;
}

.album-book::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(90, 48, 54, 0.05), transparent 10%, transparent 90%, rgba(90, 48, 54, 0.05));
  z-index: 5;
}

.album-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(2.5%) rotateY(-3deg);
  transform-origin: left center;
  backface-visibility: hidden;
}

.album-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  z-index: 2;
}

/* 封面 */
.album-cover {
  background:
    radial-gradient(ellipse at 50% 14%, #f9eae7 0%, #eed3d1 62%, #e4c4c3 100%);
}

.cover-frame {
  position: absolute;
  inset: clamp(14px, 2.4vw, 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 50px);
  border: 1px solid rgba(90, 48, 54, 0.22);
  text-align: center;
}

.cover-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(176, 141, 87, 0.28);
  pointer-events: none;
}

.cover-kicker {
  margin-bottom: clamp(16px, 2.6vw, 28px);
  font-size: 8.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(90, 48, 54, 0.62);
}

.cover-title {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--wine);
}

.cover-title em {
  color: inherit;
}

.cover-name {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 0.2em;
  color: rgba(90, 48, 54, 0.82);
}

.cover-rule {
  display: block;
  width: 46px;
  height: 1px;
  margin: clamp(18px, 2.6vw, 26px) 0;
  background: rgba(90, 48, 54, 0.35);
}

.cover-date {
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(90, 48, 54, 0.62);
}

.cover-btn {
  margin-top: clamp(20px, 3vw, 32px);
  padding: 9px 0 6px;
  border-bottom: 1px solid rgba(90, 48, 54, 0.55);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--wine);
}

.cover-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.cover-index {
  position: absolute;
  left: clamp(24px, 3.4vw, 40px);
  bottom: clamp(22px, 3vw, 32px);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: rgba(90, 48, 54, 0.45);
}

/* 照片页 */
.album-photo {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: clamp(22px, 4vw, 54px);
  padding: clamp(18px, 3.2vw, 42px);
  align-items: stretch;
  background: linear-gradient(135deg, #fdf9f4 0%, #f5ebe3 100%);
}

.album-photo::before {
  content: "";
  position: absolute;
  top: clamp(18px, 3.2vw, 42px);
  bottom: clamp(18px, 3.2vw, 42px);
  left: calc(57.8% - 1px);
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(70, 40, 40, 0.14), transparent);
  pointer-events: none;
}

.photo-mat {
  position: relative;
  min-height: 0;
  padding: clamp(8px, 1.1vw, 13px);
  background: var(--white);
  box-shadow: 0 22px 44px -34px rgba(60, 30, 30, 0.55);
}

.photo-mat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.photo-mat img.is-ready {
  opacity: 1;
}

.photo-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 253, 251, 0.88);
  color: var(--wine);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}

.album-photo:hover .photo-del,
.photo-del:focus-visible {
  opacity: 1;
}

.photo-del:hover {
  background: var(--blush);
}

.photo-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: clamp(2px, 0.6vw, 8px) 0;
}

.photo-no {
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-caption {
  margin: auto 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 29px);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  cursor: text;
  overflow-wrap: anywhere;
}

.photo-caption:empty::before {
  content: "点这里写一句话";
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.photo-date {
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-star {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  color: var(--gold);
}

/* 翻页控制 */
.album-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 26px;
}

.round-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 14px;
}

.round-btn:hover:not(:disabled) {
  border-color: var(--wine);
  color: var(--wine);
  background: rgba(255, 253, 251, 0.6);
}

.round-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.album-count {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.count-line {
  display: block;
  width: 52px;
  height: 1px;
  background: var(--line);
}

/* ============================================================ 信件 */

.letters-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.letter-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.form-kicker {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.letter-form textarea {
  width: 100%;
  min-height: 132px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 27px);
  line-height: 1.62;
  color: var(--ink);
  outline: none;
}

.letter-form textarea::placeholder {
  font-style: italic;
  color: #b9a5a3;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.select-wrap select {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
  outline: none;
}

.letter-list {
  margin-top: 8px;
}

.letter {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-soft);
}

.letter-quote {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 0.78;
  color: var(--blush-deep);
  user-select: none;
}

.letter-text {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.82;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.letter-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.letter-author {
  color: var(--wine);
}

.letter-del {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

.letter:hover .letter-del,
.letter-del:focus-visible {
  opacity: 1;
}

.letter-del:hover {
  color: var(--rose);
}

.letters-empty {
  padding: 52px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  text-align: center;
}

/* ============================================================ 页脚 / 音乐 */

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px clamp(20px, 4vw, 48px) 58px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line);
}

.music-btn {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 40;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 251, 0.85);
  color: var(--wine);
  font-family: var(--serif);
  font-size: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 34px -24px rgba(70, 35, 40, 0.45);
}

.music-btn.playing {
  background: var(--wine);
  border-color: var(--wine);
  color: #fbf4ef;
}

/* ============================================================ 提示 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 90;
  max-width: min(90vw, 440px);
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--wine);
  color: #fbf4ef;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  box-shadow: 0 20px 40px -20px rgba(45, 20, 25, 0.65);
}

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

/* ============================================================ 设置 */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 33, 35, 0.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -40px rgba(45, 20, 25, 0.55);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.modal-head h3 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.icon-btn:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.setting-group {
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}

.setting-label {
  margin-bottom: 14px;
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.setting-note {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.setting-note + .setting-note {
  margin-top: 8px;
}

.setting-note.url {
  padding: 11px 13px;
  border: 1px dashed var(--line);
  background: var(--white);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11.5px;
  color: var(--wine);
  word-break: break-all;
  user-select: all;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.save-tip {
  font-size: 11px;
  color: var(--rose);
}

/* ============================================================ 大图 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 44px);
  background: rgba(30, 18, 20, 0.93);
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
}

.lightbox img {
  display: block;
  max-width: min(90vw, 1000px);
  max-height: 76vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: #f2e3dd;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================================ 花瓣 */

#petals {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============================================================ 响应式 */

@media (max-width: 960px) {
  .site-header {
    background: rgba(247, 241, 236, 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .music-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .grain {
    display: none;
  }

  #petals {
    display: none;
  }

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

  .hero-art {
    width: min(300px, 70vw);
    margin: 0 auto;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }

  .section-head .btn-line {
    justify-self: start;
  }

  .album-book {
    aspect-ratio: 4 / 5;
    max-width: 560px;
    margin: 0 auto;
  }

  .album-photo {
    grid-template-columns: 1fr;
    grid-template-rows: 1.38fr 0.62fr;
    gap: 16px;
    padding: 16px;
  }

  .album-photo::before {
    display: none;
  }

  .photo-copy {
    padding: 0 4px;
  }

  .photo-caption {
    margin: 6px 0;
    font-size: clamp(17px, 3.2vw, 22px);
  }

  .site-footer {
    padding-bottom: 44px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 13px 18px;
    gap: 10px;
  }

  .brand-mark {
    font-size: 21px;
  }

  .brand-sub {
    display: none;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav button {
    font-size: 8.5px;
    letter-spacing: 0.16em;
  }

  .hero {
    padding-top: 38px;
    padding-bottom: 40px;
  }

  .hero-title {
    margin: 18px 0 22px;
    font-size: clamp(48px, 14.5vw, 72px);
  }

  .hero-cn {
    letter-spacing: 0.16em;
  }

  .hero-days {
    margin-bottom: 26px;
    font-size: 14px;
  }

  .hero-actions {
    gap: 20px;
  }

  .hero-art {
    width: min(260px, 72vw);
  }

  .lock {
    padding: 10px;
  }

  .lock-frame {
    min-height: 88vh;
    padding: 26px 16px;
  }

  .lock-side {
    display: none;
  }

  .lock-title {
    font-size: clamp(46px, 14vw, 64px);
  }

  .lock-form {
    gap: 20px;
    margin-top: 28px;
  }

  .lock-form .setup-fields {
    padding: 16px;
  }

  .line-field input,
  .line-field select {
    font-size: 16px;
  }

  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .album-book {
    aspect-ratio: 3 / 4;
    max-width: 100%;
  }

  .album-photo {
    grid-template-rows: 1.42fr 0.58fr;
    padding: 12px;
    gap: 12px;
  }

  .photo-mat {
    padding: 7px;
  }

  .photo-caption {
    font-size: 17px;
    line-height: 1.45;
  }

  .cover-title {
    font-size: clamp(40px, 12vw, 54px);
  }

  .cover-name {
    font-size: 14px;
  }

  .album-bar {
    gap: 18px;
    margin-top: 20px;
  }

  .round-btn {
    width: 42px;
    height: 42px;
  }

  .count-line {
    width: 34px;
  }

  .letter {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 12px;
    padding: 26px 0;
  }

  .letter-quote {
    font-size: 38px;
  }

  .letter-text {
    font-size: 17px;
    line-height: 1.78;
  }

  .form-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-foot .btn-solid {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: 92vh;
  }

  .field-row {
    flex-direction: column;
    gap: 16px;
  }

  .music-btn {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .toast {
    bottom: 84px;
  }
}

@media (hover: none) {
  .photo-del,
  .letter-del {
    opacity: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
