/* Floral Diary POC — styles */
:root {
  --cream: #fff8ec; --cream2: #fbecd5; --cream3: #f3dcb8;
  --brown: #8a5a3b; --brown-d: #5b3a26; --ink: #5a3d2b;
  --gold: #e3b062; --gold-d: #b9853a; --gold-l: #f6dca0;
  --rose: #ec8fa8; --rose-d: #c9607a; --sage: #9cbf8a;
  --title: 'Cormorant Garamond', Georgia, serif;
  --ui: 'Nunito', system-ui, -apple-system, sans-serif;
  --shadow: 0 4px 14px rgba(90, 55, 30, .22);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ui); color: var(--ink); overflow: hidden;
  background: #2b2230 url(../img/bg/title.webp) center/cover fixed;
}
body::before { content: ''; position: fixed; inset: 0; background: rgba(40, 25, 40, .55); backdrop-filter: blur(14px); }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { user-select: none; -webkit-user-drag: none; }
#stage { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; gap: 30px; }

/* ---------- device ---------- */
#device-wrap { position: relative; flex: none; }
#device {
  position: absolute; left: 0; top: 0; width: 425px; height: 884px; transform-origin: 0 0;
  border-radius: 68px; padding: 16px; background: linear-gradient(145deg, #3a3340, #17141a);
  box-shadow: 0 0 0 2px #5c5363, 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 0 2px #0c0a0d;
}
.side-btn { position: absolute; width: 4px; background: #4a4250; border-radius: 3px; }
.side-btn.b1 { left: -3px; top: 150px; height: 32px; } .side-btn.b2 { left: -3px; top: 205px; height: 60px; }
.side-btn.b3 { left: -3px; top: 278px; height: 60px; } .side-btn.b4 { right: -3px; top: 230px; height: 96px; }
#screen { --sat: 44px; --sab: 20px; position: relative; width: 393px; height: 852px; border-radius: 52px; overflow: hidden; background: #f6ead8; isolation: isolate; }
#app { position: absolute; inset: 0; z-index: 1; }
#views { position: absolute; inset: 0; z-index: 100; pointer-events: none; }
#views > * { pointer-events: auto; }
#modals { position: absolute; inset: 0; z-index: 300; pointer-events: none; }
#modals > * { pointer-events: auto; }
#fx { position: absolute; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
#toasts { position: absolute; bottom: calc(var(--sab) + 152px); left: 0; right: 0; z-index: 450; display: flex; justify-content: center; pointer-events: none; transition: bottom .3s; }
#toasts.in-view { bottom: calc(var(--sab) + 26px); }
#statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 50px; z-index: 1000; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 42px;
  font: 700 16px/1 -apple-system, 'SF Pro Text', var(--ui); color: #24170f; text-shadow: 0 0 8px rgba(255, 255, 255, .8);
}
.island { position: absolute; left: 50%; top: 11px; width: 124px; height: 36px; margin-left: -62px; background: #000; border-radius: 20px; }
.sb-icons { display: flex; gap: 6px; align-items: center; } .sb-icons svg { fill: #24170f; }
.battery { width: 26px; height: 12px; border: 1.5px solid #24170f; border-radius: 4px; padding: 1.5px; position: relative; }
.battery::after { content: ''; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: #24170f; border-radius: 0 2px 2px 0; }
.battery i { display: block; height: 100%; width: 78%; background: #24170f; border-radius: 2px; }
#homebar { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; background: rgba(20, 12, 8, .75); border-radius: 3px; z-index: 1000; pointer-events: none; }

/* ---------- animations ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-10px); } 90% { transform: translateY(0); } 95% { transform: translateY(-3px); } }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, 1.018); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 107, .0), var(--shadow); } 50% { box-shadow: 0 0 0 5px rgba(255, 214, 107, .55), var(--shadow); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shineSweep { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes popIn { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes wobble { 0% { transform: scale(var(--ps, 1)); } 30% { transform: scale(calc(var(--ps, 1) * 1.08), calc(var(--ps, 1) * .92)); } 60% { transform: scale(calc(var(--ps, 1) * .96), calc(var(--ps, 1) * 1.05)); } 100% { transform: scale(var(--ps, 1)); } }
.float { animation: float 3.2s ease-in-out infinite; }
.hop { animation: hop 2.6s ease-in-out infinite; }
.sway { animation: sway 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.sway-slow { animation: sway 6s ease-in-out infinite; transform-origin: 50% 100%; }
.breathe { animation: breathe 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.wobble { animation: wobble .6s ease-out; transform: scale(var(--ps, 1)); }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shineSweep 2.8s ease-in-out infinite; }

/* ---------- common UI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative;
  padding: 11px 20px; border-radius: 999px; font: 900 15px var(--ui); color: #fff; letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25); box-shadow: 0 3px 0 rgba(0, 0, 0, .15), inset 0 2px 0 rgba(255, 255, 255, .45), var(--shadow);
  transition: transform .1s, filter .2s;
}
.btn:active { transform: scale(.94); }
.btn img { width: 20px; height: 20px; object-fit: contain; }
.btn small { display: flex; align-items: center; gap: 2px; font-size: 11px; opacity: .95; }
.btn small img { width: 14px; height: 14px; }
.btn-green { background: linear-gradient(#a9e57b, #63b94a); border: 2px solid #4f9a39; }
.btn-pink { background: linear-gradient(#ffaccb, #e46b93); border: 2px solid #c55479; }
.btn-gold { background: linear-gradient(#ffe08f, #e6a93f); border: 2px solid #c48a2c; color: #6b3f12; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn-blue { background: linear-gradient(#9fd6ff, #4c9be0); border: 2px solid #3c7fbd; }
.btn-cream { background: linear-gradient(#fffaf0, #f2dfbf); border: 2px solid var(--gold); color: var(--brown-d); text-shadow: none; }
.btn-ghost { background: rgba(255, 255, 255, .6); border: 2px solid #d8c3a3; color: var(--brown); text-shadow: none; box-shadow: none; }
.btn-disabled, .btn[disabled] { background: linear-gradient(#e6ddd2, #c9bcae) !important; border: 2px solid #b5a797 !important; color: #fff; filter: saturate(.3); pointer-events: none; }
.btn[disabled] { opacity: .85; }
.btn-small { padding: 7px 12px; font-size: 13px; }
.btn-wide { width: 100%; margin: 10px 0 4px; flex-direction: column; gap: 0; }
.btn-wide small { font-weight: 700; }
.link { color: var(--rose-d); font-weight: 800; text-decoration: underline; font-size: 12px; }
.muted { color: #a48a73; font-size: 12px; }
.center { text-align: center; }
.inl { width: 16px; height: 16px; vertical-align: -3px; margin: 0 2px; }
.big { font-size: 28px; }
.tab-note, .fair-note { font-size: 11.5px; line-height: 1.4; padding: 8px 10px; border-radius: 12px; margin: 8px 0; }
.tab-note { background: rgba(255, 248, 236, .85); border: 1px solid #ecd6b3; }
.fair-note { background: rgba(255, 233, 240, .9); border: 1px solid #f3c2d1; color: #9c4f69; }
.ability-note { margin: 6px 0; padding: 6px 10px; border-radius: 999px; background: #e6f6dc; border: 1px solid #a9d68e; color: #3f7a2c; font-size: 12px; font-weight: 800; text-align: center; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 3px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 250, 240, .94), rgba(255, 250, 240, .7)); font: 700 18px var(--title); color: var(--brown-d); text-shadow: 0 1px 0 #fff; }
.section-title::before { content: '❀'; color: var(--rose); font-size: 14px; }
.section-title small { margin-left: auto; font: 700 11px var(--ui); color: #a48a73; }
.rtag { display: inline-block; font: 900 9px var(--ui); color: #fff; background: var(--rc); padding: 2px 5px; border-radius: 6px; font-style: normal; vertical-align: 1px; }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); vertical-align: -1px; margin: 0 2px 0 4px; }
.land-tag { display: inline-block; font: 800 9.5px var(--ui); font-style: normal; color: #4a3424; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 55%, #fff); border: 1px solid var(--tint); }
.tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 8px; background: rgba(120, 80, 50, .25); border-radius: 999px; backdrop-filter: blur(4px); }
.tab { flex: 1; padding: 8px 4px; border-radius: 999px; font: 800 12.5px var(--ui); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: .2s; }
.tab.on { background: linear-gradient(#ffe48f, #f2b84b); color: #6b3f12; text-shadow: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .2), inset 0 1px 0 #fff6cc; }
.xpbar { position: relative; height: 14px; border-radius: 999px; background: rgba(80, 50, 30, .35); overflow: hidden; border: 1.5px solid rgba(255, 255, 255, .7); }
.xpbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ffe48f, #f0a93c); border-radius: 999px; transition: width .6s cubic-bezier(.3, .8, .3, 1); }
.xpbar span { position: relative; display: block; text-align: center; font: 900 9.5px/11px var(--ui); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .5); }
.xpbar.big { height: 18px; } .xpbar.big span { line-height: 15px; font-size: 11px; }
.chip {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #fff, var(--cream2));
  border: 2px solid var(--rc, var(--gold)); display: grid; place-items: center; box-shadow: 0 2px 5px rgba(90, 55, 30, .2);
}
.chip img { width: 44px; height: 44px; object-fit: contain; }
.chip b { position: absolute; right: -4px; bottom: -5px; min-width: 20px; padding: 1px 5px; border-radius: 999px; background: var(--brown-d); color: #fff; font-size: 10.5px; text-align: center; border: 1.5px solid #fff; }
.chip em { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font: 900 9px var(--ui); font-style: normal; background: #f39a4f; color: #fff; padding: 1px 4px; border-radius: 6px; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 14px;
  background: linear-gradient(#fffaf2, #f7e6cc); border: 2px solid color-mix(in srgb, var(--rc, var(--gold)) 70%, #fff); box-shadow: 0 2px 6px rgba(90, 55, 30, .15); transition: transform .12s;
}
.item-card:active { transform: scale(.95); }
.item-card .rtag { position: absolute; left: 5px; top: 5px; }
.item-card .ic-img { height: 92px; width: 100%; display: grid; place-items: center; }
.item-card .ic-img img, .item-card > img { max-height: 92px; max-width: 90%; object-fit: contain; }
.item-card span { font: 800 11px var(--ui); text-align: center; line-height: 1.15; }
.item-card small { font-size: 9.5px; color: #a07a5a; text-align: center; line-height: 1.2; }
.item-card.locked .ic-img img { filter: saturate(.25) brightness(.95); opacity: .75; }
.item-card .lock { position: absolute; right: 6px; top: 5px; font-size: 12px; font-style: normal; }
.item-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 214, 107, .7), 0 4px 10px rgba(90, 55, 30, .25); background: linear-gradient(#fffbe8, #ffeec2); }
.item-card.previewing { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(236, 143, 168, .5); }

/* ---------- views ---------- */
.view { position: absolute; inset: 0; isolation: isolate; opacity: 0; transform: translateY(30px) scale(.98); transition: opacity .3s, transform .38s cubic-bezier(.2, .9, .3, 1.1); background: #f6ead8; }
.view.in { opacity: 1; transform: none; }
.view.out { opacity: 0; transform: translateY(40px); }
.view-bg { position: absolute; inset: 0; background: center/cover no-repeat; }
.view-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 245, 230, .35), transparent 22%, transparent 70%, rgba(255, 240, 220, .35)); }
.view-head { position: absolute; top: calc(var(--sat) + 4px); left: 0; right: 0; height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 10px; z-index: 5; }
.btn-back {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 40% 30%, #fff1b8, #f2b84b); border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(90, 55, 30, .35);
  font: 900 34px/1 var(--title); color: #9b5d17; padding-bottom: 5px;
}
.btn-back:active { transform: scale(.9); }
.title-plate { flex: 1; min-width: 0; }
.title-plate span { display: inline-block; max-width: 100%; padding: 4px 14px 5px; border-radius: 12px; font: 700 21px var(--title); color: #fff; text-shadow: 0 2px 3px rgba(110, 50, 20, .55), 0 0 1px #7a3d18; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(90deg, rgba(160, 95, 50, .55), rgba(160, 95, 50, 0)); }
.head-right { flex: none; }
.mini-wallet { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.mini-wallet .pill { height: 22px; font-size: 11.5px; padding: 0 8px 0 22px; }
.mini-wallet .pill img { width: 22px; height: 22px; left: -4px; }
.view-body { position: absolute; top: calc(var(--sat) + 56px); bottom: 0; left: 0; right: 0; overflow-y: auto; overflow-x: hidden; padding: 0 12px calc(var(--sab) + 14px); scrollbar-width: none; }
.view-body::-webkit-scrollbar { display: none; }

/* ---------- pills ---------- */
.pill {
  position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px 0 28px; border-radius: 999px;
  background: rgba(255, 249, 238, .94); border: 2px solid #ecc98a; box-shadow: 0 2px 6px rgba(80, 50, 25, .25); font-size: 13px;
}
.pill img { position: absolute; left: -6px; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.pill b { font-weight: 900; color: var(--brown-d); }
.pill .plus { margin-left: 6px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(#a9e57b, #57ad3e); color: #fff; font: 900 14px/15px var(--ui); text-align: center; font-style: normal; }
.pill.gem { cursor: pointer; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.bump { animation: bump .35s ease-out; }

/* ---------- toasts ---------- */
.toast {
  max-width: 300px; padding: 7px 16px; border-radius: 999px; font-size: 12px; font-weight: 800; text-align: center; line-height: 1.3;
  color: #fff; background: rgba(74, 48, 34, .82); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(40, 20, 10, .3); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.3);
}
.toast b { color: #ffe39a; }
.toast.warn { background: rgba(150, 52, 52, .88); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }

/* ---------- modals ---------- */
.modal-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.modal-dim { position: absolute; inset: 0; background: rgba(50, 28, 20, .5); opacity: 0; transition: opacity .25s; }
.modal {
  position: relative; width: 344px; max-height: 720px; display: flex; flex-direction: column; margin-top: 20px;
  background: linear-gradient(#fffaf1, #fbebd2); border: 3px solid var(--gold); border-radius: 24px; box-shadow: 0 0 0 4px #fff6e3, 0 18px 40px rgba(60, 30, 15, .45);
  transform: scale(.82); opacity: 0; transition: transform .35s cubic-bezier(.2, 1, .3, 1.25), opacity .2s;
}
.modal-wrap.in .modal-dim { opacity: 1; } .modal-wrap.in .modal { transform: none; opacity: 1; }
.modal-wrap.out .modal-dim, .modal-wrap.out .modal { opacity: 0; } .modal-wrap.out .modal { transform: scale(.9); }
.modal-title { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
.modal-title span {
  display: block; padding: 6px 28px 8px; font: 700 21px var(--title); color: #fff; text-shadow: 0 2px 2px rgba(120, 40, 50, .5);
  background: linear-gradient(#f6a7b9, #d9718d); border: 2.5px solid #fff3d6; border-radius: 16px; box-shadow: 0 4px 10px rgba(120, 40, 50, .35);
}
.modal-title span::before, .modal-title span::after { content: '✿'; color: #fff3d6; margin: 0 6px; font-size: 14px; }
.modal-x { position: absolute; top: -12px; right: -10px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #ff9c8a, #d9533f); border: 2.5px solid #fff; color: #fff; font: 900 16px var(--ui); box-shadow: var(--shadow); }
.modal-body { position: relative; padding: 30px 16px 8px; overflow-y: auto; font-size: 13.5px; line-height: 1.45; scrollbar-width: none; }
.modal-btns { display: flex; gap: 10px; justify-content: center; padding: 8px 16px 16px; }
.modal-btns .btn { flex: 1; }
.modal-wrap.sheet { align-items: flex-end; }
.modal-wrap.sheet .modal { width: 100%; border-radius: 26px 26px 0 0; margin: 0; padding-bottom: var(--sab); border-bottom: 0; transform: translateY(100%); max-height: 640px; }
.modal-wrap.sheet.in .modal { transform: none; }
.rays { position: absolute; left: 50%; top: 40%; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none; opacity: .5; z-index: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 130, .55) 0 9deg, transparent 9deg 22deg); border-radius: 50%; mask: radial-gradient(circle, #000 20%, transparent 65%); animation: spin 18s linear infinite; }
.confirm-img { max-height: 110px; max-width: 160px; object-fit: contain; display: block; margin: 0 auto 6px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .15)); }
.big-ico { width: 80px; height: 80px; object-fit: contain; }
.text-in { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--gold); background: #fff; font: 800 16px var(--ui); color: var(--ink); text-align: center; outline: none; }

.reward-sub { position: relative; text-align: center; margin: 0 0 6px; font-weight: 700; color: var(--brown); }
.reward-grid { position: relative; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 6px 0; }
.reward-item { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px; animation: popIn .5s backwards; animation-delay: var(--d); position: relative; }
.ri-img { width: 78px; height: 78px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fff, #fbe4c3); border: 2.5px solid var(--rc, var(--gold)); box-shadow: 0 3px 8px rgba(90, 55, 30, .25); }
.ri-img img { max-width: 68px; max-height: 68px; object-fit: contain; }
.reward-item span { font: 800 11px var(--ui); text-align: center; line-height: 1.2; }
.reward-item em { position: absolute; top: -6px; right: 0; background: #ff5f7e; color: #fff; font: 900 9px var(--ui); padding: 2px 5px; border-radius: 6px; font-style: normal; animation: pulse 1s infinite; }
.reward-item.is-new .ri-img { box-shadow: 0 0 0 3px rgba(255, 214, 107, .8), 0 0 18px rgba(255, 200, 80, .7); }
.lvl-badge { position: relative; width: 90px; height: 90px; margin: 0 auto 8px; display: grid; place-items: center; font: 700 52px var(--title); color: #fff; text-shadow: 0 3px 4px rgba(130, 70, 20, .6); background: radial-gradient(circle at 40% 30%, #fff1b8, #eaa33a); border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(255, 200, 80, .8); animation: popIn .6s; }

/* ---------- fx ---------- */
.spark { position: absolute; width: 12px; height: 12px; margin: -6px; background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spark 1s ease-out forwards; filter: drop-shadow(0 0 3px #fff); }
@keyframes spark { 0% { transform: translate(0, 0) scale(0) rotate(0); opacity: 1; } 30% { transform: translate(calc(var(--dx) * .6), calc(var(--dy) * .6)) scale(var(--s)) rotate(90deg); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 20px)) scale(0) rotate(180deg); opacity: 0; } }
.confetti, .petal-burst { position: absolute; width: 8px; height: 12px; margin: -6px -4px; background: var(--c); border-radius: 2px; animation: confetti 1.4s cubic-bezier(.2, .8, .4, 1) forwards; }
.petal-burst { width: 11px; height: 14px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #fff, var(--c)); }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 140px)) rotate(var(--r)); opacity: 0; } }
.float-text { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 900 16px var(--ui); color: #fff; -webkit-text-stroke: 4px #8a5a3b; paint-order: stroke fill; animation: floatUp 1.3s ease-out forwards; }
.float-text.heart { color: #ff7fa3; -webkit-text-stroke: 3px #fff; font-size: 22px; }
.float-text.blue { -webkit-text-stroke-color: #2f6fae; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.fly { position: absolute; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.drop { position: absolute; width: 7px; height: 11px; background: linear-gradient(#d9f0ff, #4ea6ec); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: dropFall .7s ease-in forwards; opacity: 0; }
@keyframes dropFall { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(60px); } }
.legend-flash { position: absolute; inset: 0; background: radial-gradient(circle, #fff 0%, #ffe39a 40%, rgba(255, 200, 80, 0) 75%); animation: legendFlash 1.6s ease-out forwards; }
@keyframes legendFlash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* ambient petals & butterflies */
.amb-host { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.amb-petal { position: absolute; top: -20px; width: 12px; height: 15px; border-radius: 80% 0 80% 0; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, #fff5f8, #f7a9bf); filter: hue-rotate(var(--hue)) drop-shadow(0 1px 1px rgba(150, 60, 80, .25)); opacity: .9;
  animation: petalFall var(--dur) linear var(--delay) infinite; transform: scale(var(--s)); }
@keyframes petalFall {
  0% { transform: translate(0, -20px) rotate(0) scale(var(--s)); }
  25% { transform: translate(var(--sway), 25vh) rotate(120deg) scale(var(--s)); }
  50% { transform: translate(calc(var(--sway) * -.4), 50vh) rotate(220deg) scale(var(--s)); }
  75% { transform: translate(var(--sway), 75vh) rotate(320deg) scale(var(--s)); }
  100% { transform: translate(calc(var(--sway) * .2), 105vh) rotate(420deg) scale(var(--s)); }
}
.view-body .amb-petal, .dressing .amb-petal { position: absolute; }
.bfly { position: absolute; left: -40px; top: var(--y); z-index: 4; pointer-events: none; animation: bflyPath var(--dur) linear var(--delay) infinite; }
.bfly img { width: 26px; display: block; animation: flap .25s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleX(1) rotate(10deg); } to { transform: scaleX(.25) rotate(10deg); } }
@keyframes bflyPath {
  0% { transform: translate(0, 0); } 20% { transform: translate(90px, calc(var(--amp) * -1)); } 40% { transform: translate(180px, var(--amp)); }
  60% { transform: translate(270px, calc(var(--amp) * -.5)); } 80% { transform: translate(360px, var(--amp)); } 100% { transform: translate(470px, 0); }
}

/* ---------- shop ---------- */
.view-shop .view-body { padding: 0; overflow: hidden; }
.shop-sign { position: absolute; top: 0; left: 50%; transform: translateX(-50%); text-align: center; padding: 4px 18px 6px; border-radius: 0 0 16px 16px; background: rgba(255, 250, 240, .9); border: 2px solid var(--gold); border-top: 0; box-shadow: var(--shadow); z-index: 5; white-space: nowrap; }
.shop-sign span { display: block; font: 700 18px var(--title); color: var(--brown-d); }
.shop-sign small { font-size: 10.5px; color: #c56a86; font-weight: 800; }
.customers { position: absolute; left: 0; right: 0; top: 60px; height: 420px; z-index: 2; }
.customer { position: absolute; bottom: 0; width: 140px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.customer .npc { height: 300px; filter: drop-shadow(0 4px 6px rgba(60, 35, 20, .35)); animation-delay: var(--d); }
.customer.arrive { animation: arrive .8s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes arrive { from { opacity: 0; transform: translateX(30%); } to { opacity: 1; transform: translateX(-50%); } }
.customer.leave { animation: leave .7s forwards ease-in; }
@keyframes leave { to { opacity: 0; transform: translateX(-160%); } }
.customer.leave-happy { animation: leaveHappy .7s forwards ease-in; }
@keyframes leaveHappy { 30% { transform: translateX(-50%) translateY(-14px); } to { opacity: 0; transform: translateX(80%); } }
.bubble { position: relative; display: flex; gap: 2px; align-items: center; padding: 4px 8px; margin-bottom: 4px; border-radius: 16px; background: #fff; border: 2px solid #e8cfaa; box-shadow: var(--shadow); animation: float 2.6s ease-in-out infinite; animation-delay: var(--d); z-index: 3; }
.bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble span { display: flex; align-items: center; font: 900 11px var(--ui); color: var(--brown-d); }
.bubble img { width: 30px; height: 30px; object-fit: contain; }
.bubble.ok { border-color: #7ccd5c; box-shadow: 0 0 0 3px rgba(124, 205, 92, .35), var(--shadow); }
.bubble.ok::before { content: '✓'; position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #6cbf4c; color: #fff; font: 900 11px/18px var(--ui); text-align: center; border: 1.5px solid #fff; }
.bubble .vip { position: absolute; top: -10px; left: -8px; font: 900 9px var(--ui); font-style: normal; color: #fff; background: linear-gradient(#c79cff, #8a5ad8); padding: 2px 5px; border-radius: 6px; }
.npc-name { position: relative; z-index: 3; margin-bottom: 2px; padding: 2px 8px; border-radius: 999px; background: rgba(70, 45, 30, .6); color: #fff; font: 800 10.5px var(--ui); white-space: nowrap; }
.counter { position: absolute; left: 50%; bottom: 100px; width: 430px; transform: translateX(-50%); z-index: 3; pointer-events: none; filter: drop-shadow(0 -2px 8px rgba(60, 35, 20, .25)); }
.counter-hero { position: absolute; right: -24px; bottom: -110px; z-index: 4; pointer-events: none; }
.counter-hero img { height: 330px; filter: drop-shadow(0 0 6px rgba(60, 35, 20, .3)); }
.shop-foot { position: absolute; left: 10px; right: 10px; bottom: calc(var(--sab) + 6px); display: flex; gap: 6px; align-items: center; z-index: 6; }
.next-cust { flex: 1; display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; background: rgba(255, 250, 240, .92); border: 2px solid var(--gold); font: 800 11.5px var(--ui); white-space: nowrap; }
.next-cust img { width: 18px; }
.order-top { display: flex; gap: 10px; align-items: flex-start; }
.order-npc { width: 96px; height: 130px; object-fit: cover; object-position: top; border-radius: 16px; background: radial-gradient(#fff, #fbe4c3); border: 2px solid var(--gold); flex: none; }
.order-say { font: italic 600 16px/1.3 var(--title); color: var(--brown-d); }
.likes { margin-top: 8px; font: 700 12px var(--ui); color: var(--brown); }
.req-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 8px; }
.req { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 14px; background: #fff; border: 2px solid #e8d4b5; }
.req img { width: 42px; height: 42px; object-fit: contain; }
.req div { flex: 1; } .req b { font-size: 13px; display: block; } .req small { color: #a07a5a; font-size: 10.5px; }
.req .cnt { font: 900 14px var(--ui); }
.req.ok { border-color: #a9d68e; } .req.ok .cnt { color: #4f9a39; }
.req.short { border-color: #f0b3b3; } .req.short .cnt { color: #d9533f; }
.order-reward { display: flex; justify-content: center; gap: 14px; margin-top: 6px; position: relative; }
.order-reward span { display: flex; align-items: center; gap: 3px; font: 900 14px var(--ui); color: var(--brown-d); }
.order-reward img { width: 24px; height: 24px; object-fit: contain; }
.order-reward small { font-size: 10px; color: #4f9a39; }

/* ---------- arrange ---------- */
.view-arrange .view-body { padding: 0 12px 30px; }
.arr-order { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border-radius: 16px; background: rgba(255, 250, 240, .9); border: 2px solid var(--gold); }
.mini-npc { width: 38px; height: 38px; object-fit: cover; object-position: top; border-radius: 50%; background: #fbe4c3; border: 2px solid var(--gold); }
.ochip { display: flex; align-items: center; gap: 2px; padding: 2px 8px 2px 2px; border-radius: 999px; background: #fff; border: 1.5px solid #e8cfaa; font: 900 12px var(--ui); }
.ochip img { width: 28px; height: 28px; object-fit: contain; }
.ochip.ok { border-color: #7ccd5c; background: #eefbe6; color: #3f7a2c; }
.ochip.like { padding: 6px 10px; font-weight: 800; color: #c56a86; }
.stage { position: relative; height: 340px; }
.stage-glow { position: absolute; left: 50%; top: 55%; width: 320px; height: 320px; margin: -160px; border-radius: 50%; background: radial-gradient(rgba(255, 250, 225, .95), rgba(255, 240, 200, 0) 65%); animation: pulse 4s ease-in-out infinite; }
.bouquet { position: absolute; left: 50%; bottom: 0; width: 220px; height: 330px; transform: translateX(-50%); }
.bouquet .wrap-img, .bouquet .wrap-back, .deliver-bq .wrap-back { position: absolute; left: 50%; bottom: 0; width: 196px; transform: translateX(-50%); z-index: 10; pointer-events: none; }
.bouquet .wrap-back, .deliver-bq .wrap-back { z-index: 0; filter: drop-shadow(0 6px 8px rgba(60, 35, 20, .3)) brightness(.93); }
.bouquet .wrap-img, .deliver-bq .wrap-img { clip-path: polygon(0 51%, 20% 45%, 50% 49%, 80% 45%, 100% 51%, 100% 100%, 0 100%); filter: drop-shadow(0 -3px 4px rgba(60, 35, 20, .35)); }
.stems { z-index: 2; }
.stems { position: absolute; inset: 0; }
.stem { position: absolute; left: 50%; bottom: 104px; width: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); transform-origin: 0 100%; cursor: pointer; }
.stem img { position: absolute; bottom: 0; left: 0; height: 180px; transform: translateX(-50%); animation: swayTx 4s ease-in-out infinite; animation-delay: var(--sd, 0s); transform-origin: 50% 100%; filter: drop-shadow(0 2px 3px rgba(60, 35, 20, .25)); }
.stem.pop img { animation: stemPop .45s cubic-bezier(.3, 1.6, .5, 1), swayTx 4s ease-in-out .45s infinite; }
@keyframes stemPop { from { transform: translateX(-50%) translateY(40px) scale(.6); opacity: 0; } }
.bouquet.wrapping { animation: wrapIt .65s ease-in-out; }
.bouquet.wrapping::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .8) 50%, transparent 70%); background-size: 250% 100%; animation: wrapShine .65s; z-index: 20; mix-blend-mode: soft-light; }
@keyframes wrapIt { 40% { transform: translateX(-50%) scale(1.06, .96); } 70% { transform: translateX(-50%) scale(.97, 1.04); } }
@keyframes wrapShine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.stars-preview { position: absolute; right: 0; top: 8px; display: flex; flex-direction: column; gap: 5px; z-index: 30; }
.sp { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .75); border: 1.5px solid #e2cfb2; font: 900 13px var(--ui); color: #cbb79c; transition: .3s; }
.sp span { font-size: 10px; color: #a48a73; }
.sp.on { color: #f2a93b; background: #fff8dc; border-color: #f2c35b; box-shadow: 0 0 10px rgba(255, 200, 80, .6); }
.sp.on span { color: var(--brown-d); }
.arr-panel { padding: 8px 10px; border-radius: 18px; background: rgba(255, 250, 240, .95); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.arr-label { font: 700 15px var(--title); color: var(--brown-d); margin: 2px 0 4px; }
.arr-label small { font: 700 10px var(--ui); color: #a48a73; margin-left: 4px; }
.wrap-row, .flower-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.wrap-card { position: relative; flex: none; width: 66px; padding: 4px; border-radius: 12px; background: #fff; border: 2px solid color-mix(in srgb, var(--rc) 55%, #fff); display: flex; flex-direction: column; align-items: center; }
.wrap-card img { height: 54px; object-fit: contain; }
.wrap-card span { font: 800 9px var(--ui); text-align: center; line-height: 1.1; }
.wrap-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 214, 107, .6); background: #fffbe8; }
.wrap-card.locked img { filter: saturate(.3); opacity: .7; }
.wrap-card .lock { position: absolute; top: 2px; right: 3px; font-size: 11px; font-style: normal; }
.fchip { position: relative; flex: none; width: 56px; height: 56px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #fff, var(--cream2)); border: 2px solid var(--rc); display: grid; place-items: center; transition: transform .1s; }
.fchip:active { transform: scale(.9); }
.fchip img { width: 48px; height: 48px; object-fit: contain; }
.fchip b { position: absolute; right: -4px; bottom: -5px; min-width: 20px; padding: 1px 5px; border-radius: 999px; background: var(--brown-d); color: #fff; font-size: 10.5px; border: 1.5px solid #fff; }
.fchip.needed { box-shadow: 0 0 0 3px rgba(124, 205, 92, .55); }
.fchip.empty { opacity: .4; filter: grayscale(.8); }
.heart-mini { position: absolute; left: -4px; top: -6px; color: #ff6f96; font-style: normal; font-size: 15px; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.deliver-modal .modal-body { text-align: center; }
.deliver-bq { position: relative; width: 220px; height: 260px; margin: -10px auto 0; transform: scale(.8); transform-origin: 50% 100%; }
.deliver-bq .stem { bottom: 104px; } .deliver-bq .stem img { animation: none; }
.deliver-bq .wrap-img { position: absolute; left: 50%; bottom: 0; width: 196px; transform: translateX(-50%); z-index: 10; }
.big-stars { position: relative; display: flex; justify-content: center; gap: 6px; margin: 4px 0; }
.big-stars i { font-size: 40px; font-style: normal; color: #e2d3bd; animation: popIn .5s backwards; animation-delay: var(--d); }
.big-stars i.on { color: #f7b733; text-shadow: 0 0 12px rgba(255, 200, 60, .9), 0 2px 0 #c98a1e; }

/* ---------- trade ---------- */
.info-card { display: flex; gap: 8px; align-items: flex-end; padding: 6px 10px 0 4px; border-radius: 18px; background: rgba(255, 250, 240, .93); border: 2px solid var(--gold); box-shadow: var(--shadow); overflow: hidden; }
.info-npc { width: 84px; height: 120px; object-fit: cover; object-position: top; flex: none; }
.info-card p { margin: 0 0 10px; font-size: 12px; line-height: 1.4; }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: rgba(255, 250, 240, .95); border: 2px solid #ecd2a8; box-shadow: var(--shadow); animation: popIn .4s; }
.offer .av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); }
.offer-mid { flex: 1; min-width: 0; }
.offer-who { display: flex; align-items: center; gap: 5px; font-size: 13px; margin-bottom: 3px; }
.swap { display: flex; align-items: center; gap: 4px; }
.give, .want { position: relative; display: flex; align-items: center; gap: 2px; padding: 2px 6px 2px 2px; border-radius: 12px; background: #fff; border: 1.5px solid #e8d4b5; flex-wrap: wrap; width: 92px; }
.give { border-color: #a9d68e; background: #f2fbea; }
.give img, .want img { width: 32px; height: 32px; object-fit: contain; }
.give span, .want span { font: 900 13px var(--ui); }
.give em { font-style: normal; color: #4f9a39; font-size: 10px; margin-left: 1px; }
.give small, .want small { width: 100%; font-size: 9px; color: #a07a5a; padding-left: 3px; line-height: 1.1; padding-bottom: 2px; }
.want.short { border-color: #f0b3b3; } .want.short small { color: #d9533f; }
.arrows { font-style: normal; color: var(--gold-d); font-weight: 900; }
.offer.done { opacity: .75; } .offer.done small { display: block; color: #a07a5a; font-size: 11px; }
.sell-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sell-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 12px; background: rgba(255, 250, 240, .95); border: 2px solid color-mix(in srgb, var(--rc) 50%, #fff); }
.sell-card img { width: 40px; height: 40px; object-fit: contain; }
.sell-card b { position: absolute; top: 2px; right: 4px; font-size: 10px; color: var(--brown); }
.sell-card span { display: flex; align-items: center; font: 900 11px var(--ui); } .sell-card span img { width: 14px; height: 14px; }

/* ---------- wardrobe ---------- */
.view-wardrobe .view-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.wd-panel { flex: 1; overflow-y: auto; padding: 6px 12px calc(var(--sab) + 14px); background: linear-gradient(rgba(255, 248, 236, .97), #f6e4c7); border-top: 2.5px solid var(--gold); border-radius: 24px 24px 0 0; scrollbar-width: none; }
.wd-panel .tabs { background: rgba(140, 95, 60, .55); }
.tool-row { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 16px; background: #fffaf2; border: 2px solid #ecd2a8; }
.tool-cur { width: 64px; height: 64px; flex: none; border-radius: 16px; background: radial-gradient(#fff, #fbe4c3); display: grid; place-items: center; }
.tool-cur img { max-width: 56px; max-height: 56px; }
.tool-info { flex: 1; font-size: 11px; } .tool-info b { font-size: 14px; display: block; } .tool-info small { color: #6b8f3a; font-weight: 800; }
.tool-next { color: #a07a5a; margin-top: 3px; } .tool-next.max { color: var(--gold-d); font-weight: 900; }
.grade-dots { display: flex; gap: 3px; margin-top: 4px; } .grade-dots i { width: 18px; height: 5px; border-radius: 3px; background: #ead8bd; } .grade-dots i.on { background: linear-gradient(90deg, #ffd66b, #f0a93c); }

/* ---------- store ---------- */
.store-content { padding-bottom: 10px; }
.bundle-card { position: relative; margin: 10px 0; padding: 30px 12px 12px; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #ffe0ea, #ffd0a8 60%, #fff0c2); border: 3px solid #fff; box-shadow: 0 0 0 2px #f2a9bd, var(--shadow); }
.bundle-ribbon { position: absolute; top: 0; left: 0; right: 0; padding: 4px; text-align: center; background: linear-gradient(90deg, #e46b93, #f39a4f); color: #fff; font: 900 11px var(--ui); letter-spacing: .5px; }
.bundle-art { position: relative; height: 130px; }
.bundle-art img { position: absolute; filter: drop-shadow(0 4px 6px rgba(120, 60, 40, .3)); }
.bundle-art .b1 { left: 14px; top: 0; height: 128px; } .bundle-art .b2 { left: 120px; top: 30px; height: 96px; } .bundle-art .b3 { right: 70px; top: 4px; height: 120px; animation-delay: -1.2s; }
.bundle-gems { position: absolute; right: 4px; bottom: 6px; display: flex; align-items: center; font: 900 20px var(--ui); color: #fff; -webkit-text-stroke: 4px #b04a72; paint-order: stroke fill; }
.bundle-gems img { position: static; width: 44px; }
.bundle-info b { display: block; font: 700 20px var(--title); color: #8a3550; } .bundle-info small { font-size: 11px; color: #9c4f69; }
.bundle-buy { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bundle-buy s { color: #9c4f69; font-weight: 800; } .bundle-buy .btn { flex: 1; }
.value-tag { font-style: normal; font: 900 12px var(--ui); color: #fff; background: #4fb04a; padding: 4px 8px; border-radius: 10px; transform: rotate(6deg); animation: pulse 1.4s infinite; }
.store-row-card { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 8px 0; border-radius: 16px; background: rgba(255, 250, 240, .95); border: 2px solid #ecd2a8; box-shadow: var(--shadow); }
.src-ico { width: 46px; height: 46px; flex: none; object-fit: contain; }
.ad-ico { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(#9fd6ff, #4c9be0); color: #fff; font-size: 18px; }
.src-mid { flex: 1; } .src-mid b { display: block; font-size: 13.5px; } .src-mid small { font-size: 11px; color: #a07a5a; }
.wish-banner { position: relative; height: 140px; margin: 10px 0; border-radius: 20px; overflow: hidden; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 2px #b9a0e8, var(--shadow); }
.wb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.wb-char { position: absolute; right: -6px; top: 4px; height: 230px; filter: drop-shadow(0 0 12px rgba(200, 170, 255, .8)); }
.wb-text { position: absolute; left: 14px; top: 18px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.wb-text b { font: 700 26px var(--title); color: #fff; text-shadow: 0 2px 6px rgba(60, 30, 100, .8); }
.wb-text small { color: #ffe9a8; font-weight: 800; font-size: 11px; text-shadow: 0 1px 3px #000; margin-bottom: 4px; }
.gem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gem-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 4px 8px; border-radius: 16px; background: linear-gradient(#fff, #fbe7f0); border: 2px solid #f3c2d1; box-shadow: var(--shadow); }
.gem-card:active { transform: scale(.95); }
.gem-card.tagged { border-color: #e46b93; }
.gem-pile { position: relative; height: 60px; width: 80px; }
.gem-pile img { position: absolute; width: 44px; left: calc(18px + (var(--j) - 2) * 9px); top: calc(12px - var(--j) * 3px); filter: drop-shadow(0 2px 3px rgba(150, 60, 120, .35)); animation: float 3s ease-in-out infinite; animation-delay: calc(var(--j) * -.4s); }
.gem-card b { font: 900 17px var(--ui); color: #8a3550; } .gem-card small { font-size: 10px; color: #4f9a39; font-weight: 800; }
.gem-card .price { margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: linear-gradient(#a9e57b, #57ad3e); color: #fff; font: 900 13px var(--ui); border: 1.5px solid #4f9a39; }
.gtag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 900 9.5px var(--ui); font-style: normal; color: #fff; background: #e46b93; padding: 2px 8px; border-radius: 8px; }
.x2 { position: absolute; top: 4px; right: 4px; font: 900 11px var(--ui); font-style: normal; color: #fff; background: #f39a4f; border-radius: 50%; width: 26px; height: 26px; line-height: 26px; text-align: center; transform: rotate(10deg); }
.shop-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; background: rgba(255, 250, 240, .96); border: 2px solid color-mix(in srgb, var(--rc) 55%, #fff); box-shadow: var(--shadow); }
.shop-card .rtag { position: absolute; left: 8px; top: 8px; }
.shop-card .kind { position: absolute; right: 8px; top: 8px; font: 800 9px var(--ui); font-style: normal; color: #a07a5a; text-transform: uppercase; }
.sc-img { height: 110px; display: grid; place-items: center; }
.sc-img img { max-height: 100px; max-width: 120px; object-fit: contain; }
.sc-img img.tall { max-height: 110px; }
.shop-card b { font-size: 12.5px; text-align: center; }
.pass-head { display: flex; gap: 8px; align-items: center; padding: 10px 10px 10px 0; margin: 8px 0; border-radius: 20px; background: linear-gradient(135deg, #ffe5ee, #fff5dd); border: 2px solid #f3c2d1; overflow: hidden; height: 150px; }
.pass-art { height: 220px; margin: 70px -14px 0 -10px; }
.pass-title { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pass-title small { font-size: 10px; font-weight: 900; color: #c56a86; letter-spacing: .5px; }
.pass-title > b { font: 700 22px var(--title); color: #8a3550; }
.pass-lvl { font-size: 12px; } .pass-lvl b { font-size: 16px; color: #e46b93; }
.pass-title small.muted { color: #a48a73; font-weight: 700; letter-spacing: 0; }
.pass-owned { text-align: center; padding: 8px; border-radius: 14px; background: linear-gradient(90deg, #ffe48f, #ffc6d6); font-weight: 900; color: #8a3550; margin: 6px 0; }
.pass-track { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.pt-labels { display: grid; grid-template-columns: 1fr 34px 1fr; text-align: center; font: 900 12px var(--ui); }
.pt-labels span:first-child { grid-column: 1; } .pt-labels .prem { grid-column: 3; color: #e46b93; }
.pt-row { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 0; }
.pt-num { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; background: #e6d6be; color: #fff; font: 900 12px/28px var(--ui); text-align: center; }
.pt-row.reached .pt-num { background: linear-gradient(#ffe48f, #f0a93c); color: #6b3f12; }
.pt-cell { position: relative; height: 62px; display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 14px; background: rgba(255, 250, 240, .95); border: 2px solid #ecd2a8; cursor: pointer; overflow: hidden; }
.pt-cell.prem { background: linear-gradient(#fff4f8, #ffe5ee); border-color: #f3c2d1; }
.pt-cell img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.pt-cell img.tall { height: 120px; width: 50px; object-fit: cover; object-position: top; margin-top: 60px; }
.pt-cell span { font: 800 10.5px var(--ui); line-height: 1.15; }
.pt-cell.claimable { animation: glowPulse 1.4s infinite; border-color: #f2c35b; }
.pt-cell.claimed::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .6); color: #4f9a39; font: 900 26px var(--ui); }
.pt-cell.locked img { filter: saturate(.4); opacity: .8; }
.pt-cell .lock { position: absolute; right: 4px; top: 2px; font-style: normal; font-size: 11px; }

/* wish */
.view-wish .view-body { padding: 0; overflow: hidden; }
.wish-feature { position: absolute; left: -30px; top: 0; height: 420px; width: 260px; }
.wf-char { height: 420px; filter: drop-shadow(0 0 16px rgba(210, 180, 255, .9)); }
.wf-tag { position: absolute; right: -110px; top: 40px; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 14px; background: rgba(40, 25, 70, .55); border: 1.5px solid rgba(255, 230, 170, .7); color: #fff; backdrop-filter: blur(3px); }
.wf-tag small { font-size: 9.5px; font-weight: 900; color: #ffd66b; letter-spacing: .5px; } .wf-tag b { font: 700 22px var(--title); } .wf-tag span { font-size: 10px; opacity: .85; }
.well-glow { position: absolute; left: 50%; bottom: 220px; width: 240px; height: 120px; margin-left: -60px; border-radius: 50%; background: radial-gradient(rgba(255, 230, 150, .7), transparent 70%); animation: pulse 2.4s ease-in-out infinite; pointer-events: none; }
.wish-body.wishing .well-glow { animation: pulse .3s infinite; background: radial-gradient(rgba(255, 245, 200, 1), transparent 70%); width: 340px; margin-left: -110px; }
.wish-orbs { position: absolute; left: 60%; bottom: 250px; pointer-events: none; }
.orb { position: absolute; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #a6c8ff); box-shadow: 0 0 16px #a6c8ff; animation: orbRise 1.8s cubic-bezier(.3, .6, .4, 1) forwards; animation-delay: calc(var(--i) * .06s); opacity: 0; }
.orb.SR { background: radial-gradient(circle at 35% 35%, #fff, #c9a6ff); box-shadow: 0 0 20px #b48ae8; }
.orb.SSR { background: radial-gradient(circle at 35% 35%, #fff, #ffd66b); box-shadow: 0 0 30px #ffc23d; width: 34px; height: 34px; }
@keyframes orbRise { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), -300px) scale(1.2); } }
.wish-panel { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 10px); padding: 12px; border-radius: 20px; background: rgba(255, 250, 240, .93); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.pity { text-align: center; font-size: 12px; margin-bottom: 8px; } .pity b { color: #8a5ad8; font-size: 15px; }
.wish-btns { display: flex; gap: 8px; } .wish-btns .btn { flex: 1; flex-direction: column; gap: 0; }
.wish-results .modal { background: linear-gradient(#2e2350, #4a3577); border-color: #c9a6ff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 0 50px rgba(180, 140, 255, .6); }
.wish-results.best-SSR .modal { border-color: #ffd66b; box-shadow: 0 0 0 4px rgba(255, 240, 200, .5), 0 0 60px rgba(255, 200, 80, .8); }
.wr-grid { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; perspective: 600px; }
.wr-grid.single { grid-template-columns: 1fr; width: 130px; margin: 0 auto; }
.wr-card { aspect-ratio: .72; }
.wr-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flip .6s ease-out forwards; animation-delay: calc(.3s + var(--d)); transform: rotateY(180deg); }
@keyframes flip { to { transform: rotateY(0); } }
.wr-back, .wr-front { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wr-back { transform: rotateY(180deg); background: linear-gradient(#6b55a8, #3d2c6b); border: 2px solid #c9a6ff; color: #ffd66b; font-size: 22px; }
.wr-front { background: radial-gradient(circle at 50% 35%, #fff, color-mix(in srgb, var(--rc) 35%, #fff)); border: 2.5px solid var(--rc); box-shadow: 0 0 12px var(--rc); padding: 3px; }
.wr-front img { max-width: 90%; max-height: 62%; object-fit: contain; }
.wr-front span { font: 800 8.5px var(--ui); text-align: center; line-height: 1.1; color: var(--ink); }
.wr-front em { position: absolute; top: 2px; right: 2px; font: 900 8px var(--ui); font-style: normal; background: #ff5f7e; color: #fff; padding: 1px 3px; border-radius: 4px; }
.wr-grid.single .wr-front span { font-size: 12px; }
.r-SSR .wr-front { animation: ssrGlow 1.2s ease-in-out infinite alternate; }
@keyframes ssrGlow { to { box-shadow: 0 0 26px #ffd66b, 0 0 8px #fff; } }
.odds { width: 100%; border-collapse: collapse; font-size: 12px; }
.odds td { padding: 5px 4px; border-bottom: 1px solid #ecd9bd; } .odds td:last-child { text-align: right; font-weight: 900; }

/* pay sheet */
.pay-wrap { position: absolute; inset: 0; z-index: 10; font-family: -apple-system, 'SF Pro Text', var(--ui); }
.pay-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: .3s; }
.paysheet { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 14px 16px 18px; border-radius: 30px; background: #f5f5f7; color: #111; transform: translateY(110%); transition: transform .35s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); }
.pay-wrap.in .pay-dim { opacity: 1; } .pay-wrap.in .paysheet { transform: none; }
.ps-head { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; }
.ps-logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(#1ea1f2, #1565e0); position: relative; }
.ps-logo::after { content: 'A'; position: absolute; inset: 0; color: #fff; font: 900 14px/22px -apple-system, sans-serif; text-align: center; }
.ps-head b { flex: 1; font-size: 17px; } .ps-cancel { color: #0a7aff; font-size: 16px; }
.ps-product { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #fff; }
.ps-product img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff3f6; }
.ps-product b { display: block; font-size: 15px; } .ps-product small { color: #8a8a8e; font-size: 12px; }
.ps-row { display: flex; justify-content: space-between; padding: 11px 4px; border-bottom: 1px solid #e0e0e4; font-size: 13px; }
.ps-row span { color: #8a8a8e; font-size: 12px; } .ps-row.total b { font-size: 20px; }
.ps-confirm { width: 100%; margin-top: 14px; padding: 12px; border-radius: 14px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #0a7aff; font-size: 15px; }
.faceid { width: 44px; height: 44px; border: 3px solid #0a7aff; border-radius: 12px; position: relative; }
.faceid i { position: absolute; inset: 9px 8px; border-radius: 0 0 14px 14px; border-bottom: 3px solid #0a7aff; }
.ps-confirm.busy .faceid { animation: spin 1s linear infinite; border-style: dashed; }
.ps-confirm.done .faceid { animation: none; border-style: solid; border-color: #34c759; background: #34c759; }
.ps-confirm.done .faceid i { border: 0; inset: 0; } .ps-confirm.done .faceid i::after { content: '✓'; position: absolute; inset: 0; color: #fff; font: 900 26px/38px sans-serif; text-align: center; }
.ps-confirm.done { color: #34c759; }
.ps-note { margin: 10px 0 0; text-align: center; font-size: 11px; color: #8a8a8e; }
.ad-overlay { position: absolute; inset: 0; z-index: 20; background: #000; display: grid; place-items: center; }
.ad-box { width: 330px; text-align: center; color: #fff; }
.ad-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 800; margin-bottom: 14px; }
.ad-content { padding: 30px 20px; border-radius: 24px; background: linear-gradient(135deg, #6a3cff, #ff5f9e); display: flex; flex-direction: column; gap: 6px; }
.ad-logo { font-size: 60px; animation: pulse 1s infinite; } .ad-content b { font-size: 20px; } .ad-content small { opacity: .9; }
.ad-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; margin-top: 12px; }
.ad-bar i { display: block; height: 100%; width: 0; background: #fff; animation: adBar 5s linear forwards; }
@keyframes adBar { to { width: 100%; } }
.ad-box p { font-size: 11px; opacity: .5; }
.daily-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 12px; background: #fff; border: 2px solid #ecd2a8; }
.day.big { grid-column: span 2; background: linear-gradient(#fffbe8, #ffeec2); }
.day small { font-size: 9.5px; color: #a07a5a; font-weight: 800; } .day img { height: 34px; object-fit: contain; margin: 2px 0; } .day b { font-size: 10.5px; }
.day.today { border-color: #6cbf4c; animation: glowPulse 1.4s infinite; }
.day.got { opacity: .6; } .day i { position: absolute; inset: 0; display: grid; place-items: center; color: #4f9a39; font: 900 26px var(--ui); font-style: normal; }

/* ---------- guild ---------- */
.guild-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 18px; background: rgba(255, 250, 240, .93); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.guild-head .crest { width: 48px; } .guild-head > div:nth-child(2) { flex: 1; }
.guild-head b { font: 700 19px var(--title); display: block; } .guild-head small { font-size: 10.5px; color: #a07a5a; }
.gpts { text-align: right; } .gpts b { font: 900 17px var(--ui); color: #3c7fbd; }
.contest-banner { position: relative; padding: 12px; border-radius: 18px; color: #fff; text-align: center; background: linear-gradient(135deg, #3a4f9a, #7b5cc4 60%, #c58ad8); border: 2.5px solid #fff3d6; box-shadow: var(--shadow); overflow: hidden; }
.contest-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 40%), radial-gradient(circle at 80% 70%, rgba(255, 220, 150, .2), transparent 40%); }
.contest-banner small { position: relative; font-size: 10px; font-weight: 900; letter-spacing: 1px; color: #ffe39a; }
.contest-banner b { position: relative; display: block; font: 700 24px var(--title); }
.contest-banner p { position: relative; margin: 2px 0 6px; font-size: 11.5px; opacity: .95; }
.theme-dots { position: relative; font-size: 11px; font-weight: 800; }
.ends { position: absolute; top: 8px; right: 10px; font: 900 9.5px var(--ui); font-style: normal; background: rgba(0, 0, 0, .3); padding: 2px 6px; border-radius: 6px; }
.stepper { display: flex; justify-content: space-between; margin: 10px 4px; position: relative; }
.stepper::before { content: ''; position: absolute; left: 30px; right: 30px; top: 13px; height: 3px; background: #e6d6be; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; }
.step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e6d6be; color: #fff; font: 900 12px var(--ui); font-style: normal; border: 2px solid #fff; }
.step span { font: 800 10.5px var(--ui); color: #a07a5a; text-shadow: 0 1px 0 #fff; }
.step.done i { background: #6cbf4c; } .step.on i { background: linear-gradient(#ffe48f, #f0a93c); color: #6b3f12; animation: pulse 1.4s infinite; } .step.on span { color: var(--brown-d); }
.rules { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 250, 240, .92); border: 1.5px dashed #d9b98a; font-size: 11.5px; line-height: 1.35; }
.rules > b:first-child { font: 700 15px var(--title); color: var(--brown-d); }
.c-plots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.c-plot { position: relative; height: 130px; border-radius: 16px; background: rgba(255, 250, 240, .85); border: 2px solid #ecd2a8; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 4px; overflow: hidden; }
.cp-soil { position: absolute; bottom: 18px; width: 96px; }
.cp-plant { position: absolute; bottom: 46px; height: 74px; transform-origin: 50% 100%; }
.c-plot .plant-hint { top: 40px; }
.c-plot small { position: relative; font: 900 11px var(--ui); color: var(--brown-d); background: rgba(255, 255, 255, .85); padding: 1px 8px; border-radius: 999px; }
.c-plot.ready { border-color: #7ccd5c; animation: glowPulse 1.4s infinite; } .c-plot.ready small { color: #4f9a39; }
.stock-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px; scrollbar-width: none; }
.stock-row.pickable .chip { cursor: pointer; } .stock-row .chip.sel { box-shadow: 0 0 0 3px #f2b84b, 0 0 14px rgba(255, 200, 80, .8); transform: translateY(-3px); }
.team-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; margin: 6px 2px; } .team-progress .xpbar { flex: 1; }
.canvas-wrap { position: relative; margin: 10px 0 4px; display: flex; flex-direction: column; align-items: center; }
.c-canvas { position: relative; width: 300px; height: 300px; border-radius: 24px; background: radial-gradient(circle at 50% 60%, rgba(255, 252, 240, .95), rgba(255, 240, 215, .7)); border: 2px solid #ecd2a8; overflow: hidden; cursor: crosshair; }
.c-flowers { position: absolute; inset: 0; z-index: 1; }
.cf { position: absolute; transform: translate(-50%, -100%) rotate(var(--r)); transform-origin: 50% 100%; pointer-events: none; animation: cfIn .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes cfIn { from { opacity: 0; transform: translate(-50%, -80%) rotate(var(--r)) scale(.7); } }
.cf img { height: 100%; width: auto; display: block; filter: drop-shadow(0 2px 3px rgba(60, 35, 20, .25)); }
.cf .by { position: absolute; left: 50%; top: 8px; transform: translateX(-50%) rotate(calc(var(--r) * -1)); font: 800 8.5px var(--ui); color: #fff; background: rgba(70, 45, 30, .55); padding: 1px 5px; border-radius: 6px; white-space: nowrap; }
.cf.mine img { filter: drop-shadow(0 0 6px #ffd66b) drop-shadow(0 0 2px #fff); } .cf.mine .by { background: #e6a93f; }
.c-basket { position: absolute; left: 50%; bottom: 0; width: 76%; transform: translateX(-50%); z-index: 0; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(60, 35, 20, .3)); }
.c-basket.front { z-index: 2; clip-path: inset(62% 0 0 0); filter: drop-shadow(0 -2px 3px rgba(60, 35, 20, .3)); }
.c-ghost { position: absolute; z-index: 1; display: none; transform: translate(-50%, -100%) rotate(var(--r)); transform-origin: 50% 100%; opacity: .55; pointer-events: none; } .c-ghost img { height: 100%; }
.c-count { margin-top: 6px; font-size: 12px; font-weight: 800; } .c-count b { color: #e46b93; font-size: 15px; }
.judge-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.judge-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 16px; background: rgba(255, 250, 240, .95); border: 2px solid #ecd2a8; }
.mini-canvas, .final-canvas { position: relative; flex: none; width: 120px; height: 120px; border-radius: 14px; background: radial-gradient(circle at 50% 60%, #fffdf6, #f8e8cf); overflow: hidden; }
.mini-canvas .cf .by, .final-canvas .cf .by { display: none; }
.final-canvas { width: 150px; height: 150px; }
.jc-side b { display: block; font: 700 17px var(--title); } .jc-side small { color: #a07a5a; font-size: 11px; }
.rate { display: flex; gap: 2px; margin-top: 6px; } .rate button { font-size: 26px; color: #e2d3bd; transition: transform .1s; } .rate button.on { color: #f7b733; text-shadow: 0 0 6px rgba(255, 200, 60, .7); } .rate button:active { transform: scale(1.3); }
.tally { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid #f3dcb8; border-top-color: #e46b93; animation: spin .8s linear infinite; }
.result-top { display: flex; gap: 12px; align-items: center; margin: 8px 0; padding: 8px; border-radius: 18px; background: rgba(255, 250, 240, .94); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.result-rank { display: flex; flex-direction: column; } .result-rank small { font-size: 11px; color: #a07a5a; font-weight: 800; }
.rank-num { font: 700 46px/1 var(--title); color: #c98a1e; text-shadow: 0 2px 0 #fff, 0 0 18px rgba(255, 200, 60, .6); animation: popIn .7s; }
.rank-num.r0 { color: #e6a93f; } .rank-num.r1 { color: #9aa6b8; } .rank-num.r2 { color: #c27a4a; }
.result-rank > span { font: 900 14px var(--ui); color: var(--brown-d); }
.breakdown { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; font-size: 11px; } .breakdown b { color: #3c7fbd; }
.board { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.brow { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 250, 240, .92); border: 1.5px solid #ecd2a8; font-size: 13px; font-weight: 800; }
.brow span { flex: 1; } .brow.us { background: linear-gradient(90deg, #fff4c7, #ffe0ea); border-color: #f2b84b; box-shadow: 0 0 0 2px rgba(242, 184, 75, .4); }
.medal { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 900 11px var(--ui); font-style: normal; color: #fff; background: #c9b8a0; }
.medal.m0 { background: linear-gradient(#ffe48f, #e6a93f); } .medal.m1 { background: linear-gradient(#eef2f7, #9aa6b8); } .medal.m2 { background: linear-gradient(#f4c29a, #c27a4a); }
.rank-reward { padding: 8px 10px; border-radius: 14px; background: rgba(255, 250, 240, .95); border: 2px solid var(--gold); font-size: 12px; font-weight: 800; }
.rank-reward > div { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.rank-reward > div span { display: flex; align-items: center; gap: 3px; font-size: 13px; }
.rank-reward img { width: 26px; height: 26px; object-fit: contain; } .rank-reward img.tall { height: 46px; width: 34px; object-fit: cover; object-position: top; }
.pumpkin-stage { position: relative; height: 230px; display: grid; place-items: center; }
.pumpkin { height: 170px; filter: drop-shadow(0 8px 8px rgba(60, 35, 20, .3)); transform-origin: 50% 90%; }
.pk-kg { position: absolute; bottom: 0; padding: 4px 16px; border-radius: 999px; background: rgba(255, 250, 240, .95); border: 2px solid #f39a4f; font-size: 13px; font-weight: 800; } .pk-kg b { font-size: 20px; color: #d9701e; }
.members { display: flex; flex-direction: column; gap: 6px; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(255, 250, 240, .93); border: 1.5px solid #ecd2a8; }
.mrow.you { border-color: #f2b84b; background: #fff8dc; }
.mav { position: relative; } .mav img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: #fbe4c3; }
.online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #5fd35f; border: 2px solid #fff; } .online.off { background: #bbb; }
.mmid { flex: 1; font-size: 13px; } .mmid small { display: block; font-size: 10.5px; color: #a07a5a; }
.mpts { font: 900 13px var(--ui); color: #3c7fbd; }
.chat-box { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 14px; background: rgba(255, 250, 240, .9); border: 1.5px solid #ecd2a8; }
.cmsg { font-size: 12px; } .cmsg b { color: #3c7fbd; margin-right: 4px; } .cmsg.me b { color: #e46b93; }
.chat-input { display: flex; gap: 6px; margin-top: 6px; }
.chat-input input { flex: 1; padding: 8px 12px; border-radius: 999px; border: 2px solid var(--gold); font: 700 13px var(--ui); outline: none; }

/* ---------- diary ---------- */
.index-head { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 14px; background: rgba(255, 250, 240, .93); border: 2px solid var(--gold); font-size: 13px; font-weight: 800; }
.index-head img { width: 30px; } .index-head b { color: #e46b93; }
.rfilter { display: flex; gap: 6px; justify-content: center; margin: 8px 0; padding: 5px; border-radius: 999px; background: rgba(255, 250, 240, .8); }
.rfilter button { width: 42px; height: 30px; border-radius: 999px; background: var(--rc); color: #fff; font: 900 11px var(--ui); border: 2px solid #fff; opacity: .7; }
.rfilter button.on { opacity: 1; box-shadow: 0 0 0 2px var(--rc), 0 2px 6px rgba(0, 0, 0, .2); transform: scale(1.08); }
.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.index-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(var(--rg), #fff 70%); border: 2.5px solid var(--rc); box-shadow: inset 0 0 0 2px #fff, var(--shadow); }
.index-card .rtag { position: absolute; left: 5px; top: 5px; background: var(--rc); }
.ix-img { height: 100px; display: grid; place-items: center; } .ix-img img { max-height: 96px; max-width: 96px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(60, 35, 20, .2)); }
.index-card span { width: 100%; padding: 3px 2px; border-radius: 8px; background: color-mix(in srgb, var(--rc) 75%, #fff); color: #fff; font: 800 10.5px var(--ui); text-align: center; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.index-card small { font-size: 9px; color: #a07a5a; margin-top: 2px; }
.index-card.unknown .ix-img img { filter: brightness(0) opacity(.18); }
.index-card.unknown { background: linear-gradient(#efe6da, #fff 70%); }
.index-card.r-SSR::after, .index-card.r-SR::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shineSweep 3.4s ease-in-out infinite; pointer-events: none; }
.index-card.unknown::after { display: none; }
.flower-detail .modal-body { text-align: center; }
.fd-art { position: relative; height: 230px; margin: -10px -16px 0; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle, var(--rg), transparent 70%); }
.fd-art img { position: relative; height: 210px; filter: drop-shadow(0 4px 8px rgba(60, 35, 20, .3)); }
.fd-desc { font: italic 600 16px/1.35 var(--title); color: var(--brown-d); margin: 6px 0; }
.fd-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 11.5px; font-weight: 700; }
.fd-stats > span { padding: 4px 8px; border-radius: 999px; background: #fff; border: 1.5px solid #ecd2a8; }
.chapters { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.chapter { display: flex; align-items: center; gap: 10px; height: 92px; padding-right: 10px; border-radius: 16px; overflow: hidden; text-align: left; background: rgba(255, 250, 240, .95); border: 2px solid #ecd2a8; box-shadow: var(--shadow); }
.chapter img { width: 80px; height: 200px; object-fit: cover; object-position: top; margin-top: 110px; flex: none; }
.chapter b { display: block; font: 700 17px var(--title); color: var(--brown-d); } .chapter small { font-size: 11px; color: #a07a5a; }
.chapter.unread { border-color: #f2b84b; animation: glowPulse 1.6s infinite; } .chapter.unread small { color: #e46b93; font-weight: 900; }
.chapter.locked { opacity: .6; } .chapter.locked img { filter: grayscale(1) brightness(.6); }
.story-modal .modal { width: 356px; }
.story-art { height: 250px; margin: -10px -16px 0; overflow: hidden; display: flex; justify-content: center; background: radial-gradient(circle at 50% 40%, #fff, #f8dfc5); border-bottom: 2px solid #ecd2a8; }
.story-art img { height: 560px; margin-top: 10px; }
.story-text { font: 600 16px/1.5 var(--title); color: var(--brown-d); margin: 12px 4px 0; }
.profile-card { position: relative; display: flex; height: 330px; margin-top: 6px; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, #eaf2ff, #fbe7f0); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.pc-art { position: absolute; left: -10px; bottom: -6px; height: 330px; filter: drop-shadow(0 4px 8px rgba(60, 35, 20, .25)); }
.pc-info { position: relative; margin-left: auto; width: 190px; padding: 12px 10px; display: flex; flex-direction: column; gap: 5px; background: linear-gradient(90deg, transparent, rgba(255, 250, 240, .85) 18%); }
.pc-charm { align-self: flex-end; display: flex; align-items: center; gap: 3px; padding: 2px 10px 2px 4px; border-radius: 999px; background: #fff; border: 1.5px solid #f3c2d1; font: 900 11px var(--ui); color: #c56a86; } .pc-charm img { width: 20px; }
.pc-name { font: 700 24px var(--title); color: var(--brown-d); } .pc-shop { font-size: 12px; font-weight: 800; color: var(--brown); }
.pc-row { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .8); font-size: 11.5px; } .pc-row span { color: #a07a5a; }
.pc-titles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pc-titles i { font: 900 9.5px var(--ui); font-style: normal; color: #fff; padding: 3px 8px; border-radius: 999px; background: linear-gradient(90deg, #e46b93, #f39a4f); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.stat-grid div { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 14px; background: rgba(255, 250, 240, .93); border: 1.5px solid #ecd2a8; }
.stat-grid b { font: 900 18px var(--ui); color: #e46b93; } .stat-grid small { font-size: 10px; color: #a07a5a; }

/* ---------- onboarding ---------- */
#onboard { position: absolute; inset: 0; z-index: 200; transition: opacity .7s; }
#onboard.out { opacity: 0; pointer-events: none; }
#onboard > div { position: absolute; inset: 0; background: center/cover no-repeat; overflow: hidden; animation: obIn .6s ease-out; }
@keyframes obIn { from { opacity: 0; } }
.ob-title { cursor: pointer; }
.ob-sunrays { position: absolute; left: 50%; top: 22%; width: 900px; height: 900px; margin: -450px; background: repeating-conic-gradient(rgba(255, 240, 200, .28) 0 6deg, transparent 6deg 16deg); mask: radial-gradient(circle, #000 10%, transparent 60%); animation: spin 60s linear infinite; }
.ob-title .logo { position: absolute; left: 50%; top: 110px; width: 350px; margin-left: -175px; animation: float 4s ease-in-out infinite, logoIn 1.2s cubic-bezier(.2, 1, .3, 1.2); filter: drop-shadow(0 4px 12px rgba(120, 50, 60, .35)) drop-shadow(0 0 20px rgba(255, 255, 255, .6)); }
@keyframes logoIn { from { opacity: 0; transform: scale(.6); } }
.ob-sub { position: absolute; top: 330px; left: 0; right: 0; text-align: center; font: italic 700 20px var(--title); color: #fff; text-shadow: 0 2px 6px rgba(120, 50, 60, .7); }
.tap-start { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); padding: 10px 30px; border-radius: 999px; background: rgba(255, 250, 240, .9); border: 2.5px solid var(--gold); font: 700 20px var(--title); color: var(--brown-d); animation: pulse 1.6s ease-in-out infinite; box-shadow: var(--shadow); white-space: nowrap; }
.ob-ver { position: absolute; bottom: calc(var(--sab) + 10px); left: 0; right: 0; text-align: center; font-size: 11px; color: #fff; text-shadow: 0 1px 3px #000; opacity: .85; }
.ob-dim { position: absolute; inset: 0; background: linear-gradient(rgba(40, 20, 30, .15), rgba(40, 20, 30, .55)); }
.ob-dim.light { background: rgba(255, 245, 235, .35); backdrop-filter: blur(2px); }
.ob-char { position: absolute; left: 50%; bottom: 170px; height: 580px; transform: translateX(-50%); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); animation: charIn .8s cubic-bezier(.2, .9, .3, 1); }
@keyframes charIn { from { opacity: 0; transform: translateX(-40%); } }
.ob-char.breathe { animation: charIn .8s cubic-bezier(.2, .9, .3, 1), dollBreathe 3.6s ease-in-out .8s infinite; }
.ob-char.small { height: 420px; bottom: 250px; }
.ob-box { position: absolute; left: 14px; right: 14px; bottom: calc(var(--sab) + 20px); padding: 16px 18px 26px; border-radius: 22px; background: rgba(255, 250, 240, .96); border: 3px solid var(--gold); box-shadow: 0 0 0 4px #fff6e3, var(--shadow); }
.ob-box p { margin: 0; min-height: 96px; font: 600 18px/1.45 var(--title); color: var(--brown-d); }
.ob-next { position: absolute; right: 18px; bottom: 8px; color: var(--rose-d); animation: float 1s ease-in-out infinite; }
.ob-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 5px; justify-content: center; } .ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: #e2cfb2; } .ob-dots i.on { background: var(--rose-d); width: 16px; border-radius: 3px; }
.ob-skip { position: absolute; top: calc(var(--sat) + 16px); right: 16px; padding: 5px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); color: #fff; font-weight: 800; font-size: 12px; }
.ob-box.name { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-bottom: 14px; } .ob-box.name b { font: 700 22px var(--title); color: var(--brown-d); }
.ob-head { position: absolute; top: calc(var(--sat) + 16px); left: 16px; right: 16px; text-align: center; padding: 10px 14px; border-radius: 18px; background: rgba(255, 250, 240, .93); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.ob-head > b { display: block; font: 700 24px var(--title); color: var(--brown-d); } .ob-head small { font-size: 11.5px; color: var(--brown); }
.land-list { position: absolute; top: calc(var(--sat) + 152px); left: 14px; right: 14px; bottom: calc(var(--sab) + 10px); display: flex; flex-direction: column; gap: 10px; }
.land-card { position: relative; flex: 1; border-radius: 20px; overflow: hidden; background: center/cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--tint), var(--shadow); text-align: left; transition: transform .15s; animation: popIn .5s backwards; }
.land-card:nth-child(2) { animation-delay: .08s; } .land-card:nth-child(3) { animation-delay: .16s; } .land-card:nth-child(4) { animation-delay: .24s; }
.land-card:active { transform: scale(.97); }
.land-card.on { box-shadow: 0 0 0 4px var(--tint), 0 0 20px var(--tint); }
.lc-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 250, 240, .95) 30%, rgba(255, 250, 240, .2)); }
.lc-text { position: absolute; left: 14px; top: 12px; width: 190px; } .lc-text b { display: block; font: 700 21px var(--title); color: var(--brown-d); } .lc-text small { font-size: 11px; color: var(--brown); line-height: 1.3; display: block; }
.lc-flowers { position: absolute; right: 8px; bottom: 6px; display: flex; } .lc-flowers img { height: 70px; margin-left: -18px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); animation: sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
.lc-flowers img:nth-child(2) { animation-delay: -1s; height: 80px; } .lc-flowers img:nth-child(3) { animation-delay: -2s; }

/* ---------- POC console ---------- */
#console { position: relative; width: 340px; max-height: calc(100vh - 30px); overflow-y: auto; flex: none; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
@media (max-width: 1000px) { #console { display: none; } }
.cs-brand { display: flex; flex-direction: column; align-items: center; gap: 0; }
.cs-brand img { width: 230px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .4)); }
.cs-brand span { margin-top: -6px; font: 800 11px var(--ui); color: #fff; letter-spacing: 1.5px; text-transform: uppercase; opacity: .8; }
.cs-card { padding: 12px 14px; border-radius: 18px; background: rgba(255, 250, 242, .94); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.cs-card h3 { margin: 0 0 8px; font: 700 18px var(--title); color: var(--brown-d); display: flex; align-items: baseline; gap: 6px; }
.cs-card h3 small { font: 700 10.5px var(--ui); color: #a48a73; }
.cs-big { font: 900 38px var(--ui); color: #3f9a32; letter-spacing: -1px; }
.cs-big.bump { animation: bump .5s; }
.cs-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.cs-kpis div { display: flex; flex-direction: column; align-items: center; padding: 4px; border-radius: 10px; background: #f6ead8; }
.cs-kpis b { font-size: 16px; color: var(--brown-d); } .cs-kpis small { font-size: 9px; color: #a48a73; text-align: center; line-height: 1.1; }
.cs-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-btns button { padding: 7px 12px; border-radius: 10px; background: #f3e3c9; color: var(--brown-d); font: 800 12px var(--ui); border: 1.5px solid #e2c99f; }
.cs-btns button.on { background: linear-gradient(#ffe48f, #f2b84b); border-color: #c48a2c; }
.cs-btns button.danger { background: #ffe1df; border-color: #f0b3b3; color: #9b3b3b; }
.cs-log { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.lg { padding: 4px 8px; border-radius: 8px; background: #f8efe1; border-left: 3px solid #d9c3a0; line-height: 1.3; }
.lg time { display: block; font-size: 9.5px; color: #a48a73; font-family: ui-monospace, monospace; }
.lg-iap { border-left-color: #3f9a32; background: #eaf7e4; font-weight: 800; } .lg-iap-cancel { border-left-color: #e0563f; background: #fff0ee; }
.lg-ad { border-left-color: #4c9be0; } .lg-gems { border-left-color: #e46b93; } .lg-level { border-left-color: #f2b84b; }
.pillars ul { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.45; } .pillars li { margin-bottom: 5px; }

/* =====================================================================
   v2 — town, walkers, villagers, dialogue, photo mode, farm, doll stage
   ===================================================================== */

/* ---------- blinking sprites ---------- */
.blinky { position: relative; display: inline-block; line-height: 0; }
.blinky img { display: block; height: 100%; }
.blinky .b-shut { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .13s ease-in; }
.blinky.blinking .b-shut { opacity: 1; transition: opacity .09s ease-out; }
.living-canvas { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); opacity: 0; transition: opacity .35s; pointer-events: none; }
.living-canvas.ready { opacity: 1; }

/* ---------- town ---------- */
#village { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background: #cfe3b0; transition: filter .4s; }
#village.land-grove { background: #2b2a52; }
#village:active { cursor: grabbing; }
#map { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map-img, .map-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.map-gl { opacity: 0; transition: opacity .6s; } .map-gl.ready { opacity: 1; }
.map-haze { position: absolute; left: 0; right: 0; top: 0; height: 17%; pointer-events: none; background: linear-gradient(rgba(255, 246, 236, .55), rgba(255, 240, 230, .18) 60%, transparent); animation: haze 9s ease-in-out infinite; }
.land-grove .map-haze { background: linear-gradient(rgba(150, 140, 230, .35), transparent); }
@keyframes haze { 0%, 100% { opacity: .9; } 50% { opacity: .55; } }
.map-clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 9000; }
.map-clouds i { position: absolute; width: 520px; height: 300px; border-radius: 50%; background: radial-gradient(rgba(40, 60, 30, .12), transparent 70%); animation: cloudDrift 60s linear infinite; }
.map-clouds i:nth-child(2) { top: 50%; animation-delay: -30s; animation-duration: 75s; }
.land-grove .map-clouds i { background: radial-gradient(rgba(10, 10, 40, .18), transparent 70%); }
@keyframes cloudDrift { from { transform: translateX(-600px); } to { transform: translateX(1200px); } }
.map-layer { position: absolute; inset: 0; }
#spots, #ents { pointer-events: none; }
.spot { position: absolute; pointer-events: auto; border-radius: 30px; }
.spot .plate { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); white-space: nowrap; display: flex; align-items: center; animation: float 4s ease-in-out infinite; transition: opacity .3s; }
.spot .plate span { padding: 3px 10px 4px; border-radius: 9px; font: 800 11px var(--ui); color: #fff; background: rgba(70, 45, 30, .5); border: 1px solid rgba(255, 230, 190, .55); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.spot .badge { right: -9px; top: -8px; }
#village.zoomed .spot .plate { opacity: 0; }
#village.photo .spot .plate, #village.photo .v-name, #village.photo .v-req, #village.photo .act-chip, #village.photo .wild-tool { display: none !important; }
.badge { position: absolute; display: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: linear-gradient(#ff8a7a, #e0453a); color: #fff; font: 900 10.5px/16px var(--ui); text-align: center; border: 1.5px solid #fff; font-style: normal; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.badge.on { display: block; } .badge.pop { animation: popIn .4s; }

/* walkers (hero + villagers) */
.walker { position: absolute; width: 0; height: 0; pointer-events: none; }
.walker .w-body { position: absolute; left: 0; bottom: 0; height: 96px; transform: translateX(-50%); transform-origin: 50% 100%; animation: idleSway 3.8s ease-in-out infinite; }
.walker .w-img { height: 100%; filter: drop-shadow(0 0 1px rgba(255, 252, 240, .95)) drop-shadow(0 0 1.5px rgba(255, 248, 230, .8)) drop-shadow(0 2px 2px rgba(60, 35, 20, .4)); }
.walker.flip .w-img { transform: scaleX(-1); }
.w-shadow { position: absolute; left: -24px; top: -7px; width: 48px; height: 13px; border-radius: 50%; background: radial-gradient(rgba(40, 25, 15, .38), transparent 70%); }
@keyframes idleSway { 0%, 100% { transform: translateX(-50%) rotate(-.6deg) scaleY(1); } 50% { transform: translateX(-50%) rotate(.6deg) scaleY(1.012); } }
.walker.walking .w-body { animation: walkBob .5s ease-in-out infinite; }
.walker.running .w-body { animation: walkBob .3s ease-in-out infinite; }
@keyframes walkBob { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-2.2deg) scaleY(.985); } 25% { transform: translateX(-50%) translateY(-5px) rotate(0) scaleY(1.015); } 50% { transform: translateX(-50%) translateY(0) rotate(2.2deg) scaleY(.985); } 75% { transform: translateX(-50%) translateY(-5px) rotate(0) scaleY(1.015); } }
.walker.walking .w-shadow { animation: shadowPulse .25s ease-in-out infinite alternate; }
@keyframes shadowPulse { to { transform: scaleX(.82); opacity: .75; } }
#hero .w-body { height: 112px; }
#hero { z-index: 1; }
.hero-pet { position: absolute; left: -46px; top: -34px; height: 32px; animation: hop 2s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(60, 35, 20, .35)); transition: left .3s; }
#hero.flip .hero-pet { left: 14px; }
#hero.walking .hero-pet { animation: hop .4s ease-in-out infinite; }
#hero.snip .w-body { animation: snipDip .5s ease-in-out; }
@keyframes snipDip { 40% { transform: translateX(-50%) translateY(3px) scaleY(.94) rotate(-4deg); } }
#hero.pose-wave .w-body { animation: poseWave 1.2s ease-in-out; }
@keyframes poseWave { 20%, 60% { transform: translateX(-50%) rotate(-6deg); } 40%, 80% { transform: translateX(-50%) rotate(6deg); } }
#hero.pose-hop .w-body { animation: poseHop 1.2s ease-out; }
@keyframes poseHop { 20% { transform: translateX(-50%) translateY(-26px) scaleY(1.04); } 40% { transform: translateX(-50%) translateY(0) scaleY(.92); } 55% { transform: translateX(-50%) translateY(-10px); } 70% { transform: translateX(-50%) translateY(0); } }
#hero.pose-twirl .w-body { animation: poseTwirl 1.2s ease-in-out; }
@keyframes poseTwirl { 0% { transform: translateX(-50%) scaleX(1); } 25% { transform: translateX(-50%) scaleX(-1) translateY(-6px); } 50% { transform: translateX(-50%) scaleX(1); } 75% { transform: translateX(-50%) scaleX(-1) translateY(-6px); } 100% { transform: translateX(-50%) scaleX(1); } }
.dust { position: absolute; width: 14px; height: 7px; margin: -4px -7px; border-radius: 50%; background: rgba(240, 225, 200, .75); animation: dust .65s ease-out forwards; pointer-events: none; }
.land-grove .dust { background: rgba(190, 200, 255, .6); box-shadow: 0 0 6px rgba(190, 200, 255, .8); }
@keyframes dust { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.8) translateY(-4px); opacity: 0; } }
.walk-marker { position: absolute; width: 34px; height: 16px; margin: -8px -17px; border: 2.5px solid rgba(255, 255, 255, .95); border-radius: 50%; animation: marker .7s ease-out forwards; pointer-events: none; }
@keyframes marker { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* villagers */
.villager { pointer-events: none; transition: opacity .5s; }
.villager .w-body { height: 100px; pointer-events: auto; cursor: pointer; width: 50px; display: flex; justify-content: center; }
.villager.gone { opacity: 0; }
.villager.gone .w-body { pointer-events: none; }
.v-name { position: absolute; left: 0; top: 4px; transform: translateX(-50%); white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: rgba(60, 38, 25, .5); color: #fff; font: 800 9px var(--ui); opacity: 0; transition: opacity .3s; }
#village.zoomed .v-name { opacity: 1; }
.v-emote { position: absolute; left: 0; top: -128px; transform: translateX(-50%) scale(0); min-width: 30px; height: 30px; padding: 0 6px; border-radius: 16px; background: #fff; border: 2px solid #f0d6b0; display: grid; place-items: center; font-size: 15px; color: #e46b93; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.v-emote::after { content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; border-bottom: 0; }
.v-emote.show { animation: emote 2.2s ease-out forwards; }
@keyframes emote { 0% { transform: translateX(-50%) scale(0); } 12% { transform: translateX(-50%) scale(1.15); } 20%, 80% { transform: translateX(-50%) scale(1) translateY(0); } 100% { transform: translateX(-50%) scale(.6) translateY(-8px); opacity: 0; } }
.v-req { position: absolute; left: 0; top: -124px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: linear-gradient(#ffe48f, #f0a93c); color: #6b3f12; font: 900 15px var(--ui); border: 2px solid #fff; box-shadow: var(--shadow); animation: float 1.6s ease-in-out infinite; }
.villager.has-req .v-req { display: grid; }

/* wild blooms */
.wild { position: absolute; width: 0; height: 0; cursor: pointer; }
.wild > img { position: absolute; left: -22px; bottom: 0; height: 48px; animation: sway 2.4s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .9)); pointer-events: auto; }
.wild-halo { position: absolute; left: -32px; top: -14px; width: 64px; height: 28px; border-radius: 50%; background: radial-gradient(rgba(255, 250, 200, .9), transparent 70%); animation: pulse 1.6s ease-in-out infinite; }
.wild.glow .wild-halo { background: radial-gradient(rgba(200, 160, 255, .95), transparent 70%); width: 80px; left: -40px; }
.wild.glow > img { filter: drop-shadow(0 0 8px #d2b6ff) drop-shadow(0 0 3px #fff); }
.wild-tool { position: absolute; left: 8px; top: -60px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); display: grid; place-items: center; animation: float 2s ease-in-out infinite; }
.wild-tool img { height: 15px; }
.wild.picked { animation: picked .4s forwards; }
@keyframes picked { to { transform: translateY(-30px) scale(1.4); opacity: 0; } }

/* proximity action chip + hints */
.act-chip { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; padding: 7px 14px 8px; border-radius: 999px; font: 900 12px var(--ui); color: #6b3f12; background: linear-gradient(#fff6d6, #ffd98a); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(80, 45, 15, .35), 0 0 0 2px rgba(227, 176, 98, .6); z-index: 9500; pointer-events: auto; animation: chipIn .3s cubic-bezier(.3, 1.6, .5, 1), float 2.2s ease-in-out .3s infinite; }
.act-chip::after { content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #ffd98a; border-bottom: 0; }
@keyframes chipIn { from { transform: translate(-50%, -80%) scale(.5); opacity: 0; } }
.tap-hint { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(60, 38, 25, .8); color: #fff; font: 800 10.5px var(--ui); animation: toastIn .3s, fadeOut .4s 1.4s forwards; }
@keyframes fadeOut { to { opacity: 0; } }

/* ambient: fireflies & light motes */
.firefly, .mote { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; animation: drift var(--dur) ease-in-out var(--delay) infinite; transform: scale(var(--s)); }
.firefly { background: #f5ffb0; box-shadow: 0 0 8px 3px rgba(220, 255, 150, .7); }
.mote { background: #fffbe6; box-shadow: 0 0 8px 2px rgba(255, 245, 200, .65); opacity: .8; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(var(--s)); opacity: 0; } 20% { opacity: 1; } 50% { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: .9; } 80% { opacity: .2; } }
.photo-tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; box-shadow: inset 0 0 120px rgba(40, 20, 10, .35); }
#village.photo .photo-tint { opacity: 1; }

/* ---------- HUD (decluttered) ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; transition: opacity .3s; }
#hud.hidden, #hud.talking { opacity: 0; }
#hud.hidden *, #hud.talking * { pointer-events: none !important; }
#hud button, #hud .pill { pointer-events: auto; }
.hud-top { position: absolute; top: calc(var(--sat) + 8px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.profile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid #fff3d6; box-shadow: 0 0 0 2px var(--gold), var(--shadow); background: #fbe4c3; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .lvl { position: absolute; right: -6px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: linear-gradient(#ffe48f, #e8a43b); border: 2px solid #fff; font: 900 10.5px/16px var(--ui); color: #6b3f12; text-align: center; }
.xpmini { width: 40px; height: 5px; border-radius: 3px; background: rgba(60, 38, 25, .45); overflow: hidden; }
.xpmini i { display: block; height: 100%; background: linear-gradient(90deg, #ffe48f, #f0a93c); transition: width .6s; }
.wallet { display: flex; gap: 12px; padding-right: 2px; }
.ticker { position: absolute; top: calc(var(--sat) + 64px); left: 50%; transform: translateX(-50%); max-width: 250px; padding: 4px 12px; border-radius: 999px; background: rgba(50, 32, 22, .55); backdrop-filter: blur(4px); color: #fff; font: 700 10.5px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none !important; }
.ticker.show { animation: tickerShow 7s ease-in-out forwards; }
.ticker b { color: #ffd66b; } .ticker b.g { color: #9fe39f; }
@keyframes tickerShow { 0% { opacity: 0; transform: translateX(-50%) translateY(-6px); } 8%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; } }
.side { position: absolute; top: calc(var(--sat) + 96px); display: flex; flex-direction: column; gap: 10px; }
.side.left { left: 10px; } .side.right { right: 10px; }
.evt { position: relative; width: 50px; display: flex; flex-direction: column; align-items: center; }
.evt-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .95), rgba(251, 224, 189, .92)); border: 2px solid #fff3d6; box-shadow: 0 0 0 1.5px rgba(227, 176, 98, .9), 0 3px 8px rgba(60, 35, 20, .3); transition: transform .12s; }
.evt:active .evt-ico { transform: scale(.9); }
.evt-ico img { max-width: 36px; max-height: 36px; object-fit: contain; }
.evt > span { margin-top: 2px; font: 900 9.5px var(--ui); color: #fff; text-shadow: 0 0 3px #5b3a26, 0 1px 2px #5b3a26; white-space: nowrap; }
.evt em { margin-top: -6px; font: 900 8.5px var(--ui); font-style: normal; color: #fff; background: #e0563f; padding: 1px 5px; border-radius: 6px; border: 1.5px solid #fff; position: relative; }
.evt .dot { position: absolute; top: 0; right: 2px; display: none; width: 11px; height: 11px; border-radius: 50%; background: #ff4f5e; border: 2px solid #fff; font-size: 0; }
.evt .dot.on { display: block; animation: pulse 1.2s infinite; }
.evt.starter .evt-ico { animation: glowPulse 2s infinite; }
.evt.gift .evt-ico { animation: giftWiggle 3s ease-in-out infinite; }
@keyframes giftWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-10deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-5deg); } }
.zoom-btns { position: absolute; right: 12px; bottom: calc(var(--sab) + 130px); display: flex; flex-direction: column; gap: 6px; }
.zoom-btns button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 250, 240, .88); border: 1.5px solid #ecc98a; color: var(--brown-d); font: 900 17px/1 var(--ui); box-shadow: var(--shadow); }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.quest { margin-left: 12px; max-width: 250px; display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(255, 250, 240, .93); border: 1.5px solid #ecc98a; box-shadow: var(--shadow); position: relative; }
.quest img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.quest span { font: 800 11.5px/1.2 var(--ui); color: var(--brown-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quest b { flex: none; font: 900 11px var(--ui); color: #d36a2c; }
.quest.ready { animation: glowPulse 1.4s infinite; background: linear-gradient(#fffbe0, #ffe8a8); } .quest.ready b { color: #4f9a39; }
.quest.tut::after { content: '👆'; position: absolute; right: -30px; top: 2px; font-size: 24px; animation: tutHand 1s ease-in-out infinite; }
@keyframes tutHand { 0%, 100% { transform: translate(0, 0) rotate(-20deg); } 50% { transform: translate(-6px, -4px) rotate(-20deg); } }
.navbar { align-self: stretch; display: flex; justify-content: space-around; padding: 6px 8px calc(var(--sab) + 4px); background: linear-gradient(rgba(255, 249, 236, .96), rgba(244, 223, 189, .97)); border-top: 2px solid var(--gold); border-radius: 22px 22px 0 0; box-shadow: 0 -4px 14px rgba(60, 35, 20, .2); }
.navbar button { position: relative; width: 64px; display: flex; flex-direction: column; align-items: center; transition: transform .12s; }
.navbar button:active { transform: scale(.88); }
.navbar img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(60, 35, 20, .3)); }
.navbar span { font: 900 10px var(--ui); color: var(--brown-d); margin-top: 1px; }
.navbar .badge { right: 8px; top: -4px; }

/* ---------- dialogue (Animal Crossing style) ---------- */
#dialog { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 14px); z-index: 60; transform: translateY(30px); opacity: 0; transition: .3s cubic-bezier(.2, .9, .3, 1.2); }
#dialog.in { transform: none; opacity: 1; }
.dl-name { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-left: 18px; margin-bottom: -12px; padding: 5px 16px 6px; border-radius: 14px; background: var(--nc); color: #fff; font: 700 18px var(--title); transform: rotate(-3deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.dl-hearts { display: flex; gap: 1px; font-size: 11px; } .dl-hearts i { font-style: normal; color: rgba(255, 255, 255, .4); } .dl-hearts i.on { color: #fff; text-shadow: 0 0 4px #ffb3c7; }
.dl-box { position: relative; min-height: 104px; padding: 22px 20px 18px; border-radius: 36px 36px 30px 30px / 40px 40px 30px 30px; background: #fffaf0; box-shadow: 0 6px 20px rgba(60, 35, 20, .35), inset 0 0 0 3px #f4e2c4; cursor: pointer; }
.dl-box p { margin: 0; font: 700 15px/1.5 var(--ui); color: #5a3d2b; }
.dl-next { position: absolute; right: 24px; bottom: 10px; color: #f0a93c; font-style: normal; animation: float 1s ease-in-out infinite; }
.dl-opts { position: absolute; right: 6px; bottom: calc(100% + 6px); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dl-opts button { padding: 8px 16px; border-radius: 999px; background: #fffaf0; border: 2px solid #f0d6b0; font: 800 13px var(--ui); color: var(--brown-d); box-shadow: var(--shadow); animation: optIn .3s backwards; }
.dl-opts button:nth-child(2) { animation-delay: .05s; } .dl-opts button:nth-child(3) { animation-delay: .1s; } .dl-opts button:nth-child(4) { animation-delay: .15s; }
.dl-opts button:hover { background: #fff1c7; border-color: var(--gold); }
@keyframes optIn { from { opacity: 0; transform: translateX(20px); } }

/* ---------- photo mode ---------- */
#photo-ui { position: absolute; inset: 0; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .3s; }
#photo-ui.in { opacity: 1; }
#photo-ui button, #photo-ui input { pointer-events: auto; }
#photo-ui::before { content: ''; position: absolute; inset: calc(var(--sat) + 20px) 18px calc(var(--sab) + 190px); border: 2px solid rgba(255, 255, 255, .55); border-radius: 18px; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) 33.3% 0 / 1px 100% no-repeat, linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) 66.6% 0 / 1px 100% no-repeat, linear-gradient(90deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) 0 33.3% / 100% 1px no-repeat, linear-gradient(90deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .25)) 0 66.6% / 100% 1px no-repeat; }
.ph-top { position: absolute; top: calc(var(--sat) + 12px); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; }
.ph-top span { padding: 4px 12px; border-radius: 999px; background: rgba(40, 25, 15, .55); color: #fff; font: 800 12px var(--ui); }
.ph-x { width: 34px; height: 34px; border-radius: 50%; background: rgba(40, 25, 15, .55); color: #fff; font: 900 14px var(--ui); }
.ph-zoom { position: absolute; right: 8px; top: 50%; transform: translateY(-60%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ph-zoom button { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 250, 240, .9); font: 900 16px var(--ui); color: var(--brown-d); }
.ph-zoom input { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 150px; accent-color: #e46b93; }
.ph-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(var(--sab) + 10px); background: linear-gradient(transparent, rgba(30, 18, 10, .55) 30%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ph-row { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.ph-row.poses button { width: 56px; padding: 4px 0; border-radius: 14px; background: rgba(255, 250, 240, .92); display: flex; flex-direction: column; align-items: center; }
.ph-row.poses b { font-size: 18px; } .ph-row.poses span { font: 800 9.5px var(--ui); color: var(--brown-d); }
.ph-row.filters button { padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #fff; font: 800 11px var(--ui); border: 1.5px solid rgba(255, 255, 255, .5); white-space: nowrap; }
.ph-row.filters button.on { background: #fff; color: #c9607a; }
.shutter { width: 64px; height: 64px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; }
.shutter i { width: 50px; height: 50px; border-radius: 50%; background: #fff; transition: transform .1s; } .shutter:active i { transform: scale(.85); }
.photo-flash { position: absolute; inset: 0; background: #fff; animation: flash .6s ease-out forwards; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.photo-modal .modal-body { padding-top: 26px; }
.polaroid { width: 100%; border-radius: 4px; box-shadow: 0 6px 18px rgba(60, 35, 20, .35); transform: rotate(-1.5deg); animation: polaroidIn .6s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes polaroidIn { from { transform: rotate(-12deg) scale(.6) translateY(60px); opacity: 0; } }
.photo-modal .modal-btns .btn { padding: 10px 8px; }

/* ---------- farm ---------- */
.view-garden .view-body { top: 0; padding: 0; overflow: hidden; }
.view-garden .view-bg { display: none; }
.farm-vp { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background: #a8c98a; }
.farm-vp.land-grove { background: #3a3970; } .farm-vp.land-dunes { background: #e6b37a; } .farm-vp.land-lakeside { background: #9cc5b0; }
.farm-field { position: absolute; left: 0; top: 0; transform-origin: 0 0; background-size: cover; will-change: transform; }
.farm-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 48%, rgba(255, 252, 235, .2), transparent 55%); animation: pulse 7s ease-in-out infinite; pointer-events: none; }
.land-grove .farm-glow { background: radial-gradient(circle at 50% 48%, rgba(180, 200, 255, .25), transparent 55%); }
.farm-amb { position: absolute; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.farm-amb .mist { position: absolute; left: -30%; top: 20%; width: 160%; height: 30%; background: radial-gradient(ellipse, rgba(255, 255, 255, .35), transparent 65%); animation: mist 26s linear infinite; }
.farm-amb .mist.m2 { top: 60%; animation-duration: 34s; animation-delay: -12s; }
@keyframes mist { from { transform: translateX(-20%); } to { transform: translateX(20%); } }
.farm-rays { position: absolute; inset: 0; pointer-events: none; overflow: hidden; mix-blend-mode: soft-light; opacity: .7; }
.farm-rays i { position: absolute; top: -20%; left: 10%; width: 90px; height: 140%; background: linear-gradient(rgba(255, 250, 220, .9), transparent 80%); transform: rotate(24deg); filter: blur(10px); animation: ray 9s ease-in-out infinite; }
.farm-rays i:nth-child(2) { left: 45%; width: 60px; animation-delay: -3s; } .farm-rays i:nth-child(3) { left: 75%; width: 110px; animation-delay: -6s; }
@keyframes ray { 0%, 100% { opacity: .2; } 50% { opacity: .75; } }
.land-grove .farm-rays { mix-blend-mode: screen; } .land-grove .farm-rays i { background: linear-gradient(rgba(170, 190, 255, .35), transparent 80%); }
.farm-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(255, 236, 225, .35), inset 0 90px 70px -60px rgba(255, 245, 235, .35); }
.land-grove .farm-vignette { box-shadow: inset 0 0 100px rgba(20, 15, 60, .55); }
.farm-chip { position: absolute; top: calc(var(--sat) + 56px); left: 12px; display: flex; flex-direction: column; padding: 5px 12px; border-radius: 14px; background: rgba(255, 250, 240, .85); backdrop-filter: blur(4px); border: 1.5px solid var(--tint); box-shadow: var(--shadow); pointer-events: none; }
.farm-chip b { font: 700 15px var(--title); color: var(--brown-d); } .farm-chip span { font-size: 10px; color: var(--brown); }
.farm-bar { position: absolute; left: 10px; right: 10px; bottom: calc(var(--sab) + 6px); display: flex; justify-content: space-around; padding: 6px 4px; border-radius: 22px; background: rgba(255, 250, 240, .92); backdrop-filter: blur(6px); border: 1.5px solid #ecc98a; box-shadow: 0 6px 18px rgba(60, 35, 20, .25); }
.farm-bar button { position: relative; display: flex; flex-direction: column; align-items: center; width: 64px; transition: transform .12s; }
.farm-bar button:active { transform: scale(.88); }
.farm-bar img { width: 32px; height: 32px; object-fit: contain; }
.farm-bar span { font: 900 10px var(--ui); color: var(--brown-d); }
.farm-bar .badge { right: 8px; top: -6px; }
.plot { position: absolute; width: 120px; height: 86px; transform: translate(-50%, -50%); pointer-events: none; }
.plot-hit { position: absolute; inset: 0; clip-path: polygon(50% 2%, 100% 47%, 50% 96%, 0 47%); pointer-events: auto; cursor: pointer; }
.plot[data-state="ready"] .plant img { pointer-events: auto; cursor: pointer; }
.plot-soil { position: absolute; left: 0; top: 0; width: 120px; filter: drop-shadow(0 4px 4px rgba(60, 35, 20, .3)); }
.plot[data-state="locked"] .plot-soil { filter: grayscale(.8) brightness(1.15) opacity(.38); }
.plot .plant { position: absolute; left: 50%; bottom: 46%; width: 0; transform: scale(var(--grow, 1)); transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.plot .plant img { position: absolute; bottom: 0; left: 0; transform: translateX(-50%); display: none; animation: swayTx 3.4s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 3px 3px rgba(60, 35, 20, .3)); }
@keyframes swayTx { 0%, 100% { transform: translateX(-50%) rotate(-2.5deg); } 50% { transform: translateX(-50%) rotate(2.5deg); } }
.plot[data-state="sprout"] .plant img { display: block; height: 44px; }
.plot[data-state="bud"] .plant img { display: block; height: 64px; }
.plot[data-state="ready"] .plant img { display: block; height: 92px; filter: drop-shadow(0 0 8px rgba(255, 240, 180, .95)) drop-shadow(0 3px 3px rgba(60, 35, 20, .3)); }
.plot[data-state="ready"] .plant { animation: readyBounce 1.6s ease-in-out infinite; }
@keyframes readyBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.plot.grow-pop .plant img, .plot.plant-pop .plot-soil { animation: popIn .5s; }
.plot-ui { position: absolute; left: 50%; top: 0; transform: translateX(-50%); pointer-events: none; }
.plant-hint { position: absolute; left: 50%; top: 26px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .8); border: 2px dashed #8a5a3b; color: #8a5a3b; font: 900 18px/1 var(--ui); animation: pulse 1.8s infinite; }
.ready-tag { position: absolute; left: 50%; top: -64px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#a9e57b, #57ad3e); color: #fff; font: 900 13px var(--ui); border: 2px solid #fff; box-shadow: var(--shadow); animation: float 1.2s ease-in-out infinite; }
.lock-tag { position: absolute; left: 50%; top: 26px; transform: translateX(-50%); white-space: nowrap; display: flex; align-items: center; gap: 2px; padding: 3px 9px; border-radius: 999px; background: rgba(70, 45, 30, .72); color: #fff; font: 800 10.5px var(--ui); }
.lock-tag img { width: 14px; }
.timer-pill { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 2px 7px 2px 2px; border-radius: 999px; background: rgba(255, 250, 240, .95); border: 1.5px solid var(--gold); box-shadow: var(--shadow); white-space: nowrap; }
.timer-pill svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.timer-pill circle { fill: none; stroke-width: 5; } .ring-bg { stroke: #f0dcc0; } .ring { stroke: #6cbf4c; stroke-dasharray: 94.2; transition: stroke-dashoffset .3s; }
.timer-pill b { font: 900 10px var(--ui); color: var(--brown-d); }
.water-btn { position: absolute; left: 30px; top: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 30%, #e6f6ff, #8cc9f5); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(40, 90, 140, .45); pointer-events: auto; animation: pulse 1.4s infinite; }
.water-btn img { width: 20px; } .water-btn.done { display: none; }
.deco-slot { position: absolute; width: 70px; height: 80px; transform: translate(-50%, -100%); display: grid; place-items: end center; cursor: pointer; }
.deco-slot img { max-width: 80px; max-height: 88px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(60, 35, 20, .35)); }
.deco-plus { width: 34px; height: 18px; margin-bottom: 2px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .85); color: #fff; display: grid; place-items: center; font-size: 11px; background: rgba(255, 255, 255, .18); }
.farm-hero .w-body { height: 104px; }
.farm-hero.act-water .w-body, .farm-hero.act-plant .w-body, .farm-hero.act-harvest .w-body { animation: workDip .6s ease-in-out 2; }
@keyframes workDip { 50% { transform: translateX(-50%) translateY(3px) rotate(-5deg) scaleY(.95); } }
.farm-pet { position: absolute; height: 40px; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 2px rgba(60, 35, 20, .35)); animation: hop 2.4s ease-in-out infinite; }

/* ---------- wardrobe doll stage ---------- */
.dressing { position: relative; height: 420px; flex: none; overflow: hidden; }
.wd-rays { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: soft-light; }
.wd-rays i { position: absolute; top: -30%; left: 20%; width: 80px; height: 160%; background: linear-gradient(rgba(255, 250, 230, .95), transparent 75%); transform: rotate(18deg); filter: blur(8px); animation: ray 8s ease-in-out infinite; }
.wd-rays i:nth-child(2) { left: 55%; width: 50px; animation-delay: -2.5s; } .wd-rays i:nth-child(3) { left: 80%; width: 100px; animation-delay: -5s; }
.wd-halo { position: absolute; left: 50%; top: 46%; width: 340px; height: 340px; margin: -170px; border-radius: 50%; background: radial-gradient(rgba(255, 248, 230, .7), rgba(255, 220, 235, .25) 45%, transparent 68%); animation: pulse 6s ease-in-out infinite; }
.spot-light { position: absolute; left: 50%; bottom: -40px; width: 300px; height: 130px; margin-left: -150px; border-radius: 50%; background: radial-gradient(rgba(255, 245, 220, .95), transparent 70%); }
.doll-host { position: absolute; left: 0; right: 0; bottom: 6px; height: 400px; cursor: pointer; }
.doll-host .living-canvas { filter: drop-shadow(0 6px 10px rgba(60, 35, 20, .3)); }
.doll-host.swap { animation: dollSwap .7s ease-out; }
@keyframes dollSwap { 0% { filter: brightness(1); } 25% { filter: brightness(2.4) blur(2px); transform: scale(.96); } 100% { filter: brightness(1); transform: scale(1); } }
.living-fallback { position: absolute; left: 50%; bottom: 0; height: 100%; transform: translateX(-50%); }
.swirl { position: absolute; left: 50%; bottom: 40px; width: 10px; height: 10px; margin-left: -5px; background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 4px #fff); animation: swirl 1.4s ease-out var(--d) forwards; opacity: 0; }
@keyframes swirl { 0% { opacity: 0; transform: rotate(var(--a)) translateX(110px) translateY(0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--a) + 200deg)) translateX(40px) translateY(-300px) scale(1.2); } }
.doll-pet { position: absolute; left: 68%; bottom: 14px; height: 70px; filter: drop-shadow(0 3px 4px rgba(60, 35, 20, .35)); }
.wd-amb { position: absolute; inset: 0; pointer-events: none; }
.look-info { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 16px; background: rgba(255, 250, 240, .82); backdrop-filter: blur(6px); border: 1.5px solid #ecd2a8; box-shadow: var(--shadow); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-main small, .li-glam small { font: 900 8.5px var(--ui); letter-spacing: .6px; color: #c9a27a; }
.li-main b { font: 700 15px/1.1 var(--title); color: var(--brown-d); }
.li-main span { font-size: 10.5px; color: #a07a5a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .li-main .ab { color: #3f7a2c; font-weight: 800; }
.li-glam { flex: none; text-align: right; display: flex; flex-direction: column; padding-left: 8px; border-left: 1px solid #ecd2a8; } .li-glam b { font: 700 12.5px var(--title); color: #c56a86; }
.li-btns { display: flex; gap: 4px; flex: none; } .li-btns .btn-ghost { padding: 7px 10px; }
.look-info.previewing { border-color: #f3a9c0; box-shadow: 0 0 0 3px rgba(236, 143, 168, .25), var(--shadow); } .look-info.previewing .li-main small { color: #e46b93; }

/* ---------- misc v2 polish ---------- */
.ob-char { position: absolute; left: 0; right: 0; bottom: 170px; height: 580px; transform: none; animation: obIn .8s ease-out; }
.ob-char.small { height: 420px; bottom: 250px; }
.ob-char .living-canvas { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.lc-text em { display: block; font: italic 700 12px var(--title); color: var(--rose-d); margin: -2px 0 2px; }
.customer .blinky.npc { height: 300px; } .customer .blinky.npc img { filter: drop-shadow(0 4px 6px rgba(60, 35, 20, .35)); }
.counter-hero .blinky { height: 330px; } .counter-hero .blinky img { filter: drop-shadow(0 0 6px rgba(60, 35, 20, .3)); }
.profile-card .blinky.pc-art { position: absolute; left: -10px; bottom: -6px; height: 330px; }
.story-art .blinky { height: 560px; margin-top: 10px; }

/* =====================================================================
   v3 — real phones (full-screen, safe areas), tester sheet, updates
   ===================================================================== */
#safe-probe { position: fixed; left: 0; top: 0; visibility: hidden; pointer-events: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
html, body { overscroll-behavior: none; }
body { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
body.phone { background: #f6ead8; position: fixed; inset: 0; }
body.phone::before { display: none; }
body.phone #stage { display: block; height: 100%; }
body.phone #console { display: none; }
body.phone #device-wrap { position: fixed; left: 0; top: 0; overflow: hidden; }
body.phone #device { width: 393px; height: auto; padding: 0; border-radius: 0; box-shadow: none; background: none; }
body.phone .side-btn, body.phone #statusbar, body.phone #homebar { display: none; }
body.phone #screen { border-radius: 0; }
#rotate { display: none; }
body.phone.landscape #rotate { position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #f6ead8 url(../img/bg/title.webp) center/cover; font: 700 22px var(--title); color: #5b3a26; text-align: center; }
body.phone.landscape #rotate::before { content: ''; position: absolute; inset: 0; background: rgba(255, 248, 236, .75); }
#rotate > * { position: relative; }
#rotate .rot-ico { font-size: 46px; animation: rot 2.4s ease-in-out infinite; }
@keyframes rot { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }

/* tester button + sheet (phones / narrow desktops) */
.tester-btn { position: absolute; left: 62px; top: calc(var(--sat) + 10px); height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(60, 38, 25, .45); color: #fff; font: 900 10.5px var(--ui); letter-spacing: .4px; backdrop-filter: blur(4px); display: none; pointer-events: auto; }
body.phone .tester-btn, body.narrow .tester-btn { display: block; }
.ob-tester { position: absolute; left: 14px; top: calc(var(--sat) + 16px); z-index: 5; }
.tester-modal .modal { width: 360px; max-height: calc(100% - var(--sat) - var(--sab) - 30px); }
.tester-modal .modal-body { padding: 26px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tester-modal .cs-brand { display: none; }
.tester-modal .cs-card { box-shadow: none; border: 1.5px solid #ecd2a8; padding: 10px 12px; }
.tester-modal .cs-log { max-height: 160px; }
.cs-version { font: 700 11px var(--ui); color: #a48a73; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cs-version b { color: var(--brown-d); }

/* new-version banner */
.update-bar { position: absolute; left: 50%; top: calc(var(--sat) + 58px); z-index: 2000; transform: translate(-50%, -140%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(74, 48, 34, .9); backdrop-filter: blur(6px); color: #fff; font: 800 12px var(--ui); white-space: nowrap; box-shadow: 0 6px 18px rgba(40, 20, 10, .35); transition: transform .5s cubic-bezier(.2, .9, .3, 1.2); }
.update-bar.show { transform: translate(-50%, 0); }
.update-bar button { padding: 6px 12px; border-radius: 999px; background: linear-gradient(#ffe48f, #f0a93c); color: #6b3f12; font: 900 11.5px var(--ui); }
.whatsnew ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.whatsnew li { margin-bottom: 4px; }
.whatsnew .wn-ver { text-align: center; font: 800 11px var(--ui); color: #a48a73; }
.farm-vp::before { content: ''; position: absolute; inset: -40px; background: var(--farm-bg) center / cover; filter: blur(16px) saturate(1.1) brightness(1.04); }
.farm-field { box-shadow: 0 0 60px 30px rgba(255, 250, 240, .25); }

/* =====================================================================
   v4 — farm lifecycle: seed → growing bush → mature bush, context popup, seed tray
   ===================================================================== */
.plot .plant img { display: none; }
.plot[data-state="seed"] .plant img { display: block; height: 34px; }
.plot[data-state="grow"] .plant img { display: block; height: 80px; }
.plot[data-state="ripe"] .plant img { display: block; height: 102px; filter: drop-shadow(0 3px 3px rgba(60, 35, 20, .3)); animation: swayTx 4.2s ease-in-out infinite; }
.plot[data-state="ripe"] .plant { animation: none; }
.plot .plant { bottom: 40%; }
.plot[data-state="ripe"]::after { content: ''; position: absolute; left: 50%; top: -48px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 3px rgba(255, 250, 210, .9); animation: twinkleDot 2.8s ease-in-out infinite; animation-delay: calc(var(--tw, 0) * 1s); pointer-events: none; }
@keyframes twinkleDot { 0%, 70%, 100% { opacity: 0; transform: scale(.3); } 80% { opacity: 1; transform: scale(1.2); } }
.plot.magic .plot-soil { filter: drop-shadow(0 0 10px rgba(150, 190, 255, .85)); }
.plot.magic .plant img { filter: drop-shadow(0 0 8px rgba(190, 215, 255, .9)) !important; }
.plot.magic-pop .plot-soil { animation: magicPop .9s ease-out; }
@keyframes magicPop { 0% { transform: scale(.85); filter: brightness(2.2); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.plot.sel .plot-soil { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 6px rgba(255, 236, 160, .95)) brightness(1.08); }
.need-water { position: absolute; left: 50%; top: -6px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: rgba(255, 255, 255, .92); box-shadow: 0 2px 6px rgba(40, 90, 140, .35); display: grid; place-items: center; animation: dropBob 1.6s ease-in-out infinite; }
.need-water img { width: 18px; transform: rotate(45deg); }
@keyframes dropBob { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }
.farm-hero.act-work .w-body { animation: workDip .55s ease-in-out 2; }

/* context popup */
.farm-pop { position: absolute; z-index: 30; min-width: 170px; max-width: 330px; padding: 6px 6px 7px; border-radius: 16px; background: rgba(74, 48, 34, .9); backdrop-filter: blur(6px); box-shadow: 0 8px 22px rgba(40, 20, 10, .35); opacity: 0; transform: translateY(8px) scale(.95); transition: opacity .18s, transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.farm-pop.in { opacity: 1; transform: none; }
.farm-pop::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-top-color: rgba(74, 48, 34, .9); border-bottom: 0; }
.farm-pop.below::after { bottom: auto; top: -7px; border-top: 0; border-bottom: 7px solid rgba(74, 48, 34, .9); }
.fp-title { padding: 1px 6px 6px; font: 700 11.5px var(--ui); color: #f7e9d6; white-space: nowrap; text-align: center; }
.fp-title b { color: #fff; font-weight: 900; } .fp-title .fp-t { color: #ffe39a; font-weight: 900; }
.fp-h { display: block; font-style: normal; font-size: 10px; color: #c9f0b0; margin-top: 1px; }
.fp-btns { display: flex; gap: 5px; justify-content: center; }
.fp-btns button { min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 7px 4px; border-radius: 12px; background: linear-gradient(#fff9ec, #f1dcb8); border: 1.5px solid #e3b062; transition: transform .1s; }
.fp-btns button:active { transform: scale(.92); }
.fp-btns img { width: 28px; height: 28px; object-fit: contain; }
.fp-btns span { font: 900 10.5px var(--ui); color: var(--brown-d); white-space: nowrap; }
.fp-btns small { display: flex; align-items: center; gap: 1px; font: 800 9.5px var(--ui); color: #a07a5a; }
.fp-btns small img { width: 12px; height: 12px; }
.fp-btns [data-a="remove"] { background: linear-gradient(#fff4f2, #f5d9d4); border-color: #e6a39a; }

/* seed tray */
.seed-tray { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 10px var(--sab); border-radius: 24px 24px 0 0; background: rgba(255, 249, 238, .97); border-top: 2px solid var(--gold); box-shadow: 0 -8px 24px rgba(60, 35, 20, .25); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .9, .3, 1.05); }
.seed-tray.in { transform: none; }
.st-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.st-head b { font: 700 18px var(--title); color: var(--brown-d); }
.st-all { margin-left: auto; display: flex; align-items: center; gap: 4px; font: 800 11px var(--ui); color: var(--brown); }
.st-all input { width: 16px; height: 16px; accent-color: #6cbf4c; }
.st-x { width: 28px; height: 28px; border-radius: 50%; background: #f1dcb8; color: var(--brown-d); font: 900 12px var(--ui); }
.st-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.st-card { position: relative; flex: none; width: 112px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px 7px; border-radius: 16px; background: linear-gradient(#fffdf8, #f8e8cf); border: 2px solid color-mix(in srgb, var(--rc) 55%, #fff); transition: transform .12s; }
.st-card:active { transform: scale(.94); }
.st-card .rtag { position: absolute; left: 6px; top: 6px; }
.st-img { height: 70px; display: grid; place-items: center; } .st-img img { max-height: 68px; max-width: 96px; object-fit: contain; }
.st-card b { font: 800 11px var(--ui); text-align: center; line-height: 1.15; }
.st-card small { font: 700 9px var(--ui); color: #a07a5a; text-align: center; }
.st-cost { margin-top: 3px; display: flex; align-items: center; gap: 2px; padding: 2px 10px; border-radius: 999px; background: linear-gradient(#a9e57b, #57ad3e); color: #fff; font: 900 11px var(--ui); }
.st-cost img { width: 14px; }
.st-card.locked { opacity: .55; filter: grayscale(.6); } .st-card.locked .st-cost { background: #b9a690; }

/* smart batch button + bar */
.farm-smart { position: absolute; left: 50%; bottom: calc(var(--sab) + 82px); z-index: 20; display: none; align-items: center; gap: 6px; padding: 7px 16px 7px 8px; border-radius: 999px; transform: translateX(-50%); background: linear-gradient(#fffbe6, #ffe39a); border: 2px solid #fff; box-shadow: 0 4px 14px rgba(80, 45, 15, .3), 0 0 0 2px rgba(227, 176, 98, .6); font: 900 12.5px var(--ui); color: #6b3f12; white-space: nowrap; animation: chipIn .3s cubic-bezier(.3, 1.6, .5, 1); }
.farm-smart.show { display: flex; }
.farm-smart img { width: 26px; height: 26px; object-fit: contain; } .farm-smart b { color: #d36a2c; }
.farm-bar { justify-content: space-evenly; }
.watch-fx { position: absolute; width: 90px; margin: -45px; animation: watchSpin 1.3s ease-out forwards; filter: drop-shadow(0 0 12px rgba(255, 230, 140, .9)); pointer-events: none; }
@keyframes watchSpin { 0% { transform: scale(.2) rotate(-90deg); opacity: 0; } 25% { transform: scale(1.1) rotate(0); opacity: 1; } 75% { transform: scale(1) rotate(20deg); opacity: 1; } 100% { transform: scale(1.3) rotate(40deg); opacity: 0; } }
.shovel-fx { position: absolute; width: 44px; margin: -22px; animation: dig .9s ease-in-out forwards; pointer-events: none; }
@keyframes dig { 0% { transform: translate(20px, -30px) rotate(30deg); opacity: 0; } 30% { opacity: 1; } 55% { transform: translate(0, 0) rotate(-10deg); } 75% { transform: translate(6px, -14px) rotate(20deg); opacity: 1; } 100% { transform: translate(10px, -30px) rotate(30deg); opacity: 0; } }
.float-text.pick { display: flex; align-items: center; gap: 2px; font-size: 15px; }
.float-text.pick img { width: 26px; height: 26px; object-fit: contain; }
.float-text.xp { font-size: 12px; color: #fff; -webkit-text-stroke: 0; padding: 2px 7px; border-radius: 999px; background: linear-gradient(#b48cf0, #7d55d0); border: 1.5px solid #fff; animation-delay: .08s; }

.cp-plant.ripe { height: 82px; bottom: 34px; } .cp-plant.grow { height: 64px; bottom: 38px; } .cp-plant.seed { height: 34px; bottom: 48px; }
.wild > img { height: 46px; left: -26px; }

.fd-art .fd-bush { position: absolute; right: 16px; bottom: 6px; height: 96px; filter: drop-shadow(0 3px 5px rgba(60, 35, 20, .3)); }
.cultivate { margin-top: 10px; padding: 8px 10px; border-radius: 14px; background: #fff; border: 1.5px solid #ecd2a8; text-align: left; }
.cv-head { display: flex; align-items: center; justify-content: space-between; } .cv-head b { font: 700 16px var(--title); color: var(--brown-d); }
.cv-stars i { font-style: normal; font-size: 18px; color: #e2d3bd; } .cv-stars i.on { color: #f7b733; text-shadow: 0 0 6px rgba(255, 200, 60, .7); }
.cultivate p { margin: 4px 0 6px; font-size: 12px; } .cultivate .btn img { width: 18px; height: 18px; }
.cv-max { color: #c98a1e; font-weight: 900; text-align: center; }
#toasts.in-farm { bottom: calc(var(--sab) + 136px); }
