/* Logo Grid Maker only. Explicit surface/text pairs prevent legacy theme conflicts. */
.gm-page [hidden]{display:none!important}
.gm-page .hero{padding:28px 18px 12px}.gm-page .hero h1{font-size:clamp(28px,4vw,46px);line-height:1.15}
.gm-page .tool-wrap{background:#e9edf3;padding:18px;border-radius:16px}
.gm-page .tool-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.gm-page .center-stage{background:#fff;color:#172033;padding:20px;border-radius:14px;min-height:0;min-width:0;order:initial}
.gm-page .tool-aside{background:#24262d;color:#f8fafc;padding:20px;border-radius:14px;min-width:0;position:static}
.gm-page .tool-aside .aside-title,.gm-page .tool-aside .settings-header{color:#f8fafc}
.gm-page .tool-aside .aside-sub,.gm-page .tool-aside .input-label,.gm-page .tool-aside .checkbox-group label{color:#cbd5e1}
.gm-page .tool-aside .seg,.gm-page .tool-aside .checkbox-group,.gm-page .tool-aside input[type=color]{background:#333740;color:#f8fafc;border-color:#64748b}
.gm-page .tool-aside .seg button{color:#cbd5e1;min-height:42px}
.gm-page .tool-aside .seg button.active,.gm-page .btn-primary{background:#1d4ed8;color:#fff}
.gm-page .tool-aside .help-note{background:#333740;color:#cbd5e1;border:1px solid #64748b;font-size:12px;line-height:1.65}
.gm-page .tool-aside .help-note b{color:#f8fafc}
.gm-page .grid-caption{font-size:12px;line-height:1.65;color:#475569;margin:10px 0}
.gm-page .upload-zone{padding:26px 16px;background:#f8fbff;color:#172033;border:1.5px dashed #93b4e3;border-radius:12px}
.gm-page .upload-title{font-size:18px;color:#172033}.gm-page .upload-subtitle,.gm-page .upload-hint{color:#475569}
.gm-page .thumbnail-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:9px;margin:14px 0}
.gm-page .grid-file{display:grid;grid-template-columns:56px minmax(0,1fr);gap:10px;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#172033;cursor:grab}
.gm-page .grid-file img{width:56px;height:56px;object-fit:contain;background:#e2e8f0;border-radius:5px}
.gm-page .grid-file-info{grid-column:2;min-width:0}.gm-page .grid-file-info strong{font-size:12px;display:block;overflow-wrap:anywhere;line-height:1.5}
.gm-page .grid-file-info small{font-size:11px;line-height:1.6;color:#475569;display:block;margin-top:4px}
.gm-page .grid-file-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px}
.gm-page .grid-file-actions button{min-width:40px;height:40px;border:1px solid #cbd5e1;border-radius:7px;background:#f8fafc;color:#172033;cursor:pointer;font-size:17px}
.gm-page button:disabled{opacity:1;cursor:not-allowed;background:#e2e8f0;color:#475569;border-color:#cbd5e1}
.gm-page .stage-card{border-radius:12px;background:#fff}.gm-page .stage-card-head{padding:16px;gap:12px;flex-wrap:wrap}.gm-page .stage-card-head h2{font-size:16px;color:#172033}
.gm-page .grid-preview-toolbar{padding:8px 16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;color:#475569;font-size:12px}
.gm-page .grid-preview-toolbar select{width:auto;background:#f8fafc;color:#172033;border:1px solid #cbd5e1;padding:8px;border-radius:6px}
.gm-page .preview-container{padding:18px;min-height:280px;max-height:480px;overflow:hidden}
.gm-page #preview-canvas{background:none;max-height:420px;max-width:100%;border-radius:0}
.gm-page #grid-preview[data-surface=light]{background:#fff}.gm-page #grid-preview[data-surface=dark]{background:#182235}
.gm-page .preview-empty{padding:18px;background:#fff;color:#475569;border-radius:10px;font-size:14px}
.gm-page #grid-preview[data-surface=dark] .preview-empty{background:#24262d;color:#e2e8f0}
.gm-page .grid-dimensions{font-size:14px;font-weight:650;color:#172033;margin:16px 0 4px}
.gm-page .grid-error:empty{display:none}.gm-page .grid-error:not(:empty){padding:12px;background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-radius:9px;overflow-wrap:anywhere;font-size:12px;line-height:1.6}
.gm-page .action-buttons{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;padding:12px;background:#f8fafc;margin-bottom:10px}
.gm-page .action-buttons button{min-height:44px;border-radius:8px}.gm-page .btn-ghost,.gm-page .btn-secondary{background:#fff;color:#172033;border:1px solid #cbd5e1}
.gm-page .action-buttons button:disabled{background:#e2e8f0;color:#475569}
.gm-page progress{width:100%;height:8px;accent-color:#1d4ed8}.gm-page .grid-limits summary{font-size:12px;min-height:40px;padding:10px 0;cursor:pointer;color:#475569}.gm-page .grid-limits p{font-size:12px;line-height:1.65;color:#475569}
.gm-page button:focus-visible,.gm-page select:focus-visible,.gm-page input:focus-visible,.gm-page summary:focus-visible,.gm-page .grid-file:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
@media(max-width:900px){.gm-page .tool-grid{grid-template-columns:minmax(0,1fr)}.gm-page .tool-aside{order:1}.gm-page .center-stage{order:0}.gm-page .tool-wrap{padding:12px}.gm-page .tool-aside .input-group{margin-bottom:12px}.gm-page .center-stage{padding:16px}.gm-page .action-buttons button{flex:1 1 auto}.gm-page .hero{padding-top:20px}}
@media(prefers-reduced-motion:reduce){.gm-page *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
