@font-face {
  font-family: Nunito;
  src: url('/musikstudio-20261202/assets/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #2e302a;
  --muted: #625e52;
  --line: #d7d0bf;
  --paper: #fffdf6;
  --teal: #165f53;
  font:
    16px/1.4 Nunito,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: #f6f2e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.44rem 0.76rem;
  cursor: pointer;
  background: var(--paper);
  font-weight: 750;
}
button:hover:enabled {
  border-color: var(--teal);
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
#stage:focus-visible {
  outline: 3px solid #269987;
  outline-offset: 2px;
}
button:disabled,
fieldset:disabled {
  opacity: 0.52;
}
button:disabled {
  cursor: default;
}
.primary,
button[aria-pressed='true'] {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.bar,
main,
footer {
  max-width: 1640px;
  margin: auto;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
}
.brand,
.actions,
.tools,
.tabs,
.history {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.brand {
  gap: 12px;
}
.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.brand h1 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  margin: 0;
}
.brand p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(255px, 22vw, 330px);
  align-items: start;
  gap: clamp(12px, 1.8vw, 28px);
  padding: 16px clamp(12px, 3vw, 48px) 2px;
}
.work,
aside section {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  overflow: hidden;
}
.workbar {
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.workbar button,
.history button {
  font-size: 0.86rem;
}
.tabs button {
  border-radius: 20px;
}
.tools button {
  background: transparent;
  color: var(--teal);
}
.tools button[aria-pressed='true'] {
  background: #d6e8df;
  border-color: var(--teal);
}
#desk {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 8px;
  background-color: #f0ece1;
  background-image: radial-gradient(#c9c4b5 1px, transparent 1px);
  background-size: 16px 16px;
}
#stage {
  width: min(100%, max(525px, calc((100dvh - 219px) * 1.1145)));
  aspect-ratio: 184.78136/165.79839;
  position: relative;
  touch-action: none;
  user-select: none;
  isolation: isolate;
  overflow: hidden;
}
#preview {
  width: 1130px;
  height: 1014px;
  transform-origin: top left;
  pointer-events: none;
  border: 0;
  position: absolute;
  inset: 0;
  background: transparent;
}
#overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: visible;
}
#loading {
  position: absolute;
  background: var(--paper);
  padding: 8px 18px;
  border-radius: 20px;
}
#overlay rect,
#overlay line {
  vector-effect: non-scaling-stroke;
}
#overlay .guide {
  stroke: #6f7e71;
  stroke-dasharray: 4 6;
  opacity: 0.65;
}
#overlay .picked {
  fill: #1284730d;
  stroke: #086854;
  stroke-width: 1.5;
}
#overlay .boundary {
  fill: none;
  stroke: #086854;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
#overlay .handle {
  fill: #fffdf6;
  stroke: #086854;
  stroke-width: 2;
}
#overlay .marquee {
  fill: #12655322;
  stroke: #086854;
  stroke-dasharray: 3 2;
}
.hint {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.46;
  margin: 0.35rem 0 0.75rem;
}
.work > .hint {
  padding: 9px 15px;
  margin: 0;
  border-top: 1px solid var(--line);
}
aside {
  display: grid;
  gap: 12px;
}
aside section {
  padding: 15px 16px;
}
h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.properties > p:first-of-type {
  font-weight: 750;
  color: var(--teal);
  margin: 0.35rem 0 0.8rem;
}
.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.fields label {
  min-width: 0;
  font-size: 0.77rem;
  font-weight: 800;
}
.input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: white;
}
.input input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  appearance: textfield;
}
.input input::-webkit-inner-spin-button {
  appearance: none;
}
.input small {
  color: var(--muted);
  font-weight: 500;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.link {
  border: 0;
  background: transparent;
  color: var(--teal);
  text-decoration: underline;
  padding: 0.45rem 0;
}
.history {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
#tree {
  max-height: clamp(180px, calc(100dvh - 500px), 530px);
  overflow: auto;
  scrollbar-width: thin;
}
#tree details {
  padding-left: 9px;
}
#tree details:first-child {
  margin-top: 0;
}
#tree summary {
  cursor: pointer;
}
#tree .row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  font-size: 0.9rem;
  cursor: pointer;
}
#tree summary > .row {
  display: inline-flex;
}
#tree input {
  accent-color: var(--teal);
}
#tree .row:has(:checked) {
  color: var(--teal);
  font-weight: 850;
}
footer {
  padding: 8px clamp(14px, 3vw, 48px);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
#status {
  color: var(--teal);
  font-weight: 750;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
  max-width: min(420px, 95vw);
  padding: 24px;
}
textarea {
  width: 100%;
  resize: vertical;
}
dialog form {
  margin-top: 10px;
}
@media (max-width: 850px) {
  .bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .actions button {
    font-size: 0.85rem;
  }
  main {
    grid-template-columns: 1fr;
  }
  aside {
    grid-template-columns: 1fr 1fr;
  }
  #stage {
    width: min(100%, 780px);
  }
  #tree {
    max-height: 250px;
  }
  footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 540px) {
  aside {
    grid-template-columns: 1fr;
  }
  .actions {
    gap: 4px;
  }
  .workbar {
    padding: 7px;
  }
  .tools button,
  .tabs button {
    padding: 0.35rem 0.5rem;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  main {
    padding: 9px 7px;
  }
  .work > .hint {
    font-size: 0.78rem;
  }
  #desk {
    padding: 2px;
  }
}

#notice {
  position: fixed;
  z-index: 5;
  inset: auto 16px 16px auto;
  max-width: min(420px, calc(100% - 32px));
  color: white;
  background: #165f53;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 3px 14px #332f2630;
  pointer-events: none;
}

.tabs[hidden]{display:none}
.mode-link{color:var(--teal);font-size:.87rem;font-weight:800;padding:4px 6px}
#overlay .menu-target{stroke:#246c5b;stroke-width:1.2;stroke-dasharray:3 5;fill:none;vector-effect:non-scaling-stroke}
