/* ===================================================================
   爱思纪念馆 · Aisi Memorial Hall
   手机优先 H5，单页，无外部依赖
   =================================================================== */

/* ---------- tokens ---------- */
:root {
  --ink: #f3ebe0;
  --dim: rgba(243, 235, 224, .62);
  --faint: rgba(243, 235, 224, .34);
  --candle: #ffb469;
  --candle-hi: #ffe1ba;
  --rose: #e0918c;
  --line: rgba(255, 206, 150, .14);
  --paper: #f4ecdf;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --col: 480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #06050a;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

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

button { cursor: pointer; border: 0; background: none; font: inherit; color: inherit; }

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

/* ---------- app frame ---------- */
#app {
  position: relative;
  z-index: 2;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100dvh;
  background:
    radial-gradient(120% 62% at 50% -8%, #1c1623 0%, #0e0b13 46%, #08070d 100%);
  box-shadow: 0 0 140px rgba(255, 180, 105, .07);
  overflow-x: hidden;
}

/* film grain */
#app::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

#dust {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: min(100vw, var(--col));
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
}

/* ---------- views ---------- */
.view {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.view.enter { opacity: 1; transform: none; }

/* ---------- top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(9, 7, 13, .95) 0%, rgba(9, 7, 13, .72) 62%, rgba(9, 7, 13, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bar-title {
  flex: 1;
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--ink);
  line-height: 1.2;
}
.bar-title small {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--faint);
  margin-top: 3px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  transition: background .25s, color .25s;
  flex: 0 0 auto;
}
.icon-btn:active { background: rgba(255, 210, 160, .1); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .14em;
  transition: transform .2s var(--ease), box-shadow .3s, background .3s, opacity .3s;
  white-space: nowrap;
}
.btn:active { transform: scale(.965); }

.btn.primary {
  color: #241a12;
  background: linear-gradient(165deg, #ffd7a6, #ffb46a 62%, #ec9a53);
  box-shadow: 0 12px 34px -14px rgba(255, 170, 90, .95), inset 0 1px 0 rgba(255, 255, 255, .5);
  font-weight: 600;
}
.btn.ghost {
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255, 214, 170, .04);
}
.btn.ghost:active { background: rgba(255, 214, 170, .1); color: var(--ink); }

/* ===================================================================
   门厅 Gate
   =================================================================== */
.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(26px + env(safe-area-inset-top)) 30px calc(26px + env(safe-area-inset-bottom));
}

.gate-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 176, 100, .30) 0%, rgba(255, 150, 80, .10) 42%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}

.lantern {
  width: 118px;
  margin-bottom: 26px;
  filter: drop-shadow(0 22px 44px rgba(255, 160, 80, .34));
  animation: sway 6.5s ease-in-out infinite;
  transform-origin: 50% 0;
}
.lantern svg { display: block; width: 100%; height: auto; }

.gate h1 {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: .30em;
  margin: 0 0 14px;
  text-indent: .30em;
  color: #fff4e4;
  text-shadow: 0 0 34px rgba(255, 180, 110, .45);
}

.gate .sub {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .22em;
  color: rgba(255, 214, 170, .78);
  margin: 0 0 30px;
  text-indent: .22em;
}

.gate .lede {
  font-size: 13px;
  line-height: 2.25;
  color: var(--dim);
  margin: 0 0 34px;
  letter-spacing: .08em;
  max-width: 288px;
  text-align: center;
}

.gate-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; width: 100%; }
.gate-actions .btn { width: min(100%, 250px); }
/* 「我点过的灯」：夹在两个按钮下面，隔一条细线，点击区域和主按钮一样大（手机上容易点） */
.acct-entry {
  margin-top: 6px;
  min-height: 46px;
  border-style: dashed;
  border-color: rgba(255, 206, 150, .22);
  font-size: 13px;
  letter-spacing: .1em;
}

.gate-stats {
  margin-top: 30px;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--faint);
  line-height: 1.9;
}
.gate-stats b { color: rgba(255, 206, 150, .9); font-weight: 600; font-variant-numeric: tabular-nums; }

.gate-foot {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  padding: 0 30px;
  font-size: 10.5px;
  line-height: 1.9;
  color: rgba(243, 235, 224, .32);
  letter-spacing: .03em;
  text-align: center;
  /* 它是垫在最底下的说明文字，绝对不能挡住上面可点的东西 */
  pointer-events: none;
}

/* ===================================================================
   灯墙 Wall
   =================================================================== */
.wall-intro {
  padding: 4px 20px 16px;
  text-align: center;
}
.wall-intro p {
  margin: 0;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: .18em;
  color: rgba(255, 206, 150, .5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 8px;
  padding: 0 14px;
}

.niche {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: none;
  transition: transform .28s var(--ease);
}
.niche:active { transform: scale(.94); }

.niche-arch {
  position: relative;
  width: 100%;
  aspect-ratio: .84;
  border-radius: 52% 52% 9px 9px / 40% 40% 9px 9px;
  background: linear-gradient(178deg, #0d0b12 0%, #131020 100%);
  border: 1px solid rgba(255, 214, 168, .08);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
}

.niche.lit .niche-arch {
  border-color: rgba(255, 190, 120, .26);
  background:
    radial-gradient(76% 58% at 50% 84%, rgba(255, 170, 90, .40) 0%, rgba(255, 140, 80, .10) 46%, #0d0b12 78%),
    linear-gradient(178deg, #100d16 0%, #16111f 100%);
  box-shadow:
    0 0 20px -6px rgba(255, 170, 90, .5),
    inset 0 -24px 30px -20px rgba(255, 195, 130, .55);
}

.niche-photo {
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(255, 190, 120, .28), 0 0 0 1px rgba(255, 220, 180, .16);
  transform: translateY(-8%);
  background: #17121d;
}
.niche-photo img, .niche-photo svg { width: 100%; height: 100%; display: block; object-fit: cover; }

.niche-name {
  margin-top: 5px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: rgba(243, 235, 224, .72);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.niche-flowers {
  font-size: 9px;
  letter-spacing: .06em;
  color: rgba(255, 190, 140, .5);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.niche.mine .niche-arch::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 206, 150, .34);
  pointer-events: none;
}

/* empty slot */
.niche.empty .niche-arch {
  border-style: dashed;
  border-color: rgba(255, 214, 168, .10);
  background: rgba(255, 240, 220, .012);
}
.niche.empty .plus {
  font-size: 18px;
  color: rgba(255, 214, 168, .30);
  font-weight: 300;
  transition: color .3s;
}
.niche.empty:active .plus { color: rgba(255, 214, 168, .5); }
.niche.empty .niche-name { color: rgba(243, 235, 224, .2); font-size: 9.5px; }

/* candle flame (shared) */
.flame-core {
  position: relative;
  width: 7px;
  height: 11px;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 74%, #fffaf0 0%, #ffd79a 38%, #ff9f4d 72%, rgba(255, 120, 40, 0) 100%);
  box-shadow: 0 0 12px 3px rgba(255, 170, 80, .55), 0 0 26px 8px rgba(255, 140, 60, .22);
  animation: flick 3.4s ease-in-out infinite;
}

/* 烛台：蜡烛 + 火苗 + 光晕 */
.candle {
  position: absolute;
  bottom: 7.5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}
.candle .wax {
  position: relative;
  width: 15px;
  height: 24px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #f9eedb 0%, #e9d4b2 55%, #c8a781 100%);
  box-shadow: inset 0 -9px 10px -8px rgba(110, 72, 34, .55), 0 0 20px rgba(255, 180, 110, .3);
}
.candle .wax::before {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  width: 1.5px; height: 5px;
  margin-left: -.75px;
  background: #6d5644;
  border-radius: 1px;
}
.candle .flame {
  display: block;
  width: 13px;
  height: 19px;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 7px rgba(255, 172, 84, .8)) drop-shadow(0 0 18px rgba(255, 150, 60, .45));
  animation: flameFlick 3s ease-in-out infinite;
  transform-origin: 50% 92%;
}
.candle .glow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(255, 186, 120, .42), rgba(255, 150, 70, .12) 46%, transparent 72%);
  filter: blur(3px);
}

/* 灯格里的小烛火 */
.niche .candle { bottom: 5%; }
.niche .candle .wax { width: 8px; height: 12px; border-radius: 2px; }
.niche .candle .wax::before { top: -2.5px; height: 3px; }
.niche .candle .flame { width: 6px; height: 9px; margin-bottom: 1px; filter: drop-shadow(0 0 5px rgba(255, 172, 84, .85)); }
.niche .candle .glow { width: 74px; height: 56px; opacity: .8; }

@keyframes flameFlick {
  0%, 100% { transform: scale(1, 1); opacity: .95; }
  25% { transform: scale(.93, 1.08) translateY(-.5px); opacity: 1; }
  50% { transform: scale(1.06, .94) translateY(.5px); opacity: .88; }
  75% { transform: scale(.97, 1.04); opacity: 1; }
}

.wall-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 6px;
}
.wall-nav button {
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--faint);
  padding: 8px 4px;
  transition: color .25s;
}
.wall-nav button:disabled { opacity: .25; }
.wall-nav button:not(:disabled):active { color: var(--ink); }
.wall-dots { display: flex; gap: 6px; }
.wall-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 206, 150, .18);
  transition: background .3s, transform .3s;
}
.wall-dots i.on { background: rgba(255, 180, 110, .9); transform: scale(1.5); }

.wall-cta {
  padding: 22px 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.wall-cta .note { font-size: 11px; color: var(--faint); letter-spacing: .08em; }

/* ===================================================================
   纪念馆 Memorial
   =================================================================== */
.niche-stage {
  position: relative;
  padding: 6px 16px 0;
  text-align: center;
}
.stage-glow {
  position: absolute;
  top: 10px; left: 50%;
  width: 320px; height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 176, 100, .26) 0%, rgba(255, 140, 70, .07) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.arch {
  position: relative;
  width: min(66vw, 244px);
  margin: 0 auto;
  aspect-ratio: .8;
  border-radius: 50% 50% 13px 13px / 36% 36% 13px 13px;
  background:
    radial-gradient(82% 66% at 50% 88%, rgba(255, 176, 96, .30) 0%, rgba(255, 150, 80, .07) 52%, #0b0911 82%),
    linear-gradient(180deg, #100d17, #0b0911);
  border: 1px solid rgba(255, 200, 140, .16);
  box-shadow:
    inset 0 -60px 70px -44px rgba(255, 185, 115, .6),
    0 30px 70px -34px rgba(255, 150, 80, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 12%;
  cursor: pointer;
  transition: box-shadow .5s, transform .3s var(--ease);
  -webkit-user-select: none;
  user-select: none;
}
.arch:active { transform: scale(.985); }

.portrait {
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #17121d;
  box-shadow: 0 0 0 1px rgba(255, 225, 190, .22), 0 0 28px rgba(255, 185, 115, .32);
  transition: box-shadow .5s, transform .3s var(--ease);
}
.portrait img, .portrait svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.arch.petting .portrait { animation: petPulse .9s var(--ease); }

.arch .candle { bottom: 8.5%; }
.arch .candle .wax { width: 16px; height: 26px; }
.arch .candle .flame { width: 15px; height: 22px; }

.m-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .2em;
  text-indent: .2em;
  margin: 20px 0 8px;
  color: #fff5e6;
}
.m-meta {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--faint);
  line-height: 1.9;
}

/* 它轻声说的话 */
.m-whisper {
  margin: 14px 0 0;
  min-height: 21px;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: .1em;
  color: rgba(255, 208, 155, .9);
  text-align: center;
  opacity: 0;
  transition: opacity .55s var(--ease);
}
.m-whisper.show { opacity: 1; }

/* letter */
.letter {
  position: relative;
  margin: 26px 18px 0;
  padding: 26px 22px 22px;
  border-radius: 4px 16px 16px 14px;
  background:
    linear-gradient(150deg, #f7f0e4 0%, #f1e7d6 58%, #e9dcc8 100%);
  color: #2f2620;
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .5);
  transform: rotate(-.35deg);
}
.letter::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  width: 76px; height: 20px;
  transform: translateX(-50%) rotate(-1.6deg);
  background: rgba(255, 249, 236, .5);
  border-left: 1px solid rgba(190, 170, 140, .3);
  border-right: 1px solid rgba(190, 170, 140, .3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
  backdrop-filter: blur(1px);
}
.letter p {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 2.05;
  letter-spacing: .035em;
  margin: 0 0 .9em;
  text-align: justify;
}
.letter p:last-child { margin-bottom: 0; }
.letter .sign {
  text-align: right;
  font-size: 13px;
  color: #6b5b4c;
  letter-spacing: .06em;
  margin-top: 1.2em;
}

.m-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.m-stats b { color: rgba(255, 200, 145, .92); font-weight: 600; }
.m-stats .sep { color: rgba(243, 235, 224, .16); }

/* actions */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 26px 16px 6px;
}
.act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 4px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 214, 168, .1);
  background: linear-gradient(180deg, rgba(255, 235, 210, .05), rgba(255, 220, 180, .015));
  transition: transform .22s var(--ease), background .3s, border-color .3s;
}
.act:active { transform: scale(.94); background: rgba(255, 225, 190, .1); }
.act svg { width: 21px; height: 21px; stroke: rgba(255, 205, 155, .85); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.act span { font-size: 11px; letter-spacing: .1em; color: rgba(243, 235, 224, .74); }
.act.done svg { stroke: rgba(255, 175, 120, 1); filter: drop-shadow(0 0 6px rgba(255, 160, 90, .7)); }

/* floating hearts & petals */
.floaty {
  position: fixed;
  pointer-events: none;
  z-index: 80;
  font-size: 15px;
  animation: floatUp 1.5s var(--ease) forwards;
  will-change: transform, opacity;
}

/* ===================================================================
   静坐 Sit overlay
   =================================================================== */
.sit {
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, var(--col));
  z-index: 60;
  background: radial-gradient(90% 60% at 50% 62%, #17111c 0%, #08070c 72%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  text-align: center;
  padding: 30px;
}
.sit.in { opacity: 1; }

.breath {
  position: absolute;
  width: 210px; height: 210px;
  border-radius: 50%;
  border: 1px solid rgba(255, 180, 110, .18);
  animation: breath 9s ease-in-out infinite;
  pointer-events: none;
}
.breath.b2 { animation-delay: -4.5s; width: 260px; height: 260px; border-color: rgba(255, 180, 110, .09); }

.sit-candle { width: 46px; height: 74px; margin-bottom: 34px; position: relative; }
.sit-candle .wax {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 46px; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #f6e6cf, #d9c1a4);
  box-shadow: 0 0 34px rgba(255, 180, 110, .4);
}
.sit-candle .flame-core { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); width: 10px; height: 17px; }

.sit-line {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .2em;
  color: rgba(255, 226, 196, .86);
  margin: 0 0 16px;
  min-height: 1.6em;
  transition: opacity .8s;
}
.sit-who {
  position: absolute;
  top: calc(52px + env(safe-area-inset-top));
  left: 0; right: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .26em;
  color: rgba(243, 235, 224, .26);
  margin: 0;
}
.sit-timer {
  font-size: 10.5px;
  letter-spacing: .22em;
  color: rgba(243, 235, 224, .26);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.sit-exit {
  position: absolute;
  bottom: calc(38px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  font-size: 11.5px;
  letter-spacing: .24em;
  color: rgba(243, 235, 224, .4);
  padding: 12px 26px;
  border: 1px solid rgba(255, 214, 168, .14);
  border-radius: 999px;
}


/* ===================================================================
   安放表单 New
   =================================================================== */
.form { padding: 8px 20px 40px; }

.form-intro {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: .07em;
  color: var(--dim);
  text-align: center;
  margin: 6px 0 26px;
}

.photo-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.photo-slot {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #221b2b, #131019);
  border: 1px dashed rgba(255, 214, 168, .26);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.photo-slot.has { border-style: solid; border-color: rgba(255, 200, 140, .4); box-shadow: 0 0 30px -6px rgba(255, 170, 90, .45); }
.photo-slot img, .photo-slot svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot .ph { font-size: 10.5px; letter-spacing: .12em; color: var(--faint); text-align: center; line-height: 1.7; }
.photo-pick .tip { font-size: 10.5px; letter-spacing: .06em; color: rgba(243, 235, 224, .3); }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: .16em;
  color: rgba(243, 235, 224, .45);
  margin-bottom: 9px;
}
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 214, 168, .13);
  background: rgba(255, 240, 220, .035);
  font-size: 14px;
  letter-spacing: .04em;
  outline: none;
  transition: border-color .3s, background .3s;
  resize: none;
}
.field textarea { font-family: var(--serif); line-height: 1.95; font-size: 14.5px; }
.field input:focus, .field textarea:focus {
  border-color: rgba(255, 180, 110, .5);
  background: rgba(255, 240, 220, .06);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(243, 235, 224, .22); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1;
  padding: 11px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 214, 168, .13);
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--faint);
  transition: all .28s;
}
.seg button.on {
  border-color: rgba(255, 180, 110, .6);
  color: #ffd8a8;
  background: rgba(255, 180, 110, .12);
}

.furs { display: flex; gap: 9px; flex-wrap: wrap; }
.furs button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  position: relative;
  transition: transform .2s, box-shadow .3s;
}
.furs button.on { box-shadow: 0 0 0 2px #0d0b12, 0 0 0 3px rgba(255, 180, 110, .8); transform: scale(1.06); }

.form .submit { width: 100%; margin-top: 26px; padding: 15px; }
.form .fine { text-align: center; font-size: 10.5px; color: rgba(243, 235, 224, .26); margin-top: 14px; line-height: 1.8; }

/* ===================================================================
   Walk scene
   =================================================================== */
.walk {
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(100vw, var(--col));
  z-index: 55;
  overflow: hidden;
  background: linear-gradient(180deg, #080a18 0%, #101227 42%, #1a1a2e 68%, #0d0d17 100%);
  padding: 0;
  min-height: 0;
}
.view.walk.enter { transform: translateX(-50%); opacity: 1; }

.walk .starfield { position: absolute; inset: 0; pointer-events: none; }
.walk .path-band {
  position: absolute;
  left: 0; right: 0;
  bottom: 13%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 226, 196, .13) 0 22px, rgba(0, 0, 0, 0) 22px 78px);
  will-change: background-position;
  pointer-events: none;
}
.walk .layer {
  position: absolute;
  left: 0; right: 0;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  will-change: background-position-x;
  pointer-events: none;
}
.walk .sky-star { position: absolute; background: #fff; border-radius: 50%; animation: twinkle 4s ease-in-out infinite; }
.walk .moon {
  position: absolute;
  top: 9%;
  right: 16%;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff8e6, #ffe9bf 55%, #f3d49a);
  box-shadow: 0 0 50px 14px rgba(255, 235, 190, .22), 0 0 120px 40px rgba(255, 220, 170, .1);
}

.walk .hills { bottom: 26%; height: 34%; }
.walk .trees { bottom: 26%; height: 22%; }
.walk .grass { bottom: 0; height: 13%; }

.walk .horizon {
  position: absolute;
  left: 0; right: 0;
  bottom: 20%; height: 36%;
  background: radial-gradient(62% 100% at 50% 100%, rgba(255, 186, 130, .14), rgba(120, 135, 205, .05) 46%, transparent 74%);
  pointer-events: none;
}
.walk .ground {
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, #0b0c19 0%, #0a0b16 42%, #06070e 100%);
  pointer-events: none;
}
.walk .ground::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 205, 255, .12), transparent);
}

.walk .fireflies { position: absolute; inset: 0; pointer-events: none; }
.walk .ff {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #ffe6a8;
  box-shadow: 0 0 8px 2px rgba(255, 210, 130, .8);
  animation: drift 12s ease-in-out infinite;
}

.walker {
  position: absolute;
  bottom: 13.5%;
  left: 36%;
  width: 108px;
  height: 108px;
  padding: 0;
  border: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  transform: translateX(-50%);
  z-index: 5;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .6));
}
.walker.nuzzle .pet { animation: nuzzlePulse .9s var(--ease); }
@keyframes nuzzlePulse {
  0% { transform: scale(1); }
  34% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.walker .pet {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #17121d;
  box-shadow: 0 0 0 1px rgba(255, 225, 190, .3), 0 0 34px rgba(255, 190, 120, .4);
}
.walker .pet img, .walker .pet svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.walker.walking .pet { animation: walkBob .72s ease-in-out infinite; }
.walker .halo {
  position: absolute;
  inset: -42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 140, .16), rgba(255, 190, 120, .05) 45%, transparent 68%);
  pointer-events: none;
}
.walker .shadow {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 96%;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 198, 134, .30), rgba(255, 170, 100, .09) 52%, transparent 76%);
  filter: blur(3px);
  pointer-events: none;
}

.walk-hud {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 0; right: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}
.walk-hud .who {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .16em;
  color: rgba(255, 236, 210, .8);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .8);
}
.walk-hud .dist {
  font-size: 10.5px;
  letter-spacing: .14em;
  color: rgba(255, 236, 210, .4);
  font-variant-numeric: tabular-nums;
}

.walk-caption {
  position: absolute;
  left: 0; right: 0;
  top: 27%;
  text-align: center;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .18em;
  color: rgba(255, 240, 220, .78);
  text-shadow: 0 2px 16px rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  padding: 0 40px;
  z-index: 9;
  pointer-events: none;
}
.walk-caption.show { opacity: 1; }

.walk-controls {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}
.walk-controls button {
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .16em;
  color: rgba(255, 240, 220, .78);
  border: 1px solid rgba(255, 235, 210, .18);
  background: rgba(12, 12, 24, .5);
  backdrop-filter: blur(10px);
  transition: transform .2s, background .3s;
}
.walk-controls button:active { transform: scale(.95); background: rgba(255, 235, 210, .14); }
.walk-controls .hint { font-size: 10px; color: rgba(255, 240, 220, .3); letter-spacing: .1em; }

/* ===================================================================
   toast
   =================================================================== */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(248, 240, 230, .95);
  color: #2b221c;
  font-size: 12.5px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease);
  z-index: 200;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9);
  white-space: nowrap;
  max-width: 88vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===================================================================
   animations
   =================================================================== */
@keyframes flick {
  0%, 100% { transform: translateX(-50%) scale(1, 1); opacity: .95; }
  22% { transform: translateX(-50%) scale(.93, 1.08); opacity: 1; }
  47% { transform: translateX(-52%) scale(1.06, .95); opacity: .86; }
  71% { transform: translateX(-48%) scale(.97, 1.04); opacity: 1; }
}
.arch .flame-core { animation-name: flickBig; }
@keyframes flickBig {
  0%, 100% { transform: translateX(-50%) scale(1, 1); }
  25% { transform: translateX(-50%) scale(.94, 1.07); }
  50% { transform: translateX(-52%) scale(1.05, .96); }
  75% { transform: translateX(-48%) scale(.98, 1.03); }
}

@keyframes breathe {
  0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); }
  50% { opacity: .92; transform: translateX(-50%) scale(1.09); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.6deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}
@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: .9; }
  50% { transform: translate(26px, -34px); opacity: .5; }
  85% { opacity: .8; }
  100% { transform: translate(-18px, -70px); opacity: 0; }
}
@keyframes walkBob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  25% { transform: translateY(-7px) rotate(1deg); }
  50% { transform: translateY(-2px) rotate(2deg); }
  75% { transform: translateY(-6px) rotate(-1deg); }
}
@keyframes petPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.055); box-shadow: 0 0 0 1px rgba(255, 235, 210, .5), 0 0 44px rgba(255, 190, 120, .6); }
  100% { transform: scale(1); }
}
@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(.6); opacity: 0; }
  18% { opacity: 1; transform: translate(-50%, -10px) scale(1); }
  100% { transform: translate(-50%, -78px) scale(.9); opacity: 0; }
}
@keyframes breath {
  0%, 100% { transform: scale(.86); opacity: .5; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* small phones */
@media (max-height: 700px) {
  .gate h1 { font-size: 27px; }
  .lantern { width: 96px; margin-bottom: 18px; }
  .gate .lede { margin-bottom: 24px; line-height: 2; }
  .arch { width: min(58vw, 206px); }
}

@media (min-width: 420px) {
  .grid { gap: 11px 9px; }
}

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

/* ===================================================================
   公告 / 错误页 / 状态页
   =================================================================== */
.announce {
  margin: 0 0 22px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 206, 150, .18);
  background: rgba(255, 206, 150, .06);
  font-size: 11.5px;
  letter-spacing: .08em;
  line-height: 1.8;
  color: rgba(255, 214, 168, .82);
  max-width: 300px;
}

.errpage, .statuspage {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.err-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 34px 90px;
  text-align: center;
}
.err-ico { font-size: 34px; color: rgba(255, 180, 110, .55); margin: 0 0 10px; line-height: 1; }
.err-inner h2 {
  font-family: var(--serif); font-size: 17px; font-weight: 500;
  letter-spacing: .14em; margin: 0 0 16px; text-indent: .14em;
}
.err-msg { font-size: 12.5px; color: var(--dim); line-height: 2; margin: 0 0 26px; max-width: 260px; }
.err-home {
  margin-top: 22px; font-size: 11.5px; color: var(--faint);
  letter-spacing: .12em; text-decoration: none;
  border-bottom: 1px solid rgba(255, 214, 168, .16); padding-bottom: 3px;
}

.status-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 34px 90px;
}
.status-ico {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px; margin-bottom: 24px;
  border: 1px solid rgba(255, 206, 150, .20);
  background: radial-gradient(circle at 50% 42%, rgba(255, 180, 110, .14), transparent 72%);
  color: rgba(255, 206, 150, .85);
}
.status-ico.approved { color: #ffd8a8; box-shadow: 0 0 46px -10px rgba(255, 170, 90, .8); }
.status-inner h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 500;
  letter-spacing: .12em; margin: 0 0 16px; text-indent: .12em;
}
.status-lead { font-size: 13px; line-height: 2.05; color: var(--dim); margin: 0 0 22px; max-width: 280px; }
.status-name { font-family: var(--serif); font-size: 15px; letter-spacing: .16em; color: rgba(255, 214, 168, .92); margin: 0 0 8px; }
.status-time, .status-slot, .status-hint {
  font-size: 11px; letter-spacing: .1em; color: var(--faint); margin: 5px 0 0; line-height: 1.9;
}
#goLamp { margin-top: 28px; }

/* ---------- 账号 / 我的纪念 ---------- */
.linklike {
  background: none; border: 0; padding: 0; margin: 0;
  color: rgba(255, 206, 150, .78);
  font: inherit; font-size: 12px; letter-spacing: .08em;
  text-decoration: underline; text-underline-offset: 4px;
  cursor: pointer;
}
.gate-account { margin: 20px 0 0; text-align: center; }

.acct-list { list-style: none; margin: 6px 20px 0; padding: 0; }
.acct-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.acct-thumb {
  width: 56px; height: 56px; border-radius: 13px; overflow: hidden;
  background: rgba(255, 240, 220, .05); display: grid; place-items: center;
}
.acct-thumb img, .acct-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-name {
  font-family: var(--serif); font-size: 15.5px; letter-spacing: .06em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.acct-meta { font-size: 11.5px; color: var(--dim); margin-top: 5px; letter-spacing: .04em; line-height: 1.7; }
.acct-acts { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.acct-empty { padding: 44px 0; text-align: center; color: var(--faint); font-size: 13px; line-height: 2; }

.pill {
  font-family: var(--sans); font-size: 10px; padding: 2px 8px; border-radius: 20px;
  letter-spacing: .1em; border: 1px solid rgba(255, 240, 220, .18); color: rgba(243, 235, 224, .58);
  white-space: nowrap;
}
.pill.approved { color: #ffcf9a; border-color: rgba(255, 180, 110, .5); background: rgba(255, 180, 110, .1); }
.pill.rejected, .pill.hidden { color: rgba(224, 145, 140, .9); border-color: rgba(224, 145, 140, .34); }

.btn.tiny { padding: 8px 13px; font-size: 11.5px; border-radius: 9px; }
.btn.danger { color: rgba(224, 145, 140, .95); border-color: rgba(224, 145, 140, .3); }

.acct-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 20px 40px; }
.acct-tools .btn { flex: 1 1 40%; }
.pw-box {
  margin: 0 20px 44px; padding: 16px 16px 4px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 240, 220, .02);
}
.pw-box .btn { width: 100%; margin: 6px 0 16px; }

/* 手机号 + 验证码那一行 */
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: .28em; }
.code-row .code-btn {
  flex: 0 0 auto; min-width: 104px; min-height: 46px;
  padding: 0 14px; font-size: 12px; letter-spacing: .08em;
}
.code-row .code-btn[disabled] { opacity: .55; }
