@font-face {
  font-family: "Pixelify Sans";
  src: url("./assets/pixelify-sans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-serif.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #1c131d;
  --surface: #261b27;
  --control: #332631;
  --edge: #5a444e;
  --line: #f4c2a326;
  --ink: #f8e8d8;
  --muted: #cbb1ac;
  --accent: #f1bd89;
  --display: "Instrument Serif", Georgia, serif;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--night);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.scene {
  position: relative;
  min-height: 100svh;
  margin-inline: auto;
  isolation: isolate;
  --stage-width: min(100% - 36px, 1780px, max(860px, (100svh - 85px) * 1.8957));
  --chrome-height: 60px;
}
.room-controls { position: relative; }
.room-viewport {
  width: var(--stage-width);
  margin: 6px auto 0;
  overflow: hidden;
  border-radius: 9px;
  outline: 1px solid #edbb9c24;
  box-shadow: 0 18px 55px #09050d60;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.room-art {
  position: relative;
  width: 100%;
  margin-top: -3.5287%;
  transform: translateY(var(--room-lift, 0px));
  transition: transform 240ms cubic-bezier(.18,.75,.3,1);
}
.room-highlight { position: absolute; pointer-events: none; border: 1px solid #ffdda488; border-radius: 4px; }
.room-highlight span:not(:empty) { position: absolute; z-index: 1; left: 50%; top: -7px; transform: translate(-50%, -100%); padding: 4px 9px; border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 12px; white-space: nowrap; }
.room-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#art { display: block; width: 100%; height: auto; image-rendering: pixelated; touch-action: manipulation; }
#art:focus-visible { outline-offset: -4px; }
#decorMotion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.scene[data-lighting="moonlight"] .room-viewport { background: #22365f; }
.scene[data-lighting="moonlight"] :is(#art, #decorMotion),
.moonlight-thumb {
  opacity: .9;
  filter: saturate(.86) brightness(.88);
}

.quick-nav {
  position: relative;
  z-index: 1;
  min-height: var(--chrome-height);
  width: var(--stage-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.room-brand { display: flex; align-items: center; gap: 10px; font: 400 31px/1 var(--display); color: #ffe3c9; letter-spacing: -.035em; }
.brand-mark { width: 5px; height: 5px; margin: 0 7px 7px 0; background: var(--accent); box-shadow: 0 7px #ba8274, 7px 0 #ba8274, 7px 7px var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-primary { align-self: stretch; gap: 8px; }
.nav-primary .quiet { height: 38px; padding-inline: 15px; }
.nav-secondary { position: relative; justify-self: end; gap: 7px; }
.quick-nav .customize-link { padding-inline: 13px; color: var(--accent); border: 1px solid #eeb58042; }
.audio-shortcut, .more-shortcut { display: grid; place-items: center; position: relative; width: 38px; height: 38px; }
.audio-shortcut::before {
  content: ""; width: 0; height: 0; margin-left: 1px;
  border: 5px solid transparent; border-left: 8px solid currentColor; border-right: 0;
}
.audio-shortcut[data-playing="true"]::before {
  width: 9px; height: 11px; margin-left: 0; border-block: 0;
  border-inline: 3px solid currentColor;
}
.audio-shortcut[data-playing="true"] { color: var(--accent); }
.more-shortcut::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: -5px 0 currentColor, 5px 0 currentColor; }
.more-shortcut[aria-expanded="true"] { color: var(--ink); background: var(--control); }
.nav-extras {
  position: absolute; top: calc(100% + 8px); right: 0; width: 184px;
  padding: 5px; border-radius: 12px; border: 1px solid var(--line);
  background: #2b202d; box-shadow: 0 10px 30px #100a17a0;
}
.nav-extras .quiet { display: block; width: 100%; min-height: 42px; padding-inline: 12px; text-align: left; color: var(--ink); }
.nav-extras .quiet:last-child { border-top: 1px solid var(--line); border-start-start-radius: 0; border-start-end-radius: 0; }

.quiet, .button.soft, .close, .mini, .photo-picker {
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
}
.quiet { min-height: 38px; padding: 4px 9px; font-size: 14px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.nav-primary .quiet[data-open="Today"] { color: var(--ink); }
.quiet:hover, .button.soft:hover, .close:hover, .mini:hover, .photo-picker:hover { background: #f4bd9811; color: var(--ink); }
.quiet, .button, .close, .mini, .appearance-card, .appearance-category { transition: background-color 140ms, border-color 140ms, box-shadow 140ms, transform 130ms ease-out; }
.quiet:active, .button:not(:disabled):active, .close:active, .mini:active, .appearance-card:active, .appearance-category:active { transform: scale(.97); }

.screen-msg, .feedback {
  z-index: 4;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 12px;
}
.screen-msg { display: none; position: absolute; top: 45%; left: 50%; transform: translateX(-50%); width: min(90%, 360px); }
.screen-msg.show { display: block; }
.feedback { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; pointer-events: none; }
.feedback:empty { display: none; }
.feedback[data-error="true"] { border-color: #ef9c8e; }

.backdrop { position: fixed; inset: 0; z-index: 2; background: #150c226a; opacity: 0; pointer-events: none; transition: opacity 190ms ease; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.backdrop.is-previewing-room { background: #100a161a; }
.drawer, .restore-dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 54px #13091193;
}
.drawer[data-tone="paper"] {
  color-scheme: light;
  --surface: #f1e4d9;
  --control: #fbefe5;
  --line: #74594e30;
  --edge: #947364;
  --ink: #301f2d;
  --muted: #6c4d56;
  --accent: #65404f;
  border-color: #ffe9d9;
}
.drawer {
  position: absolute;
  inset: calc(var(--chrome-height) + 25px) max(3%, (100% - var(--stage-width)) / 2 + 17px) auto auto;
  width: min(44%, 482px);
  max-height: min(calc(100svh - var(--chrome-height) - 51px), 700px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 190ms ease, transform 220ms cubic-bezier(.18,.75,.3,1), visibility 0s linear 220ms;
}
.drawer.open { visibility: visible; pointer-events: auto; opacity: 1; transform: translate(0); transition-delay: 0s; }
.drawer.customizer { width: clamp(354px, 34%, 488px); }
.drawer[data-side="left"] { inset-inline: max(3%, (100% - var(--stage-width)) / 2 + 17px) auto; }
.drawer[data-side="left"]:not(.open) { transform: translateX(-12px); }
.motion-control { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.motion-control input {
  appearance: none; flex: 0 0 36px; width: 36px; height: 21px; margin: 0;
  border: 1px solid #af919d65; border-radius: 12px; background: #402f3d;
  background-image: radial-gradient(circle at 9px 50%, #ddc4be 0 5.5px, transparent 6px);
  cursor: pointer;
}
.motion-control input:checked { background: var(--accent); background-image: radial-gradient(circle at 25px 50%, #382436 0 5.5px, transparent 6px); border-color: var(--accent); }
.motion-note { margin-top: 4px; font-size: 13px; }
.sound-heading, .sound-volume { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section .sound-heading h3 { margin-block: 0; }
.sound-heading .button { min-width: 110px; border: 1px solid var(--line); }
.sound-layers { margin-top: 8px; }
.sound-layers .motion-control, .sound-volume { border-bottom: 1px solid var(--line); }
.sound-volume { min-height: 47px; }
.sound-volume input { width: min(55%, 210px); min-height: 36px; accent-color: var(--accent); }
.appearance-categories { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; background: var(--surface); }
.appearance-category { min-height: 42px; padding: 4px 1px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 13px; white-space: nowrap; }
.appearance-item { width: 100%; min-height: 44px; margin: 0 0 15px; padding: 0 12px; font: inherit; color: var(--ink); background-color: #311f2a; border: 1px solid var(--line); border-radius: 7px; }
.appearance-category:focus-visible { outline-offset: -3px; }
.appearance-category:hover, .appearance-category[aria-pressed="true"] { color: var(--ink); }
.appearance-category[aria-pressed="true"] { border-bottom-color: var(--accent); }
.appearance-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 13px; }
.appearance-cards[data-options="marker"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.appearance-card { min-width: 0; display: grid; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: left; scroll-margin-top: 48px; }
.appearance-card:hover, .appearance-card[aria-pressed="true"] { color: var(--ink); }
.appearance-card-art { position: relative; display: block; aspect-ratio: 224 / 120; overflow: hidden; border-radius: 7px; background: #1d141d; }
.appearance-card-art::after { content: ""; position: absolute; inset: 0; border: 1px solid #fce0ba18; border-radius: inherit; pointer-events: none; }
.appearance-card[aria-pressed="true"] .appearance-card-art::after { border-color: var(--accent); }
.appearance-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.appearance-card-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; min-height: 20px; font-size: 13px; line-height: 1.25; }
.saved-indicator { width: 10px; height: 6px; border: solid var(--accent); border-width: 0 0 1px 1px; transform: rotate(-45deg); margin-inline-end: 3px; }
.marker-sample { display: grid; place-items: center; height: 100%; background: #dda596; color: var(--sample-ink); font: 600 33px/1 "Pixelify Sans", monospace; }
.drawer-footer:not([hidden]) { display: flex; align-items: center; gap: 8px; flex: none; border-top: 1px solid var(--line); padding: 11px 25px; background: #21151f; border-radius: 0 0 13px 13px; }
.drawer-footer #resetAppearance { margin-inline-end: auto; padding-inline: 5px; color: var(--muted); font-size: 13px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 25px 27px 11px 30px; }
.drawer-head h2, .restore-dialog h2 { margin: 0; font: 400 clamp(36px, 3.4vw, 54px)/1 var(--display); letter-spacing: -.024em; }
.drawer-body { min-height: 0; overflow: auto; padding: 5px 30px 26px; overscroll-behavior: contain; scrollbar-color: var(--edge) transparent; }
.drawer-body.is-editing .panel-content { display: none; }

.section + .section { margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 8px; font: 400 27px/1.05 var(--display); }
.goal-group + .goal-group { margin-top: 18px; }
.sub, .notice, .item-sub, .field-label { color: var(--muted); }
.sub, .notice { margin: 0 0 9px; }
.item-sub, .field-label { font-size: 13px; }
.item-sub { margin-top: 2px; }

.input, .area, .sel {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
  color: var(--ink);
}
.input::placeholder, .area::placeholder { color: var(--muted); opacity: .9; }
.area { min-height: 117px; resize: vertical; }
.area-short { min-height: 58px; }
.filter .input, .filter .sel { width: auto; min-width: 0; }
.today-section #taskDay { background: transparent; border-color: transparent; padding-inline: 0 4px; color: var(--muted); font-size: 14px; }
.today-section .filter { margin-bottom: 2px; }
.today-section .task-composer { margin-top: 2px; }
.entry-list { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-list { padding-top: 2px; }
.planner-empty { margin: 18px 0 4px; font-size: 14px; }

.button {
  min-height: 42px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #2e2024;
  font-weight: 600;
  white-space: nowrap;
}
.button.soft, .photo-picker { font-weight: 500; color: var(--muted); }
.drawer[data-tone="paper"] .button:not(.soft) { color: #fff1e4; }
.drawer[data-tone="plain"] .button:not(.soft) { color: #fff; }
.drawer:is([data-tone="paper"], [data-tone="plain"]) :is(.button.soft, .mini, .close, .photo-picker):hover { background: #6d465315; }
.drawer:is([data-tone="paper"], [data-tone="plain"]) :is(button, input, select, textarea, summary):focus-visible { outline-color: var(--accent); }
.drawer[data-tone="paper"] .close { border: 1px solid var(--line); border-radius: 50%; }
.button.danger { color: #311d23; background: #f4a5ab; }
.button.danger-text { color: #ffb2b9; }
.button:disabled { opacity: .55; cursor: default; }
.drawer-footer .button { min-height: 44px; }
.close, .mini { position: relative; display: grid; place-items: center; color: var(--muted); }
.close { flex: 0 0 44px; height: 44px; }
.mini { min-width: 37px; min-height: 40px; }
.icon-close::before, .icon-close::after { content: ""; position: absolute; width: 15px; height: 1px; background: currentColor; transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.icon-edit::before { content: ""; width: 3px; height: 12px; border: 1px solid currentColor; border-radius: 2px 2px 0 0; transform: rotate(42deg); }
.icon-delete::before { content: ""; width: 9px; height: 10px; border: 1px solid currentColor; border-radius: 0 0 2px 2px; transform: translateY(2px); }
.icon-delete::after { content: ""; width: 13px; height: 1px; position: absolute; background: currentColor; transform: translateY(-6px); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.form, .form label { display: grid; gap: 5px; min-width: 0; }
.form { gap: 10px; margin-top: 12px; }
.editor .form, .section > .form:first-child { margin-top: 4px; }
.task-composer { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.task-undo { justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 14px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; }
.filter { margin-bottom: 9px; flex-wrap: wrap; }
.item { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 5px 0; }
.item + .item { border-top: 1px solid var(--line); }
.item-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.item-text.done { color: var(--muted); text-decoration: line-through; }
.item-actions { display: flex; flex: none; }
.item input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0 3px; accent-color: var(--accent); cursor: pointer; }
.text-entry { align-items: start; padding-block: 12px; }
.entry-copy { margin-top: 5px; white-space: pre-wrap; font-size: 16px; line-height: 1.55; }

.drawer[data-tone="plain"] {
  color-scheme: light;
  --surface: #f6f5f3;
  --control: #fff;
  --ink: #262326;
  --muted: #665e65;
  --accent: #654358;
  --line: #35273226;
  --edge: #9a8994;
  border-color: #fff;
}
@media (min-width: 881px) {
  .drawer[data-tone="plain"] { width: min(42%, 420px); }
}
.drawer[data-tone="plain"] .drawer-head { padding: 13px 14px 4px 22px; }
.drawer[data-tone="plain"] .drawer-head h2 { font: 650 20px/1.25 system-ui, sans-serif; letter-spacing: -.018em; }
.drawer[data-tone="plain"] .drawer-head h2:focus-visible { outline-offset: 5px; border-radius: 3px; }
.drawer[data-tone="plain"] .drawer-body { padding: 0 22px 20px; }
.drawer[data-tone="plain"]:where(:not(.income-drawer)) {
  background: linear-gradient(165deg, #fff7, transparent 160px), var(--surface);
  transition: opacity 250ms ease-out, transform 310ms cubic-bezier(.2,.8,.25,1), visibility 0s linear 310ms;
}
.drawer[data-tone="plain"]:not(.income-drawer, .open) { transform: translateX(-6px); }
.drawer[data-tone="plain"].open:not(.income-drawer) { transition-delay: 0s; }
.drawer[data-tone="plain"] .goal-group h3 { font: 650 13px/1.35 system-ui, sans-serif; }
.goal-date { display: block; font-variant-numeric: tabular-nums; }
.journal-date { padding-bottom: 2px; }
.journal-date label { grid-template-columns: auto minmax(0, 153px); align-items: center; gap: 10px; }
.drawer[data-tone="plain"] .form input[type="date"] { padding-inline: 9px; }
.income-filters { display: flex; flex-wrap: wrap; gap: 0 18px; min-width: 0; }
.income-select { position: relative; display: inline-grid; min-width: 0; max-width: 100%; color: var(--muted); }
.income-select::after {
  position: absolute; top: 50%; right: 5px; width: 6px; height: 6px;
  margin-top: -5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); pointer-events: none; content: "";
}
.income-select select {
  appearance: none;
  min-height: 44px;
  width: 100%;
  padding: 5px 19px 5px 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
}
.income-balance {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0 12px; min-height: 44px; margin-block: 0 11px;
}
.income-total {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(29px, 3vw, 36px);
  font-weight: 620;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.income-balance .income-add {
  min-height: 44px; padding-inline: 6px; margin-right: -6px;
  color: var(--accent); font-size: 14px; font-weight: 650;
}
.income-add[hidden] { display: none; }
.income-empty { color: var(--muted); margin: 0; padding-block: 14px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.income-composer { margin-block: 4px 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.income-composer .form { margin: 0; }
.income-drawer .form .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.income-entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.income-entries li + li { border-top: 1px solid var(--line); }
.income-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) fit-content(42%) 9px;
  align-items: center; gap: 1px 11px; width: 100%; min-height: 55px; padding: 8px 2px 8px 0;
  background: transparent; border: 0; border-radius: 4px; color: inherit; text-align: start;
}
.income-entry:hover { background: #35273209; }
.income-source { grid-column: 1; font-size: 15px; font-weight: 530; line-height: 1.3; overflow-wrap: anywhere; }
.income-entry time { grid-row: 2; grid-column: 1; }
.income-entry-amount {
  grid-area: 1 / 2 / 3 / 3; color: var(--ink);
  font-size: 15px; font-weight: 570; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: end;
}
.income-entry::after {
  content: ""; grid-area: 1 / 3 / 3 / 4; width: 6px; height: 6px; justify-self: center;
  border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.income-drawer .income-delete { justify-self: start; margin-top: 8px; color: #a02438; }
.dream-item { align-items: flex-start; padding-block: 10px; }
.dream-item img { width: 67px; height: 67px; flex: 0 0 67px; border: 3px solid #fff5e9; border-radius: 5px; object-fit: cover; }
.dream-item .row { gap: 2px; margin-top: 2px; }
.dream-item .button.soft, .photo-picker { padding: 5px; min-height: 36px; font-size: 14px; color: var(--muted); }
.dream-item .sub { margin: 5px 0 0; }
.photo-picker { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.photo-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.pixel-tools { margin-top: 16px; }
.pixel-tools summary { width: fit-content; }
.palette-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 6px; margin: 10px 0; }
.palette-chip { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.palette-chip i { flex: 0 0 16px; height: 16px; border: 1px solid var(--edge); border-radius: 3px; }
.palette-chip small { color: var(--muted); }
#loupe { image-rendering: pixelated; width: min(100%, 238px); height: auto; border-radius: 8px; }
.restore-dialog { width: min(490px, calc(100vw - 24px)); padding: 20px; }
.restore-dialog::backdrop { background: #110c19bc; }

@media (max-width: 880px) {
  .scene { --stage-width: 100%; --chrome-height: 104px; }
  body:has(.drawer.open) { overflow: hidden; }
  .quick-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 59px 45px;
    column-gap: 8px;
    row-gap: 0;
    padding: env(safe-area-inset-top) 13px 0;
    border-bottom: 1px solid var(--line);
  }
  .room-brand { grid-row: 1; grid-column: 1; font-size: 30px; gap: 10px; }
  .nav-secondary { grid-row: 1; grid-column: 2; gap: 3px; }
  .nav-primary { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid #f4c2a317; }
  .nav-primary .quiet { height: 44px; padding-inline: 4px; }
  .audio-shortcut, .more-shortcut { width: 44px; height: 44px; }
  .quick-nav .customize-link { min-height: 44px; }
  .room-viewport { margin-top: 0; overflow-x: auto; border-radius: 0; outline: 0; scrollbar-color: var(--edge) transparent; }
  .room-art { width: 1050px; margin-top: -37.05px; }
  .drawer, .drawer.customizer, .drawer[data-side="left"] {
    position: fixed; inset: auto 0 0; width: min(100%, 600px); max-height: 83dvh; margin-inline: auto;
    border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .drawer:not(.open), .drawer[data-side="left"]:not(.open) { transform: translateY(22px); }
  .drawer[data-tone="plain"]:not(.income-drawer, .open) { transform: translateY(8px); }
  .drawer.customizer, .drawer.customizer[data-side="left"] { max-height: min(58dvh, 470px); }
  .scene:has(.customizer.open) .feedback { top: calc(env(safe-area-inset-top) + 111px); bottom: auto; }
  .drawer-head { padding: 19px 19px 10px 22px; }
  .drawer-head h2 { font-size: 42px; }
  .drawer-body { padding-inline: 22px; }
  .customizer .drawer-head { padding-block: 8px 2px; }
  .customizer .drawer-head h2 { font-size: 34px; }
  .customizer .drawer-body { padding-top: 0; padding-bottom: 8px; }
  .appearance-categories { gap: 4px; margin-bottom: 12px; }
  .appearance-category { min-height: 44px; }
  .appearance-cards { gap: 9px; }
  .appearance-cards[data-options="mug"] .appearance-card-art { aspect-ratio: 2.1; }
  .drawer-footer:not([hidden]) { padding: 6px 19px; }
  .drawer-footer #resetAppearance { font-size: 12px; }
  .dream-item .button.soft, .photo-picker, .mini { min-height: 44px; }
}

@media (max-width: 440px) {
  .appearance-category { font-size: 12px; }
}
@media (max-width: 350px) {
  .drawer-body { padding-inline: 18px; }
  .drawer.income-drawer .form .two { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .drawer[data-tone="plain"] .form select[name="horizon"] { padding-inline: 8px; }
  .appearance-categories { gap: 3px; }
  .appearance-category { font-size: 11px; }
}

.scene[data-motion="off"] :is(.drawer, .backdrop, .room-art, button) { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .scene :is(.drawer, .backdrop, .room-art, button) { transition: none; }
}
