:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8edf4;
  background: #0b111c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0b111c;
  --surface: #101927;
  --surface-2: #162235;
  --line: #25354c;
  --muted: #8a9ab0;
  --text: #e8edf4;
  --accent: #36d399;
  --accent-dark: #0d2b28;
  --danger: #ff8d9a;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 75% -10%, #17304a 0, transparent 34%), var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: rgba(11, 17, 28, .84); backdrop-filter: blur(14px); }
.brand { color: var(--text); display: inline-flex; gap: 10px; align-items: center; font-size: 19px; letter-spacing: -.03em; text-decoration: none; font-weight: 600; }
.brand b { color: var(--accent); font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; overflow: hidden; background: #0b111c; color: #092119; font-weight: 900; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.hint { color: var(--muted); font-size: 12px; }
.app-body { display: flex; flex: 1; width: 100%; max-width: none; margin: 0; }
.site-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; min-height: 60px; padding: 18px 24px; border-top: 1px solid var(--line); color: #718198; background: rgba(11, 17, 28, .58); font-size: 12px; text-align: center; }
.site-footer a { color: #8ea4bf; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.back-to-top { position: fixed; z-index: 20; right: 48px; bottom: 48px; display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid rgba(54, 211, 153, .48); border-radius: 50%; color: #dffcf1; background: rgba(13, 43, 40, .92); box-shadow: 0 10px 28px rgba(0, 0, 0, .32); transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.back-to-top:hover { border-color: var(--accent); background: #145143; transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(54, 211, 153, .28), 0 10px 28px rgba(0, 0, 0, .32); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { width: 230px; flex: none; min-height: calc(100vh - 72px); border-right: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; }
.eyebrow { color: #61748e; font-size: 10px; font-weight: 700; letter-spacing: .16em; margin: 0 0 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nav-search { display: block; margin: 0 0 14px; }
.nav-search input { height: 38px; padding: 0 11px; font-size: 12px; }
.tool-nav { display: grid; gap: 3px; min-width: 0; }
.nav-item-wrap { display: flex; align-items: center; min-width: 0; }
.nav-item { display: flex; flex: 1; min-width: 0; gap: 12px; align-items: center; color: #91a1b5; padding: 10px 10px 10px 13px; border-radius: 9px; text-decoration: none; font-size: 14px; transition: .16s ease; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-dark); color: var(--accent); }
.nav-icon { width: 18px; text-align: center; color: currentColor; font-size: 13px; }
.nav-empty { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 4px; }
.content { flex: 1; width: auto; max-width: none; min-width: 0; padding: 30px; }
.tool-kicker { margin-bottom: 14px; }
h1 { color: var(--text); font-size: clamp(28px, 4vw, 40px); line-height: 1.08; margin: 0 0 13px; letter-spacing: -.045em; }
.tool-card { border: 1px solid var(--line); background: rgba(16, 25, 39, .84); border-radius: 15px; padding: 25px; box-shadow: 0 18px 70px rgba(0, 0, 0, .16); }
.io-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.compact-grid { max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { color: #b9c5d4; font-size: 12px; font-weight: 600; }
textarea, input, select { width: 100%; color: var(--text); border: 1px solid #2a3b54; background: #0d1624; border-radius: 9px; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
textarea:focus, input:focus, select:focus { border-color: #3b9a7c; box-shadow: 0 0 0 3px rgba(54, 211, 153, .1); }
textarea { min-height: 224px; padding: 14px; resize: vertical; line-height: 1.6; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
input, select { height: 42px; padding: 0 12px; }
textarea::placeholder, input::placeholder { color: #50627a; }
.mode-switch { display: flex; gap: 4px; background: #0b1421; border: 1px solid var(--line); padding: 4px; border-radius: 9px; width: fit-content; margin-bottom: 18px; }
.mode-switch button { border: 0; color: var(--muted); background: transparent; border-radius: 6px; padding: 8px 13px; font-size: 12px; }
.mode-switch button.selected { color: var(--accent); background: var(--accent-dark); }
.check-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 15px; color: var(--muted); font-size: 12px; }
.check-row label, .check-stack label { display: inline-flex; align-items: center; gap: 7px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.check-stack { display: flex; gap: 15px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding-top: 3px; }
.inline-select { display: inline-flex; align-items: center; gap: 7px; }
.inline-select select { width: 63px; height: 30px; padding: 0 8px; }
.primary-actions, .result-actions { display: flex; align-items: center; gap: 9px; }
.inline-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.primary-actions { margin: 21px 0; }
.result-actions { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 17px; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 10px 15px; font-size: 12px; font-weight: 600; transition: .16s ease; }
.button-primary { color: #082219; background: var(--accent); }
.button-primary:hover { background: #58e2ae; transform: translateY(-1px); }
.button-ghost { color: #a8b6c8; background: #172437; border-color: #2a3b54; }
.button-ghost:hover:not(:disabled) { color: var(--text); border-color: #3c526f; }
.error-message { color: var(--danger); background: rgba(255, 95, 115, .08); border: 1px solid rgba(255, 95, 115, .24); padding: 11px 13px; border-radius: 8px; margin: 14px 0 0; font-size: 12px; line-height: 1.55; }
.warning-hint { color: #d1aa70; }
.spaced-field { margin-top: 18px; }
.primary-actions { flex-wrap: wrap; }
.result-notice { color: var(--accent); font-size: 13px; line-height: 1.6; }
.diff-list { display: grid; gap: 16px; }
.diff-item { padding: 16px; border: 1px solid var(--line); border-left: 3px solid #d1aa70; border-radius: 9px; min-width: 0; }
.diff-added { border-left-color: var(--accent); }
.diff-removed { border-left-color: var(--danger); }
.diff-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; overflow-wrap: anywhere; }
.diff-kind { font-size: 12px; color: #d1aa70; flex-shrink: 0; }
.diff-added .diff-kind { color: var(--accent); }
.diff-removed .diff-kind { color: var(--danger); }
.diff-item pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 Consolas, monospace; margin: 8px 0 0; }
.diff-item .io-grid > div { min-width: 0; }
.content { min-width: 0; }
.diff-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.diff-input-panel { min-width: 0; }
.diff-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.file-button { position: relative; padding: 7px 10px; font-size: 11px; font-weight: 500; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.diff-input-panel textarea { min-height: 230px; }
.diff-result { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #0b1421; font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; }
.diff-result-head, .diff-row { display: grid; grid-template-columns: 1fr 1fr; }
.diff-result-head { color: #a7b7cb; background: #162235; border-bottom: 1px solid var(--line); font-family: inherit; font-size: 11px; font-weight: 700; }
.diff-result-head span { padding: 9px 12px; }
.diff-result-head span + span { border-left: 1px solid var(--line); }
.diff-row { min-height: 26px; border-bottom: 1px solid rgba(37, 53, 76, .52); }
.diff-row:last-child { border-bottom: 0; }
.diff-cell { min-width: 0; display: flex; align-items: stretch; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.diff-cell + .diff-cell { border-left: 1px solid var(--line); }
.line-number { flex: 0 0 36px; color: #52657e; text-align: right; padding: 4px 8px 4px 4px; user-select: none; }
.diff-cell code { min-width: 0; flex: 1; padding: 4px 10px 4px 0; color: #dce5ef; font: inherit; }
.diff-row-removed .diff-cell:first-child { background: rgba(238, 86, 101, .14); }
.diff-row-added .diff-cell:last-child { background: rgba(54, 211, 153, .13); }
.diff-row-changed .diff-cell:first-child { background: rgba(238, 86, 101, .1); }
.diff-row-changed .diff-cell:last-child { background: rgba(54, 211, 153, .1); }
.segment-removed { color: #ffdce0; background: rgba(238, 86, 101, .38); text-decoration: line-through; text-decoration-color: rgba(255, 180, 190, .7); }
.segment-added { color: #d9fff0; background: rgba(54, 211, 153, .34); }
.diff-empty { margin: 0; color: var(--muted); padding: 22px; text-align: center; font-family: inherit; }
.tool-card > .field + .field { margin-top: 18px; }
@media (max-width: 850px) { .topbar { padding: 0 20px; } .sidebar { width: 180px; padding-left: 12px; padding-right: 12px; } .content { padding: 30px; } }
@media (max-width: 650px) { .app-body { display: block; } .sidebar { min-height: auto; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 15px 16px; } .sidebar .eyebrow { display: none; } .nav-search { margin-bottom: 10px; } .tool-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; } .nav-item-wrap { flex: none; } .nav-item { flex: none; padding: 9px 11px; white-space: nowrap; } .nav-icon { display: none; } .content { padding: 16px; } .tool-card { padding: 16px; } .io-grid, .option-grid, .cron-fields, .diff-input-grid { grid-template-columns: 1fr; gap: 15px; } textarea { min-height: 180px; } .diff-input-panel textarea { min-height: 180px; } .diff-result { overflow-x: auto; } .diff-result-head, .diff-row { min-width: 620px; } .site-footer { min-height: auto; padding: 16px; font-size: 11px; } .back-to-top { right: 28px; bottom: 28px; width: 40px; height: 40px; } }
