:root {
  color-scheme: light;
  --canvas:#f6f7fa; --paper:#fff; --ink:#202234; --muted:#60677a; --line:#dddfe8;
  --accent:#5943d4; --tint:#efedfc; --editor:#222536; --code:#e3e5ef;
  --string:#167454; --number:#935014; --boolean:#7552b7; --null:#6b7282;
  --mono:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
* { box-sizing:border-box }
body { margin:0; background:var(--canvas); color:var(--ink); font:14px/1.5 var(--sans); -webkit-font-smoothing:antialiased }
button,textarea { font:inherit }
button { cursor:pointer; color:inherit }
button:disabled { opacity:.42; cursor:default }
button { -webkit-tap-highlight-color:transparent }
button:focus-visible, [tabindex]:focus-visible, textarea:focus-visible { outline:2px solid #856cff; outline-offset:2px }
button:active:not(:disabled) { filter:brightness(.93) }
[hidden]{display:none!important}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.icon { width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;display:inline-block;vertical-align:middle }
.shell { width:calc(100% - clamp(40px,7vw,128px));max-width:1840px;margin-inline:auto;padding-block:20px }
.tools,.pane-title,.pane-head,.pane-foot,.foot-info,.editor-bar,.view-bar { display:flex;align-items:center }
.icon-btn { background:transparent;border:0;border-radius:6px;display:inline-grid;place-items:center;width:34px;height:34px;color:var(--muted) }
.icon-btn:hover:not(:disabled) { background:#eeeef5;color:var(--accent) }
h2,p { margin:0 }
.open-file { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:0 12px;border:0;border-radius:8px;background:var(--accent);color:white;font-size:12px;font-weight:600;white-space:nowrap }
.open-file:hover { background:#4e36c4 }
.open-file .icon { width:15px;height:15px }
.workspace { display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:18px }
.pane { display:flex;flex-direction:column;min-width:0;height:max(455px,calc(100vh - 40px));height:max(455px,calc(100dvh - 40px));border:1px solid var(--line);border-radius:24px;overflow:hidden;background:var(--paper);box-shadow:0 2px 3px #20223404 }
.pane-head { height:60px;flex:none;padding:0 16px 0 19px;justify-content:space-between;gap:8px }
.pane-title { gap:10px }
.pane-title h2 { font-size:17px;font-weight:650;letter-spacing:-.035em }
.tile { display:grid;place-items:center;width:29px;height:29px;color:#6654bb;background:#efedf8;border-radius:7px }
.tile .icon { width:17px;height:17px;stroke-width:1.8 }
.result-tile { color:#35735e;background:#e7f2eb }
.tools { gap:3px }
.editor-bar,.view-bar { flex:none;height:47px;justify-content:space-between }
.editor-bar { padding:0 12px 0 19px;background:#282c3f;color:#c5c9da;border-bottom:1px solid #3a3e52 }
.file-tab { display:flex;align-items:center;gap:7px;min-width:0;font:12px var(--mono);letter-spacing:-.02em;color:#e3e3f2 }
.file-tab:has(span:empty) { visibility:hidden }
.file-tab span { overflow:hidden;white-space:nowrap;text-overflow:ellipsis }
.file-tab .icon { color:#b6a5ff;width:14px;height:14px }
.editor-tool { display:flex;align-items:center;gap:5px;border:0;border-radius:4px;background:none;color:#c2c6d9;padding:5px 7px;font-size:11.5px }
.editor-tool .icon { width:14px;height:14px }
.editor-tool:hover:not(:disabled) { background:#353a50;color:white }
.editor { background:var(--editor);color:var(--code);flex:1;min-height:0;display:flex;position:relative }
.editor:focus-within { box-shadow:inset 0 0 0 1px #9386ef }
.gutter { flex:none;width:47px;position:relative;overflow:hidden;color:#9298b2;text-align:right;user-select:none;font:12px/24px var(--mono) }
#numbers { position:absolute;top:0;right:12px;white-space:pre }
.code-area { position:relative;min-width:0;flex:1 }
.code-layer { position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;outline:none!important;margin:0;padding:16px 16px 16px 0;font:13px/24px var(--mono);font-variant-ligatures:none;letter-spacing:0;tab-size:2;white-space:pre;overflow:auto;resize:none;scrollbar-width:thin;scrollbar-color:#55596d var(--editor) }
#highlight { pointer-events:none;color:var(--code);scrollbar-width:none;overflow:hidden;background:none }
#source { color:transparent;-webkit-text-fill-color:transparent;caret-color:white;background:transparent }
#source::placeholder { color:#b1b5c7;-webkit-text-fill-color:#b1b5c7 }
#source::selection { background:#8175cf66 }
.editor.plain #source { color:var(--code);-webkit-text-fill-color:var(--code) }
.editor.dragging { outline:3px dashed #c1b4ff;outline-offset:-5px }
.editor .key { color:#b9b8ff }
.editor .string { color:#a3d8be }
.editor .number { color:#efba86 }
.editor .boolean { color:#d5a5e9 }
.editor .null { color:#b2b8c9 }
.pane-foot { height:36px;flex:none;justify-content:space-between;padding:0 17px;font:11.5px var(--mono);gap:8px }
.source-foot { background:#282c3f;border-top:1px solid #3b3e50;color:#b9bfd2 }
.result-foot { border-top:1px solid var(--line);background:#fafbfc;color:var(--muted) }
.foot-info { gap:6px }
.foot-info .icon { width:14px;height:14px }
.status { display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:600;color:var(--muted);background:#f1f2f5;white-space:nowrap }
.status .icon { width:13px;height:13px;stroke-width:2 }
.status.valid { color:#236849;background:#e9f5ed }
.status.invalid { color:#9a3834;background:#fbeceb }
.view-bar { padding:0 12px 0 15px;border-block:1px solid var(--line);background:#fafbfc;gap:3px }
.switch { display:flex;align-items:center;gap:2px }
.switch button { border:1px solid transparent;background:transparent;color:var(--muted);border-radius:6px;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 9px;font-size:12px;font-weight:540 }
.switch button .icon { width:14px;height:14px }
.switch button[aria-pressed=true] { border-color:#dcd8f7;background:var(--tint);color:#4d39aa }
.switch button:hover:not([aria-pressed=true]) { color:var(--ink);background:#eeeff4 }
.result-scroll { flex:1;min-height:0;min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#c5c7d4 transparent;position:relative }
.result-scroll:focus-visible { outline-offset:-2px }
.tree-list { padding:13px 15px 20px;min-width:100% }
.row { --step:19px;display:flex;align-items:baseline;position:relative;min-height:26px;padding:2px 6px 2px calc(7px + var(--level) * var(--step));font:13px/22px var(--mono);overflow-wrap:anywhere;border-radius:4px }
.row::before { content:"";position:absolute;top:0;bottom:0;left:15px;width:calc(var(--level) * var(--step));background:repeating-linear-gradient(to right,#e5e6ee 0 1px,transparent 1px var(--step));pointer-events:none }
.row:hover { background:#f7f7fb }
.row[data-level="0"] { margin-bottom:4px;background:#f5f4fb }
.row-text { min-width:0 }
.twig { display:inline-grid;place-items:center;flex:none;width:18px;height:22px;border:0;border-radius:3px;background:none;align-self:flex-start;padding:0;color:#6b6d82 }
.twig:hover { color:var(--accent);background:#e2dff7 }
.twig .icon { width:12px;height:12px;stroke-width:2.2 }
.branch-row { cursor:pointer }
.spacer { flex:none;width:18px }
.row-key { color:#33374d;font-weight:540 }
.array-key,.root-key { color:#63617a }
.row-colon { color:#838898;margin-right:6px }
.bracket { color:#7563b7 }
.row-count { color:var(--muted);margin-left:8px;font:11px var(--sans) }
.string { color:var(--string) }.number { color:var(--number) }.boolean { color:var(--boolean) }.null { color:var(--null) }
.formatted { margin:0;padding:16px 18px;font:13px/24px var(--mono);white-space:pre-wrap;overflow-wrap:anywhere }
.formatted .key { color:#444968 }
.comparison { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) }
.comparison b { background:#f4f3fa;padding:7px 12px;position:sticky;top:0;font:600 11px/1.4 var(--sans);color:#605b76;z-index:1 }
.comparison b:nth-child(2),.comparison .decoded { border-left:1px solid var(--line) }
.compare-cell { min-width:0;padding:0 6px }
.compare-cell .row { --step:11px;font-size:12px }
.compare-cell:nth-child(3),.compare-cell:nth-child(4) { padding-top:8px }
.more,.jump { display:block;margin:10px auto 16px;padding:7px 12px;border:1px solid #dcd8f7;background:var(--tint);color:#493699;border-radius:6px;font-size:12px }
.message { padding:30px 22px;max-width:450px;color:var(--muted) }
.message h3 { margin:0 0 6px;font-size:16px;color:var(--ink) }
.message .jump { margin:14px 0 }
#toast { position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:9px 14px;border-radius:7px;z-index:10;font-size:13px;max-width:90vw }
@media(min-width:1650px){.code-layer,.row,.formatted { font-size:14px }.shell { width:calc(100% - 112px) }}
@media(max-width:1050px){.shell{width:calc(100% - 40px)}.pane-head{padding-inline:13px}.workspace{gap:12px}.editor-bar{padding-inline:12px}.view-bar{padding-inline:7px}.switch button{padding-inline:7px}}
@media(max-width:780px){
  .shell { width:calc(100% - 32px);padding-block:12px }
  .workspace { grid-template-columns:1fr;gap:16px }.pane { height:clamp(390px,63vh,600px) }.source-pane { height:clamp(330px,49vh,450px) }
  .pane-head{height:55px}
  .open-file,.icon-btn,.switch button,.editor-tool { min-height:44px }.icon-btn { width:44px }.view-bar,.editor-bar { height:50px }
  .switch button{padding-inline:8px}.editor-tool { padding-inline:8px }
  .row{min-height:32px}.branch-row{min-height:44px;align-items:center}.twig{min-height:40px}.tools{gap:0}
}
@media(max-width:420px){
  .shell{width:calc(100% - 24px)}
  .pane-title h2{font-size:16px}.view-bar{padding-inline:4px}
  .switch button{gap:4px;padding-inline:6px}.tree-list{padding-inline:7px}.gutter{width:37px}
}
@media(max-width:350px){.switch button .icon,.editor-tool span{display:none}.pane-head{padding-inline:8px}}

.editor.wrapped .gutter { display:none }
.editor.wrapped .code-layer { padding-left:16px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word }
.editor-tool[aria-pressed=true] { color:#e4deff;background:#45405e }
@media(min-width:1100px){.workspace[data-view="compare"]{grid-template-columns:minmax(0,.84fr) minmax(0,1.42fr)}}
@media(max-width:780px){.compare-cell {padding:0 2px}.compare-cell .row {--step:7px}.editor-tool{min-width:44px}}
@media(forced-colors:active){#source{-webkit-text-fill-color:CanvasText;color:CanvasText}#highlight{visibility:hidden}}

@media (min-width:781px) and (max-width:1020px), (max-width:435px) {
  .open-file { width:44px;padding:0 }
  .open-file span { display:none }
}
