
/* HOLiUS theme editor — responsive consolidated layout */
.theme-editor-page{min-height:calc(100dvh - 70px);background:var(--theme-bg);padding:18px}
.theme-editor-shell{max-width:1180px;margin:0 auto}
.theme-editor-bar{position:sticky;top:70px;z-index:30;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 0 16px;background:color-mix(in srgb,var(--theme-bg) 94%,transparent);backdrop-filter:blur(10px)}
.theme-editor-bar>div{text-align:center;min-width:0}.theme-editor-bar strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.theme-editor-bar small{display:block;color:var(--theme-muted);font-size:12px}
.theme-editor-back{display:inline-flex;align-items:center;min-height:44px;color:var(--theme-text);text-decoration:none;white-space:nowrap}
.theme-editor-save{min-height:44px;border:0;border-radius:var(--theme-radius-card);padding:10px 14px;background:var(--theme-accent);color:var(--theme-accent-contrast);font-weight:750;cursor:pointer}
.theme-editor-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:24px;align-items:start}
.theme-preview-wrap{position:sticky;top:142px;min-width:0}.theme-preview{--p-bg:#fff;--p-surface:#f8f9fa;--p-text:#111827;--p-muted:#6b7280;--p-accent:#111827;--p-border:#e5e7eb;background:var(--p-bg);color:var(--p-text);border:1px solid var(--p-border);border-radius:var(--theme-radius-card);padding:42px;min-height:500px;box-shadow:0 4px 12px color-mix(in srgb,var(--p-text) 6%,transparent)}
.theme-preview-logo{text-align:center;font-weight:900;letter-spacing:var(--theme-tracking-body);font-size:38px;margin:30px 0 34px}.theme-preview-search{height:56px;border:1px solid var(--p-border);border-radius:999px;background:var(--p-surface);display:flex;align-items:center;justify-content:space-between;padding:0 20px;color:var(--p-muted)}.theme-preview-search b{color:var(--p-accent);font-size:24px}.theme-preview-divider{height:1px;background:var(--p-border);margin:38px -42px 24px}.theme-preview h3{font-size:15px;margin:0 0 12px}.theme-preview-card{background:var(--p-surface);border:1px solid var(--p-border);border-radius:var(--theme-radius-card);padding:18px;display:grid;gap:6px}.theme-preview-card small{color:var(--p-muted)}.theme-preview-button{margin-top:18px;border:0;border-radius:var(--theme-radius-button);padding:10px 18px;background:var(--p-accent);color:var(--p-accent-contrast,#fff);font-weight:700}
.theme-contrast-box{margin-top:12px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--theme-radius-card);padding:12px;font-size:13px;display:grid;gap:6px}
.theme-editor-controls{min-width:0;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--theme-radius-control);padding:20px;box-shadow:var(--theme-shadow)}
.theme-field,.theme-color-field{display:grid;gap:7px;margin-bottom:16px}.theme-field>span,.theme-color-field>span{font-size:13px;font-weight:750}.theme-field input,.theme-field select,.theme-hex{box-sizing:border-box;width:100%;height:44px;border:1px solid var(--theme-border);background:var(--theme-input);color:var(--theme-text);border-radius:var(--theme-radius-control);padding:0 12px}
.theme-color-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.theme-color-field>div{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;min-width:0}.theme-color-field input[type=color]{box-sizing:border-box;width:44px;height:44px;padding:3px;border:1px solid var(--theme-border);border-radius:var(--theme-radius-control);background:var(--theme-surface)}
.theme-advanced{border-top:1px solid var(--theme-border);padding-top:14px}.theme-advanced summary{cursor:pointer;font-weight:750;margin-bottom:14px;min-height:40px;display:flex;align-items:center}.theme-advanced .theme-color-field{margin-top:12px}
.theme-editor-mobile-actions{display:none}.theme-editor-danger{margin-top:22px;padding-top:18px;border-top:1px solid var(--theme-border)}.theme-editor-delete{width:100%;min-height:44px;border:1px solid var(--semantic-danger,#b42318);border-radius:var(--theme-radius-card);background:transparent;color:var(--semantic-danger,#b42318);font:inherit;font-weight:750;cursor:pointer}
@media(max-width:820px){
  .theme-editor-page{padding:0 0 calc(92px + env(safe-area-inset-bottom));min-height:100dvh;overflow-x:hidden}.theme-editor-shell{width:100%;max-width:none}
  .theme-editor-bar{top:0;grid-template-columns:64px minmax(0,1fr) 64px;gap:4px;min-height:58px;padding:7px 12px;border-bottom:1px solid var(--theme-border);background:color-mix(in srgb,var(--theme-bg) 97%,transparent)}
  .theme-editor-bar strong{font-size:16px}.theme-editor-bar small{display:none}.theme-editor-back{font-size:14px}.theme-editor-save{visibility:hidden;width:0;min-width:0;padding:0;overflow:hidden}
  .theme-editor-layout{display:flex;flex-direction:column;gap:14px;padding:14px 14px 0;min-width:0}.theme-preview-wrap{order:1;position:static;width:100%;min-width:0}.theme-editor-controls{order:2;box-sizing:border-box;width:100%;padding:16px;border-radius:var(--theme-radius-control);box-shadow:none}
  .theme-preview{box-sizing:border-box;width:100%;min-height:0;padding:20px 16px;border-radius:var(--theme-radius-card)}.theme-preview-logo{font-size:28px;margin:10px 0 18px}.theme-preview-search{height:48px;padding:0 16px}.theme-preview-divider{margin:22px -16px 16px}.theme-preview-card{padding:14px}.theme-preview-button{width:100%;min-height:44px;margin-top:14px}.theme-contrast-box{margin-top:10px;border-radius:var(--theme-radius-card)}
  .theme-color-grid{grid-template-columns:1fr;gap:0}.theme-field,.theme-color-field{margin-bottom:14px}.theme-field input,.theme-field select,.theme-hex{height:48px;font-size:16px}.theme-color-field>div{grid-template-columns:52px minmax(0,1fr);gap:10px}.theme-color-field input[type=color]{width:52px;height:48px;border-radius:var(--theme-radius-control)}.theme-advanced{margin-top:4px}.theme-advanced summary{min-height:44px;margin-bottom:6px}
  .theme-editor-mobile-actions{position:fixed;left:0;right:0;bottom:0;z-index:90;display:grid;grid-template-columns:minmax(90px,.38fr) minmax(0,1fr);gap:10px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--theme-border);background:color-mix(in srgb,var(--theme-surface) 97%,transparent);backdrop-filter:blur(12px)}
  .theme-editor-mobile-actions a,.theme-editor-mobile-actions button{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:var(--theme-radius-button);font:inherit;font-weight:800;text-decoration:none}.theme-editor-mobile-actions a{border:1px solid var(--theme-border);background:var(--theme-surface);color:var(--theme-text)}.theme-editor-mobile-actions button{border:1px solid var(--theme-accent);background:var(--theme-accent);color:var(--theme-accent-contrast);cursor:pointer}
}
@media(max-width:380px){.theme-editor-layout{padding-left:12px;padding-right:12px}.theme-editor-controls{padding:14px}.theme-editor-mobile-actions{padding-left:12px;padding-right:12px}.theme-editor-bar{grid-template-columns:58px minmax(0,1fr) 58px}}


/* Admin-only default theme setting: kept inside the editor, not on theme cards */
.theme-default-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 18px;padding:14px 15px;border:1px solid var(--theme-border);border-radius:var(--theme-radius-card);background:color-mix(in srgb,var(--theme-surface) 94%,var(--theme-bg))}
.theme-default-setting-copy{min-width:0;display:grid;gap:4px}.theme-default-setting-copy strong{font-size:14px}.theme-default-setting-copy small{color:var(--theme-muted);font-size:12px;line-height:var(--theme-leading-body)}
.theme-default-toggle{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--theme-border);border-radius:var(--theme-radius-card);background:var(--theme-surface);font-size:13px;font-weight:750;cursor:pointer;white-space:nowrap}
.theme-default-toggle input{width:18px;height:18px;margin:0;accent-color:var(--theme-accent)}.theme-default-setting.is-current .theme-default-toggle{cursor:default;opacity:.82}
@media(max-width:820px){.theme-default-setting{align-items:stretch;flex-direction:column;gap:10px;padding:14px}.theme-default-toggle{width:100%;box-sizing:border-box;justify-content:flex-start;min-height:48px}}
