*{margin:0;padding:0;box-sizing:border-box}:root{--panel-height: 0px;--chevron-offset: 0px;--footer-height: 48px}html{color-scheme:light dark;-webkit-font-smoothing:antialiased}body{background:#f5f5f5;color:#1a1a1a;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}@media(prefers-color-scheme:dark){body{background:#1a1a1a;color:#e0e0e0}}#editor{min-height:100dvh;width:100%}#editor .cm-editor{min-height:100dvh}#editor .cm-content{padding:1rem 1.25rem 6rem}#preview{max-width:900px;margin:0 auto;padding:1.5rem 1.25rem 6rem;font:1rem/1.6 system-ui,sans-serif;min-height:100dvh;overflow-wrap:break-word}#preview h1{font-size:1.75em;font-weight:700;margin:.8em 0 .4em}#preview h2{font-size:1.4em;font-weight:700;margin:.8em 0 .4em}#preview h3{font-size:1.2em;font-weight:700;margin:.8em 0 .4em}#preview h4,#preview h5,#preview h6{font-size:1em;font-weight:600;margin:.6em 0 .3em}#preview h1:first-child,#preview h2:first-child,#preview h3:first-child{margin-top:0}#preview p{margin:0 0 1em}#preview ul,#preview ol{margin:0 0 1em;padding-left:1.5em}#preview li{margin-bottom:.25em}#preview blockquote{border-left:3px solid rgba(0,0,0,.15);padding-left:1rem;margin:0 0 1em;opacity:.85}#preview code{font-family:ui-monospace,monospace;font-size:.9em;background:#0000000f;padding:.15em .4em;border-radius:4px}#preview pre{background:#0000000a;border-radius:6px;padding:1rem;overflow-x:auto;margin:0 0 1em}#preview pre code{background:none;padding:0}#preview hr{border:none;border-top:1px solid rgba(0,0,0,.1);margin:1.5em 0}#preview table{border-collapse:collapse;width:100%;margin:0 0 1em}#preview th,#preview td{border:1px solid rgba(0,0,0,.12);padding:.5rem .75rem}#preview th{font-weight:600;background:#00000008}#preview img{max-width:100%;border-radius:6px}#preview a{color:#06c;text-decoration:underline}#preview strong{font-weight:700}#preview .mermaid-block{margin:1em 0}#preview .mermaid-block svg{max-width:100%;height:auto}@media(prefers-color-scheme:dark){#preview blockquote{border-left-color:#fff3}#preview code{background:#ffffff14}#preview pre{background:#ffffff0f}#preview hr{border-top-color:#ffffff1a}#preview th,#preview td{border-color:#ffffff1a}#preview th{background:#ffffff0a}#preview a{color:#58a6ff}}#footer-container{position:fixed;bottom:env(safe-area-inset-bottom,0px);left:0;right:0;z-index:100;transition:bottom .2s ease;user-select:none;-webkit-user-select:none}#footer-chevron{position:fixed;bottom:calc(var(--footer-height) + var(--panel-height, 0px) + var(--chevron-offset, 0px) + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%);z-index:101;pointer-events:none;transition:bottom .2s ease;user-select:none;-webkit-user-select:none}#footer-chevron .footer-chevron{pointer-events:auto}.footer-chevron{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;outline:none;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:.35;transition:opacity .15s,transform .2s;-webkit-tap-highlight-color:transparent}.footer-chevron:hover{opacity:.6}.footer-chevron.expanded svg{transform:rotate(180deg)}.capacity-bar{height:2px;width:100%;background:#0000000f}.capacity-fill{height:100%;width:0%;background:#34c759;transition:width .4s,background-color .4s}@media(prefers-color-scheme:dark){.capacity-bar{background:#ffffff0f}}.footer-inner{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 1rem;background:#f5f5f5eb;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}@media(prefers-color-scheme:dark){.footer-inner{background:#262626eb}}.footer-brand-area{display:flex;align-items:center;gap:.5rem}.footer-brand-link{display:none;font:700 .8rem/1 system-ui,sans-serif;color:inherit;text-decoration:none;opacity:.7;transition:opacity .15s;white-space:nowrap}.footer-brand-link:hover,.footer-brand-link .brand-main{opacity:1}.footer-brand-link .brand-suffix{opacity:.5;font-weight:400}.footer-btn-new{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:none;border:none;border-radius:6px;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s;-webkit-tap-highlight-color:transparent}.footer-btn-new:hover{opacity:1}.footer-actions{display:flex;align-items:center;gap:.25rem}.footer-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:6px;background:transparent;color:inherit;cursor:pointer;opacity:.6;transition:opacity .15s,background .15s;-webkit-tap-highlight-color:transparent}.footer-btn:hover{opacity:1;background:#0000000f}@media(prefers-color-scheme:dark){.footer-btn:hover{background:#ffffff14}}.capacity-label{font:.7rem/1 system-ui,sans-serif;color:#999;white-space:nowrap;padding:0 .5rem}@media(prefers-color-scheme:dark){.capacity-label{color:#666}}.capacity-label.capacity-warn{color:#c08800}.capacity-label.capacity-danger{color:#e53e3e}@media(min-width:769px){:root{--footer-height: 70px}.capacity-bar{height:3px}.footer-inner{height:66px;padding:0 1.5rem}.footer-brand-link{display:inline;font:700 1.2rem/1 system-ui,sans-serif}.footer-btn-new,.footer-btn{width:54px;height:54px}.footer-btn-new svg,.footer-btn svg{width:24px;height:24px}.footer-actions{gap:.375rem}.capacity-label{font:1.05rem/1 system-ui,sans-serif;padding:0 .75rem}.footer-panel.expanded{height:260px}.footer-panel-content{gap:1.125rem;padding:1.5rem;max-width:480px}.theme-switcher{padding:3px;border-radius:8px}.theme-btn{width:42px;height:42px;border-radius:6px}.theme-btn svg{width:20px;height:20px}.footer-panel-desc{font:1.125rem/1.45 system-ui,sans-serif;max-width:420px}.footer-panel-links{font:1.2rem/1.4 system-ui,sans-serif}.footer-panel-sep{margin:0 .5rem}}.footer-panel{overflow:hidden;height:0;transition:height .25s ease;background:#f5f5f5f2;backdrop-filter:blur(12px)}.footer-panel.expanded{height:185px}.footer-panel-content{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1rem;max-width:400px;margin:0 auto;text-align:center}.footer-panel-theme{display:flex;justify-content:center}.theme-switcher{display:flex;background:#0000000f;border-radius:6px;padding:2px}.theme-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:4px;background:transparent;color:inherit;cursor:pointer;opacity:.6;transition:opacity .15s,background .15s}.theme-btn:hover{opacity:.9}.theme-btn.active{background:#ffffffe6;color:#1a1a1a;opacity:1}@media(prefers-color-scheme:dark){.footer-panel{background:#262626f2}.theme-switcher{background:#ffffff14}.theme-btn.active{background:#ffffff26;color:#e0e0e0}}.footer-panel-blurb{display:flex;flex-direction:column;align-items:center}.footer-panel-desc{font:.75rem/1.45 system-ui,sans-serif;opacity:.6;margin:0;text-align:center;max-width:360px}.footer-panel-brand{font-weight:700;letter-spacing:-.03em;user-select:none;-webkit-user-select:none;-moz-user-select:none}.footer-panel-brand .brand-main{opacity:1}.footer-panel-brand .brand-suffix{opacity:.45;font-weight:400}.footer-panel-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0;font:.8rem/1.4 system-ui,sans-serif;color:inherit;opacity:.7}.footer-panel-links a{color:inherit;text-decoration:underline;text-underline-offset:2px}.footer-panel-links a:hover{opacity:1}.footer-panel-sep{opacity:.5;margin:0 .35rem}#toast{position:fixed;bottom:calc(var(--footer-height) + 12px + var(--panel-height, 0px) + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%) translateY(8px);padding:.5rem 1rem;border-radius:1rem;font:.85rem/1.4 system-ui,sans-serif;font-weight:500;background:#000c;color:#fff;z-index:200;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;user-select:none;-webkit-user-select:none}#toast.visible{opacity:1;transform:translate(-50%) translateY(0)}@media(prefers-color-scheme:dark){#toast{background:#ffffff26;backdrop-filter:blur(10px)}}.modal-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;background:#0006;backdrop-filter:blur(4px);opacity:0;transition:opacity .2s}.modal-overlay.visible{opacity:1}.modal{background:#f5f5f5;border-radius:12px;box-shadow:0 12px 40px #00000026;width:90%;max-width:360px;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem 0}.modal-title{font:600 1rem/1.2 system-ui,sans-serif}.modal-close{background:none;border:none;font-size:1.5rem;line-height:1;color:inherit;opacity:.5;cursor:pointer;padding:0 .25rem}.modal-close:hover{opacity:1}.modal-body{padding:1rem 1.25rem 1.25rem;display:flex;flex-direction:column;gap:.75rem}.modal-share .share-primary{display:flex;align-items:stretch;gap:.5rem}.modal-share .share-copy-btn{flex:1;padding:.6rem 1rem;border:none;border-radius:8px;background:#1a1a1a;color:#fff;font:500 .875rem/1.4 system-ui,sans-serif;cursor:pointer}.modal-share .share-copy-btn:hover{background:#333}.modal-share .share-copy-btn:disabled{opacity:.4;cursor:default}.modal-share .share-lock-btn{display:flex;align-items:center;justify-content:center;width:44px;border:none;border-radius:8px;background:#0000000f;color:inherit;cursor:pointer;opacity:.7;flex-shrink:0}.modal-share .share-lock-btn:hover{background:#0000001a;opacity:1}.modal-share .share-lock-btn.active{background:#1a1a1a;color:#fff;opacity:1}.modal-share .share-divider{height:1px;background:#00000014;margin:.25rem 0}.modal-share .share-downloads{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.modal-share .share-dl-btn,.modal-share .share-raw-btn{padding:.5rem .75rem;border:1px solid rgba(0,0,0,.15);border-radius:6px;background:transparent;color:inherit;font:.8rem/1.4 system-ui,sans-serif;cursor:pointer}.modal-share .share-raw-btn{grid-column:1 / -1}.modal-share .share-dl-btn:hover,.modal-share .share-raw-btn:hover{background:#0000000a;border-color:#00000040}.modal-password-area{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease;overflow:hidden}.modal-password-area.visible{grid-template-rows:1fr}.modal-password-inner{min-height:0;overflow:hidden;padding-top:.25rem}.modal-input-row{display:flex;gap:.5rem}.modal-input{flex:1;padding:.5rem .75rem;border:1px solid rgba(0,0,0,.15);border-radius:8px;font:.875rem/1.4 system-ui,sans-serif;background:transparent;color:inherit;outline:none}.modal-input:focus{border-color:#007aff}.modal-toggle-pw{display:flex;align-items:center;justify-content:center;width:36px;border:1px solid rgba(0,0,0,.15);border-radius:8px;background:transparent;color:inherit;cursor:pointer;opacity:.5;flex-shrink:0}.modal-toggle-pw:hover{opacity:1}.modal-description{font:.875rem/1.5 system-ui,sans-serif;opacity:.6;margin:0}.modal-btn{display:flex;align-items:center;justify-content:center;width:100%;padding:.6rem 1rem;border:none;border-radius:8px;font:500 .875rem/1.4 system-ui,sans-serif;cursor:pointer}.modal-btn:disabled{opacity:.4;cursor:default}.modal-btn-primary{background:#1a1a1a;color:#fff}.modal-btn-primary:hover:not(:disabled){background:#333}.modal-error{font:.8rem/1 system-ui,sans-serif;color:#e53e3e}@keyframes shake{0%,to{transform:translate(0)}20%{transform:translate(-6px)}40%{transform:translate(6px)}60%{transform:translate(-4px)}80%{transform:translate(4px)}}.modal-input.shake{animation:shake .4s ease;border-color:#e53e3e}@media(prefers-color-scheme:dark){.modal{background:#252525;box-shadow:0 12px 40px #0006}.modal-share .share-lock-btn{background:#ffffff14}.modal-share .share-lock-btn.active{background:#e0e0e0;color:#1a1a1a}.modal-input{border-color:#ffffff26}.modal-input:focus{border-color:#58a6ff}.modal-btn-primary{background:#e0e0e0;color:#1a1a1a}.modal-btn-primary:hover:not(:disabled){background:#fff}}html[data-theme=dark] body{background:#1a1a1a;color:#e0e0e0}html[data-theme=dark] .footer-inner{background:#262626eb}html[data-theme=dark] .footer-panel{background:#262626f2}html[data-theme=dark] .footer-btn:hover,html[data-theme=dark] .theme-switcher{background:#ffffff14}html[data-theme=dark] .theme-btn.active{background:#ffffff26;color:#e0e0e0}html[data-theme=dark] .modal{background:#252525}html[data-theme=dark] .modal-share .share-lock-btn{background:#ffffff14}html[data-theme=dark] .modal-share .share-lock-btn.active,html[data-theme=dark] .modal-btn-primary{background:#e0e0e0;color:#1a1a1a}html[data-theme=dark] .modal-btn-primary:hover:not(:disabled){background:#fff}html[data-theme=dark] .modal-input{border-color:#ffffff26}html[data-theme=dark] .modal-input:focus{border-color:#58a6ff}html[data-theme=dark] #toast{background:#ffffff26;backdrop-filter:blur(10px)}html[data-theme=light] body{background:#f5f5f5;color:#1a1a1a}html[data-theme=light] .footer-inner{background:#f5f5f5eb}html[data-theme=light] .footer-panel{background:#f5f5f5f2}html[data-theme=light] .footer-btn:hover,html[data-theme=light] .theme-switcher{background:#0000000f}html[data-theme=light] .theme-btn.active{background:#ffffffe6;color:#1a1a1a}html[data-theme=light] .modal{background:#f5f5f5}html[data-theme=light] .modal-share .share-lock-btn{background:#0000000f}html[data-theme=light] .modal-share .share-lock-btn.active,html[data-theme=light] .modal-btn-primary{background:#1a1a1a;color:#fff}html[data-theme=light] .modal-btn-primary:hover:not(:disabled){background:#333}html[data-theme=light] .modal-input{border-color:#00000026}html[data-theme=light] .modal-input:focus{border-color:#007aff}html[data-theme=light] #toast{background:#000c}@media(max-width:768px){#editor .cm-content{padding:1rem 1rem 5rem}#preview{padding:1rem 1rem 5rem;font-size:.95rem}#footer-container{transition:bottom .05s ease-out;transform:translateZ(0)}#footer-chevron{transition:bottom .05s ease-out;transform:translate(-50%) translateZ(0)}.footer-panel{transform:translateZ(0)}.footer-panel.expanded{height:185px}}@media print{#footer-container,#toast{display:none!important}#editor .cm-editor{min-height:auto}#editor .cm-content{padding:0!important}#preview{min-height:auto;padding:0}}
