.studio-panel {
  --st-ink: #27291f;
  --st-muted: #69675a;
  --st-line: #dcd5c2;
  --st-paper: #faf5e8;
  --st-accent: #ae4027;
  color: var(--st-ink);
  min-width: 0;
  font-size: 14px;
}
.studio-panel * { box-sizing: border-box; }
.studio-panel h2, .studio-panel h3, .studio-panel p { margin: 0; }
.studio-panel button, .studio-panel input { font: inherit; }
.studio-panel button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.studio-panel button:focus-visible, .studio-panel input:focus-visible,
.studio-blocks li:focus-visible {
  outline: 2px solid var(--st-accent);
  outline-offset: 3px;
}
.studio-heading { padding: 5px 42px 18px 0; }
.studio-kicker, .studio-block-num, .studio-block-title small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .11em;
}
.studio-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--st-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.studio-kicker::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.studio-heading h2 { margin: 7px 0 5px; font-size: clamp(23px, 4vw, 30px); line-height: 1.25; }
.studio-heading p, .studio-field p, .studio-note, .studio-confirm p {
  color: var(--st-muted);
  font-size: 13px;
  line-height: 1.6;
}
.studio-tabs {
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--st-line);
  border-bottom: 1px solid var(--st-line);
}
.studio-tabs button {
  position: relative;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--st-muted);
  font-weight: 600;
}
.studio-tabs button[aria-pressed="true"] { color: var(--st-accent); }
.studio-tabs button[aria-pressed="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: currentColor;
  content: '';
}
.studio-fields { padding: 18px 0 20px; }
.studio-field + .studio-field { margin-top: 18px; }
.studio-field label, .studio-field h3 {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}
.studio-field input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--st-line);
  border-radius: 7px;
  background: #fffdf5;
  color: var(--st-ink);
  font-size: 16px;
}
.studio-field p { margin: 4px 0 0; font-size: 12px; }
.studio-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.studio-options button {
  display: inline-flex;
  flex: 1 1 60px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--st-line);
  border-radius: 7px;
  background: transparent;
  color: var(--st-ink);
  white-space: nowrap;
}
.studio-options button[aria-pressed="true"] {
  border-color: var(--st-ink);
  background: var(--st-ink);
  color: var(--st-paper);
}
.studio-blocks {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--st-line);
}
.studio-blocks li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 5px 0;
  border-bottom: 1px solid var(--st-line);
}
.studio-block-num { font-size: 11px; color: var(--st-accent); }
.studio-block-title { flex: 1; min-width: 0; }
.studio-block-title strong, .studio-block-title small { display: block; }
.studio-block-title strong { line-height: 1.45; }
.studio-block-title small { font-size: 9px; line-height: 1.6; color: var(--st-muted); }
.studio-hidden-block .studio-block-title strong { color: var(--st-muted); }
.studio-actions, .studio-footer, .studio-confirm div {
  display: flex;
  align-items: center;
}
.studio-actions { flex-shrink: 0; }
.studio-move, .studio-toggle, .studio-link {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--st-ink);
}
.studio-move { width: 44px; padding: 0; border-radius: 6px; }
.studio-move:disabled { color: #b6b0a0; cursor: default; }
.studio-toggle { width: 48px; padding: 0; }
.studio-toggle span {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  border: 1px solid #918a75;
  border-radius: 20px;
  background: #e5decd;
}
.studio-toggle span::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 100%;
  background: #716e60;
  content: '';
}
.studio-toggle[aria-checked="true"] span { background: var(--st-ink); border-color: var(--st-ink); }
.studio-toggle[aria-checked="true"] span::after { left: 16px; background: var(--st-paper); }
.studio-required {
  display: inline-block;
  width: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--st-muted);
}
.studio-footer, .studio-confirm {
  border-top: 1px solid var(--st-line);
  padding-top: 13px;
}
.studio-footer { justify-content: space-between; gap: 12px; }
.studio-link {
  padding: 0 4px;
  color: var(--st-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.studio-done, .studio-confirm button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--st-line);
  border-radius: 7px;
  background: transparent;
  color: var(--st-ink);
  font-weight: 650;
}
.studio-done { border-color: var(--st-accent); background: var(--st-accent); color: white; }
.studio-done svg { width: 17px; }
.studio-confirm strong { font-size: 16px; }
.studio-confirm p { margin: 4px 0 10px; }
.studio-confirm div { justify-content: flex-end; gap: 10px; }
.studio-confirm button.studio-danger { background: var(--st-accent); border-color: var(--st-accent); color: white; }
@media (max-width: 370px) {
  .studio-field + .studio-field { margin-top: 13px; }
  .studio-blocks li { gap: 5px; }
  .studio-block-num { display: none; }
  .studio-options button { gap: 4px; }
}
.studio-transfer { display: flex; justify-content: flex-end; gap: 16px; margin-top: 7px; }
.studio-transfer button {
  min-height: 44px; padding: 0 4px; border: 0; background: transparent;
  color: var(--st-muted); text-decoration: underline; text-underline-offset: 3px;
}
.studio-file-status:not(:empty) { margin-top: 3px; color: var(--st-accent); font-size: 13px; }
