:root{
  --bg:#eff4ff;
  --bg2:#f8fbff;
  --panel:#ffffff;
  --text:#12203a;
  --muted:#64748b;
  --line:#dbe5f5;
  --blue:#1262ff;
  --blue-deep:#0d43b8;
  --yellow:#f6efad;
  --yellow-deep:#e7d970;
  --green:#12b76a;
  --orange:#f79009;
  --danger:#d92d20;
  --success:#039855;
  --radius:20px;
  --shadow:0 18px 50px rgba(19,44,97,.10);
  --shadow-soft:0 10px 28px rgba(19,44,97,.07);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(circle at top right, rgba(18,98,255,.18), transparent 28%),
    radial-gradient(circle at left center, rgba(246,239,173,.32), transparent 26%),
    linear-gradient(180deg, #f9fbff 0%, #edf3ff 100%);
  font-family:"Inter","Noto Sans SC",sans-serif;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,select,textarea{font-family:inherit}
button{
  cursor:pointer;border:none;border-radius:14px;padding:12px 16px;font-weight:800;
  transition:.18s ease;white-space:nowrap;
}
button:hover{transform:translateY(-1px)}
button.primary{background:linear-gradient(135deg,var(--blue),#4f7cff);color:#fff;box-shadow:0 14px 28px rgba(18,98,255,.22)}
button.ghost{background:#fff;color:var(--text);border:1px solid var(--line)}
button.soft{background:#edf3ff;color:var(--blue-deep)}
button.yellow{background:linear-gradient(135deg,#fff7bf,#f0dd76);color:#574900;box-shadow:0 12px 26px rgba(240,221,118,.28)}
button.danger{background:#fff1f2;color:var(--danger);border:1px solid #ffd4d8}
button.small{padding:8px 11px;border-radius:12px;font-size:12px;font-weight:700}
button.icon-btn{width:42px;height:42px;display:grid;place-items:center;padding:0}
input,select,textarea{
  width:100%;border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:#fff;color:var(--text);outline:none;
  transition:.18s ease;
}
textarea{min-height:92px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:#90b4ff;box-shadow:0 0 0 4px rgba(18,98,255,.10)}
.app-shell{min-height:100vh;display:flex;flex-direction:column}
.topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:16px 28px;
  background:rgba(255,255,255,.82);backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(219,229,245,.9);
}
.logo{display:flex;align-items:center;gap:14px;min-width:0}
.logo-badge{
  width:48px;height:48px;border-radius:16px;
  background:linear-gradient(135deg,var(--blue),#5f8cff);
  box-shadow:0 14px 30px rgba(18,98,255,.24);
  overflow:hidden;display:grid;place-items:center;flex:none;
}
.logo-badge img{width:100%;height:100%;object-fit:cover}
.logo-copy{display:grid;gap:2px}
.logo-title{font-size:18px;font-weight:900;letter-spacing:-.4px}
.logo-sub{font-size:12px;color:var(--muted)}
.nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.nav button.active{background:#14274f;color:#fff;border-color:#14274f}
.nav .admin-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:#fff7d7;border:1px solid #f2e6a0;color:#695d16;border-radius:999px;font-size:12px;font-weight:800}
.container{width:min(1480px,100%);margin:0 auto;padding:28px}
.hero{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:22px;align-items:stretch;margin-bottom:24px;
}
.hero-brand{
  position:relative;overflow:hidden;border-radius:30px;padding:34px 34px 0;
  min-height:360px;color:#fff;box-shadow:var(--shadow);
  background:linear-gradient(135deg,#0e45c7 0%, #1262ff 46%, #2b8cff 100%);
}
.hero-brand:before,.hero-brand:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.11)}
.hero-brand:before{width:240px;height:240px;right:-40px;top:-20px}
.hero-brand:after{width:180px;height:180px;left:-36px;bottom:-46px}
.hero-tag{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800;color:rgba(255,255,255,.95)}
.hero-title{font-size:42px;line-height:1.08;letter-spacing:-1.4px;margin:16px 0 14px;font-weight:900;max-width:700px}
.hero-desc{max-width:720px;color:rgba(255,255,255,.86);font-size:15px;line-height:1.9;margin:0}
.hero-bullets{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.hero-bullets span{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.13);font-size:12px;font-weight:700}
.hero-mascot{position:absolute;right:16px;bottom:0;width:min(42%,380px);filter:drop-shadow(0 18px 28px rgba(0,0,0,.18))}
.hero-side{display:grid;gap:16px}
.side-card,.panel{background:var(--panel);border:1px solid rgba(219,229,245,.92);border-radius:var(--radius);box-shadow:var(--shadow-soft)}
.side-card{padding:22px}
.side-card h3,.panel h2,.panel h3{margin:0}
.side-card p{margin:0;color:var(--muted);line-height:1.7;font-size:14px}
.stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:16px}
.stat{
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);border:1px solid var(--line);border-radius:18px;padding:16px;
}
.stat b{display:block;font-size:26px;margin-bottom:6px}
.stat span{font-size:13px;color:var(--muted)}
.ip-mini{display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:center}
.ip-mini img{width:120px;justify-self:center}
.ip-copy h4{margin:0 0 6px;font-size:18px}
.ip-copy .chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700;background:#f2f6ff;color:#345}
.panel{overflow:hidden}
.panel-hd{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:18px 22px;border-bottom:1px solid var(--line)}
.panel-bd{padding:20px 22px}
.hint{color:var(--muted);font-size:12px;line-height:1.65}
.muted{color:var(--muted)}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.toolbar.right{justify-content:flex-end}.spacer{flex:1}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.summary-card{padding:16px 18px;border-radius:18px;background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);border:1px solid var(--line)}
.summary-card .label{font-size:12px;color:var(--muted);margin-bottom:6px}
.summary-card .value{font-size:28px;font-weight:900;letter-spacing:-.8px}
.summary-card .sub{font-size:12px;color:var(--muted);margin-top:4px}
.category-pills{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.pill{border:1px solid var(--line);background:#fff;color:#334155;padding:10px 14px;border-radius:999px;font-weight:800}
.pill.active{background:#12264b;border-color:#12264b;color:#fff}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(246px,1fr));gap:18px}
.card{background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:var(--shadow-soft);transition:.18s}
.card:hover{transform:translateY(-4px);box-shadow:0 18px 38px rgba(20,39,79,.12)}
.thumb{aspect-ratio:4/5;overflow:hidden;background:#eef4ff;position:relative}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb-badge{position:absolute;left:12px;top:12px;padding:7px 10px;border-radius:999px;background:rgba(18,98,255,.88);color:#fff;font-size:12px;font-weight:800;backdrop-filter:blur(10px)}
.card-body{padding:15px}
.card-title{font-size:16px;font-weight:900;margin-bottom:8px}
.card-desc{font-size:13px;color:var(--muted);line-height:1.65;min-height:42px;margin-bottom:12px}
.tag{display:inline-flex;margin:3px 5px 0 0;padding:4px 8px;border-radius:999px;background:#f4f7fc;border:1px solid #e4eaf6;font-size:12px;color:#42526d}
.empty{padding:34px 18px;text-align:center;color:var(--muted);background:#fbfcff;border:1px dashed var(--line);border-radius:18px}
.empty strong{display:block;color:#334155;margin-bottom:6px}
.login-wrap{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:22px;align-items:stretch;margin-top:8px}
.login-showcase{
  border-radius:30px;background:linear-gradient(135deg,#1044b6 0%,#1262ff 52%,#2b8cff 100%);color:#fff;box-shadow:var(--shadow);position:relative;overflow:hidden;padding:34px;min-height:520px;
}
.login-showcase h1{margin:18px 0 12px;font-size:40px;line-height:1.1}
.login-showcase p{margin:0;color:rgba(255,255,255,.86);line-height:1.85;max-width:620px}
.login-mascot{position:absolute;right:10px;bottom:0;width:min(44%,360px);filter:drop-shadow(0 16px 26px rgba(0,0,0,.18))}
.login-card{background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:26px;align-self:center}
.login-card h2{margin:6px 0 10px}
.form-row{display:grid;gap:8px;margin-bottom:14px}
.form-row label{font-size:13px;font-weight:800;color:#334155}
.kv-grid{display:grid;gap:10px}
.grid{display:grid;gap:16px}
.grid.two{grid-template-columns:repeat(2,1fr)}
.grid.three{grid-template-columns:repeat(3,1fr)}
.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table th{font-size:12px;color:var(--muted);text-align:left;padding:0 10px}
.table td{background:#fff;padding:13px 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:top}
.table td:first-child{border-left:1px solid var(--line);border-radius:14px 0 0 14px}
.table td:last-child{border-right:1px solid var(--line);border-radius:0 14px 14px 0}
.danger-text{color:var(--danger)}
.success-text{color:var(--success)}
.control-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:#fff}
.control-card.active{border-color:#7aa4ff;box-shadow:0 0 0 4px rgba(18,98,255,.08)}
.control-card h4{margin:0 0 12px;display:flex;align-items:center;gap:8px;font-size:15px}
.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#edf3ff;color:var(--blue-deep);font-size:12px;font-weight:800}
.designer-layout{display:grid;grid-template-columns:minmax(0,1.3fr) 420px;gap:18px;align-items:start}
.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:18px;align-items:start}
.side-stack{display:grid;gap:14px;align-content:start}
.side-stack.sticky{position:sticky;top:92px}
.canvas-card{display:grid;gap:14px}
.canvas-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between}
.canvas-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.canvas-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.zoom-tag{padding:8px 12px;border-radius:999px;background:#eff5ff;border:1px solid #d7e5ff;color:#355;font-size:12px;font-weight:800}
.canvas-wrap{
  background:linear-gradient(180deg,#f9fbff 0%,#f2f6ff 100%);
  border:1px dashed #c7d5ed;border-radius:22px;overflow:auto;min-height:720px;padding:18px;position:relative;
}
.canvas-stage{display:inline-block;position:relative;min-width:100%;min-height:100%}
.canvas-wrap canvas{
  display:block;background:#fff;border-radius:16px;box-shadow:0 18px 40px rgba(16,33,69,.16);
}
.editor-canvas-wrap{min-height:760px}
.area-list{display:grid;gap:10px;max-height:310px;overflow:auto}
.area-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:#fff}
.area-item.active{border-color:#6e95ff;background:#f5f8ff}
.area-meta{font-size:12px;color:var(--muted);margin-top:4px}
.helper-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:#fbfcff;border:1px solid var(--line)}
.helper-row img{width:58px;height:58px;object-fit:contain;flex:none}
.template-preview-mini{width:100%;border-radius:14px;border:1px solid var(--line);background:#f7faff;overflow:hidden}
.template-preview-mini img{width:100%;aspect-ratio:5/3;object-fit:cover}
.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#111827;color:#fff;padding:12px 16px;border-radius:14px;box-shadow:0 18px 40px rgba(0,0,0,.22);z-index:100;opacity:0;pointer-events:none;transition:.2s}
.toast.show{opacity:1;bottom:34px}
.modal-mask{position:fixed;inset:0;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.45);z-index:99}
.modal{width:min(580px,100%);background:#fff;padding:24px;border-radius:26px;box-shadow:var(--shadow)}
.modal h3{margin:0 0 10px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.notice{
  display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:18px;background:#fffbdd;border:1px solid #f0e2a0;color:#5b4e00;
}
.notice b{display:block;margin-bottom:4px}

@media(max-width:1180px){
  .hero,.login-wrap,.designer-layout,.editor-layout{grid-template-columns:1fr}
  .side-stack.sticky{position:static}
  .hero-mascot{position:relative;right:auto;bottom:auto;margin:26px auto 0;width:min(72%,320px)}
  .login-mascot{position:relative;right:auto;bottom:auto;margin:26px auto 0;width:min(72%,320px)}
  .summary-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:860px){
  .topbar{padding:14px 16px;flex-direction:column;align-items:flex-start}
  .nav{width:100%}
  .nav button{flex:1}
  .container{padding:16px}
  .hero-title{font-size:32px}
  .cards{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
  .summary-grid{grid-template-columns:1fr 1fr}
  .grid.two,.grid.three,.stat-grid,.ip-mini{grid-template-columns:1fr}
  .canvas-wrap{min-height:560px;padding:12px}
  .editor-canvas-wrap{min-height:520px}
}
@media(max-width:560px){
  .hero-brand,.login-showcase{padding:24px}
  .hero-title,.login-showcase h1{font-size:26px}
  .panel-hd,.panel-bd{padding-left:16px;padding-right:16px}
  .toolbar button{flex:1}
  .toolbar .spacer{display:none}
  .summary-grid{grid-template-columns:1fr}
  .canvas-toolbar{align-items:flex-start;flex-direction:column}
  .canvas-tools,.canvas-meta{width:100%}
  .canvas-tools button{flex:1}
}

/* v3 商用版增强 */
body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(rgba(18,98,255,.035) 1px, transparent 1px),linear-gradient(90deg, rgba(18,98,255,.035) 1px, transparent 1px);
  background-size:34px 34px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.8), transparent 72%);
  z-index:-1;
}
.topbar{box-shadow:0 12px 32px rgba(18,48,92,.06)}
.logo-title{background:linear-gradient(90deg,#10264f,#1262ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-brand{border:1px solid rgba(255,255,255,.22)}
.hero-title{max-width:760px}.hero-desc{max-width:740px}
.hero-bullets span{box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.panel,.side-card,.summary-card,.card{backdrop-filter:blur(12px)}
.summary-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.template-filter{display:grid;gap:14px;margin-bottom:18px}
.search-box{
  width:100%;display:flex;align-items:center;gap:10px;padding:10px;background:#f7faff;border:1px solid var(--line);border-radius:20px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.search-box span{width:34px;height:34px;border-radius:12px;background:#fff;display:grid;place-items:center;color:var(--blue-deep);font-size:20px;font-weight:900;border:1px solid var(--line)}
.search-box input{border:none;background:transparent;box-shadow:none;padding:9px 4px;min-width:0}
.search-box input:focus{box-shadow:none;border:none}
.admin-search{margin-bottom:16px}
.card{position:relative}.card:after{content:"";position:absolute;inset:0;border-radius:22px;pointer-events:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.work-card .thumb{aspect-ratio:1/1.15}.works-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.canvas-wrap{background-color:#f5f8ff;background-image:radial-gradient(circle at 1px 1px, rgba(18,98,255,.14) 1px, transparent 0);background-size:22px 22px}
.canvas-toolbar{position:sticky;top:0;z-index:2;background:rgba(255,255,255,.9);backdrop-filter:blur(12px);border-radius:18px;padding:8px}
.area-list::-webkit-scrollbar,.canvas-wrap::-webkit-scrollbar{height:10px;width:10px}
.area-list::-webkit-scrollbar-thumb,.canvas-wrap::-webkit-scrollbar-thumb{background:#cbd8ee;border-radius:999px}
.area-list::-webkit-scrollbar-track,.canvas-wrap::-webkit-scrollbar-track{background:#edf3ff;border-radius:999px}
.modal-large{width:min(1280px,96vw);max-height:92vh;overflow:auto;padding:0}
.modal-titlebar{position:sticky;top:0;z-index:4;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid var(--line)}
.modal-titlebar h3{margin:0 0 6px}
.test-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;padding:20px 24px 24px}.test-canvas-wrap{min-height:680px}.test-canvas-wrap canvas{max-width:100%;height:auto}
.notice{box-shadow:inset 0 1px 0 rgba(255,255,255,.72)}
button.yellow:hover{box-shadow:0 14px 30px rgba(226,196,72,.28)}
button.primary:hover{box-shadow:0 16px 34px rgba(18,98,255,.28)}
.table tbody tr{transition:.16s}.table tbody tr:hover td{background:#f8fbff}
@media(max-width:980px){.test-layout{grid-template-columns:1fr}.modal-large{width:96vw}.search-box{flex-wrap:wrap}.search-box input{flex:1 1 240px}.search-box button{flex:0 0 auto}}
@media(max-width:560px){.search-box{align-items:stretch}.search-box span{display:none}.search-box input,.search-box button{width:100%;flex:1 1 100%}.test-layout{padding:14px}.modal-titlebar{padding:16px}.works-grid{grid-template-columns:1fr}}

/* v4 首页丰富 + 权限样式 + 操作界面优化 */
.commercial-home{display:grid;grid-template-columns:1.35fr repeat(3,1fr);gap:16px;margin:0 0 24px}
.feature-tile{position:relative;overflow:hidden;min-height:172px;padding:22px;border-radius:24px;background:rgba(255,255,255,.88);border:1px solid rgba(219,229,245,.95);box-shadow:var(--shadow-soft)}
.feature-tile h3{margin:10px 0 8px;font-size:19px;letter-spacing:-.4px}.feature-tile p{margin:0;color:var(--muted);line-height:1.7;font-size:13px}
.feature-primary{background:linear-gradient(135deg,#10264f 0%,#1262ff 70%);color:#fff;border-color:rgba(255,255,255,.22)}
.feature-primary:after{content:"";position:absolute;right:-42px;bottom:-56px;width:180px;height:180px;border-radius:50%;background:rgba(246,239,173,.18)}
.feature-primary p{color:rgba(255,255,255,.78)}.tile-kicker{font-size:12px;font-weight:900;color:#fff;background:rgba(255,255,255,.14);display:inline-flex;padding:7px 10px;border-radius:999px}.tile-icon{width:42px;height:42px;border-radius:16px;background:#edf3ff;color:#1262ff;display:grid;place-items:center;font-weight:900;font-size:17px;border:1px solid #dbe7ff}
.workflow-section{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px;align-items:stretch;margin:0 0 24px}
.workflow-copy{border-radius:26px;padding:26px;background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%);border:1px solid var(--line);box-shadow:var(--shadow-soft)}
.workflow-copy h2{font-size:30px;line-height:1.18;letter-spacing:-.9px;margin:14px 0 10px}.workflow-copy p{margin:0;color:var(--muted);line-height:1.8}.hero-tag.dark{background:#edf3ff;border-color:#dbe7ff;color:#0d43b8}
.workflow-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.workflow-list div{padding:18px;border-radius:22px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-soft)}.workflow-list b{display:block;margin-bottom:8px;font-size:16px}.workflow-list span{font-size:13px;color:var(--muted);line-height:1.65}
.permission-grid{display:grid;grid-template-columns:1fr;gap:10px;margin:12px 0}.permission-card{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fbfcff;cursor:pointer}.permission-card input{width:auto;margin-top:3px}.permission-card b{display:block;font-size:13px}.permission-card em{display:block;font-style:normal;color:var(--muted);font-size:12px;margin-top:4px}
.user-style-row{display:grid;grid-template-columns:1fr 90px;gap:12px;align-items:end}.user-style-row .form-row{margin-bottom:0}.user-style-row input[type="color"]{height:46px;padding:6px}
.editor-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}.editor-zoom-tools{justify-content:flex-end;background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:18px;padding:10px;box-shadow:var(--shadow-soft)}
.panel-hd{background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(248,251,255,.95))}.control-card{transition:.18s}.control-card:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(18,48,92,.08)}
.side-stack .panel{border-radius:22px}.canvas-card>.panel{border-radius:22px}.canvas-wrap canvas{transition:width .18s ease,height .18s ease}.thumb:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 50%,rgba(7,22,54,.28));z-index:1;pointer-events:none}.thumb-badge{z-index:2}
@media(max-width:1180px){.commercial-home,.workflow-section{grid-template-columns:1fr 1fr}.feature-primary{grid-column:1/-1}.editor-topbar{grid-template-columns:1fr}.editor-zoom-tools{justify-content:flex-start}}
@media(max-width:720px){.commercial-home,.workflow-section,.workflow-list{grid-template-columns:1fr}.feature-tile{min-height:auto}.workflow-copy h2{font-size:24px}.user-style-row{grid-template-columns:1fr}.editor-zoom-tools button{flex:1}.editor-zoom-tools .zoom-tag{flex:1;text-align:center}.commercial-home{margin-bottom:16px}.workflow-section{margin-bottom:16px}}

/* V5 可画风首页与高级交互增强 */
:root{
  --pro-blue:#075dff;
  --pro-blue-2:#00a3ff;
  --pro-ink:#07152f;
  --pro-cream:#fff4b0;
  --glass:rgba(255,255,255,.68);
}
button,.card,.pill,.area-item,.control-card{position:relative;overflow:hidden;will-change:transform}
.click-pop{animation:clickPop .24s cubic-bezier(.2,.9,.3,1)}
@keyframes clickPop{0%{transform:scale(1)}45%{transform:scale(.975)}100%{transform:scale(1)}}
.ripple{position:absolute;width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.55);transform:translate(-50%,-50%) scale(0);pointer-events:none;animation:rippleSpread .62s ease-out;z-index:3}
.card .ripple,.pill .ripple,.area-item .ripple,.control-card .ripple{background:rgba(18,98,255,.16)}
@keyframes rippleSpread{to{transform:translate(-50%,-50%) scale(22);opacity:0}}
body{
  background:
    radial-gradient(circle at 8% 4%, rgba(246,239,173,.55), transparent 22%),
    radial-gradient(circle at 84% 2%, rgba(18,98,255,.18), transparent 26%),
    linear-gradient(180deg,#f7fbff 0%,#eef4ff 48%,#f8fbff 100%);
}
.topbar{box-shadow:0 10px 38px rgba(8,34,82,.07)}
.logo-badge{border-radius:18px;background:linear-gradient(135deg,#0768ff,#55b7ff);box-shadow:0 12px 34px rgba(7,104,255,.26)}
.logo-badge img{transform:scale(1.18)}
.nav button{border-radius:999px;padding:10px 17px}.nav button.active{background:linear-gradient(135deg,#07152f,#103f9a)}
.admin-pill{background:linear-gradient(135deg,#fff7bc,#ffe769)!important;border:none!important;color:#4f3f00!important}
.container{width:min(1520px,100%)}
.home-pro{display:grid;gap:18px;margin-bottom:24px}.home-hero-pro{min-height:520px;border-radius:38px;background:linear-gradient(135deg,#07152f 0%,#0a43bd 42%,#0878ff 100%);box-shadow:0 30px 80px rgba(7,40,118,.22);position:relative;overflow:hidden;display:grid;grid-template-columns:1.02fr .98fr;align-items:center;padding:52px}.home-hero-pro:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 76% 24%,rgba(255,244,176,.36),transparent 28%),radial-gradient(circle at 18% 88%,rgba(255,255,255,.12),transparent 34%);pointer-events:none}.home-hero-pro:after{content:"";position:absolute;right:-160px;bottom:-160px;width:460px;height:460px;border-radius:50%;border:1px solid rgba(255,255,255,.18);box-shadow:0 0 0 70px rgba(255,255,255,.035),0 0 0 145px rgba(255,255,255,.025)}
.home-copy-pro{position:relative;z-index:2;color:white}.brand-mini{display:inline-flex;align-items:center;gap:9px;padding:9px 13px;border-radius:999px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.18);font-weight:900;font-size:12px;letter-spacing:.3px}.brand-mini.dark{background:#eef5ff;border-color:#dce9ff;color:#17428c}.dot{width:8px;height:8px;border-radius:50%;background:#fff4b0;box-shadow:0 0 0 6px rgba(255,244,176,.18)}.brand-mini.dark .dot{background:#1262ff;box-shadow:0 0 0 6px rgba(18,98,255,.12)}
.home-copy-pro h1{font-size:58px;line-height:1.04;letter-spacing:-2.6px;margin:22px 0 28px;max-width:760px}.home-copy-pro h1 em{font-style:normal;color:var(--pro-cream);text-shadow:0 10px 34px rgba(246,239,173,.25)}.home-actions-pro{display:flex;gap:12px;flex-wrap:wrap}.big{font-size:15px;padding:15px 22px!important}.glass-btn{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.26);color:#fff;backdrop-filter:blur(12px)}
.mascot-stage-pro{position:relative;height:440px;z-index:2}.glow-card{position:absolute;border-radius:34px;background:linear-gradient(180deg,rgba(255,255,255,.48),rgba(255,255,255,.12));border:1px solid rgba(255,255,255,.32);box-shadow:0 28px 60px rgba(0,0,0,.18);backdrop-filter:blur(14px);display:grid;place-items:center;animation:floatY 5.5s ease-in-out infinite}.glow-card img{object-fit:contain;filter:drop-shadow(0 18px 20px rgba(0,0,0,.18))}.glow-card.card-a{right:90px;bottom:12px;width:360px;height:420px}.glow-card.card-a img{width:360px}.glow-card.card-b{left:10px;top:18px;width:220px;height:260px;animation-delay:.8s}.glow-card.card-b img{width:240px}.glow-card.card-c{right:0;top:0;width:190px;height:230px;animation-delay:1.4s}.glow-card.card-c img{width:210px}@keyframes floatY{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
.floating-pill{position:absolute;z-index:3;padding:11px 15px;border-radius:999px;background:rgba(255,255,255,.88);box-shadow:0 16px 34px rgba(7,21,47,.18);font-weight:900;color:#12326e}.floating-pill.p1{left:72px;bottom:88px}.floating-pill.p2{right:70px;top:120px}.floating-pill.p3{left:210px;top:32px;background:#fff3a4}.home-showcase-row{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.1fr;gap:14px}.showcase-card{min-height:116px;border-radius:28px;background:rgba(255,255,255,.78);border:1px solid rgba(219,229,245,.9);box-shadow:0 18px 42px rgba(20,39,79,.08);padding:18px;display:flex;align-items:center;gap:14px;overflow:hidden}.showcase-card img{width:92px;height:92px;object-fit:contain;filter:drop-shadow(0 10px 14px rgba(18,98,255,.15))}.showcase-card span{display:block;font-size:12px;color:#64748b;font-weight:800;margin-bottom:6px}.showcase-card b{font-size:20px;letter-spacing:-.5px}.dark-card{background:linear-gradient(135deg,#07152f,#103f9a);color:#fff}.dark-card span{color:rgba(255,255,255,.72)}.accent-card{background:linear-gradient(135deg,#fff8bf,#f6df63);color:#3d3100}
.template-studio{border-radius:36px;background:rgba(255,255,255,.78);border:1px solid rgba(219,229,245,.9);box-shadow:0 26px 70px rgba(18,51,102,.10);padding:24px;margin-bottom:28px;backdrop-filter:blur(18px)}.studio-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.studio-head h2{font-size:34px;letter-spacing:-1.1px;margin:12px 0 0}.studio-mascots{display:flex;align-items:flex-end}.studio-mascots img{width:86px;height:86px;object-fit:contain;margin-left:-22px;border-radius:50%;background:#fff;box-shadow:0 12px 28px rgba(20,39,79,.12);padding:3px}.studio-toolbar{display:grid;gap:12px;margin-bottom:18px}.premium-search{padding:9px;background:#f4f8ff;border-radius:22px;border:1px solid #dfeaff}.premium-search input{background:transparent;border:0;box-shadow:none!important;font-size:15px}.premium-pills{margin:0}.premium-pills .pill{background:#fff;border-color:#e5edf9}.premium-pills .pill.active{background:#07152f;color:#fff;box-shadow:0 12px 30px rgba(7,21,47,.18)}.studio-content{display:grid;grid-template-columns:310px minmax(0,1fr);gap:18px}.template-preview-pro{position:relative;overflow:hidden;border-radius:28px;background:linear-gradient(180deg,#07152f,#0a43bd);padding:18px;min-height:440px;color:#fff;box-shadow:0 20px 50px rgba(7,21,47,.16)}.template-preview-pro:before{content:"";position:absolute;right:-90px;bottom:-90px;width:240px;height:240px;border-radius:50%;background:rgba(255,244,176,.22)}.template-preview-pro>img{position:relative;z-index:1;width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:22px;box-shadow:0 18px 34px rgba(0,0,0,.24)}.template-preview-pro h3{position:relative;z-index:1;margin:14px 0;font-size:20px}.template-preview-pro button{position:relative;z-index:2;width:100%}.preview-topline{position:relative;z-index:1;font-size:12px;font-weight:900;color:#fff3a6;margin-bottom:10px}.preview-mascot{position:absolute;right:-26px;bottom:-16px;width:170px;opacity:.9;z-index:0}.preview-mascot img{width:100%}.premium-cards{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.premium-template-card{border-radius:28px;cursor:pointer;border:1px solid rgba(221,231,247,.95);box-shadow:0 14px 34px rgba(20,39,79,.08);background:rgba(255,255,255,.92)}.premium-template-card .thumb{border-radius:24px;margin:10px;aspect-ratio:4/5}.premium-template-card .thumb img{transition:.35s ease}.premium-template-card:hover .thumb img{transform:scale(1.06)}.premium-template-card:hover{transform:translateY(-7px);box-shadow:0 24px 54px rgba(10,43,112,.16);border-color:#b9d0ff}.card-hover-mask{position:absolute;inset:0;display:grid;place-items:center;background:linear-gradient(180deg,transparent,rgba(7,21,47,.58));opacity:0;transition:.25s}.card-hover-mask span{padding:10px 15px;border-radius:999px;background:#fff;color:#07152f;font-weight:900;box-shadow:0 12px 28px rgba(0,0,0,.18)}.premium-template-card:hover .card-hover-mask{opacity:1}.card-meta-row{display:flex;justify-content:space-between;gap:8px;color:#64748b;font-size:12px;font-weight:700;margin:-2px 0 9px}.wide-empty{grid-column:1/-1}.thumb-badge{background:rgba(7,21,47,.74);box-shadow:0 12px 26px rgba(0,0,0,.14)}
.panel,.login-card,.side-card,.summary-card,.control-card,.area-item{border-color:rgba(221,231,247,.92);box-shadow:0 16px 42px rgba(17,46,92,.07)}.canvas-wrap{background:linear-gradient(135deg,#f6f9ff,#edf4ff);border-style:solid}.canvas-toolbar,.studio-toolbar,.panel-hd{background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.42))}.control-card:hover,.area-item:hover{border-color:#b7ccff;box-shadow:0 14px 32px rgba(18,98,255,.08);transform:translateY(-1px)}
@media(max-width:1180px){.home-hero-pro{grid-template-columns:1fr;padding:38px}.mascot-stage-pro{height:430px}.home-copy-pro h1{font-size:46px}.home-showcase-row,.studio-content{grid-template-columns:1fr 1fr}.template-preview-pro{grid-column:1/-1}.glow-card.card-a{right:10%;}.glow-card.card-b{left:6%}.glow-card.card-c{right:5%}}
@media(max-width:760px){.home-hero-pro{padding:26px;border-radius:28px}.home-copy-pro h1{font-size:32px;letter-spacing:-1.2px}.home-showcase-row,.studio-content{grid-template-columns:1fr}.mascot-stage-pro{height:330px}.glow-card.card-a{width:245px;height:300px;right:0}.glow-card.card-a img{width:250px}.glow-card.card-b{width:150px;height:170px}.glow-card.card-b img{width:165px}.glow-card.card-c{width:135px;height:155px}.glow-card.card-c img{width:145px}.floating-pill{font-size:12px}.studio-head{align-items:flex-start;flex-direction:column}.studio-head h2{font-size:26px}.studio-mascots img{width:66px;height:66px}.premium-search{display:grid;grid-template-columns:auto 1fr;gap:8px}.premium-search button{grid-column:span 2}.premium-cards{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}}


/* V7 文案视觉升级 */
.home-copy-pro h1 .hero-line-main{
  display:inline-block;
  letter-spacing:-1.8px;
}
.home-copy-pro h1 .hero-companion{
  display:inline-block;
  margin-top:10px;
  font-family:"ZCOOL XiaoWei","Noto Serif SC",serif;
  font-size:1.24em;
  letter-spacing:.04em;
  color:#fff8bd;
  background:linear-gradient(90deg,#fff6b0 0%,#ffffff 42%,#f7de6d 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  text-shadow:none;
  filter:drop-shadow(0 16px 30px rgba(246,239,173,.28));
}
.apple-gradient-card{
  position:relative;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(248,251,255,.78))!important;
  color:#11264a;
}
.apple-gradient-card:before{
  content:"";
  position:absolute;
  inset:-80px -60px auto auto;
  width:180px;
  height:180px;
  border-radius:50%;
  background:radial-gradient(circle,#7dd3fc 0%,rgba(96,165,250,.42) 36%,transparent 68%);
  opacity:.75;
}
.apple-gradient-card .team-slogan{
  position:relative;
  z-index:1;
  display:grid;
  gap:7px;
  font-size:19px;
  line-height:1.18;
  letter-spacing:-.4px;
}
.apple-gradient-card .team-slogan strong,
.apple-gradient-card .team-slogan i{
  position:relative;
  display:inline-block;
  width:max-content;
  max-width:100%;
  font-style:normal;
  z-index:1;
}
.apple-gradient-card .team-slogan i{
  font-family:"Noto Serif SC","ZCOOL XiaoWei",serif;
  font-weight:900;
  color:#081b3d;
  padding:2px 7px 5px;
}
.apple-gradient-card .team-slogan i:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:52%;
  border-radius:999px;
  z-index:-1;
  background:
    linear-gradient(90deg,
      #5ac8fa 0%,
      #34c759 22%,
      #ffcc00 45%,
      #ff9500 64%,
      #ff2d55 82%,
      #af52de 100%);
  opacity:.72;
  filter:saturate(1.12) blur(.1px);
  box-shadow:0 10px 24px rgba(90,200,250,.22),0 8px 22px rgba(175,82,222,.16);
}
@media(max-width:860px){
  .home-copy-pro h1 .hero-companion{font-size:1.16em}
  .apple-gradient-card .team-slogan{font-size:17px}
}


/* V8 文案再优化：删除“只为”，放大团队文案，强化“多一点陪伴”字体 */
.home-copy-pro h1 .hero-companion{
  font-family:"Ma Shan Zheng","ZCOOL XiaoWei","Noto Serif SC",serif;
  font-size:1.46em;
  letter-spacing:.08em;
  line-height:1.02;
  margin-top:14px;
  background:linear-gradient(92deg,#fff9bf 0%,#ffffff 36%,#ffe36a 68%,#fff6c8 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 18px 34px rgba(255,236,128,.32));
}
.apple-gradient-card{
  min-height:136px;
  align-items:center;
  justify-content:center;
  padding:22px 20px;
}
.apple-gradient-card .team-slogan{
  font-size:26px;
  line-height:1.12;
  gap:12px;
  width:100%;
  text-align:left;
  letter-spacing:-.7px;
}
.apple-gradient-card .team-slogan strong{
  font-weight:950;
  color:#061a3d;
}
.apple-gradient-card .team-slogan i{
  font-family:"Noto Serif SC","ZCOOL XiaoWei",serif;
  font-size:1.03em;
  font-weight:950;
  padding:4px 10px 8px;
  letter-spacing:-.2px;
}
.apple-gradient-card .team-slogan i:after{
  height:58%;
  opacity:.8;
  background:linear-gradient(90deg,#64d2ff 0%,#30d158 21%,#ffd60a 43%,#ff9f0a 62%,#ff375f 81%,#bf5af2 100%);
}
@media(max-width:1180px){
  .apple-gradient-card .team-slogan{font-size:24px}
}
@media(max-width:860px){
  .home-copy-pro h1 .hero-companion{font-size:1.28em;letter-spacing:.04em}
  .apple-gradient-card .team-slogan{font-size:21px}
}


/* V9：团队口号居中对齐 */
.apple-gradient-card{
  justify-content:center;
  text-align:center;
}
.apple-gradient-card .team-slogan{
  width:100%;
  justify-items:center;
  text-align:center;
}
.apple-gradient-card .team-slogan strong,
.apple-gradient-card .team-slogan i{
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}








/* ================================
   HTL Simple Editor V12
   清爽版编辑器：左侧固定预览，右侧独立滚动
================================ */

@media (min-width: 981px){
  /* 编辑页外框给稳定高度，避免右侧滑不动 */
  #page > .panel:has(.editor-layout),
  #page > .panel:has(.designer-layout){
    height: calc(100vh - 125px) !important;
    max-height: calc(100vh - 125px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #page > .panel:has(.editor-layout) > .panel-hd,
  #page > .panel:has(.designer-layout) > .panel-hd{
    flex: 0 0 auto !important;
  }

  #page > .panel:has(.editor-layout) > .panel-bd,
  #page > .panel:has(.designer-layout) > .panel-bd{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .editor-layout,
  .designer-layout{
    display: grid !important;
    grid-template-columns: minmax(0, 3fr) minmax(370px, 1fr) !important;
    gap: 22px !important;
    align-items: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .editor-layout > .canvas-card,
  .designer-layout > .canvas-card{
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .editor-layout .editor-topbar,
  .designer-layout .canvas-card > .panel{
    flex: 0 0 auto !important;
    margin-bottom: 12px !important;
  }

  .editor-layout .canvas-wrap,
  .designer-layout .canvas-wrap{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 28px !important;
    border-radius: 22px !important;
    background: #f5f8ff !important;
  }

  .editor-layout .canvas-stage,
  .designer-layout .canvas-stage{
    margin: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .editor-layout canvas,
  .designer-layout canvas{
    display: block !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(7,18,42,.14) !important;
  }

  /* 关键：右侧编辑栏必须能单独滑动 */
  .editor-layout > .side-stack,
  .designer-layout > .side-stack{
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
    padding: 0 10px 60px 0 !important;
    position: relative !important;
    top: auto !important;
    overscroll-behavior: contain !important;
    scroll-behavior: auto !important;
  }

  .editor-layout > .side-stack.sticky,
  .designer-layout > .side-stack.sticky{
    position: relative !important;
    top: auto !important;
  }

  .editor-layout > .side-stack > .panel,
  .designer-layout > .side-stack > .panel{
    margin-bottom: 14px !important;
  }
}

.simple-guide{
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg,#f8fbff,#ffffff);
  border: 1px solid #dbe5f5;
  color: #10233f;
}
.simple-guide b{display:block;font-size:15px;margin-bottom:4px}
.simple-guide span{display:block;font-size:12px;line-height:1.6;color:#64748b}
.simple-edit-card{padding:16px !important;border-radius:20px !important}
.simple-edit-card h4{margin-bottom:14px !important}
.simple-step{margin-bottom:15px;padding:12px;border-radius:16px;background:#fbfcff;border:1px solid #e2ebfa}
.simple-step-title{font-size:13px;font-weight:900;color:#10233f;margin-bottom:9px}
.size-row{display:grid;grid-template-columns:86px minmax(0,1fr);gap:10px;align-items:center}
.size-num{padding-left:10px !important;padding-right:10px !important;text-align:center;font-weight:900}
.size-range{padding-left:0 !important;padding-right:0 !important}
.color-input-big{height:46px !important;padding:6px !important}
.color-palette{display:grid !important;grid-template-columns:repeat(7,1fr) !important;gap:8px !important;margin-top:10px !important}
.color-dot{width:30px !important;height:30px !important;border-radius:999px !important;border:2px solid #fff !important;box-shadow:0 0 0 1px rgba(15,23,42,.15),0 4px 12px rgba(15,23,42,.08) !important;padding:0 !important}
.color-dot.active{box-shadow:0 0 0 3px rgba(18,98,255,.35),0 4px 12px rgba(15,23,42,.16) !important;transform:scale(1.08)}
.advanced-box{margin-top:10px;border-radius:16px;border:1px solid #e2ebfa;background:#fff;overflow:hidden}
.advanced-box summary{cursor:pointer;padding:12px 13px;font-weight:900;color:#10233f;background:#f8fbff}
.advanced-box .grid{padding:12px 12px 0}.advanced-box .area-item{margin:12px}
.advanced-buttons{padding-bottom:0 !important}
.admin-simple-card{box-shadow:none !important}
.big-permission-title{margin:18px 0 10px !important;font-size:16px !important}
.simple-permission-grid{display:grid !important;grid-template-columns:1fr !important;gap:10px !important}
.simple-permission-grid .permission-card{border-radius:16px !important}
.editor-layout .control-card .hint,.editor-layout .notice{display:none !important}
.side-stack::-webkit-scrollbar,.canvas-wrap::-webkit-scrollbar{width:10px;height:10px}.side-stack::-webkit-scrollbar-thumb,.canvas-wrap::-webkit-scrollbar-thumb{background:#cbd8ee;border-radius:999px}.side-stack::-webkit-scrollbar-track,.canvas-wrap::-webkit-scrollbar-track{background:#edf3ff;border-radius:999px}
@media(max-width:980px){
  .editor-layout,.designer-layout{grid-template-columns:1fr !important;height:auto !important;max-height:none !important;overflow:visible !important}
  .editor-layout>.side-stack,.designer-layout>.side-stack{height:auto !important;max-height:none !important;overflow:visible !important;padding-right:0 !important}
  .editor-layout .canvas-wrap,.designer-layout .canvas-wrap{height:58vh !important;max-height:58vh !important;padding:14px !important}
  .size-row{grid-template-columns:1fr}.color-palette{grid-template-columns:repeat(6,1fr) !important}
}
/* ================================
   HTL Simple Editor V12 END
================================ */

/* ================================
   HTL Simple Editor V14
   管理员右侧独立滚动 + 分类下拉 + 高级弹窗
================================ */

@media (min-width: 981px){
  /* 管理员编辑模板时，隐藏后台顶部统计和二级导航，给工作台腾空间 */
  body:has(.designer-layout) .summary-grid{
    display:none !important;
  }
  body:has(.designer-layout) #page > .panel:not(:has(.designer-layout)){
    display:none !important;
  }
  body:has(.designer-layout) #adminPage{
    height:calc(100vh - 116px) !important;
    max-height:calc(100vh - 116px) !important;
    overflow:hidden !important;
  }
  body:has(.designer-layout) #adminPage > .panel:has(.designer-layout){
    height:100% !important;
    max-height:100% !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
  }
  body:has(.designer-layout) #adminPage > .panel:has(.designer-layout) > .panel-hd{
    flex:0 0 auto !important;
  }
  body:has(.designer-layout) #adminPage > .panel:has(.designer-layout) > .panel-bd{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  body:has(.designer-layout) .designer-layout{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow:hidden !important;
    align-items:stretch !important;
  }
  body:has(.designer-layout) .designer-layout > .canvas-card{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
  }
  body:has(.designer-layout) .designer-layout .canvas-wrap{
    flex:1 1 auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:auto !important;
  }
  body:has(.designer-layout) .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack.sticky{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    display:block !important;
    position:relative !important;
    top:auto !important;
    padding:0 10px 80px 0 !important;
    overscroll-behavior:contain !important;
    scroll-behavior:auto !important;
  }
}

/* 分类改成下拉选择，减少占位 */
.cat-picker{
  position:relative;
  width:100%;
}
.cat-picker summary{
  list-style:none;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:#10233f;
  font-weight:900;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.cat-picker summary::-webkit-details-marker{display:none}
.cat-picker summary:after{
  content:'⌄';
  color:#1262ff;
  font-size:16px;
  font-weight:1000;
}
.cat-picker[open] summary{
  border-color:#90b4ff;
  box-shadow:0 0 0 4px rgba(18,98,255,.10);
}
.cat-picker-menu{
  margin-top:8px;
  padding:10px;
  border-radius:16px;
  background:#fff;
  border:1px solid #dbe5f5;
  box-shadow:0 18px 40px rgba(16,33,69,.12);
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  max-height:230px;
  overflow:auto;
}
.cat-choice{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:13px;
  border:1px solid #e2ebfa;
  background:#f8fbff;
  color:#334155;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}
.cat-choice input{width:auto !important; flex:none; accent-color:#1262ff;}
.cat-choice.active{
  border-color:#1262ff;
  background:#eef4ff;
  color:#0d43b8;
}
.cat-picker-hint{margin-top:8px;}

/* 所有弹窗统一高级一点 */
.nice-modal-mask{
  background:rgba(10,22,48,.48) !important;
  backdrop-filter:blur(10px) !important;
  z-index:999 !important;
}
.nice-modal{
  position:relative;
  width:min(460px,92vw) !important;
  padding:30px 28px 24px !important;
  border-radius:30px !important;
  border:1px solid rgba(255,255,255,.72) !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  box-shadow:0 30px 80px rgba(8,24,56,.24) !important;
  text-align:center !important;
  animation:niceModalIn .18s ease-out both;
}
@keyframes niceModalIn{
  from{opacity:0;transform:translateY(10px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.nice-modal-close{
  position:absolute;
  right:14px;
  top:12px;
  width:34px;
  height:34px;
  padding:0 !important;
  border-radius:999px !important;
  background:#eef4ff !important;
  color:#334155 !important;
  border:1px solid #dbe5f5 !important;
  font-size:22px;
  line-height:1;
}
.nice-modal-icon{
  width:62px;
  height:62px;
  border-radius:22px;
  margin:0 auto 16px;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:30px;
  font-weight:1000;
  box-shadow:0 16px 34px rgba(18,98,255,.22);
}
.nice-modal-icon.success{background:linear-gradient(135deg,#12b76a,#36d88b)}
.nice-modal-icon.error{background:linear-gradient(135deg,#d92d20,#ff6b5d)}
.nice-modal-icon.warning{background:linear-gradient(135deg,#f79009,#ffd166)}
.nice-modal-icon.info{background:linear-gradient(135deg,#1262ff,#5f8cff)}
.nice-modal h3{
  margin:0 0 9px !important;
  color:#10233f;
  font-size:22px;
  font-weight:1000;
  letter-spacing:-.4px;
}
.nice-modal-desc{
  margin:0 auto 18px;
  color:#64748b;
  font-size:14px;
  line-height:1.75;
  max-width:360px;
}
.nice-modal-actions{
  margin-top:18px !important;
  display:flex !important;
  justify-content:center !important;
  gap:10px !important;
}
.nice-modal-actions button{
  min-width:120px;
}
.prompt-modal{text-align:left !important;}
.prompt-modal .nice-modal-icon,
.prompt-modal h3{text-align:center !important;}
.prompt-row{margin-top:14px;text-align:left;}
.toast{
  border-radius:999px !important;
  background:rgba(17,24,39,.94) !important;
  backdrop-filter:blur(10px) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.25) !important;
  padding:12px 18px !important;
  z-index:1000 !important;
}

@media(max-width:560px){
  .cat-picker-menu{grid-template-columns:1fr;}
  .nice-modal-actions{flex-direction:column;}
  .nice-modal-actions button{width:100%;}
}

/* ================================
   HTL Simple Editor V14 END
================================ */


/* ================================
   HTL Simple Editor V15
   弹窗提醒、加粗按钮、管理员实时预览拖动
================================ */
.toggle-btn{
  width:100%;
  min-height:42px;
  border-radius:14px !important;
  border:1px solid #dbe5f5 !important;
  background:#fff !important;
  color:#10233f !important;
  font-weight:950 !important;
  margin:10px 0 12px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.toggle-btn.active{
  background:linear-gradient(135deg,#1262ff,#4f8dff) !important;
  color:#fff !important;
  border-color:#1262ff !important;
  box-shadow:0 12px 26px rgba(18,98,255,.24) !important;
}
.toggle-btn.active:before{content:'✓ ';font-weight:1000;}

body:has(.designer-layout) #designerCanvas{cursor:grab;}
body:has(.designer-layout) #designerCanvas:active{cursor:grabbing;}

.nice-modal-mask,
.modal-mask.nice-modal-mask{
  position:fixed !important;
  inset:0 !important;
  display:grid !important;
  place-items:center !important;
  z-index:99999 !important;
}
.nice-modal{transform-origin:center center !important;}

@media(min-width:981px){
  .designer-layout > .side-stack,
  .editor-layout > .side-stack{
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }
}

/* ================================
   HTL Simple Editor V15 END
================================ */


/* ================================
   HTL Simple Editor V16
   反馈弹窗、后台实时预览拖动、去掉导出说明、框内不显示文字/图片
================================ */
.editor-layout .side-stack .panel:has(.notice){
  display:none !important;
}

@media(min-width:981px){
  body:has(.designer-layout) .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack.sticky,
  body:has(.editor-layout) .editor-layout > .side-stack,
  body:has(.editor-layout) .editor-layout > .side-stack.sticky{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-bottom:100px !important;
    overscroll-behavior:contain !important;
  }
}

.htl-super-alert-mask,
.modal-mask.htl-super-alert-mask{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483647 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.toggle-btn.active:before{content:'' !important;}
.toggle-btn{font-size:14px !important;}

body:has(.designer-layout) #designerCanvas{cursor:grab !important;}
body:has(.designer-layout) #designerCanvas:active{cursor:grabbing !important;}
/* ================================
   HTL Simple Editor V16 END
================================ */

/* ================================
   HTL Simple Editor V17
   手机端 / 平板端适配优化
================================ */
html,body{max-width:100%;overflow-x:hidden;}
img,canvas{max-width:100%;}

/* 平板横屏：保留左右工作台，但右侧不要太宽，按钮更紧凑 */
@media (min-width:981px) and (max-width:1180px){
  .container{padding:16px !important;}
  .topbar{padding:12px 16px !important;gap:12px !important;}
  .logo-title{font-size:16px !important;}
  .logo-sub{display:none !important;}
  .nav{gap:8px !important;}
  .nav button{padding:10px 12px !important;border-radius:12px !important;}
  .nav .admin-pill{display:none !important;}

  #page > .panel:has(.editor-layout),
  #page > .panel:has(.designer-layout),
  body:has(.designer-layout) #adminPage{
    height:calc(100svh - 96px) !important;
    max-height:calc(100svh - 96px) !important;
  }

  .editor-layout,
  .designer-layout,
  body:has(.designer-layout) .designer-layout{
    grid-template-columns:minmax(0,1.55fr) minmax(320px,.85fr) !important;
    gap:14px !important;
  }

  .editor-layout .canvas-wrap,
  .designer-layout .canvas-wrap,
  body:has(.designer-layout) .designer-layout .canvas-wrap{
    padding:18px !important;
  }

  .editor-layout > .side-stack,
  .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack.sticky{
    padding-right:6px !important;
    padding-bottom:120px !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .panel-hd{padding:14px 16px !important;}
  .panel-bd{padding:16px !important;}
  .simple-step{padding:11px !important;margin-bottom:12px !important;}
  .toolbar{gap:8px !important;}
  button{padding:10px 12px !important;}
}

/* 平板竖屏：上方预览固定，下方编辑内容正常滑动 */
@media (min-width:761px) and (max-width:980px){
  body:has(.editor-layout),
  body:has(.designer-layout){
    overflow:auto !important;
  }

  .container{padding:14px !important;}
  .topbar{padding:12px 16px !important;}
  .nav{width:100%;display:grid !important;grid-template-columns:repeat(3,1fr);gap:8px !important;}
  .nav button{width:100%;padding:10px 8px !important;}
  .nav .admin-pill{display:none !important;}

  .editor-layout,
  .designer-layout,
  body:has(.designer-layout) .designer-layout{
    display:grid !important;
    grid-template-columns:1fr !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    gap:14px !important;
  }

  .editor-layout > .canvas-card,
  .designer-layout > .canvas-card{
    position:sticky !important;
    top:74px !important;
    z-index:20 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    background:rgba(248,251,255,.96) !important;
    backdrop-filter:blur(14px) !important;
    border-radius:22px !important;
    box-shadow:0 14px 34px rgba(7,18,42,.08) !important;
  }

  .editor-layout .editor-topbar,
  .designer-layout .canvas-card > .panel{
    margin-bottom:8px !important;
  }

  .editor-layout .canvas-wrap,
  .designer-layout .canvas-wrap,
  body:has(.designer-layout) .designer-layout .canvas-wrap{
    height:46svh !important;
    max-height:500px !important;
    min-height:320px !important;
    padding:14px !important;
    overflow:auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .editor-layout > .side-stack,
  .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack.sticky{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding:0 0 90px 0 !important;
    display:grid !important;
    gap:12px !important;
  }

  .side-stack .panel{margin-bottom:0 !important;}
  .panel-hd{padding:14px 16px !important;}
  .panel-bd{padding:16px !important;}
  .simple-edit-card{padding:14px !important;}
  .simple-step{padding:12px !important;margin-bottom:12px !important;}
  .color-palette{grid-template-columns:repeat(8,1fr) !important;}
  .cat-picker-menu{grid-template-columns:repeat(2,1fr) !important;}
}

/* 手机端：预览在上，操作在下，按钮和输入框适合手指点击 */
@media (max-width:760px){
  body{overflow:auto !important;}
  .app-shell{min-height:100svh !important;}
  .topbar{
    position:relative !important;
    top:auto !important;
    z-index:30 !important;
    padding:10px 12px !important;
    gap:10px !important;
  }
  .logo-badge{width:40px !important;height:40px !important;border-radius:13px !important;}
  .logo-title{font-size:15px !important;line-height:1.25 !important;}
  .logo-sub{display:none !important;}
  .nav{width:100%;display:grid !important;grid-template-columns:repeat(3,1fr);gap:7px !important;}
  .nav button{width:100%;padding:9px 6px !important;border-radius:12px !important;font-size:12px !important;}
  .nav .admin-pill{display:none !important;}
  .container{padding:10px !important;}

  .home-hero-pro{padding:22px 18px !important;border-radius:24px !important;}
  .home-copy-pro h1{font-size:28px !important;line-height:1.12 !important;}
  .mascot-stage-pro{height:280px !important;}
  .premium-cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important;}
  .card-title{font-size:14px !important;}
  .card-body{padding:12px !important;}

  .panel{border-radius:18px !important;}
  .panel-hd{padding:12px 14px !important;gap:10px !important;}
  .panel-hd h2{font-size:18px !important;}
  .panel-bd{padding:14px !important;}
  .toolbar{gap:8px !important;}
  .toolbar button{flex:1 1 auto !important;min-width:0 !important;}
  button{min-height:42px !important;padding:10px 12px !important;border-radius:13px !important;}
  input,select,textarea{font-size:16px !important;padding:11px 12px !important;border-radius:13px !important;}

  .editor-layout,
  .designer-layout,
  body:has(.designer-layout) .designer-layout{
    display:grid !important;
    grid-template-columns:1fr !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    gap:12px !important;
  }

  .editor-layout > .canvas-card,
  .designer-layout > .canvas-card{
    position:sticky !important;
    top:0 !important;
    z-index:25 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    background:rgba(248,251,255,.98) !important;
    backdrop-filter:blur(12px) !important;
    border-radius:18px !important;
    padding-bottom:6px !important;
    box-shadow:0 12px 28px rgba(7,18,42,.08) !important;
  }

  .editor-layout .editor-topbar,
  .designer-layout .canvas-card > .panel{
    margin-bottom:8px !important;
  }

  .editor-layout .canvas-toolbar,
  .designer-layout .canvas-toolbar{
    padding:6px !important;
    gap:6px !important;
  }
  .canvas-tools,
  .canvas-meta,
  .editor-zoom-tools{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
    gap:6px !important;
    padding-bottom:2px !important;
  }
  .canvas-tools button,
  .canvas-meta button,
  .editor-zoom-tools button,
  .editor-zoom-tools .zoom-tag{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }

  .editor-layout .canvas-wrap,
  .designer-layout .canvas-wrap,
  body:has(.designer-layout) .designer-layout .canvas-wrap{
    height:42svh !important;
    min-height:260px !important;
    max-height:360px !important;
    padding:10px !important;
    overflow:auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .editor-layout .canvas-stage,
  .designer-layout .canvas-stage{
    margin:auto !important;
    min-width:0 !important;
    min-height:0 !important;
  }

  .editor-layout > .side-stack,
  .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack,
  body:has(.designer-layout) .designer-layout > .side-stack.sticky{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    display:grid !important;
    gap:12px !important;
    padding:0 0 90px 0 !important;
    position:relative !important;
    top:auto !important;
  }

  .side-stack .panel{margin-bottom:0 !important;}
  .simple-guide{padding:11px 12px !important;margin-bottom:12px !important;}
  .simple-guide span{font-size:12px !important;}
  .simple-edit-card{padding:12px !important;border-radius:17px !important;}
  .simple-step{padding:11px !important;margin-bottom:10px !important;border-radius:14px !important;}
  .simple-step-title{font-size:13px !important;}
  .size-row{grid-template-columns:76px minmax(0,1fr) !important;gap:8px !important;}
  .color-palette{grid-template-columns:repeat(6,1fr) !important;gap:8px !important;}
  .color-dot{width:32px !important;height:32px !important;justify-self:center !important;}
  .advanced-box summary{padding:11px 12px !important;}
  .advanced-box .grid{grid-template-columns:1fr !important;padding:10px !important;}
  .toggle-btn{min-height:44px !important;}

  .cat-picker-menu{grid-template-columns:1fr !important;max-height:260px !important;}
  .cat-choice{min-height:42px !important;}

  .nice-modal{width:min(92vw,420px) !important;padding:26px 20px 20px !important;border-radius:24px !important;}
  .nice-modal h3{font-size:20px !important;}
  .nice-modal-desc{font-size:13px !important;}
  .nice-modal-actions{flex-direction:column !important;}
  .nice-modal-actions button{width:100% !important;}
}

/* 超小屏幕：模板卡片一列，避免文字挤压 */
@media (max-width:420px){
  .premium-cards,.cards{grid-template-columns:1fr !important;}
  .home-copy-pro h1{font-size:25px !important;}
  .editor-layout .canvas-wrap,
  .designer-layout .canvas-wrap{height:38svh !important;min-height:230px !important;}
  .color-palette{grid-template-columns:repeat(5,1fr) !important;}
  .size-row{grid-template-columns:1fr !important;}
}

/* ================================
   HTL Simple Editor V17 END
================================ */


/* HTL Cursor + Fullscreen Float Patch START */

/* 后台制作模板时，左侧画布区域鼠标改成箭头，不再显示手型 */
.designer-layout .canvas-wrap,
.designer-layout .canvas-stage,
.designer-layout canvas,
.designer-layout .canvas-card,
.designer-layout .canvas-card * {
  cursor: default !important;
}

/* 如果有拖拽点/缩放点，仍保留十字/尺寸感，可按需删掉 */
.designer-layout .resize-handle,
.designer-layout [class*="handle"] {
  cursor: nwse-resize !important;
}

/* HTL Cursor + Fullscreen Float Patch END */



/* HTL Cursor Undo Patch V18 CSS START */

/* 后台制作模板：画布区域全部强制普通箭头 */
.designer-layout .canvas-card,
.designer-layout .canvas-card *,
.designer-layout .canvas-wrap,
.designer-layout .canvas-stage,
.designer-layout canvas,
#designerCanvas {
  cursor: default !important;
}

/* 右侧表单仍保持正常输入光标 */
.designer-layout input,
.designer-layout textarea,
.designer-layout select {
  cursor: auto !important;
}

/* 按钮保留可点击感 */
.designer-layout button {
  cursor: pointer !important;
}

/* HTL Cursor Undo Patch V18 CSS END */




























/* HTL Front Edit Rescue V25 CSS START */
.htl-admin-guide-mask,
.htl-admin-guide-box{
  display:none !important;
}

#htl-user-controls-v23,
#htl-user-v20-controls,
#htl-image-upload-v21,
#htl-image-upload-v22{
  display:none !important;
}

.htl-v25-card{
  display:block !important;
}

.htl-permission-v25{
  margin:0 0 16px;
  padding:14px;
  border-radius:18px;
  background:#f7faff;
  border:1px solid #dbe7ff;
  display:grid;
  gap:10px;
}

.htl-permission-v25-title{
  font-size:14px;
  font-weight:900;
  color:#10233f;
}

.htl-permission-v25 label{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid #e2ecff;
  font-size:13px;
  font-weight:800;
  color:#334155;
  cursor:pointer;
}

.htl-permission-v25 input{
  width:auto !important;
}

.htl-login-result-mask{
  position:fixed;
  inset:0;
  z-index:2147483600;
  background:rgba(15,23,42,.52);
  backdrop-filter:blur(8px);
  display:grid;
  place-items:center;
  padding:20px;
}

.htl-login-result-box{
  position:relative;
  width:min(480px,92vw);
  background:#fff;
  border-radius:26px;
  padding:30px;
  text-align:center;
  box-shadow:0 30px 90px rgba(0,0,0,.28);
}

.htl-login-result-close{
  position:absolute;
  right:16px;
  top:16px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f1f5f9;
  color:#10233f;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}

.htl-login-result-icon{
  width:58px;
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  margin:4px auto 14px;
  color:#fff;
  font-size:30px;
  font-weight:900;
}

.htl-login-result-icon.ok{
  background:linear-gradient(135deg,#12b981,#34d399);
}

.htl-login-result-icon.error{
  background:linear-gradient(135deg,#ef4444,#fb7185);
}

.htl-login-result-box h2{
  margin:0 0 8px;
  color:#10233f;
  font-size:24px;
}

.htl-login-result-box p{
  margin:0 0 20px;
  color:#64748b;
  font-size:14px;
  line-height:1.7;
}

.htl-login-result-actions{
  display:grid;
  gap:10px;
}

.htl-login-primary,
.htl-login-secondary{
  height:44px;
  border:0;
  border-radius:14px;
  font-size:14px;
  font-weight:900;
  cursor:pointer;
}

.htl-login-primary{
  background:linear-gradient(135deg,#1262ff,#4f8dff);
  color:#fff;
}

.htl-login-secondary{
  background:#edf4ff;
  color:#1262ff;
}
/* HTL Front Edit Rescue V25 CSS END */

