:root { font: 14px/1.5 -apple-system,"Microsoft YaHei",sans-serif; color: #18314e; background: #e6edf5; }
* { box-sizing: border-box; }
body { margin: 0; }
.workbench { display: grid; grid-template-columns: minmax(320px,1fr) minmax(380px,560px); gap: 28px; max-width: 1280px; margin: auto; padding: 24px; align-items: start; }
.preview { display: flex; justify-content: center; min-width: 0; position: sticky; top: 24px; }
#phone-space { position: relative; flex: none; }
#phone-frame { position: absolute; inset: 0 auto auto 0; padding: 9px; border-radius: 35px; background: #15263b; box-shadow: 0 15px 40px #1c355d33; transform-origin: top left; }
#phone { border: 0; border-radius: 26px; display: block; background: white; }
#console { background: #fff; padding: 20px; border-radius: 18px; box-shadow: 0 4px 18px #1c355d0b; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
header small { letter-spacing: .1em; color: #506780; }
h1 { font-size: 23px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 9px; }
section section, aside section { border-top: 1px solid #e0e8f0; padding: 14px 0; }
.notice { font-size: 12px; color: #506780; background: #f1f6fc; padding: 10px; border-radius: 9px; }
.row { display: flex; gap: 7px; align-items: end; flex-wrap: wrap; margin-bottom: 7px; }
label { font-size: 12px; display: grid; gap: 3px; flex: 1; min-width: 80px; }
.row > label[hidden] { display: none; }
button,input,select { font: inherit; min-height: 36px; border: 1px solid #becddd; border-radius: 7px; background: white; color: #174b87; padding: 5px 8px; }
input,select { width: 100%; min-width: 0; }
button { cursor: pointer; }
button:hover { background: #edf5ff; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 2px solid #174b87; outline-offset: 2px; }
#link-status { font-size: 12px; }
.device-screen { padding: 12px; background: #143b67; color: white; border-radius: 9px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.device-screen strong { flex: 1; }
.device-screen small { flex-basis: 100%; color: #c8e0fa; }
#state { display: grid; grid-template-columns: 65px 1fr; margin: 0 0 10px; font-size: 12px; }
dd { margin: 0; overflow-wrap: anywhere; }
#logs { height: 150px; overflow: auto; margin: 0; padding: 8px 8px 8px 28px; background: #f5f8fc; font-size: 12px; }
#logs li { overflow-wrap: anywhere; padding: 2px; }
.danger { color: #aa352d; }
aside section > small { display: block; color: #506780; margin-top: 5px; }
#scale { font-size: 12px; margin: 5px 0 0; color: #506780; }
@media(max-width:760px) {
  .workbench { display: flex; flex-direction: column; padding: 16px; gap: 20px; }
  .preview { position: static; width: 100%; }
  #console { width: 100%; }
}
#console { max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
@media(max-width:760px) { #console { max-height: 80dvh; } }

.console-head { position: sticky; top: -20px; z-index: 1; background: white; padding-top: 10px; margin-top: -10px; }
.console-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 16px; padding: 4px; background: #eef4fb; border-radius: 10px; }
.console-tabs button { border-color: transparent; background: transparent; }
.console-tabs [aria-selected="true"] { background: #174b87; color: white; font-weight: 700; }
.console-runbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e0e8f0; }
.console-runbar span { font-size: 12px; color: #506780; }
.console-runbar button { font-size: 12px; }
[role="tabpanel"][hidden] { display: none; }
[role="tabpanel"] > section:first-child { border-top: 0; }
#panel-logs #logs { height: clamp(180px, 38dvh, 420px); }
