#my-room {
  margin-top: 22px;
  --room-ink: #39282b;
  --room-accent: #69404c;
  --room-line: #d6c2ab;
  --room-paper: #fbf3e5;
}
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 2.25vw, 24px);
}
.room-panel {
  min-width: 0;
  background: var(--room-paper);
  border: 1px solid var(--room-line);
  border-radius: 6px;
  overflow: clip;
  color: var(--room-ink);
  box-shadow: 0 5px 20px #38231512;
}
.room-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 12px 16px;
  color: #fff4dd;
  background: linear-gradient(104deg, #48303a, #63444f 70%, #624d47);
  border-bottom: 1px solid #bfa171;
}
.room-heading h2 {
  margin: 0;
  font: 650 clamp(1.35rem, 3vw, 1.9rem)/1.28 var(--serif);
  letter-spacing: .06em;
}
.room-heading p { margin: 0; color: #f0e0c4; font-size: .85rem; }
.room-heading nav { display:flex; gap:1em; flex-wrap:wrap; }
.room-to-work { display:inline-flex; align-items:center; min-height:44px; color:#fff1d5; text-underline-offset:.25em; font-size:.9rem; }
.room-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #d7b48c var(--room-background, url('/assets/starlight/homes/studio.webp')) center bottom/cover no-repeat;
  border-bottom: 1px solid #a17b53;
}
.room-stage.is-night {
  background-image: linear-gradient(180deg,#21234391,#39223c76),var(--room-background, url('/assets/starlight/homes/studio.webp'));
}
.room-light {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at var(--light-x,69%) var(--light-y,58%), #ffdf9c65, #e6af3055 27%, transparent 58%);
  transition: opacity .4s ease;
}
.room-stage.has-lamp-light .room-light { opacity: 1; }
.room-prop,.room-pet,.room-companion {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.room-prop {
  left: clamp(calc(var(--size) * .5), var(--x), calc(100% - var(--size) * .5));
  top: var(--y);
  width: var(--size);
  min-width: 44px;
  min-height: 44px;
  display: grid;
  align-items: end;
  z-index: var(--depth);
  transform: translate(-50%, -95%);
}
.room-prop img,.room-pet img { width: 100%; height: auto; max-height: 160px; object-fit: contain; display: block; filter: drop-shadow(0 5px 4px #3c24195e); }
.room-prop img { transform: scaleX(var(--face)); }
.room-prop.is-selected img { filter: drop-shadow(0 0 4px #ffe7ae) drop-shadow(0 5px 4px #46232260); }
.room-prop-on {
  position: absolute;
  right: 12%;
  top: 8%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffedbf;
  box-shadow: 0 0 5px 3px #f9dc90, 0 0 20px 8px #f2cf8377;
  pointer-events: none;
}
.room-prop[data-prop="teaWarmer"] .room-prop-on {
  right: auto;
  left: 18%;
  top: -8%;
  width: 16%;
  height: 26%;
  background: linear-gradient(15deg,transparent,#fff6ddab,transparent);
  box-shadow: none;
  filter: blur(1px);
  animation: room-steam 1.55s ease infinite;
}
@keyframes room-steam {
  0% { transform: translateY(4px) scale(.65); opacity: .35; }
  75%,100% { transform: translateY(-7px) scale(1.2); opacity: 0; }
}
.room-companion {
  bottom: 9%;
  right: 8%;
  width: auto;
  height: 66%;
  min-width: 44px;
  aspect-ratio: 544/1420;
  z-index: 6;
}
.room-companion .mens-standing,
.room-object-visual .mens-figure { display: block; width: 100%; height: 100%; margin: 0; }
.room-pet {
  left: 4%;
  bottom: 5%;
  width: var(--pet-width);
  height: var(--pet-height);
  z-index: 8;
}
.room-pet img { width:100%; height:100%; max-height:none; object-fit:contain; object-position:left bottom; transform-origin:50% 92%; }
button.room-pet { cursor:pointer; }
button.room-pet::after { content:''; position:absolute; inset:auto auto 0 0; width:max(100%,44px); height:max(100%,44px); }
@media (prefers-reduced-motion:no-preference) {
  .room-pet.pet-reacts img { animation:var(--pet-reaction) .6s ease-in-out; }
  .room-pet[data-motion="hop"] { --pet-reaction:pet-hop; }
  .room-pet[data-motion="lean"] { --pet-reaction:pet-lean; }
  .room-pet[data-motion="sniff"] { --pet-reaction:pet-sniff; }
  .room-pet[data-motion="sway"] { --pet-reaction:pet-sway; }
  .room-pet[data-motion="bow"] { --pet-reaction:pet-bow; }
  .room-pet[data-motion="waddle"] { --pet-reaction:pet-waddle; }
}
@keyframes pet-hop { 40% { transform:translateY(-7%); } 76% { transform:translateY(-2%); } }
@keyframes pet-lean { 55% { transform:rotate(3deg) translateX(2%); } }
@keyframes pet-sniff { 28%,68% { transform:rotate(-4deg) translateY(-2%); } }
@keyframes pet-sway { 35% { transform:rotate(2deg); } 70% { transform:rotate(-2deg); } }
@keyframes pet-bow { 50% { transform:rotate(2deg) scaleY(.96); } }
@keyframes pet-waddle { 25% { transform:rotate(-5deg); } 70% { transform:rotate(5deg); } }
.room-player {
  position: absolute;
  top: 9px;
  right: 9px;
  width: clamp(42px, 12%, 62px);
  height: auto;
  border-radius: 50%;
  border: 2px solid #f8e0a9;
  box-shadow: 0 0 0 1px #71513d, 0 3px 6px #4f332e48;
  z-index: 8;
}
.room-grid {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.room-stage.is-editing .room-prop,
.room-stage.is-editing .room-companion,
.room-stage.is-editing .room-pet { opacity: .62; }
.room-cell {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 17.5%;
  height: max(32px, 12%);
  padding: 0;
  transform: translate(-50%,-50%);
  pointer-events: auto;
  border: 1px dashed #fff2cf;
  border-radius: 6px;
  color: #fff6e5;
  background: #4b292377;
  box-shadow: 0 0 0 1px #60472d50, 0 2px 6px #3121184e;
}
.room-cell::before { content: '+'; font-size: 1.2rem; }
.room-cell:disabled { opacity: .55; background: #3a303b; pointer-events: none; }
.room-cell:disabled::before { content: '•'; }
.room-cell:is(:hover,:focus-visible) { background: #5e3439; outline: 2px solid #fff2c7; outline-offset: 2px; }
.room-toolbar {
  min-height: 62px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  border-bottom: 1px solid #e5d5c5;
}
.room-toolbar p { flex: 1 0 auto; margin: 0; font-size: .87rem; }
.room-toolbar-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.room-toolbar .secondary { min-height: 44px; padding: 6px 10px; font-size: .82rem; }
.room-status {
  min-height: 2.1rem;
  padding: 5px 12px 8px;
  margin: 0;
  color: #593340;
  font-size: .86rem;
  line-height: 1.5;
}
.room-routine { padding: 5px 12px 12px; background: #f7ebda; border-top: 1px solid #e5d5c5; }
.room-routine summary {
  min-height: 44px;
  padding: 12px 2px;
  cursor: pointer;
  color: #5a3543;
  font: 650 .98rem var(--serif);
}
.room-routine summary span { float: right; font: 600 .83rem var(--sans); line-height: 1.4; }
.room-routine > p { margin: 2px 0 8px; font-size: .83rem; color: #665455; }
.room-routine-row { padding: 4px 0; display: flex; align-items: center; gap: 8px; border-top: 1px solid #e7d6bd; }
.room-routine-row h3 { width: 2.25rem; margin: 0; font: 650 .94rem var(--serif); }
.room-routine-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.room-routine-choices .secondary { min-height: 44px; padding: 6px 10px; font-size: .82rem; }
.room-routine-choices span { font-size: .82rem; color: #78485d; }
.room-catalog { padding: 12px; }
.pet-shop-heading {
  display:flex; align-items:flex-start; justify-content:center; flex-direction:column;
  gap:5px; min-height:clamp(110px,11vw,148px); margin:-12px -12px 12px;
  padding:10px clamp(12px,2.5vw,22px); color:#fff9ed;
  background:linear-gradient(90deg,#302822d9,#302822a6 40%,transparent 65%),#5d6150 url('/assets/starlight/pet-salon.webp') right center/cover;
  border-bottom:1px solid #a58f62;
}
.pet-shop-heading h2 { margin:0; font:700 clamp(1.22rem,3.8vw,1.65rem)/1.4 var(--serif); scroll-margin-top:88px; }
.pet-shop-heading a.secondary { display:inline-flex; align-items:center; min-height:44px; padding:5px 9px; white-space:nowrap; text-decoration:none; color:#fff6df; border:1px solid #ccb997; background:#302d27bd; }
.pet-filters { display:flex; flex-wrap:wrap; gap:5px; margin:10px 0 12px; }
.pet-filters button { padding:5px 10px; min-height:38px; border:1px solid #cbb8a2; border-radius:1.4rem; background:#fffaf2; color:#544542; font:600 .86rem/1.3 var(--sans); cursor:pointer; }
.pet-filters button[aria-pressed="true"] { background:#43564c; color:#fff9e9; border-color:#43564c; }
.room-object[data-pet-habitat="zoo"] .room-object-visual { background:radial-gradient(ellipse at 50% 30%,#f7f3de,#cecdb3); }
.room-object[data-pet-habitat] .room-price { font-size:.86rem; }
.room-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  border: 1px solid #d0bba8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.room-tabs button {
  min-height: 45px;
  border: 0;
  border-inline-end: 1px solid #e3d0be;
  background: #fff9ef;
  color: #5a3d3f;
  font: 650 .89rem var(--serif);
  padding: 0 3px;
  white-space: nowrap;
}
.room-tabs button:last-child { border-inline-end: 0; }
.room-tabs button[aria-pressed="true"] { background: #68424e; color: #fff5e5; }
.room-tabs button:focus-visible { outline-offset: -3px; }
.room-intro { margin: 8px 0; font-size: .86rem; line-height: 1.55; }
.room-mens-link { display: inline-block; color: #663b49; font-size: .86rem; padding: 3px 0 10px; text-underline-offset: .16em; }
.room-objects { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.room-object {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid #dac7b3;
  border-radius: 5px;
  overflow: hidden;
  background: #fff9ef;
}
.room-object.is-placed { border-color: #8c6670; }
.room-object-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: clamp(87px, 15vw, 146px);
  overflow: hidden;
  padding: 9px;
  background: radial-gradient(ellipse at 50% 28%, #f8eee0, #e7d2b7);
  border-bottom: 1px solid #e4cfb9;
}
.room-object-visual > img {
  max-width: 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px #5f393546);
}
.room-object-visual:has(.mens-figure) {
  padding: 0;
  display: block;
}
.room-object-visual .mens-figure { height: 140%; width: auto; margin: 2px auto 0; }
.room-object-copy { display: flex; flex: 1; flex-direction: column; padding: 8px; gap: 5px; }
.room-object h3 { margin: 0; font: 700 .94rem/1.35 var(--serif); overflow-wrap: anywhere; }
.room-price { color: #754957; font-size: .77rem; font-weight: 700; }
.room-object p { margin: 0 0 3px; font-size: .8rem; line-height: 1.42; color: #5e4d51; flex: 1; }
.room-object button { min-height: 44px; width: 100%; padding: 6px 4px; }
.room-confirm {
  width: min(430px,calc(100vw - 28px));
  padding: 22px;
  color: #39282b;
  background: #fff7e9;
  border: 1px solid #a9835a;
  border-radius: 7px;
  box-shadow: 0 20px 55px #35272e80;
}
.room-confirm::backdrop { background: #211a25a1; }
.room-confirm h3 { margin: 0; font: 650 1.35rem var(--serif); }
.room-confirm p { font-size: .93rem; line-height: 1.55; }
.room-confirm div { display: flex; gap: 8px; justify-content: flex-end; }
.room-shortfall { color: #872b39; }
@media (min-width: 800px) {
  .room-home { position: sticky; top: 12px; }
}
@media (max-width: 760px) {
  .room-layout { grid-template-columns: 1fr; }
  .room-stage { aspect-ratio: 1.43; }
  .room-prop img { max-height: min(27vw,118px); }
  .room-object-visual { height: clamp(88px,27vw,143px); }
}
@media (prefers-reduced-motion: reduce) {
  .room-light { transition: none; }
  .room-prop[data-prop="teaWarmer"] .room-prop-on { animation: none; }
}

.room-heroine {
  position:absolute; z-index:6; pointer-events:none; left:32%; bottom:7%;
  width:37%; height:66%; isolation:isolate;
}
.room-heroine::before {
  content:''; position:absolute; bottom:1%; left:34%; width:32%; height:3.5%;
  border-radius:50%; background:#392b2973; filter:blur(3px); z-index:-1;
}
.room-heroine > img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
.room-butler {
  position:absolute; z-index:4; left:9%; bottom:24%; width:17%; height:52%;
  object-fit:contain; object-position:center bottom; pointer-events:none;
  filter:drop-shadow(2px 4px 3px #39291e42);
}
.room-stage.is-editing :is(.room-heroine,.room-butler) { opacity:.55; }
.room-heading-titles p { margin-top:3px; font-size:.82rem; letter-spacing:.025em; }
.home-listings > h3 { margin:14px 0 0; font:650 1.27rem/1.35 var(--serif); color:#543441; }
.home-listings > .room-intro { margin:5px 0 12px; color:#695257; }
.home-listing-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.home-listing,.home-butler-listing {
  appearance:none; display:flex; align-items:stretch; flex-direction:column;
  min-width:0; text-align:left; padding:0; overflow:hidden;
  border:1px solid #d6bd9d; border-radius:5px; background:#fffaf0; color:#493239;
  cursor:pointer; font:inherit;
}
.home-listing:hover,.home-butler-listing:hover { border-color:#915b62; }
.home-listing:focus-visible,.home-butler-listing:focus-visible { outline:2px solid #784456; outline-offset:2px; }
.home-listing.is-current { border-color:#976d44; box-shadow:inset 0 0 0 1px #c39864; }
.home-listing > img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
.home-listing-copy { display:flex; align-items:flex-start; flex-direction:column; gap:3px; padding:8px 9px 10px; }
.home-listing-copy strong { font:650 clamp(.88rem,2.8vw,1rem)/1.38 var(--serif); }
.home-style { color:#765d56; font-size:.72rem; letter-spacing:.06em; }
.home-price { color:#7b4354; font-size:.81rem; font-weight:700; }
.home-listing-copy small { color:#665451; font-size:.71rem; }
.home-butler-listing { flex-direction:row; align-items:center; width:100%; margin-top:10px; }
.butler-vignette { display:block; width:33%; height:104px; overflow:hidden; background:radial-gradient(ellipse at 50% 38%,#f0e8d1,#d0b99b); }
.butler-vignette img { display:block; height:185%; width:100%; object-fit:contain; object-position:center top; }
.home-preview { width:min(465px,calc(100% - 24px)); padding:0; max-height:90vh; max-height:90dvh; overflow:auto; }
.home-preview > .home-preview-image { display:block; background:#e7d8bb; }
.home-preview-image img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
.home-preview-image.is-butler img { height:clamp(180px,35dvh,280px); object-fit:contain; padding:8px; }
.home-preview-copy { display:block; padding:14px clamp(14px,4vw,23px) 20px; }
.home-preview-copy h3 { margin:2px 0 8px; }
.home-preview-copy p { margin:6px 0; }
.home-preview-copy .home-price { font-size:1rem; margin-top:12px; }
.home-preview-actions { margin-top:15px; flex-wrap:wrap; }
.home-preview-actions button { min-height:44px; }
