/* ---------- 底部浮動按鈕（不做整條操作台，讓房間露出來） ---------- */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: flex-end; gap: 12px;
  padding: 0 16px calc(var(--safe-b) + 18px);
  pointer-events: none;
}
.dock-gap { flex: 1; }
.fab {
  pointer-events: auto;
  width: 68px; height: 68px; border-radius: 50%;
  background: #fff; border: var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 12px; font-weight: 900;
  transition: transform .06s, box-shadow .06s;
}
.fab svg { width: 28px; }
.fab i { display: grid; place-items: center; }
.fab:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.fab.main { width: 76px; height: 76px; background: var(--butter); font-size: 13px; }
.fab.main svg { width: 32px; }
.fab.on { background: var(--butter); }

/* 餵食選擇：從餵食鈕上方彈出 */
.feed-pick {
  position: absolute; left: 12px; bottom: calc(var(--safe-b) + 102px); z-index: 25;
  display: flex; gap: 12px; padding: 10px;
  background: #fff; border: var(--line); border-radius: 22px; box-shadow: var(--shadow);
  transform: translateY(12px) scale(.9); transform-origin: 30px 100%; opacity: 0; pointer-events: none;
  transition: transform .15s, opacity .15s;
}
.feed-pick::after {
  content: ""; position: absolute; left: 34px; bottom: -12px; width: 18px; height: 18px;
  background: #fff; border-right: var(--line); border-bottom: var(--line); transform: rotate(45deg);
}
.feed-pick.show { transform: none; opacity: 1; pointer-events: auto; }
.pick-btn {
  width: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border: var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 3px 0 var(--ink);
}
.pick-btn:active { transform: translateY(3px); box-shadow: none; }
.pick-img { height: 44px; display: grid; place-items: center; }
.pick-img svg { width: 48px; }
.pick-img img { height: 44px; }
.pick-btn b { font-size: 16px; font-weight: 900; }
.pick-btn small { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: #6b6b6b; }
.pick-btn small svg { width: 18px; }
.pick-btn.can { background: var(--pink-light); }
.pick-btn.poor { opacity: .5; }
.pop svg { width: 34px; }

/* ---------- 移動模式 ---------- */
.move-bar {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 16px); z-index: 30;
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px 10px 18px; background: var(--butter);
  border: var(--line); border-radius: 20px; box-shadow: var(--shadow);
  font-weight: 900; font-size: 15px;
}
.done-btn {
  display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 16px;
  background: var(--green); color: #fff; border: var(--line); border-radius: 14px; font-weight: 900;
}
.done-btn svg { width: 20px; }
.moving .move-bar { display: flex; }
.moving .dock, .moving .hud-top { display: none; }
.moving .dodo { pointer-events: none; opacity: .5; }
.moving .room { touch-action: none; }

/* ---------- 底部選單（bottom sheet） ---------- */
.sheet-mask { position: absolute; inset: 0; z-index: 34; background: rgba(20,21,24,.3); opacity: 0; pointer-events: none; transition: opacity .2s; }
/* 置中卡片（2026/10/06，gdd 11.3）：背景變暗、卡片從中間彈出 */
.sheet {
  position: absolute; left: 50%; top: 50%; z-index: 35;
  width: calc(100% - 36px); max-width: 360px; max-height: calc(100% - var(--safe-t) - 150px);
  display: flex; flex-direction: column; overflow: hidden;
  padding: 16px 16px 18px;
  background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 0 6px 0 var(--ink);
  transform: translate(-50%, -50%) scale(.85); opacity: 0; pointer-events: none;
  transition: transform .22s cubic-bezier(.3,1.5,.5,1), opacity .18s;
}
.sheet-open .sheet { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.sheet-mask { background: rgba(20,21,24,.5) !important; }
.sheet .sheet-head { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2.5px dashed #ddd; }
/* 標題列固定，內容太長時只捲動內容 */
.sheet .sheet-head { flex: none; }
.sheet .sheet-body { flex: 1; min-height: 0; max-height: none !important; margin-bottom: 0; overflow-y: auto; }
.sheet-open .toast { opacity: 0 !important; }
.sheet-open .sheet-mask { opacity: 1; pointer-events: auto; }
.sheet-grip { width: 48px; height: 6px; margin: 0 auto 10px; border-radius: 3px; background: #ccc; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head h2 { flex: 1; font-size: 20px; font-weight: 900; }
.sheet-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.sheet-tab { height: 36px; padding: 0 14px; border-radius: 12px; border: 2.5px solid var(--ink); font-weight: 900; font-size: 14px; background: #fff; }
.sheet-tab.on { background: var(--butter); }
.sheet .round-btn { width: 40px; height: 40px; box-shadow: none; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow);
  font-weight: 900; font-size: 13px;
}
.opt.on { background: var(--pink-light); }
.opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sw { display: flex; width: 100%; height: 52px; border: 2.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; }
.sw em { flex: 1; }
.sw.thumb { height: 64px; background: var(--cream); }
.sw.thumb svg { width: 100%; height: 100%; }
.sheet-tab { padding: 0 11px; }
.scene-list { display: flex; flex-direction: column; gap: 10px; }
.scene-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; text-align: left;
  padding: 12px 16px; background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.scene-item b { font-size: 18px; font-weight: 900; }
.scene-item small { grid-column: 1; font-size: 13px; font-weight: 700; color: #777; }
.scene-item em { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: 4px; font-style: normal; font-weight: 900; font-size: 14px; color: #888; }
.scene-item em svg { width: 18px; }
.scene-item.locked { background: #F3EEE6; }
.sheet-note { margin-top: 12px; font-size: 13px; font-weight: 800; color: #777; text-align: center; }
.furn { cursor: pointer; }
.outfit-sw { align-items: center; justify-content: center; font-style: normal; font-weight: 900; }
.outfit-sw svg { width: 56px; }
.wide-btn {
  margin-top: 14px; width: 100%; height: 50px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow);
  font-size: 16px; font-weight: 900;
}
.wide-btn svg { width: 22px; }
.wide-btn.alt { background: var(--red); }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .wide-btn { flex: 1; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px;
  background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.menu-item svg { width: 30px; }
.menu-item b { font-size: 16px; font-weight: 900; }
.menu-item small { font-size: 12px; font-weight: 800; color: #999; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; font-weight: 900; border-bottom: 2px dashed #ddd; }
.switch { width: 58px; height: 32px; border-radius: 16px; border: var(--line); background: #ddd; position: relative; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); transition: left .15s; }
.switch.on { background: var(--green); }
.switch.on::after { left: 28px; }
.danger { background: var(--red); }

/* ---------- 提示 ---------- */
.toast {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 78px); transform: translate(-50%, -20px); z-index: 50;
  width: max-content; max-width: 86%;
  padding: 10px 18px; background: var(--ink); color: #fff; border-radius: 14px;
  font-weight: 800; font-size: 14px; text-align: center; opacity: 0; transition: .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 橫放提示 */
.rotate-tip { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .rotate-tip {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    position: fixed; inset: 0; z-index: 100; background: var(--cream);
    font-weight: 900; font-size: 18px; text-align: center;
  }
  .rotate-tip svg { width: 56px; }
}

/* 矮螢幕（如 360x640）：按鈕略縮 */
@media (max-height: 700px) {
  .fab { width: 60px; height: 60px; }
  .fab.main { width: 68px; height: 68px; }
  .feed-pick { bottom: calc(var(--safe-b) + 92px); }
}

/* ---------- 佈置選單（第二步：家具位、商店、套組） ---------- */
.sheet-head { flex-wrap: nowrap; }
.comfort { display: flex; align-items: baseline; gap: 3px; padding: 4px 10px; background: var(--pink-light); border: 2.5px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 900; white-space: nowrap; }
.comfort b { font-size: 17px; }
.comfort small { display: flex; align-items: center; font-size: 11px; color: #666; }
.comfort small svg { width: 16px; }
.sheet-tabs { overflow-x: auto; scrollbar-width: none; }
.sheet-tab { flex: none; }
.sheet-body { max-height: min(42dvh, 360px); overflow-y: auto; margin: 0 -4px 12px; padding: 0 4px 6px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 13px; font-weight: 900; }
.chip.on { background: var(--green); color: #fff; }
.opt { position: relative; }
.opt .tag {
  position: absolute; top: -8px; right: -6px; display: flex; align-items: center; gap: 2px;
  padding: 2px 7px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff;
  font-size: 11px; font-weight: 900; font-style: normal;
}
.opt .tag svg { width: 14px; }
.opt .tag.on { background: var(--green); color: #fff; }
.opt .tag.price { background: var(--butter); }
.opt .tag.buy { background: var(--red); color: #fff; }
.opt .tag.lock { background: #ddd; color: #666; }
.opt.locked { opacity: .55; }
.opt.locked .thumb svg { filter: grayscale(1); }
.opt.confirm { background: #FFF1EF; outline: 3px dashed var(--red); outline-offset: 2px; }
.set-list { display: flex; flex-direction: column; gap: 10px; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.set-item > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.set-item b { font-size: 16px; font-weight: 900; }
.set-item small { font-size: 12px; font-weight: 800; color: #777; }
.set-bar { display: block; height: 10px; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper); }
.set-bar em { display: block; height: 100%; background: var(--pink); }
.mini-btn { height: 40px; padding: 0 14px; border: var(--line); border-radius: 12px; background: var(--green); color: #fff; font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
.mini-btn.off { background: #ddd; color: #888; box-shadow: none; }
@media (max-width: 380px) {
  .comfort small { display: none; }
  .sheet-head h2 { font-size: 18px; }
}

/* ---------- 慶祝卡片（gdd 11.3，參考《貓咪和湯》置中卡片＋緞帶） ---------- */
.celebrate {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20,21,24,.55); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.celebrate.show { opacity: 1; pointer-events: auto; }
.cel-card {
  position: relative; width: 100%; max-width: 340px; max-height: 88%; overflow-y: auto;
  padding: 48px 18px 18px; background: var(--paper); text-align: center;
  border: var(--line); border-radius: 24px; box-shadow: 0 6px 0 var(--ink);
  transform: scale(.85); transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.celebrate.show .cel-card { transform: scale(1); }
.cel-ribbon {
  position: absolute; left: -14px; right: -14px; top: 10px;
  height: 46px; display: grid; place-items: center;
  background: var(--red); color: #fff; border: var(--line); border-radius: 10px;
  font-size: 22px; font-weight: 900; letter-spacing: 2px; -webkit-text-stroke: .5px var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}
.cel-ribbon::before, .cel-ribbon::after {
  content: ""; position: absolute; bottom: -12px; width: 14px; height: 12px; background: #9C4A44;
}
.cel-ribbon::before { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.cel-ribbon::after { right: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.cel-hero { position: relative; height: 150px; margin-top: 14px; display: grid; place-items: center; }
.cel-hero img { position: relative; height: 140px; }
.cel-rays {
  position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: repeating-conic-gradient(var(--butter) 0 12deg, transparent 12deg 24deg);
  opacity: .55; animation: spin 12s linear infinite;
  mask: radial-gradient(circle, #000 40%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 40%, transparent 70%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.cel-big { font-size: 24px; font-weight: 900; margin-top: 4px; }
.cel-line { margin: 6px 4px 0; font-size: 14px; font-weight: 800; color: #555; line-height: 1.5; }
.cel-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; padding: 12px; background: #F3EEE6; border-radius: 16px; }
.cel-tile { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; }
.cel-pic { width: 72px; height: 72px; display: grid; place-items: center; background: #fff; border: var(--line); border-radius: 14px; overflow: hidden; }
.cel-pic svg { width: 100%; height: 100%; }
.cel-tile.cel-coin .cel-pic svg { width: 46px; height: auto; }
.cel-tile.gift .cel-pic { background: var(--pink-light); }
.cel-xp { font-size: 22px; font-weight: 900; color: var(--red); }
.cel-swatch { display: flex; width: 100%; height: 100%; }
.cel-swatch em { width: 35%; margin-left: auto; }
.cel-tags { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.cel-tags em { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 10px; background: var(--butter); border: 2.5px solid var(--ink); border-radius: 999px; font-style: normal; font-size: 13px; font-weight: 900; }
.cel-tags em svg { width: 16px; }
.cel-sub { margin-top: 14px; font-size: 13px; font-weight: 900; color: #777; }
.cel-shop { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.cel-shop i, .cel-mini { width: 50px; height: 50px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.cel-shop i svg, .cel-mini svg { width: 100%; height: 100%; }
.cel-shop .cel-swatch { width: 100%; height: 100%; }
.cel-actions { display: flex; gap: 10px; margin-top: 16px; }
.cel-btn { flex: 1; height: 52px; background: var(--green); color: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow); font-size: 17px; font-weight: 900; }
.cel-btn.ghost { background: #fff; color: var(--ink); }
.cel-btn:active { transform: translateY(4px); box-shadow: none; }

/* ---------- 佈置編輯模式（gdd 11.2） ---------- */
.edit-bar, .edit-tools, .badges { display: none; }
.editing .edit-bar {
  position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 62px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 16px; background: var(--butter); border: var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.edit-title { display: flex; align-items: baseline; gap: 10px; font-weight: 900; }
.edit-title b { font-size: 17px; }
.edit-title span { font-size: 13px; color: #6b5a2a; }
.edit-title span b { font-size: 16px; color: var(--ink); }
.editing .profile, .editing .hud-top .round-btn, .editing .dock { display: none; }
.editing .hud-top { justify-content: flex-end; }
.editing .edit-tools {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 16px); z-index: 25;
  display: flex; justify-content: center; gap: 8px; padding: 0 10px;
}
.strip-open .edit-tools { display: none; }
.tool-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 76px; height: 64px; background: #fff; border: var(--line); border-radius: 18px; box-shadow: var(--shadow);
  font-size: 12px; font-weight: 900;
}
.tool-chip svg { width: 24px; }
.tool-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* 家具上的鉛筆 */
.editing .badges { display: block; position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.badge {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: var(--line); box-shadow: 0 3px 0 var(--ink);
}
/* 按鈕本身不動（好點），外圈光環呼吸提示可以點 */
.badge::after, .ghost-buy::after {
  content: ""; position: absolute; inset: -6px; border-radius: inherit;
  border: 3px solid var(--butter); animation: ring 1.6s ease-out infinite; pointer-events: none;
}
@keyframes ring { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
.badge svg { width: 20px; }
.badge.on { background: var(--butter); }
.badge.on::after { display: none; }
.editing .furn { cursor: pointer; }
.furn.sel { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 5px #fff) drop-shadow(0 0 3px var(--butter)); }
.furn.hint { animation: hint 1.8s ease-out; }
@keyframes hint { 0%, 60% { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 6px var(--butter)); } 100% { filter: none; } }

/* 底部一排縮圖 */
.strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 32;
  padding: 10px 0 calc(var(--safe-b) + 12px); background: var(--paper);
  border-top: var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -4px 0 rgba(20,21,24,.08);
  transform: translateY(105%); transition: transform .22s cubic-bezier(.3,.9,.4,1);
}
.strip.show { transform: none; }
.shead { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 8px; }
.shead > b { font-size: 17px; font-weight: 900; }
.shead .round-btn { width: 36px; height: 36px; box-shadow: none; }
.shead .round-btn svg { width: 18px; }
.srow { display: flex; gap: 10px; overflow-x: auto; padding: 10px 14px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.srow::-webkit-scrollbar { display: none; }
.scard {
  position: relative; flex: none; width: 92px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 8px;
  background: #fff; border: var(--line); border-radius: 16px; box-shadow: 0 3px 0 var(--ink);
  font-size: 12px; font-weight: 900; line-height: 1.2;
}
.scard span { height: 2.4em; display: flex; align-items: center; text-align: center; }
.scard.on { background: var(--pink-light); }
.scard.pv { outline: 3px dashed var(--red); outline-offset: 2px; }
.scard.locked { opacity: .5; }
.scard.locked .sthumb svg { filter: grayscale(1); }
.scard .tag {
  position: absolute; top: -9px; right: -6px; display: flex; align-items: center; gap: 2px;
  padding: 2px 6px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff;
  font-size: 11px; font-weight: 900; font-style: normal;
}
.scard .tag svg { width: 13px; }
.scard .tag.on { background: var(--green); color: #fff; }
.scard .tag.price { background: var(--butter); }
.scard .tag.lock { background: #ddd; color: #666; }
.sthumb { width: 78px; height: 62px; display: grid; place-items: center; background: var(--cream); border-radius: 10px; overflow: hidden; }
.sthumb svg { width: 100%; height: 100%; }
.sthumb .cel-swatch { width: 100%; height: 100%; }
.sthumb.outfit-sw svg { width: 56px; height: auto; }
.seg { display: flex; border: var(--line); border-radius: 12px; overflow: hidden; }
.seg button { height: 32px; padding: 0 14px; font-size: 14px; font-weight: 900; background: #fff; }
.seg button.on { background: var(--butter); }
.seg button + button { border-left: var(--line); }
.sbuy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 14px 0; padding: 8px 8px 8px 14px; background: #FFF1EF; border: 2.5px dashed var(--red); border-radius: 16px; font-size: 13px; font-weight: 800; }
.buy-btn { display: flex; align-items: center; gap: 3px; height: 42px; padding: 0 14px; background: var(--red); color: #fff; border: var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-size: 15px; font-weight: 900; white-space: nowrap; }
.buy-btn svg { width: 20px; }
.buy-btn.poor { background: #bbb; }

/* 嘟嘟推薦：半透明家具＋購買貼紙 */
.furn.ghost { opacity: .55; }
.ghost-buy {
  position: absolute; z-index: 18; transform: translate(-50%, -100%) scale(.6); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 3px; height: 38px; padding: 0 12px 0 8px;
  background: var(--butter); border: var(--line); border-radius: 999px; box-shadow: 0 3px 0 var(--ink);
  font-size: 14px; font-weight: 900; transition: transform .2s, opacity .2s;
}
.ghost-buy svg { width: 22px; }
.ghost-buy b { margin-left: 4px; padding: 2px 8px; background: var(--red); color: #fff; border-radius: 999px; font-size: 13px; }
.ghost-buy.show { transform: translate(-50%, -100%) scale(1); opacity: 1; pointer-events: auto; }

.album-row { display: grid; grid-template-columns: 70px 1fr 52px; align-items: center; gap: 10px; padding: 7px 2px; font-size: 14px; font-weight: 900; }
.album-row b { text-align: right; font-size: 13px; }
.editing .toast { top: calc(var(--safe-t) + 132px); }

/* 場景標籤（取代門） */
.scene-chip {
  position: absolute; left: 12px; top: calc(var(--safe-t) + 74px); z-index: 19;
  display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 9px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink);
  font-size: 13px; font-weight: 900;
}
.scene-chip svg { width: 17px; }
.scene-chip i { font-style: normal; font-size: 11px; color: #777; }
.editing .scene-chip { display: none; }
/* 佈置中嘟嘟不吃點擊，避免點地毯時摸到站在上面的嘟嘟 */
.editing .dodo { pointer-events: none; }

/* ---------- 闖關（gdd 13）：入口卡片、三消 iframe、結果 ---------- */
.coin { position: relative; cursor: pointer; }
.coin:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.coin-bang {
  display: none; position: absolute; top: -8px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff;
  border: 2.5px solid var(--ink); font-size: 12px; font-weight: 900; font-style: normal; line-height: 15px; text-align: center;
  animation: bang 1.4s ease-in-out infinite;
}
.coin-bang.on { display: block; }
@keyframes bang { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-4px) rotate(-8deg); } 90% { transform: translateY(0) rotate(8deg); } }
.coin.flash { animation: coinFlash 1.2s ease-out 2; }
@keyframes coinFlash { 0%, 100% { box-shadow: var(--shadow); } 40% { box-shadow: var(--shadow), 0 0 0 6px var(--butter), 0 0 18px 8px rgba(246,213,138,.9); } }

.earn-hero { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--pink-light); border: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.earn-pic { width: 62px; height: 62px; flex: none; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; overflow: hidden; }
.earn-pic svg { width: 100%; height: 100%; }
.earn-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.earn-info small { font-size: 11px; font-weight: 800; color: #777; }
.earn-info b { font-size: 18px; font-weight: 900; }
.earn-info span { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: #6b5a2a; }
.earn-info span svg { width: 16px; }
.go-btn { height: 48px; padding: 0 16px; background: var(--red); color: #fff; border: var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-size: 17px; font-weight: 900; }
.go-btn:active { transform: translateY(3px); box-shadow: none; }
.earn-event { width: 100%; margin-top: 10px; display: grid; grid-template-columns: 1fr auto; text-align: left; padding: 10px 14px; background: #4E3B6E; color: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.earn-event b { font-size: 15px; font-weight: 900; }
.earn-event small { grid-column: 1; display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: #E8D9FF; }
.earn-event small svg { width: 16px; }
.earn-event em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-weight: 900; padding: 4px 10px; background: #F28C28; border: 2.5px solid var(--ink); border-radius: 10px; }
.earn-ch { margin-top: 14px; }
.earn-ch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.earn-ch-head small { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; color: #888; }
.earn-ch-head small svg { width: 14px; }
.earn-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.stage-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 4px; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 2px 0 var(--ink); }
.stage-cell b { font-size: 16px; font-weight: 900; }
.stage-cell.next { background: var(--butter); }
.stage-cell.locked { opacity: .45; box-shadow: none; }
.stars { display: flex; font-size: 10px; color: #ccc; letter-spacing: -1px; }
.stars i { font-style: normal; }
.stars i.on { color: #F2A33A; }
.scene-item.earn { background: var(--butter); }
.scene-item.earn em { color: var(--ink); }
.earn-btn { height: 42px; padding: 0 10px; background: var(--green); color: #fff; border: var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-size: 13px; font-weight: 900; white-space: nowrap; }
.sbuy { flex-wrap: wrap; }

/* 三消全螢幕：本作的標題列在上，iframe 在下 */
.m3 { position: absolute; inset: 0; z-index: 55; display: none; flex-direction: column; background: #2B2140; }
.m3.show { display: flex; animation: rise .25s ease-out; }
.m3-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 10px 8px 16px; background: var(--paper); border-bottom: var(--line); }
.m3-bar b { flex: 1; font-size: 16px; font-weight: 900; }
.m3-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: var(--line); box-shadow: 0 3px 0 var(--ink); }
.m3-btn svg { width: 20px; }
.m3-frame { position: relative; flex: 1; }
.m3-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m3-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--cream); font-weight: 900; }
.m3-loading img { height: 120px; animation: walkbob .36s ease-in-out infinite; }
.m3-open .hud-top, .m3-open .dock, .m3-open .scene-chip { visibility: hidden; }
.cel-stars { font-size: 30px; color: #ddd; letter-spacing: 2px; }
.cel-stars i { font-style: normal; }
.cel-stars i.on { color: #F2A33A; -webkit-text-stroke: 1.5px var(--ink); }
.cel-card.lose .cel-ribbon { background: #8C7BA8; }
.sbuy { flex-wrap: nowrap; gap: 6px; padding-left: 10px; }
.sbuy > span { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; }
.sbuy .earn-btn, .sbuy .buy-btn { padding: 0 9px; font-size: 13px; }
