:root {
  --bg: #F4F2EC; --ink: #111111; --white: #FFFFFF; --muted: #6B6862;
  --red: #EE4A2E; --blue: #3048E0; --yellow: #F7CF2A; --green: #17A85F;
  --line: 2.5px solid var(--ink); --r: 8px;
  --sans: "Gothic A1", system-ui, sans-serif; --mono: "Space Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 500; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.center { min-height: 100vh; display: grid; place-items: center; font-family: var(--mono); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { align-items: flex-end; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 10px; } .gap6 { gap: 6px; }
.center-y { align-items: center; }
.grow, .grow1 { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.h1 { margin: 0; font-size: 40px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.h1.xl { font-size: 56px; letter-spacing: -0.04em; }
.h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.02em; }
.h3 { margin: 8px 0 0; font-size: 18px; font-weight: 900; }
.sub { margin: 4px 0 0; font-size: 15px; line-height: 1.6; }
.lbl { font-size: 13px; font-weight: 900; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.crumb { font-size: 13px; font-weight: 700; }
.underline { display: block; margin-top: 2px; }
.underline path { fill: none; stroke: var(--yellow); stroke-width: 10; stroke-linecap: round; }
mark { background: none; box-shadow: inset 0 -8px 0 var(--yellow); font-weight: 700; }
.circled { position: relative; font-weight: 900; padding: 0 4px; white-space: nowrap; }
.circled::after { content: ""; position: absolute; inset: -6px -8px; border: 3.5px solid var(--red); border-radius: 50%; transform: rotate(-3deg); pointer-events: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; text-decoration: none; }
.mark { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 26px; }
.mark i, .blocks i { display: block; height: 12px; }
.r { background: var(--red); } .w { background: #fff; } .b { background: var(--blue); } .y { background: var(--yellow); } .k { background: var(--ink); } .g { background: var(--green); }
.mark i.b, .blocks i.b { background: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: var(--line); border-radius: var(--r); background: var(--white); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #ECE9E1; }
.btn.primary { background: var(--yellow); font-weight: 900; box-shadow: 4px 4px 0 var(--ink); }
.btn.primary:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn.primary:active { transform: translate(4px, 4px); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.sm { height: 38px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; height: 50px; }
.btn.back { height: 40px; font-size: 14px; }
.btn.bolt svg path { fill: var(--ink); }
.link { background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }
.link.danger { color: #C42A12; }
.ghost { height: 32px; padding: 0 12px; border: 2px solid #fff; border-radius: 6px; background: transparent; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.dashed { padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 6px; background: transparent; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; margin-top: 4px; }
.input { width: 100%; height: 48px; padding: 0 14px; border: var(--line); border-radius: var(--r); background: var(--white); font-size: 15px; font-weight: 700; outline: none; }
.input:focus-visible, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
textarea.input { height: auto; padding: 12px 14px; font-size: 13px; line-height: 1.6; resize: vertical; }
.input.sm { height: 40px; font-size: 14px; }
.input.code { font-size: 26px; letter-spacing: 0.3em; text-align: center; height: 60px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); }
.toggle { width: 64px; height: 36px; padding: 3px; border: var(--line); border-radius: 6px; background: var(--bg); display: flex; cursor: pointer; }
.toggle span { width: 26px; height: 100%; border: var(--line); border-radius: 3px; background: #fff; }
.toggle.on { background: var(--green); justify-content: flex-end; }
.picker { width: 48px; height: 48px; padding: 0; border: var(--line); border-radius: var(--r); background: none; cursor: pointer; flex: none; }
.sendrow { display: flex; gap: 8px; }
.sendrow .input { min-width: 0; }
.seg, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chips button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: var(--line); border-radius: 6px; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button.on, .chips button.on { background: var(--ink); color: #fff; }
.chips button.on { background: var(--blue); }
.tdot { width: 10px; height: 10px; flex: none; display: inline-block; }
.t-int { background: var(--blue); } .t-float { background: var(--ink); } .t-string { background: var(--red); }
.t-bool { background: var(--green); } .t-json { border: 2px solid var(--ink); } .t-trigger { background: var(--yellow); outline: 1.5px solid var(--ink); }
.seg button.on .t-float, .seg button.on .t-json { border-color: #fff; background: #fff; }
.ttag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.fresh { padding: 3px 8px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sdot { width: 10px; height: 10px; border: 2px solid var(--ink); flex: none; display: inline-block; }
.sdot.on { background: var(--green); border-color: var(--green); }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-card { display: flex; flex-direction: column; gap: 14px; justify-content: center; padding: 48px max(24px, 8vw); max-width: 560px; }
.login-card h1 { margin: 24px 0 0; font-size: 44px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; }
.login-art { border-left: var(--line); background: var(--blue); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.blocks { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
.blocks i { height: 44px; border: var(--line); }
.or { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; border-top: 1.5px solid #CFCBC2; }

.page { padding: 28px 24px 64px; }
.page.narrow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.box { padding: 24px; border: var(--line); border-radius: var(--r); background: #fff; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: var(--line); border-radius: var(--r); background: #fff; text-decoration: none; }
.pcard:hover { box-shadow: 4px 4px 0 var(--ink); }
.pcard b { font-size: 18px; font-weight: 900; }
.pcard span { font-size: 13px; }

.shell { display: flex; min-height: 100vh; }
.side { flex: 0 0 248px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 18px; background: #fff; border-right: var(--line); display: flex; flex-direction: column; gap: 20px; }
.home { text-decoration: none; }
.projbtn { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: var(--line); border-radius: var(--r); text-decoration: none; }
.projbtn b { font-size: 15px; font-weight: 900; } .projbtn span { font-size: 12px; }
.sect { display: flex; flex-direction: column; gap: 3px; }
.sect-h { font-size: 12px; font-weight: 700; padding: 0 4px 4px; }
.chan { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 6px; text-decoration: none; font-family: var(--mono); font-size: 14px; }
.chan:hover { background: var(--bg); }
.chan.on { background: var(--ink); color: #fff; font-weight: 700; }
.chanform { margin-top: 4px; }
.devbox { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: var(--line); border-radius: var(--r); text-decoration: none; font-size: 13px; }
.devbox b { font-size: 14px; font-weight: 900; }
.devbox.on, .devbox:hover { box-shadow: 4px 4px 0 var(--ink); }
.devline { display: flex; align-items: center; gap: 8px; }
.main { flex: 1 1 auto; min-width: 0; }
.content { padding: 28px 40px 64px; display: flex; flex-direction: column; gap: 26px; max-width: 1240px; }
.empty { padding: 28px; border: 2px dashed var(--ink); border-radius: var(--r); font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.vcard { display: flex; flex-direction: column; border: var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.vcard .swatch { height: 92px; border-bottom: var(--line); display: flex; justify-content: flex-end; align-items: flex-start; padding: 10px; }
.vbody { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.vkey { font-size: 15px; font-weight: 700; text-decoration: none; }
.vkey:hover { text-decoration: underline; }
.vval { font-family: var(--mono); font-size: 44px; font-weight: 700; line-height: 1; text-decoration: none; overflow-wrap: anywhere; }
.vval.sm { font-size: 22px; }
.meta { font-size: 12px; color: var(--muted); }
.newval { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 18px; border: var(--line); border-radius: var(--r); background: #fff; }

.start { max-width: 860px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: var(--line); }
.steps li { display: flex; align-items: flex-start; gap: 18px; padding: 20px 4px; border-bottom: var(--line); }
.steps li > div { display: flex; flex-direction: column; gap: 6px; }
.steps li b { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.num { width: 34px; height: 34px; flex: none; border: var(--line); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; }
.steps li.cur .num { background: var(--yellow); }
.steps li.done .num { background: var(--ink); color: #fff; }
.steps li.dim { color: var(--muted); } .steps li.dim .num { border-color: var(--muted); }
.steps .newval { margin-top: 8px; }

.cols { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.col { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col.wide { flex: 1.3 1 440px; }
.panel { border: var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.bigval { min-height: 120px; padding: 16px 18px; border-bottom: var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bigval .mono { font-size: 34px; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
.bigval .light { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pbody { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.log { border-top: var(--line); max-height: 360px; overflow-y: auto; }
.logrow { display: grid; grid-template-columns: 18px 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1.5px solid var(--ink); font-size: 14px; font-weight: 700; }
.logrow .muted { font-weight: 500; }
.chip { width: 18px; height: 18px; border: 2px solid var(--ink); }
.pad { padding: 12px 2px; }
.tabs { display: flex; overflow-x: auto; border: var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.tabs button { flex: 1 0 auto; height: 42px; padding: 0 12px; border: 0; border-right: 2px solid var(--ink); background: transparent; font-size: 14px; font-weight: 700; cursor: pointer; }
.tabs button:last-child { border-right: 0; }
.tabs button.on { background: var(--ink); color: #fff; font-weight: 900; }
.codebox { border: var(--line); border-radius: var(--r); background: var(--ink); color: var(--bg); overflow: hidden; }
.codebar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1.5px solid #333; }
.codebar .mono { color: var(--yellow); font-size: 12px; font-weight: 700; }
.codebox pre { margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; max-height: 520px; }
.ruled { padding-top: 14px; border-top: var(--line); font-weight: 700; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.stepper li { display: flex; align-items: center; gap: 8px; }
.stepper li span { width: 26px; height: 26px; border: var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; }
.stepper li.cur { font-weight: 900; } .stepper li.cur span { background: var(--yellow); }
.stepper li.done span { background: var(--ink); color: #fff; }
.stepper .bar { width: 24px; height: 2.5px; background: var(--ink); }
.ptable { border: var(--line); border-radius: var(--r); overflow: hidden; }
.pr { display: grid; grid-template-columns: minmax(0, 1fr) 60px 60px; align-items: center; justify-items: center; padding: 10px 14px; border-bottom: 1.5px solid var(--ink); }
.pr:last-child { border-bottom: 0; }
.pr > :first-child { justify-self: start; font-size: 14px; font-weight: 700; }
.pr.th { background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.placeholder { min-height: 280px; border: 2px dashed var(--ink); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.kiobox { padding: 8px; border: var(--line); border-radius: var(--r); background: var(--yellow); flex: none; }
.keyrow { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border: var(--line); border-radius: var(--r); background: #fff; font-size: 15px; font-weight: 700; }
.table { border: var(--line); border-radius: var(--r); background: #fff; overflow-x: auto; }
.tr { display: grid; grid-template-columns: minmax(180px, 1.4fr) 140px minmax(160px, 1.4fr) 130px 60px; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1.5px solid var(--ink); font-size: 14px; min-width: 700px; }
.tr:last-child { border-bottom: 0; }
.tr > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.tr.th { background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 10px 18px; }
.dead summary { cursor: pointer; font-weight: 700; font-size: 14px; margin-bottom: 8px; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; pointer-events: none; }
.toast { padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 6px; font-size: 14px; font-weight: 700; box-shadow: 4px 4px 0 var(--yellow); }
.toast.err { box-shadow: 4px 4px 0 var(--red); }

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card h1 { font-size: 36px; }
  .shell { flex-direction: column; }
  .side { position: static; height: auto; flex: none; border-right: 0; border-bottom: var(--line); padding: 16px; gap: 14px; }
  .side .grow { display: none; }
  .sect { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .sect-h { width: 100%; }
  .chan { border: 2px solid var(--ink); gap: 10px; }
  .content { padding: 20px 16px 48px; gap: 20px; }
  .h1.xl { font-size: 42px; }
  .h1 { font-size: 32px; }
}
