:root {
  --ink: #413b55;
  --muted: #8d879f;
  --cream: #fffaf1;
  --paper: #fffefb;
  --coral: #ff8d75;
  --coral-deep: #ef705e;
  --pink: #f985a7;
  --aqua: #56cbd0;
  --yellow: #f7ca58;
  --violet: #9b8ee7;
  --border: #eee7dc;
  --shadow: 0 18px 45px rgba(84, 67, 47, 0.14);
  --soft-shadow: 0 8px 22px rgba(84, 67, 47, 0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: #f6efe5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 255, 255, 0.85) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 88%, rgba(255, 211, 188, 0.5) 0 120px, transparent 121px),
    #f7f0e7;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible {
  outline: 4px solid rgba(86, 203, 208, 0.35);
  outline-offset: 3px;
}

.starter-backdrop {
  position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 22px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.2), transparent 34%),
    linear-gradient(145deg, rgba(52,45,71,.94), rgba(31,36,61,.97));
  backdrop-filter: blur(18px);
}
.starter-backdrop[hidden] { display: none; }
.starter-choice {
  width: min(860px,100%); padding: 34px; border: 1px solid rgba(255,255,255,.32);
  border-radius: 30px; color: #fff; background: rgba(255,255,255,.1);
  box-shadow: 0 30px 90px rgba(16,18,35,.4); text-align: center;
}
.starter-kicker { color: #9ce8ef; font-size: 9px; font-weight: 1000; letter-spacing: .18em; }
.starter-choice h1 { margin: 6px 0 2px; font: 800 34px/1.05 "Baloo 2"; }
.starter-choice > p { margin: 0 0 24px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 800; }
.starter-pet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.starter-pet {
  min-height: 330px; display: grid; place-items: end center; overflow: hidden; padding: 18px 18px 0;
  border: 2px solid rgba(255,255,255,.24); border-radius: 25px;
  background: linear-gradient(160deg,rgba(255,255,255,.16),rgba(116,202,224,.08));
  cursor: pointer; transition: transform .2s,border-color .2s,background .2s;
}
.starter-pet:hover, .starter-pet:focus-visible {
  transform: translateY(-4px); border-color: #9ce8ef;
  background: linear-gradient(160deg,rgba(255,255,255,.23),rgba(116,202,224,.14));
}
.starter-pet img {
  width: 100%; height: 300px; object-fit: contain; object-position: center bottom;
  filter: brightness(0) saturate(0) drop-shadow(0 14px 10px rgba(8,11,24,.28));
  opacity: .92; pointer-events: none;
}
.account-backdrop { z-index: 140; }
.account-choice { position: relative; width: min(460px,100%); }
.account-choice h1 { margin-bottom: 8px; }
.account-close {
  position: absolute; right: 16px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 12px;
  color: #fff; background: rgba(255,255,255,.12); font-size: 25px; line-height: 1; cursor: pointer;
}
.account-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px; padding: 5px;
  border-radius: 14px; background: rgba(18,22,43,.3);
}
.account-tabs button {
  min-height: 40px; border: 0; border-radius: 10px; color: rgba(255,255,255,.72);
  background: transparent; font-size: 11px; font-weight: 900; cursor: pointer;
}
.account-tabs button.active { color: #2d2940; background: #fff; }
.account-form { display: grid; gap: 7px; text-align: left; }
.account-form label { margin-top: 5px; font-size: 9px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.account-form input {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 2px solid rgba(255,255,255,.2);
  border-radius: 13px; color: #302b3d; background: #fff; font-size: 16px; font-weight: 900;
}
.account-form .account-hint {
  margin: 6px 0 0; color: rgba(255,255,255,.68); font-size: 9px; font-weight: 800; line-height: 1.45;
}
.account-error { margin: 4px 0 0; color: #ffd0d0; font-size: 10px; font-weight: 900; }
.account-submit { width: 100%; margin-top: 8px; font-size: 12px; }
.account-sync-card {
  display: flex; align-items: center; gap: 13px; margin: 20px 0; padding: 16px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(255,255,255,.1); text-align: left;
}
.account-sync-card > span { font-size: 32px; }
.account-sync-card b, .account-sync-card small { display: block; }
.account-sync-card small { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 9px; font-weight: 800; }
.account-actions { display: flex; justify-content: center; gap: 9px; }

.game-shell { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(96px + var(--safe-bottom)); }
.topbar {
  height: 88px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(280px, 390px) minmax(360px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 34px;
  background: rgba(255, 254, 251, 0.94);
  border-bottom: 1px solid rgba(231, 221, 207, 0.9);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font: 800 30px/1 "Baloo 2", sans-serif;
  letter-spacing: -1.4px;
  color: #4b435f;
}
.brand > span:last-child span { color: var(--coral); }
.brand-paw, .mini-paw {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: white;
  border-radius: 14px 14px 18px 18px;
  transform: rotate(-7deg);
  background: linear-gradient(145deg, #ffad8e, #f27c72);
  box-shadow: 0 6px 0 #da665e;
  font-size: 20px;
}
.level-card { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.level-badge {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%;
  color: white; font: 800 20px "Baloo 2";
  background: linear-gradient(145deg, #a89bea, #7769ca);
  border: 4px solid #e9e4ff;
  box-shadow: 0 4px 10px rgba(113, 99, 198, .25);
}
.level-copy { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.level-copy strong { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.level-copy span { color: var(--muted); font-size: 11px; font-weight: 800; }
.xp-track, .need-track {
  overflow: hidden;
  height: 9px;
  background: #ece7f3;
  border-radius: 99px;
  box-shadow: inset 0 2px 3px rgba(68, 56, 91, .08);
}
.xp-track span { display: block; width: 34%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a597ea, #8072d5); transition: width .5s; }
.wallet { justify-self: end; display: flex; align-items: center; gap: 9px; }
.cloud-button {
  height: 41px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #d9d2ee;
  border-radius: 13px; color: #625988; background: #f4f1ff; cursor: pointer; text-align: left;
}
.cloud-button > span:first-child { color: var(--violet); font-size: 18px; }
.cloud-button b, .cloud-button small { display: block; white-space: nowrap; }
.cloud-button b { max-width: 82px; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.cloud-button small { margin-top: 1px; color: var(--muted); font-size: 7px; font-weight: 900; }
.cloud-button.syncing > span:first-child { animation: softPulse .8s infinite; }
.cloud-button.offline { color: #996b42; background: #fff5e8; border-color: #efd8b7; }
.currency {
  min-width: 80px; height: 39px; padding: 0 14px 0 7px;
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 4px 11px rgba(65, 59, 85, .07);
}
.currency strong { font-family: "Baloo 2"; font-size: 17px; }
.coin-icon {
  width: 27px; height: 27px; display: grid; place-items: center;
  color: #fff2a8; background: #f4be3e; border: 3px solid #ffdc68; border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(185, 121, 14, .2); font-size: 10px;
}
.gem-icon { color: #71c7ea; font-size: 25px; filter: drop-shadow(0 2px 0 #4690b6); }
.daily-button {
  border: 0; border-radius: 13px; padding: 10px 15px;
  color: #fff; background: linear-gradient(145deg, #ff9a82, #ef786d);
  box-shadow: 0 5px 0 #d8655f; font-weight: 900; cursor: pointer;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.daily-button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #d8655f; filter: saturate(1.08); }
.daily-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #d8655f; }
.daily-button.claimed { background: #bab5c4; box-shadow: 0 4px 0 #918b9b; cursor: default; }

.game-main {
  max-width: 1520px;
  margin: 0 auto;
  min-height: calc(100vh - 184px);
  min-height: calc(100dvh - 184px);
  padding: 22px 26px 18px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}
.side-panel { display: flex; flex-direction: column; gap: 14px; }
.pet-card, .quest-card {
  background: rgba(255, 254, 251, .96);
  border: 1px solid rgba(232, 223, 211, .95);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}
.pet-card { padding: 22px 20px; }
.pet-name {
  display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent;
  font: 800 28px/1 "Baloo 2"; cursor: pointer;
}
.pet-name svg { width: 16px; fill: none; stroke: #b0a9ba; stroke-width: 2.2; }
.pet-card > p { margin: 4px 0 21px; color: var(--muted); font-size: 12px; font-weight: 700; }
.need-list { display: grid; gap: 17px; }
.need-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; font-weight: 900; }
.need-head span { display: flex; align-items: center; gap: 6px; }
.need-head strong { color: var(--muted); font-size: 11px; }
.need-icon { width: 19px; height: 19px; display: inline-grid; place-items: center; border-radius: 7px; color: white; font-size: 10px; font-style: normal; }
.need-icon.peach { background: var(--coral); }
.need-icon.blue { background: var(--aqua); }
.need-icon.pink { background: var(--pink); }
.need-icon.purple { background: var(--violet); }
.need-track { height: 8px; background: #f0ece8; }
.need-track span { height: 100%; display: block; border-radius: inherit; transition: width .55s cubic-bezier(.2,.8,.2,1); }
.need-track.peach span { background: linear-gradient(90deg, #ffad7b, #ff806e); }
.need-track.blue span { background: linear-gradient(90deg, #81dfe0, #42bcc7); }
.need-track.pink span { background: linear-gradient(90deg, #ffa3bc, #ef709b); }
.need-track.purple span { background: linear-gradient(90deg, #bcb1f2, #8e7adc); }
.need.low .need-head strong { color: #df5d58; animation: softPulse 1.2s infinite; }

.quest-card { padding: 15px; }
.quest-title { display: grid; grid-template-columns: 35px 1fr; gap: 10px; align-items: center; }
.quest-star {
  width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px;
  background: #fff1c8; color: #efa927; box-shadow: inset 0 -3px 0 #f6ddb0;
}
.quest-title strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.quest-title span:last-child { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.quest-progress { display: flex; align-items: center; justify-content: space-between; margin: 13px 3px 0; }
.quest-progress span { display: flex; gap: 5px; }
.quest-progress i { width: 30px; height: 7px; border-radius: 9px; background: #ece6de; transition: background .3s; }
.quest-progress i.done { background: var(--yellow); }
.quest-progress b { font-size: 10px; color: var(--muted); }

.room-card {
  overflow: hidden;
  position: relative;
  background: #fff;
  border: 1px solid rgba(231, 219, 204, .95);
  border-radius: 25px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.room-toolbar {
  position: absolute; z-index: 12; left: 18px; right: 18px; top: 16px;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none;
}
.room-title {
  min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 99px; cursor: pointer; pointer-events: auto;
  background: rgba(255, 253, 248, .78); backdrop-filter: blur(12px);
  box-shadow: 0 5px 18px rgba(67, 56, 49, .1); font-size: 11px;
}
.room-title:hover .room-chevron { transform: translateY(2px); }
.room-chevron { margin-left: 2px; color: var(--coral); font-size: 15px; line-height: .6; transition: transform .18s; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #66ce8d; box-shadow: 0 0 0 4px rgba(102, 206, 141, .15); }
.room-tools { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.arrange-button {
  height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 13px;
  border: 1px solid rgba(255,255,255,.72); border-radius: 99px;
  background: rgba(255,253,248,.84); color: var(--ink); cursor: pointer;
  backdrop-filter: blur(12px); box-shadow: 0 5px 17px rgba(67,56,49,.12);
  font-size: 10px; font-weight: 900; transition: .2s;
}
.arrange-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.arrange-button:hover { transform: translateY(-1px); color: var(--coral-deep); }
.arrange-button.active { color: #fff; background: var(--coral); border-color: #ffb09d; box-shadow: 0 5px 0 #d7655b; }
.arrange-button[hidden] { display: none; }
.round-button, .camera-button, .close-button {
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.72);
  background: rgba(255, 253, 248, .82); backdrop-filter: blur(12px); cursor: pointer;
  box-shadow: 0 5px 17px rgba(67,56,49,.12);
}
.round-button { width: 39px; height: 39px; border-radius: 50%; pointer-events: auto; }
.round-button svg, .camera-button svg, .close-button svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-button.muted svg path:last-child { display: none; }

.room-scene {
  min-height: 570px;
  height: calc(100vh - 260px);
  height: calc(100dvh - 260px);
  max-height: 720px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #f3b276 url("assets/sunny-room.webp") center/cover no-repeat;
  user-select: none;
}
.room-scene.midnight-room {
  background-color: #18171d;
  background-image: url("assets/midnight-studio.webp");
}
.room-scene.midnight-room .sun-wash { opacity: 0; }
.room-scene.midnight-room .pet-shadow { background: rgba(0,0,0,.4); }
.room-scene.cloud-room {
  background-color: #dcefff;
  background-image: url("assets/tobi-cloud-loft.webp");
}
.room-scene.cloud-room .sun-wash { opacity: .16; }
.room-scene.cloud-room .pet-shadow { background: rgba(48,96,145,.22); }
.room-scene.ramen-room {
  background-color: #a8522f;
  background-image: url("assets/moon-noodle-bar.webp");
}
.room-scene.ramen-room .sun-wash { opacity: 0; }
.room-scene.ramen-room .pet-shadow { background: rgba(91,44,24,.28); }
.room-scene::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 1500;
  box-shadow: inset 0 -20px 50px rgba(120, 65, 20, .08);
}
.sun-wash {
  position: absolute; z-index: 0; width: 55%; height: 92%; left: 23%; top: 0;
  background: linear-gradient(116deg, rgba(255, 255, 220, .28), transparent 55%);
  clip-path: polygon(18% 0, 78% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.arrange-hint {
  position: absolute; z-index: 1700; left: 50%; top: 72px; display: flex; align-items: center; gap: 9px;
  padding: 8px 9px 8px 12px; border: 1px solid rgba(255,255,255,.75); border-radius: 99px;
  background: rgba(66,58,82,.9); color: white; box-shadow: 0 9px 24px rgba(52,43,61,.24);
  opacity: 0; transform: translate(-50%,-8px); pointer-events: none; transition: .22s;
  font-size: 10px; white-space: nowrap;
}
.arrange-hint strong { font-size: 10px; }
.arrange-hint button {
  border: 0; border-radius: 99px; padding: 6px 9px; color: var(--ink); background: #fff;
  font-size: 8px; font-weight: 900; cursor: pointer;
}
.arrange-nudges { display: flex; gap: 3px; }
.arrange-nudges button { width: 34px; height: 34px; padding: 0; font-size: 15px; }
.drag-grip { color: #ffcf72; font-size: 16px; }
.room-scene.arranging .arrange-hint { opacity: 1; transform: translate(-50%,0); pointer-events: auto; }
.ramen-order-card {
  position: absolute; z-index: 1600; left: 18px; bottom: 17px; width: 258px;
  display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 9px; padding: 9px;
  border: 1px solid rgba(255,255,255,.72); border-radius: 18px; color: var(--ink);
  background: rgba(255,252,241,.92); backdrop-filter: blur(12px); box-shadow: 0 10px 26px rgba(75,40,26,.22);
}
.ramen-order-card[hidden] { display: none; }
.ramen-order-card > img { width: 62px; height: 52px; object-fit: contain; }
.ramen-order-card b, .ramen-order-card small { display: block; line-height: 1.1; }
.ramen-order-card b { font: 800 13px "Baloo 2"; }
.ramen-order-card small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 800; }
.ramen-order-card button {
  border: 0; border-radius: 12px; padding: 9px 10px; color: white; background: var(--coral);
  box-shadow: inset 0 -3px 0 rgba(117,52,44,.2); font-size: 10px; font-weight: 900; cursor: pointer;
}
.ramen-order-card button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ramen-order-card button i { color: #ffd65b; font-style: normal; text-shadow: 0 1px #a66b14; }
.ramen-card-actions { display: flex; gap: 5px; }
.ramen-order-card .ramen-cook-button {
  color: #74422e; background: #ffd986; box-shadow: inset 0 -3px 0 rgba(153,94,38,.16);
}
.ramen-game {
  position: absolute; z-index: 2100; left: 50%; top: 50%; width: min(600px, calc(100% - 34px));
  max-height: calc(100% - 28px); overflow-y: auto; transform: translate(-50%,-50%); padding: 19px 22px 17px; text-align: center; color: #58382d;
  border: 2px solid rgba(255,255,255,.75); border-radius: 28px;
  background: linear-gradient(155deg, rgba(255,252,230,.97), rgba(255,229,180,.96));
  box-shadow: 0 24px 60px rgba(59,29,20,.38), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
}
.ramen-game[hidden] { display: none; }
.ramen-game-close {
  position: absolute; right: 13px; top: 12px; width: 31px; height: 31px; border: 0; border-radius: 50%;
  color: #7a5140; background: rgba(122,81,64,.1); font-size: 20px; font-weight: 900; cursor: pointer;
}
.ramen-game-kicker { color: #d1684c; font-size: 9px; font-weight: 1000; letter-spacing: .13em; }
.ramen-game h2 { margin: 2px 0 0; font: 900 25px/1.05 "Baloo 2"; }
.ramen-game p { margin: 3px 0 9px; color: #88675a; font-size: 10px; font-weight: 800; }
.ramen-builder { display: grid; grid-template-columns: 154px 1fr; gap: 15px; align-items: center; text-align: left; }
.ramen-builder[hidden], .ramen-cook-stage[hidden] { display: none; }
.ramen-build-preview { text-align: center; }
.ramen-build-preview strong, .ramen-build-preview small { display: block; }
.ramen-build-preview strong { margin-top: 7px; color: #694236; font: 900 14px/1.05 "Baloo 2"; }
.ramen-build-preview small { margin-top: 3px; color: #9a7768; font-size: 8px; font-weight: 800; line-height: 1.2; }
.custom-ramen-bowl {
  position: relative; width: 145px; height: 102px; margin: 0 auto; overflow: hidden; border: 7px solid #fff6d7;
  border-radius: 14px 14px 65px 65px; background: #d8614a; box-shadow: inset 0 -8px rgba(132,47,36,.18), 0 8px 12px rgba(104,55,30,.18);
}
.custom-ramen-bowl::before { content:""; position:absolute; z-index:4; left:-8px; right:-8px; top:-4px; height:17px; border-radius:50%; background:#fff6d7; box-shadow:0 3px #7d4435; }
.custom-broth { position: absolute; z-index: 1; left: 6px; right: 6px; top: 5px; height: 52px; border-radius: 50%; background: #a95d31; box-shadow: inset 0 4px rgba(255,255,255,.18); }
.custom-ramen-bowl[data-broth="miso"] .custom-broth { background: #d69a4c; }
.custom-ramen-bowl[data-broth="spicy"] .custom-broth { background: #c94c35; }
.custom-noodles { position: absolute; z-index: 2; left: 22px; right: 22px; top: 26px; color: #ffe59a; font: 900 22px/1 "Baloo 2"; letter-spacing: -5px; transform: rotate(-4deg); text-shadow: 0 2px #c28a45; }
.custom-toppings { position: absolute; z-index: 3; left: 18px; right: 18px; top: 24px; display: flex; justify-content: center; gap: 5px; font-size: 22px; filter: drop-shadow(0 2px 1px rgba(82,43,26,.25)); }
.ramen-build-controls { display: grid; gap: 7px; }
.ramen-build-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ramen-build-controls legend { width: 100%; margin-bottom: 3px; color: #795548; font-size: 9px; font-weight: 1000; }
.ramen-build-controls legend small { float: right; color: #d1684c; }
.ramen-choice-row { display: flex; gap: 5px; }
.ramen-choice-row button {
  flex: 1; min-width: 0; border: 1px solid rgba(116,72,52,.12); border-radius: 10px; padding: 6px 4px;
  color: #805d50; background: rgba(255,255,255,.62); font-size: 8px; font-weight: 900; cursor: pointer; transition: .15s;
}
.ramen-choice-row button span { display: block; min-height: 18px; font-size: 15px; line-height: 17px; }
.ramen-choice-row button:hover { transform: translateY(-1px); background: #fff; }
.ramen-choice-row button.active { color: #fff; border-color: #d96c50; background: #e47a59; box-shadow: inset 0 -3px rgba(126,52,38,.14); }
.ramen-choice-row button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.ramen-topping-row { display: grid; grid-template-columns: repeat(6, 1fr); }
.ramen-game-progress { display: flex; justify-content: center; gap: 7px; margin-bottom: 6px; }
.ramen-game-progress span {
  min-width: 74px; padding: 5px 8px; border-radius: 99px; color: #9b7767; background: rgba(122,81,64,.09);
  font-size: 8px; font-weight: 900;
}
.ramen-game-progress span.active { color: white; background: #e27b58; box-shadow: 0 4px 10px rgba(190,92,62,.2); }
.ramen-game-progress span.done { color: #5b8c65; background: #d9efcf; }
.ramen-pot { position: relative; width: 112px; height: 82px; margin: 2px auto -3px; }
.ramen-pot img { width: 112px; height: 82px; object-fit: contain; filter: drop-shadow(0 7px 5px rgba(104,55,30,.18)); }
.ramen-steam { position: absolute; top: -8px; color: rgba(213,112,75,.55); font: 900 24px "Baloo 2"; animation: ramenSteam 1.1s ease-in-out infinite; }
.steam-one { left: 40px; }.steam-two { left: 66px; animation-delay: -.45s; }
.ramen-timing {
  position: relative; height: 24px; margin: 10px 4px 12px; overflow: hidden; border: 4px solid #fff7dd; border-radius: 99px;
  background: linear-gradient(90deg,#eaa59a,#f7c883 34%,#f7c883 64%,#eaa59a); box-shadow: inset 0 2px 5px rgba(104,55,30,.16);
}
.ramen-target { position: absolute; left: 38%; width: 24%; inset-block: 0; background: linear-gradient(90deg,#f8c64f,#ffe88d,#f8c64f); }
.ramen-ladle {
  position: absolute; z-index: 2; left: 0; top: -2px; width: 8px; height: 20px; border-radius: 99px;
  background: #56382f; box-shadow: 0 1px 0 2px white, 0 2px 6px rgba(65,35,24,.35);
}
.ramen-timing.running .ramen-ladle { animation: ramenLadle var(--ramen-speed, 1.25s) linear infinite alternate; }
.ramen-result { min-height: 18px; color: #d1684c; font: 900 13px "Baloo 2"; }
.ramen-game-action {
  min-width: 175px; border: 0; border-radius: 14px; padding: 11px 18px; color: white;
  background: linear-gradient(#ef8965,#dc684d); box-shadow: inset 0 -4px 0 rgba(123,54,39,.18), 0 6px 14px rgba(163,75,52,.18);
  font-size: 11px; font-weight: 1000; cursor: pointer;
}
.ramen-game-action:hover { filter: brightness(1.04); transform: translateY(-1px); }
@keyframes ramenLadle { from { left: 1%; } to { left: calc(99% - 8px); } }
@keyframes ramenSteam { 0%,100% { opacity:.2; transform:translateY(3px) rotate(-8deg) } 50% { opacity:.8; transform:translateY(-5px) rotate(8deg) } }
.room-object {
  position: absolute; left: var(--x, 50%); top: var(--y, 84%); bottom: auto; right: auto;
  z-index: 2; transform: translate(-50%,-100%); transform-origin: bottom center;
  filter: drop-shadow(0 9px 8px rgba(83, 53, 26, .14)); touch-action: none;
}
.room-object[role="button"] { cursor: pointer; }
.room-object.hidden { display: none; }
.room-object > img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.rug-object {
  width: 47%; height: 18%; transform: translate(-50%,-50%);
  filter: drop-shadow(0 7px 6px rgba(83,53,26,.16));
}
.rug-object > img { object-fit: fill; }
.bed-object { width: 275px; height: 176px; }
.plant-object { width: 145px; height: 210px; }
.lamp-object { width: 100px; height: 275px; }
.chair-object { width: 175px; height: 190px; }
.bookshelf-object { width: 145px; height: 250px; }
.toybox-object { width: 185px; height: 135px; }
.table-object { width: 145px; height: 130px; }
.bubblechair-object { width: 185px; height: 190px; }
.sneakerrack-object { width: 145px; height: 225px; }
.beatconsole-object { width: 190px; height: 135px; }
.neonrug-object { width: 48%; height: 19%; transform: translate(-50%,-50%); }
.neonrug-object > img { object-fit: fill; }
.tobipod-object { width: 260px; height: 178px; }
.tobirug-object { width: 48%; height: 18%; transform: translate(-50%,-50%); }
.tobirug-object > img { object-fit: fill; }
.tobichair-object { width: 168px; height: 190px; }
.tobilamp-object { width: 92px; height: 238px; }
.tobicabinet-object { width: 132px; height: 215px; }
.room-scene.arranging .room-object:not(.hidden) { cursor: grab; }
.room-scene.arranging .room-object:not(.hidden)::after {
  content: attr(data-name); position: absolute; left: 50%; top: -7px; transform: translate(-50%,-100%);
  padding: 5px 8px; border-radius: 9px; color: #fff; background: rgba(66,58,82,.88);
  box-shadow: 0 4px 10px rgba(49,39,56,.18); font-size: 8px; font-weight: 900; white-space: nowrap;
  opacity: 0; transition: opacity .18s; pointer-events: none;
}
.room-scene.arranging .room-object:not(.hidden):hover::after,
.room-scene.arranging .room-object.selected::after { opacity: 1; }
.room-scene.arranging .room-object.selected {
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #59ced1) drop-shadow(0 10px 8px rgba(83,53,26,.16));
  cursor: grabbing;
}
.room-scene.arranging .pet-wrap { pointer-events: none; filter: saturate(.7) opacity(.78); }
.room-scene.arranging::after { box-shadow: inset 0 0 0 4px rgba(86,203,208,.65), inset 0 -20px 50px rgba(120,65,20,.08); }
.room-scene.lamp-on .lamp-object::before,
.room-scene.lamp-on .tobilamp-object::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -12%; width: 290%; height: 145%;
  transform: translateX(-50%); background: radial-gradient(ellipse at bottom, rgba(255,238,143,.55), transparent 68%);
  pointer-events: none;
}

.pet-wrap {
  position: absolute; z-index: 870; left: 50%; bottom: 13%; width: 230px; height: 300px;
  transform: translateX(-50%); transform-origin: bottom center; cursor: grab;
  touch-action: none; transition: filter .2s;
}
.pet-wrap:active { cursor: grabbing; }
.pet-shadow { position: absolute; z-index: -1; left: 18%; bottom: 0; width: 64%; height: 10%; border-radius: 50%; background: rgba(95,56,31,.22); filter: blur(5px); }
.pet { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 3px rgba(99,62,40,.11)); animation: petIdle 2.8s ease-in-out infinite; transform-origin: bottom; }
.pet-character { display: block; object-fit: contain; }
.pet-character[hidden], .pet[hidden] { display: none; }
.fur-fill { fill: var(--pet-fur, #e9a36d); transition: fill .3s; }
.fur-stroke { stroke: #915c4e; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.inner-ear { fill: var(--pet-inner, #f58f8d); opacity: .82; }
.face-patch { fill: var(--pet-patch, #f8d5a3); opacity: .72; }
.eye { fill: #4f3b42; }
.eye-shine { fill: #fff; }
.blush { fill: #ed7d82; opacity: .35; }
.muzzle { fill: #f6d3ae; }
.nose { fill: #6f4145; }
.mouth { fill: none; stroke: #794b4a; stroke-width: 3; stroke-linecap: round; }
.pet-tail { transform-origin: 200px 210px; animation: tailWag 1.35s ease-in-out infinite alternate; }
.pet-face { transform-origin: 130px 120px; }
.pet-wrap.happy .pet { animation: petBounce .55s ease; }
.pet-wrap.eating .pet-face { animation: munch .3s ease 4; }
.pet-wrap.washing .pet { animation: shake .45s ease 2; }
.pet-wrap.sleeping .pet { animation: breathe 2s ease-in-out infinite; }
.pet-wrap.sleeping .eye { ry: 2; }
.pet-wrap.playing .pet { animation: petBounce .45s ease 3; }
.pet-bubble {
  position: absolute; z-index: 8; left: 70%; top: 22px; width: max-content; max-width: 160px;
  padding: 9px 13px; border-radius: 16px 16px 16px 3px; background: #fff; color: var(--ink);
  box-shadow: 0 7px 18px rgba(72,55,45,.14); font-size: 11px; font-weight: 900;
  opacity: 0; transform: translateY(8px) scale(.9); transition: .25s; pointer-events: none;
}
.pet-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.floor-sparkles { position: absolute; inset: 0; pointer-events: none; }
.floaty { position: absolute; font-size: 23px; animation: floatAway 1.2s ease-out forwards; filter: drop-shadow(0 2px 0 white); }

.camera-button {
  position: absolute; z-index: 1600; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 15px;
}
.action-dock {
  min-height: 78px; padding: 11px 18px 13px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  background: rgba(255,254,251,.98); border-top: 1px solid #ece4d9;
}
.action-button {
  position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 8px 11px; border: 0; border-radius: 15px; color: #fff; cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(87,59,59,.16), 0 5px 10px rgba(75,58,51,.08);
  transition: transform .18s, filter .18s;
}
.action-button:hover { transform: translateY(-2px); filter: saturate(1.07) brightness(1.03); }
.action-button:active { transform: translateY(2px); }
.action-button.coral { background: #f38b72; }
.action-button.aqua { background: #52c2c5; }
.action-button.rose { background: #ec7e9f; }
.action-button.violet { background: #9382dc; }
.action-emoji { font-size: 28px; filter: drop-shadow(0 2px 1px rgba(78,54,41,.12)); }
.action-button span:last-child { min-width: 0; text-align: left; }
.action-button b, .action-button small { display: block; line-height: 1.1; }
.action-button b { font: 800 16px "Baloo 2"; }
.action-button small { opacity: .8; font-size: 9px; font-weight: 800; white-space: nowrap; }

.bottom-nav {
  position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; height: calc(78px + var(--safe-bottom));
  display: flex; justify-content: center; gap: 4px; padding: 8px 20px calc(8px + var(--safe-bottom));
  background: rgba(255,254,251,.95); border-top: 1px solid #e8dfd3; backdrop-filter: blur(18px);
  box-shadow: 0 -12px 25px rgba(78,60,46,.08);
}
.status-nav-label { display: none; }
.nav-item {
  position: relative; width: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0; border-radius: 16px; background: transparent; color: #9991a0; cursor: pointer; transition: .2s;
}
.nav-item[data-view="home"] { display: none; }
.nav-item:hover { background: #fff6ed; color: var(--coral); }
.nav-item.active { color: var(--coral-deep); background: #fff0e7; }
.nav-icon { font: 800 24px/1 "Baloo 2"; }
.nav-item b { font-size: 10px; margin-top: 3px; }
.new-dot, .locked-tag {
  position: absolute; right: 8px; top: 4px; padding: 2px 5px; border-radius: 8px; color: white;
  background: var(--pink); font-size: 7px; font-weight: 900; letter-spacing: .3px;
}
.locked-tag { background: #bab4c1; }
.count-badge { position: absolute; right: 25px; top: 5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--aqua); font-size: 8px; font-weight: 900; }

.panel-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(45,37,51,.32); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.panel-backdrop.open, .modal-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(470px, 94vw);
  padding: 24px; overflow: auto; background: #fffdf8; box-shadow: -20px 0 55px rgba(56,45,62,.18);
  transform: translateX(105%); transition: transform .38s cubic-bezier(.2,.9,.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 19px; }
.eyebrow { color: var(--coral); font-size: 9px; font-weight: 900; letter-spacing: 1.1px; }
.drawer h2 { margin: 2px 0 0; font: 800 28px/1.05 "Baloo 2"; }
.close-button { width: 39px; height: 39px; border-radius: 13px; }
.drawer-tabs { display: flex; gap: 7px; margin-bottom: 17px; overflow-x: auto; padding: 2px; }
.drawer-tab { flex: none; min-height: 44px; border: 1px solid #ebe3d9; border-radius: 99px; padding: 8px 13px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 900; cursor: pointer; }
.drawer-tab.active { color: #fff; border-color: var(--coral); background: var(--coral); }
.status-drawer-card {
  margin-bottom: 14px; padding: 20px; border: 1px solid #e8dfd3; border-radius: 20px;
  background: #fff; box-shadow: var(--soft-shadow);
}
.status-pet-name { width: 100%; justify-content: space-between; margin-bottom: 20px; }
.status-pet-name small {
  padding: 5px 8px; border-radius: 8px; color: #fff; background: var(--coral);
  font: 900 8px "Nunito";
}
.status-quest-card { box-shadow: none; }
.place-section { margin-bottom: 22px; }
.place-section h3 { margin: 0 0 10px; font: 800 17px "Baloo 2"; }
.room-choice-grid { display: grid; gap: 13px; }
.room-choice {
  position: relative; overflow: hidden; min-height: 172px; padding: 0; border: 3px solid transparent;
  border-radius: 19px; background: #ece6df center/cover no-repeat; cursor: pointer; text-align: left;
  box-shadow: 0 8px 20px rgba(65,48,42,.12); transition: transform .2s, border-color .2s;
}
.room-choice:hover { transform: translateY(-2px); }
.room-choice.active { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(86,203,208,.16), 0 8px 20px rgba(65,48,42,.12); }
.room-choice::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent,rgba(22,18,26,.82)); }
.room-choice-copy { position: absolute; z-index: 2; left: 15px; right: 15px; bottom: 13px; color: #fff; }
.room-choice-copy b, .room-choice-copy small { display: block; }
.room-choice-copy b { font: 800 19px/1 "Baloo 2"; }
.room-choice-copy small { margin-top: 4px; opacity: .8; font-size: 9px; font-weight: 800; }
.room-choice-check {
  position: absolute; z-index: 3; right: 12px; top: 12px; width: 29px; height: 29px;
  display: grid; place-items: center; border-radius: 50%; color: white; background: var(--aqua);
  box-shadow: 0 4px 10px rgba(24,68,72,.3); font-weight: 900;
}
.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.shop-item {
  position: relative; display: flex; flex-direction: column; min-height: 177px; padding: 12px;
  border: 1px solid #eee5da; border-radius: 18px; background: #fff; box-shadow: 0 5px 14px rgba(72,57,48,.06);
}
.item-art { height: 88px; display: grid; place-items: center; border-radius: 13px; background: #fff5e9; font-size: 50px; overflow: hidden; }
.item-art.aqua { background: #e4f7f6; }.item-art.pink { background: #fff0f4; }.item-art.purple { background: #f0ecff; }.item-art.blue { background: #e7f2ff; }
.item-art img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(76,54,42,.14)); }
.shop-item h3 { margin: 9px 0 1px; font: 800 15px/1 "Baloo 2"; }
.shop-item p { margin: 0 0 9px; min-height: 22px; color: var(--muted); font-size: 9px; font-weight: 700; line-height: 1.25; }
.buy-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { font: 800 14px "Baloo 2"; }
.price::before { content: "●"; color: #f4bd3e; margin-right: 4px; text-shadow: 0 1px 0 #b98216; }
.buy-button {
  min-height: 44px; border: 0; border-radius: 10px; padding: 7px 11px; color: white; background: var(--aqua);
  font-size: 9px; font-weight: 900; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(37,116,122,.17);
}
.buy-button:disabled { background: #c4bec8; cursor: default; }
.owned-ribbon { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 7px; border-radius: 8px; color: white; background: var(--violet); font-size: 7px; font-weight: 900; }

.closet-section { margin-bottom: 22px; }
.closet-section h3 { margin: 0 0 10px; font: 800 17px "Baloo 2"; }
.pet-choice-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pet-choice {
  min-height: 112px; display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 7px;
  padding: 9px; border: 2px solid #eae1d6; border-radius: 17px; background: #fff; cursor: pointer;
  text-align: left; transition: .2s;
}
.pet-choice:hover { transform: translateY(-2px); border-color: #a9ddd9; }
.pet-choice.active { border-color: var(--aqua); background: #effbf8; box-shadow: 0 0 0 3px rgba(86,203,208,.14); }
.pet-choice img, .pet-choice svg { width: 70px; height: 88px; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(75,54,43,.13)); }
.pet-choice b, .pet-choice small { display: block; }
.pet-choice b { font: 800 13px/1.05 "Baloo 2"; }
.pet-choice small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 800; line-height: 1.2; }
.fixed-look-note {
  padding: 13px; border-radius: 13px; color: #766e82; background: #f4f0ff;
  font-size: 10px; font-weight: 800; line-height: 1.35;
}
.closet-collection-note { margin: 9px 2px 0; color: var(--muted); font-size: 9px; font-weight: 800; }
.pet-collection-summary {
  display: flex; align-items: center; gap: 12px; margin-bottom: 17px; padding: 14px 16px;
  border-radius: 16px; color: #755452; background: linear-gradient(135deg,#fff0e7,#fff8d9);
}
.pet-collection-heart {
  width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 14px; color: #fff; background: var(--coral); font-size: 20px;
  box-shadow: inset 0 -3px 0 rgba(147,69,60,.15);
}
.pet-collection-summary b, .pet-collection-summary small { display: block; }
.pet-collection-summary b { font: 800 15px "Baloo 2"; }
.pet-collection-summary small { margin-top: 2px; font-size: 9px; font-weight: 800; }
.pet-collection-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 12px; }
.pet-collection-card {
  min-width: 0; min-height: 190px; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px;
  padding: 13px; border: 2px solid #eae1d6; border-radius: 19px; color: var(--ink); background: #fff;
  text-align: left; cursor: pointer; transition: .2s;
}
.pet-collection-card:hover { transform: translateY(-2px); border-color: #a9ddd9; }
.pet-collection-card.active { border-color: var(--aqua); background: #effbf8; box-shadow: 0 0 0 3px rgba(86,203,208,.14); }
.pet-collection-card.locked { border-style: dashed; background: #f5f1ed; }
.pet-collection-card.locked:hover { border-color: var(--violet); background: #f2eeff; }
.pet-collection-art {
  position: relative; height: 158px; display: grid; place-items: center; overflow: hidden; border-radius: 15px;
  background: linear-gradient(145deg,#fff4cf,#ffe1b5);
}
.pet-collection-art img { width: 94%; height: 94%; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(58,42,38,.16)); }
.pet-collection-card.locked .pet-collection-art img { filter: grayscale(.55) opacity(.62); }
.pet-lock {
  position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 11px; color: #fff; background: rgba(68,58,76,.82); font-size: 16px;
  box-shadow: 0 4px 10px rgba(43,34,49,.2);
}
.pet-collection-copy b, .pet-collection-copy small, .pet-collection-copy i { display: block; }
.pet-collection-copy b { font: 800 17px/1.1 "Baloo 2"; }
.pet-collection-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 800; line-height: 1.35; }
.pet-collection-copy i {
  width: fit-content; margin-top: 12px; padding: 5px 8px; border-radius: 8px;
  color: #fff; background: var(--coral); font-size: 8px; font-style: normal; font-weight: 900;
}
.pet-collection-card.active .pet-collection-copy i { background: var(--aqua); }
.pet-collection-note {
  margin: 15px 2px 0; padding: 12px 14px; border-radius: 13px; color: #766e82; background: #f4f0ff;
  font-size: 9px; font-weight: 800; line-height: 1.4;
}
.outfit-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.outfit-section-title small {
  flex: none; padding: 5px 8px; border-radius: 9px; color: #fff; background: var(--coral);
  font: 900 8px "Nunito";
}
.outfit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.outfit-card {
  min-width: 0; padding: 9px; border: 2px solid #eae1d6; border-radius: 17px;
  background: #fff; cursor: pointer; text-align: left; transition: .2s;
}
.outfit-card:hover { transform: translateY(-2px); border-color: #b4dedb; }
.outfit-card.active { border-color: var(--aqua); background: #effbf8; box-shadow: 0 0 0 3px rgba(86,203,208,.14); }
.outfit-card.locked { border-style: dashed; background: #f7f4f1; }
.outfit-card.locked:hover { border-color: var(--violet); background: #f2eeff; }
.outfit-card.locked .outfit-preview img { filter: grayscale(.45) opacity(.68) drop-shadow(0 5px 4px rgba(58,42,38,.12)); }
.outfit-preview {
  position: relative; height: 146px; display: grid; place-items: center; margin-bottom: 8px; overflow: hidden;
  border-radius: 13px; background: linear-gradient(145deg,#fff4cf,#ffe1b5);
}
.outfit-preview.dark { background: linear-gradient(145deg,#e9e8ee,#c9c6d4); }
.outfit-preview img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(58,42,38,.16)); }
.outfit-card b, .outfit-card small { display: block; }
.outfit-card b { font: 800 13px/1.1 "Baloo 2"; }
.outfit-card small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 800; }
.room-choice.locked { cursor: not-allowed; filter: grayscale(.55); opacity: .72; }
.room-choice-lock {
  position: absolute; right: 10px; top: 10px; z-index: 2; padding: 5px 8px; border-radius: 9px;
  color: #fff; background: rgba(68,58,76,.86); font-size: 8px; font-weight: 900;
}
.closet-empty { padding: 24px 18px; text-align: center; border-radius: 20px; background: #f4f0ff; }
.closet-empty-icon {
  width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 10px;
  border-radius: 20px; color: #fff; background: var(--violet); font-size: 34px;
}
.closet-empty h3 { margin: 8px 0 2px; font: 800 19px "Baloo 2"; }
.closet-empty p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fur-swatch {
  width: 49px; height: 49px; border: 4px solid #fff; border-radius: 50%; background: var(--swatch);
  box-shadow: 0 0 0 1px #e0d7cd, 0 4px 9px rgba(65,59,85,.12); cursor: pointer;
}
.fur-swatch.active { box-shadow: 0 0 0 3px var(--aqua), 0 5px 11px rgba(65,59,85,.15); transform: scale(.93); }
.accessory-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.accessory-button {
  padding: 11px 5px; border: 1px solid #eae1d6; border-radius: 14px; background: white; cursor: pointer; font-size: 26px;
}
.accessory-button span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 900; }
.accessory-button.active { border-color: var(--pink); background: #fff2f6; box-shadow: 0 0 0 2px rgba(249,133,167,.16); }
.inventory-empty { padding: 42px 20px; text-align: center; color: var(--muted); font-weight: 800; }
.inventory-use { background: var(--coral); }

.modal-backdrop { z-index: 70; display: grid; place-items: center; padding: 20px; }
.rename-modal {
  width: min(420px, 100%); padding: 29px; border-radius: 25px; background: #fffdf8;
  box-shadow: 0 25px 80px rgba(51,39,59,.28); transform: translateY(15px) scale(.97); transition: .25s;
}
.modal-backdrop.open .rename-modal { transform: translateY(0) scale(1); }
.mini-paw { margin-bottom: 17px; }
.rename-modal h2 { margin: 0; font: 800 27px/1.08 "Baloo 2"; }
.rename-modal p { margin: 5px 0 20px; color: var(--muted); font-size: 11px; font-weight: 700; }
.rename-modal label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.rename-modal input { width: 100%; padding: 13px 15px; border: 2px solid #e9dfd4; border-radius: 13px; background: #fff; font-size: 16px; font-weight: 900; color: var(--ink); }
.passcode-error { margin: 8px 0 0 !important; color: #c64f52 !important; font-size: 10px !important; font-weight: 900 !important; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.secondary-button, .primary-button { min-height: 44px; border: 0; border-radius: 12px; padding: 10px 15px; font-size: 11px; font-weight: 900; cursor: pointer; }
.secondary-button { color: var(--muted); background: #eee9e4; }
.primary-button { color: white; background: var(--coral); box-shadow: inset 0 -3px 0 rgba(147,69,60,.18); }

.toast-stack { position: fixed; z-index: 90; top: 105px; right: 22px; display: grid; gap: 9px; pointer-events: none; }
.toast {
  min-width: 230px; max-width: 320px; padding: 12px 15px; display: flex; align-items: center; gap: 10px;
  border: 1px solid #e9e0d6; border-radius: 15px; background: #fff; box-shadow: 0 12px 28px rgba(57,44,61,.17);
  font-size: 11px; font-weight: 900; pointer-events: auto; animation: toastIn .35s cubic-bezier(.2,.9,.2,1), toastOut .3s ease 2.7s forwards;
}
.toast > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: #fff0e4; font-size: 17px; }
.toast > span img { width: 28px; height: 28px; object-fit: contain; }
.toast > div { flex: 1; }
.toast-action { min-height: 38px; padding: 7px 11px; border: 0; border-radius: 10px; color: #fff; background: var(--coral-deep); font-weight: 900; cursor: pointer; }
.buy-button.confirming { color: #fff; background: #d76755; animation: none; }
.confetti-layer { position: fixed; inset: 0; z-index: 85; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 9px; height: 16px; border-radius: 3px; animation: confettiFall 1.8s ease-in forwards; }
.snapshot-flash { position: fixed; z-index: 100; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: flash .45s ease; }

@keyframes petIdle { 0%,100%{ transform: translateY(0) scaleY(1) } 50%{ transform: translateY(-3px) scaleY(1.01) } }
@keyframes tailWag { from{ transform: rotate(-10deg) } to{ transform: rotate(14deg) } }
@keyframes petBounce { 0%,100%{ transform: translateY(0) scale(1) } 40%{ transform: translateY(-28px) scale(.98,1.04) } 70%{ transform: translateY(0) scale(1.05,.94) } }
@keyframes munch { 0%,100%{ transform: scaleY(1) } 50%{ transform: scaleY(.94) translateY(4px) } }
@keyframes shake { 0%,100%{ transform: rotate(0) } 25%{ transform: rotate(-6deg) } 75%{ transform: rotate(6deg) } }
@keyframes breathe { 0%,100%{ transform: scaleY(1) } 50%{ transform: scaleY(.97) translateY(5px) } }
@keyframes floatAway { 0%{ opacity:0; transform:translateY(10px) scale(.5) rotate(-10deg) } 20%{opacity:1} 100%{ opacity:0; transform:translateY(-100px) scale(1.2) rotate(16deg) } }
@keyframes softPulse { 50%{ opacity:.55 } }
@keyframes toastIn { from{ opacity:0; transform:translateX(30px) scale(.94) } }
@keyframes toastOut { to{ opacity:0; transform:translateX(20px) scale(.96) } }
@keyframes confettiFall { to{ transform:translate(var(--drift), 110vh) rotate(680deg); opacity:.7 } }
@keyframes flash { 0%{opacity:0} 35%{opacity:.85} 100%{opacity:0} }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; padding: 0 20px; }
  .level-card { display: none; }
  .game-main { grid-template-columns: 220px minmax(0,1fr); padding-inline: 14px; }
  .room-scene { min-height: 520px; }
  .bed-object { width: 225px; height: 145px; }
  .plant-object { width: 116px; height: 168px; }
  .lamp-object { width: 80px; height: 220px; }
  .chair-object { width: 145px; height: 158px; }
  .bookshelf-object { width: 118px; height: 204px; }
  .toybox-object { width: 154px; height: 112px; }
  .table-object { width: 120px; height: 108px; }
  .bubblechair-object { width: 150px; height: 154px; }
  .sneakerrack-object { width: 116px; height: 180px; }
  .beatconsole-object { width: 155px; height: 110px; }
  .tobipod-object { width: 215px; height: 148px; }
  .tobichair-object { width: 138px; height: 156px; }
  .tobilamp-object { width: 76px; height: 198px; }
  .tobicabinet-object { width: 108px; height: 176px; }
}
@media (max-width: 1320px) and (min-width: 1041px) {
  .topbar { grid-template-columns: minmax(190px,1fr) minmax(250px,320px) minmax(310px,1fr); padding-inline: 18px; }
  .wallet { gap: 6px; }
  .cloud-button { padding-inline: 8px; }
  .cloud-button b { max-width: 62px; }
  .daily-button { padding-inline: 11px; }
}
@media (max-width: 760px) {
  .starter-choice { padding: 24px 16px; border-radius: 24px; }
  .starter-choice h1 { font-size: 27px; }
  .starter-pet-grid { gap: 10px; }
  .starter-pet { min-height: 220px; padding-inline: 5px; border-radius: 19px; }
  .starter-pet img { height: 200px; }
  .game-shell { padding-bottom: calc(72px + var(--safe-bottom)); }
  .topbar { height: 70px; padding: 0 12px; }
  .brand { font-size: 22px; }.brand-paw { width:34px;height:34px;border-radius:11px; }
  .gem-pill, .daily-button { display: none; }
  .cloud-button { width: 38px; padding: 0; justify-content: center; }
  .cloud-button > span:last-child { display: none; }
  .currency { min-width: 68px; height: 34px; }
  .game-main { display: block; padding: 8px; min-height: 0; }
  .side-panel { display: none; }
  .nav-item[data-view="home"] { display: flex; }
  .home-nav-label { display: none; }
  .status-nav-label { display: block; }
  .room-card { border-radius: 19px; }
  .room-scene { min-height: 0; height: calc(100dvh - 225px - var(--safe-bottom)); max-height: none; background-position:center; }
  .pet-wrap { width: 180px; height: 235px; bottom: 12%; }
  .arrange-button { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .arrange-button span { display: none; }
  .arrange-hint { top: 61px; max-width: 92%; }
  .arrange-hint strong { display: none; }
  .arrange-nudges button { width: 44px; height: 44px; font-size: 17px; }
  .round-button, .camera-button, .ramen-game-close, .close-button { min-width: 44px; min-height: 44px; }
  .arrange-hint strong { overflow: hidden; text-overflow: ellipsis; }
  .bed-object { width: 170px; height: 110px; }
  .plant-object { width: 90px; height: 135px; }
  .lamp-object { width: 60px; height: 165px; }
  .rug-object { width: 58%; height: 14%; }
  .chair-object { width: 112px; height: 122px; }
  .bookshelf-object { width: 92px; height: 158px; }
  .toybox-object { width: 120px; height: 88px; }
  .table-object { width: 92px; height: 84px; }
  .bubblechair-object { width: 116px; height: 120px; }
  .sneakerrack-object { width: 88px; height: 140px; }
  .beatconsole-object { width: 120px; height: 85px; }
  .neonrug-object { width: 58%; height: 15%; }
  .tobipod-object { width: 165px; height: 114px; }
  .tobirug-object { width: 58%; height: 15%; }
  .tobichair-object { width: 106px; height: 120px; }
  .tobilamp-object { width: 58px; height: 150px; }
  .tobicabinet-object { width: 82px; height: 134px; }
  .ramen-order-card { left: 9px; bottom: 9px; width: 245px; grid-template-columns: 42px 1fr auto; gap: 5px; padding: 6px; border-radius: 13px; }
  .ramen-order-card > img { width: 45px; height: 40px; }
  .ramen-order-card b { font-size: 10px; }
  .ramen-order-card small { display: none; }
  .ramen-order-card button { min-height: 44px; padding: 7px; font-size: 8px; }
  .ramen-card-actions { gap: 3px; }
  .ramen-game { width: calc(100% - 18px); padding: 17px 13px 14px; border-radius: 20px; }
  .ramen-game h2 { font-size: 21px; }
  .ramen-game p { margin-bottom: 8px; }
  .ramen-builder { grid-template-columns: 100px 1fr; gap: 8px; }
  .custom-ramen-bowl { width: 96px; height: 73px; border-width: 5px; }
  .custom-ramen-bowl::before { height: 13px; }
  .custom-broth { height: 38px; }
  .custom-noodles { left: 10px; right: 10px; top: 20px; font-size: 16px; }
  .custom-toppings { left: 8px; right: 8px; top: 19px; gap: 2px; font-size: 15px; }
  .ramen-build-preview strong { font-size: 11px; }
  .ramen-choice-row button { min-height: 44px; padding: 4px 2px; font-size: 8px; }
  .ramen-choice-row button span { min-height: 15px; font-size: 12px; line-height: 14px; }
  .ramen-topping-row { grid-template-columns: repeat(3, 1fr); }
  .ramen-game-progress { gap: 4px; }
  .ramen-game-progress span { min-width: 0; flex: 1; padding: 5px 3px; }
  .ramen-pot { width: 88px; height: 62px; }
  .ramen-pot img { width: 88px; height: 62px; }
  .ramen-timing { margin: 8px 2px 9px; }
  .action-dock { min-height: 68px; padding: 8px; gap: 6px; }
  .action-button { padding: 7px 4px; border-radius: 12px; }
  .action-emoji { font-size: 22px; }.action-button b { font-size: 12px; }.action-button small { display:none; }
  .bottom-nav { height: calc(66px + var(--safe-bottom)); padding: 5px 5px calc(5px + var(--safe-bottom)); gap:0; }
  .nav-item { width: 20%; border-radius:12px; }.nav-icon{font-size:21px}.nav-item b{font-size:8px}
  .new-dot,.locked-tag { display:none; }.count-badge{right:13px}
  .toast-stack { top: 82px; left: 12px; right: 12px; }.toast{min-width:0}
}
@media (max-height: 760px) and (min-width: 761px) {
  .topbar { height: 72px; }
  .game-main { padding-top: 12px; min-height: calc(100dvh - 160px); }
  .room-scene { min-height: 430px; height: calc(100dvh - 225px); }
  .pet-wrap { width: 190px; height: 250px; }
  .game-shell { padding-bottom: calc(78px + var(--safe-bottom)); }
  .bottom-nav { height: calc(66px + var(--safe-bottom)); }
}

@media (max-height: 520px) and (orientation: landscape) and (max-width: 960px) {
  .topbar { height: 54px; }
  .brand { font-size: 18px; }
  .brand-paw { width: 32px; height: 32px; }
  .game-main { display: block; padding: 4px; }
  .side-panel { display: none; }
  .nav-item[data-view="home"] { display: flex; }
  .home-nav-label { display: none; }
  .status-nav-label { display: block; }
  .room-scene { height: calc(100dvh - 206px - var(--safe-bottom)); min-height: 170px; }
  .pet-wrap { width: 130px; height: 170px; bottom: 2%; }
  .room-toolbar { min-height: 40px; padding-block: 4px; }
  .action-dock { min-height: 58px; padding-block: 5px; }
  .bottom-nav { height: calc(56px + var(--safe-bottom)); }
  .game-shell { padding-bottom: calc(60px + var(--safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
