@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Instrument Sans", Geist, system-ui, sans-serif;
  color: #25232b;
  --ink: #25232b;
  --quiet: #514e59;
  --violet: #4b356e;
  --tint: rgba(172, 152, 222, .59);
  --rim: rgba(255, 255, 255, .82);
  --inset: clamp(20px, 2.45vw, 40px);
  --top: 21px;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  padding: 9px;
  background: radial-gradient(ellipse at 50% 0%, #414048, #222127 64%);
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { border: 0; background: transparent; }
button:disabled { cursor: default; opacity: .37; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, canvas:focus-visible {
  outline: 2px solid #6850a0; outline-offset: 2px;
}
button:active:not(:disabled) { transform: scale(.96); }
button, .action { transition: background-color 150ms, color 150ms, transform 160ms; }
svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.svg-library { position: absolute; overflow: hidden; width: 0; height: 0; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.studio {
  position: relative; isolation: isolate; height: 100%; width: 100%; overflow: hidden;
  border-radius: 27px; border: 1px solid #fcf8f9b0;
  box-shadow: 0 0 0 1px #101014, 0 0 0 3px #88828a35;
  background-color: #dedcd7;
}
.scene-view, #board { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-view { pointer-events: none; }
#board { touch-action: none; outline-offset: -4px; }
.studio[data-tool="select"] #board { cursor: default; }
.studio[data-tool="build"] #board, .studio[data-tool="brush"] #board, .studio[data-tool="zone"] #board,
.studio[data-tool="sound"] #board, .studio[data-tool="image"] #board, .studio[data-tool="card"] #board,
.studio[data-mode="play"] #board { cursor: crosshair; }
.studio[data-tool="pan"] #board, .studio.space-held #board { cursor: grab; }
.studio.is-dragging #board { cursor: grabbing; }
.binding {
  position: absolute; inset: 16px auto 14px 5px; z-index: 1; width: 13px; pointer-events: none;
  background-image: radial-gradient(ellipse 5.6px 3.9px at 7px 12px, #66636e 22%, #797580 56%, #a29da1 72%, transparent 98%), radial-gradient(ellipse 6.4px 4px at 7px 14px, #fff7 20%, transparent 96%);
  background-size: 13px 26px; opacity: .77;
}
.glass {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,.38), rgba(242,238,255,.12) 50%, rgba(255,253,250,.26)), rgba(235,230,244,.22);
  border: 1px solid var(--rim);
  -webkit-backdrop-filter: blur(9px) saturate(1.26);
  backdrop-filter: blur(9px) saturate(1.26);
  box-shadow: inset 0 1px 1px #fffd, inset 0 -1px 1px #fff9, inset 1px 0 2px #fdf8ff8c;
  border-radius: 22px;
}
@supports (backdrop-filter: url(#glass-ripple)) {
  .glass::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    backdrop-filter: url(#glass-ripple) blur(2px);
    mask-image: linear-gradient(#000 0, transparent 12px, transparent calc(100% - 12px), #000 100%);
  }
}
.topbar {
  position: absolute; inset: var(--top) var(--inset) auto; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px; z-index: 8; pointer-events: none;
}
.topbar > *, .top-start > *, .top-end > * { pointer-events: auto; }
.top-start, .top-end { display: flex; gap: 9px; align-items: center; min-width: 0; }
.top-start, .top-end { pointer-events: none; }
.top-end { justify-content: end; }
.brand {
  min-height: 59px; display: flex; align-items: center; gap: 9px; text-align: left; padding: 6px 13px 6px 8px; max-width: 224px;
}
.brand:hover, .round:hover, .people:hover { background-color: #ffffff50; }
.brand-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 13px; background: #312a40; color: #fff; }
.brand-icon svg { width: 22px; height: 22px; stroke-width: 1.55; }
.brand-type { display: flex; flex-direction: column; min-width: 0; }
.brand-type strong { font-size: 20px; font-weight: 700; letter-spacing: -.055em; line-height: 1.06; }
.brand-type span { font-size: 11px; line-height: 1.2; color: var(--quiet); max-width: 133px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 3px; }
.chevron { width: 15px; height: 15px; opacity: .72; }
.history, .mode-switch, .camera { display: flex; align-items: center; border-radius: 100px; padding: 4px; gap: 2px; }
.history { padding: 3px; }
.mode-switch { height: 53px; min-width: 212px; }
.mode-switch button {
  min-height: 43px; padding: 0 15px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 100px; font-size: 14px; font-weight: 650; flex: 1;
}
.mode-switch button svg { width: 17px; height: 17px; }
.mode-switch button[aria-pressed="true"] { background: #342944; color: #fff; box-shadow: inset 0 1px 1px #ffffff45; }
.mode-switch button:hover:not([aria-pressed="true"]) { background: #ffffff5e; }
.icon-button { display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: 6px; border-radius: 100px; flex-shrink: 0; }
.icon-button:hover:not(:disabled), .icon-button[aria-pressed="true"] { background-color: #fff8; }
.round { width: 46px; height: 46px; }
.people { display: flex; gap: 6px; padding: 0 12px; height: 46px; font-size: 15px; font-weight: 700; }
.people svg { width: 22px; height: 22px; }

.tools {
  position: absolute; left: var(--inset); top: 50%; transform: translateY(-50%); z-index: 7;
  display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 24px;
}
.tools button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 56px; height: clamp(44px, 7.4vh, 59px); border-radius: 17px; padding: 3px 1px;
}
.tools button svg { width: 23px; height: 23px; }
.tools button span { font-size: 10px; font-weight: 650; letter-spacing: -.01em; }
.tools button:hover { background: #ffffff62; }
.tools button[aria-pressed="true"] { background: linear-gradient(145deg,#cbb8f5d1,#bba7eed1 68%,#a48bd6b3); color: #211631; box-shadow: inset 0 1px 1px #fff9; }
.parts {
  position: absolute; right: var(--inset); top: 50%; transform: translateY(-50%); z-index: 6;
  width: 101px; padding: 7px; display: grid; gap: 3px; max-height: min(72%, 485px);
}
.parts-head { display: flex; align-items: center; justify-content: space-between; padding: 0 1px 0 4px; font-size: 11px; font-weight: 700; gap: 1px; }
.parts-head .icon-button { min-width: 28px; min-height: 28px; padding: 2px; }
.parts-head svg { width: 17px; height: 17px; }
.part-list { display: grid; gap: 4px; overflow: auto; padding: 1px; scrollbar-width: thin; }
.part {
  display: grid; justify-items: center; min-width: 0; padding: 3px 2px 5px; gap: 1px;
  background: #ffffff34; border: 1px solid #fff5; border-radius: 12px; text-align: center; line-height: 1.1;
}
.part canvas { width: 100%; height: 41px; pointer-events: none; }
.part span { font-size: 10px; font-weight: 680; }
.part:hover, .part[aria-pressed="true"] { background-color: #e4d7fbba; }
.part[aria-pressed="true"] { border-color: #a487d1; }
.parts.expanded { width: 198px; }
.parts.expanded .part-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
.parts.expanded .parts-head { font-size: 13px; }
.tool-options {
  position: absolute; z-index: 8; left: calc(var(--inset) + 76px); top: 50%; transform: translateY(-50%);
  min-width: 190px; max-width: 245px; padding: 13px; display: grid; gap: 10px;
  background-color: #eee9f4a0; font-size: 13px;
}
.tool-options h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.option-label { display: grid; gap: 5px; color: var(--quiet); font-size: 12px; }
.option-row, .palette { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.chip { min-height: 30px; padding: 4px 9px; border-radius: 9px; background: #ffffff60; font-size: 12px; }
.chip:hover, .chip[aria-pressed="true"] { background: #d2bff6; color: #261a39; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff9; background: var(--swatch); padding: 0; }
.swatch[aria-pressed="true"] { outline: 1.5px solid #3c2f4e; outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: #7855ab; }

#notes { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.note {
  position: absolute; top: 0; left: 0; width: var(--note-width); height: var(--note-height); transform-origin: top left;
  display: flex; align-items: flex-start; gap: 10px; padding: 13px; color: #23222b;
  background: linear-gradient(135deg,#fff8, color-mix(in srgb,var(--card-color) 27%,#f2edf766) 58%,#fff5);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
  backdrop-filter: blur(7px) saturate(1.15); border-radius: 17px; border: 1px solid #fffffff0;
  box-shadow: inset 0 1px 3px #fffffff2, inset 0 -2px 5px #fff9;
}
.note.is-active { border-color: #7752b9; outline: 1px solid #fff; outline-offset: 2px; }
.note svg { width: 23px; height: 23px; margin-top: 1px; }
.note div { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.note strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: none; font-weight: 700; font-size: 15px; letter-spacing: -.025em; line-height: 1.15; }
.note p { min-height: 0; margin: 5px 0 0; font-size: 12px; line-height: 1.25; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.note-handle { display: none; }
.note.is-active .note-handle { display: block; position: absolute; right: -4px; bottom: -4px; width: 9px; height: 9px; border: 1.4px solid #7752b9; border-radius: 3px; background: #fff; }

.bottom-left { position: absolute; z-index: 5; left: var(--inset); bottom: 18px; display: flex; align-items: center; gap: 10px; }
.bottom-left .round { width: 41px; height: 41px; }
.save-status { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #57535d; }
.save-status svg { width: 15px; height: 15px; }
.save-status.is-error { color: #873424; }
.hint {
  position: absolute; z-index: 4; bottom: 21px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 350px); width: max-content; text-align: center; padding: 5px 10px;
  border-radius: 9px; color: #514e5c; background: #eeeae2a8; font-size: 12px; font-weight: 600; pointer-events: none;
}
.camera { position: absolute; z-index: 5; right: var(--inset); bottom: 17px; }
.camera .icon-button { min-width: 34px; min-height: 35px; padding: 6px; }
.camera .icon-button svg { width: 18px; height: 18px; }
#zoom-reset { font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 43px; height: 32px; padding: 0; border-radius: 20px; }
#zoom-reset:hover { background: #ffffff68; }
.selection {
  position: absolute; z-index: 8; bottom: 57px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 18px;
  background-color: #eee9f5a0;
}
.selection strong { padding: 0 7px 0 8px; max-width: 174px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.selection .icon-button { min-width: 34px; min-height: 34px; }
.selection .icon-button svg { width: 17px; height: 17px; }
.toast {
  position: absolute; z-index: 13; left: 50%; bottom: 101px; transform: translateX(-50%);
  max-width: 88%; min-width: max-content; padding: 9px 15px; border-radius: 14px; text-align: center;
  background-color: #f5eef9d9; color: #32233c; font-weight: 650; font-size: 13px; pointer-events: none;
}
.joystick {
  position: absolute; z-index: 6; bottom: 71px; left: var(--inset); border-radius: 50%; width: 91px; height: 91px; touch-action: none;
}
.joystick span { position: absolute; pointer-events: none; left: 24px; top: 24px; width: 41px; height: 41px; background: #9c83cc73; border: 1px solid #fff9; border-radius: 50%; }
.studio[data-mode="play"] .edit-only { display: none !important; }
.drop-overlay { position: absolute; z-index: 16; inset: 0; background: #d1c0ec8a; display: grid; place-items: center; pointer-events: none; }
.drop-overlay > div { display: flex; align-items: center; gap: 10px; padding: 18px 24px; font-weight: 700; }

.sheet {
  width: min(440px, calc(100vw - 26px)); color: var(--ink); padding: 17px 20px 20px;
  background-color: #f2eef4ec; border-radius: 25px; max-height: min(82dvh, 680px); overflow: auto;
  box-shadow: inset 0 1px 2px #fff;
}
.sheet::backdrop { background: rgba(37,31,45,.29); backdrop-filter: blur(3px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.045em; }
.sheet p { font-size: 14px; line-height: 1.45; margin: 0 0 12px; color: #514a59; }
.sheet form, .sheet-stack { display: grid; gap: 10px; }
.sheet label { display: grid; gap: 5px; font-size: 13px; color: #4b4453; font-weight: 650; }
.sheet input:not([type="range"]):not([type="checkbox"]), .sheet textarea, .sheet select {
  width: 100%; border: 1px solid #ccc0d7; border-radius: 11px; padding: 8px 10px; background: #fffd; color: #28232e; resize: vertical;
}
.sheet .action {
  display: flex; align-items: center; gap: 8px; text-align: left; min-height: 42px; padding: 8px 11px;
  border: 1px solid #fff9; background: #ffffff70; border-radius: 13px; font-size: 14px; font-weight: 650;
}
.sheet .action:hover { background: #e2d7f4; }
.sheet .action.primary { background: #3a2b4d; color: #fff; justify-content: center; }
.sheet .action.primary:hover { background: #543c6d; }
.sheet .sheet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet .world-list { max-height: 170px; overflow: auto; display: grid; gap: 5px; margin-bottom: 1px; }
.world-list .action[aria-current="true"] { background: #dacaf0; }
.sheet .avatar-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.avatar { display: grid; justify-items: center; gap: 3px; background: #ffffff75; border-radius: 13px; padding: 5px 2px 8px; font-size: 12px; font-weight: 650; }
.avatar canvas { width: 61px; height: 63px; }
.avatar:hover, .avatar[aria-pressed="true"] { background: #ddd0f3; }
.sheet details { font-size: 13px; padding: 9px 0; }
.sheet details p { margin: 7px 0 1px; font-size: 13px; }
.sheet dl { margin: 1px 0 0; display: grid; gap: 8px; }
.sheet dt { font-weight: 700; font-size: 14px; }
.sheet dd { margin: -5px 0 5px; font-size: 13px; line-height: 1.4; color: #514a59; }

@media (max-width: 900px) {
  :root { --inset: 21px; --top: 15px; }
  .history { gap: 0; }
  .history .icon-button { min-width: 33px; }
  .tools button { width: 48px; }
  .parts { width: 88px; padding: 5px; }
  .parts-head { padding-left: 3px; }
  .tool-options { left: calc(var(--inset) + 65px); }
  .binding { left: 2px; }
}
@media (max-width: 670px) {
  :root { --inset: 9px; --top: max(9px, env(safe-area-inset-top)); }
  body { padding: 4px; }
  .studio { border-radius: 20px; }
  .binding { width: 7px; left: 1px; opacity: .45; background-size: 8px 21px; }
  .topbar { gap: 5px; grid-template-columns: 1fr auto auto; }
  .top-start, .top-end { gap: 4px; }
  .brand { gap: 5px; min-height: 45px; max-width: 130px; padding: 4px 6px 4px 5px; border-radius: 15px; }
  .brand-icon { width: 28px; height: 29px; border-radius: 9px; }
  .brand-icon svg { width: 17px; height: 17px; }
  .brand-type strong { font-size: 14px; }
  .brand-type span { font-size: 8px; }
  .brand .chevron { display: none; }
  .mode-switch { min-width: 0; height: 43px; padding: 3px; }
  .mode-switch button { min-height: 35px; gap: 3px; font-size: 12px; padding: 0 7px; }
  .mode-switch button svg { width: 13px; height: 13px; }
  .history { position: fixed; top: calc(var(--top) + 60px); left: 14px; }
  .history .icon-button { min-height: 33px; }
  .history .icon-button svg { width: 17px; height: 17px; }
  .people, .round { height: 40px; min-width: 38px; width: 38px; padding: 5px; justify-content: center; }
  .people span { display: none; }
  .people svg, .round svg { width: 19px; height: 19px; }
  .tools { left: 50%; top: auto; bottom: max(9px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 3px; gap: 1px; flex-direction: row; border-radius: 18px; }
  .tools button { width: clamp(37px, 12.1vw, 52px); height: 46px; border-radius: 13px; }
  .tools button svg { width: 20px; height: 20px; }
  .tools button span { font-size: 9px; }
  .parts { display: none; inset: auto 8px 112px; width: auto; transform: none; padding: 5px; }
  .studio[data-tool="build"] .parts { display: grid; }
  .parts.expanded { width: auto; }
  .part-list, .parts.expanded .part-list { display: flex; overflow: auto; gap: 4px; }
  .part { width: 61px; flex: 0 0 61px; }
  .part canvas { height: 36px; }
  .parts-head { padding-left: 7px; }
  .tool-options { left: 9px; top: auto; bottom: 112px; transform: none; }
  .selection { left: 50%; bottom: 111px; max-width: 94%; }
  .selection strong { max-width: 118px; }
  .bottom-left { left: 9px; bottom: 65px; gap: 5px; }
  .save-status { display: none; }
  .bottom-left .round { width: 38px; height: 38px; }
  .camera { right: 9px; bottom: 65px; padding: 2px; }
  .camera .icon-button { min-width: 31px; min-height: 32px; }
  .fit-button { display: none; }
  .hint { max-width: calc(100% - 30px); bottom: 110px; font-size: 11px; }
  .studio[data-tool="build"] .hint, .studio:has(.tool-options:not([hidden])) .hint,
  .studio:has(.selection:not([hidden])) .hint { display: none; }
  .toast { bottom: 215px; min-width: 0; width: max-content; }
  .studio[data-mode="play"] .bottom-left, .studio[data-mode="play"] .camera { bottom: 13px; }
  .studio[data-mode="play"] .hint { bottom: 61px; left: auto; right: 9px; transform: none; max-width: calc(100% - 115px); }
  .joystick { bottom: 61px; }
}
@media (max-width: 365px) {
  .brand-type span { display: none; }
  .brand-icon { display: none; }
  .brand { padding: 5px 7px; }
  .mode-switch button svg { display: none; }
}
@media (orientation: landscape) and (max-height: 525px) and (min-width: 671px) {
  :root { --top: 8px; --inset: 20px; }
  .brand { min-height: 44px; }
  .tools { max-height: calc(100% - 107px); overflow: auto; top: 55%; }
  .tools button { height: 36px; gap: 0; flex-shrink: 0; }
  .tools button svg { width: 17px; height: 17px; }
  .parts { top: 55%; max-height: calc(100% - 113px); }
  .part canvas { height: 29px; }
  .parts-head .icon-button { min-height: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .glass, .note { background: #f1edf5; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: #9586a7; }
  .glass::before { display: none; }
}

.tools { max-height: calc(100% - 138px); overflow: auto; scrollbar-width: none; }
.tools button { flex-shrink: 0; height: clamp(35px, 6.65vh, 51px); width: 60px; }
.tools button svg { width: 21px; height: 21px; }
.studio[data-tool="scan"] #board { cursor: crosshair; }
.parts.expanded { width: 225px; max-height: min(74%, 530px); }
.part-groups { display: flex; flex-wrap: wrap; gap: 3px; padding: 4px; }
.part-groups .chip { padding: 4px 7px; min-height: 24px; font-size: 10px; }
.part small { display: block; font-size: 9px; color: #655a6c; font-variant-numeric: tabular-nums; }
.tool-options { left: calc(var(--inset) + 80px); }
.tool-options .part-detail { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 5px; }
.tool-options input[type="color"], .sheet input[type="color"] { width: 40px; height: 32px; padding: 2px; border-radius: 8px; }
.tool-options .option-label input[type="color"] { width: 39px; }
.seat-action {
  position: absolute; z-index: 6; bottom: 62px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; min-height: 41px; padding: 5px 13px;
  font-size: 13px; font-weight: 700;
}
.seat-action:active:not(:disabled) { transform: translateX(-50%) scale(.97); }
.seat-action:hover { background-color: #f5edf9c7; }
.seat-action svg { width: 19px; height: 19px; }
.scan-list { max-height: 164px; overflow: auto; display: grid; gap: 4px; }
.scan-list .chip { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paint-sheet { width: min(760px, calc(100vw - 22px)); }
.paint-pad { width: 100%; display: block; max-height: 45dvh; border-radius: 12px; border: 1px solid #cbb9ae; touch-action: none; cursor: crosshair; }
.paint-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.paint-controls input[type="range"] { width: min(148px, 32vw); }
.texture-preview {
  min-height: 205px; width: 100%; max-width: 370px; margin: 2px auto 6px; aspect-ratio: 1.52;
  background-repeat: repeat; background-size: 33.333% auto; background-position: center; border-radius: 14px; border: 1px solid #fff;
}
@media (max-width: 900px) and (min-width: 671px) {
  .tools button { width: 54px; }
  .tool-options { left: calc(var(--inset) + 72px); }
}
@media (max-width: 670px) {
  .tools { width: calc(100% - 12px); max-height: none; overflow: visible; }
  .tools button { flex: 1 1 0; min-width: 0; width: auto; height: 46px; }
  .tools button svg { width: 18px; height: 18px; }
  .tools button span { font-size: clamp(7.2px, 2.04vw, 9px); }
  .tool-options { left: 9px; }
  .studio[data-tool="build"] .tool-options { bottom: 209px; }
  .studio[data-tool="build"]:has(.parts.expanded) .tool-options { bottom: 246px; }
  .parts.expanded { width: auto; }
  .part-groups { padding-block: 2px; flex-wrap: nowrap; overflow: auto; }
  .part-groups button { flex: none; }
  .seat-action { left: auto; right: 9px; transform: none; bottom: 96px; }
  .seat-action:active:not(:disabled) { transform: scale(.96); }
}
.tool-options select { width: 100%; padding: 5px 7px; border: 1px solid #b6a5c8; border-radius: 9px; background: #fff9; }
.studio { user-select: none; -webkit-user-select: none; }
.note { padding: 11px; gap: 7px; }
.note-icon { flex: none; }
.note strong { font-size: 14px; }
.sheet input[type="color"] { inline-size: 55px; }
.paint-action { display: flex; align-items: center; gap: 4px; }
.paint-action svg { width: 16px; height: 16px; }
.studio[data-tool="light"] #board { cursor: crosshair; }
.door-action { bottom: 111px; }
@media (max-width: 670px) { .door-action { bottom: 144px; } }
.feed-action { left: auto; right: var(--inset); bottom: 69px; transform: none; }
.feed-action:active:not(:disabled) { transform: scale(.97); }
.feed-action[aria-pressed="true"] { background-color: #d9c8f2e5; }
.animal-hunger { display: grid; gap: 4px; }
.animal-hunger meter { width: 100%; accent-color: #7d609b; }
@media (max-width: 670px) { .feed-action { right: 9px; bottom: 192px; } }

.parts { display: flex; flex-direction: column; }
.parts-head, .part-groups { flex: 0 0 auto; }
.part-list { flex: 1 1 auto; min-height: 0; }
@media (max-width: 670px) {
  .parts { display: none; }
  .studio[data-tool="build"] .parts { display: flex; }
}

.record-state {
  display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 11px;
  border-radius: 12px; background: #fff7; color: var(--quiet); font-size: 13px;
}
.record-state time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
#record-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #a79aaf; }
#record-dot.recording { background: #b34061; }
.sheet .record-stop { background: #8f3e5a; }
.sheet .record-stop:hover { background: #78314b; }
#record-audio { width: 100%; height: 44px; }
