:root {
  --bg: #fff7f5;
  --bg-2: #fff1f6;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #fffdfc;
  --text: #49313b;
  --muted: #927482;
  --primary: #ff7296;
  --primary-2: #ff9db6;
  --accent: #ffc45d;
  --green: #78c6a3;
  --blue: #8fb8ff;
  --danger: #ff6b6b;
  --shadow: 0 20px 60px rgba(213, 102, 132, 0.18);
  --shadow-soft: 0 12px 30px rgba(213, 102, 132, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 190, 205, 0.78), transparent 28%),
    radial-gradient(circle at 90% 16%, rgba(255, 224, 159, 0.55), transparent 26%),
    linear-gradient(160deg, #fff8f3 0%, #ffeef5 45%, #fff7fb 100%);
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }
input, textarea, select { outline: none; }

a { color: inherit; }

.bg-orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .7; animation: float 8s ease-in-out infinite; }
.orb-a { width: 220px; height: 220px; background: rgba(255, 150, 179, .24); left: -80px; top: 130px; }
.orb-b { width: 180px; height: 180px; background: rgba(255, 202, 105, .22); right: -60px; top: 290px; animation-delay: 1.2s; }
.orb-c { width: 260px; height: 260px; background: rgba(190, 218, 255, .22); left: 30%; bottom: -120px; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px calc(88px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff8bab, #ffc3d2);
  color: #fff;
  font-size: 25px;
  box-shadow: var(--shadow-soft);
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .02em; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.pill-btn, .ghost-btn, .primary-btn, .soft-btn, .danger-btn {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.pill-btn:active, .ghost-btn:active, .primary-btn:active, .soft-btn:active, .danger-btn:active { transform: scale(.98); }
.pill-btn { background: rgba(255,255,255,.7); box-shadow: var(--shadow-soft); }
.ghost-btn { background: rgba(255,255,255,.52); border: 1px solid rgba(255, 114, 150, .12); }
.primary-btn { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 700; box-shadow: 0 14px 28px rgba(255, 114, 150, .28); }
.soft-btn { background: rgba(255, 226, 234, .92); color: #b34364; font-weight: 700; }
.danger-btn { background: #fff0f0; color: #c44; }
.full { width: 100%; }
.small { padding: 7px 11px; font-size: 13px; }
button:disabled { opacity: .52; cursor: not-allowed; box-shadow: none; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,244,248,.72)),
    radial-gradient(circle at 84% 18%, rgba(255, 197, 104, .32), transparent 25%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .7);
  backdrop-filter: blur(18px);
}
.hero:after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -42px; bottom: -74px;
  background: radial-gradient(circle, rgba(255, 132, 163, .20), transparent 70%);
  border-radius: 50%;
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #af5570; font-weight: 700; font-size: 13px; }
.hero h2 { margin: 0; font-size: 28px; line-height: 1.16; letter-spacing: -.02em; }
.hero .sub { margin: 10px 0 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat-card {
  padding: 14px 12px;
  border-radius: 22px;
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.65);
}
.stat-card strong { display: block; font-size: 22px; color: #c65274; }
.stat-card span { color: var(--muted); font-size: 12px; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 22px 2px 12px; }
.section-title h3 { margin: 0; font-size: 19px; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }

.town-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.town-card {
  position: relative;
  min-height: 150px;
  border-radius: 28px;
  padding: 16px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.66);
  overflow: hidden;
  text-align: left;
  color: var(--text);
}
.town-card:before {
  content: "";
  position: absolute;
  inset: auto -30px -48px auto;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255, 146, 174, .14);
}
.town-card .icon { font-size: 38px; margin-bottom: 14px; display: block; }
.town-card strong { display: block; font-size: 17px; margin-bottom: 6px; }
.town-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.panel {
  border-radius: var(--radius-xl);
  padding: 18px;
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.68);
  backdrop-filter: blur(18px);
  margin-bottom: 14px;
}
.panel h2, .panel h3 { margin-top: 0; }
.panel p { color: var(--muted); line-height: 1.7; }

.bottom-nav {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(620px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 26px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 50px rgba(141, 73, 91, .22);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 20px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}
.nav-item .nicon { font-size: 20px; }
.nav-item.active { background: #ffe7ee; color: #bf4868; font-weight: 700; }

.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.62);
}
.feed-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 13px; background: #ffeaf0; }
.feed-item p { margin: 0; color: var(--text); line-height: 1.55; font-size: 14px; }
.feed-item time { color: var(--muted); font-size: 11px; }

.gacha-stage {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 198, 218, .56), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,245,248,.88));
  overflow: hidden;
}
.gacha-machine {
  position: relative;
  width: 210px;
  height: 230px;
  margin: 10px auto 18px;
}
.gacha-globe {
  position: absolute;
  left: 32px; top: 0;
  width: 146px; height: 146px;
  border-radius: 50%;
  background: rgba(255,255,255,.62);
  border: 9px solid #ffc4d3;
  box-shadow: inset 0 16px 40px rgba(255, 114, 150, .18), var(--shadow-soft);
  overflow: hidden;
}
.gacha-globe span {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #ff88a7;
  box-shadow: 45px 18px 0 #ffd36d, 76px 64px 0 #8fb8ff, 20px 75px 0 #78c6a3, 92px 28px 0 #ffb6c7;
  left: 22px; top: 24px;
  animation: bob 2.2s ease-in-out infinite;
}
.gacha-body {
  position: absolute;
  left: 23px; right: 23px; bottom: 0;
  height: 118px;
  border-radius: 30px 30px 22px 22px;
  background: linear-gradient(180deg, #ff8bab, #ff6d93);
  box-shadow: var(--shadow);
}
.gacha-handle {
  position: absolute;
  right: 18px; top: 70px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff6f8;
  border: 7px solid #ffbdd0;
  box-shadow: inset 0 0 0 7px #ffc85f;
}
.gacha-slot {
  position: absolute;
  left: 62px; bottom: 28px;
  width: 86px; height: 34px;
  border-radius: 999px;
  background: #fff6f8;
}
.gacha-stage.drawing .gacha-machine { animation: shake .42s ease-in-out 4; }
@keyframes bob { 50% { transform: translateY(8px) rotate(10deg); } }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

.result-card, .coupon-card, .mood-card, .sweet-card, .flower-card {
  border-radius: 24px;
  padding: 15px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.68);
}
.result-card { margin-top: 14px; background: linear-gradient(135deg, #fff, #fff0f5); }
.result-card .rarity { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #fff1b8; font-size: 12px; color: #9c6b00; font-weight: 700; }
.result-card h3 { margin: 10px 0 8px; }
.result-card p { margin: 0; color: var(--text); }

.card-list, .coupon-list, .flower-grid, .mood-list, .sweet-list { display: grid; gap: 10px; }
.flower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flower-card { min-height: 138px; position: relative; overflow: hidden; }
.flower-emoji { font-size: 38px; display: block; transform-origin: bottom center; animation: flowerWave 3s ease-in-out infinite; }
.flower-card.growth-2 .flower-emoji { font-size: 48px; }
.flower-card.growth-3 .flower-emoji { font-size: 56px; }
@keyframes flowerWave { 50% { transform: rotate(4deg) translateY(-3px); } }
.flower-card strong, .coupon-card strong, .mood-card strong, .sweet-card strong { display: block; margin-bottom: 5px; }
.meta { color: var(--muted); font-size: 12px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.form-grid { display: grid; gap: 12px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; color: #875166; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid rgba(255, 138, 171, .22);
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  padding: 12px 14px;
  color: var(--text);
}
.field textarea { min-height: 84px; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
  border-radius: 18px;
  padding: 12px 8px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(255, 138, 171, .18);
  text-align: center;
}
.choice.active { background: #ffe1ea; border-color: #ff8bab; color: #b93f61; font-weight: 700; }

.modal-mask {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(78, 43, 56, .22);
  backdrop-filter: blur(10px);
}
.modal {
  width: min(520px, 100%);
  border-radius: 30px;
  padding: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 24px 80px rgba(80, 45, 59, .28);
}
.modal h2 { margin: 0 0 10px; }
.role-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.role-pick { border-radius: 22px; padding: 15px; background: #fff4f7; text-align: center; border: 2px solid transparent; }
.role-pick.active { border-color: #ff85a5; background: #ffe7ee; }
.role-pick b { display: block; margin-top: 8px; }

.loading-card {
  margin: 16vh auto 0;
  width: min(360px, 92%);
  padding: 28px;
  text-align: center;
  border-radius: 28px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow);
}
.loader-heart { color: var(--primary); font-size: 54px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 20px;
  transform: translateX(-50%) translateY(-20px);
  max-width: calc(100% - 34px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(76, 45, 57, .88);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.52);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.room-link {
  word-break: break-all;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  color: #9b4963;
  font-size: 13px;
}

@media (min-width: 720px) {
  .app-shell { padding-top: 28px; }
  .hero h2 { font-size: 36px; }
  .town-grid { grid-template-columns: repeat(3, 1fr); }
  .flower-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand p { max-width: 420px; }
}

@media (max-width: 390px) {
  .hero { padding: 18px; }
  .hero h2 { font-size: 24px; }
  .town-card { min-height: 136px; padding: 14px; }
  .stats-grid { gap: 8px; }
  .stat-card strong { font-size: 19px; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
}

.login-page {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 22px 0;
}
.login-card {
  width: min(520px, 100%);
  padding: 26px;
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,244,248,.76)),
    radial-gradient(circle at 86% 12%, rgba(255, 196, 93, .26), transparent 32%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.76);
  backdrop-filter: blur(18px);
}
.login-heart {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, #ff7a9e, #ffc3d2);
  color: #fff;
  font-size: 42px;
  box-shadow: 0 18px 36px rgba(255, 114, 150, .24);
}
.login-card h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.03em;
}
.login-card .sub {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.75;
}
.login-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}
.login-note code {
  padding: 1px 5px;
  border-radius: 6px;
  background: #fff0f5;
  color: #b34364;
}
.account-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}
.account-box > div {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.68);
}
.account-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.account-box strong {
  display: block;
  color: #b34364;
  word-break: break-all;
}
@media (max-width: 520px) {
  .login-card { padding: 22px; border-radius: 30px; }
  .login-card h1 { font-size: 27px; }
  .account-box { grid-template-columns: 1fr; }
}

.exclusive-card {
  position: relative;
  overflow: hidden;
}
.exclusive-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  border: 1px dashed rgba(255, 132, 166, .35);
  pointer-events: none;
}
.exclusive-card::after {
  content: "Only Us";
  position: absolute;
  right: 22px;
  top: 20px;
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(179, 67, 100, .55);
  font-weight: 800;
}
.exclusive-card .field,
.exclusive-card .primary-btn,
.exclusive-card .login-note {
  position: relative;
  z-index: 1;
}


.house-stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  perspective: 1200px;
}
.house-room-shell {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.house-back-wall,
.house-left-wall,
.house-right-wall,
.house-floor-plane,
.room-ceiling-glow,
.house-built-bed,
.house-built-sofa,
.house-built-rug,
.house-ambient-lights,
.house-window,
.house-wall-title,
.house-piece,
.house-spot-badge {
  position: absolute;
}
.room-ceiling-glow {
  left: 50%;
  top: 4%;
  width: 62%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,255,255,0));
  opacity: .7;
  filter: blur(16px);
}
.house-back-wall {
  inset: 7% 8% 20% 8%;
  border-radius: 34px 34px 22px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,239,243,.92));
  box-shadow: inset 0 -30px 60px rgba(212,128,151,.14);
}
.house-left-wall,
.house-right-wall {
  top: 17%;
  bottom: 24%;
  width: 17%;
  filter: brightness(.98);
}
.house-left-wall {
  left: 2%;
  transform: skewY(18deg);
  border-radius: 24px 0 0 24px;
  background: linear-gradient(180deg, rgba(255,247,249,.95), rgba(252,225,233,.85));
}
.house-right-wall {
  right: 2%;
  transform: skewY(-18deg);
  border-radius: 0 24px 24px 0;
  background: linear-gradient(180deg, rgba(255,247,249,.9), rgba(251,227,235,.82));
}
.house-floor-plane {
  left: 11%;
  right: 11%;
  bottom: 6%;
  height: 30%;
  border-radius: 24px;
  transform: perspective(800px) rotateX(72deg);
  transform-origin: bottom;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px) 0 0/34px 100%,
    linear-gradient(0deg, rgba(180,107,125,.12) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(180deg, rgba(255,221,228,.95), rgba(242,201,184,.88));
  box-shadow: inset 0 18px 36px rgba(255,255,255,.22);
}
.house-window {
  left: 10%;
  top: 12%;
  width: 120px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: linear-gradient(180deg, #e6f4ff, #fffafc 72%);
  border: 8px solid rgba(255, 213, 224, .98);
  box-shadow: 0 18px 45px rgba(158, 81, 117, .18);
  z-index: 3;
}
.house-window::before,
.house-window::after {
  content: "";
  position: absolute;
  background: rgba(255, 213, 224, .98);
}
.house-window::before { left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); }
.house-window::after { top: 50%; left: 10px; right: 10px; height: 6px; transform: translateY(-50%); }
.house-window span { font-size: 24px; filter: drop-shadow(0 8px 16px rgba(255,255,255,.85)); }
.house-wall-title {
  right: 9%;
  top: 12%;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #b34364;
  font-weight: 800;
  letter-spacing: .06em;
  box-shadow: 0 12px 30px rgba(186, 94, 129, .15);
  z-index: 4;
}
.house-built-bed {
  right: 14%;
  bottom: 19%;
  width: 30%;
  height: 18%;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(180deg, rgba(255,248,250,.95), rgba(252,215,227,.92));
  box-shadow: 0 14px 28px rgba(181, 99, 128, .16);
}
.house-built-bed::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 18%;
  width: 38%;
  height: 42%;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
}
.house-built-bed::after {
  content: "";
  position: absolute;
  inset: auto 9% 10% 14%;
  height: 34%;
  border-radius: 16px;
  background: rgba(255, 233, 239, .95);
}
.house-built-sofa {
  left: 17%;
  bottom: 21%;
  width: 25%;
  height: 15%;
  border-radius: 26px 26px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 242, 211, .96), rgba(255, 220, 185, .92));
  box-shadow: 0 16px 30px rgba(177, 118, 67, .18);
}
.house-built-sofa::before,
.house-built-sofa::after {
  content: "";
  position: absolute;
  top: -18%;
  width: 26%;
  height: 50%;
  border-radius: 16px;
  background: rgba(255, 248, 232, .95);
}
.house-built-sofa::before { left: 10%; }
.house-built-sofa::after { right: 10%; }
.house-built-rug {
  left: 32%;
  bottom: 12%;
  width: 36%;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 170, 193, .38), rgba(255, 170, 193, .08) 68%, transparent 72%);
}
.house-ambient-lights {
  inset: 0;
  pointer-events: none;
}
.house-ambient-lights::before,
.house-ambient-lights::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(26px);
  opacity: .65;
}
.house-ambient-lights::before {
  width: 120px;
  height: 120px;
  background: rgba(255, 199, 137, .55);
  right: 14%;
  top: 16%;
}
.house-ambient-lights::after {
  width: 140px;
  height: 140px;
  background: rgba(255, 176, 207, .40);
  left: 10%;
  bottom: 18%;
}
.house-stage.theme-twilight .house-back-wall { background: linear-gradient(180deg, rgba(243,233,255,.94), rgba(224,222,255,.92)); }
.house-stage.theme-twilight .house-floor-plane { background:
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px) 0 0/34px 100%,
    linear-gradient(0deg, rgba(112,98,164,.15) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(180deg, rgba(196,183,240,.95), rgba(161,149,210,.92)); }
.house-stage.theme-starlight .house-back-wall { background: linear-gradient(180deg, rgba(235,238,255,.96), rgba(243,229,255,.92)); }
.house-stage.theme-starlight .room-ceiling-glow { background: radial-gradient(circle, rgba(255,255,255,1), rgba(194,203,255,.1)); }
.house-stage.theme-starlight .house-ambient-lights::before { background: rgba(200, 211, 255, .55); }
.house-stage.theme-starlight .house-ambient-lights::after { background: rgba(255, 183, 219, .42); }
.house-stage.theme-garden .house-back-wall { background: linear-gradient(180deg, rgba(242,251,243,.96), rgba(236,244,225,.92)); }
.house-stage.theme-garden .house-floor-plane { background:
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px) 0 0/34px 100%,
    linear-gradient(0deg, rgba(106,140,93,.13) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(180deg, rgba(212,226,201,.95), rgba(186,208,170,.92)); }
.house-stage.theme-garden .house-ambient-lights::after { background: rgba(177, 224, 166, .35); }
.house-piece {
  z-index: 6;
  transform: translate(-50%, -50%);
  min-width: 62px;
  padding: 8px 9px;
  border-radius: 18px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 18px 32px rgba(176, 104, 132, .16);
  text-align: center;
  animation: housePop .26s ease both;
  backdrop-filter: blur(8px);
}
.house-piece.preview {
  opacity: .76;
  border-style: dashed;
  box-shadow: 0 0 0 2px rgba(255, 132, 169, .16), 0 20px 38px rgba(176, 104, 132, .14);
  animation: previewPulse 1.4s ease-in-out infinite;
}
.house-piece span {
  display: block;
  font-size: 34px;
  line-height: 1;
}
.house-piece small {
  display: block;
  margin-top: 4px;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8e5a6b;
  font-size: 10px;
  font-weight: 700;
}
.house-piece.preview em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 9px;
  color: #ae6a80;
}
@keyframes housePop {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.86); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes previewPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.98); }
  50% { transform: translate(-50%, -50%) scale(1.02); }
}
.house-spot-badge {
  z-index: 5;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.house-spot-badge span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff7ca2;
  box-shadow: 0 0 0 8px rgba(255,124,162,.14), 0 0 20px rgba(255,124,162,.32);
}
.house-spot-badge em {
  font-style: normal;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  font-size: 11px;
  color: #8d5368;
  box-shadow: var(--shadow-soft);
}
.house-spot-badge.active span { background: #ff4b84; }
.house-spot-badge.active em { background: #ffe3ec; color: #b23a63; }
.room-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.room-theme-card {
  text-align: left;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}
.room-theme-card strong { display: block; font-size: 16px; margin-bottom: 4px; }
.room-theme-card span { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #fff1f5; color: #b34364; font-size: 12px; font-weight: 700; }
.room-theme-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.room-theme-card.active { background: linear-gradient(180deg, #fff0f5, #fff8fb); border-color: rgba(255, 124, 162, .28); box-shadow: 0 18px 38px rgba(255,124,162,.18); }
.house-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 16px;
  align-items: stretch;
}
.house-side-card {
  border-radius: 28px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.house-theme-chip {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe0ea, #fff0d6);
  color: #b34364;
  font-size: 12px;
  font-weight: 800;
}
.house-side-card strong { font-size: 18px; }
.house-side-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.house-metric-list {
  display: grid;
  gap: 10px;
}
.house-metric-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,244,247,.8);
}
.house-metric-list span { color: var(--muted); font-size: 13px; }
.house-metric-list strong { color: #8e4864; font-size: 14px; }
.house-list { display: grid; gap: 12px; }
.house-item-card {
  border-radius: 24px;
  padding: 14px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.68);
}
.house-item-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.house-item-main > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff0f5, #fff7e8);
  font-size: 26px;
  flex: 0 0 auto;
}
.house-item-main strong { display: block; margin-bottom: 4px; }
.house-item-main p { margin: 4px 0 0; }
.furniture-grid .choice span { font-size: 24px; }
.furniture-choice-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}
.furniture-choice-card strong { font-size: 14px; }
.furniture-choice-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.room-builder-grid .field.full { grid-column: 1 / -1; }
.section-title.compact { margin-bottom: 14px; }
.room-theme-panel { overflow: hidden; }
.rich-furniture-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .house-showcase-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .room-theme-grid { grid-template-columns: 1fr; }
  .rich-furniture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .bottom-nav { grid-template-columns: repeat(8, 1fr); width: min(720px, calc(100% - 14px)); gap: 2px; padding: 6px; }
  .nav-item { padding: 7px 2px; font-size: 10px; border-radius: 18px; }
  .nav-item .nicon { font-size: 18px; }
  .house-stage { min-height: 360px; }
  .house-window { width: 92px; height: 72px; left: 8%; }
  .house-wall-title { right: 5%; font-size: 11px; padding: 8px 12px; }
  .house-piece { min-width: 56px; padding: 7px 8px; }
  .house-piece span { font-size: 30px; }
  .house-spot-badge em { display: none; }
}

/* v36 immersive house upgrade */
.house-showcase-panel { overflow: hidden; }
.house-stage {
  --scene-rx: 64deg;
  --scene-ry: -16deg;
  --scene-scale: 1.02;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.9), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(255,217,191,.32), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.08));
  min-height: 500px;
  user-select: none;
  touch-action: none;
}
.house-room-shell {
  transform: rotateX(var(--scene-rx)) rotateZ(var(--scene-ry)) scale(var(--scene-scale));
  transform-origin: 50% 62%;
  transition: transform .22s ease;
}
.house-stage.view-loft .house-room-shell { transform-origin: 50% 65%; }
.room-view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.view-choice-grid { flex: 1 1 320px; }
.house-3d-tip {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
}
.house-floating-orbs,
.house-floating-orbs i { position: absolute; inset: 0; pointer-events: none; }
.house-floating-orbs i::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 20px rgba(255,255,255,.9), 0 0 42px rgba(255, 167, 198, .32);
}
.house-floating-orbs i:nth-child(1)::before { left: 18%; top: 14%; }
.house-floating-orbs i:nth-child(2)::before { left: 74%; top: 18%; width: 9px; height: 9px; }
.house-floating-orbs i:nth-child(3)::before { left: 58%; top: 8%; width: 6px; height: 6px; }
.furniture-model {
  position: relative;
  width: 78px;
  height: 60px;
  margin: 0 auto;
  transform-style: preserve-3d;
}
.choice-furniture-visual .furniture-model { width: 72px; height: 56px; }
.house-piece .furniture-model.thumb,
.house-item-thumb .furniture-model,
.house-item-thumb .furniture-model.thumb { width: 62px; height: 50px; }
.furniture-model i,
.furniture-model .photo-frame,
.furniture-model .photo-ledger { position: absolute; display: block; }
.photo-model { width: 70px; height: 66px; }
.photo-model .photo-frame {
  inset: 0 auto 10px 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  border: 4px solid #fff7f2;
  box-shadow: 0 8px 18px rgba(117, 69, 76, .18);
  background: #fff;
}
.photo-model .photo-ledger {
  left: 50%; bottom: 0; transform: translateX(-50%);
  width: 20px; height: 14px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #efd7c4, #d6b5a1);
}
.bed-model .headboard { left: 10px; right: 10px; top: 2px; height: 16px; border-radius: 12px 12px 6px 6px; background: linear-gradient(180deg, #f8d9e7, #f0b9cd); }
.bed-model .mattress { left: 6px; right: 6px; bottom: 8px; height: 28px; border-radius: 16px; background: linear-gradient(180deg, #fff, #ffeaf2); box-shadow: 0 8px 18px rgba(154,96,119,.15); }
.bed-model .blanket { left: 20px; right: 12px; bottom: 14px; height: 12px; border-radius: 10px; background: linear-gradient(90deg, #ffe7ce, #ffd0df); }
.bed-model .pillow { top: 10px; width: 18px; height: 11px; border-radius: 8px; background: #fff; }
.bed-model .pillow.left { left: 14px; } .bed-model .pillow.right { right: 14px; }
.sofa-model .back { left: 10px; right: 10px; top: 10px; height: 18px; border-radius: 18px 18px 10px 10px; background: linear-gradient(180deg, #ffe7c6, #ffd5aa); }
.sofa-model .seat { left: 8px; right: 8px; bottom: 8px; height: 20px; border-radius: 12px; background: linear-gradient(180deg, #fff2cf, #ffd8a8); }
.sofa-model .arm { width: 12px; top: 16px; bottom: 10px; border-radius: 8px; background: #ffd7ae; }
.sofa-model .arm.left { left: 4px; } .sofa-model .arm.right { right: 4px; }
.sofa-model .cushion { top: 14px; width: 18px; height: 14px; border-radius: 10px; background: rgba(255,255,255,.75); }
.sofa-model .cushion.left { left: 20px; } .sofa-model .cushion.right { right: 20px; }
.rug-model .rug-base { left: 8px; right: 8px; bottom: 10px; height: 18px; border-radius: 50%; background: radial-gradient(circle at center, #ffd5e0, #ffc1d2 70%, #ffb0c9); }
.rug-model .rug-shadow { left: 12px; right: 12px; bottom: 6px; height: 10px; border-radius: 50%; background: rgba(128, 75, 93, .12); filter: blur(4px); }
.lamp-model .lamp-glow { left: 13px; top: 2px; width: 42px; height: 28px; border-radius: 50%; background: radial-gradient(circle, rgba(255,244,182,.95), rgba(255,211,102,.22) 55%, transparent 72%); }
.lamp-model .lamp-shade { left: 22px; top: 12px; width: 24px; height: 15px; border-radius: 8px 8px 12px 12px; background: linear-gradient(180deg, #fff6c4, #ffe083); }
.lamp-model .lamp-pole { left: 33px; top: 26px; width: 4px; height: 20px; border-radius: 999px; background: #cba6a0; }
.lamp-model .lamp-base { left: 26px; bottom: 6px; width: 18px; height: 8px; border-radius: 999px; background: #d3b4ae; }
.bear-model .bear-ear { top: 10px; width: 14px; height: 14px; border-radius: 50%; background: #d8b296; }
.bear-model .bear-ear.left { left: 16px; } .bear-model .bear-ear.right { right: 16px; }
.bear-model .bear-head { left: 21px; top: 14px; width: 36px; height: 28px; border-radius: 50%; background: #e3bea1; }
.bear-model .bear-body { left: 18px; bottom: 6px; width: 40px; height: 22px; border-radius: 18px; background: #d9b08d; }
.star-model .star-wire { left: 6px; right: 6px; top: 18px; height: 2px; background: linear-gradient(90deg, rgba(255,188,212,.4), rgba(255,216,173,.5)); }
.star-model .star { width: 12px; height: 12px; background: #ffe699; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 92%,50% 71%,21% 92%,32% 57%,2% 35%,39% 35%); }
.star-model .s1 { left: 10px; top: 12px; } .star-model .s2 { left: 32px; top: 18px; width: 10px; height: 10px; } .star-model .s3 { right: 10px; top: 10px; }
.cat-model .cat-ear { top: 8px; width: 12px; height: 12px; background: #dadfe9; clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.cat-model .cat-ear.left { left: 22px; } .cat-model .cat-ear.right { right: 22px; }
.cat-model .cat-head { left: 20px; top: 14px; width: 36px; height: 24px; border-radius: 50%; background: #edf0f6; }
.cat-model .cat-body { left: 16px; bottom: 6px; width: 44px; height: 20px; border-radius: 16px; background: #e2e7ef; }
.cat-model .cat-tail { right: 8px; bottom: 14px; width: 20px; height: 6px; border-radius: 999px; background: #d2d8e3; transform: rotate(26deg); }
.pot-model .leaf { width: 16px; height: 26px; border-radius: 16px 16px 0 16px; background: linear-gradient(180deg, #8fd17b, #55ad54); }
.pot-model .l1 { left: 24px; top: 2px; transform: rotate(-10deg); } .pot-model .l2 { left: 14px; top: 12px; transform: rotate(-30deg); } .pot-model .l3 { right: 14px; top: 12px; transform: rotate(24deg); }
.pot-model .pot { left: 22px; right: 22px; bottom: 6px; height: 18px; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #e9c0a0, #c88b67); }
.curtain-model .rod { left: 10px; right: 10px; top: 8px; height: 4px; border-radius: 999px; background: #dcb4c0; }
.curtain-model .drape { top: 12px; width: 20px; bottom: 8px; border-radius: 10px; background: linear-gradient(180deg, #ffe8f1, #ffd5e5); }
.curtain-model .drape.left { left: 14px; } .curtain-model .drape.right { right: 14px; }
.desk-model .mirror { left: 24px; top: 2px; width: 28px; height: 22px; border-radius: 12px; border: 4px solid #f5d9c8; background: linear-gradient(180deg, #f2fbff, #ffffff); }
.desk-model .tabletop { left: 12px; right: 12px; bottom: 18px; height: 10px; border-radius: 8px; background: linear-gradient(180deg, #f6d9bf, #e1b894); }
.desk-model .leg { width: 4px; bottom: 6px; height: 14px; background: #cca788; } .desk-model .leg.left { left: 18px; } .desk-model .leg.right { right: 18px; }
.desk-model .stool { left: 24px; bottom: 4px; width: 20px; height: 8px; border-radius: 999px; background: #f8e4eb; }
.bookshelf-model .shelf { left: 16px; right: 16px; height: 8px; border-radius: 4px; background: #dcbba8; }
.bookshelf-model .top { top: 12px; } .bookshelf-model .mid { top: 26px; } .bookshelf-model .low { top: 40px; }
.bookshelf-model .book { width: 8px; border-radius: 3px 3px 0 0; bottom: 12px; }
.bookshelf-model .book.a { left: 22px; height: 26px; background: #f29ab0; }
.bookshelf-model .book.b { left: 34px; height: 20px; background: #c5d7ff; }
.bookshelf-model .book.c { left: 46px; height: 30px; background: #ffd2a0; }
.house-piece {
  min-width: 88px;
  background: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
}
.house-piece small { max-width: 90px; font-size: 10px; }
.house-piece.photo-piece { min-width: 92px; }
.house-piece.preview { background: rgba(255,255,255,.42); }
.house-item-thumb {
  width: 72px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7fb, #fff2f2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  flex: 0 0 auto;
}
.house-item-main { align-items: center; }
.rich-furniture-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.furniture-choice-card { min-height: 156px; align-items: center; text-align: center; }
.furniture-choice-card strong { display: block; margin-top: 4px; }
.furniture-choice-card small { text-align: center; }
.house-side-card { justify-content: flex-start; }
.house-metric-list div strong { white-space: nowrap; }
@media (max-width: 900px) {
  .house-stage { min-height: 440px; }
}
@media (max-width: 720px) {
  .rich-furniture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .house-stage { min-height: 400px; }
}
@media (max-width: 520px) {
  .house-stage { min-height: 360px; }
  .house-room-shell { transform-origin: 50% 64%; }
  .room-view-row { align-items: stretch; }
  .house-3d-tip { width: 100%; text-align: center; }
  .furniture-model { width: 60px; height: 48px; }
  .choice-furniture-visual .furniture-model { width: 58px; height: 46px; }
  .house-piece { min-width: 72px; padding: 6px 7px; }
  .house-piece small { max-width: 70px; }
  .house-window { width: 84px; height: 64px; }
}


/* v36 real 3d house */
.house-webgl-panel { overflow: hidden; }
.house-webgl-stage {
  position: relative;
  min-height: 580px;
  border-radius: 32px;
  overflow: hidden;
  background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.92), transparent 24%), linear-gradient(180deg, #fffafb, #fff0f5 38%, #fff5f0 100%);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 30px 80px rgba(176, 104, 132, .16);
}
.house3d-viewport {
  width: 100%;
  height: 580px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.house3d-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
  image-rendering: auto;
}
.house-webgl-ui {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.house-scene-chip,
.house-scene-tip {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(119, 71, 87, .12);
  color: #8b5367;
  font-size: 13px;
}
.house-scene-chip { font-weight: 700; }
.house-scene-tip { font-size: 12px; }
.real3d-side-card { min-height: 580px; }
.real3d-side-card p { line-height: 1.8; }
.real3d-side-card .house-metric-list { margin-top: auto; }
.choice-furniture-visual { height: 76px; display: grid; place-items: center; }
@media (max-width: 900px) {
  .house-webgl-stage, .real3d-side-card { min-height: 500px; }
  .house3d-viewport { height: 500px; }
}
@media (max-width: 520px) {
  .house-webgl-stage, .real3d-side-card { min-height: 420px; }
  .house3d-viewport { height: 420px; }
  .house-scene-chip, .house-scene-tip { font-size: 11px; padding: 8px 10px; }
}

/* v36 photo features */
.hero-with-photo {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(190px, .65fr);
  gap: 18px;
  align-items: stretch;
}
.hero-copy { position: relative; z-index: 1; }
.home-photo-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  color: var(--text);
  border-radius: 26px;
  padding: 10px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.home-photo-card strong { font-size: 15px; padding: 0 4px; }
.home-photo-card p { margin: -2px 4px 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.home-photo-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff3f7, #fff9f0);
}
.protected-photo, .photo-choice-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 190px;
  border-radius: 22px;
  color: #ff7296;
  font-size: 54px;
  background: linear-gradient(135deg, #fff1f6, #fff8ed);
  border: 1px dashed rgba(255, 114, 150, .35);
}
.card-photo {
  margin: 12px 0;
  border-radius: 18px;
  overflow: hidden;
  max-height: 360px;
  background: #fff5f8;
}
.card-photo .protected-photo { max-height: 360px; object-fit: cover; }
.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.memory-card {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.72);
}
.memory-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #fff3f7;
  overflow: hidden;
}
.memory-body { padding: 14px; }
.memory-tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffe7ee;
  color: #b34364;
  font-size: 12px;
  font-weight: 700;
}
.memory-card h3 { margin: 10px 0 6px; font-size: 18px; }
.memory-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 13px; }
.mini-photo-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,114,150,.10);
}
.mini-photo-line:last-child { border-bottom: 0; }
.mini-photo-line span {
  grid-row: span 2;
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1b8;
  color: #9c6b00;
  font-size: 12px;
  font-weight: 700;
}
.mini-photo-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-photo-line em { color: var(--muted); font-size: 12px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.photo-choice {
  padding: 8px;
  border-radius: 18px;
  text-align: left;
  color: var(--text);
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,114,150,.12);
}
.photo-choice.active {
  background: #ffe7ee;
  border-color: rgba(255,114,150,.38);
  box-shadow: 0 10px 24px rgba(255,114,150,.16);
}
.photo-choice span {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff3f7;
  margin-bottom: 7px;
}
.photo-choice strong { font-size: 12px; line-height: 1.35; display: block; }
.house-piece.photo-piece {
  width: 86px;
  min-height: 92px;
  padding: 5px;
  background: rgba(255,255,255,.88);
  border-radius: 14px;
}
.house-piece-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff3f7;
}
.house-item-thumb {
  width: 58px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #fff3f7;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 720px) {
  .hero-with-photo { grid-template-columns: 1fr; }
  .home-photo-card { flex-direction: row; align-items: center; }
  .home-photo-img { width: 34%; min-width: 120px; aspect-ratio: 1 / 1; }
  .memory-grid { grid-template-columns: 1fr; }
  .photo-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { grid-template-columns: repeat(7, 1fr); width: min(760px, calc(100% - 14px)); gap: 1px; padding: 6px; }
  .nav-item { font-size: 10px; padding: 7px 2px; }
  .nav-item .nicon { font-size: 18px; }
}
.bottom-nav { grid-template-columns: repeat(7, 1fr); }
.login-page.has-login-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--login-bg);
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.06);
  transform: scale(1.08);
  opacity: .48;
}
.login-page.has-login-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,248,243,.78), rgba(255,238,245,.72));
}
.login-page.has-login-photo .login-card { position: relative; z-index: 1; }
.login-page { position: relative; overflow: hidden; border-radius: 0; }

/* v36 web photo upload */
.upload-panel h3 { margin: 0 0 12px; }
.upload-box { display: grid; gap: 14px; }
.upload-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border: 1.5px dashed rgba(255, 114, 150, .45);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 247, 250, .95), rgba(255, 255, 255, .78));
  text-align: center;
  color: var(--muted);
}
.upload-drop input { max-width: 100%; }
.upload-drop span { font-size: 18px; font-weight: 800; color: var(--text); }
.upload-drop small { line-height: 1.5; }
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 241, 246, .85);
  color: var(--text);
  font-size: 14px;
}
.check-line input { width: 16px; height: 16px; accent-color: var(--primary); }
.uploaded-memory .memory-info small {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* v36 photo library manager */
.library-grid .library-card {
  position: relative;
}
.library-card.home-selected {
  outline: 2px solid rgba(255, 114, 150, .45);
  box-shadow: 0 12px 30px rgba(255, 114, 150, .16);
}
.photo-actions {
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.photo-actions .small {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 999px;
}
.library-card .meta {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* v36 chat */
.chat-panel { padding-bottom: 20px; }
.chat-list {
  min-height: 320px;
  max-height: 58vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.68);
}
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-row.theirs { justify-content: flex-start; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.72);
}
.chat-row.mine .chat-bubble {
  background: linear-gradient(135deg, #ffe5ee, #fff5f8);
  border-top-right-radius: 8px;
}
.chat-row.theirs .chat-bubble {
  border-top-left-radius: 8px;
}
.chat-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.chat-bubble p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
}
.chat-compose {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.chat-compose textarea {
  min-height: 76px;
  resize: vertical;
}
@media (max-width: 520px) {
  .bottom-nav { grid-template-columns: repeat(4, 1fr); }
  .chat-compose { grid-template-columns: 1fr; }
  .chat-bubble { max-width: 86%; }
}


.diary-hero {
  background: linear-gradient(135deg, rgba(255, 248, 238, 0.96), rgba(255, 233, 238, 0.92));
}

.diary-list {
  display: grid;
  gap: 14px;
}

.diary-card {
  border: 1px solid rgba(166, 104, 125, 0.14);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(146, 86, 103, 0.08);
}

.diary-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.diary-card h3 {
  margin: 8px 0 0;
  font-size: 17px;
}

.diary-content {
  white-space: pre-wrap;
  line-height: 1.75;
  color: #6f4a55;
}

.mini {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

/* v36 mobile experience polish */
:root {
  --bottom-nav-height: 78px;
}

html, body {
  width: 100%;
  max-width: 100%;
}

body {
  overscroll-behavior-y: none;
}

.app-shell {
  max-width: 980px;
  padding-bottom: calc(var(--bottom-nav-height) + 34px + var(--safe-bottom)) !important;
}

button,
.pill-btn,
.ghost-btn,
.primary-btn,
.soft-btn,
.danger-btn {
  min-height: 42px;
  touch-action: manipulation;
}

.field,
.form-grid,
.upload-box,
.panel,
.memory-card,
.library-card,
.chat-compose,
.actions-row {
  min-width: 0;
}

.field input,
.field textarea,
.field select,
.upload-drop input {
  max-width: 100%;
  min-width: 0;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.form-grid > .full,
.form-grid > .field.full,
.form-grid > .check-line,
.form-grid > button.full,
.form-grid > .primary-btn.full,
.form-grid > .soft-btn.full,
.form-grid > .ghost-btn.full {
  grid-column: 1 / -1;
}

.actions-row {
  align-items: stretch;
}

.actions-row > button,
.hero-actions > button,
.photo-actions > button {
  flex: 1 1 132px;
  white-space: normal;
}

.bottom-nav {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
  padding: 7px;
  width: min(760px, calc(100% - 16px));
  bottom: calc(8px + var(--safe-bottom));
  border-radius: 24px;
  max-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
}
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-item {
  flex: 0 0 62px;
  min-width: 62px;
  min-height: 52px;
  padding: 7px 5px;
  justify-content: center;
  white-space: nowrap;
}
.nav-item .nicon { font-size: 19px; line-height: 1; }

.memory-grid {
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 14px;
}
.memory-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.memory-img-wrap,
.memory-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, #fff6f8, #fffdf8);
}
.memory-img-wrap .protected-photo,
.memory-img-wrap img,
.memory-card > .memory-img .protected-photo,
.memory-card > .memory-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: linear-gradient(135deg, #fff6f8, #fffdf8);
}
.home-photo-img .protected-photo,
.photo-choice span .protected-photo,
.house-piece-photo .protected-photo,
.house-item-thumb .protected-photo,
.card-photo .protected-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memory-info,
.memory-body {
  padding: 14px;
  min-width: 0;
}
.memory-info h3,
.memory-body h3 {
  margin: 10px 0 6px;
  font-size: 17px;
  line-height: 1.35;
  word-break: break-word;
}
.memory-info p,
.memory-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
  word-break: break-word;
}
.tag,
.memory-tag {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffe7ee;
  color: #b34364;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-card .meta {
  line-height: 1.55;
  word-break: break-all;
}
.photo-actions {
  display: flex;
  align-items: stretch;
}
.photo-actions .small {
  min-height: 38px;
}
.upload-panel {
  overflow: hidden;
}
.upload-box {
  width: 100%;
}
.upload-drop {
  padding: 16px;
  min-height: 128px;
}
.upload-drop input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.check-line {
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  line-height: 1.5;
  word-break: break-word;
}
.check-line input {
  flex: 0 0 auto;
  margin-top: 2px;
}
.chat-list,
.diary-list,
.feed,
.card-list,
.coupon-list,
.flower-grid,
.mood-list,
.sweet-list,
.house-list {
  padding-bottom: 2px;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px 12px calc(var(--bottom-nav-height) + 42px + var(--safe-bottom)) !important;
  }
  .topbar {
    align-items: flex-start;
  }
  .brand p {
    max-width: 58vw;
  }
  .hero {
    padding: 18px;
    border-radius: 26px;
  }
  .hero h2 {
    font-size: 25px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-actions > button {
    width: 100%;
  }
  .home-photo-card {
    flex-direction: row;
    align-items: center;
  }
  .home-photo-img {
    width: 38%;
    min-width: 118px;
    aspect-ratio: 1 / 1;
  }
  .memory-grid {
    grid-template-columns: 1fr;
  }
  .memory-img-wrap,
  .memory-img {
    aspect-ratio: 4 / 3;
  }
  .photo-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  :root { --bottom-nav-height: 74px; }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 15px;
    border-radius: 24px;
  }
  .bottom-nav {
    width: calc(100% - 12px);
    gap: 5px;
    padding: 6px;
    border-radius: 22px;
  }
  .nav-item {
    flex-basis: 58px;
    min-width: 58px;
    min-height: 50px;
    font-size: 10px;
    border-radius: 17px;
  }
  .nav-item .nicon { font-size: 18px; }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat-card {
    padding: 12px 8px;
    border-radius: 18px;
  }
  .stat-card strong { font-size: 19px; }
  .stat-card span { font-size: 11px; }
  .town-grid {
    gap: 10px;
  }
  .town-card {
    min-height: 132px;
    border-radius: 23px;
    padding: 14px;
  }
  .town-card .icon { font-size: 31px; margin-bottom: 10px; }
  .town-card strong { font-size: 15px; }
  .town-card p { font-size: 12px; }
  .upload-drop {
    min-height: 112px;
    padding: 14px 12px;
  }
  .upload-drop span { font-size: 16px; }
  .upload-drop small { font-size: 12px; }
  .photo-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .photo-actions > button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .town-grid,
  .flower-grid {
    grid-template-columns: 1fr;
  }
  .choice-grid,
  .photo-choice-grid {
    grid-template-columns: 1fr;
  }
  .home-photo-card {
    flex-direction: column;
  }
  .home-photo-img {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

/* v36 memories page simplification */
.memory-intro p {
  margin-bottom: 14px;
}
.memory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.memory-summary div {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255, 189, 205, 0.42);
  border-radius: 18px;
  padding: 12px 10px;
  text-align: center;
}
.memory-summary strong {
  display: block;
  font-size: 22px;
  color: var(--accent-strong);
  line-height: 1.1;
}
.memory-summary span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff4d8;
  color: #9a6a15;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}
.status-chip.strong {
  background: #ffe1ec;
  color: #b34364;
}
.display-grid {
  margin-bottom: 6px;
}
.library-grid .memory-card {
  border-style: dashed;
}
.library-grid .memory-card.home-selected {
  border-style: solid;
}
.upload-panel-bottom {
  margin-top: 18px;
  border: 1px dashed rgba(255, 140, 170, 0.55);
  background: rgba(255, 255, 255, 0.74);
}
.muted-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.simple-upload-form {
  grid-template-columns: 1fr;
}
.simple-upload-form .field,
.simple-upload-form .check-line,
.simple-upload-form button {
  grid-column: 1 / -1;
}
.memory-card .memory-info > p {
  min-height: auto;
}

@media (max-width: 560px) {
  .memory-summary {
    gap: 8px;
  }
  .memory-summary div {
    padding: 10px 6px;
    border-radius: 16px;
  }
  .memory-summary strong {
    font-size: 19px;
  }
  .memory-summary span {
    font-size: 11px;
  }
  .status-line {
    gap: 5px;
  }
  .status-chip,
  .tag,
  .memory-tag {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* v36 coupon request polish */
.coupon-request-panel {
  border-color: rgba(255, 155, 178, 0.32);
}
.compact-form {
  align-items: end;
}
.request-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 248, 0.9));
}
@media (max-width: 640px) {
  .compact-form {
    grid-template-columns: 1fr;
  }
  .coupon-request-panel .field,
  .coupon-request-panel .primary-btn {
    min-width: 0;
  }
}

/* v36 gacha animation and music control */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.music-toggle.on {
  background: linear-gradient(135deg, rgba(255, 231, 238, .95), rgba(255, 245, 210, .95));
  color: #b34364;
  font-weight: 800;
}
.gacha-panel { overflow: hidden; }
.gacha-stage {
  position: relative;
  min-height: 370px;
  padding: 18px 12px 22px;
}
.gacha-machine-wrap {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  margin: 0 auto;
}
.gacha-body b {
  position: absolute;
  left: 50%;
  bottom: 73px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #ffd36d 38%, #ff9a4d 70%);
  box-shadow: inset -3px -5px 10px rgba(173, 83, 30, .18);
}
.gacha-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ff8bab;
}
.gacha-status {
  width: fit-content;
  max-width: 100%;
  margin: -2px auto 12px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #a94b66;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
}
.draw-btn {
  min-width: 180px;
  min-height: 44px;
}
.gacha-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.gacha-sparkles span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff2a8;
  box-shadow: 0 0 18px rgba(255, 204, 93, .8);
}
.gacha-sparkles span:nth-child(1) { left: 14%; top: 18%; }
.gacha-sparkles span:nth-child(2) { left: 78%; top: 22%; background: #ffc4d3; }
.gacha-sparkles span:nth-child(3) { left: 22%; top: 68%; background: #beddff; }
.gacha-sparkles span:nth-child(4) { left: 82%; top: 66%; background: #b7f1d2; }
.gacha-sparkles span:nth-child(5) { left: 50%; top: 8%; }
.gacha-sparkles span:nth-child(6) { left: 50%; top: 78%; background: #ffc4d3; }
.gacha-capsule {
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translate(-50%, 0) scale(.55);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.76) 0 49%, transparent 49% 51%, rgba(255, 127, 162, .92) 51% 100%),
    radial-gradient(circle at 32% 28%, #fff, transparent 30%);
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 14px 26px rgba(210, 85, 116, .25);
}
.gacha-stage.drawing::before,
.gacha-stage.revealed::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 230px;
  height: 230px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.72), rgba(255, 201, 94, .24) 38%, transparent 70%);
  animation: glowPulse .9s ease-in-out infinite;
}
.gacha-stage.drawing .gacha-machine {
  animation: gachaBigShake .42s ease-in-out infinite;
}
.gacha-stage.drawing .gacha-globe span {
  animation: gachaBalls 0.56s linear infinite;
}
.gacha-stage.drawing .gacha-handle {
  animation: handleTurn .46s ease-in-out infinite;
}
.gacha-stage.drawing .gacha-capsule {
  opacity: 1;
  animation: capsuleDrop 1.35s ease-in-out infinite;
}
.gacha-stage.drawing .gacha-sparkles,
.gacha-stage.revealed .gacha-sparkles {
  opacity: 1;
}
.gacha-stage.drawing .gacha-sparkles span,
.gacha-stage.revealed .gacha-sparkles span {
  animation: sparklePop 1.1s ease-in-out infinite;
}
.gacha-stage.drawing .gacha-sparkles span:nth-child(2),
.gacha-stage.revealed .gacha-sparkles span:nth-child(2) { animation-delay: .15s; }
.gacha-stage.drawing .gacha-sparkles span:nth-child(3),
.gacha-stage.revealed .gacha-sparkles span:nth-child(3) { animation-delay: .3s; }
.gacha-stage.drawing .gacha-sparkles span:nth-child(4),
.gacha-stage.revealed .gacha-sparkles span:nth-child(4) { animation-delay: .45s; }
.gacha-stage.drawing .gacha-sparkles span:nth-child(5),
.gacha-stage.revealed .gacha-sparkles span:nth-child(5) { animation-delay: .6s; }
.gacha-stage.drawing .gacha-sparkles span:nth-child(6),
.gacha-stage.revealed .gacha-sparkles span:nth-child(6) { animation-delay: .75s; }
.gacha-result-pop {
  position: relative;
  overflow: hidden;
  animation: cardReveal .58s cubic-bezier(.2, 1.2, .2, 1) both;
}
.gacha-result-pop::after {
  content: "";
  position: absolute;
  inset: -60% -20%;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.78), transparent 65%);
  transform: translateX(-80%) rotate(8deg);
  animation: shineSweep 1.2s ease .2s both;
}
@keyframes gachaBigShake {
  0%, 100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-5deg) translateX(-3px); }
  50% { transform: rotate(3deg) translateY(-3px); }
  75% { transform: rotate(5deg) translateX(3px); }
}
@keyframes gachaBalls {
  0% { transform: translate(0,0) rotate(0); }
  25% { transform: translate(12px,18px) rotate(80deg); }
  50% { transform: translate(42px,8px) rotate(160deg); }
  75% { transform: translate(8px,42px) rotate(240deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}
@keyframes handleTurn {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(32deg); }
}
@keyframes capsuleDrop {
  0% { transform: translate(-50%, -52px) scale(.45); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translate(-50%, 28px) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, 46px) scale(.92); opacity: 0; }
}
@keyframes sparklePop {
  0%, 100% { transform: scale(.35); opacity: .2; }
  48% { transform: scale(1.8); opacity: 1; }
}
@keyframes glowPulse {
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: .72; }
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px) rotateX(18deg) scale(.88); }
  to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}
@keyframes shineSweep {
  to { transform: translateX(80%) rotate(8deg); }
}

@media (max-width: 520px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .topbar-actions .pill-btn { padding: 7px 10px; font-size: 12px; }
  .gacha-stage { min-height: 380px; padding-left: 8px; padding-right: 8px; }
  .gacha-machine { width: 188px; height: 214px; }
  .gacha-globe { left: 28px; width: 132px; height: 132px; }
  .gacha-body { left: 18px; right: 18px; height: 112px; }
  .gacha-status { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gacha-stage.drawing .gacha-machine,
  .gacha-stage.drawing .gacha-globe span,
  .gacha-stage.drawing .gacha-handle,
  .gacha-stage.drawing .gacha-capsule,
  .gacha-stage.drawing .gacha-sparkles span,
  .gacha-stage.revealed .gacha-sparkles span,
  .gacha-result-pop,
  .gacha-result-pop::after {
    animation: none !important;
  }
}

/* v36: gacha prize pool preview */
.pool-panel {
  overflow: hidden;
}
.inline-title {
  margin-bottom: 10px;
}
.pool-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}
.pool-summary span {
  border: 1px solid rgba(255, 143, 171, 0.24);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  color: #8b5b6a;
}
.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.pool-card {
  position: relative;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,244,248,.92));
  border: 1px solid rgba(255, 160, 185, 0.26);
  box-shadow: 0 12px 28px rgba(199, 94, 129, 0.10);
  overflow: hidden;
}
.pool-card::after {
  content: '';
  position: absolute;
  right: -18px;
  top: -18px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: rgba(255, 180, 205, .20);
}
.pool-card.rarity-SSR {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,239,210,.92));
  border-color: rgba(238, 176, 82, .34);
}
.pool-card.rarity-SR {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(238,244,255,.92));
  border-color: rgba(142, 168, 230, .30);
}
.pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.pool-type {
  font-size: 12px;
  color: #9b6b78;
}
.pool-card h4 {
  margin: 6px 0 6px;
  color: #5b3541;
  font-size: 16px;
}
.pool-card p {
  margin: 0;
  color: #85616c;
  font-size: 13px;
  line-height: 1.55;
}
.pool-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #a06d7b;
}
.pool-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(255, 160, 185, .18);
  margin: 8px 0;
}
.pool-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 560px) {
  .pool-grid {
    grid-template-columns: 1fr;
  }
  .pool-card {
    padding: 13px;
  }
}

/* v36: suspenseful gacha reel */
.gacha-reel {
  position: relative;
  width: min(100%, 620px);
  margin: 12px auto 14px;
  padding: 14px 12px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,246,250,.92));
  border: 1px solid rgba(255, 170, 195, .42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(255, 129, 165, .13);
  overflow: hidden;
}
.gacha-reel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 199, 215, .38), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(190, 221, 255, .32), transparent 30%);
  pointer-events: none;
}
.gacha-reel.active {
  animation: reelGlow 1.2s ease-in-out infinite alternate;
}
.reel-label {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 13px;
  color: #8d5262;
  margin-bottom: 10px;
}
.reel-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 10px;
  align-items: stretch;
  transition: transform .22s ease;
}
.reel-prize {
  min-height: 98px;
  padding: 12px 8px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255, 197, 211, .58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  color: #764351;
  transform: scale(.9);
  opacity: .48;
  filter: blur(.2px) saturate(.92);
  transition: transform .2s ease, opacity .2s ease, filter .2s ease, box-shadow .2s ease;
}
.reel-prize strong {
  font-size: 14px;
  line-height: 1.25;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel-prize small {
  font-size: 11px;
  color: #a36b79;
}
.reel-rarity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  background: #fff2f6;
  color: #d85d83;
  box-shadow: inset 0 0 0 1px rgba(255, 158, 184, .35);
}
.reel-prize.focus {
  transform: scale(1.08) translateY(-2px);
  opacity: 1;
  filter: none;
  background: linear-gradient(180deg, #fff, #fff4f8);
  border-color: rgba(255, 119, 158, .7);
  box-shadow: 0 18px 34px rgba(255, 119, 158, .22), 0 0 0 4px rgba(255, 229, 236, .9);
}
.reel-prize.rarity-SSR.focus {
  background: linear-gradient(135deg, #fff8d9, #fff, #ffe8f0);
  border-color: rgba(234, 184, 65, .78);
  box-shadow: 0 22px 44px rgba(218, 160, 55, .2), 0 0 0 5px rgba(255, 237, 173, .65);
}
.reel-prize.rarity-SR.focus {
  background: linear-gradient(135deg, #f4fbff, #fff, #fff2f7);
  border-color: rgba(119, 177, 238, .72);
}
.reel-pointer {
  position: relative;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #ff719c;
  margin: 8px auto 0;
  filter: drop-shadow(0 4px 6px rgba(255, 102, 143, .28));
}
.candidate-line {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: #a05a6b;
}
.gacha-reel.locked .reel-prize.focus {
  animation: finalPrizePulse 1.15s ease-in-out infinite;
}
.pool-panel .inline-title p {
  max-width: 720px;
}
@keyframes reelGlow {
  from { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(255, 129, 165, .13); }
  to { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 22px 58px rgba(255, 129, 165, .25); }
}
@keyframes finalPrizePulse {
  0%, 100% { transform: scale(1.08) translateY(-2px); }
  50% { transform: scale(1.13) translateY(-4px); }
}
@media (max-width: 680px) {
  .gacha-reel {
    padding: 12px 8px 16px;
    border-radius: 20px;
  }
  .reel-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .reel-track .reel-prize:nth-child(1),
  .reel-track .reel-prize:nth-child(5) {
    display: none;
  }
  .reel-prize {
    min-height: 92px;
    padding: 10px 6px;
  }
  .reel-prize strong {
    font-size: 13px;
  }
  .reel-label, .candidate-line {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gacha-reel.active,
  .gacha-reel.locked .reel-prize.focus {
    animation: none !important;
  }
}


.password-form input[type="password"] {
  width: 100%;
}

/* v36 all furniture asset upgrade */
.furniture-asset-model {
  width: 112px;
  height: 118px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 22px rgba(90, 45, 60, .18));
}
.furniture-asset-model img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.furniture-asset-model.asset-curtain {
  width: 132px;
  height: 104px;
}
.furniture-choice-card .furniture-asset-model {
  width: 118px;
  height: 112px;
}
.house-item-thumb .furniture-asset-model {
  width: 76px;
  height: 64px;
}
.house-item-thumb .furniture-asset-model.asset-curtain {
  width: 82px;
  height: 60px;
}
.house-webgl-stage {
  background: radial-gradient(circle at 28% 14%, rgba(255,255,255,.98), transparent 24%), linear-gradient(180deg,#fffafd,#fff2f7 42%,#fff7f0);
}
.house-scene-tip::after {
  content: " · v36";
  opacity: .55;
}
@media (max-width: 520px) {
  .furniture-choice-card .furniture-asset-model { width: 82px; height: 76px; }
}


.house-theme-select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(235, 191, 205, .9);
  background: rgba(255,255,255,.92);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.house-theme-select:focus {
  border-color: rgba(230, 132, 173, .95);
  box-shadow: 0 0 0 4px rgba(242, 190, 214, .24);
}
.field-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.theme-inline-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,244,248,.92));
  border: 1px solid rgba(245, 198, 214, .9);
  box-shadow: 0 14px 30px rgba(186, 101, 132, .08);
}
.theme-inline-card strong { font-size: 16px; color: #7d4860; }
.theme-inline-card span { color: #cf7097; font-size: 13px; font-weight: 700; }
.theme-inline-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.choice-furniture-visual {
  height: 98px;
  display: grid;
  align-items: end;
  justify-items: center;
  margin-bottom: 8px;
}
.furniture-choice-card {
  min-height: 196px;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding-top: 16px;
}
.furniture-choice-card strong {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}
.furniture-choice-card small {
  text-align: center;
  margin-top: 4px;
  line-height: 1.5;
}
.furniture-asset-model {
  width: 114px;
  height: 118px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 22px rgba(90, 45, 60, .16));
}
.furniture-choice-card .furniture-asset-model {
  width: 118px;
  height: 108px;
}
.furniture-choice-card .furniture-asset-model.asset-curtain {
  width: 124px;
  height: 90px;
}
.furniture-choice-card .furniture-asset-model.asset-flowerpot {
  width: 110px;
  height: 96px;
  margin-top: 2px;
}
.house-item-thumb {
  width: 88px;
  min-width: 88px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.house-item-thumb .furniture-asset-model {
  width: 84px;
  height: 68px;
}
.house-item-thumb .furniture-asset-model.asset-curtain {
  width: 88px;
  height: 60px;
}
.house-item-thumb .furniture-asset-model.asset-flowerpot {
  width: 78px;
  height: 62px;
}
.house-item-main {
  align-items: center;
}
.house-scene-tip::after {
  content: " · v36";
  opacity: .55;
}
@media (max-width: 520px) {
  .choice-furniture-visual { height: 82px; }
  .furniture-choice-card { min-height: 182px; }
  .furniture-choice-card .furniture-asset-model { width: 88px; height: 80px; }
  .furniture-choice-card .furniture-asset-model.asset-curtain { width: 96px; height: 68px; }
  .furniture-choice-card .furniture-asset-model.asset-flowerpot { width: 90px; height: 74px; }
}


.house3d-viewport canvas {
  background: transparent !important;
}
.house-fallback-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.95), transparent 22%), linear-gradient(180deg, #fffafc 0%, #fff1f6 44%, #fff6ef 100%);
}
.house-fallback-stage.theme-twilight {
  background: radial-gradient(circle at 30% 16%, rgba(255,255,255,.68), transparent 24%), linear-gradient(180deg, #f3efff 0%, #ece8ff 40%, #f4edf8 100%);
}
.house-fallback-stage.theme-starlight {
  background: radial-gradient(circle at 30% 16%, rgba(255,255,255,.76), transparent 22%), linear-gradient(180deg, #edf4ff 0%, #e9f0ff 44%, #f1edff 100%);
}
.house-fallback-stage.theme-garden {
  background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.82), transparent 22%), linear-gradient(180deg, #f5fbf1 0%, #eef8ea 40%, #f7f4ea 100%);
}
.fallback-room {
  position: absolute;
  border-radius: 20px;
}
.fallback-room.back-wall {
  left: 10%; top: 9%; width: 80%; height: 48%;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,238,245,.92));
  box-shadow: inset 0 -6px 24px rgba(203, 145, 169, .14);
}
.fallback-room.side-wall.left, .fallback-room.side-wall.right {
  top: 18%; width: 16%; height: 46%; background: linear-gradient(180deg, rgba(255,255,255,.68), rgba(252,234,240,.8)); opacity: .75;
}
.fallback-room.side-wall.left { left: 4%; transform: skewY(14deg); }
.fallback-room.side-wall.right { right: 4%; transform: skewY(-14deg); }
.fallback-room.floor {
  left: 8%; bottom: -6%; width: 84%; height: 42%; border-radius: 48% 48% 0 0 / 18% 18% 0 0;
  background: linear-gradient(180deg, rgba(238, 211, 197, .55), rgba(222, 183, 162, .86));
  box-shadow: inset 0 12px 30px rgba(255,255,255,.38);
}
.fallback-window {
  position: absolute; left: 15%; top: 18%; width: 20%; height: 18%; border-radius: 18px; border: 8px solid rgba(255,255,255,.86);
  background: linear-gradient(180deg, #eaf6ff, #d9ecff);
  box-shadow: 0 10px 20px rgba(117, 168, 212, .12);
}
.house-fallback-item {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none; filter: drop-shadow(0 20px 24px rgba(93, 57, 73, .18));
}
.house-fallback-item img { width: 100%; height: auto; display: block; }
.house-fallback-item.preview { opacity: .78; filter: drop-shadow(0 14px 16px rgba(204, 105, 150, .18)); }
.house-fallback-item.asset-rug { z-index: 1; }
.house-fallback-item.asset-bed, .house-fallback-item.asset-sofa { z-index: 3; }
.house-fallback-item.asset-curtain, .house-fallback-item.asset-star { z-index: 4; }
.house-fallback-item.asset-lamp, .house-fallback-item.asset-flowerpot, .house-fallback-item.asset-bookshelf { z-index: 5; }
.house-fallback-item.asset-bear, .house-fallback-item.asset-cat { z-index: 6; }
.fallback-note {
  position: absolute; left: 18px; right: 18px; bottom: 18px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.72); color: #8b5b70; font-size: 12px; text-align: center; backdrop-filter: blur(8px);
}
@media (max-width: 720px) {
  .house-fallback-stage { min-height: 360px; }
  .fallback-note { font-size: 11px; }
}

/* v36 real image assets for bed / sofa / bear */
.furniture-asset-model.asset-bed,
.furniture-asset-model.asset-sofa,
.furniture-asset-model.asset-bear {
  filter: drop-shadow(0 18px 24px rgba(84, 54, 42, .18));
}
.furniture-choice-card .furniture-asset-model.asset-bed {
  width: 138px;
  height: 108px;
}
.furniture-choice-card .furniture-asset-model.asset-sofa {
  width: 138px;
  height: 100px;
}
.furniture-choice-card .furniture-asset-model.asset-bear {
  width: 110px;
  height: 116px;
}
.house-item-thumb .furniture-asset-model.asset-bed,
.house-item-thumb .furniture-asset-model.asset-sofa {
  width: 88px;
  height: 66px;
}
.house-item-thumb .furniture-asset-model.asset-bear {
  width: 70px;
  height: 70px;
}
@media (max-width: 520px) {
  .furniture-choice-card .furniture-asset-model.asset-bed,
  .furniture-choice-card .furniture-asset-model.asset-sofa { width: 106px; height: 78px; }
  .furniture-choice-card .furniture-asset-model.asset-bear { width: 82px; height: 86px; }
}

/* v36 resource normalization + online log */
.online-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.online-summary div,
.online-card {
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(245,198,214,.85);
  box-shadow: 0 14px 30px rgba(174, 96, 126, .08);
  padding: 14px 16px;
}
.online-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.online-summary strong {
  color: #7c4b61;
  font-size: 15px;
}
.online-list {
  display: grid;
  gap: 12px;
}
.online-card strong {
  color: #7c4b61;
}
@media (max-width: 720px) {
  .online-summary { grid-template-columns: 1fr; }
}

/* v36 free placement house editor */
.house-free-panel { overflow: hidden; }
.house-free-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
  gap: 18px;
  align-items: stretch;
}
.house-free-stage {
  position: relative;
  min-height: 560px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  background: radial-gradient(circle at 24% 12%, rgba(255,255,255,.95), transparent 22%), linear-gradient(180deg, #fffafc 0%, #fff0f6 42%, #fff7ef 100%);
  box-shadow: 0 28px 80px rgba(150, 92, 112, .16);
  touch-action: none;
  user-select: none;
}
.house-free-stage.theme-twilight { background: radial-gradient(circle at 28% 14%, rgba(255,255,255,.72), transparent 24%), linear-gradient(180deg,#f5f1ff 0%,#eee8ff 44%,#f8eff6 100%); }
.house-free-stage.theme-starlight { background: radial-gradient(circle at 28% 14%, rgba(255,255,255,.72), transparent 24%), linear-gradient(180deg,#eef5ff 0%,#edf1ff 44%,#f5edff 100%); }
.house-free-stage.theme-garden { background: radial-gradient(circle at 24% 14%, rgba(255,255,255,.82), transparent 22%), linear-gradient(180deg,#f6fbf2 0%,#edf8ea 42%,#fbf4ea 100%); }
.house-free-wall,
.house-free-floor,
.house-free-window { position: absolute; pointer-events: none; }
.house-free-wall {
  left: 7%; top: 7%; width: 86%; height: 50%;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,238,245,.86));
  box-shadow: inset 0 -12px 34px rgba(195, 128, 154, .12);
}
.house-free-floor {
  left: 5%; right: 5%; bottom: -9%; height: 48%;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background: linear-gradient(180deg, rgba(236, 210, 196, .62), rgba(218, 181, 160, .92));
  box-shadow: inset 0 18px 34px rgba(255,255,255,.34);
}
.house-free-window {
  left: 13%; top: 18%; width: 22%; height: 18%;
  border-radius: 20px;
  border: 8px solid rgba(255,255,255,.9);
  background: linear-gradient(180deg, #e8f5ff, #d9ebff);
  box-shadow: 0 12px 28px rgba(99, 150, 202, .12);
}
.house-free-item,
.house-free-preview {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 18px 22px rgba(73, 48, 62, .18));
}
.house-free-item img,
.house-free-preview img { width: 100%; height: auto; display: block; pointer-events: none; user-select: none; }
.house-free-item em {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
  font-style: normal;
  font-size: 11px;
  color: #8c596d;
  background: rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 3px 8px;
  box-shadow: 0 8px 18px rgba(120,75,90,.1);
}
.house-free-item.selected em,
.house-free-item:hover em { display: block; }
.house-free-item.selected {
  outline: 2px solid rgba(236, 128, 171, .9);
  outline-offset: 6px;
  border-radius: 18px;
  filter: drop-shadow(0 20px 26px rgba(183, 78, 121, .24));
}
.house-free-item.dragging { cursor: grabbing; filter: drop-shadow(0 26px 34px rgba(118, 70, 94, .28)); }
.house-free-item .move-dot {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff8eb7;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 6px 14px rgba(207,92,139,.28);
}
.house-free-preview { opacity: .42; pointer-events: none; filter: grayscale(.1) drop-shadow(0 14px 18px rgba(190, 98, 137, .14)); }
.house-free-item.asset-bed, .house-free-preview.asset-bed { width: 35%; }
.house-free-item.asset-sofa, .house-free-preview.asset-sofa { width: 30%; }
.house-free-item.asset-rug, .house-free-preview.asset-rug { width: 31%; z-index: 22 !important; }
.house-free-item.asset-lamp, .house-free-preview.asset-lamp { width: 13%; }
.house-free-item.asset-bear, .house-free-preview.asset-bear { width: 13%; }
.house-free-item.asset-photo, .house-free-preview.asset-photo { width: 12%; }
.house-free-item.asset-star, .house-free-preview.asset-star { width: 18%; }
.house-free-item.asset-cat, .house-free-preview.asset-cat { width: 14%; }
.house-free-item.asset-flowerpot, .house-free-preview.asset-flowerpot { width: 13%; }
.house-free-item.asset-curtain, .house-free-preview.asset-curtain { width: 22%; }
.house-free-item.asset-desk, .house-free-preview.asset-desk { width: 16%; }
.house-free-item.asset-bookshelf, .house-free-preview.asset-bookshelf { width: 14%; }
.house-free-item.asset-nightstand, .house-free-preview.asset-nightstand { width: 12%; }
.house-free-item.asset-clock, .house-free-preview.asset-clock { width: 7%; }
.house-free-item.child-item { filter: drop-shadow(0 12px 16px rgba(73,48,62,.15)); }
.house-free-tip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  color: #8b5b70;
  font-size: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.selected-item-panel,
.parent-target-chip {
  border: 1px solid rgba(242, 198, 214, .95);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,245,248,.9));
  box-shadow: 0 14px 28px rgba(183, 96, 130, .08);
}
.selected-item-panel p,
.parent-target-chip { color: var(--muted); line-height: 1.65; }
.muted-panel,
.parent-target-chip.muted { opacity: .82; }
.parent-target-chip button {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  margin-left: 8px;
  background: rgba(255, 138, 181, .16);
  color: #b6507a;
  cursor: pointer;
}
.house-item-card.active { border-color: rgba(235, 132, 174, .85); box-shadow: 0 16px 32px rgba(205, 99, 143, .12); }
@media (max-width: 900px) {
  .house-free-layout { grid-template-columns: 1fr; }
  .house-free-stage { min-height: 500px; }
}
@media (max-width: 520px) {
  .house-free-stage { min-height: 420px; border-radius: 24px; }
  .house-free-item.asset-bed, .house-free-preview.asset-bed { width: 42%; }
  .house-free-item.asset-sofa, .house-free-preview.asset-sofa { width: 36%; }
  .house-free-item.asset-rug, .house-free-preview.asset-rug { width: 40%; }
  .house-free-item.asset-bear, .house-free-preview.asset-bear,
  .house-free-item.asset-flowerpot, .house-free-preview.asset-flowerpot { width: 17%; }
  .house-free-item.asset-nightstand, .house-free-preview.asset-nightstand { width: 15%; }
  .house-free-item.asset-clock, .house-free-preview.asset-clock { width: 10%; }
}

/* v36 fixed best-view free placement room */
.house-free-panel { overflow: hidden; }
.house-free-stage {
  background:
    radial-gradient(circle at 23% 13%, rgba(255,255,255,.98), transparent 24%),
    linear-gradient(180deg, #fffafc 0%, #fff0f6 42%, #fff7ef 100%) !important;
  perspective: 1100px;
  isolation: isolate;
}
.house-free-stage::before,
.house-free-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.house-free-stage::before {
  left: 4%;
  top: 14%;
  width: 18%;
  height: 47%;
  border-radius: 26px 16px 18px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,232,241,.76));
  transform: skewY(11deg);
  box-shadow: inset -10px 0 26px rgba(180,120,145,.10);
}
.house-free-stage::after {
  right: 3%;
  top: 12%;
  width: 18%;
  height: 48%;
  border-radius: 16px 26px 26px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,232,241,.72));
  transform: skewY(-12deg);
  box-shadow: inset 10px 0 26px rgba(180,120,145,.10);
}
.house-free-wall {
  left: 14%;
  top: 8%;
  width: 72%;
  height: 50%;
  z-index: 2;
  border-radius: 30px 30px 22px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,236,244,.90));
  box-shadow: inset 0 -16px 40px rgba(196,126,154,.12), 0 18px 34px rgba(170,100,130,.08);
}
.house-free-floor {
  left: 7%;
  right: 7%;
  bottom: -8%;
  height: 48%;
  z-index: 3;
  border-radius: 18px 18px 0 0;
  clip-path: polygon(15% 6%, 85% 6%, 100% 100%, 0% 100%);
  background:
    repeating-linear-gradient(90deg, rgba(158,111,86,.08) 0 2px, transparent 2px 72px),
    linear-gradient(180deg, rgba(239,213,198,.72), rgba(216,178,156,.94));
  box-shadow: inset 0 18px 34px rgba(255,255,255,.36), 0 -12px 30px rgba(155,100,78,.10);
}
.house-free-window {
  left: 17%;
  top: 19%;
  width: 20%;
  height: 18%;
  z-index: 4;
}
.house-free-item,
.house-free-preview { z-index: 20; }
.house-free-item.selected {
  outline: 2px solid rgba(236, 128, 171, .92);
  outline-offset: 7px;
}
.house-free-tip {
  z-index: 80;
  background: rgba(255,255,255,.82);
}
.house-free-item .move-dot {
  background: #ff83b1;
}
.selected-item-panel p { line-height: 1.65; }
@media (max-width: 720px) {
  .house-free-wall { left: 11%; width: 78%; }
  .house-free-stage::before, .house-free-stage::after { width: 15%; }
}

/* v39 rebuilt 2.5D realistic cozy room decorator */
.v39-house-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,246,250,.88));
  border: 1px solid rgba(255,255,255,.92);
}
.v39-house-layout {
  grid-template-columns: minmax(0, 1.72fr) minmax(270px, .78fr);
}
.v39-room-stage {
  position: relative;
  min-height: 610px;
  border-radius: 34px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #fffafd 0%, #fff1f7 48%, #f6dfcd 100%) !important;
  box-shadow: 0 34px 90px rgba(142, 86, 111, .20), inset 0 0 0 1px rgba(255,255,255,.72);
  perspective: 1200px;
  touch-action: none;
}
.v39-room-stage.theme-garden {
  background: linear-gradient(180deg, #fbfff8 0%, #f0f9e8 45%, #f3dfca 100%) !important;
}
.v39-room-stage.theme-twilight {
  background: linear-gradient(180deg, #f9f5ff 0%, #efe9ff 45%, #ead6cf 100%) !important;
}
.v39-room-stage.theme-starlight {
  background: linear-gradient(180deg, #f2f8ff 0%, #edf0ff 45%, #eadbd2 100%) !important;
}
.v39-room-back,
.v39-room-left,
.v39-room-right,
.v39-room-floor,
.v39-room-window,
.v39-room-shelf,
.v39-light { position: absolute; pointer-events: none; }
.v39-room-back {
  z-index: 2;
  left: 14%; top: 7%; width: 72%; height: 52%;
  border-radius: 34px 34px 24px 24px;
  background:
    radial-gradient(circle at 52% 10%, rgba(255,255,255,.95), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,234,243,.94));
  box-shadow: inset 0 -18px 42px rgba(198,130,157,.14), 0 18px 40px rgba(168, 98, 126, .09);
}
.v39-room-left {
  z-index: 1;
  left: 3.5%; top: 15%; width: 20%; height: 49%;
  border-radius: 30px 14px 18px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.64), rgba(255,229,239,.82));
  transform: skewY(12deg);
  box-shadow: inset -12px 0 30px rgba(174,112,137,.13);
}
.v39-room-right {
  z-index: 1;
  right: 3.5%; top: 13%; width: 20%; height: 50%;
  border-radius: 14px 30px 30px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,229,239,.78));
  transform: skewY(-12deg);
  box-shadow: inset 12px 0 30px rgba(174,112,137,.13);
}
.v39-room-floor {
  z-index: 5;
  left: 6%; right: 6%; bottom: -4%; height: 49%;
  clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0 100%);
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255,255,255,.40), transparent 38%),
    repeating-linear-gradient(90deg, rgba(140,100,78,.085) 0 2px, transparent 2px 72px),
    linear-gradient(180deg, rgba(237,210,194,.84), rgba(207,166,142,.98));
  box-shadow: inset 0 22px 38px rgba(255,255,255,.28), 0 -16px 34px rgba(150, 95, 73, .14);
}
.v39-room-window {
  z-index: 7;
  left: 18%; top: 18%; width: 19%; height: 18%;
  border-radius: 22px;
  border: 8px solid rgba(255,255,255,.94);
  background: linear-gradient(180deg, #e7f6ff, #d7eaff);
  box-shadow: 0 14px 28px rgba(96,142,186,.13), inset 0 0 20px rgba(255,255,255,.62);
}
.v39-room-window::before,
.v39-room-window::after {
  content: ""; position: absolute; background: rgba(255,255,255,.78); border-radius: 999px;
}
.v39-room-window::before { left: 48%; top: 0; width: 5px; height: 100%; }
.v39-room-window::after { left: 0; top: 47%; width: 100%; height: 5px; }
.v39-room-window span {
  position: absolute; left: -18%; right: -18%; top: -18%; height: 20px;
  background: linear-gradient(90deg, #e8b7c8, #fff3f7, #e8b7c8);
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(168,89,120,.10);
}
.v39-room-window i {
  position: absolute; right: -20%; bottom: -42%; width: 32%; height: 78%;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,223,234,.92), rgba(244,181,205,.85));
  box-shadow: 0 10px 20px rgba(176,90,126,.12);
}
.v39-room-shelf {
  z-index: 8;
  right: 19%; top: 29%; width: 18%; height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8c8ae, #c89472);
  box-shadow: 0 12px 18px rgba(135,81,53,.14);
}
.v39-light {
  z-index: 4;
  border-radius: 50%;
  filter: blur(20px);
  opacity: .72;
  background: rgba(255, 236, 194, .86);
}
.v39-light.light-a { left: 8%; top: 4%; width: 34%; height: 30%; }
.v39-light.light-b { right: 12%; top: 18%; width: 28%; height: 24%; opacity: .42; }
.v39-room-item,
.v39-preview {
  width: var(--item-w, 14%) !important;
  z-index: 30;
  transform-origin: 50% 100%;
  transition: filter .18s ease, transform .18s ease, outline-color .18s ease;
}
.v39-room-item.anchor-bottom,
.v39-preview.anchor-bottom { transform: translate(-50%, -100%); }
.v39-room-item.anchor-center,
.v39-preview.anchor-center { transform: translate(-50%, -50%); }
.v39-room-item img,
.v39-preview img {
  position: relative;
  z-index: 2;
  width: 100%;
  display: block;
  filter: saturate(1.04) contrast(1.02);
}
.v39-room-item .item-shadow,
.v39-preview .item-shadow {
  position: absolute;
  z-index: 1;
  left: 18%; right: 18%; bottom: 4%; height: 13%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(76,47,39,.24), transparent 68%);
  filter: blur(3px);
  transform: translateY(28%);
}
.v39-room-item.asset-rug .item-shadow,
.v39-preview.asset-rug .item-shadow,
.v39-room-item.asset-star .item-shadow,
.v39-preview.asset-star .item-shadow,
.v39-room-item.asset-curtain .item-shadow,
.v39-preview.asset-curtain .item-shadow,
.v39-room-item.asset-photo .item-shadow,
.v39-preview.asset-photo .item-shadow { display: none; }
.v39-room-item:hover { filter: drop-shadow(0 24px 30px rgba(94,58,76,.22)); }
.v39-room-item.selected {
  outline: 2px solid rgba(255, 124, 176, .96);
  outline-offset: 8px;
  border-radius: 22px;
  filter: drop-shadow(0 26px 32px rgba(191, 80, 126, .24));
}
.v39-room-item.selected::after {
  content: "";
  position: absolute;
  left: -12%; right: -12%; top: -12%; bottom: -12%;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(255,177,210,.22), transparent 64%);
  z-index: -1;
  animation: v39Pulse 1.8s ease-in-out infinite;
}
@keyframes v39Pulse { 0%,100%{opacity:.5; transform:scale(.98);} 50%{opacity:1; transform:scale(1.03);} }
.v39-room-item.dragging {
  transform: translate(-50%, -100%) scale(1.04);
  filter: drop-shadow(0 34px 42px rgba(94,58,76,.30));
}
.v39-room-item.dragging.anchor-center { transform: translate(-50%, -50%) scale(1.04); }
.v39-room-item em { bottom: -25px; font-weight: 800; }
.v39-room-item b {
  position: absolute;
  left: 50%; bottom: -44px;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
  font-size: 10px;
  color: #a0667c;
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(120,75,90,.08);
}
.v39-room-item.selected b { display: block; }
.v39-parent-glow {
  position: absolute;
  z-index: 25;
  width: 18%; height: 9%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 145, 190, .38), rgba(255, 255, 255, .16) 48%, transparent 72%);
  border: 1px dashed rgba(230, 103, 157, .65);
  pointer-events: none;
  animation: v39Glow 1.4s ease-in-out infinite;
}
@keyframes v39Glow { 0%,100%{opacity:.52;} 50%{opacity:1;} }
.v39-preview { opacity: .52; pointer-events: none; filter: grayscale(.02) drop-shadow(0 16px 20px rgba(190, 98, 137, .17)); }
.v39-room-tip {
  z-index: 200;
  left: 18px; right: 18px; bottom: 16px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.96);
  box-shadow: 0 12px 24px rgba(145,86,112,.12);
}
.v39-side-card { gap: 14px; }
.v39-inspector strong { color: #7b4258; }
.v39-parent-chip { font-weight: 700; }
.v39-builder-panel { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,250,.90)); }
.house-catalog-group {
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(248, 211, 224, .88);
  background: rgba(255,255,255,.66);
  box-shadow: 0 14px 28px rgba(190, 98, 137, .06);
  margin-bottom: 12px;
}
.house-catalog-group h4 {
  margin: 0 0 10px;
  color: #8b4e68;
  font-size: 14px;
}
.v39-catalog-grid { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.v39-furniture-card .choice-furniture-visual {
  min-height: 105px;
  display: grid;
  place-items: center;
}
.v39-furniture-card img { max-height: 112px; object-fit: contain; }
.v39-furniture-card small { min-height: 36px; }
@media (max-width: 900px) {
  .v39-house-layout { grid-template-columns: 1fr; }
  .v39-room-stage { min-height: 560px; }
}
@media (max-width: 560px) {
  .v39-room-stage { min-height: 500px; border-radius: 26px; }
  .v39-room-back { left: 10%; width: 80%; }
  .v39-room-left, .v39-room-right { width: 17%; }
  .v39-room-item.asset-bed, .v39-preview.asset-bed { --item-w: 46% !important; }
  .v39-room-item.asset-sofa, .v39-preview.asset-sofa { --item-w: 40% !important; }
  .v39-room-item.asset-rug, .v39-preview.asset-rug { --item-w: 44% !important; }
  .v39-room-item.asset-bear, .v39-preview.asset-bear,
  .v39-room-item.asset-flowerpot, .v39-preview.asset-flowerpot { --item-w: 18% !important; }
  .v39-room-item.asset-nightstand, .v39-preview.asset-nightstand { --item-w: 16% !important; }
  .v39-room-item.asset-clock, .v39-preview.asset-clock { --item-w: 10% !important; }
  .v39-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================= v40 room decorating game rebuild ================= */
.house-game-shell{position:relative;margin:-8px -6px 22px;border-radius:32px;overflow:hidden;background:linear-gradient(180deg,#fff7f5,#ffeef3 58%,#fff8f2);box-shadow:0 28px 80px rgba(165,93,83,.22);border:1px solid rgba(255,255,255,.86)}
.house-game-hud{display:flex;align-items:center;gap:10px;padding:14px 14px 8px;background:linear-gradient(180deg,rgba(255,250,246,.96),rgba(255,236,239,.76));backdrop-filter:blur(16px);position:relative;z-index:10}.house-round-btn{width:42px;height:42px;border:0;border-radius:50%;background:linear-gradient(180deg,#fff,#ffe8df);box-shadow:0 8px 22px rgba(148,83,71,.18);font-size:25px;color:#9b6659}.house-player{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.house-player>span{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(160deg,#ffd8e2,#fff6ed);box-shadow:inset 0 0 0 3px rgba(255,255,255,.8);font-size:23px}.house-player strong{display:block;color:#8b524a;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.house-player small{display:block;color:#b28275;font-size:11px}.house-currency{display:flex;gap:7px;align-items:center}.house-currency span{border-radius:999px;padding:8px 10px;background:rgba(255,255,255,.74);box-shadow:inset 0 0 0 1px rgba(255,212,202,.7);font-weight:800;color:#9e6256;font-size:12px;white-space:nowrap}.house-title-plaque{position:relative;z-index:11;margin:0 auto -18px;width:min(360px,74%);padding:10px 16px;border-radius:22px;text-align:center;background:linear-gradient(180deg,#fffdf8,#fff0e5);box-shadow:0 12px 28px rgba(151,83,72,.16),inset 0 0 0 2px rgba(255,217,202,.88);border:1px solid rgba(255,255,255,.8)}.house-title-plaque b{display:block;color:#d26b78;font-size:22px;letter-spacing:1px}.house-title-plaque span{display:block;font-size:11px;color:#b88672;text-transform:uppercase;letter-spacing:.12em}.house-game-main{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:14px;padding:28px 14px 10px}.house-game-stage{position:relative;min-height:620px;border-radius:30px;overflow:hidden;background:#fff0ea;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 18px 45px rgba(143,86,69,.18);touch-action:none}.house-game-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}.house-game-vignette{position:absolute;inset:0;background:radial-gradient(circle at 26% 18%,rgba(255,250,211,.34),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.02),rgba(105,58,45,.20));pointer-events:none}.house-game-tip{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);z-index:1050;padding:10px 18px;border-radius:999px;background:rgba(255,250,242,.88);box-shadow:0 10px 28px rgba(111,62,50,.20);color:#a26055;font-weight:800;font-size:13px;white-space:nowrap}.house-game-item,.house-game-preview{position:absolute;width:var(--item-w);border:0;background:transparent;transform:translate(-50%,-100%);padding:0;cursor:grab;touch-action:none;z-index:50;filter:drop-shadow(0 16px 12px rgba(84,47,39,.20));transition:filter .18s ease, transform .18s ease}.house-game-preview{opacity:.55;pointer-events:none;z-index:1040}.house-game-item.anchor-center,.house-game-preview.anchor-center{transform:translate(-50%,-50%)}.house-game-item img,.house-game-preview img{width:100%;height:auto;display:block;pointer-events:none;user-select:none}.house-game-item.dragging{cursor:grabbing;filter:drop-shadow(0 22px 18px rgba(87,45,38,.28)) brightness(1.04);transform:translate(-50%,-100%) scale(1.04)}.house-game-item.anchor-center.dragging{transform:translate(-50%,-50%) scale(1.04)}.game-item-shadow{position:absolute;left:18%;right:18%;bottom:2%;height:14%;border-radius:50%;background:radial-gradient(ellipse at center,rgba(88,54,39,.22),transparent 66%);z-index:-1}.house-game-item.selected{filter:drop-shadow(0 0 0 rgba(255,255,255,0)) drop-shadow(0 0 16px rgba(255,249,227,.98)) drop-shadow(0 0 26px rgba(255,133,158,.82))}.house-game-item.selected:after{content:'';position:absolute;inset:-7%;border:2px dashed rgba(255,255,255,.92);border-radius:26px;box-shadow:0 0 0 3px rgba(255,126,151,.42),0 0 20px rgba(255,202,95,.55);animation:gamePulse 1.4s ease-in-out infinite}.game-move-dot{position:absolute;right:5%;top:8%;width:18px;height:18px;border-radius:50%;background:linear-gradient(180deg,#fff,#ff8fa5);box-shadow:0 4px 12px rgba(170,73,86,.35);opacity:0}.house-game-item.selected .game-move-dot{opacity:1}.game-item-name,.house-game-item small{position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;pointer-events:none;opacity:0}.game-item-name{bottom:-18px;padding:5px 10px;border-radius:999px;background:rgba(255,250,247,.94);color:#a55c54;font-size:12px;font-weight:900;box-shadow:0 6px 16px rgba(123,67,60,.2)}.house-game-item small{bottom:-37px;color:#fff;background:rgba(142,85,77,.72);border-radius:999px;padding:3px 8px;font-size:10px}.house-game-item.selected .game-item-name,.house-game-item.selected small{opacity:1}.room-side-btn,.room-tool-btn{position:absolute;z-index:1100;border:0;border-radius:20px;background:linear-gradient(180deg,#fffdf8,#ffe8df);box-shadow:0 10px 26px rgba(123,70,58,.22);color:#9b5c50;font-weight:900;display:grid;place-items:center;gap:2px}.room-side-btn{right:15px;width:70px;height:70px}.room-side-btn.daily{top:74px}.room-side-btn.shop{top:154px}.room-tool-btn{width:82px;height:58px;font-size:20px}.room-tool-btn span,.room-side-btn span{font-size:11px;display:block}.room-tool-btn.layout{left:16px;bottom:86px}.room-tool-btn.undo{left:16px;bottom:18px}.room-tool-btn.save{right:104px;bottom:18px}.room-tool-btn.refresh{right:15px;bottom:18px}.room-tool-btn:hover,.room-side-btn:hover{transform:translateY(-1px);filter:brightness(1.02)}.house-game-side{border-radius:28px;background:rgba(255,250,246,.88);box-shadow:inset 0 0 0 1px rgba(255,218,207,.74),0 12px 28px rgba(142,84,70,.12);padding:14px;display:flex;flex-direction:column;gap:12px;min-width:0}.side-pill{align-self:flex-start;border-radius:999px;background:linear-gradient(90deg,#ff8fa8,#ffc28d);color:white;font-size:12px;font-weight:900;padding:7px 12px}.chosen-preview{border-radius:22px;background:linear-gradient(180deg,#fff,#fff4ee);box-shadow:inset 0 0 0 1px rgba(255,216,207,.76);padding:12px;text-align:center}.chosen-preview img{height:130px;max-width:100%;object-fit:contain;filter:drop-shadow(0 10px 10px rgba(107,61,52,.18))}.chosen-preview strong{display:block;color:#9c5d52;font-size:16px}.chosen-preview p{margin:4px 0 0;color:#b18275;font-size:12px}.house-game-inspector{border-radius:20px;background:#fff9f5;padding:12px;box-shadow:inset 0 0 0 1px rgba(255,216,207,.72)}.house-game-inspector.active{background:linear-gradient(180deg,#fff,#fff0f3)}.inspector-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.inspector-title strong{color:#89554d}.inspector-title span{font-size:11px;color:#c67a74}.house-game-inspector p{color:#a97870;font-size:12px;margin:8px 0}.game-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.game-action-btn{border:0;border-radius:15px;background:linear-gradient(180deg,#fff,#ffe8e0);color:#a15d54;font-weight:900;padding:9px 8px;box-shadow:0 6px 14px rgba(135,76,66,.12)}.game-action-btn.danger{background:linear-gradient(180deg,#fff2f4,#ffd7df);color:#c13f58}.house-game-parent{border-radius:16px;padding:10px;background:#fff4ec;color:#9d655c;font-size:12px}.house-game-parent button{margin-left:6px;border:0;border-radius:10px;padding:4px 8px;background:#ff9aad;color:white}.house-game-parent.muted{color:#b78b82;background:#fff9f4}.house-theme-field{display:grid;gap:6px;color:#9e6256;font-size:12px;font-weight:900}.house-game-side textarea{min-height:66px;border:1px solid rgba(228,174,161,.65);border-radius:16px;padding:10px;background:rgba(255,255,255,.8);resize:vertical;color:#8f5d54}.house-game-drawer{margin:0 14px 14px;border-radius:30px;background:linear-gradient(180deg,rgba(255,253,248,.98),rgba(255,238,231,.96));box-shadow:0 -4px 28px rgba(136,80,67,.14),inset 0 0 0 1px rgba(255,217,205,.86);padding:14px}.drawer-header{display:flex;justify-content:space-between;align-items:center;padding:0 6px 10px}.drawer-header strong{color:#92584f;font-size:18px}.drawer-header span{color:#b88679;font-size:12px}.house-game-cats{display:flex;gap:8px;overflow-x:auto;padding:2px 4px 10px}.house-game-cat{flex:0 0 auto;border:0;border-radius:18px;padding:10px 14px;background:#fff8f1;color:#9b6257;font-weight:900;box-shadow:inset 0 0 0 1px rgba(232,180,164,.65)}.house-game-cat span{margin-right:5px}.house-game-cat.active{background:linear-gradient(180deg,#ff8fa8,#ff6f8e);color:#fff;box-shadow:0 8px 18px rgba(209,86,111,.25)}.house-game-cards{display:grid;grid-auto-flow:column;grid-auto-columns:150px;gap:12px;overflow-x:auto;padding:4px 4px 8px}.house-game-card{position:relative;border:0;border-radius:22px;background:linear-gradient(180deg,#fff,#fff6ee);box-shadow:inset 0 0 0 1px rgba(238,190,174,.7),0 8px 18px rgba(133,77,66,.09);padding:10px;text-align:center;color:#9b5e54}.house-game-card.active{box-shadow:0 0 0 3px #ff7e99,0 10px 24px rgba(209,86,111,.25);background:linear-gradient(180deg,#fff7fb,#fff)}.house-game-card-img{height:112px;display:grid;place-items:center}.house-game-card-img img{max-width:100%;max-height:108px;object-fit:contain;filter:drop-shadow(0 8px 8px rgba(103,57,48,.17))}.house-game-card strong{display:block;font-size:13px;margin-top:4px}.house-game-card em{display:block;font-style:normal;font-size:11px;color:#c18476}.favorite-dot{position:absolute;right:9px;top:8px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:white;color:#ed7f96;box-shadow:0 5px 12px rgba(181,83,98,.16)}.house-game-photo-row{display:flex;gap:8px;overflow-x:auto;margin-bottom:10px}.house-game-bottom-nav{display:none}.house-game-records{margin-top:14px}.house-game-record{display:flex;align-items:center;gap:10px;border-radius:18px;background:#fff9f5;padding:9px;margin-bottom:8px;box-shadow:inset 0 0 0 1px rgba(237,194,181,.55)}.house-game-record.active{background:#fff0f5;box-shadow:0 0 0 2px rgba(255,126,151,.5)}.house-game-record span{width:54px;height:54px;border-radius:15px;background:#fff;display:grid;place-items:center;overflow:hidden}.house-game-record span img{max-width:100%;max-height:100%;object-fit:contain}.house-game-record div{flex:1;min-width:0}.house-game-record strong{color:#92584f}.house-game-record p{margin:2px 0 0;color:#b08479;font-size:12px}.house-game-record button{border:0;border-radius:12px;padding:8px 10px;background:#ffe0e6;color:#ad5261;font-weight:900}@keyframes gamePulse{0%,100%{opacity:.75}50%{opacity:1}}
@media (max-width: 860px){.house-game-shell{margin:-10px -14px 18px;border-radius:0}.house-game-hud{gap:7px;padding:10px 10px 6px}.house-player small{display:none}.house-currency span{font-size:11px;padding:7px 8px}.house-title-plaque{width:70%;padding:8px 14px}.house-title-plaque b{font-size:18px}.house-game-main{display:block;padding:24px 8px 8px}.house-game-stage{min-height:calc(100vh - 320px);height:600px;border-radius:24px}.house-game-side{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:10px;border-radius:22px}.chosen-preview img{height:86px}.house-game-inspector,.house-game-parent,.house-theme-field,.house-game-side textarea,.house-game-side .primary-btn{grid-column:1/-1}.house-game-drawer{margin:0 8px 10px;border-radius:26px;padding:12px}.house-game-cards{grid-auto-columns:138px}.room-side-btn{width:58px;height:58px;right:10px}.room-side-btn.daily{top:62px}.room-side-btn.shop{top:128px}.room-tool-btn{width:68px;height:52px}.room-tool-btn.layout{left:10px;bottom:78px}.room-tool-btn.undo{left:10px;bottom:18px}.room-tool-btn.save{right:86px;bottom:18px}.room-tool-btn.refresh{right:10px;bottom:18px}.house-game-tip{font-size:12px;bottom:76px;width:max-content;max-width:86%;white-space:normal;text-align:center}.house-game-bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);margin:0 8px 10px;border-radius:26px;background:rgba(255,251,246,.95);box-shadow:0 -8px 24px rgba(121,68,58,.13);overflow:hidden}.house-game-bottom-nav button{border:0;background:transparent;padding:10px 6px;color:#9b6257;font-weight:900}.house-game-bottom-nav button.active{background:linear-gradient(180deg,#ffe3ea,#fff4ed);color:#df607a}.house-game-bottom-nav span{display:block;font-size:11px}.house-game-records{display:none}} 
@media (max-width: 520px){.house-currency span:nth-child(2){display:none}.house-game-stage{height:520px;min-height:520px}.house-game-item.asset-bed{--item-w:55%!important}.house-game-item.asset-sofa{--item-w:44%!important}.house-game-item.asset-curtain{--item-w:36%!important}.house-game-side{display:block}.house-game-side>*{margin-bottom:10px}.house-game-cards{grid-auto-columns:128px}.house-game-card-img{height:96px}.house-game-card-img img{max-height:92px}.game-action-grid{grid-template-columns:1fr 1fr}.house-title-plaque{width:80%}}


.date-select-field { grid-column: auto; }
.date-select-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
}
.date-select-row select {
  min-width: 0;
  appearance: none;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255, 138, 171, .24);
  border-radius: 16px;
  padding: 12px 10px;
  color: var(--text);
  font-weight: 700;
  text-align: center;
}
.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #a8798b;
  line-height: 1.45;
}
@media (max-width: 520px) {
  .date-select-row { grid-template-columns: 1.2fr .9fr .9fr; gap: 6px; }
  .date-select-row select { padding: 11px 7px; font-size: 14px; }
}
