/* IL2CPP Dumper Online. Uses the site's theme variables; the only colours defined here are the status colours. */
.ub-tool-layout:has(> .il2-root) { display: block; }
.ub-tool-layout > .il2-root { display: block; width: 100%; }
.il2-root {
    --il-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    --il-ok: #4cc38a; --il-warn: #e0a93b; --il-bad: #f07575; --il-info: #6aa9ef;
    --il-ok-bg: rgba(76, 195, 138, .12); --il-warn-bg: rgba(224, 169, 59, .12); --il-bad-bg: rgba(240, 117, 117, .12); --il-info-bg: rgba(106, 169, 239, .12);
    max-width: 100%; min-width: 0;
}
[data-theme="light"] .il2-root {
    --il-ok: #18794e; --il-warn: #8a5a00; --il-bad: #b3261e; --il-info: #1d5fae;
    --il-ok-bg: rgba(24, 121, 78, .09); --il-warn-bg: rgba(138, 90, 0, .09); --il-bad-bg: rgba(179, 38, 30, .08); --il-info-bg: rgba(29, 95, 174, .08);
}
.il2-root [hidden] { display: none !important; }
.il2-root .ub-tool-panel__body { padding: 16px; }

/* ---- stage: drop zone with the two file slots ---- */
.il2-stage {
    position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md, 12px); padding: 26px 22px 18px;
    background:
        radial-gradient(900px 260px at 50% -80px, var(--accent-muted), transparent 70%),
        repeating-linear-gradient(0deg, transparent 0 27px, var(--border-subtle, var(--border)) 27px 28px),
        repeating-linear-gradient(90deg, transparent 0 27px, var(--border-subtle, var(--border)) 27px 28px),
        var(--bg-primary);
    transition: border-color .15s, box-shadow .15s;
}
.il2-stage::after { /* soft fade so the grid does not fight the text */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 30%, var(--bg-primary) 100%); opacity: .8;
}
.il2-stage > * { position: relative; z-index: 1; }
.il2-stage.is-drag { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted), var(--shadow-md, none); }
.il2-stage.is-busy::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
    background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat;
    animation: il2-scan 1.3s linear infinite;
}
@keyframes il2-scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.il2-stage__head { text-align: center; margin-bottom: 18px; }
.il2-stage__title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.il2-stage__sub { font-size: .86rem; color: var(--text-secondary); margin: 0 auto 12px; max-width: 640px; }
.il2-stage__fine { font-size: .76rem; color: var(--text-tertiary); text-align: center; margin: 14px 0 0; }

.il2-slots { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.il2-slot {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md, 12px);
    background: var(--bg-card); box-shadow: var(--shadow-sm, none); min-width: 0; transition: border-color .2s;
}
.il2-slot.is-on { border-color: var(--il-ok); }
.il2-slot.is-bad { border-color: var(--il-bad); }
.il2-slot__led { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--text-tertiary); opacity: .5; }
.il2-slot.is-on .il2-slot__led { background: var(--il-ok); opacity: 1; box-shadow: 0 0 8px var(--il-ok); }
.il2-slot.is-bad .il2-slot__led { background: var(--il-bad); opacity: 1; }
.il2-slot__main { flex: 1; min-width: 0; }
.il2-slot__role { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); }
.il2-slot__name { font-family: var(--il-mono); font-size: .86rem; color: var(--text-primary); overflow-wrap: anywhere; margin-top: 2px; }
.il2-slot__meta { font-size: .76rem; color: var(--text-secondary); margin-top: 3px; }
.il2-slot__x { flex: none; border: 0; background: transparent; color: var(--text-tertiary); cursor: pointer; font-size: 1rem; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.il2-slot__x:hover { color: var(--il-bad); background: var(--il-bad-bg); }
.il2-joint { display: flex; align-items: center; justify-content: center; }
.il2-joint__pill {
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
    padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-tertiary);
}
.il2-joint__pill.is-ok { color: var(--il-ok); border-color: var(--il-ok); background: var(--il-ok-bg); }
.il2-joint__pill.is-bad { color: var(--il-bad); border-color: var(--il-bad); background: var(--il-bad-bg); }
.il2-joint__pill.is-work { color: var(--accent); border-color: var(--accent-border, var(--accent)); }

/* ---- progress + notices ---- */
.il2-progress { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-input); }
.il2-progress__msg { font-size: .82rem; color: var(--text-secondary); margin-bottom: 6px; }
.il2-progress__bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.il2-progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .15s; }
.il2-progress.is-open-ended .il2-progress__fill { width: 35%; animation: il2-slide 1.2s ease-in-out infinite alternate; }
@keyframes il2-slide { from { margin-left: 0; } to { margin-left: 65%; } }
.il2-notice { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border); border-left-width: 4px; font-size: .86rem; color: var(--text-primary); background: var(--bg-input); overflow-wrap: anywhere; }
.il2-notice code { font-family: var(--il-mono); font-size: .8rem; }
.il2-notice--info { border-left-color: var(--il-info); background: var(--il-info-bg); }
.il2-notice--ok { border-left-color: var(--il-ok); background: var(--il-ok-bg); }
.il2-notice--warn { border-left-color: var(--il-warn); background: var(--il-warn-bg); }
.il2-notice--bad { border-left-color: var(--il-bad); background: var(--il-bad-bg); }

/* ---- summary strip ---- */
.il2-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-top: 14px; }
.il2-chip { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: linear-gradient(180deg, var(--bg-card), var(--bg-input)); min-width: 0; }
.il2-chip__k { font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); }
.il2-chip__v { font-family: var(--il-mono); font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-top: 2px; overflow-wrap: anywhere; }
.il2-chip__v.is-ok { color: var(--il-ok); } .il2-chip__v.is-bad { color: var(--il-bad); } .il2-chip__v.is-dim { color: var(--text-tertiary); }

/* ---- tabs ---- */
.il2-tabs { display: flex; gap: 2px; margin-top: 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.il2-tab { flex: none; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .86rem; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.il2-tab:hover { color: var(--text-primary); }
.il2-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.il2-tab:focus-visible, .il2-root button:focus-visible, .il2-root input:focus-visible, .il2-root select:focus-visible, .il2-root textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.il2-panel { display: none; padding-top: 14px; }
.il2-panel.is-active { display: block; }

/* ---- shared pieces ---- */
.il2-h { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); margin: 18px 0 8px; }
.il2-h:first-child { margin-top: 0; }
.il2-p { font-size: .86rem; color: var(--text-secondary); margin: 0 0 10px; }
.il2-empty { padding: 26px 12px; text-align: center; color: var(--text-tertiary); font-size: .88rem; }
.il2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.il2-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-input); }
.il2-card__k { font-size: .72rem; color: var(--text-tertiary); }
.il2-card__v { font-family: var(--il-mono); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.il2-scroll { overflow: auto; max-height: 520px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-primary); }
.il2-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.il2-table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); background: var(--bg-card); padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.il2-table td { padding: 5px 10px; border-bottom: 1px solid var(--border-subtle, var(--border)); color: var(--text-primary); vertical-align: top; overflow-wrap: anywhere; }
.il2-table tr:last-child td { border-bottom: 0; }
.il2-table .m, .il2-m { font-family: var(--il-mono); }
.il2-table .n { font-family: var(--il-mono); white-space: nowrap; color: var(--text-secondary); }
.il2-table .t { color: var(--il-info); font-family: var(--il-mono); }
.il2-table tr.is-click { cursor: pointer; }
.il2-table tr.is-click:hover td { background: var(--accent-muted); }
.il2-kv { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); font-size: .84rem; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.il2-kv > div { padding: 6px 10px; border-bottom: 1px solid var(--border-subtle, var(--border)); overflow-wrap: anywhere; }
.il2-kv > div:nth-child(odd) { color: var(--text-tertiary); background: var(--bg-input); }
.il2-kv > div:nth-child(even) { font-family: var(--il-mono); color: var(--text-primary); }
.il2-kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.il2-list { margin: 0; padding-left: 20px; font-size: .86rem; color: var(--text-primary); }
.il2-list li { margin-bottom: 4px; }
.il2-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.il2-bar__grow { flex: 1; min-width: 160px; }
.il2-input, .il2-root select.il2-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-input); color: var(--text-primary); font: inherit; font-size: .86rem; min-width: 0; }
.il2-input--mono { font-family: var(--il-mono); }
.il2-btn { border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; white-space: nowrap; }
.il2-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.il2-btn:disabled { opacity: .45; cursor: not-allowed; }
.il2-btn--go { background: var(--accent); border-color: var(--accent); color: var(--bg-primary); }
.il2-btn--go:hover:not(:disabled) { color: var(--bg-primary); filter: brightness(1.08); }
.il2-btn--sm { padding: 3px 8px; font-size: .74rem; }
.il2-muted { color: var(--text-tertiary); font-size: .8rem; }
.il2-badge { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-secondary); vertical-align: 1px; }
.il2-badge--class { color: var(--il-info); border-color: var(--il-info); }
.il2-badge--struct { color: var(--il-ok); border-color: var(--il-ok); }
.il2-badge--enum { color: var(--il-warn); border-color: var(--il-warn); }
.il2-badge--interface { color: var(--accent); border-color: var(--accent); }
.il2-code { margin: 0; padding: 12px 14px; font-family: var(--il-mono); font-size: .78rem; line-height: 1.55; color: var(--text-primary); white-space: pre; tab-size: 4; }
.il2-code .c { color: var(--text-tertiary); } .il2-code .k { color: var(--il-info); } .il2-code .a { color: var(--il-ok); }

/* ---- types ---- */
.il2-split { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 12px; align-items: start; }
.il2-typelist { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-primary); }
.il2-typelist button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border-subtle, var(--border)); background: transparent; color: var(--text-primary); font-family: var(--il-mono); font-size: .78rem; padding: 6px 10px; cursor: pointer; overflow-wrap: anywhere; }
.il2-typelist button:hover { background: var(--accent-muted); }
.il2-typelist button.is-sel { background: var(--accent-muted); box-shadow: inset 3px 0 0 var(--accent); }
.il2-typelist .il2-ns { color: var(--text-tertiary); }
.il2-pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: var(--text-tertiary); flex-wrap: wrap; }
.il2-detail { min-width: 0; }
.il2-detail__head { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: linear-gradient(180deg, var(--bg-card), var(--bg-input)); margin-bottom: 10px; }
.il2-detail__name { font-family: var(--il-mono); font-size: 1rem; font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; margin: 4px 0; }
.il2-detail__meta { font-size: .78rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.il2-fold { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); margin-bottom: 10px; background: var(--bg-primary); overflow: hidden; }
.il2-fold > summary { cursor: pointer; padding: 8px 12px; font-size: .8rem; font-weight: 700; color: var(--text-secondary); background: var(--bg-card); }
.il2-fold > .il2-scroll { border: 0; border-radius: 0; max-height: 420px; }

/* ---- scripts ---- */
.il2-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.il2-dl__card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md, 12px); background: linear-gradient(180deg, var(--bg-card), var(--bg-input)); }
.il2-dl__name { font-family: var(--il-mono); font-weight: 700; color: var(--text-primary); }
.il2-dl__desc { font-size: .82rem; color: var(--text-secondary); flex: 1; }

/* ---- disassembly ---- */
.il2-asm td { font-family: var(--il-mono); font-size: .78rem; white-space: nowrap; overflow-wrap: normal; }
.il2-asm .a { color: var(--text-tertiary); } .il2-asm .b { color: var(--text-tertiary); opacity: .8; } .il2-asm .mn { color: var(--il-info); font-weight: 700; } .il2-asm .flow .mn { color: var(--il-warn); }

/* ---- AI ---- */
.il2-ai__warn { border: 1px solid var(--il-warn); background: var(--il-warn-bg); border-radius: var(--radius-sm, 8px); padding: 10px 12px; font-size: .86rem; color: var(--text-primary); margin-bottom: 12px; }
.il2-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; flex-wrap: wrap; }
.il2-seg button { border: 0; background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.il2-seg button + button { border-left: 1px solid var(--border); }
.il2-seg button.is-active { background: var(--accent-muted); color: var(--accent); }
.il2-seg button:disabled { opacity: .45; cursor: not-allowed; }
.il2-ai__preview { width: 100%; box-sizing: border-box; min-height: 180px; max-height: 360px; resize: vertical; font-family: var(--il-mono); font-size: .76rem; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-primary); color: var(--text-primary); white-space: pre; overflow: auto; }
.il2-ai__answer { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg-input); font-size: .9rem; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 60px; }

@media (max-width: 760px) {
    .il2-root .ub-tool-panel__body { padding: 10px; }
    .il2-stage { padding: 18px 12px 14px; }
    .il2-slots { grid-template-columns: minmax(0, 1fr); }
    .il2-split { grid-template-columns: minmax(0, 1fr); }
    .il2-typelist { max-height: 260px; }
    .il2-kv { grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); }
    .il2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .il2-tab { padding: 10px 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .il2-stage.is-busy::before, .il2-progress.is-open-ended .il2-progress__fill { animation: none; }
}
