:root { --bg:#0b1020; --card:#131a33; --line:#24305f; --text:#e8ecff; --sub:#a8b2d9; --accent:#7aa2ff; }
    * { box-sizing:border-box; }
    body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif; background:linear-gradient(180deg,#090d1a,var(--bg)); color:var(--text); }
    .wrap { max-width:1100px; margin:0 auto; padding:36px 20px 72px; }
    .panel { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:24px; box-shadow:0 8px 24px rgba(0,0,0,.28); }
    h1 { margin:0 0 6px; font-size:clamp(1.4rem,3.5vw,2rem); }
    .version-badge { display:inline-block; vertical-align:middle; margin-left:8px; padding:3px 8px; border-radius:999px; background:#fcd34d; color:#1f2937; font-size:.72rem; font-weight:800; }
    .lead { margin:0; color:var(--sub); }
    .toolbar { margin-top:14px; display:flex; flex-wrap:wrap; gap:8px; }
    .btn { display:inline-block; padding:8px 12px; border-radius:10px; border:1px solid var(--line); background:#17214a; color:var(--text); text-decoration:none; font-weight:600; cursor:pointer; }
    .btn:hover { background:#20306a; }
    .btn.secondary { background:#0f1530; }
    .btn.primary-action:not(:disabled) { background:linear-gradient(90deg,#4361ee,#7b2ff7); box-shadow:0 0 0 2px rgba(122,162,255,.18); }
    .file-picker-label { align-self:center; color:var(--sub); font-size:.9rem; font-weight:700; }
    .native-file-input { max-width:260px; border:1px dashed var(--line); border-radius:10px; padding:7px 9px; background:#0f1530; color:var(--sub); }
    .layout { margin-top:14px; display:grid; gap:12px; grid-template-columns:1fr 1fr; }
    @media (max-width: 900px) { .layout { grid-template-columns:1fr; } }
    textarea { width:100%; min-height:440px; resize:vertical; border:1px solid var(--line); border-radius:12px; background:#0f1530; color:var(--text); padding:12px; line-height:1.6; }
    .preview { min-height:440px; border:1px solid var(--line); border-radius:12px; background:#f7f8fc; color:#222; padding:16px; overflow:auto; }
    .input-removed-notice { min-height:440px; border:2px dashed #fcd34d; border-radius:12px; background:#221b08; color:#fef3c7; padding:24px; display:flex; flex-direction:column; justify-content:center; }
    .input-removed-notice h2 { color:#fde68a; margin-top:0; }
    .preview h1,.preview h2,.preview h3 { color:#111; }
    .preview pre { background:#1f2937; color:#e5e7eb; padding:10px; border-radius:8px; overflow:auto; }
    .preview code { background:#eef2ff; color:#1f2937; padding:0 .25em; border-radius:4px; }
    .preview pre code { background:transparent; color:inherit; padding:0; }
    .preview table { width:100%; border-collapse:collapse; margin:.75rem 0; }
    .preview th, .preview td { border:1px solid #c7d2fe; padding:.45rem .55rem; }
    .preview th { background:#e0e7ff; }
    .preview .obsidian-callout { border-left:4px solid #6366f1; background:#eef2ff; padding:.75rem .9rem; border-radius:8px; margin:1rem 0; }
    .preview .obsidian-callout strong { color:#3730a3; }
    .preview .callout-body { margin-top:.35rem; }
    .status, .folder-status, .output-status, .runtime-status { margin-top:8px; color:var(--sub); font-size:.9rem; }
    .status.ok, .folder-status.ok, .output-status.ok, .runtime-status.ok { color:#86efac; }
    .status.warn, .folder-status.warn, .output-status.warn, .runtime-status.warn { color:#fcd34d; }
    .status.error, .folder-status.error, .output-status.error, .runtime-status.error { color:#fca5a5; }
    .btn:disabled { opacity:.45; cursor:not-allowed; }
    .file-list { margin-top:8px; max-height:140px; overflow:auto; border:1px solid var(--line); border-radius:10px; background:#0f1530; padding:8px 10px; color:var(--sub); font-size:.85rem; }
    .file-list ul { margin:0; padding-left:1.1rem; }
    .file-list li { margin:0 0 4px; }
    .back { margin-top:12px; }
    .back a { color:var(--accent); text-decoration:none; }
    .back a:hover { text-decoration:underline; }
    .top-home { margin:0 0 10px; }
    .top-home a { display:inline-block; padding:7px 11px; border-radius:10px; border:1px solid var(--line); background:#17214a; color:var(--text); text-decoration:none; font-weight:600; }
    .top-home a:hover { background:#20306a; }
