*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;overflow:hidden;font-family:Segoe UI,Meiryo,sans-serif;font-size:13px;background:#f0f0f0;color:#333}#app{width:100%;height:100%}.sakura-app{display:flex;flex-direction:column;width:100%;height:100%;background:#f0f0f0}.menu-bar{display:flex;align-items:center;flex-wrap:wrap;background:#f0f0f0;border-bottom:1px solid #C0C0C0;min-height:26px;flex-shrink:0;-webkit-user-select:none;user-select:none}.menu-item{position:relative;height:100%;display:flex;align-items:center}.menu-label{padding:0 10px;height:100%;display:flex;align-items:center;cursor:pointer;font-size:12px}.menu-label:hover{background:#d8e8f8}.menu-dropdown{display:none;position:absolute;top:100%;left:0;background:#fff;border:1px solid #C0C0C0;box-shadow:2px 4px 8px #00000026;z-index:9000;min-width:220px}.menu-dropdown.open{display:block}.menu-entry{display:flex;align-items:center;gap:4px;padding:3px 8px 3px 4px;cursor:pointer;font-size:12px;white-space:nowrap}.menu-icon{width:16px;height:16px;image-rendering:pixelated;flex-shrink:0}.menu-icon-space{width:16px;flex-shrink:0}.menu-entry:hover{background:#d8e8f8}.menu-entry-label{flex:1}.menu-entry-shortcut{margin-left:32px;color:gray;font-size:11px}.menu-separator{height:1px;background:#d0d0d0;margin:3px 4px}.menu-sub{position:relative}.menu-entry-arrow{font-size:8px;margin-left:12px;color:gray}.menu-subdropdown{position:absolute;top:-1px;left:100%;display:none}.menu-sub:hover>.menu-subdropdown,.menu-subdropdown.open{display:block}.dialog-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;display:flex;align-items:flex-start;justify-content:center;padding-top:40px;background:#0000004d}.dialog-panel{background:#f5f5f5;border:1px solid #999;border-radius:4px;box-shadow:0 8px 32px #0000004d;max-height:85vh;display:flex;flex-direction:column}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#e8e8e8;border-bottom:1px solid #C0C0C0;border-radius:4px 4px 0 0;cursor:default;-webkit-user-select:none;user-select:none}.dialog-title{font-weight:700;font-size:13px}.dialog-close{background:none;border:none;font-size:18px;cursor:pointer;color:#666;padding:0 4px}.dialog-close:hover{color:#333}.dialog-body{padding:12px 16px;overflow-y:auto;flex:1}.dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding:8px 16px;border-top:1px solid #C0C0C0}.dialog-footer button{padding:4px 20px;border:1px solid #C0C0C0;border-radius:3px;background:#fff;cursor:pointer;font-size:12px}.dialog-footer button:hover{background:#e8e8e8}.dialog-footer button.primary{background:#0078d4;color:#fff;border-color:#0060aa}.dialog-footer button.primary:hover{background:#006abc}.settings-layout{display:flex;min-width:700px;min-height:450px}.settings-tabs{width:160px;border-right:1px solid #C0C0C0;background:#f0f0f0;overflow-y:auto;flex-shrink:0}.settings-tab-item{padding:6px 12px;font-size:12px;cursor:pointer;border-bottom:1px solid #E0E0E0;white-space:nowrap}.settings-tab-item:hover{background:#e0e0e0}.settings-tab-item.active{background:#fff;font-weight:700;border-right:2px solid #0078D4}.settings-content{flex:1;padding:16px;overflow-y:auto}.settings-content fieldset{border:1px solid #C0C0C0;border-radius:3px;padding:8px 12px;margin-bottom:12px}.settings-content legend{font-size:12px;font-weight:700;padding:0 4px}.settings-content label{display:flex;align-items:center;gap:6px;margin:4px 0;font-size:12px}.settings-content input[type=text],.settings-content input[type=number],.settings-content select{padding:3px 6px;border:1px solid #C0C0C0;border-radius:3px;font-size:12px}.settings-content input[type=text]{width:200px}.settings-content input[type=number]{width:80px}.settings-content .color-item{display:flex;align-items:center;gap:8px;padding:3px 0}.settings-content .color-item input[type=color]{width:30px;height:20px;border:1px solid #C0C0C0;padding:0;cursor:pointer}.toolbar{display:flex;align-items:center;gap:1px;padding:2px 4px;background:#f0f0f0;border-bottom:1px solid #C0C0C0;height:30px;flex-shrink:0;-webkit-user-select:none;user-select:none}.toolbar-button{width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:3px;background:transparent;cursor:pointer;font-size:14px;color:#333}.toolbar-button:hover{background:#d8e8f8;border-color:#a0c0e8}.toolbar-button:active{background:#c0d8f0}.toolbar-flat .toolbar-button{border:1px solid transparent;border-radius:0;box-shadow:none}.toolbar-flat .toolbar-button:hover{border-color:#a0c0e8}.toolbar:not(.toolbar-flat) .toolbar-button{border:1px solid #AAA;border-radius:2px;box-shadow:0 1px #fff9 inset,0 1px 2px #00000026}.toolbar-icons-16 .toolbar-button{width:26px;height:26px}.toolbar-icons-24 .toolbar-button{width:34px;height:34px}.toolbar-icons-32 .toolbar-button{width:42px;height:42px}.toolbar-separator{width:1px;height:20px;background:silver;margin:0 3px}.tab-bar{display:flex;background:#e8e8e8;border-bottom:1px solid #C0C0C0;min-height:28px;flex-shrink:0;-webkit-user-select:none;user-select:none}.tab-nav{display:flex;align-items:flex-start;flex-shrink:0;border-left:1px solid #D0D0D0}.tab-nav-btn{width:22px;height:28px;border:none;background:#e8e8e8;cursor:pointer;font-size:10px;color:#555;display:flex;align-items:center;justify-content:center}.tab-nav-btn:hover{background:#d0d0d0}.tab-nav-close{font-size:14px;color:#999}.tab-nav-close:hover{color:#333;background:#f0c0c0}.tab-scroll-area{display:flex;overflow-x:auto;white-space:nowrap;flex:1}.tab-scroll-area::-webkit-scrollbar{height:0}.tab-dropdown-menu{background:#fff;border:1px solid #C0C0C0;box-shadow:2px 4px 8px #00000026;z-index:3000;min-width:200px;max-height:400px;overflow-y:auto}.tab-dropdown-item{padding:4px 12px;cursor:pointer;font-size:12px;white-space:nowrap}.tab-dropdown-item:hover{background:#d8e8f8}.tab-dropdown-item.active{font-weight:700}.tab-item{display:flex;align-items:center;gap:6px;padding:0 12px;height:28px;border-right:1px solid #D0D0D0;cursor:pointer;font-size:12px;white-space:nowrap;min-width:80px;max-width:200px;background:#e0e0e0;color:#666}.tab-item:hover{background:#eee}.tab-item.active{background:#fff;color:#333;border-bottom:2px solid #0078D4}.tab-title{overflow:hidden;text-overflow:ellipsis}.tab-close{font-size:14px;line-height:1;color:#999;cursor:pointer;flex-shrink:0}.tab-close:hover{color:#333}.editor-container{flex:1;position:relative;overflow:hidden;background:#fff}.editor-canvas{display:block;position:absolute;top:0;left:0;width:100%;height:100%;cursor:text}.editor-input{position:absolute;z-index:10;opacity:1;width:2000px;overflow:hidden;border:none;outline:none;resize:none;padding:0;margin:0;background:transparent;color:transparent;caret-color:transparent;white-space:nowrap}.editor-vscrollbar{position:absolute;top:0;right:0;width:14px;height:calc(100% - 14px);background:#f0f0f0;border-left:1px solid #C0C0C0;z-index:5}.editor-vscrollbar-thumb{position:absolute;width:100%;min-height:20px;background:silver;border-radius:2px;cursor:pointer}.editor-vscrollbar-thumb:hover{background:#a0a0a0}.editor-hscrollbar{position:absolute;bottom:0;left:0;width:calc(100% - 14px);height:14px;background:#f0f0f0;border-top:1px solid #C0C0C0;z-index:5}.editor-hscrollbar-thumb{position:absolute;height:100%;min-width:20px;background:silver;border-radius:2px;cursor:pointer}.editor-hscrollbar-thumb:hover{background:#a0a0a0}.editor-minimap{position:absolute;top:0;right:14px;width:110px;height:calc(100% - 14px);z-index:4;cursor:pointer;border-left:1px solid #C0C0C0}.minimap-tooltip{position:fixed;background:#fffde7;border:1px solid #C0A000;box-shadow:2px 2px 6px #0003;padding:6px 10px;font-family:MS Gothic,Consolas,monospace;font-size:11px;line-height:1.4;white-space:pre;z-index:7000;pointer-events:none;max-width:500px;display:none}.sakura-app.dark .minimap-tooltip{background:#3c3c3c;border-color:#555;color:#ddd}.funckey-bar{display:flex;align-items:center;background:#f0f0f0;border-bottom:1px solid #C0C0C0;height:24px;flex-shrink:0;-webkit-user-select:none;user-select:none;overflow-x:auto;gap:1px;padding:0 2px}.funckey-button{display:flex;align-items:center;gap:2px;border:1px solid #C0C0C0;border-radius:2px;background:#fff;cursor:pointer;padding:1px 4px;height:20px;font-size:10px;white-space:nowrap;flex-shrink:0}.funckey-button:hover{background:#d8e8f8}.funckey-button:disabled{opacity:.5;cursor:default}.funckey-name{font-weight:700;color:#333;font-size:9px}.funckey-label{color:#555}.funckey-group-btn{padding:1px 6px;height:20px;border:1px solid #A0A0A0;border-radius:2px;background:#e0e0e0;cursor:pointer;font-size:9px;font-weight:700;color:#333;flex-shrink:0;margin-right:2px}.funckey-group-btn:hover{background:#d0d0d0}.funckey-keys{display:flex;align-items:center;gap:1px;overflow-x:auto;flex:1}.outline-overlay{position:fixed;z-index:2000;pointer-events:none;top:0;right:0;bottom:0;left:0}.outline-panel{position:fixed;right:20px;top:80px;background:#f5f5f5;border:1px solid #999;border-radius:4px;box-shadow:0 4px 16px #0003;width:320px;max-height:70vh;display:flex;flex-direction:column;pointer-events:auto;resize:both;overflow:hidden}.outline-header{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:linear-gradient(to bottom,#4a7ebb,#3a6ea5);color:#fff;border-radius:4px 4px 0 0;font-size:12px}.outline-list{overflow-y:auto;flex:1;max-height:60vh}.outline-item{display:flex;align-items:center;gap:6px;padding:3px 8px;cursor:pointer;font-size:12px;border-bottom:1px solid #EEE}.outline-item:hover{background:#d8e8f8}.outline-icon{font-weight:700;font-size:11px;width:16px;text-align:center;flex-shrink:0}.outline-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.outline-linenum{color:#888;font-size:10px;flex-shrink:0}.editor-context-menu{background:#fff;border:1px solid #C0C0C0;box-shadow:2px 4px 8px #0003;z-index:5000;min-width:200px;padding:4px 0;font-size:12px}.ctx-item{display:flex;justify-content:space-between;align-items:center;padding:4px 24px 4px 12px;cursor:pointer;white-space:nowrap}.ctx-item:hover{background:#d8e8f8}.ctx-shortcut{color:gray;font-size:11px;margin-left:24px}.ctx-separator{height:1px;background:#d0d0d0;margin:3px 4px}.sakura-app.dark .editor-context-menu{background:#2d2d2d;border-color:#454545;color:#ccc}.sakura-app.dark .ctx-item:hover{background:#094771}.hokan-popup{position:fixed;background:#fff;border:1px solid #C0C0C0;box-shadow:2px 4px 8px #00000026;z-index:6000;max-height:200px;overflow-y:auto;min-width:150px;font-size:12px;font-family:MS Gothic,Consolas,monospace}.hokan-item{padding:2px 8px;cursor:pointer;white-space:nowrap}.hokan-item:hover,.hokan-item.active{background:#39f;color:#fff}.sakura-app.dark .hokan-popup{background:#2d2d2d;border-color:#454545;color:#ccc}.sakura-app.dark .hokan-item:hover,.sakura-app.dark .hokan-item.active{background:#094771}.status-bar{display:flex;align-items:center;background:#f0f0f0;color:#333;height:22px;flex-shrink:0;font-size:11px;-webkit-user-select:none;user-select:none;border-top:1px solid #C0C0C0}.status-cell{padding:0 8px;height:100%;display:flex;align-items:center;border-right:1px solid #C0C0C0;white-space:nowrap}.status-message{flex:1;border-right:none}.status-rec{color:red;font-weight:700;min-width:30px}.status-message{flex:1}.status-modified{color:gold}.find-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px;pointer-events:none}.find-panel{background:#f5f5f5;border:1px solid #C0C0C0;border-radius:4px;box-shadow:0 4px 16px #0003;padding:12px 16px;pointer-events:auto;min-width:480px}.find-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.find-title{font-weight:700;font-size:13px}.find-close-btn{background:none;border:none;font-size:18px;cursor:pointer;color:#666;padding:0 4px}.find-close-btn:hover{color:#333}.find-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.find-label{width:40px;text-align:right;font-size:12px;flex-shrink:0}.find-input{flex:1;padding:4px 8px;border:1px solid #C0C0C0;border-radius:3px;font-family:Consolas,MS Gothic,monospace;font-size:13px;outline:none}.find-input:focus{border-color:#0078d4;box-shadow:0 0 0 1px #0078d4}.find-btn{padding:4px 12px;border:1px solid #C0C0C0;border-radius:3px;background:#fff;cursor:pointer;font-size:12px;white-space:nowrap}.find-btn:hover{background:#e8e8e8}.find-btn:active{background:#d0d0d0}.find-options{gap:16px;padding-top:4px}.find-checkbox-label{font-size:12px;cursor:pointer;display:flex;align-items:center;gap:4px}.goto-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:2000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px;pointer-events:none}.goto-panel{pointer-events:auto;background:#f5f5f5;border:1px solid #C0C0C0;border-radius:4px;box-shadow:0 4px 16px #0003;padding:16px;display:flex;align-items:center;gap:8px}.goto-label{font-size:13px;white-space:nowrap}.goto-input{width:100px;padding:4px 8px;border:1px solid #C0C0C0;border-radius:3px;font-size:13px;outline:none}.goto-input:focus{border-color:#0078d4}.sakura-app.dark .menu-bar,.sakura-app.dark .toolbar{background:#252526;border-color:#3c3c3c;color:#ccc}.sakura-app.dark .menu-label,.sakura-app.dark .toolbar-button{color:#ccc}.sakura-app.dark .funckey-bar{background:#252526;border-color:#3c3c3c}.sakura-app.dark .funckey-button{background:#3c3c3c;border-color:#555;color:#ccc}.sakura-app.dark .funckey-name{color:#ddd}.sakura-app.dark .funckey-label{color:#aaa}.sakura-app.dark .menu-label:hover,.sakura-app.dark .toolbar-button:hover{background:#3c3c3c}.sakura-app.dark .tab-bar{background:#2d2d2d;border-color:#3c3c3c}.sakura-app.dark .tab-nav-btn{background:#2d2d2d;color:#999}.sakura-app.dark .tab-nav-btn:hover{background:#3c3c3c}.sakura-app.dark .tab-dropdown-menu{background:#2d2d2d;border-color:#454545;color:#ccc}.sakura-app.dark .tab-dropdown-item:hover{background:#094771}.sakura-app.dark .tab-item{background:#2d2d2d;border-color:#3c3c3c;color:#999}.sakura-app.dark .tab-item.active{background:#1e1e1e;color:#fff;border-bottom-color:#0078d4}.sakura-app.dark .editor-container{background:#1e1e1e}.sakura-app.dark .status-bar{background:#252526;border-top-color:#3c3c3c;color:#ccc}.sakura-app.dark .status-cell{border-right-color:#3c3c3c}.sakura-app.dark .menu-dropdown{background:#2d2d2d;border-color:#454545;color:#ccc}.sakura-app.dark .menu-entry:hover{background:#094771}.sakura-app.dark .menu-entry-shortcut{color:#888}.sakura-app.dark .find-panel,.sakura-app.dark .goto-panel{background:#2d2d2d;border-color:#454545;color:#ccc}.sakura-app.dark .find-input,.sakura-app.dark .goto-input,.sakura-app.dark .find-btn{background:#3c3c3c;border-color:#555;color:#ccc}
