.studio { height: calc(100dvh - 128px); min-height: 640px; display: grid; grid-template-rows: minmax(0, 1fr); }
.demo-banner {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 10px 22px; background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px;
}
.demo-banner strong { font-weight: 650; }
.studio-body { min-height: 0; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
.rail {
  min-height: 0; overflow: auto; padding: 18px 18px 28px; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 55%, transparent);
}
.rail h2 { font-size: 15px; margin: 18px 0 8px; letter-spacing: 0; }
.rail h2:first-child { margin-top: 0; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modes button[aria-pressed="true"], .modes button.active {
  background: var(--accent); color: white; border-color: var(--accent);
}
.rail .stack-btns, .rail .row { display: flex; flex-wrap: wrap; gap: 8px; }
.rail button, .visit-form button { min-height: 38px; }
.visit-form { display: flex; gap: 8px; }
.visit-form input { flex: 1; }
.quiet, .rail .note { color: var(--muted); font-size: 13px; line-height: 1.6; }
#rail-status { min-height: 1.4em; color: var(--accent); font-size: 13px; }
#steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
#steps li { padding-left: 22px; position: relative; color: var(--muted); font-size: 13px; line-height: 1.45; }
#steps li::before { content: ""; position: absolute; left: 0; top: .45em; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }
#steps li.done { color: var(--ink); }
#steps li.done::before { background: var(--good); border-color: var(--good); }
#inbox article { padding: 10px 0; border-top: 1px solid var(--line); }
#inbox article strong { display: block; font-size: 13px; }
#inbox article p { margin: 4px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.creds { display: grid; gap: 6px; font-size: 13px; }
.creds div { display: flex; justify-content: space-between; gap: 8px; }
.creds span { color: var(--muted); }
.creds code { font-family: ui-monospace, monospace; font-size: 12px; }
.stage { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); place-items: center; padding: 8px 12px 16px; }
.frame-label { font-size: 12px; letter-spacing: .08em; color: var(--muted); text-align: center; padding-bottom: 8px; }
#bezel-wrap { position: relative; overflow: hidden; }
#bezel { position: absolute; top: 0; left: 0; transform-origin: top left; box-sizing: border-box; }
#bezel[data-kind="phone"], #bezel[data-kind="tablet"] {
  padding: 12px; border-radius: 36px; background: #1c2430;
  box-shadow: 0 30px 80px #10233c33, inset 0 0 0 1px #ffffff22;
}
#bezel[data-kind="tablet"] { border-radius: 28px; }
#bezel[data-kind="pc"], #bezel[data-kind="admin"] {
  padding: 0; border-radius: 14px; background: transparent;
  box-shadow: 0 24px 70px #17375a24;
}
#screen { display: block; border: 0; background: var(--bg); width: 100%; height: 100%; }
#bezel[data-kind="phone"] #screen, #bezel[data-kind="tablet"] #screen { border-radius: 24px; }
#bezel[data-kind="pc"] #screen, #bezel[data-kind="admin"] #screen { border-radius: 12px; }
@media (max-width: 980px) {
  .studio { min-height: auto; }
  .studio-body { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-top: 1px solid var(--line); }
  .stage { min-height: 82vh; order: -1; }
}
