:root {
  --ink: #283d39;
  --ink-soft: #536762;
  --paper: #fffaf0;
  --cream: #f8efe1;
  --cream-deep: #eedec7;
  --coral: #ef6f79;
  --coral-dark: #c94e5d;
  --pink: #f7bccb;
  --pink-soft: #fde5e8;
  --gold: #f3bd4f;
  --green: #4d9a7a;
  --green-dark: #32755d;
  --sky: #a9d9e7;
  --blue: #72a2c0;
  --timber: #ba8155;
  --timber-dark: #7c4d35;
  --charcoal: #1f2e2b;
  --toy-shell: #ef6f79;
  --toy-edge: #c94e5d;
  --toy-roof: #34423f;
  --toy-glow: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 5px 0 rgba(40, 61, 57, 0.1);
  --shadow: 0 17px 35px rgba(58, 54, 42, 0.14), 0 3px 0 rgba(40, 61, 57, 0.08);
  --radius: 22px;
  --display: "Avenir Next Rounded", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Avenir Next", "Trebuchet MS", sans-serif;
}

html[data-house-theme="pocket-pop"] {
  --ink: #4b315f;
  --ink-soft: #6f5c7d;
  --paper: #fff9fd;
  --cream: #ffe8f4;
  --cream-deep: #ffcde4;
  --coral: #ff5fa2;
  --coral-dark: #d63c86;
  --pink: #ff91cf;
  --pink-soft: #ffe0f2;
  --gold: #ffd449;
  --green: #38cbb3;
  --green-dark: #159884;
  --sky: #68deea;
  --blue: #50bce4;
  --timber: #bd78e9;
  --timber-dark: #7f4aaa;
  --charcoal: #39284e;
  --toy-shell: #ff5fa2;
  --toy-edge: #bd2d77;
  --toy-roof: #9d6aeb;
  --toy-glow: rgba(255, 255, 255, 0.72);
}

html[data-house-theme="classic-home"] {
  --toy-shell: #ef6f79;
  --toy-edge: #c94e5d;
  --toy-roof: #34423f;
}

html[data-house-theme="holiday-beach"] {
  --ink: #174f68;
  --ink-soft: #397083;
  --paper: #fffaf2;
  --cream: #fff0d0;
  --cream-deep: #ffdf9f;
  --coral: #ff765f;
  --coral-dark: #d65045;
  --pink: #ff9a7e;
  --pink-soft: #ffe1d3;
  --gold: #ffe170;
  --green: #35bea3;
  --green-dark: #168777;
  --sky: #39d5d0;
  --blue: #2a83b8;
  --timber: #d89455;
  --timber-dark: #906037;
  --toy-shell: #ff765f;
  --toy-edge: #ca4c43;
  --toy-roof: #2a83b8;
}

html[data-house-theme="halloween"] {
  --ink: #2c2249;
  --ink-soft: #65557a;
  --paper: #fff7e9;
  --cream: #2e2447;
  --cream-deep: #4a3568;
  --coral: #ff813a;
  --coral-dark: #ca5427;
  --pink: #9a69df;
  --pink-soft: #e8daf7;
  --gold: #b9ec58;
  --green: #78bd51;
  --green-dark: #4a8730;
  --sky: #7861a8;
  --blue: #56427f;
  --timber: #8c5b41;
  --timber-dark: #58382c;
  --toy-shell: #7d4bd1;
  --toy-edge: #4b2b8c;
  --toy-roof: #251d43;
}

html[data-house-theme="christmas"] {
  --ink: #214f43;
  --ink-soft: #55756c;
  --paper: #fffdf6;
  --cream: #f1f5e9;
  --cream-deep: #d8e7ce;
  --coral: #d94252;
  --coral-dark: #a82e3b;
  --pink: #eb7180;
  --pink-soft: #f8dce0;
  --gold: #f5c84b;
  --green: #28755c;
  --green-dark: #17513e;
  --sky: #b9d9df;
  --blue: #6095a3;
  --timber: #a66d48;
  --timber-dark: #70452f;
  --toy-shell: #d94252;
  --toy-edge: #a52b38;
  --toy-roof: #28755c;
}

html[data-house-theme="wizard-school"] {
  --ink: #2c2746;
  --ink-soft: #625c78;
  --paper: #fff9e9;
  --cream: #e9e0ce;
  --cream-deep: #d3c5aa;
  --coral: #7f315b;
  --coral-dark: #55213e;
  --pink: #b66a92;
  --pink-soft: #ead9e2;
  --gold: #d7aa49;
  --green: #426c5d;
  --green-dark: #294d41;
  --sky: #54789b;
  --blue: #3e5e80;
  --timber: #80563e;
  --timber-dark: #51372d;
  --toy-shell: #7f315b;
  --toy-edge: #4d1d38;
  --toy-roof: #3d315f;
}

html[data-house-theme="custom-builder"] {
  --coral: var(--custom-primary);
  --coral-dark: color-mix(in srgb, var(--custom-primary), #38184c 32%);
  --pink: color-mix(in srgb, var(--custom-primary), white 34%);
  --pink-soft: color-mix(in srgb, var(--custom-primary), white 76%);
  --green: var(--custom-secondary);
  --green-dark: color-mix(in srgb, var(--custom-secondary), #173c45 30%);
  --sky: color-mix(in srgb, var(--custom-secondary), white 18%);
  --blue: var(--custom-secondary);
  --toy-shell: var(--custom-primary);
  --toy-edge: color-mix(in srgb, var(--custom-primary), #38184c 34%);
  --toy-roof: var(--custom-roof);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.85) 0 6%, transparent 20%),
    radial-gradient(circle at 88% 0%, rgba(247, 188, 203, 0.32) 0 8%, transparent 28%),
    var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

html[data-house-theme="pocket-pop"] body[data-mode="child"] {
  background:
    radial-gradient(circle at 11% 11%, rgba(255, 255, 255, 0.9) 0 5%, transparent 5.5%),
    radial-gradient(circle at 88% 7%, rgba(104, 222, 234, 0.42) 0 11%, transparent 24%),
    radial-gradient(circle at 3% 70%, rgba(182, 132, 244, 0.28) 0 10%, transparent 25%),
    linear-gradient(145deg, #ffeaf5 0 44%, #fff7df 100%);
}

html[data-house-theme="halloween"] body[data-mode="child"] {
  background:
    radial-gradient(circle at 80% 8%, rgba(185, 236, 88, 0.17) 0 7%, transparent 22%),
    linear-gradient(150deg, #2c2249, #57406f 58%, #f6d49d 160%);
}

html[data-house-theme="wizard-school"] body[data-mode="child"] {
  background: radial-gradient(circle at 75% 0%, rgba(215, 170, 73, 0.22), transparent 26%), linear-gradient(145deg, #ded5c5, #f6edda);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(114, 162, 192, 0.45);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-family: var(--display);
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.1vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0.35rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

main {
  min-height: calc(100vh - 130px);
}

.topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  padding: max(14px, env(safe-area-inset-top)) clamp(22px, 4vw, 58px) 14px;
  border-bottom: 1px solid rgba(40, 61, 57, 0.12);
  background: rgba(255, 250, 240, 0.84);
  box-shadow: 0 6px 22px rgba(56, 61, 48, 0.05);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--ink);
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.brand small {
  margin-top: -2px;
  color: #7a7770;
  font-size: 0.72rem;
  font-weight: 650;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
  width: 54px;
  height: 50px;
  overflow: visible;
  filter: drop-shadow(0 2px 0 rgba(40, 61, 57, 0.12));
}

.child-nav,
.scene-switch {
  display: flex;
  padding: 5px;
  border: 1px solid rgba(40, 61, 57, 0.13);
  border-radius: 999px;
  background: rgba(238, 222, 199, 0.58);
}

.nav-pill,
.scene-switch button {
  min-height: 42px;
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-pill.active,
.scene-switch button.active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 11px rgba(40, 61, 57, 0.11);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.button,
.round-button {
  border: 0;
  font-family: var(--display);
  font-weight: 780;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.button:hover,
.round-button:hover {
  filter: brightness(1.02);
  transform: translateY(-2px);
}

.button:active,
.round-button:active {
  transform: translateY(1px);
}

.button {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 13px;
}

.round-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(40, 61, 57, 0.14);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-size: 1.25rem;
}

.button-dark {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 5px 0 #132521;
}

.button-cream {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 5px 0 rgba(16, 38, 32, 0.24);
}

.button-pink {
  color: #fff;
  background: linear-gradient(145deg, var(--pink), var(--coral));
  box-shadow: 0 5px 0 var(--coral-dark), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 15px;
  padding-left: 15px;
}

.theme-button span {
  color: var(--gold);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}

.button-coral {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 5px 0 var(--coral-dark);
}

.button-green {
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-dark);
}

.button-outline {
  border: 1px solid rgba(40, 61, 57, 0.2);
  background: #fff;
  box-shadow: 0 4px 0 rgba(40, 61, 57, 0.08);
}

.button-danger {
  color: #fff;
  background: #b94651;
  box-shadow: 0 5px 0 #87313a;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--coral-dark);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #ffe9b8;
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: min(1500px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 25px;
}

.pocket-total {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 245px;
  padding: 10px 12px;
  border: 1px solid rgba(40, 61, 57, 0.14);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}

.pocket-total small,
.pocket-total strong {
  display: block;
}

.pocket-total small {
  color: #7b7b72;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pocket-total strong {
  font-size: 1.18rem;
}

.coin {
  display: inline-grid;
  place-items: center;
  border: 3px solid #d0922f;
  border-radius: 50%;
  color: #91651d;
  background: var(--gold);
  box-shadow: inset 0 0 0 3px #ffd978, 0 3px 0 #b77a20;
  font-family: Georgia, serif;
  font-weight: 800;
}

.coin-small {
  width: 41px;
  height: 41px;
}

.chevron {
  margin-left: auto;
  color: var(--coral);
  font-size: 2rem;
  line-height: 1;
}

.world-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 22px;
  width: min(1500px, calc(100% - 56px));
  margin: 0 auto 34px;
}

.world-column {
  min-width: 0;
}

.scene-switch {
  width: fit-content;
  margin-bottom: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.scene-switch button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 17px;
}

.scene-switch span {
  color: var(--coral);
  font-size: 1rem;
}

.scene-stage {
  position: relative;
  height: clamp(490px, 60vw, 680px);
  min-height: 530px;
  overflow: hidden;
  border: 10px solid var(--toy-shell);
  border-radius: 48px;
  background: linear-gradient(#bce3ed 0 38%, #a8ce8d 38% 100%);
  box-shadow: 0 0 0 6px var(--paper), 0 18px 0 var(--toy-edge), 0 30px 45px rgba(75, 49, 95, 0.22), inset 0 0 0 4px var(--toy-glow);
  isolation: isolate;
}

.scene-stage::before {
  position: absolute;
  z-index: 45;
  inset: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 7% 10%, rgba(255, 255, 255, 0.85) 0 3px, transparent 4px),
    radial-gradient(circle at 91% 16%, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 4% 89%, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px);
  background-size: 110px 110px, 140px 140px, 90px 90px;
  pointer-events: none;
  content: "";
}

.scene-stage::after {
  position: absolute;
  z-index: 50;
  inset: 0;
  border: 2px solid rgba(40, 61, 57, 0.11);
  border: 3px solid rgba(255, 255, 255, 0.62);
  border-radius: 34px;
  pointer-events: none;
  content: "";
}

.compact-hinge {
  position: absolute;
  z-index: 55;
  top: 45%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 74px;
  border: 4px solid var(--paper);
  color: var(--paper);
  background: var(--toy-edge);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.22), 0 5px 0 rgba(75, 49, 95, 0.22);
  font-size: 0.9rem;
  pointer-events: none;
}

.hinge-left { left: -9px; border-radius: 0 18px 18px 0; }
.hinge-right { right: -9px; border-radius: 18px 0 0 18px; }

.toy-sticker {
  position: absolute;
  z-index: 48;
  color: #fff8ba;
  text-shadow: 0 2px 0 var(--toy-edge);
  pointer-events: none;
}

.sticker-one { top: 8%; left: 4%; font-size: 1.6rem; transform: rotate(-12deg); }
.sticker-two { right: 4%; bottom: 5%; font-size: 1.35rem; transform: rotate(14deg); }

.sky-decor {
  position: absolute;
  inset: 0 0 63% 0;
  overflow: hidden;
  background: linear-gradient(165deg, #96d0e2, #d9eff1);
}

.cloud,
.garden-cloud {
  position: absolute;
  width: 100px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.cloud::before,
.cloud::after,
.garden-cloud::before,
.garden-cloud::after {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.cloud::before,
.garden-cloud::before {
  left: 18px;
  width: 47px;
  height: 47px;
}

.cloud::after,
.garden-cloud::after {
  right: 14px;
  width: 36px;
  height: 36px;
}

.cloud-one {
  top: 17%;
  left: 7%;
}

.cloud-two {
  top: 9%;
  right: 7%;
  transform: scale(0.75);
}

.sun {
  position: absolute;
  top: 12%;
  right: 27%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff1b8;
  background: var(--gold);
  box-shadow: 0 0 0 11px rgba(243, 189, 79, 0.2);
}

.house-roof {
  position: absolute;
  z-index: 4;
  top: 5.5%;
  left: 7%;
  width: 86%;
  height: 27%;
  border: 5px solid var(--ink);
  border-radius: 28px 28px 5px 5px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 4px, transparent 4px 10px),
    var(--toy-roof);
  clip-path: polygon(50% 0, 100% 87%, 97% 100%, 3% 100%, 0 87%);
  filter: drop-shadow(0 12px 0 rgba(41, 61, 57, 0.16));
}

.chimney {
  position: absolute;
  top: 29%;
  right: 17%;
  width: 7%;
  height: 40%;
  border: 4px solid var(--ink);
  border-bottom: 0;
  background: #f3ead8;
}

.roof-window {
  position: absolute;
  top: 42%;
  left: calc(50% - 25px);
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: var(--coral);
  background: #fff6dd;
}

.dollhouse {
  position: absolute;
  z-index: 6;
  top: 22%;
  left: 6%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 44% 56%;
  width: 88%;
  height: 70%;
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 13px 13px 24px 24px;
  background: #fef1da;
  box-shadow: 0 17px 0 var(--toy-edge), 0 24px 22px rgba(75, 49, 95, 0.2);
}

.room {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: #f5eddd;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  isolation: isolate;
}

.room-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.furniture-line {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thin-outline {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fine-line {
  fill: none;
  stroke: color-mix(in srgb, var(--ink), transparent 22%);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shelf-line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 6;
  stroke-linecap: round;
}

.basket-line {
  fill: none;
  stroke: #7b5742;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.room:hover,
.room:focus-visible {
  z-index: 12;
  filter: saturate(1.06) brightness(1.025);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.58);
}

.room.selected {
  z-index: 10;
  box-shadow: inset 0 0 0 6px var(--gold);
}

.room.selected .room-label {
  color: var(--ink);
  background: var(--gold);
}

.wall-texture {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.38;
  background-image: radial-gradient(rgba(40, 61, 57, 0.08) 0.8px, transparent 0.8px);
  background-size: 7px 7px;
}

.room-label {
  position: absolute;
  z-index: 20;
  top: 9px;
  left: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 18px);
  padding: 5px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  box-shadow: 2px 2px 0 rgba(40, 61, 57, 0.15);
  font-family: var(--display);
  font-size: clamp(0.56rem, 0.9vw, 0.72rem);
  font-weight: 800;
  white-space: nowrap;
}

.room-label span {
  color: var(--coral);
}

.job-bubble {
  position: absolute;
  z-index: 21;
  top: 7px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 2px 3px 0 rgba(40, 61, 57, 0.2);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 850;
}

.kids-room {
  grid-column: 1 / 5;
  grid-row: 1;
  background: #ffd8ee;
}

.bath-room {
  grid-column: 5 / 8;
  grid-row: 1;
  background: #c9f5ef;
}

.main-room {
  grid-column: 8 / 13;
  grid-row: 1;
  border-right: 0;
  background: #e6d6ff;
}

.kitchen-room {
  grid-column: 1 / 5;
  grid-row: 2;
  border-bottom: 0;
  background: #fff0af;
}

.living-room {
  grid-column: 5 / 10;
  grid-row: 2;
  border-bottom: 0;
  background: #d9f5df;
}

.study-room {
  grid-column: 10 / 13;
  grid-row: 2;
  border-right: 0;
  border-bottom: 0;
  background: #ffd4c4;
}

html[data-house-theme="classic-home"] .kids-room { background: #f8e5e7; }
html[data-house-theme="classic-home"] .bath-room { background: #e9ece9; }
html[data-house-theme="classic-home"] .main-room { background: #eee6d9; }
html[data-house-theme="classic-home"] .kitchen-room { background: #eee2c8; }
html[data-house-theme="classic-home"] .living-room { background: #e6e2d9; }
html[data-house-theme="classic-home"] .study-room { background: #e4d1b8; }

html[data-house-theme="halloween"] .kids-room,
html[data-house-theme="halloween"] .main-room,
html[data-house-theme="wizard-school"] .kids-room,
html[data-house-theme="wizard-school"] .main-room { background: #d9c6ed; }
html[data-house-theme="halloween"] .bath-room,
html[data-house-theme="halloween"] .living-room { background: #d9edc2; }
html[data-house-theme="halloween"] .kitchen-room,
html[data-house-theme="halloween"] .study-room { background: #ffd1a8; }

html[data-house-theme="christmas"] .kids-room,
html[data-house-theme="christmas"] .study-room { background: #f4d5d8; }
html[data-house-theme="christmas"] .bath-room,
html[data-house-theme="christmas"] .living-room { background: #d6eadc; }

html[data-house-theme="custom-builder"] .kids-room,
html[data-house-theme="custom-builder"] .main-room,
html[data-house-theme="custom-builder"] .study-room { background: color-mix(in srgb, var(--custom-primary), white 72%); }
html[data-house-theme="custom-builder"] .bath-room,
html[data-house-theme="custom-builder"] .kitchen-room,
html[data-house-theme="custom-builder"] .living-room { background: color-mix(in srgb, var(--custom-secondary), white 72%); }

.window,
.bath-window,
.wide-window,
.kitchen-window,
.bay-window {
  position: absolute;
  border: 3px solid var(--ink);
  background: linear-gradient(145deg, #bde1e8, #ecf6ed);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.window-pink {
  top: 20%;
  right: 7%;
  width: 35%;
  height: 38%;
}

.window-pink i,
.wide-window i,
.bay-window i {
  display: block;
  position: absolute;
  background: var(--ink);
}

.window-pink i:first-child,
.wide-window i:first-child {
  top: 0;
  left: 48%;
  width: 3px;
  height: 100%;
}

.window-pink i:last-child {
  top: 48%;
  left: 0;
  width: 100%;
  height: 3px;
}

.pink-shelves {
  position: absolute;
  top: 24%;
  left: 7%;
  width: 36%;
  height: 30%;
  border-top: 5px solid var(--coral);
  border-bottom: 5px solid var(--coral);
}

.pink-shelves::after {
  position: absolute;
  top: 45%;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--coral);
  content: "";
}

.pink-shelves i {
  position: absolute;
  bottom: 4px;
  width: 7px;
  height: 18px;
  border-radius: 2px 2px 0 0;
  background: var(--gold);
}

.pink-shelves i:nth-child(1) { left: 10%; }
.pink-shelves i:nth-child(2) { left: 23%; height: 14px; background: var(--green); }
.pink-shelves i:nth-child(3) { right: 17%; height: 22px; background: var(--blue); }

.single-bed {
  position: absolute;
  right: 4%;
  bottom: 3%;
  width: 64%;
  height: 33%;
  border: 4px solid var(--ink);
  border-radius: 8px 8px 4px 4px;
  background: #fffefa;
  transform: skewY(-2deg);
}

.single-bed .duvet {
  position: absolute;
  inset: 27% 0 0 0;
  border-top: 2px solid var(--ink);
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #fff 0 8px, #f8d8df 8px 10px);
}

.single-bed .pillow {
  position: absolute;
  z-index: 1;
  top: 10%;
  right: 8%;
  width: 30%;
  height: 23%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.soft-toy {
  position: absolute;
  bottom: 10%;
  left: 12%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  border-radius: 45% 45% 40% 40%;
  color: #6c503b;
  background: #c89c72;
}

.bath-window {
  top: 20%;
  left: 11%;
  width: 33%;
  height: 25%;
}

.shower {
  position: absolute;
  top: 17%;
  right: 5%;
  width: 42%;
  height: 76%;
  border: 3px solid #33433f;
  border-bottom-width: 7px;
  background: linear-gradient(110deg, rgba(180, 218, 221, 0.45), rgba(255, 255, 255, 0.36));
}

.shower::before {
  position: absolute;
  top: 10%;
  left: 47%;
  width: 3px;
  height: 46%;
  background: #586662;
  content: "";
}

.shower::after {
  position: absolute;
  top: 8%;
  left: 37%;
  width: 22px;
  height: 6px;
  border-radius: 50%;
  background: #586662;
  content: "";
}

.vanity {
  position: absolute;
  bottom: 4%;
  left: 5%;
  width: 42%;
  height: 27%;
  border: 3px solid var(--ink);
  background: #af7d59;
}

.vanity i {
  position: absolute;
  top: -8px;
  left: 22%;
  width: 58%;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.round-mirror {
  position: absolute;
  top: 25%;
  left: 17%;
  width: 23%;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #b9d2d5;
}

.plant-pot {
  position: absolute;
  bottom: 26%;
  left: 5%;
  color: var(--green-dark);
  font-size: 1.3rem;
}

.wide-window {
  top: 19%;
  right: 7%;
  width: 35%;
  height: 34%;
}

.double-bed {
  position: absolute;
  bottom: 4%;
  left: 24%;
  width: 58%;
  height: 39%;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: #a87752;
}

.double-bed i {
  position: absolute;
  inset: 18% 3% 0;
  border: 2px solid var(--ink);
  border-radius: 7px 7px 3px 3px;
  background: repeating-linear-gradient(90deg, #faf8ef 0 6px, #ded8c7 6px 8px);
}

.double-bed b {
  position: absolute;
  top: 8%;
  left: 18%;
  width: 28%;
  height: 16%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fbf8ed;
  box-shadow: 48px 0 0 #fbf8ed, 48px 0 0 2px var(--ink);
}

.bedside {
  position: absolute;
  bottom: 5%;
  width: 13%;
  height: 25%;
  border: 3px solid var(--ink);
  background: #333d3b;
}

.bedside.left { left: 7%; }
.bedside.right { right: 5%; }

.round-wall-mirror {
  position: absolute;
  top: 20%;
  left: 9%;
  width: 24%;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #c7d7d5;
}

.cabinet-wall {
  position: absolute;
  top: 13%;
  left: 5%;
  width: 45%;
  height: 36%;
  border: 3px solid var(--ink);
  background: #fffdf6;
}

.cabinet-wall i {
  display: inline-block;
  width: 33%;
  height: 100%;
  border-right: 2px solid #8d8d82;
}

.kitchen-window {
  top: 16%;
  right: 7%;
  width: 36%;
  height: 34%;
}

.island {
  position: absolute;
  right: 14%;
  bottom: 5%;
  width: 63%;
  height: 29%;
  border: 4px solid var(--ink);
  background: #fffdf7;
  transform: skewX(-4deg);
}

.island i {
  position: absolute;
  top: -9px;
  left: -3%;
  width: 106%;
  height: 10px;
  border: 2px solid var(--ink);
  background: #e9e3d8;
}

.stool {
  position: absolute;
  bottom: 2%;
  width: 18px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 8px 8px 0 0;
  background: #d2aa82;
}

.stool-a { left: 28%; }
.stool-b { left: 50%; }

.pendant {
  position: absolute;
  top: 0;
  width: 3px;
  height: 30%;
  background: var(--ink);
}

.pendant::after {
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 19px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 3px 3px;
  background: var(--pink);
  content: "";
}

.pendant-a { left: 41%; }
.pendant-b { left: 63%; }

.bay-window {
  top: 12%;
  right: 5%;
  width: 44%;
  height: 38%;
  transform: perspective(140px) rotateX(-3deg);
}

.bay-window i {
  top: 0;
  width: 3px;
  height: 100%;
}

.bay-window i:nth-child(1) { left: 25%; }
.bay-window i:nth-child(2) { left: 50%; }
.bay-window i:nth-child(3) { left: 75%; }

.fireplace {
  position: absolute;
  top: 24%;
  left: 5%;
  width: 25%;
  height: 55%;
  border: 4px solid var(--ink);
  background: #a26d45;
}

.fireplace::before {
  position: absolute;
  top: -10px;
  left: -8%;
  width: 116%;
  height: 10px;
  border: 2px solid var(--ink);
  background: var(--timber);
  content: "";
}

.fireplace i {
  position: absolute;
  right: 14%;
  bottom: 8%;
  left: 14%;
  height: 52%;
  border: 3px solid var(--ink);
  border-radius: 10px 10px 0 0;
  background: #24312f;
}

.fireplace i::after {
  position: absolute;
  bottom: 4px;
  left: calc(50% - 7px);
  color: #e88a4c;
  content: "♦";
}

.sectional {
  position: absolute;
  right: 3%;
  bottom: 4%;
  width: 55%;
  height: 31%;
  border: 4px solid var(--ink);
  border-radius: 14px 14px 7px 7px;
  background: #eeeae0;
}

.sectional::before {
  position: absolute;
  top: -36%;
  right: -4px;
  width: 20%;
  height: 68%;
  border: 4px solid var(--ink);
  border-radius: 12px 12px 0 0;
  background: #eeeae0;
  content: "";
}

.sectional i,
.sectional b,
.sectional em {
  position: absolute;
  top: 9%;
  width: 19%;
  height: 45%;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #e8d5bf;
}

.sectional i { left: 8%; }
.sectional b { left: 38%; background: #78927d; }
.sectional em { right: 8%; background: #d8b2aa; }

.coffee-table {
  position: absolute;
  bottom: 6%;
  left: 37%;
  width: 22%;
  height: 11%;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #855a43;
}

.floor-basket {
  position: absolute;
  bottom: 4%;
  left: 7%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 31px;
  border: 3px solid var(--ink);
  border-radius: 3px 3px 10px 10px;
  color: #6f513d;
  background: #c69a73;
}

.study-cabinet {
  position: absolute;
  top: 13%;
  right: 4%;
  bottom: 4%;
  left: 4%;
  border: 4px solid var(--ink);
  background: #bf9068;
}

.study-cabinet::before,
.study-cabinet::after {
  position: absolute;
  top: 4%;
  bottom: 4%;
  width: 25%;
  border: 2px solid rgba(40, 61, 57, 0.65);
  background: #c79a73;
  content: "";
}

.study-cabinet::before { left: 4%; }
.study-cabinet::after { right: 4%; }

.desk {
  position: absolute;
  z-index: 3;
  right: 24%;
  bottom: 29%;
  left: 24%;
  height: 7%;
  border: 3px solid var(--ink);
  background: #e2b787;
}

.monitor {
  position: absolute;
  z-index: 4;
  bottom: 36%;
  left: 39%;
  width: 25%;
  height: 23%;
  border: 3px solid var(--ink);
  border-radius: 3px;
  background: #324445;
}

.monitor::after {
  position: absolute;
  bottom: -14px;
  left: 42%;
  width: 4px;
  height: 14px;
  background: var(--ink);
  content: "";
}

.desk-chair {
  position: absolute;
  z-index: 4;
  bottom: 3%;
  left: 40%;
  width: 24%;
  height: 22%;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 5px 5px;
  background: #c8c8c2;
}

.paper-stack {
  position: absolute;
  z-index: 5;
  bottom: 38%;
  right: 26%;
  width: 17%;
  height: 4%;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 -4px 0 var(--pink), 0 -5px 0 var(--ink);
}

.house-foundation {
  position: absolute;
  z-index: 5;
  bottom: 2%;
  left: 9%;
  display: flex;
  justify-content: space-around;
  width: 82%;
}

.house-foundation span {
  width: 9%;
  height: 26px;
  border: 4px solid var(--ink);
  background: #d6c3a9;
}

.scene-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  color: #797a71;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
}

.scene-hint span {
  font-size: 1.15rem;
}

/* Garden view */
.garden-active {
  background: #9bc478;
}

.garden-sky {
  position: absolute;
  inset: 0 0 44% 0;
  overflow: hidden;
  background: linear-gradient(#91cae1, #d5e8dc);
}

.garden-cloud {
  top: 15%;
  left: 22%;
  transform: scale(1.2);
}

.garden-sun {
  position: absolute;
  top: 10%;
  right: 14%;
  color: #f0b844;
  font-size: 4rem;
  filter: drop-shadow(0 0 13px rgba(243, 189, 79, 0.55));
}

.garden-house {
  position: absolute;
  z-index: 2;
  top: 4%;
  right: -1%;
  width: 46%;
  height: 48%;
  border: 5px solid var(--ink);
  border-radius: 8px 0 0 4px;
  background: #f4efe1;
  transform: skewY(-1deg);
}

.weatherboards {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(40, 61, 57, 0.15) 14px 16px);
}

.garden-window,
.garden-door {
  position: absolute;
  z-index: 2;
  top: 20%;
  border: 4px solid var(--ink);
  background: #a9c9d1;
}

.garden-window {
  left: 9%;
  width: 26%;
  height: 35%;
}

.garden-door {
  right: 14%;
  width: 23%;
  height: 71%;
}

.deck-zone {
  position: absolute;
  z-index: 5;
  top: 30%;
  right: 3%;
  left: 10%;
  width: auto;
  height: 32%;
  overflow: visible;
  border: 5px solid var(--ink);
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #a8734d 0 9px, #74472f 9px 11px);
  box-shadow: 0 17px 0 rgba(64, 47, 34, 0.25);
  transform: perspective(700px) rotateX(8deg) skewX(-2deg);
}

.deck-zone .room-label,
.garden-zone .room-label {
  transform: none;
}

.deck-art {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.deck-rails {
  position: absolute;
  z-index: 3;
  bottom: -4px;
  left: -3%;
  width: 106%;
  height: 47%;
  border-top: 7px solid #4e5e59;
  border-bottom: 6px solid #4e5e59;
}

.deck-rails i {
  display: inline-block;
  width: 17%;
  height: 100%;
  margin-left: 2%;
  border-right: 4px solid #4e5e59;
}

.deck-table {
  position: absolute;
  z-index: 6;
  top: 25%;
  left: 48%;
  width: 24%;
  height: 26%;
  border: 4px solid var(--ink);
  background: #a97950;
  transform: perspective(100px) rotateX(17deg);
}

.deck-table i,
.deck-table b {
  position: absolute;
  bottom: -30px;
  width: 5px;
  height: 30px;
  background: var(--ink);
}

.deck-table i { left: 10%; }
.deck-table b { right: 10%; }

.deck-chair {
  position: absolute;
  z-index: 6;
  top: 47%;
  width: 10%;
  height: 30%;
  border: 4px solid var(--ink);
  background: #d7d1c3;
}

.chair-one { left: 39%; }
.chair-two { left: 73%; }

.umbrella {
  position: absolute;
  z-index: 7;
  top: -46%;
  left: 25%;
  width: 8px;
  height: 100%;
  background: #4a504d;
}

.umbrella i {
  position: absolute;
  top: 0;
  left: -53px;
  width: 112px;
  height: 63px;
  border: 4px solid var(--ink);
  border-radius: 60px 60px 7px 7px;
  background: #39423f;
}

.deck-planter {
  position: absolute;
  z-index: 8;
  bottom: 10%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 31px;
  border: 3px solid var(--ink);
  color: #286249;
  background: #6b4a34;
}

.planter-one { left: 7%; }
.planter-two { right: 7%; }

.garden-zone {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 49%;
  overflow: hidden;
  border: 0;
  border-top: 5px solid var(--ink);
  border-radius: 0;
  background: linear-gradient(#9ebd73, #5f8f59);
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%);
}

.garden-zone .room-label {
  top: 20%;
  left: 6%;
}

.garden-zone .job-bubble {
  top: 19%;
  right: 6%;
}

.terrace {
  position: absolute;
  left: -5%;
  width: 110%;
  height: 8%;
  border-top: 6px solid #7a6a50;
  border-bottom: 3px solid #514d3f;
  background: #9b8669;
  transform: rotate(-2deg);
}

.terrace-one { top: 39%; }
.terrace-two { top: 69%; transform: rotate(1deg); }

.garden-path {
  position: absolute;
  top: 7%;
  bottom: -25%;
  left: 44%;
  width: 19%;
  background: repeating-linear-gradient(10deg, #cbbda2 0 18px, #a99270 18px 21px);
  clip-path: polygon(35% 0, 63% 0, 100% 100%, 0 100%);
}

.tree {
  position: absolute;
  bottom: 20%;
  width: 16px;
  height: 42%;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #684934;
}

.tree i {
  position: absolute;
  top: -62px;
  left: -45px;
  width: 100px;
  height: 90px;
  border: 4px solid var(--ink);
  border-radius: 55% 48% 50% 52%;
  background: radial-gradient(circle at 30% 30%, #84b15b, #326c4d);
  box-shadow: -24px 14px 0 #4e8756, 24px 12px 0 #49804d;
}

.tree-one { left: 14%; }
.tree-two { right: 15%; height: 34%; transform: scale(0.8); }

.fern {
  position: absolute;
  color: #2e6d4c;
  font-size: clamp(3rem, 7vw, 6rem);
  text-shadow: 0 4px 0 #22523a;
}

.fern-one { right: 25%; bottom: 1%; transform: rotate(14deg); }
.fern-two { left: 24%; bottom: -5%; transform: rotate(-13deg); }

.flower-bank {
  position: absolute;
  top: 33%;
  right: 20%;
  color: #e86977;
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  text-shadow: 15px 8px 0 #f0b8bd;
}

.garden-foreground {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: -11px;
  left: 0;
  display: flex;
  justify-content: space-around;
  color: #397154;
  font-size: 4rem;
  pointer-events: none;
}

/* Room job panel */
.room-panel {
  align-self: start;
  min-height: 540px;
  margin-top: 61px;
  padding: 24px;
  border: 1px solid rgba(40, 61, 57, 0.13);
  border-radius: 27px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(40, 61, 57, 0.04) 26px 27px);
  box-shadow: var(--shadow);
}

.room-panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 19px;
  padding-bottom: 17px;
  border-bottom: 2px dashed var(--cream-deep);
}

.room-panel-heading h2 {
  font-size: 1.65rem;
}

.room-panel-icon {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border: 3px solid var(--ink);
  border-radius: 15px 15px 15px 4px;
  color: var(--ink);
  background: var(--pink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.35rem;
}

.chore-stack {
  display: grid;
  gap: 13px;
}

.chore-card {
  position: relative;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(40, 61, 57, 0.15);
  border-radius: 17px;
  background: #fffefa;
  box-shadow: 0 4px 0 rgba(40, 61, 57, 0.07);
}

.chore-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--coral);
  content: "";
}

.chore-card.is-pending::before { background: var(--gold); }
.chore-card.is-approved::before { background: var(--green); }

.chore-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.frequency {
  color: #787972;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chore-value {
  padding: 3px 8px;
  border-radius: 999px;
  color: #765116;
  background: #fff0bc;
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 850;
}

.chore-card h3 {
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.chore-card p {
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.42;
}

.complete-button,
.status-button {
  width: 100%;
  min-height: 41px;
}

.status-button {
  border: 0;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-button.pending {
  color: #7f5a19;
  background: #fff1bd;
}

.status-button.approved {
  color: #276149;
  background: #dceee2;
}

.approval-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px dashed rgba(40, 61, 57, 0.24);
  border-radius: 13px;
  color: var(--ink-soft);
  background: #f8f2e7;
  font-size: 0.74rem;
}

.approval-note span {
  color: var(--coral);
}

.approval-note p {
  margin: 0;
}

/* Treasure page */
.treasure-page {
  width: min(1400px, calc(100% - 56px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.treasure-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  align-items: center;
  min-height: 260px;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  border: 7px solid var(--paper);
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.13) 0 5%, transparent 6%),
    radial-gradient(circle at 85% 90%, rgba(239, 111, 121, 0.26) 0 18%, transparent 19%),
    var(--ink);
  box-shadow: var(--shadow);
}

.treasure-copy {
  position: relative;
  z-index: 2;
}

.treasure-copy h1 {
  margin-bottom: 15px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.treasure-copy > p:last-child {
  max-width: 470px;
  margin: 0;
  color: #dbe5df;
}

.treasure-coin {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
  width: clamp(170px, 20vw, 230px);
  aspect-ratio: 1;
  border: 10px solid #c78a26;
  border-radius: 50%;
  color: #79531a;
  background: radial-gradient(circle at 34% 28%, #ffed9f, var(--gold) 55%, #dda535);
  box-shadow: inset 0 0 0 8px #ffdc74, 0 15px 0 #9f6b1e, 0 28px 42px rgba(0, 0, 0, 0.28);
}

.treasure-coin strong {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(1.75rem, 3.5vw, 2.7rem);
}

.treasure-coin small {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-star {
  position: absolute;
  color: var(--gold);
}

.star-a { top: 19%; left: 48%; font-size: 1.8rem; }
.star-b { bottom: 18%; left: 43%; font-size: 0.9rem; }
.star-c { top: 12%; right: 3%; font-size: 2.8rem; opacity: 0.35; }

.treasure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 20px;
  margin-top: 20px;
}

.paper-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(40, 61, 57, 0.13);
  border-radius: 25px;
  background: rgba(255, 254, 250, 0.88);
  box-shadow: var(--shadow-sm);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card-heading > strong {
  color: var(--coral);
  font-size: 1.7rem;
}

.goal-track {
  position: relative;
  height: 26px;
  margin: 40px 0 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream-deep);
}

.goal-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, var(--coral) 0 12px, #f78f98 12px 22px);
}

.goal-character {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 48% 42%;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 3px 4px 0 var(--ink);
  font-style: normal;
  transform: translate(-50%, -50%);
}

.goal-labels,
.mini-stats {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.goal-message {
  margin: 24px 0 0;
  padding: 12px 15px;
  border-radius: 12px;
  color: #2c624d;
  background: #dcede2;
  font-family: var(--display);
  font-size: 0.83rem;
  font-weight: 750;
}

.this-week-card {
  color: #fff;
  background: var(--coral);
}

.this-week-card .eyebrow { color: #ffe1d3; }
.this-week-card > p:not(.eyebrow) { color: #ffe4e2; }
.week-number { margin: 17px 0 0; font-family: var(--display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 850; letter-spacing: -0.06em; }
.this-week-card .mini-stats { margin-top: 25px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.3); color: #fff; }
.mini-stats b { display: block; font-size: 1.2rem; }

.earnings-ledger {
  min-height: 330px;
}

.ledger-stamp {
  padding: 7px 10px;
  border: 2px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  font-size: 0.58rem;
  line-height: 1.12;
  letter-spacing: 0.09em;
  text-align: center;
  transform: rotate(3deg);
}

.ledger-list {
  margin-top: 20px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--cream-deep);
}

.ledger-row:last-child { border-bottom: 0; }
.ledger-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pink-soft); }
.ledger-row strong, .ledger-row small { display: block; }
.ledger-row small { margin-top: 2px; color: #787a74; font-size: 0.71rem; }
.ledger-row > b { color: var(--green-dark); }

.money-map h2 { margin-bottom: 20px; }
.money-map-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--cream-deep); font-size: 0.84rem; }
.money-map-row span { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.coral { background: var(--coral); }
.dot.gold { background: var(--gold); }
.dot.green { background: var(--green); }
.small-print { margin: 18px 0 0; color: #777a73; font-size: 0.72rem; line-height: 1.5; }
.centred { text-align: center; }

/* House wardrobe */
.theme-modal {
  width: min(100%, 980px);
  text-align: left;
}

.wardrobe-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-right: 40px;
}

.wardrobe-heading p:last-child {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.wardrobe-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 4px solid var(--ink);
  border-radius: 50% 50% 45% 48%;
  color: #fff5a9;
  background: linear-gradient(145deg, var(--pink), var(--coral));
  box-shadow: 6px 6px 0 var(--ink), inset 0 0 0 4px rgba(255, 255, 255, 0.35);
  font-size: 1.8rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.theme-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 2px solid rgba(75, 49, 95, 0.14);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(75, 49, 95, 0.08);
}

.theme-card.selected {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral), transparent 66%), 0 6px 0 var(--coral-dark);
}

.theme-preview {
  position: relative;
  height: 126px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--preview-two), color-mix(in srgb, var(--preview-two), white 50%));
}

.theme-preview::after {
  position: absolute;
  right: -10px;
  bottom: -13px;
  left: -10px;
  height: 34%;
  border-top: 3px solid rgba(75, 49, 95, 0.5);
  background: var(--preview-four);
  content: "";
}

.theme-preview-sky {
  position: absolute;
  top: 13px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--preview-one);
  background: var(--preview-four);
  font-size: 1rem;
}

.theme-preview-house {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 50%;
  width: 116px;
  height: 63px;
  border: 4px solid #49365b;
  border-radius: 5px 5px 10px 10px;
  background: var(--preview-four);
  transform: translateX(-50%);
}

.theme-preview-house::before {
  position: absolute;
  top: -42px;
  left: 3px;
  width: 102px;
  height: 56px;
  border: 4px solid #49365b;
  background: var(--preview-three);
  clip-path: polygon(50% 0, 100% 76%, 96% 100%, 4% 100%, 0 76%);
  content: "";
}

.theme-preview-house i,
.theme-preview-house b {
  position: absolute;
  top: 17px;
  width: 22px;
  height: 23px;
  border: 3px solid #49365b;
  background: var(--preview-two);
}

.theme-preview-house i { left: 13px; }
.theme-preview-house b { right: 13px; }
.theme-preview-house em { position: absolute; bottom: 0; left: 47px; width: 20px; height: 37px; border: 3px solid #49365b; border-bottom: 0; background: var(--preview-one); }

.theme-lock {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #49365b;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  font-size: 0.68rem;
}

.theme-copy {
  padding: 14px 14px 9px;
}

.theme-kicker {
  color: var(--coral-dark);
  font-family: var(--display);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.theme-copy h3 {
  margin: 4px 0;
  font-size: 1rem;
}

.theme-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.67rem;
  line-height: 1.38;
}

.theme-action {
  min-height: 40px;
  margin: 0 12px 12px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--ink);
  font-family: var(--display);
  font-size: 0.69rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-card.locked .theme-action {
  color: var(--ink);
  background: #f1e8f3;
}

.theme-action.selected,
.theme-action:disabled {
  color: var(--green-dark);
  background: #d9eee7;
  cursor: default;
}

.locked-feature-list {
  display: grid;
  gap: 8px;
  margin: 0 auto 22px;
  text-align: left;
}

.locked-feature-list span {
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--green-dark);
  background: #dcefe8;
  font-size: 0.73rem;
  font-weight: 750;
}

.locked-badge {
  background: linear-gradient(145deg, var(--pink), var(--coral));
}

.parent-theme-grid,
.commerce-note,
.custom-builder-panel {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.commerce-note {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid rgba(40, 61, 57, 0.15);
  border-radius: 13px;
  color: #626a67;
  background: #fff7dd;
  font-size: 0.73rem;
}

.commerce-note span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #7b5417;
  background: #ffe59a;
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.commerce-note p { margin: 0; }
.theme-metric strong { color: var(--pink); }

.custom-builder-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 30px;
  align-items: center;
  margin-top: 24px;
  padding: 26px;
  border: 3px solid var(--ink);
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(135deg, #49365b, #6e4b83);
  box-shadow: 0 8px 0 rgba(40, 27, 53, 0.25);
}

.custom-builder-panel h2 { font-size: 1.55rem; }
.custom-builder-panel > div > p:last-child { margin: 9px 0 0; color: #e5dced; font-size: 0.78rem; }
.palette-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.palette-form label { display: grid; gap: 5px; color: #e5dced; font-size: 0.63rem; font-weight: 750; text-align: center; }
.palette-form input[type="color"] { width: 100%; height: 48px; padding: 4px; border: 2px solid rgba(255,255,255,.7); border-radius: 10px; background: transparent; cursor: pointer; }
.palette-form .button { grid-column: 1 / -1; }

/* Parent station */
body[data-mode="parent"] {
  background: #e9e5db;
}

.parent-topbar {
  grid-template-columns: 1fr auto auto;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--ink);
}

.parent-topbar .brand strong { color: #fff; }
.parent-topbar .brand small { color: #bcd0ca; }
.parent-topbar .brand-mark { --brand-outline: #30243e; filter: none; }
.parent-lock { display: flex; align-items: center; gap: 8px; color: #d6e0dd; font-size: 0.76rem; font-weight: 700; }
.lock-dot { display: block; width: 9px; height: 9px; border-radius: 50%; background: #65cc96; box-shadow: 0 0 0 5px rgba(101, 204, 150, 0.13); }

.parent-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: calc(100vh - 88px);
}

.parent-sidebar {
  display: flex;
  flex-direction: column;
  padding: 34px 22px;
  color: #fff;
  background: #314641;
}

.parent-sidebar nav {
  display: grid;
  gap: 7px;
}

.parent-sidebar nav button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  min-height: 47px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: #dce7e3;
  background: transparent;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 740;
  text-align: left;
  cursor: pointer;
}

.parent-sidebar nav button.active {
  color: var(--ink);
  background: var(--paper);
}

.parent-sidebar nav button > span {
  color: var(--coral);
  font-size: 1rem;
}

.parent-sidebar nav button b {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 0.68rem;
}

.prototype-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  color: #c6d3cf;
  background: rgba(0, 0, 0, 0.11);
  font-size: 0.7rem;
}

.prototype-note strong { color: #fff; }
.prototype-note p { margin: 4px 0 0; }

.parent-content {
  min-width: 0;
  padding: clamp(30px, 5vw, 62px);
}

.parent-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto 30px;
}

.parent-page-heading > div:first-child > p:last-child {
  max-width: 680px;
  margin: 12px 0 0;
  color: #69716e;
}

.parent-metric {
  display: grid;
  place-items: center;
  min-width: 100px;
  padding: 17px;
  border: 1px solid rgba(40, 61, 57, 0.14);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.parent-metric strong { color: var(--coral); font-size: 2rem; line-height: 1; }
.parent-metric span { color: #757972; font-size: 0.7rem; font-weight: 700; }

.approval-grid {
  display: grid;
  gap: 15px;
  max-width: 1120px;
  margin: 0 auto;
}

.approval-card {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 19px;
  border: 1px solid rgba(40, 61, 57, 0.14);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.approval-room-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--pink-soft);
  font-size: 1.35rem;
}

.approval-detail h2 { margin: 4px 0 2px; font-size: 1.22rem; }
.approval-detail p { margin: 0; color: #73766f; font-size: 0.8rem; }
.approval-value { padding: 7px 10px; border-radius: 9px; color: #765116; background: #ffefbb; }
.approval-actions { grid-column: 2 / 4; display: flex; justify-content: flex-end; gap: 10px; padding-top: 13px; border-top: 1px dashed var(--cream-deep); }

.today-approved {
  max-width: 1120px;
  margin: 30px auto 0;
  padding-top: 23px;
  border-top: 1px solid rgba(40, 61, 57, 0.15);
}

.today-approved > div { display: flex; flex-wrap: wrap; gap: 9px; }
.today-approved span { padding: 7px 10px; border-radius: 8px; color: var(--green-dark); background: #dbece1; font-size: 0.72rem; }

.empty-state {
  padding: 34px 18px;
  border: 1px dashed rgba(40, 61, 57, 0.22);
  border-radius: 18px;
  text-align: center;
}

.empty-state.large {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.34);
}

.empty-state > span { color: var(--coral); font-size: 2rem; }
.empty-state h2 { margin: 8px 0; font-size: 1.1rem; }
.empty-state p { margin: 0; color: #777a72; font-size: 0.8rem; }

.compact-heading { align-items: center; }
.heading-actions { display: flex; gap: 10px; }

.parent-table-wrap {
  max-width: 1120px;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(40, 61, 57, 0.14);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.parent-table {
  width: 100%;
  min-width: 830px;
  border-collapse: collapse;
}

.parent-table th,
.parent-table td {
  padding: 15px 17px;
  border-bottom: 1px solid #e9e1d4;
  font-size: 0.78rem;
  text-align: left;
  vertical-align: middle;
}

.parent-table th {
  color: #7b7c75;
  background: #f3ecdf;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.parent-table tbody tr:last-child td { border-bottom: 0; }
.parent-table td:first-child { max-width: 340px; }
.parent-table td strong, .parent-table td small { display: block; }
.parent-table td small { margin-top: 3px; overflow: hidden; color: #7c7d75; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.parent-table tr.inactive { opacity: 0.58; }
.room-chip { display: inline-block; padding: 5px 8px; border-radius: 8px; background: var(--pink-soft); white-space: nowrap; }

.state-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: #727771;
  background: #e9e6df;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.state-toggle i { width: 9px; height: 9px; border-radius: 50%; background: #94958f; }
.state-toggle.on { color: var(--green-dark); background: #daede2; }
.state-toggle.on i { background: var(--green); }
.edit-link, .text-button { padding: 5px; border: 0; color: var(--coral-dark); background: transparent; font-weight: 750; cursor: pointer; }
.text-button.danger { color: #a43843; }

/* Invoice */
.invoice-card {
  max-width: 1020px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(40, 61, 57, 0.13);
  border-radius: 7px;
  background: #fffefa;
  box-shadow: 0 20px 55px rgba(40, 61, 57, 0.12);
}

.invoice-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 4px solid var(--ink);
}

.invoice-brand { display: inline-block; margin-bottom: 22px; padding: 6px 9px; color: #fff; background: var(--ink); font-family: var(--display); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.16em; }
.invoice-top h2 { font-size: 2rem; }
.invoice-top p { margin: 4px 0 0; color: #70756f; }
.week-picker { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; min-width: 260px; overflow: hidden; border: 1px solid rgba(40,61,57,.18); border-radius: 11px; }
.week-picker button { height: 40px; border: 0; background: #f2eadc; font-size: 1.4rem; cursor: pointer; }
.week-picker button:disabled { opacity: .35; cursor: default; }
.week-picker span { padding: 0 10px; font-family: var(--display); font-size: .76rem; font-weight: 750; text-align: center; }
.print-week { display: none; text-align: right; }
.print-week strong, .print-week small { display: block; }

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 28px 0;
  border: 1px solid #ddd6ca;
}

.invoice-summary > div { padding: 17px; border-right: 1px solid #ddd6ca; }
.invoice-summary > div:last-child { border-right: 0; }
.invoice-summary span, .invoice-summary strong { display: block; }
.invoice-summary span { color: #787a73; font-size: .67rem; text-transform: uppercase; }
.invoice-summary strong { margin-top: 5px; font-size: 1.3rem; }
.invoice-summary .amount-due { color: #fff; background: var(--ink); }
.invoice-summary .amount-due span { color: #c8d6d1; }

.invoice-line {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 150px 95px;
  align-items: center;
  gap: 15px;
  min-height: 59px;
  padding: 10px 0;
  border-bottom: 1px solid #e4ddd2;
  font-size: .77rem;
}

.invoice-line-head { min-height: 34px; color: #747872; font-size: .63rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.invoice-line > span:nth-child(2) strong, .invoice-line > span:nth-child(2) small { display: block; }
.invoice-line small { color: #7c7d77; font-size: .66rem; }
.invoice-line > b { text-align: right; }
.mobile-status { display: none; margin-top: 6px; }
.invoice-empty { padding: 50px 0; color: #777b74; text-align: center; }
.invoice-status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.invoice-status.pending { color: #805a17; background: #ffefb7; }
.invoice-status.approved { color: #31634f; background: #dbecdf; }
.invoice-status.settled { color: #315f6b; background: #d7eaf0; }
.invoice-status.rejected { color: #85414a; background: #f5dce0; }

.invoice-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  margin-top: 30px;
}

.invoice-foot p { max-width: 560px; margin: 0; color: #747870; font-size: .7rem; line-height: 1.55; }
.invoice-foot > div { min-width: 190px; padding-top: 13px; border-top: 3px solid var(--ink); }
.invoice-foot > div span, .invoice-foot > div strong { display: block; text-align: right; }
.invoice-foot > div span { color: #757972; font-size: .68rem; }
.invoice-foot > div strong { font-size: 1.6rem; }
.settlement-history { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 29px; padding: 14px; border: 1px dashed #c9c0b3; color: #676c66; background: #f7f1e7; font-size: .67rem; }
.settlement-history strong { color: var(--ink); }
.settlement-entry { display: inline-flex; align-items: center; gap: 3px; }
.settlement-entry.reversal { color: #8a434b; }
.settlement-entry.reversed { text-decoration: line-through; opacity: .72; }
.outstanding-note { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; margin-top: 18px; padding: 15px; border-left: 5px solid var(--gold); border-radius: 4px 12px 12px 4px; color: #765116; background: #fff4ce; font-size: .75rem; }
.outstanding-note p { grid-column: 1 / -1; margin: 0; color: #796846; font-size: .67rem; }
.data-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1020px; margin: 18px auto 0; color: #737771; font-size: .7rem; }
.data-controls p { margin: 0; }
.settings-panel { max-width: 760px; margin: 0 auto; padding: clamp(22px, 4vw, 38px); }
.settings-panel .chore-form { margin-top: 0; }
.pin-change-field { grid-column: 1 / -1; }
.pin-change-field p { margin: -1px 0 4px; color: #737771; font-size: .7rem; }
.pin-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Modals */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 39, 35, 0.65);
  backdrop-filter: blur(8px);
  animation: fade-in 160ms ease both;
}

.modal-card {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 48px);
  padding: 33px;
  overflow-y: auto;
  border: 5px solid var(--paper);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35), 0 0 0 2px var(--ink);
  text-align: center;
  animation: modal-in 220ms cubic-bezier(.2,.8,.2,1.1) both;
}

.wide-modal { width: min(100%, 650px); text-align: left; }
.modal-card.theme-modal { width: min(100%, 980px); text-align: left; }
.modal-card h2 { font-size: 1.75rem; }
.modal-intro { max-width: 390px; margin: 11px auto 22px; color: var(--ink-soft); font-size: .85rem; }
.modal-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--ink); background: #eee4d4; font-size: 1.5rem; cursor: pointer; }
.pin-lock, .completion-badge { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 17px; border: 3px solid var(--ink); border-radius: 19px 19px 19px 5px; color: #fff; background: var(--coral); box-shadow: 5px 5px 0 var(--ink); font-size: 1.4rem; }
.completion-badge.warning { background: #b94651; }
.pin-dots { display: flex; justify-content: center; gap: 13px; margin: 23px 0 12px; }
.pin-dots i { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 50%; background: transparent; }
.pin-dots i.filled { background: var(--ink); }
.pin-hint { margin-bottom: 17px; color: #7a7c75; font-size: .72rem; }
.form-error { margin: 7px 0 15px; color: #a43340; font-size: .73rem; font-weight: 700; }
.pin-message { min-height: 18px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; width: 280px; max-width: 100%; margin: 0 auto; }
.keypad button { aspect-ratio: 1.7; border: 1px solid rgba(40,61,57,.18); border-radius: 13px; background: #fff; box-shadow: 0 3px 0 rgba(40,61,57,.13); font-family: var(--display); font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.keypad button:disabled { opacity: .42; cursor: wait; }
.keypad .key-special { color: #7a7c76; background: #eee9df; }
.keypad .key-enter { color: #fff; background: var(--green); }

.chore-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-family: var(--display); font-size: .69rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid rgba(40,61,57,.24); border-radius: 11px; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; }
.money-input { position: relative; }
.money-input b { position: absolute; z-index: 1; top: 12px; left: 12px; color: #73766f; }
.money-input input { padding-left: 29px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 11px; grid-column: 1 / -1; margin-top: 5px; }
.modal-actions.stacked { display: grid; justify-content: stretch; }
.big-button { min-height: 52px; font-size: .95rem; }
.setup-modal { width: min(100%, 590px); }
.setup-form { display: grid; gap: 14px; margin-top: 22px; text-align: left; }
.setup-form .big-button { margin-top: 4px; }
.recovery-detail { display: grid; gap: 5px; margin: 18px 0; padding: 12px; border-radius: 11px; color: #6d6255; background: #f2eadf; font-size: .7rem; text-align: left; }
.recovery-detail code { overflow-wrap: anywhere; }
.settlement-modal { width: min(100%, 570px); }
.confirm-list { display: grid; max-height: 290px; margin: 18px 0; overflow-y: auto; border-top: 1px solid #ded4c5; text-align: left; }
.confirm-list > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 11px 4px; border-bottom: 1px solid #ded4c5; }
.confirm-list strong, .confirm-list small { display: block; }
.confirm-list small { margin-top: 2px; color: #747870; font-size: .66rem; }
.install-steps { display: grid; gap: 13px; margin: 22px 0; padding: 0; list-style: none; text-align: left; }
.install-steps li { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; padding: 12px; border-radius: 12px; background: #f3eadc; }
.install-steps li b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--coral); }

.toast-root { position: fixed; z-index: 200; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); display: grid; gap: 10px; pointer-events: none; }
.toast { max-width: 370px; padding: 13px 17px; border: 2px solid var(--ink); border-radius: 13px; color: #fff; background: var(--green); box-shadow: 5px 5px 0 var(--ink); font-family: var(--display); font-size: .78rem; font-weight: 750; animation: toast-in 220ms ease both; }
.toast.neutral { background: var(--blue); }
.toast.error { background: #a83d49; }
.confetti-layer { position: fixed; z-index: 190; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-layer i { position: absolute; top: -30px; width: 10px; height: 18px; border-radius: 2px; animation: confetti-fall 1.8s cubic-bezier(.2,.7,.4,1) both; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 20px max(10px, env(safe-area-inset-bottom));
  color: #85867e;
  font-size: .65rem;
  font-weight: 700;
}

.footer-spark { color: var(--coral); }
body[data-mode="parent"] footer { display: none; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: scale(.92) translateY(12px); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes confetti-fall { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(105vh) rotate(720deg); } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.shake { animation: shake .3s ease; }

@media (min-width: 700px) and (min-height: 560px) {
  body[data-mode="child"][data-child-tab="home"] {
    height: 100dvh;
    overflow: hidden;
  }

  body[data-mode="child"][data-child-tab="home"] #app {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
  }

  body[data-mode="child"][data-child-tab="home"] main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  body[data-mode="child"][data-child-tab="home"] .welcome-row {
    align-items: center;
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 12px;
  }

  body[data-mode="child"][data-child-tab="home"] .welcome-row h1 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
  }

  body[data-mode="child"][data-child-tab="home"] .world-layout {
    align-items: stretch;
    min-height: 0;
    height: 100%;
    margin-bottom: 0;
    padding-bottom: 16px;
  }

  body[data-mode="child"][data-child-tab="home"] .world-column {
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr) 27px;
    min-height: 0;
  }

  body[data-mode="child"][data-child-tab="home"] .scene-switch {
    align-self: start;
    margin-bottom: 7px;
  }

  body[data-mode="child"][data-child-tab="home"] .scene-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  body[data-mode="child"][data-child-tab="home"] .scene-hint {
    margin-top: 7px;
  }

  body[data-mode="child"][data-child-tab="home"] .room-panel {
    align-self: stretch;
    min-height: 0;
    max-height: calc(100% - 48px);
    margin-top: 48px;
    overflow-y: auto;
  }

  body[data-mode="child"][data-child-tab="home"] footer {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr auto 1fr;
  }

  .child-nav {
    order: initial;
    grid-column: auto;
    justify-self: center;
  }
}

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 1fr auto; }
  .child-nav { order: 3; grid-column: 1 / -1; justify-self: center; }
  .topbar { padding-bottom: 10px; }
  .world-layout { grid-template-columns: minmax(0, 1fr) 330px; width: min(100% - 34px, 1100px); gap: 16px; }
  .welcome-row { width: min(100% - 34px, 1100px); }
  .room-panel { padding: 18px; }
  .scene-stage { min-height: 500px; }
  .parent-content { padding: 38px 30px; }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr auto 1fr;
    padding-bottom: 14px;
  }

  .child-nav {
    order: initial;
    grid-column: auto;
    justify-self: center;
  }

  body[data-mode="child"][data-child-tab="home"] .scene-stage {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .topbar { position: sticky; top: 0; grid-template-columns: 1fr auto; gap: 12px; min-height: 72px; padding-right: 16px; padding-left: 16px; }
  .brand small { display: none; }
  .brand-mark { transform: scale(.86); }
  .child-nav { grid-column: 1 / -1; width: 100%; }
  .nav-pill { flex: 1; }
  .install-button { display: none; }
  .theme-button {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .theme-button b { display: none; }
  .parent-button { padding: 9px 12px; font-size: .72rem; }
  .welcome-row { align-items: flex-start; width: calc(100% - 28px); padding: 25px 0 18px; }
  .welcome-row h1 { font-size: 2rem; }
  .pocket-total { min-width: 195px; }
  .world-layout { grid-template-columns: 1fr; width: calc(100% - 28px); }
  .scene-stage { height: 590px; min-height: 0; }
  .room-panel { min-height: 0; margin-top: 0; }
  .chore-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-note { grid-column: 1 / -1; }
  .treasure-page { width: calc(100% - 28px); }
  .treasure-hero { grid-template-columns: 1fr auto; }
  .treasure-coin { width: 170px; }
  .treasure-grid { grid-template-columns: 1fr 1fr; }
  .earnings-ledger { grid-column: 1 / -1; }
  .parent-topbar { grid-template-columns: 1fr auto; }
  .parent-lock { display: none; }
  .parent-shell { grid-template-columns: 1fr; }
  .parent-sidebar { display: block; padding: 10px 14px; }
  .parent-sidebar > .eyebrow, .prototype-note { display: none; }
  .parent-sidebar nav { grid-template-columns: repeat(5, 1fr); }
  .parent-sidebar nav button { grid-template-columns: 22px 1fr auto; }
  .parent-content { padding: 26px 18px 42px; }
  .parent-page-heading { align-items: flex-start; }
  .invoice-summary { grid-template-columns: 1fr 1fr; }
  .invoice-summary > div:nth-child(2) { border-right: 0; }
  .invoice-summary > div:nth-child(-n+2) { border-bottom: 1px solid #ddd6ca; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-builder-panel { grid-template-columns: 1fr; }
}

@media (min-width: 700px) and (max-width: 900px) and (min-height: 560px) {
  .topbar {
    position: relative;
    grid-template-columns: minmax(145px, 1fr) auto auto;
    gap: 10px;
    min-height: 76px;
    padding: 12px 16px;
  }

  .brand small { display: none; }
  .child-nav {
    order: initial;
    grid-column: auto;
    width: auto;
  }
  .nav-pill { min-height: 39px; padding: 8px 13px; }
  .topbar-actions { gap: 7px; }
  .parent-button { min-width: 94px; }

  body[data-mode="child"][data-child-tab="home"] .welcome-row {
    align-items: center;
    width: calc(100% - 28px);
    padding: 8px 0 7px;
  }

  body[data-mode="child"][data-child-tab="home"] .welcome-row h1 { font-size: 1.85rem; }
  body[data-mode="child"][data-child-tab="home"] .pocket-total { min-width: 186px; padding: 7px 10px; }
  body[data-mode="child"][data-child-tab="home"] .world-layout {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 12px;
    width: calc(100% - 28px);
    height: 100%;
    margin-bottom: 0;
  }
  body[data-mode="child"][data-child-tab="home"] .scene-stage { height: 100%; min-height: 0; }
  body[data-mode="child"][data-child-tab="home"] .room-panel {
    min-height: 0;
    max-height: calc(100% - 48px);
    margin-top: 48px;
    padding: 14px;
  }
  body[data-mode="child"][data-child-tab="home"] .chore-stack { grid-template-columns: 1fr; }
  body[data-mode="child"][data-child-tab="home"] .room-panel-heading { margin-bottom: 12px; padding-bottom: 12px; }
  body[data-mode="child"][data-child-tab="home"] .room-panel-icon { width: 42px; height: 42px; }
}

@media (max-width: 620px) {
  .brand strong { font-size: 1.05rem; }
  .parent-button span { display: none; }
  .welcome-row { display: grid; }
  .pocket-total { width: 100%; }
  .scene-switch { width: 100%; }
  .scene-switch button { flex: 1; padding-right: 9px; padding-left: 9px; }
  .scene-stage { height: 480px; border-width: 5px; border-radius: 24px; }
  .room-panel { scroll-margin-top: 122px; }
  .house-roof { left: 2%; width: 96%; }
  .dollhouse { left: 2%; width: 96%; }
  .room-label { top: 5px; left: 5px; padding: 4px 6px; font-size: .5rem; }
  .job-bubble { top: 4px; right: 4px; width: 23px; height: 23px; font-size: .62rem; }
  .chore-stack { grid-template-columns: 1fr; }
  .treasure-hero { grid-template-columns: 1fr; padding: 30px 22px; text-align: center; }
  .treasure-copy > p:last-child { margin-right: auto; margin-left: auto; }
  .treasure-coin { margin-top: 18px; }
  .treasure-grid { grid-template-columns: 1fr; }
  .earnings-ledger { grid-column: auto; }
  .parent-topbar .button-cream { padding: 8px 10px; font-size: .68rem; }
  .parent-sidebar nav button { display: flex; justify-content: center; padding: 8px 5px; font-size: .62rem; text-align: center; }
  .parent-sidebar nav button > span { display: none; }
  .parent-sidebar nav button > b { position: absolute; top: 1px; right: 4px; }
  .parent-page-heading { display: grid; }
  .parent-metric { justify-self: start; }
  .approval-card { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 14px; }
  .approval-room-icon { width: 45px; height: 45px; }
  .approval-actions { grid-column: 1 / -1; }
  .approval-actions .button { flex: 1; padding: 8px; font-size: .7rem; }
  .heading-actions { display: grid; }
  .invoice-card { padding: 24px 18px; }
  .invoice-top { grid-template-columns: 1fr; }
  .week-picker { width: 100%; }
  .invoice-summary { grid-template-columns: 1fr; }
  .invoice-summary > div { border-right: 0; border-bottom: 1px solid #ddd6ca; }
  .invoice-summary > div:last-child { border-bottom: 0; }
  .invoice-line { grid-template-columns: 62px minmax(0, 1fr) 75px; gap: 8px; }
  .invoice-line > span:nth-child(3) { display: none; }
  .mobile-status { display: inline-flex !important; }
  .invoice-foot { grid-template-columns: 1fr; }
  .invoice-foot > div { width: 100%; }
  .modal-card { padding: 29px 20px; }
  .chore-form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .pin-change-field { grid-column: auto; }
  .pin-inputs { grid-template-columns: 1fr; }
  .outstanding-note { grid-template-columns: 1fr; }
  .outstanding-note p { grid-column: auto; }
  .modal-actions { grid-column: auto; }
  .toast-root { right: 14px; bottom: 14px; left: 14px; }
  .theme-grid { grid-template-columns: 1fr; }
  .theme-preview { height: 112px; }
  .wardrobe-heading { align-items: flex-start; }
  .wardrobe-icon { width: 54px; height: 54px; }
  .commerce-note { align-items: flex-start; }
  .palette-form { grid-template-columns: 1fr; }
  .palette-form .button { grid-column: auto; }
}

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

/* A single proportionally scaled scene keeps the artwork and room targets aligned. */
.scene-stage.miniature-stage {
  display: grid;
  place-items: center;
  container-type: size;
  border-width: 5px;
  border-radius: 26px;
  background: #f8e1d8;
  box-shadow: 0 0 0 4px var(--paper), 0 8px 0 var(--toy-edge), 0 18px 28px #56395318;
}
.miniature-stage::before, .miniature-stage::after,
.miniature-stage > .compact-hinge, .miniature-stage > .toy-sticker { display: none; }
.miniature-house {
  position: relative;
  width: min(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  isolation: isolate;
}
.world-art-window { position: absolute; inset: 0; overflow: hidden; }
.world-art { display: block; width: 200%; max-width: none; height: 100%; user-select: none; }
.world-garden .world-art { transform: translateX(-50%); }
.theme-preview.furnished-preview { height: auto; aspect-ratio: 3 / 2; background: #f6e2d5; }
.furnished-preview::after { display: none; }
.furnished-preview > img { display: block; width: 200%; max-width: none; height: 100%; }
.palette-form select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #cab5c4; border-radius: 10px; background: #fffaf5; color: #503544; font: inherit; }
.miniature-art { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.miniature-roof-tint {
  position: absolute;
  inset: 0;
  background: var(--toy-roof);
  mix-blend-mode: color;
  opacity: .65;
  clip-path: polygon(2% 15.6%, 27.4% 2%, 40% 6%, 58% 6%, 73.4% 1.5%, 98% 15.7%);
  pointer-events: none;
}
.mini-room {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  color: #503544;
  cursor: pointer;
  transition: box-shadow .18s, background .18s, border-color .18s;
}
.mini-room:hover { background: #fff5dc18; border-color: #fff8e4b3; }
.mini-room.selected {
  border-color: #fff1ac;
  box-shadow: inset 0 0 0 2px #efb842a6, 0 0 10px #fadb8a40;
}
.mini-room:focus-visible { outline: 3px solid #542a64; outline-offset: 3px; z-index: 3; }
.mini-room-label {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 110%;
  padding: 5px 9px;
  border: 1px solid #e9c9c1;
  border-radius: 20px;
  background: #fffaf1f5;
  box-shadow: 0 2px 5px #42262d26;
  font-size: clamp(9px, 1.65cqw, 13px);
  font-weight: 800;
  line-height: 1.1;
}
.mini-room.selected .mini-room-label { background: #fff0b1; border-color: #e9ba58; }
.mini-room-label b {
  display: grid; place-items: center;
  min-width: 17px; height: 17px;
  border-radius: 50%; background: #744862; color: white;
  font-size: 10px;
}
.mini-kids { left: 4%; top: 20%; width: 30%; height: 30%; }
.mini-bath { left: 35.5%; top: 20%; width: 28%; height: 30%; }
.mini-main { left: 65%; top: 20%; width: 30%; height: 30%; }
.mini-kitchen { left: 4%; top: 53%; width: 33%; height: 32.5%; }
.mini-living { left: 39%; top: 53%; width: 30.5%; height: 32.5%; }
.mini-study { left: 71%; top: 53%; width: 24%; height: 32.5%; }
.mini-deck { left: 3%; top: 18%; width: 94%; height: 34%; }
.mini-garden { left: 3%; top: 56%; width: 94%; height: 39%; }
.mini-deck .mini-room-label, .mini-garden .mini-room-label { font-size: clamp(12px, 2cqw, 16px); padding: 7px 14px; }

/* The artwork gets the canvas; room jobs open only when needed in landscape. */
.room-jobs-toggle, .room-jobs-close { display: none; }
.welcome-row { flex-wrap: wrap; gap: 12px; }
.welcome-row .scene-switch { order: 3; margin: 0; }
.world-layout .room-panel { margin-top: 0; }
.room-panel-heading > div { min-width: 0; }
.room-panel-heading h2, .chore-card h3 { overflow-wrap: anywhere; }
.chore-stack { grid-auto-rows: max-content; }
.room-jobs-close { flex-shrink: 0; margin-left: auto; width: 44px; height: 44px; font-size: 1.7rem; }
.complete-button, .status-button { min-height: 48px; }
button, [role="button"] { touch-action: manipulation; }

@media (min-width: 700px) and (min-height: 560px) {
  body[data-mode="child"] .topbar {
    position: relative;
    grid-template-columns: minmax(145px, 1fr) auto minmax(180px, 1fr);
    min-height: 68px;
    gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  }
  body[data-mode="child"] .brand { gap: 8px; }
  body[data-mode="child"] .brand strong { font-size: 1.2rem; }
  body[data-mode="child"] .brand small { display: none; }
  body[data-mode="child"] .brand-mark { transform: scale(.8); }
  body[data-mode="child"] .child-nav { order: initial; grid-column: auto; width: auto; padding: 3px; }
  body[data-mode="child"] .nav-pill { min-height: 44px; padding: 8px 16px; white-space: nowrap; }
  body[data-mode="child"] .topbar-actions { gap: 8px; }
  body[data-mode="child"] .theme-button { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  body[data-mode="child"] .theme-button b { display: none; }
  body[data-mode="child"] .parent-button { min-height: 44px; padding: 10px 14px; white-space: nowrap; font-size: .8rem; }
  body[data-mode="child"][data-child-tab="home"] .welcome-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    width: calc(100% - 24px);
    padding: 6px 0 10px;
  }
  body[data-mode="child"][data-child-tab="home"] .home-greeting {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  body[data-mode="child"][data-child-tab="home"] .scene-switch { order: initial; flex-shrink: 0; align-self: center; margin: 0; padding: 3px; }
  body[data-mode="child"][data-child-tab="home"] .scene-switch button { min-height: 44px; }
  body[data-mode="child"][data-child-tab="home"] .pocket-total { min-width: 174px; width: auto; padding: 5px 10px; gap: 9px; }
  body[data-mode="child"][data-child-tab="home"] .pocket-total .coin { width: 32px; height: 32px; }
  body[data-mode="child"][data-child-tab="home"] .pocket-total small { font-size: .6rem; }
  body[data-mode="child"][data-child-tab="home"] .pocket-total strong { font-size: 1rem; }
  body[data-mode="child"][data-child-tab="home"] .world-layout {
    width: 100%;
    gap: 12px;
    padding: 0 max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  body[data-mode="child"][data-child-tab="home"] .world-column { grid-template-rows: minmax(0, 1fr) 24px; }
  body[data-mode="child"][data-child-tab="home"] .scene-stage { border-radius: 20px; }
  body[data-mode="child"][data-child-tab="home"] .scene-hint { margin: 6px 0 0; }
  body[data-mode="child"][data-child-tab="home"] .room-panel {
    margin: 0; max-height: 100%; min-height: 0; padding: 16px;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  body[data-mode="child"][data-child-tab="home"] .room-panel-heading { gap: 10px; padding-bottom: 12px; margin-bottom: 12px; }
  body[data-mode="child"][data-child-tab="home"] .room-panel-heading h2 { font-size: 1.35rem; }
  body[data-mode="child"][data-child-tab="home"] .room-panel-icon { width: 40px; height: 40px; flex-shrink: 0; }
  body[data-mode="child"][data-child-tab="home"] .chore-stack { grid-template-columns: 1fr; align-content: start; }
  .mini-room-label { font-size: clamp(12px, 1.65cqw, 16px); padding: 7px 12px; }
}

@media (min-width: 700px) and (min-height: 560px) and (orientation: landscape) {
  body[data-mode="child"][data-child-tab="home"] .world-layout { grid-template-columns: minmax(0, 1fr); }
  body[data-mode="child"][data-child-tab="home"] .world-layout.jobs-open { grid-template-columns: minmax(0, 1fr) clamp(270px, 27vw, 330px); }
  body[data-mode="child"][data-child-tab="home"] .jobs-closed .room-panel { display: none; }
  body[data-mode="child"][data-child-tab="home"] .room-jobs-toggle { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; min-height: 46px; }
  body[data-mode="child"][data-child-tab="home"] .room-jobs-close { display: grid; place-items: center; }
}

@media (min-width: 700px) and (min-height: 560px) and (orientation: portrait) {
  body[data-mode="child"][data-child-tab="home"] .world-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(220px, 26%);
    gap: 12px;
  }
  body[data-mode="child"][data-child-tab="home"] .room-panel {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px 16px;
    margin-top: 0;
    max-height: 100%;
    overflow: hidden;
  }
  body[data-mode="child"][data-child-tab="home"] .room-panel-heading {
    grid-column: 1; grid-row: 1;
    margin: 0; padding: 0; border: 0;
  }
  body[data-mode="child"][data-child-tab="home"] .chore-stack {
    grid-column: 2; grid-row: 1 / 3;
    overflow-y: auto; min-height: 0;
    align-content: start;
  }
  body[data-mode="child"][data-child-tab="home"] .approval-note {
    grid-column: 1; grid-row: 2;
    align-self: start; margin: 0; padding: 10px;
  }
}

@media (max-width: 699px), (max-height: 559px) {
  .welcome-row .scene-switch { width: 100%; }
  .world-column { display: flex; flex-direction: column; }
  .scene-stage.miniature-stage { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .miniature-house { width: 100%; }
}

@media print {
  body { background: #fff; }
  .topbar, .parent-sidebar, .parent-page-heading, .data-controls, footer, .no-print { display: none !important; }
  .parent-shell { display: block; }
  .parent-content { padding: 0; }
  .invoice-card { max-width: none; padding: 0; border: 0; box-shadow: none; }
  .print-week { display: block; }
  .invoice-summary { break-inside: avoid; }
}
