:root{
  --bg:#ffffff;
  --fg:#0a0a0a;
  --muted:#5f5f5f;
  --line:#dcdcdc;
  --soft:#f4f4f4;
  --soft2:#fafafa;

  --radius:0px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:var(--sans);
  background:var(--bg);
  color:var(--fg);
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background:var(--bg);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 20px;
}

.brand{display:flex; align-items:center; gap:12px;}
.mark{width:12px;height:12px;background:var(--fg);}

.brand-title{font-weight:800; letter-spacing:.2px}
.brand-subtitle{font-size:12px;color:var(--muted); margin-top:2px}

.tabs{
  display:flex;
  border:1px solid var(--line);
  background:var(--soft2);
}

.tab{
  border:0;
  padding:10px 14px;
  background:transparent;
  cursor:pointer;
  font-weight:750;
  color:var(--muted);
  border-right:1px solid var(--line);
}
.tab:last-child{border-right:0}
.tab.active{background:var(--fg); color:var(--bg);}

.container{max-width:1120px; margin:0 auto; padding:28px 20px 44px;}
.panel{display:none}
.panel.active{display:block}

.panel-head h1{margin:0 0 6px 0; font-size:28px;}
.panel-head p{margin:0 0 18px 0}

.grid{display:grid; grid-template-columns:1fr 1fr; gap:16px;}
@media (max-width: 920px){ .grid{grid-template-columns:1fr} }

.card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  background:var(--bg);
}

.label{
  display:block;
  font-size:12px;
  font-weight:800;
  letter-spacing:.2px;
  margin:0 0 6px 0;
}

.input,.select,.textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:11px 12px;
  font-size:14px;
  background:#fff;
  color:var(--fg);
  outline:none;
}

.textarea{
  font-family:var(--sans);
  background:var(--soft2);
  resize:vertical;
  line-height:1.45;
}

.input:focus,.select:focus,.textarea:focus{border-color:#9a9a9a;}

.row{display:flex; gap:10px; align-items:center; margin-top:12px;}
.row.space-between{justify-content:space-between}

.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  margin-top:10px;
}
@media (max-width:520px){ .two-col{grid-template-columns:1fr} }

.btn{
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--fg);
  padding:10px 14px;
  border-radius:var(--radius);
  font-weight:800;
  cursor:pointer;
}
.btn:hover{background:var(--soft)}

.btn.primary{
  background:var(--fg);
  color:var(--bg);
  border-color:var(--fg);
}
.btn.primary:hover{opacity:.92}

.btn.small{padding:8px 10px; font-size:12px;}

.output{
  margin:12px 0 0 0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--soft2);
  min-height:340px;
  white-space:pre-wrap;
  word-wrap:break-word;
  font-family:var(--mono);
  font-size:13px;
  line-height:1.55;
}

.muted{color:var(--muted)}
.small{font-size:12px}
.hint{margin-top:10px; font-size:12px; color:var(--muted);}

.footer{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
}

.toast{
  position:fixed;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  background:var(--fg);
  color:var(--bg);
  padding:10px 12px;
  border-radius:0;
  font-size:12px;
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
}
.toast.show{opacity:1}