/* ===== 她的小屋 · 治愈手绘风 v2 · 首屏布局 ===== */
:root {
  --cream: #fffaf3;
  --paper: #fffdf9;
  --pink: #ffd9df;
  --pink-deep: #e8929f;
  --yellow: #fff0c2;
  --mint: #d8f0e2;
  --purple: #e8e0f5;
  --ink: #5b4b47;
  --ink-soft: #9c8b84;
  --shadow: 0 8px 26px rgba(150, 120, 100, .14);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #fff6ee 0%, #fdf0f2 45%, #f3f7ee 100%);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.app {
  height: 100vh; max-width: 1280px; margin: 0 auto;
  padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 10px;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border-radius: 16px;
  padding: 10px 18px; box-shadow: var(--shadow); flex-shrink: 0;
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.brand-icon { font-size: 22px; }
.day-counter {
  margin-left: auto; font-size: 13px; color: var(--ink-soft);
  background: var(--yellow); padding: 6px 14px; border-radius: 999px;
}
.day-counter strong { color: var(--ink); font-size: 16px; }
.nav-btn {
  text-decoration: none; flex-shrink: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: #fff; background: var(--pink-deep);
  padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 3px 9px rgba(150,120,100,.18);
  transition: transform .18s, opacity .18s;
}
.nav-btn:hover { transform: translateY(-2px); opacity: .92; }
.nav-btn.ghost-btn { background: var(--mint); color: var(--ink); }
.settings-btn {
  border: none; background: var(--mint); cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px;
}

/* 场景 */
.scene-wrap {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; flex: 1; min-height: 0;
}
.scene {
  position: relative; width: 100%; height: 100%;
  border-radius: 14px; overflow: hidden; background: #f8efe4;
}
.room { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 角色 */
.character {
  position: absolute; left: 50%; top: 63%;
  height: 68%; transform: translate(-50%, -50%);
  z-index: 5; cursor: grab; touch-action: none;
  animation: breathe 3.6s ease-in-out infinite;
}
.character img {
  height: 100%; width: auto; display: block; pointer-events: none;
  filter: drop-shadow(0 10px 10px rgba(90,70,60,.18));
}
@keyframes breathe { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 50% { transform: translate(-50%,-50%) translateY(-5px); } }
.character.happy { animation: hop .6s ease; }
@keyframes hop { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 40% { transform: translate(-50%,-50%) translateY(-20px); } }
.character.dragging { cursor: grabbing; animation: none; z-index: 12; }
.character.dragging img { filter: drop-shadow(0 16px 16px rgba(90,70,60,.3)); }
/* 被揪起：离地阴影更深更大，轻微提亮 */
.character.pulled img { filter: drop-shadow(0 26px 15px rgba(90,70,60,.36)) brightness(1.05); }
/* 松手回弹：像果冻一样 duang 一下，位置由 left/top 决定，不改定位 */
.character.settle { animation: settle .62s cubic-bezier(.34,1.5,.5,1); }
@keyframes settle {
  0%   { transform: translate(-50%,-50%) translateY(-5px) scale(1.03); }
  55%  { transform: translate(-50%,-50%) translateY(3px) scale(.985); }
  100% { transform: translate(-50%,-50%) translateY(0) scale(1); }
}
.character.pose-study { height: 70%; }
.character.pose-sleep, .character.pose-phone { height: 60%; }
.character.swap img { animation: poseIn .45s ease both; }
@keyframes poseIn { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }

.bubble {
  position: absolute; top: -2%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 2px solid var(--pink); border-radius: 16px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(150,120,100,.2); z-index: 8;
}
.bubble::after {
  content: ""; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--pink);
}

/* 事件门 */
.doors { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.door {
  position: absolute; bottom: 8%; width: 74px; height: 108px;
  cursor: pointer; pointer-events: auto;
  animation: doorAppear .5s ease both;
}
.door:nth-child(1) { left: 8%; }
.door:nth-child(2) { left: 22%; }
.door:nth-child(3) { right: 8%; }
.door-img {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #f6d9a8, #d9a86a);
  border: 4px solid #a97742; border-radius: 8px 8px 2px 2px;
  box-shadow: 0 6px 14px rgba(90,70,60,.3), inset 0 0 0 3px rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; position: relative;
}
.door-img::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 7px; height: 7px; border-radius: 50%; background: #ffe9a8;
  transform: translateY(-50%); box-shadow: 0 0 8px #ffe9a8;
}
.door-label {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  background: #fff; border-radius: 999px; padding: 2px 9px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
@keyframes doorAppear { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }

/* 墙上心愿 */
.wall-wishes { position: absolute; left: 2%; top: 5%; z-index: 4; display: flex; flex-wrap: wrap; gap: 5px; max-width: 30%; }
.wish-note {
  background: var(--yellow); border-radius: 3px; padding: 5px 8px;
  font-size: 10px; box-shadow: 0 3px 7px rgba(150,120,100,.2);
  transform: rotate(-2deg); max-width: 110px; line-height: 1.3;
}
.wish-note:nth-child(even) { background: var(--pink); transform: rotate(2deg); }
.wish-note.done { background: var(--mint); color: #5f8a6e; opacity: .85; text-decoration: line-through; }

/* 礼物摆件 */
.room-gifts { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.gift-item {
  position: absolute; width: 9%; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: grab; touch-action: none;
  filter: drop-shadow(0 4px 4px rgba(90,70,60,.25));
  transition: transform .2s;
}
.gift-item img { width: 100%; display: block; pointer-events: none; }
.gift-item:hover { transform: translate(-50%, -50%) scale(1.18); }
.gift-item.dragging { cursor: grabbing; z-index: 12; transform: translate(-50%, -50%) scale(1.12); }
.gift-item.dragging img { filter: drop-shadow(0 12px 12px rgba(90,70,60,.35)); }

/* 拖动提示 */
.drag-hint {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  background: rgba(255,255,255,.86); border-radius: 999px;
  padding: 5px 14px; font-size: 11px; color: var(--ink-soft);
  z-index: 10; pointer-events: none; transition: opacity .5s;
}
.drag-hint.hidden { opacity: 0; }

/* 照顾动作（场景内小圆钮） */
.care-actions {
  position: absolute; right: 2.5%; bottom: 5%; z-index: 9;
  display: flex; flex-direction: column; gap: 7px;
}
.care-btn {
  border: 2px solid #e8c9a0; cursor: pointer; font-family: inherit;
  background: #fff8ec; border-radius: 50%; width: 42px; height: 42px;
  font-size: 19px; box-shadow: 0 3px 9px rgba(150,120,100,.18);
  transition: transform .18s;
}
.care-btn:hover { transform: scale(1.1); }

/* ---- 照顾动作专属互动 ---- */
.care-fx { position: absolute; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; border-radius: inherit; }

/* 亲一口：脸颊红晕（挂在角色身上，跟着人走） */
.blush {
  position: absolute; z-index: 3; width: 8%; height: 3.4%;
  border-radius: 50%; background: rgba(255,130,155,.55);
  filter: blur(2px); opacity: 0; transition: opacity .18s;
}
.blush-l { top: 33%; left: 30%; }
.blush-r { top: 33%; right: 30%; }
.character.kissed .blush { opacity: 1; }
.character.kissed img { animation: kissShy .95s ease; }
@keyframes kissShy {
  0%,100% { transform: translate(0,0) rotate(0); }
  25% { transform: translate(-4px,3px) rotate(-5deg); }
  55% { transform: translate(4px,2px) rotate(5deg); }
  80% { transform: translate(-2px,0) rotate(-2deg); }
}

/* 摸摸头：低头 + 左右蹭蹭 */
.character.pat img { animation: patNod .85s ease; }
@keyframes patNod {
  0%,100% { transform: translateY(0) rotate(0) scale(1); }
  30% { transform: translateY(7px) rotate(-5deg) scale(.98); }
  60% { transform: translateY(7px) rotate(5deg) scale(.98); }
}
.fx-hand {
  position: absolute; left: 50%; top: 26%; font-size: 40px;
  transform-origin: 50% 20%; animation: handPat 1.15s ease both;
}
@keyframes handPat {
  0% { transform: translate(-50%,-70%) scale(.5) rotate(-18deg); opacity: 0; }
  28% { transform: translate(-50%,-50%) scale(1.15) rotate(0); opacity: 1; }
  62% { transform: translate(-50%,-50%) scale(1) rotate(-12deg); opacity: 1; }
  100% { transform: translate(-50%,-80%) scale(.85) rotate(-4deg); opacity: 0; }
}
.fx-sparkle {
  position: absolute; left: 66%; top: 20%; font-size: 22px;
  animation: sparklePop 1.15s ease-out both;
}
@keyframes sparklePop {
  0% { transform: scale(.2) rotate(0); opacity: 0; }
  35% { transform: scale(1.3) rotate(25deg); opacity: 1; }
  100% { transform: scale(.7) rotate(70deg) translateY(-14px); opacity: 0; }
}
.fx-kiss {
  position: absolute; left: 50%; top: 34%; font-size: 34px;
  animation: kissFly 1.25s cubic-bezier(.3,.8,.4,1) both;
}
@keyframes kissFly {
  0% { transform: translate(-50%,150px) scale(1.7) rotate(-22deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translate(-50%,-46px) scale(.35) rotate(18deg); opacity: 0; }
}

/* 笑：奶蛙捧腹大笑 + 人物跟着抽抽 */
.character.laughing img { animation: naiwaLaugh .52s ease-in-out infinite; }
@keyframes naiwaLaugh {
  0%,100% { transform: translateY(0) scale(1,1) rotate(0); }
  25% { transform: translateY(11px) scale(1.06,.94) rotate(-6deg); }
  50% { transform: translateY(-7px) scale(.95,1.07) rotate(0); }
  75% { transform: translateY(11px) scale(1.06,.94) rotate(6deg); }
}
.fx-naiwa {
  position: absolute; left: 16%; bottom: 7%; width: 120px; text-align: center;
  animation: naiwaIn .4s cubic-bezier(.34,1.6,.5,1) both;
}
.fx-naiwa img {
  width: 100%; display: block;
  animation: naiwaBounce .48s ease-in-out infinite;
  filter: drop-shadow(0 8px 10px rgba(90,70,60,.28));
}
.fx-naiwa-text {
  display: inline-block; margin-top: -8px; font-size: 13px; font-weight: 800;
  color: #a96600; background: #fff2bf; border: 2px solid #f4d98a;
  border-radius: 999px; padding: 2px 10px;
  animation: textShake .32s ease-in-out infinite alternate;
}
@keyframes naiwaIn { from { transform: translateY(70px) scale(.4); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes naiwaBounce {
  0%,100% { transform: translateY(0) scale(1,1) rotate(0); }
  25% { transform: translateY(9px) scale(1.07,.93) rotate(-5deg); }
  75% { transform: translateY(9px) scale(1.07,.93) rotate(5deg); }
}
@keyframes textShake { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* 底部操作区 */
.dock {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 16px 12px; flex-shrink: 0;
}
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab {
  border: none; cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 700; padding: 7px 16px; border-radius: 999px;
  background: #f6efe7; color: var(--ink); transition: background .2s;
}
.tab.active { background: var(--pink-deep); color: #fff; }
.tab-panels { position: relative; min-height: 104px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.care-card {
  border: 2px solid #f0e4d8; background: #fffaf2; border-radius: 14px;
  padding: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  gap: 10px; transition: transform .18s, background .2s;
}
.care-card:hover { transform: translateY(-2px); background: var(--yellow); }
.cc-emoji { font-size: 24px; }
.panel-tip { text-align: center; font-size: 11px; color: var(--ink-soft); margin: 8px 0 0; }

.input-row { display: flex; gap: 8px; margin-bottom: 8px; }
input, select {
  flex: 1; min-width: 0; border: 2px solid #f0e4d8; border-radius: 11px;
  padding: 8px 11px; font-size: 13px; font-family: inherit; color: var(--ink);
  background: #fffdfa; outline: none;
}
input:focus, select:focus { border-color: var(--pink-deep); }
button.primary, button.ghost {
  border: none; cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 700; border-radius: 11px; padding: 8px 15px; transition: transform .18s;
}
button.primary { background: var(--pink-deep); color: #fff; }
button.ghost { background: var(--mint); color: var(--ink); }
button.primary:hover, button.ghost:hover { transform: translateY(-2px); }
button.wide { width: 100%; }

.wish-list { list-style: none; margin: 6px 0; padding: 0; max-height: 78px; overflow-y: auto; }
.wish-list li {
  display: flex; align-items: center; gap: 8px; padding: 5px 9px;
  background: #fffaf2; border-radius: 9px; margin-bottom: 4px;
  font-size: 12px; cursor: pointer;
}
.wish-list li.done { opacity: .5; text-decoration: line-through; }
.wish-list li.bottle { background: var(--purple); }
.wish-list .wish-text { flex: 1; }
.wish-list .del { border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 15px; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; }
.hint { font-size: 11px; color: var(--ink-soft); }
.hint.small { margin-bottom: 6px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; max-height: 84px; overflow-y: auto; border-left: 2px dashed #ecd8c5; }
.timeline li { position: relative; font-size: 11px; padding: 3px 0 3px 5px; }
.timeline li.fresh { animation: timelineIn .5s ease; }
@keyframes timelineIn { from { opacity: 0; transform: translateX(-10px); background: var(--yellow); } to { opacity: 1; transform: none; background: transparent; } }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink-deep); }
.timeline time { color: var(--ink-soft); margin-right: 5px; }

.footer { text-align: center; color: var(--ink-soft); font-size: 11px; flex-shrink: 0; }

/* 弹层通用 */
.modal { position: fixed; inset: 0; background: rgba(80,60,50,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper); border-radius: 22px; padding: 26px 30px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); position: relative; max-width: 360px; width: 90%;
}
.modal-close { position: absolute; right: 12px; top: 8px; border: none; background: none; font-size: 22px; cursor: pointer; color: var(--ink-soft); }
.modal-emoji { font-size: 42px; }
.modal-card h2 { margin: 8px 0 6px; }
.modal-card p { color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.modal-note { color: var(--pink-deep) !important; font-weight: 700; margin-top: 12px; }
.setting-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.setting-row label { width: 100px; text-align: left; font-size: 12px; font-weight: 700; }
.setting-hint { font-size: 11px; color: var(--ink-soft); margin: 14px 0; }

/* 拆礼物 */
.unwrap-stage { text-align: center; color: #fff; }
.unwrap-tip { font-size: 16px; font-weight: 700; margin-bottom: 20px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.gift-box { font-size: 90px; cursor: pointer; animation: boxPulse 1.2s ease-in-out infinite; }
@keyframes boxPulse { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.08) rotate(3deg); } }
.gift-box.shake { animation: boxShake .5s ease; }
@keyframes boxShake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.confetti { position: fixed; inset: 0; pointer-events: none; }
.confetti span { position: absolute; top: -20px; font-size: 20px; animation: confettiFall 1.6s ease-in forwards; }
@keyframes confettiFall { to { transform: translateY(105vh) rotate(540deg); opacity: 0; } }
.unwrapped-img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.3)); animation: giftReveal .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes giftReveal { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.unwrap-msg { font-size: 14px; margin-top: 14px; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.unwrap-done {
  display: block; margin: 18px auto 0; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  background: #fff; color: var(--pink-deep); border-radius: 999px; padding: 10px 26px;
}

/* 礼物详情 */
.detail-card { max-width: 420px; padding: 26px 28px 24px; }
.detail-card h2 { margin: 2px 0 14px; font-size: 21px; }
.detail-img {
  display: block; width: 100%; max-width: 260px; max-height: 240px;
  margin: 0 auto 16px; object-fit: contain;
  background: #fffaf2; border-radius: 16px; padding: 10px;
  filter: drop-shadow(0 8px 12px rgba(90,70,60,.18));
}
.detail-meta { text-align: left; display: grid; gap: 8px; }
.detail-meta > div {
  display: flex; gap: 10px; align-items: baseline;
  background: #fffaf2; border-radius: 10px; padding: 8px 11px;
}
.meta-label { font-size: 11px; color: var(--ink-soft); flex-shrink: 0; min-width: 56px; }
.detail-meta span:last-child { font-size: 13px; font-weight: 600; word-break: break-all; }

/* 子页面（投射礼物 / 设置） */
.sub-page {
  min-height: 100vh; max-width: 760px; margin: 0 auto;
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
body:has(.sub-page) { overflow: auto; }
.sub-topbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border-radius: 16px;
  padding: 12px 18px; box-shadow: var(--shadow); flex-wrap: wrap;
}
.sub-topbar h1 { margin: 0; font-size: 19px; }
.back-btn {
  text-decoration: none; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--mint); padding: 7px 12px; border-radius: 999px;
  transition: transform .18s;
}
.back-btn:hover { transform: translateX(-2px); }
.sub-topbar-tip { margin-left: auto; font-size: 11px; color: var(--ink-soft); }
.sub-main { display: flex; flex-direction: column; gap: 14px; }
.sub-card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px;
}
.sub-card h2 { margin: 0 0 6px; font-size: 17px; }
.sub-tip { margin: 0 0 16px; font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-row label { font-size: 12px; font-weight: 700; color: var(--ink); }
.form-row input { width: 100%; flex: none; }
.big-btn { padding: 13px; font-size: 15px; margin-top: 4px; }
.form-note { min-height: 18px; margin: 10px 0 0; font-size: 12px; color: var(--mint-deep, #6f9c7f); text-align: center; }

.upload-zone {
  display: block; border: 2px dashed #e6c9b8; border-radius: 16px;
  background: #fffbf6; min-height: 170px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; overflow: hidden; transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragging { border-color: var(--pink-deep); background: #fff2f4; }
.upload-placeholder { text-align: center; color: var(--ink-soft); font-size: 13px; display: grid; gap: 8px; }
.upload-icon { font-size: 40px; }
.upload-preview { max-width: 100%; max-height: 240px; object-fit: contain; display: block; }
.upload-preview[hidden], .upload-placeholder[hidden] { display: none; }

.gift-manage-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.empty-tip { font-size: 12px; color: var(--ink-soft); text-align: center; padding: 16px; }
.gift-manage-item {
  display: flex; align-items: center; gap: 12px;
  background: #fffaf2; border-radius: 12px; padding: 8px 10px;
}
.manage-thumb { width: 46px; height: 46px; object-fit: contain; border-radius: 9px; background: #fff; }
.manage-info { flex: 1; min-width: 0; }
.manage-name { font-size: 13px; font-weight: 700; }
.manage-meta { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.manage-del {
  border: none; cursor: pointer; font-family: inherit; font-size: 11px;
  background: var(--pink); color: var(--ink); padding: 6px 10px; border-radius: 999px;
}
/* 心愿汇总（礼物页） */
.wish-summary-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wish-summary-head { font-size: 11px; color: var(--ink-soft); margin-bottom: 2px; }
.wish-summary-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--yellow); border-radius: 12px; padding: 10px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: transform .18s, background .2s;
}
.wish-summary-item:hover { transform: translateX(3px); }
.wish-summary-item.done {
  background: var(--mint); color: #5f8a6e;
  text-decoration: line-through; opacity: .85;
}
.wish-summary-text { flex: 1; word-break: break-all; }
.wish-summary-flag { font-size: 11px; flex-shrink: 0; }

.soft-card { background: linear-gradient(160deg, #fffaf2, #fff4f0); }
.tips-list { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-soft); line-height: 1.9; }

/* 房间角落的投射礼物小组件 */
.gift-widget {
  position: absolute; right: 2.5%; top: 5%; z-index: 9;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.gift-widget-toggle {
  border: 2px solid #e8c9a0; background: #fff8ec; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--ink);
  border-radius: 999px; padding: 7px 12px;
  box-shadow: 0 3px 9px rgba(150,120,100,.18);
  transition: transform .18s;
}
.gift-widget-toggle:hover { transform: scale(1.05); }
.gift-widget-body {
  width: 210px; background: rgba(255,253,249,.97); border-radius: 16px;
  padding: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 7px;
}
.gift-widget-body[hidden] { display: none; }
.mini-upload {
  border: 2px dashed #e6c9b8; border-radius: 10px; padding: 10px;
  text-align: center; font-size: 12px; color: var(--ink-soft);
  cursor: pointer; background: #fffbf6;
}
.mini-upload.dragging { border-color: var(--pink-deep); background: #fff2f4; }
.mini-preview { max-width: 100%; max-height: 110px; object-fit: contain; display: block; margin: 0 auto; }
.mini-preview[hidden], #miniUploadText[hidden] { display: none; }
.gift-widget-body input { width: 100%; flex: none; padding: 6px 8px; font-size: 12px; }
.gift-widget-body .primary { padding: 7px; font-size: 12px; }
.gift-widget-body .form-note { min-height: 14px; margin: 0; font-size: 10px; }
.mini-gift-list { display: flex; flex-direction: column; gap: 5px; max-height: 100px; overflow-y: auto; }
.mini-gift-row { display: flex; align-items: center; gap: 6px; background: #fffaf2; border-radius: 8px; padding: 4px 6px; }
.mini-gift-row img { width: 26px; height: 26px; object-fit: contain; }
.mini-gift-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mini-gift-row button { border: none; cursor: pointer; font-family: inherit; font-size: 10px; background: var(--pink); color: var(--ink); padding: 3px 6px; border-radius: 999px; }
.mini-gift-row .empty-tip { font-size: 10px; padding: 6px; }

/* 房间内拆礼物，不是全屏 */
.mini-unwrap {
  position: absolute; right: 4%; top: 12%;
  z-index: 11; background: var(--paper); border-radius: 18px;
  padding: 16px 20px; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.2);
  max-width: 240px; width: 46%;
}
.mini-unwrap[hidden] { display: none; }
.mini-unwrap .unwrap-tip { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 10px; text-shadow: none; }
.mini-unwrap .gift-box { font-size: 60px; }
.mini-unwrap .unwrapped-img { width: 150px; height: 150px; }
.mini-unwrap .unwrap-msg { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; text-shadow: none; }
.mini-unwrap .unwrap-done { margin-top: 10px; padding: 8px 20px; font-size: 12px; }
.scene-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }
.scene-confetti span { position: absolute; top: -20px; font-size: 16px; animation: confettiFall 1.6s ease-in forwards; }

/* 飘心 */
.hearts { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.heart { position: absolute; bottom: -30px; font-size: 20px; animation: rise 2.4s ease-out forwards; }
@keyframes rise { to { transform: translateY(-110vh) rotate(20deg); opacity: 0; } }

/* 响应式 */
@media (max-width: 720px) {
  .app { padding: 8px 10px 10px; }
  .character { height: 60%; }
  .doors .door { width: 54px; height: 80px; }
  .door-img { font-size: 22px; }
  .care-grid { gap: 6px; }
  .care-card { font-size: 11px; flex-direction: column; gap: 3px; padding: 6px; }
}
