  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', serif;
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 50%, #f5f3ff 100%);
    min-height: 100vh; overflow-x: clip; color: #4a3746;
    -webkit-tap-highlight-color: transparent;
  }
  .kai { font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', serif; }
  #fluid-bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .75; }
  #particle-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

  .glass-panel { background: rgba(255,255,255,0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.8); }
  .wrap { position: relative; z-index: 10; max-width: 56rem; margin: 0 auto; padding: 3rem 1rem 4rem; display: flex; flex-direction: column; gap: 4rem; isolation: isolate; }
  @media (min-width: 768px) { .wrap { padding-top: 4rem; } }

  .topbar { position: absolute; top: max(1.1rem, env(safe-area-inset-top, 0px)); right: 1.1rem; z-index: 40; display: flex; gap: .5rem; align-items: center; }
  .icon-btn { width: 2.6rem; height: 2.6rem; border-radius: 999px; border: none; cursor: pointer;
    background: rgba(255,255,255,.8); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(225,29,72,.08); transition: all .2s; }
  .icon-btn:hover { background: #fff1f2; transform: scale(1.05); }
  .icon-btn:active { transform: scale(.95); }
  .pill-btn { border: none; cursor: pointer; padding: .55rem 1rem; border-radius: 999px; font-size: .8rem;
    font-weight: 600; color: #e11d48; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(225,29,72,.1); transition: all .2s; font-family: inherit; }
  .pill-btn:hover { background: #fff1f2; }
  .pill-btn.on { background: #e11d48; color: #fff; }

  .edit-banner { display: none; position: relative; top: auto; margin: 0; z-index: 30;
    background: linear-gradient(90deg,#fda4af,#f9a8d4); color: #881337; font-size: .75rem;
    padding: .4rem 1rem; text-align: center; font-weight: 600; }
  body.edit-mode .edit-banner { display: block; }
  body.edit-mode #boy-name, body.edit-mode #girl-name, body.edit-mode #slogan { cursor: pointer; }
  body.edit-mode #boy-name:hover, body.edit-mode #girl-name:hover, body.edit-mode #slogan:hover { text-decoration: underline dotted #fb7185; }
  .edit-only { display: none !important; }
  body.edit-mode .edit-only { display: flex !important; }
  body.edit-mode .edit-only-inline { display: inline-flex !important; }

  header { text-align: center; padding-top: 1rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
  .badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem 1rem; border-radius: 999px;
    background: rgba(255,228,230,.7); border: 1px solid #fecdd3; color: #e11d48;
    font-size: .75rem; font-weight: 500; letter-spacing: .08em; }
  .name-row { display: flex; align-items: center; justify-content: center; gap: .8rem; }
  .name-row h1 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 700; color: #1e293b; letter-spacing: .02em; }
  .heart-btn { background: none; border: none; cursor: pointer; line-height: 0; }
  .pulse-heart { font-size: clamp(1.6rem, 5vw, 2.6rem); display: inline-block; animation: beat 2.2s infinite ease-in-out;
    filter: drop-shadow(0 0 12px rgba(244,63,94,.45)); }
  @keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
  .slogan { font-size: .9rem; color: #78716c; font-style: italic; max-width: 26rem; line-height: 1.8; }

  section.panel { background: rgba(255,255,255,.75); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.9); border-radius: 1.5rem; padding: 1.5rem; position: relative; overflow: hidden;
    box-shadow: 0 20px 40px -20px rgba(225,29,72,.15); }
  /* 手机上关闭大面积毛玻璃：多块 backdrop-filter 叠在不断重绘的粒子画布上，
     会让安卓浏览器滑动时出现板块重影/重复，停下才恢复 */
  @media (hover: none), (max-width: 900px) {
    section.panel, .glass-panel { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.93); }
  }
  @media (min-width:768px){ section.panel { padding: 2rem; } }
  h2.sec-title { font-size: 1.25rem; font-weight: 700; color: #292524; text-align: center; }
  .sec-sub { font-size: .78rem; color: #a8a29e; text-align: center; margin-top: .35rem; }
  .sec-head { margin-bottom: 1.5rem; }

  .count-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; margin-top: 1.25rem; }
  @media (min-width:768px){ .count-grid { grid-template-columns: repeat(4,1fr); } }
  .count-cell { background: rgba(255,255,255,.85); border: 1px solid #ffe4e6; border-radius: 1rem; padding: 1rem .5rem; text-align: center; }
  .count-num { display: block; font-size: clamp(1.6rem,5vw,2.8rem); font-weight: 800; color: #e11d48; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; }
  .count-label { font-size: .65rem; letter-spacing: .15em; color: #a8a29e; text-transform: uppercase; }
  .days-label { font-size: .68rem; letter-spacing: .3em; color: #fb7185; font-weight: 600; }
  .date-foot { margin-top: 1.2rem; text-align: center; font-size: .72rem; color: #a8a29e; }

  .photo-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
  .photo-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
  @media (min-width:640px){ .photo-grid { grid-template-columns: repeat(2,1fr); } }
  @media (min-width:768px){ .photo-grid { grid-template-columns: repeat(3,1fr); } }
  .polaroid { background: #fff; border-radius: 1rem; padding: .85rem .85rem 1.2rem; position: relative;
    box-shadow: 0 10px 25px -5px rgba(225,29,72,.08), 0 8px 10px -6px rgba(225,29,72,.05);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s; }
  .polaroid:nth-child(odd) { transform: rotate(-1.5deg); }
  .polaroid:nth-child(even) { transform: rotate(1.5deg); }
  .polaroid:hover { transform: rotate(0) translateY(-8px) scale(1.02); box-shadow: 0 20px 30px -10px rgba(244,63,94,.25); z-index: 2; }
  .polaroid .ph-box { position: relative; border-radius: .75rem; overflow: hidden; aspect-ratio: 1; background: #fff1f2; }
  .polaroid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
  .polaroid:hover img { transform: scale(1.05); }
  .polaroid .ph-meta { text-align: center; padding-top: .7rem; }
  .polaroid .ph-title { font-size: .85rem; font-weight: 600; color: #44403c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .polaroid .ph-date { font-size: .68rem; color: #fb7185; margin-top: .2rem; }
  .mini-btn { border: none; cursor: pointer; width: 1.8rem; height: 1.8rem; border-radius: 999px;
    background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: .8rem;
    display: flex; align-items: center; justify-content: center; transition: all .2s; }
  .mini-btn:hover { background: #e11d48; }
  .ph-actions { position: absolute; top: .5rem; right: .5rem; display: flex; gap: .4rem; z-index: 3; }
  .add-photo-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    border: 2px dashed #fda4af; border-radius: 1rem; background: rgba(255,241,242,.5); cursor: pointer;
    color: #e11d48; font-family: inherit; font-size: .85rem; font-weight: 600; min-height: 220px; transition: all .2s; }
  .add-photo-btn:hover { background: #fff1f2; border-color: #fb7185; }
  .add-photo-btn span.plus { font-size: 2rem; }

  .tl-list { position: relative; border-left: 2px solid #fecdd3; margin-left: .9rem; display: flex; flex-direction: column; gap: 2rem; padding: .4rem 0; }
  .tl-item { position: relative; padding-left: 1.6rem; }
  .tl-dot { position: absolute; left: -9px; top: .3rem; width: 1rem; height: 1rem; border-radius: 999px;
    background: #f43f5e; border: 4px solid #fff; box-shadow: 0 0 0 1px #fecdd3; }
  .tl-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .12rem .55rem; border-radius: .4rem;
    background: #ffe4e6; color: #e11d48; margin-bottom: .3rem; }
  .tl-title { font-size: 1rem; font-weight: 700; color: #292524; }
  .tl-content { font-size: .85rem; color: #57534e; margin-top: .35rem; line-height: 1.7; }
  .tl-actions { margin-top: .45rem; display: flex; gap: .5rem; }
  .tl-photos { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .55rem; }
  .tl-photo { width: 4.4rem; height: 4.4rem; object-fit: cover; border-radius: .6rem; cursor: pointer; border: 1px solid #ffe4e6; }
  .tl-photo:hover { transform: scale(1.04); }

  .capsule-box { max-width: 26rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
  .capsule-btn { border: none; cursor: pointer; width: 6rem; height: 6rem; border-radius: 1.6rem;
    background: linear-gradient(135deg,#fb7185,#f9a8d4); color: #fff; font-size: 2.6rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 24px -8px rgba(244,63,94,.45); transition: all .25s; }
  .capsule-btn:hover { transform: scale(1.1); }
  .capsule-btn:active { transform: scale(.95); }
  .capsule-hint { font-size: .72rem; color: #fb7185; font-weight: 500; }
  #capsule-card { display: none; margin-top: .5rem; padding: 1.2rem 1.4rem; background: rgba(255,255,255,.92);
    border: 1px solid #ffe4e6; border-radius: 1rem; box-shadow: 0 8px 20px -8px rgba(244,63,94,.2); }
  #capsule-card.show { display: block; animation: pop .45s cubic-bezier(.34,1.56,.64,1); }
  #capsule-text { font-size: 1.25rem; color: #881337; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; line-height: 1.7; }
  .capsule-from { text-align: right; font-size: .7rem; color: #fb7185; margin-top: .5rem; }
  @keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  footer { text-align: center; padding: 1rem 0 2rem; color: #a8a29e; font-size: .72rem; line-height: 2; }

  .modal-mask { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 1rem; }
  .modal-mask.open { display: flex; }
  .modal { background: #fff; border-radius: 1.5rem; padding: 1.6rem; width: 100%; max-width: 30rem;
    max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
  .modal h3 { font-size: 1.05rem; font-weight: 700; color: #292524; display: flex; align-items: center; gap: .5rem;
    padding-bottom: .9rem; border-bottom: 1px solid #f5f5f4; margin-bottom: 1rem; }
  .modal .close-x { margin-left: auto; border: none; background: #f5f5f4; width: 2rem; height: 2rem;
    border-radius: 999px; cursor: pointer; font-size: .85rem; color: #78716c; }
  .field { margin-bottom: .9rem; }
  .field label { display: block; font-size: .72rem; font-weight: 600; color: #57534e; margin-bottom: .35rem; }
  .field input[type=text], .field input[type=date], .field input[type=number], .field textarea, .field select {
    width: 100%; padding: .6rem .8rem; border: 1px solid #e7e5e4; border-radius: .75rem;
    font-size: .85rem; font-family: inherit; color: #292524; outline: none; transition: border .2s; background: #fafaf9; }
  .field input:focus, .field textarea:focus, .field select:focus { border-color: #fb7185; background: #fff; }
  .field textarea { resize: vertical; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
  .quote-row { display: flex; gap: .5rem; margin-bottom: .5rem; align-items: center; }
  .quote-row textarea { flex: 1; }
  .quote-del { border: none; background: #fff1f2; color: #e11d48; width: 2rem; height: 2rem; border-radius: .6rem;
    cursor: pointer; flex-shrink: 0; font-size: .85rem; }
  .quote-add { border: 1px dashed #fda4af; background: none; color: #e11d48; width: 100%; padding: .5rem;
    border-radius: .75rem; cursor: pointer; font-size: .78rem; font-family: inherit; font-weight: 600; }
  .btn-primary { flex: 1; border: none; cursor: pointer; padding: .75rem; border-radius: .8rem;
    background: linear-gradient(90deg,#f43f5e,#ec4899); color: #fff; font-weight: 600; font-size: .9rem;
    font-family: inherit; box-shadow: 0 8px 16px -6px rgba(244,63,94,.5); transition: opacity .2s; }
  .btn-primary:hover { opacity: .9; }
  .btn-primary:disabled { opacity: .55; cursor: wait; }
  .btn-ghost { border: 1px solid #e7e5e4; background: none; color: #78716c; padding: .75rem 1rem;
    border-radius: .8rem; cursor: pointer; font-size: .78rem; font-family: inherit; }
  .modal-actions { display: flex; gap: .7rem; padding-top: .8rem; align-items: center; }
  .hint-line { font-size: .68rem; color: #fb7185; background: #fff1f2; border-radius: .7rem; padding: .6rem .8rem;
    line-height: 1.6; margin-bottom: 1rem; }
  .img-pick { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
  .img-pick .prev { width: 4rem; height: 4rem; border-radius: .8rem; background: #fff1f2 center/cover no-repeat;
    border: 1px solid #ffe4e6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fda4af; font-size: 1.4rem; }
  .img-pick button { border: 1px solid #fda4af; background: #fff1f2; color: #e11d48; padding: .45rem .8rem;
    border-radius: .6rem; cursor: pointer; font-size: .75rem; font-family: inherit; font-weight: 600; }

  #gate { position: fixed; inset: 0; z-index: 80; background: linear-gradient(135deg, #ffe4e6 0%, #fdf2f8 50%, #f5f3ff 100%);
    display: none; align-items: center; justify-content: center; padding: 1.5rem; }
  #gate.show { display: flex; }
  .gate-card { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border: 1px solid #fff;
    border-radius: 1.6rem; padding: 2.2rem 1.8rem; max-width: 22rem; width: 100%; text-align: center;
    box-shadow: 0 30px 60px -20px rgba(225,29,72,.3); }
  .gate-card .lock { font-size: 3rem; }
  .gate-card h3 { font-size: 1.2rem; font-weight: 700; color: #292524; margin: .6rem 0 .4rem; }
  .gate-card p { font-size: .78rem; color: #a8a29e; line-height: 1.7; margin-bottom: 1.3rem; }
  .gate-card input { width: 100%; padding: .8rem 1rem; border: 1px solid #fecdd3; border-radius: .9rem;
    font-size: 1rem; text-align: center; font-family: inherit; outline: none; letter-spacing: .2em; }
  .gate-card input:focus { border-color: #fb7185; }
  .gate-card button { margin-top: 1rem; width: 100%; border: none; cursor: pointer; padding: .8rem;
    border-radius: .9rem; background: linear-gradient(90deg,#f43f5e,#ec4899); color: #fff; font-weight: 600;
    font-size: .95rem; font-family: inherit; box-shadow: 0 8px 18px -6px rgba(244,63,94,.5); }
  .gate-card button:active { transform: scale(.98); }

  #toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 60;
    padding: .65rem 1.3rem; border-radius: 999px; background: rgba(28,25,23,.88); color: #fff;
    font-size: .78rem; opacity: 0; pointer-events: none; transition: all .3s; backdrop-filter: blur(6px); max-width: 85vw; text-align: center; }
  #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  .boom-heart { position: fixed; pointer-events: none; z-index: 999; transition: all 1s cubic-bezier(.25,1,.5,1); }

  /* ============ 待办事项 ============ */
  .todo-input-row { display: flex; gap: .6rem; margin-bottom: 1rem; }
  .todo-input-row input { flex: 1; padding: .7rem .9rem; border: 1px solid #e7e5e4; border-radius: .8rem;
    font-size: .85rem; font-family: inherit; outline: none; background: #fafaf9; }
  .todo-input-row input:focus { border-color: #fb7185; background: #fff; }
  .todo-list { display: flex; flex-direction: column; gap: .5rem; }
  .todo-item { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; background: rgba(255,255,255,.85);
    border: 1px solid #ffe4e6; border-radius: .9rem; }
  .todo-item .chk { width: 1.4rem; height: 1.4rem; border-radius: .5rem; border: 2px solid #fda4af; background: #fff;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; transition: all .2s; }
  .todo-item.done .chk { background: #f43f5e; border-color: #f43f5e; }
  .todo-item .txt { flex: 1; font-size: .88rem; color: #44403c; }
  .todo-item.done .txt { text-decoration: line-through; color: #a8a29e; }
  .todo-item .due { font-size: .65rem; color: #fb7185; white-space: nowrap; }
  .todo-item .del { border: none; background: none; color: #fda4af; cursor: pointer; font-size: .85rem; flex-shrink: 0; }
  .todo-empty { text-align: center; color: #a8a29e; font-size: .82rem; padding: 1rem 0; }

  /* ============ 天气 ============ */
  .weather-city { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
  .weather-city b { font-size: 1rem; color: #292524; }
  .weather-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; }
  @media(min-width:640px){ .weather-grid { grid-template-columns: repeat(4,1fr); } }
  @media(min-width:880px){ .weather-grid { grid-template-columns: repeat(7,1fr); } }
  .wcard { background: rgba(255,255,255,.85); border: 1px solid #ffe4e6; border-radius: 1rem; padding: .8rem .5rem; text-align: center; }
  .wcard .wd { font-size: .7rem; color: #a8a29e; }
  .wcard .ico { font-size: 1.6rem; margin: .3rem 0; }
  .wcard .t { font-size: .8rem; color: #44403c; font-weight: 600; }
  .wcard .tn { font-size: .68rem; color: #fb7185; }
  .wcard.today { border-color: #fb7185; background: #fff1f2; }
  .weather-tip { margin-top: 1rem; background: #fff1f2; border-radius: 1rem; padding: .9rem 1rem; font-size: .8rem; color: #881337; line-height: 1.7; }
  .weather-tip b { color: #e11d48; }

  /* ============ 相册 + 灯箱 ============ */
  .album-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; }
  @media(min-width:640px){ .album-grid { grid-template-columns: repeat(3,1fr); } }
  @media(min-width:880px){ .album-grid { grid-template-columns: repeat(4,1fr); } }
  .album-thumb { position: relative; aspect-ratio: 1; border-radius: 1rem; overflow: hidden; cursor: pointer;
    box-shadow: 0 8px 18px -8px rgba(225,29,72,.18); }
  .album-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
  .album-thumb:hover img { transform: scale(1.06); }
  #album-lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20,16,20,.92); display: none;
    align-items: center; justify-content: center; padding: 1rem; }
  #album-lightbox.show { display: flex; }
  #album-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 1rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
  #album-lightbox .lb-cap { position: absolute; bottom: 5%; color: #fff; font-size: .85rem; text-align: center; width: 100%; }
  #album-lightbox .lb-close, #album-lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%);
    width: 3rem; height: 3rem; border-radius: 999px; border: none; background: rgba(255,255,255,.85); font-size: 1.3rem; cursor: pointer; }
  #album-lightbox .lb-close { top: 1.2rem; right: 1.2rem; transform: none; width: 2.4rem; height: 2.4rem; }
  #album-lightbox .lb-prev { left: 1rem; }
  #album-lightbox .lb-next { right: 1rem; }

  /* ============ 日历 ============ */
  .cal-head { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
  .cal-head .cal-title { font-size: 1.1rem; font-weight: 700; color: #292524; min-width: 7rem; text-align: center; }
  .cal-head button { border: none; width: 2.2rem; height: 2.2rem; border-radius: 999px; background: rgba(255,255,255,.9);
    cursor: pointer; font-size: 1rem; box-shadow: 0 4px 12px rgba(225,29,72,.1); }
  .cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: .35rem; }
  .cal-dow { text-align: center; font-size: .65rem; color: #a8a29e; padding: .3rem 0; font-weight: 600; }
  .cal-cell { aspect-ratio: 1; border-radius: .7rem; background: rgba(255,255,255,.7); border: 1px solid #ffe4e6;
    padding: .3rem; display: flex; flex-direction: column; cursor: pointer; transition: all .2s; position: relative; }
  .cal-cell:hover { background: #fff1f2; }
  .cal-cell.muted { opacity: .4; }
  .cal-cell.today { border-color: #fb7185; box-shadow: 0 0 0 1px #fb7185; }
  .cal-cell .dnum { font-size: .72rem; color: #57534e; font-weight: 600; }
  .cal-dots { display: flex; gap: 2px; margin-top: auto; }
  .cal-dots i { width: .35rem; height: .35rem; border-radius: 999px; display: inline-block; }
  .cal-dots .t { background: #f43f5e; }
  .cal-dots .e { background: #fbbf24; }

  /* ============ 小游戏 ============ */
  .game-grid { display: grid; grid-template-columns: repeat(1,1fr); gap: .8rem; }
  @media(min-width:560px){ .game-grid { grid-template-columns: repeat(3,1fr); } }
  .game-card { background: rgba(255,255,255,.85); border: 1px solid #ffe4e6; border-radius: 1.2rem; padding: 1.2rem 1rem;
    text-align: center; cursor: pointer; transition: all .25s; }
  .game-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -12px rgba(244,63,94,.3); }
  .game-card .gico { font-size: 2rem; }
  .game-card .gname { font-weight: 700; color: #292524; margin: .4rem 0 .2rem; font-size: .95rem; }
  .game-card .gdesc { font-size: .68rem; color: #a8a29e; line-height: 1.5; }
  .lobby-row { display: flex; gap: .6rem; margin-bottom: .8rem; align-items: center; flex-wrap: wrap; }
  .lobby-row label { font-size: .72rem; color: #57534e; font-weight: 600; }
  .lobby-row input, .lobby-row select { padding: .5rem .7rem; border: 1px solid #e7e5e4; border-radius: .7rem;
    font-size: .82rem; font-family: inherit; outline: none; background: #fafaf9; }
  .lobby-row input:focus, .lobby-row select:focus { border-color: #fb7185; }
  #game-stage { min-height: 18rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
  /* 大游戏（大富翁/黄金矿工/台球/标枪）普通模式：弹窗加宽、标题栏变窄、去掉底部「退出房间」栏（标题里的 ✕ 一样能退出） */
  #game-mask { padding: .5rem; }
  #game-title .close-x + .close-x { margin-left: 0; }
  #game-modal-card.game-wide { max-width: min(96vw, 60rem) !important; max-height: 96vh; padding: .7rem .8rem .8rem; display: flex; flex-direction: column; overflow: hidden; }
  #game-modal-card.game-wide h3 { flex-shrink: 0; font-size: .95rem; margin-bottom: .45rem; padding-bottom: .45rem; }
  #game-modal-card.game-wide .modal-actions { display: none; }
  #game-modal-card .game-status:empty { display: none; }
  #game-modal-card.game-wide #game-stage { flex: 0 0 auto; width: 100%; min-height: 12rem; height: calc(96vh - 4.6rem) !important; max-height: 640px; }
  #game-modal-card.game-wide[data-game="goldminer"] #game-stage { max-height: min(640px, calc((min(96vw, 60rem) - 1.6rem) * .94)); }
  #game-modal-card.game-wide[data-game="billiards"] #game-stage { max-height: min(640px, calc((min(96vw, 60rem) - 1.6rem) * .5 + 5.5rem)); }
  #game-modal-card.game-wide[data-game="spear_duel"] #game-stage { max-height: min(640px, calc((min(96vw, 60rem) - 1.6rem) * .53 + 6rem)); }
  #game-modal-card.game-wide #game-stage > .lu-spear-root, #game-modal-card.game-wide #game-stage > .lubil-root { flex: 1 1 auto; min-height: 0; width: 100%; }
  #game-modal-card.game-wide .lubil-wrap, #game-modal-card.game-wide .lubil-top { max-width: none; }

  /* 全屏：去掉上下白条——标题栏缩成一排小按钮（横屏时变成右侧细竖条），底栏隐藏，避开刘海/圆角安全区 */
  #game-modal-card:fullscreen, #game-modal-card:-webkit-full-screen { max-width: 100%; width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; background: #fdf2f8; padding: max(4px, env(safe-area-inset-top, 0px)) max(4px, env(safe-area-inset-right, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); }
  #game-modal-card:fullscreen h3, #game-modal-card:-webkit-full-screen h3 { flex-shrink: 0; margin: 0; padding: 0; border: 0; font-size: .78rem; gap: .35rem; justify-content: flex-end; background: transparent; }
  #game-modal-card:fullscreen h3 .gt, #game-modal-card:-webkit-full-screen h3 .gt { margin-right: auto; color: #9f1239; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  #game-modal-card:fullscreen .close-x, #game-modal-card:-webkit-full-screen .close-x { margin-left: 0; flex-shrink: 0; width: 1.9rem; height: 1.9rem; background: rgba(255,255,255,.8); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
  #game-modal-card:fullscreen .game-status, #game-modal-card:-webkit-full-screen .game-status { flex-shrink: 0; font-size: .7rem; margin: 0; }
  #game-modal-card:fullscreen #game-stage, #game-modal-card:-webkit-full-screen #game-stage { flex: 1 1 auto; min-height: 0; height: auto !important; max-height: none !important; width: 100%; min-width: 0; }
  #game-modal-card:fullscreen .modal-actions, #game-modal-card:-webkit-full-screen .modal-actions { display: none; }
  #game-modal-card[data-game="goldminer"]:fullscreen, #game-modal-card[data-game="goldminer"]:-webkit-full-screen { background: #22101a; }
  #game-modal-card[data-game="goldminer"]:fullscreen h3 .gt, #game-modal-card[data-game="goldminer"]:-webkit-full-screen h3 .gt { color: #ffd6e4; }
  @media (orientation: landscape) {
  #game-modal-card:fullscreen, #game-modal-card:-webkit-full-screen { flex-direction: row; }
  #game-modal-card:fullscreen h3, #game-modal-card:-webkit-full-screen h3 { order: 2; flex-direction: column; justify-content: flex-start; width: 2rem; height: 100%; }
  #game-modal-card:fullscreen h3 .gt, #game-modal-card:-webkit-full-screen h3 .gt { display: none; }
  #game-modal-card:fullscreen .game-status, #game-modal-card:-webkit-full-screen .game-status { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none; background: rgba(255,255,255,.85); border-radius: 999px; padding: 2px 10px; color: #57534e; }
  }
  /* 卡片式游戏（标枪/2048/台球）用 flex 撑满，避免百分比高度链断裂导致画布塌成 0 */
  #game-modal-card:fullscreen #game-stage > .lu-spear-root, #game-modal-card:-webkit-full-screen #game-stage > .lu-spear-root,
  #game-modal-card:fullscreen #game-stage > .lu2048-root, #game-modal-card:-webkit-full-screen #game-stage > .lu2048-root,
  #game-modal-card:fullscreen #game-stage > .lubil-root, #game-modal-card:-webkit-full-screen #game-stage > .lubil-root {
    flex: 1 1 auto; min-height: 0; width: 100%; }
  #game-modal-card:fullscreen .lubil-wrap, #game-modal-card:-webkit-full-screen .lubil-wrap { max-width: none; }
  #game-modal-card:fullscreen .lubil-top, #game-modal-card:-webkit-full-screen .lubil-top { max-width: none; }
  /* 五子棋：保持正方形不被拉伸，并放大以利用竖向空间 */
  #game-modal-card:fullscreen .gomoku-board, #game-modal-card:-webkit-full-screen .gomoku-board {
    width: min(92vw, 76vh) !important; height: auto !important; }
  .game-status { font-size: .72rem; color: #a8a29e; text-align: center; }
  .ttt-board { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
  .ttt-cell { width: 4.5rem; height: 4.5rem; border-radius: 1rem; background: #fff1f2; border: 1px solid #ffe4e6;
    font-size: 2.2rem; font-weight: 800; color: #e11d48; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all .15s; }
  .ttt-cell:hover:not(:disabled) { background: #ffe4e6; }
  .ttt-cell:disabled { cursor: default; opacity: .85; }
  .rps-btns { display: flex; gap: 1rem; }
  .rps-btn { font-size: 2.4rem; background: #fff1f2; border: 1px solid #ffe4e6; border-radius: 1.2rem; width: 4.5rem;
    height: 4.5rem; cursor: pointer; transition: all .15s; }
  .rps-btn:hover { transform: scale(1.08); background: #ffe4e6; }
  .dice-btn { font-size: 2.4rem; background: #fff1f2; border: 1px solid #ffe4e6; border-radius: 1.2rem; padding: 1rem 1.6rem; cursor: pointer; }
  .dice-result { font-size: .95rem; color: #292524; font-weight: 600; text-align: center; line-height: 1.7; }

  /* 五子棋 */
  .gomoku-board { display: grid; grid-template-columns: repeat(15,1fr); gap: 1px; background: #d9b88a; padding: 6px; border-radius: 10px; width: min(92vw, 30rem); aspect-ratio: 1; margin: 0 auto; }
  .gomoku-cell { background: #f4e1c1; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; aspect-ratio: 1; }
  .gomoku-cell:hover { background: #ffe9c7; }
  .stone { width: 80%; height: 80%; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
  .stone.b { background: radial-gradient(circle at 35% 30%, #666, #000); }
  .stone.w { background: radial-gradient(circle at 35% 30%, #fff, #cfcfcf); }
  .gomoku-cell.gmk-mark::after { content: ''; position: absolute; width: 32%; height: 32%; border: 2px solid #e11d48; border-radius: 50%; pointer-events: none; }

  /* 时间线照片选择预览 */
  #tl-photos-prev { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
  #tl-photos-prev .tp { position: relative; width: 4rem; height: 4rem; border-radius: .6rem; overflow: hidden; border: 1px solid #ffe4e6; }
  #tl-photos-prev .tp img { width: 100%; height: 100%; object-fit: cover; }
  #tl-photos-prev .tp button { position: absolute; top: 2px; right: 2px; border: none; background: rgba(225,29,72,.85);
    color: #fff; width: 1.3rem; height: 1.3rem; border-radius: 999px; font-size: .6rem; cursor: pointer; }

  /* ===== 布局编辑 ===== */
  section { position: relative; }
  body.edit-mode h2.sec-title { cursor: text; }
  body.edit-mode h2.sec-title[contenteditable="true"] {
    outline: 2px dashed #f9a8d4; border-radius: .5rem; padding: .15rem .45rem; margin: -.15rem -.45rem;
    background: rgba(249,168,212,.16); display: inline-block;
  }


/* 标枪对决游戏专属样式 - 适配浪漫宇宙紫粉中性色与移动端竖屏 */
.lu-spear-root {
  --spear-primary: var(--lu-primary, #ec4899);
  --spear-accent: var(--lu-accent, #a855f7);
  --spear-bg: var(--lu-card-bg, rgba(255, 255, 255, 0.96));
  --spear-text: var(--lu-text, #374151);

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fce7f3 0%, #fae8ff 50%, #fdf2f8 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* 顶部计分与血量栏 */
.lu-spear-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244, 114, 182, 0.2);
  z-index: 10;
}

.lu-spear-player-hud {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lu-spear-player-hud.right {
  flex-direction: row-reverse;
}

.lu-spear-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #fff;
  border: 2px solid var(--spear-primary);
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.2);
}

.lu-spear-pinfo {
  display: flex;
  flex-direction: column;
}
.lu-spear-player-hud.right .lu-spear-pinfo {
  align-items: flex-end;
}

.lu-spear-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--spear-text);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lu-spear-hearts {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}
.lu-spear-heart {
  font-size: 14px;
  transition: transform 0.2s, opacity 0.2s;
}
.lu-spear-heart.lost {
  filter: grayscale(1);
  opacity: 0.25;
  transform: scale(0.8);
}
.lu-sp-hpbar { width: 64px; height: 9px; background: rgba(255,255,255,.65); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.lu-sp-hpfill { height: 100%; border-radius: 6px; transition: width .2s; }
.lu-sp-hptxt { font-size: 10px; font-weight: 800; color: #374151; margin-top: 1px; }

/* 局数与风向仪表 */
.lu-spear-center-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lu-spear-round-tag {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--spear-primary), var(--spear-accent));
  padding: 2px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(236, 72, 153, 0.3);
}
.lu-spear-wind {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  font-weight: 600;
}

/* 游戏 Canvas 区域 */
.lu-spear-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: crosshair;
}
.lu-spear-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 底部操作提示栏 */
.lu-spear-footer {
  flex-shrink: 0;
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  color: #831843;
  background: rgba(253, 242, 248, 0.9);
  border-top: 1px dashed rgba(244, 114, 182, 0.3);
}

/* 结算弹层 */
.lu-spear-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  box-sizing: border-box;
  animation: luSpearFadeIn 0.3s ease;
}
.lu-spear-modal-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  max-width: 280px;
  width: 100%;
  border: 2px solid #fbcfe8;
}
.lu-spear-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #be185d;
  margin-bottom: 8px;
}
.lu-spear-modal-desc {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 18px;
  line-height: 1.5;
}
.lu-spear-btn {
  background: linear-gradient(135deg, var(--spear-primary), var(--spear-accent));
  color: #fff;
  border: none;
  padding: 9px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
  transition: transform 0.15s, opacity 0.15s;
}
.lu-spear-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

@keyframes luSpearFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}


  /* ===== 战绩榜 ===== */
  .rec-box { margin-top: 1.4rem; background: rgba(255,255,255,.85); border: 1px solid #ffe4e6; border-radius: 1.2rem; padding: 1rem; }
  .rec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
  .rec-head h3 { font-size: 1rem; color: #be123c; }
  .rec-tools { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
  .rec-me { font-size: .72rem; color: #a8a29e; }
  .rec-chip { border: 1px solid #fecdd3; background: #fff; color: #9f1239; border-radius: 999px; padding: .25rem .7rem; font-size: .72rem; cursor: pointer; font-family: inherit; }
  .rec-chip.on { background: #f43f5e; color: #fff; border-color: #f43f5e; }
  .rec-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rec-table { width: 100%; border-collapse: collapse; font-size: .78rem; min-width: 16rem; }
  .rec-table th, .rec-table td { padding: .42rem .35rem; text-align: center; border-bottom: 1px dashed #ffe4e6; white-space: nowrap; }
  .rec-table th { color: #9f1239; font-weight: 700; }
  .rec-table td.g { text-align: left; color: #57534e; }
  .rec-table td.lead { color: #e11d48; font-weight: 700; }
  .rec-table .d { color: #a8a29e; }
  .rec-table tr.sum td { font-weight: 700; color: #44403c; border-bottom: none; }
  .rec-bests { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: .8rem; }
  .rec-best { background: #fff1f2; border-radius: .9rem; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .15rem; }
  .rec-best span { font-size: .7rem; color: #a8a29e; }
  .rec-best b { font-size: 1.05rem; color: #e11d48; }
  .rec-best small { font-size: .62rem; color: #a8a29e; }
  .rec-recent { list-style: none; margin-top: .8rem; font-size: .74rem; color: #57534e; display: flex; flex-direction: column; gap: .3rem; }
  .rec-recent span { color: #a8a29e; }
  .rec-recent small { color: #d6d3d1; margin-left: .3rem; }
  .rec-empty { font-size: .74rem; color: #a8a29e; margin-top: .7rem; text-align: center; }


  /* =========================================================
   * v3 · iOS 风格主屏
   * ========================================================= */
  #home-screen { margin-top: -2.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
  .home-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
  @media (min-width: 640px) { #home-screen { width: 100%; max-width: 34rem; margin-left: auto; margin-right: auto; } }
  .widget { position: relative; border-radius: 1.45rem; padding: .85rem .9rem .8rem; min-height: 9.6rem; cursor: pointer;
    background: rgba(255,255,255,.93); border: 1px solid rgba(255,255,255,.95);
    box-shadow: 0 14px 30px -18px rgba(225,29,72,.35); display: flex; flex-direction: column; overflow: hidden;
    transition: transform .2s; -webkit-user-select: none; user-select: none; }
  .widget:active { transform: scale(.97); }
  .w-head { font-size: .72rem; font-weight: 700; color: #be123c; letter-spacing: .04em; display: flex; align-items: center; }
  .w-more { margin-left: auto; color: #fda4af; font-size: 1rem; line-height: 1; }
  .w-foot { margin-top: auto; font-size: .66rem; color: #a8a29e; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .w-foot b { color: #e11d48; }
  .w-miss { background: linear-gradient(150deg, #fff1f2 0%, #ffe4e6 55%, #fbcfe8 100%); }
  .w-miss-btn { align-self: center; margin: .35rem 0 .3rem; width: 4.3rem; height: 4.3rem; border-radius: 999px; border: none; cursor: pointer;
    font-size: 2.1rem; background: radial-gradient(circle at 35% 30%, #fff, #ffe4e6 60%, #fecdd3); line-height: 1;
    box-shadow: 0 10px 22px -8px rgba(225,29,72,.55), inset 0 -3px 8px rgba(244,63,94,.15); animation: beat 2.2s infinite ease-in-out; }
  .w-miss-btn.beat, .miss-big.beat { animation: tapBeat .45s cubic-bezier(.34,1.56,.64,1); }
  @keyframes tapBeat { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
  .w-wish-main { position: relative; align-self: center; width: 4.6rem; height: 4.6rem; margin: .3rem 0 .25rem; }
  .w-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
  .w-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
  .w-ring .bg { stroke: #ede9fe; }
  .w-ring .fg { stroke: #8b5cf6; transition: stroke-dasharray .6s; }
  .w-wish-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; }
  .w-wish-num b { font-size: 1.35rem; color: #7c3aed; }
  .w-wish-num span { font-size: .75rem; color: #a78bfa; margin-top: .3rem; }
  .w-wish .w-head { color: #7c3aed; }

  .home-apps { display: flex; flex-direction: column; gap: .9rem; }
  .app-row { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: .6rem; }
  .app-group { min-width: 0; }
  .app-group-name { font-size: .66rem; font-weight: 700; color: #be8b99; letter-spacing: .18em; margin: 0 0 .45rem .2rem; }
  .app-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); column-gap: .6rem; row-gap: .7rem; }
  .app { border: none; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .38rem;
    font-family: inherit; -webkit-user-select: none; user-select: none; min-width: 0; }
  .app-ico { position: relative; width: min(3.85rem, 17vw); aspect-ratio: 1; border-radius: 26%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 16px -8px rgba(136,19,55,.45), inset 0 1px 0 rgba(255,255,255,.45); transition: transform .18s; }
  .app-ico::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%); pointer-events: none; }
  .app:active .app-ico { transform: scale(.9); filter: brightness(.92); }
  .app-emoji { font-size: min(1.85rem, 8.2vw); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12)); }
  .app-name { font-size: .7rem; color: #57534e; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .app-badge { position: absolute; top: -.35rem; right: -.35rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px;
    background: #ef4444; color: #fff; font-size: .66rem; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px #fff; font-family: -apple-system, 'PingFang SC', sans-serif; }
  @media (min-width: 768px) { .app-ico { width: 4.2rem; } .app-emoji { font-size: 2rem; } }
  body.sheet-open footer { visibility: hidden; }

  /* ---------- 全屏页面 ---------- */
  body.sheet-open { overflow: hidden; }
  body.sheet-open .topbar { display: none; }
  .sheet { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; visibility: hidden;
    background: linear-gradient(160deg, #fff1f2 0%, #fdf2f8 50%, #f5f3ff 100%);
    transform: translateY(104%); transition: transform .42s cubic-bezier(.32,.72,0,1), visibility 0s linear .42s; will-change: transform; }
  .sheet.open { visibility: visible; transform: translateY(0); transition: transform .42s cubic-bezier(.32,.72,0,1), visibility 0s; box-shadow: 0 -20px 40px -20px rgba(136,19,55,.3); }
  .sheet-bar { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: .5rem;
    padding: calc(env(safe-area-inset-top, 0px) + .7rem) max(.8rem, env(safe-area-inset-right, 0px)) .6rem max(.6rem, env(safe-area-inset-left, 0px));
    background: rgba(255,250,251,.92); border-bottom: 1px solid rgba(251,207,232,.6); touch-action: none; }
  @supports (backdrop-filter: blur(8px)) { .sheet-bar { backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); background: rgba(255,250,251,.78); } }
  .sheet-grab { position: absolute; top: calc(env(safe-area-inset-top, 0px) + .22rem); left: 50%; width: 2.4rem; height: .26rem; margin-left: -1.2rem; border-radius: 999px; background: rgba(190,18,60,.18); }
  .sheet-close { border: none; background: none; color: #e11d48; font-size: 1.35rem; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: .1rem; padding: .2rem .3rem; line-height: 1; }
  .sheet-close span { font-size: .86rem; font-weight: 600; }
  .sheet-title { position: absolute; left: 50%; transform: translateX(-50%); bottom: .75rem; font-size: .95rem; font-weight: 700; color: #292524; white-space: nowrap; max-width: 52%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
  .sheet-edit { margin-left: auto; border: none; cursor: pointer; padding: .38rem .8rem; border-radius: 999px; font-size: .74rem; font-weight: 600; font-family: inherit; color: #e11d48; background: #fff1f2; }
  .sheet-edit.on { background: #e11d48; color: #fff; }
  body.edit-mode .sheet-bar { background: linear-gradient(90deg, rgba(253,164,175,.95), rgba(249,168,212,.95)); }
  body.edit-mode .sheet-title::after { content: ' · 编辑中'; color: #881337; font-size: .7rem; }
  .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); }
  .sheet-inner { max-width: 56rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
  .sheet-inner > section.panel { padding: 1.25rem 1.1rem; }
  @media (min-width:768px){ .sheet-inner > section.panel { padding: 2rem; } }
  .push-hint { font-size: .66rem; color: #a8a29e; line-height: 1.6; margin-top: .4rem; }
  .edit-banner { position: relative; z-index: 31; }
  body.sheet-open .edit-banner { display: none; }

  /* ---------- 恋爱地图 ---------- */
  .map-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
  .seg { display: inline-flex; background: #fff1f2; border-radius: 999px; padding: .2rem; }
  .seg button { border: none; background: none; padding: .42rem .85rem; border-radius: 999px; font-size: .76rem; font-family: inherit; font-weight: 600; color: #be123c; cursor: pointer; }
  .seg button.on { background: #fff; box-shadow: 0 2px 8px rgba(225,29,72,.18); color: #e11d48; }
  #place-count:empty { display: none; }
  #place-count { background: #fb7185; color: #fff; border-radius: 999px; padding: 0 .38rem; font-size: .62rem; margin-left: .15rem; }
  .map-search { position: relative; display: flex; gap: .45rem; margin-bottom: .7rem; z-index: 1200; }
  .map-search input { flex: 1; min-width: 0; border: 1px solid #fecdd3; background: #fff; border-radius: 999px; padding: .55rem .95rem; font: inherit; font-size: .85rem; color: #4c0519; outline: none; }
  .map-search input:focus { border-color: #fb7185; box-shadow: 0 0 0 3px rgba(251,113,133,.15); }
  .map-results { display: none; position: absolute; left: 0; right: 0; top: calc(100% + .35rem); background: #fff; border-radius: 1rem; box-shadow: 0 12px 32px rgba(190,18,60,.18); border: 1px solid #ffe4e6; max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .map-results.show { display: block; }
  .map-res { display: block; width: 100%; text-align: left; border: none; background: none; padding: .7rem .95rem; border-bottom: 1px solid #fff1f2; font: inherit; cursor: pointer; }
  .map-res:last-child { border-bottom: none; }
  .map-res:active { background: #fff1f2; }
  .map-res b { display: block; font-size: .88rem; color: #881337; }
  .map-res span { display: block; font-size: .72rem; color: #9f8a90; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .map-res-tip { padding: .75rem .95rem; font-size: .76rem; color: #9f8a90; line-height: 1.5; }
  .map-wrap { position: relative; border-radius: 1.1rem; overflow: hidden; border: 1px solid #ffe4e6; }
  .love-map { height: calc(100dvh - 17.5rem - env(safe-area-inset-top, 0px)); min-height: 20rem; background: #f5f0ea; z-index: 0; }
  .map-loading { height: 100%; display: flex; align-items: center; justify-content: center; color: #a8a29e; font-size: .8rem; }
  .leaflet-container { font-family: inherit; }
  .lu-pin-wrap { background: none; border: none; }
  .lu-pin { width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(135deg, #fb7185, #e11d48);
    box-shadow: 0 6px 14px -4px rgba(136,19,55,.6); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform .2s; }
  .lu-pin > * { transform: rotate(45deg); }
  .lu-pin span { font-size: 17px; }
  .lu-pin.ph img { width: 140%; height: 140%; object-fit: cover; }
  .lu-pin.sel { transform: rotate(-45deg) scale(1.22); border-color: #fde68a; }
  .lu-temp-dot { width: 22px; height: 22px; border-radius: 999px; background: rgba(244,63,94,.25); border: 3px solid #f43f5e; animation: beat 1.4s infinite; }
  .lu-popup .leaflet-popup-content-wrapper { border-radius: 1rem; }
  .lu-popup .leaflet-popup-content { margin: .7rem .8rem; }
  .lu-temp-pop { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; min-width: 9.5rem; font-family: inherit; }
  .lu-temp-pop b { font-size: .78rem; color: #44403c; }
  .lu-temp-pop .btn-primary { padding: .5rem .8rem; font-size: .8rem; }
  .place-card { position: absolute; left: .6rem; right: .6rem; bottom: .6rem; z-index: 500; background: rgba(255,255,255,.97); border-radius: 1.1rem;
    padding: .7rem; display: flex; gap: .75rem; align-items: flex-start; box-shadow: 0 16px 32px -12px rgba(136,19,55,.45);
    transform: translateY(130%); opacity: 0; transition: transform .35s cubic-bezier(.34,1.3,.64,1), opacity .25s; pointer-events: none; }
  .place-card.show { transform: none; opacity: 1; pointer-events: auto; }
  .pc-photo { width: 5.4rem; height: 5.4rem; border-radius: .85rem; overflow: hidden; flex-shrink: 0; background: #fff1f2; display: flex; align-items: center; justify-content: center; font-size: 2rem; cursor: zoom-in; }
  .pc-photo.empty { cursor: default; }
  .pc-photo img { width: 100%; height: 100%; object-fit: cover; }
  .pc-main { flex: 1; min-width: 0; padding-right: 1.4rem; }
  .pc-name { font-weight: 700; color: #292524; font-size: .95rem; }
  .pc-date { font-size: .68rem; color: #fb7185; margin-top: .2rem; }
  .pc-note { font-size: .78rem; color: #57534e; margin-top: .3rem; line-height: 1.55; }
  .pc-actions { gap: .4rem; margin-top: .45rem; }
  .pc-actions .pill-btn { padding: .35rem .7rem; font-size: .7rem; }
  .pc-x { position: absolute; top: .45rem; right: .45rem; border: none; background: #f5f5f4; width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: .7rem; color: #78716c; cursor: pointer; }
  .place-list { display: flex; flex-direction: column; gap: .55rem; }
  .place-row { display: flex; align-items: center; gap: .75rem; padding: .6rem; background: rgba(255,255,255,.9); border: 1px solid #ffe4e6; border-radius: 1rem; cursor: pointer; }
  .pr-pic { width: 3.2rem; height: 3.2rem; border-radius: .75rem; overflow: hidden; flex-shrink: 0; background: #fff1f2; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
  .pr-pic img { width: 100%; height: 100%; object-fit: cover; }
  .pr-main { flex: 1; min-width: 0; }
  .pr-name { font-weight: 700; font-size: .88rem; color: #292524; }
  .pr-sub { font-size: .7rem; color: #a8a29e; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pr-actions { gap: .35rem; }

  /* ---------- 愿望清单 ---------- */
  .wish-progress { background: linear-gradient(135deg, #f5f3ff, #fdf2f8); border: 1px solid #ede9fe; border-radius: 1rem; padding: .8rem 1rem; margin-bottom: 1rem; }
  .wp-text { font-size: .8rem; color: #6d28d9; font-weight: 600; display: flex; align-items: baseline; gap: .15rem; }
  .wp-text b { font-size: 1.5rem; color: #7c3aed; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; margin-left: .3rem; }
  .wp-text span { color: #a78bfa; }
  .wp-bar { height: .5rem; background: #ede9fe; border-radius: 999px; overflow: hidden; margin-top: .5rem; }
  .wp-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #c4b5fd, #ec4899); transition: width .6s; }
  .todo-item .chk:hover { border-color: #f43f5e; background: #fff1f2; }
  .wish-sub { font-size: .85rem; color: #be123c; margin: 1.3rem 0 .7rem; }
  .stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  @media (min-width: 640px) { .stamp-grid { grid-template-columns: repeat(5, 1fr); } }
  .stamp { border: none; cursor: pointer; font-family: inherit; padding: 6px; display: block; text-align: center;
    /* 邮票齿边：外圈一排小圆孔，里面是白色票面 */
    background: radial-gradient(circle, transparent 0 2.6px, #fff 3px) -1px -1px / 10px 10px;
    filter: drop-shadow(0 4px 6px rgba(136,19,55,.2)); transition: transform .2s; }
  .st-in { background: #fff; display: flex; flex-direction: column; gap: .25rem; padding: .2rem .2rem .3rem; }
  .stamp:nth-child(3n+1) { transform: rotate(-2deg); }
  .stamp:nth-child(3n+2) { transform: rotate(1.5deg); }
  .stamp:active { transform: scale(.95); }
  .st-pic { position: relative; aspect-ratio: 1; border-radius: .2rem; overflow: hidden; background: #fff1f2; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
  .st-pic img { width: 100%; height: 100%; object-fit: cover; }
  .st-pic::after { content: '💮'; position: absolute; right: .15rem; bottom: .1rem; font-size: 1rem; opacity: .9; }
  .st-pic.empty::after { display: none; }
  .st-txt { font-size: .68rem; font-weight: 700; color: #44403c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .st-date { font-size: .58rem; color: #fb7185; }
  .stamp-prev { font-size: 1.6rem !important; }
  .wish-modal-txt { font-size: .95rem; color: #6d28d9; font-weight: 700; margin-bottom: .9rem; text-align: center; }
  .wv-photo { border-radius: 1rem; overflow: hidden; background: #fff1f2; max-height: 55vh; display: flex; justify-content: center; }
  .wv-photo img { max-width: 100%; max-height: 55vh; object-fit: contain; cursor: zoom-in; }
  .wv-photo.empty { font-size: 4rem; padding: 2rem; }
  .wv-date { text-align: center; color: #fb7185; font-size: .78rem; margin-top: .7rem; }
  .wv-note { text-align: center; color: #881337; font-size: 1.05rem; margin-top: .4rem; }

  /* ---------- 想你了 ---------- */
  .miss-panel { text-align: center; }
  .miss-me { display: flex; justify-content: center; align-items: center; gap: .4rem; font-size: .74rem; color: #a8a29e; }
  .miss-me.shake { animation: shake .45s; }
  @keyframes shake { 0%,100% { transform: none; } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
  .miss-big { margin: 1.4rem auto 1.2rem; width: 11rem; height: 11rem; border-radius: 999px; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    background: radial-gradient(circle at 35% 30%, #fff 0%, #ffe4e6 45%, #fda4af 100%); font-family: inherit;
    box-shadow: 0 24px 40px -18px rgba(225,29,72,.7), inset 0 -8px 20px rgba(244,63,94,.25), 0 0 0 10px rgba(255,228,230,.6); }
  .miss-big .mh { font-size: 4.2rem; line-height: 1; animation: beat 2.2s infinite ease-in-out; }
  .miss-big .ml { font-size: 1.05rem; font-weight: 700; color: #be123c; letter-spacing: .2em; }
  .miss-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
  .miss-stats .ms { background: #fff1f2; border-radius: 1rem; padding: .7rem .3rem; display: flex; flex-direction: column; gap: .15rem; }
  .miss-stats .ms b { font-size: 1.5rem; color: #e11d48; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; }
  .miss-stats .ms.online b { font-size: 1.1rem; padding: .25rem 0; }
  .miss-stats .ms span { font-size: .66rem; color: #a8a29e; }
  .miss-tip { grid-column: 1 / -1; font-size: .78rem; color: #a8a29e; }
  .miss-week { margin-top: 1rem; background: rgba(255,255,255,.8); border: 1px solid #ffe4e6; border-radius: 1rem; padding: .7rem .8rem .5rem; }
  .mw-head { display: flex; justify-content: space-between; font-size: .68rem; color: #a8a29e; margin-bottom: .4rem; }
  .mw-leg i { display: inline-block; width: .55rem; height: .55rem; border-radius: 2px; margin: 0 .15rem 0 .4rem; vertical-align: -1px; }
  .mw-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; height: 5.4rem; }
  .mw-day { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 0; }
  .mw-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
  .mw-pair i { width: 38%; max-width: .7rem; min-height: 2px; border-radius: 3px 3px 0 0; }
  .mw-day span { font-size: .58rem; color: #a8a29e; white-space: nowrap; }
  .miss-week i.b { background: #93c5fd; } .miss-week i.g { background: #f9a8d4; }
  .miss-push { font-size: .66rem; color: #a8a29e; line-height: 1.6; margin-top: .9rem; }
  .miss-float { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; transition: opacity .7s; }
  .miss-float.out { opacity: 0; }
  .miss-float > span { position: absolute; bottom: -3rem; animation: missUp 3s ease-in forwards; opacity: 0; }
  @keyframes missUp { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(var(--sw), -55vh) scale(1); } 100% { transform: translate(calc(var(--sw) * -1), -115vh) scale(1.15); opacity: .2; } }
  .miss-float-msg { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; animation: missPop .6s cubic-bezier(.34,1.56,.64,1); }
  .miss-float-msg b { display: block; font-size: 5.5rem; line-height: 1; animation: beat .8s infinite ease-in-out; filter: drop-shadow(0 10px 24px rgba(225,29,72,.55)); }
  .miss-float-msg p { margin-top: .6rem; background: rgba(255,255,255,.92); color: #be123c; font-weight: 700; padding: .5rem 1.2rem; border-radius: 999px; font-size: 1rem; box-shadow: 0 10px 30px -10px rgba(225,29,72,.5); white-space: nowrap; }
  @keyframes missPop { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
  .miss-pop { max-width: 20rem; text-align: center; }
  .mp-heart { font-size: 4rem; animation: beat 1s infinite ease-in-out; }
  .mp-main { font-size: 1.3rem; font-weight: 700; color: #be123c; margin-top: .4rem; font-family: 'Kaiti SC','STKaiti','KaiTi',serif; }
  .mp-sub { font-size: .76rem; color: #a8a29e; margin-top: .4rem; }
  [data-sec="records"] .rec-box { margin-top: .6rem; border: none; padding: 0; background: none; }
  [data-sec="records"] .rec-head h3 { display: none; }

/* ===== 工具箱 ===== */
.box-list { display: flex; flex-direction: column; gap: .7rem; padding: .3rem 0; }
.box-tool { display: flex; align-items: center; gap: .85rem; width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.85); border-radius: 18px; padding: .9rem; box-shadow: 0 6px 20px rgba(244,114,182,.12); font: inherit; color: #3f3f46; }
.box-ic { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.box-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.box-tx b { font-size: .98rem; }
.box-tx small { color: #9ca3af; font-size: .75rem; margin-top: .15rem; }
.box-go { color: #d4d4d8; font-size: 1.5rem; }
.box-frame-wrap { display: flex; flex-direction: column; height: calc(100vh - 8rem); min-height: 480px; margin: 0 -.2rem; }
@supports (height: 100dvh) { .box-frame-wrap { height: calc(100dvh - 8rem); } }
.box-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 0 .5rem; font-weight: 700; font-size: .9rem; color: #52525b; }
.box-back { border: 0; background: rgba(255,255,255,.8); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .82rem; color: #ec4899; }
.box-out { text-decoration: none; color: #a1a1aa; font-size: 1.1rem; padding: 0 .4rem; }
.box-frame { flex: 1 1 auto; display: block; width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 18px; background: transparent; }

/* 首页照片墙：横向滑动 */
.home-photos .photo-head{margin-bottom:.6rem}
.home-photos .photo-grid{display:flex;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;padding:.6rem .3rem 1rem;margin:0 -.3rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.home-photos .photo-grid::-webkit-scrollbar{display:none}
.home-photos .polaroid,.home-photos .add-photo-btn{flex:0 0 62%;max-width:260px;scroll-snap-align:center}
.home-photos .add-photo-btn{min-height:200px}
.home-photos .ph-box{cursor:pointer}
.home-photos .mini-btn{width:1.6rem;height:1.6rem;font-size:.72rem;opacity:.85}
