:root { --bg-dark:#0f172a;--bg-panel:#1e293b;--bg-panel-hover:#334155;--bg-input:#0f172a;--border:rgba(255,255,255,.12);--text:#f8fafc;--muted:#94a3b8;--primary:#6366f1;--cyan:#38bdf8;--red:#ef4444;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;color-scheme:dark }
*{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg-dark);color:var(--text);height:100vh;overflow:hidden}button,input,select{font:inherit}a{color:var(--cyan)}
.app-container{display:flex;width:100vw;height:100vh}.sidebar{width:360px;height:100vh;display:flex;flex-direction:column;flex-shrink:0;background:var(--bg-panel);border-right:1px solid var(--border);box-shadow:0 10px 25px -5px #0008;z-index:2}.sidebar-header{padding:20px;border-bottom:1px solid var(--border);background:linear-gradient(180deg,rgba(99,102,241,.1),transparent)}.sidebar-header h1{font-size:1.35rem}.sidebar-header p{margin-top:4px;color:var(--muted);font-size:.8rem}.sidebar-content{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px}.control-card{padding:14px;background:rgba(15,23,42,.5);border:1px solid var(--border);border-radius:10px}.card-title{margin-bottom:12px;color:var(--cyan);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.file-btn{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--bg-panel-hover);cursor:pointer;font-size:.85rem;font-weight:500}.file-btn:hover{border-color:var(--primary);background:rgba(99,102,241,.2)}.folder-path{max-width:145px;overflow:hidden;color:var(--cyan);font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.mode-tabs{display:flex;gap:4px;margin-bottom:12px;padding:3px;background:var(--bg-dark);border-radius:8px}.tab-btn{flex:1;padding:8px;border:0;border-radius:6px;background:none;color:var(--muted);font-size:.82rem;font-weight:600;cursor:pointer}.tab-btn.active{background:var(--primary);color:#fff}.input-row{display:flex;gap:10px;margin-bottom:10px}.input-group{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}label{color:var(--muted);font-size:.75rem}input,select{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:6px;outline:0;background:var(--bg-input);color:var(--text);font-size:.85rem}input:focus,select:focus{border-color:var(--primary)}input[type=color]{height:38px;padding:3px;cursor:pointer}.hint-text{margin-top:8px;color:var(--muted);font-size:.72rem;line-height:1.35}.preset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:10px}.preset-grid button{padding:6px 2px;border:1px solid var(--border);border-radius:5px;background:var(--bg-dark);color:var(--muted);font-size:.72rem;font-weight:600;cursor:pointer}.preset-grid button:hover{border-color:var(--primary);color:var(--text)}
.sidebar-footer{padding:16px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:10px}.sidebar-footer nav{display:flex;justify-content:center;gap:15px;font-size:.72rem}.status{min-height:18px;color:#a7d7ff;font-size:.75rem;line-height:1.35}.errors{max-height:70px;overflow:auto;padding-left:18px;color:#ffb3b3;font-size:.72rem;overflow-wrap:anywhere}.btn-primary,.btn-danger{width:100%;padding:11px;border:0;border-radius:8px;color:#fff;font-size:.88rem;font-weight:600;cursor:pointer}.btn-primary{background:linear-gradient(135deg,var(--primary),#4f46e5);box-shadow:0 4px 12px rgba(99,102,241,.3)}.btn-primary:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}.btn-danger{background:var(--red)}
.main-area{flex:1;min-width:0;height:100vh;display:flex;flex-direction:column;overflow:hidden;background:#0b0f19}.preview-section{flex:1;min-height:0;display:flex;flex-direction:column}.preview-header{padding:12px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);background:var(--bg-panel)}.preview-header h2{font-size:1rem}.preview-workspace{flex:1;min-height:0;position:relative;overflow:hidden}.preview-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto;background:repeating-conic-gradient(#111827 0 25%,#172033 0 50%) 50%/24px 24px}canvas#preview{display:block;max-width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:#000;box-shadow:0 20px 50px #000b}.thumbnail-section{height:178px;flex-shrink:0;display:flex;flex-direction:column;border-top:1px solid var(--border);background:var(--bg-panel)}.thumbnail-section-header{display:flex;justify-content:space-between;align-items:center;padding:7px 16px;border-bottom:1px solid var(--border);color:var(--cyan);font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.badge{padding:2px 8px;border-radius:12px;background:var(--bg-panel-hover);color:var(--cyan);font-size:.7rem}.thumbnail-grid{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:8px 14px;overflow-x:auto}.thumbnail-item{flex-shrink:0;width:140px;padding:5px;display:flex;flex-direction:column;align-items:center;gap:5px;border:2px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}.thumbnail-item:hover{background:var(--bg-panel-hover)}.thumbnail-item.active{border-color:var(--primary);background:rgba(99,102,241,.2)}.thumbnail-img{max-width:126px;height:88px;object-fit:contain;border-radius:3px;background:#000}.thumbnail-label{width:126px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.62rem}.empty-list-notice{flex:1;text-align:center;color:var(--muted);font-size:.78rem}.hidden,[hidden],.visually-hidden{display:none!important}
body.info-page{min-height:100vh;height:auto;overflow:auto;background:#0b0f19}.info-shell{width:min(860px,calc(100% - 32px));margin:0 auto;padding:40px 0 60px}.info-header{margin-bottom:20px}.info-header h1{font-size:1.8rem}.info-header p{margin-top:6px;color:var(--muted)}.info-card{padding:28px;border:1px solid var(--border);border-radius:12px;background:var(--bg-panel);line-height:1.65}.info-card h2{margin:24px 0 8px;color:var(--cyan);font-size:1.05rem}.info-card h2:first-child{margin-top:0}.info-card p+p{margin-top:12px}.back-link{display:inline-block;margin-top:24px}
@media(max-width:760px){body{height:auto;min-height:100vh;overflow:auto}.app-container{height:auto;min-height:100vh;flex-direction:column}.sidebar{width:100%;height:auto;min-height:100vh}.main-area{height:720px}.thumbnail-section{height:160px}}
