:root{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;--bg: #ffffff;--fg: #1a1a1a;--border: #e5e5e5}*{box-sizing:border-box}html,body,#root,.app{height:100%;margin:0}.app{display:flex;flex-direction:column}.toolbar{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--border)}.toolbar-half{display:flex;align-items:center;gap:1rem;padding:.5rem 1rem;min-width:0}.toolbar-half-left{border-right:1px solid var(--border)}.toolbar h1{margin:0;font-size:1rem}.split{flex:1;display:grid;grid-template-columns:1fr 1fr;min-height:0}.editor-pane,.preview-pane{border-right:1px solid var(--border);min-height:0}.preview-pane{border-right:none}.editor-pane{display:flex;flex-direction:column;cursor:text}.editor-pane>*{flex:1;min-height:0}.editor-pane .cm-editor{height:100%}.editor-pane .cm-scroller{min-height:100%}.status{font-size:.8rem;padding:.2rem .5rem;border-radius:4px;background:#f3f4f6}.status-compiling{background:#fef3c7}.status-ok{background:#dcfce7}.status-stale{background:#e2e8f0;color:#475569}.status-error{background:#fee2e2}.problems{padding:.5rem 1rem;background:#fff7ed;border-top:1px solid #fed7aa;font-size:.9rem}.badge{font-size:.8rem;padding:.2rem .5rem;background:#e0e7ff;color:#312e81;border-radius:4px}.btn{padding:.3rem .6rem;border:1px solid var(--border);border-radius:4px;text-decoration:none;color:var(--fg);font-size:.85rem;background:transparent;cursor:pointer;font-family:inherit}.btn:hover{background:#f9fafb}.examples-menu{position:relative}.examples-popover{position:absolute;right:0;top:calc(100% + 6px);background:var(--bg);color:var(--fg);border:1px solid var(--border);border-radius:6px;min-width:280px;max-width:360px;box-shadow:0 8px 24px #0000001f;z-index:50;padding:.25rem 0}.examples-item{display:block;width:100%;text-align:left;background:transparent;border:none;cursor:pointer;padding:.55rem .85rem;font-family:inherit;color:inherit}.examples-item:hover,.examples-item:focus-visible{background:#f3f4f6;outline:none}.examples-item-label{font-size:.9rem;font-weight:600}.examples-item-desc{font-size:.78rem;color:#6b7280;margin-top:2px;line-height:1.35}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.modal{background:var(--bg);color:var(--fg);border-radius:8px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 10px 30px #00000026}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1.25rem;border-bottom:1px solid var(--border)}.modal-header h2{margin:0;font-size:1.05rem}.modal-close{background:transparent;border:none;font-size:1.1rem;cursor:pointer;color:#6b7280;padding:.25rem .5rem;line-height:1}.modal-close:hover{color:var(--fg)}.modal-section{padding:.85rem 1.25rem;border-bottom:1px solid var(--border);font-size:.9rem}.modal-section:last-child{border-bottom:none}.modal-section h3{margin:0 0 .4rem;font-size:.9rem;font-weight:600}.modal-section p{margin:0;line-height:1.5;color:#374151}.modal-section a{color:#2563eb}.modal-disclaimer p{font-size:.8rem;color:#6b7280}.mobile-tabs{display:none}@media (max-width: 768px){.toolbar{grid-template-columns:1fr}.toolbar-half{padding:.35rem .75rem;gap:.5rem;flex-wrap:wrap}.toolbar-half-left{border-right:none;border-bottom:1px solid var(--border)}.toolbar h1{font-size:.85rem}.toolbar .badge{display:none}.toolbar .btn{font-size:.8rem;padding:.25rem .5rem}.mobile-tabs{display:flex;gap:.25rem;padding:.4rem .75rem;border-bottom:1px solid var(--border);background:var(--bg)}.mobile-tab{flex:1;padding:.4rem .6rem;border:1px solid var(--border);border-radius:4px;background:transparent;cursor:pointer;font-family:inherit;font-size:.85rem;color:var(--fg)}.mobile-tab-active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.split{grid-template-columns:1fr}.editor-pane{border-right:none}.split.mobile-tab-edit .preview-pane,.split.mobile-tab-preview .editor-pane{display:none}.modal-backdrop{padding:0}.modal{width:100%;max-width:none;height:100vh;max-height:100vh;border-radius:0;box-shadow:none}.examples-popover{position:fixed;bottom:0;left:0;top:0;right:0;min-width:0;max-width:none;width:100vw;height:100vh;border-radius:0;box-shadow:none;padding:.5rem 0;overflow-y:auto}.examples-item{padding:.85rem 1.25rem}.examples-item-label{font-size:1rem}.examples-item-desc{font-size:.85rem}}
