/* ===== 基础变量 ===== */
:root{
  --bg:#f5f7fb;--ink:#102033;--muted:#667085;--brand:#19c6c2;--line:#e6eaf0;--danger:#dc2626;
  --app-bg:#f6f6f8;--app-card:#fff;--app-line:#eeeef2;--app-muted:#8a8e99;--app-text:#1a1a1f;
  --app-bar:#ffffff;--app-bottom:#ffffff;--app-accent:#b32424;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Microsoft YaHei",Segoe UI,sans-serif}
a{text-decoration:none;color:inherit}
input,textarea,select{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font:inherit}
textarea{min-height:96px}
label{display:block;margin:12px 0;font-weight:700}
label input,label textarea,label select{margin-top:7px;font-weight:400}

/* ===== 后台顶栏/侧栏（PC） ===== */
.top{position:sticky;top:0;z-index:8;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:14px 4vw}
.brand{font-size:20px;font-weight:900}
.top nav,.site-head nav{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.wrap{max-width:1180px;margin:0 auto;padding:28px 20px}
.hero{display:grid;grid-template-columns:1.35fr .7fr;gap:28px;align-items:center;min-height:420px}
.hero h1{font-size:50px;line-height:1.08;margin:10px 0}
.hero p{font-size:18px;color:var(--muted)}
.eyebrow{color:var(--brand);font-weight:900;letter-spacing:.08em}
.panel,.card{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 16px 50px rgba(16,32,51,.08)}
.panel{padding:24px;margin:18px 0}
.narrow{max-width:520px;margin:40px auto}
.btn{display:inline-flex;align-items:center;justify-content:center;border:0;background:var(--brand);color:#062226;font-weight:900;padding:12px 18px;border-radius:14px;cursor:pointer;box-shadow:0 10px 24px rgba(25,198,194,.22)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:none}
.btn.mini{padding:8px 12px;border-radius:10px;font-size:13px}
.btn.full{width:100%;margin-top:12px}
.grid{display:grid;gap:18px}
.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.templates{grid-template-columns:repeat(4,minmax(0,1fr))}
.card{padding:20px;transition:.2s}
.card:hover{transform:translateY(-3px);box-shadow:0 18px 48px rgba(16,32,51,.12)}
.pv{height:138px;border-radius:18px;background:linear-gradient(135deg,var(--c),#102033);display:flex;align-items:end;padding:18px;color:#fff;font-weight:900}
.flash{padding:14px 18px;border-radius:14px;margin-bottom:18px;background:#e8fff7;color:#05603a;border:1px solid #b7f4dc}
.flash.err{background:#fff1f2;color:#9f1239;border-color:#fecdd3}
.muted,small{color:var(--muted)}
.foot{text-align:center;color:var(--muted);padding:26px}
.app{display:grid;grid-template-columns:220px 1fr;gap:22px}
.admin-layout{display:grid;grid-template-columns:220px 1fr;gap:22px}
.side{position:sticky;top:78px;align-self:start;background:#fff;border:1px solid var(--line);border-radius:22px;padding:12px}
.side a{display:block;padding:12px 14px;border-radius:14px;margin:4px 0}
.side a.on,.side a:hover{background:#e9fbfa;color:#047a76;font-weight:900}
.stat strong{display:block;font-size:34px;margin-top:10px}
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.tabs a{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:#fff}
.tabs a.on{background:var(--ink);color:#fff}
.table{background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden}
.tr{display:grid;grid-template-columns:1.2fr .6fr .6fr .4fr;gap:12px;align-items:center;padding:14px;border-bottom:1px solid var(--line)}
.th{font-weight:900;background:#f8fafc}
.row{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid var(--line);padding:13px 0}
.row small{display:block}
.inline{display:inline}
.link{border:0;background:none;cursor:pointer;color:var(--brand);font:inherit}
.danger{color:var(--danger)}
.logo{display:block;max-height:70px;max-width:220px;margin:10px 0}
table.map{width:100%;border-collapse:collapse;margin-top:8px;font-size:13px}
table.map th,table.map td{border:1px solid var(--line);padding:8px 10px;text-align:left}
table.map th{background:#f8fafc;color:#475569;font-weight:700}
#img-lb{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:9999;display:none;align-items:center;justify-content:center;flex-direction:column;cursor:zoom-out;-webkit-tap-highlight-color:transparent}
#img-lb.on{display:flex}
#img-lb img{max-width:96vw;max-height:90vh;object-fit:contain;border-radius:6px;box-shadow:0 10px 40px rgba(0,0,0,.5);transform-origin:center center;transition:transform .15s ease}
#img-lb .img-lb-close{position:absolute;top:14px;right:18px;width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;font-size:26px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(8px)}
#img-lb .img-lb-close:active{background:rgba(255,255,255,.32)}
#img-lb .img-lb-tip{position:absolute;bottom:20px;left:0;right:0;text-align:center;color:rgba(255,255,255,.7);font-size:12px;letter-spacing:.04em}
.doc code{background:#eef2f7;border-radius:6px;padding:2px 6px}
.simple-editor{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;margin-top:7px}
.simple-toolbar{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:8px;background:#f8fafc}
.simple-toolbar button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 10px;cursor:pointer}
.simple-area{min-height:260px;padding:14px;outline:0;font-weight:400}
.simple-area img,.note-editable img{max-width:100%;height:auto}
.note-editor.note-frame{border-color:var(--line);border-radius:14px;overflow:hidden;margin-top:7px}
.note-toolbar{background:#f8fafc!important}

/* ===== 公开 PC 站（默认就是 PC） ===== */
.site{background:#fff;color:var(--ink)}
.site-head{display:flex;justify-content:space-between;align-items:center;padding:18px 6vw;border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);z-index:5}
.site-logo{display:flex;gap:10px;align-items:center;font-weight:900;font-size:20px;color:var(--brand)}
.site-logo img{height:42px;max-width:150px;object-fit:contain}
.site-head nav a{padding:6px 12px;border-radius:10px;font-weight:600;color:var(--ink)}
.site-head nav a:hover{background:#eef8f7}
.site-hero{min-height:420px;padding:7vw 6vw;background:radial-gradient(circle at 20% 20%,rgba(25,198,194,.18),transparent 34%),linear-gradient(135deg,#f8fbff,#eef8f7)}
.site-hero h1{font-size:56px;line-height:1.05;margin:12px 0;color:var(--ink)}
.site-hero p{max-width:760px;font-size:20px;color:#475467}
.site-main{max-width:1060px;margin:0 auto;padding:48px 20px}
.site-main h2{font-size:34px}
.site-main img{max-width:100%;height:auto}
.media{display:block;width:100%;max-height:520px;object-fit:cover;border-radius:22px;margin:18px 0}
.article{max-width:820px}
.site-foot{text-align:center;padding:32px 20px;background:#102033;color:#fff}
.site .card{color:var(--ink)}

/* ===== App 元素（PC 端默认隐藏） ===== */
.app-top,.app-search,.app-menu,.app-bottom,.app-slider,.app-products,.app-news,.app-section,.app-article,.app-back,.app-h1,.app-cover,.app-main{display:none}

/* ===== 小屏：移动端 App 模式 ===== */
@media(max-width:900px){
  body{background:var(--app-bg);color:var(--app-text);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
  .site-head,.site-hero,.site-main,.site-foot,.app{display:none}
  .app-top,.app-bottom{display:flex}
  body[data-app-shell] .site-head,body[data-app-shell] .site-hero,body[data-app-shell] .site-main,body[data-app-shell] .site-foot{display:none}
  body[data-app-shell] .app-top{display:grid;position:fixed;top:0;left:0;right:0;height:54px;grid-template-columns:54px 1fr 54px;align-items:center;background:var(--app-bar);border-bottom:1px solid var(--app-line);z-index:50}
  body[data-app-shell]{padding-top:54px;padding-bottom:78px}
  body[data-app-shell] .app-icon{width:54px;height:54px;display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:var(--app-text);cursor:pointer}
  body[data-app-shell] .app-icon svg{width:22px;height:22px}
  body[data-app-shell] .app-logo{display:flex;align-items:center;justify-content:center;height:100%;font-weight:800;font-size:18px;color:var(--app-accent);letter-spacing:.04em}
  body[data-app-shell] .app-logo img{max-height:36px;max-width:64vw;object-fit:contain}
  body[data-app-shell] .app-search{display:none;position:fixed;top:54px;left:0;right:0;background:var(--app-bar);border-bottom:1px solid var(--app-line);padding:12px 14px;z-index:49;box-shadow:0 8px 18px rgba(0,0,0,.06)}
  body[data-app-shell] .app-search.open{display:block}
  body[data-app-shell] .app-search form{display:flex;gap:8px}
  body[data-app-shell] .app-search input{flex:1;border-radius:999px;background:#f1f1f4;border:0;padding:10px 14px}
  body[data-app-shell] .app-search .btn{padding:8px 14px;border-radius:999px;background:var(--app-accent);color:#fff}
  body[data-app-shell] .app-menu{position:fixed;inset:0;z-index:60;display:none}
  body[data-app-shell] .app-menu.open{display:block}
  body[data-app-shell] .app-menu-mask{position:absolute;inset:0;background:rgba(0,0,0,.45)}
  body[data-app-shell] .app-menu-panel{position:absolute;top:0;right:0;bottom:0;width:72%;max-width:300px;background:#fff;padding:20px 0;box-shadow:-8px 0 30px rgba(0,0,0,.18);display:flex;flex-direction:column}
  body[data-app-shell] .app-menu-item{display:block;padding:16px 22px;color:var(--app-text);font-size:16px;border-bottom:1px solid var(--app-line)}
  body[data-app-shell] .app-menu-item.danger{color:var(--danger);border:0;margin-top:auto}
  body[data-app-shell] .app-main{padding:0 0 24px;display:block}
  body[data-app-shell] .app-back{display:inline-block;padding:10px 14px;color:var(--app-accent);font-weight:700}
  body[data-app-shell] .app-h1{font-size:22px;font-weight:800;margin:14px 16px 10px;display:block}
  body[data-app-shell] .app-section{padding:18px 0 8px;display:block}
  body[data-app-shell] .app-slider{display:block;position:relative;width:100%;aspect-ratio:16/10;overflow:hidden;background:#222}
  body[data-app-shell] .app-slide{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity .6s}
  body[data-app-shell] .app-slide.active{opacity:1}
  body[data-app-shell] .app-slide-mask{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 50%,rgba(0,0,0,.55))}
  body[data-app-shell] .app-slide-title{position:absolute;left:16px;right:16px;bottom:18px;color:#fff;font-size:20px;font-weight:800;text-shadow:0 2px 10px rgba(0,0,0,.45)}
  body[data-app-shell] .app-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;gap:6px;justify-content:center}
  body[data-app-shell] .app-dot{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.6)}
  body[data-app-shell] .app-dot.active{background:#fff;width:18px;border-radius:4px}
  body[data-app-shell] .app-products{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding:0 14px}
  body[data-app-shell] .app-product-card{background:var(--app-card);border-radius:14px;padding:10px;display:block;box-shadow:0 6px 18px rgba(0,0,0,.04);text-align:center;color:var(--app-text)}
  body[data-app-shell] .app-product-img{aspect-ratio:1/1;background:linear-gradient(135deg,#fff7ed,#fff);border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:8px}
  body[data-app-shell] .app-product-img img{width:100%;height:100%;object-fit:cover}
  body[data-app-shell] .app-product-img span{font-size:42px;font-weight:900;color:var(--brand)}
  body[data-app-shell] .app-product-card h3{font-size:15px;margin:6px 0 4px}
  body[data-app-shell] .app-product-card p{font-size:12px;color:var(--app-muted);margin:0;line-height:1.5;min-height:36px}
  body[data-app-shell] .app-news{padding:0 14px;display:flex;flex-direction:column;gap:10px}
  body[data-app-shell] .app-news-item{display:flex;gap:10px;background:var(--app-card);border-radius:12px;padding:10px;box-shadow:0 4px 14px rgba(0,0,0,.04);align-items:flex-start;color:var(--app-text)}
  body[data-app-shell] .app-news-item img{width:84px;height:84px;object-fit:cover;border-radius:10px;flex-shrink:0}
  body[data-app-shell] .app-news-item h3{font-size:15px;margin:0 0 4px}
  body[data-app-shell] .app-news-item p{font-size:13px;color:var(--app-muted);margin:0 0 6px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body[data-app-shell] .app-news-item small{color:#9aa0aa;font-size:12px}
  body[data-app-shell] .app-article{background:var(--app-card);margin:10px 14px;border-radius:14px;padding:16px;box-shadow:0 4px 16px rgba(0,0,0,.04);display:block}
  body[data-app-shell] .app-article h1{font-size:22px;margin:0 0 8px}
  body[data-app-shell] .app-cover{display:block;width:100%;border-radius:10px;margin:10px 0}
  body[data-app-shell] .app-bottom{position:fixed;left:0;right:0;bottom:0;height:64px;background:var(--app-bottom);border-top:1px solid var(--app-line);display:grid;grid-template-columns:repeat(4,1fr);z-index:50}
  body[data-app-shell] .app-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#7d818a;font-weight:600;font-size:12px;padding:6px 0}
  body[data-app-shell] .app-tab svg{width:22px;height:22px}
  body[data-app-shell] .app-tab.on{color:var(--app-accent)}
  body[data-app-shell] .app-tab.on svg{stroke:var(--app-accent)}
}

/* ===== 小屏 PC 后台 ===== */
@media(max-width:900px){
  .hero,.app,.admin-layout,.two,.three,.four,.templates{grid-template-columns:1fr}
  .hero h1,.site-hero h1{font-size:36px}
  .top{align-items:flex-start;gap:12px;flex-direction:column}
  .side{position:static}
  .tr{grid-template-columns:1fr}
  .wrap{padding:18px 14px}
}

.rich-content img,.rich-content video,.rich-content iframe{max-width:100%;height:auto;border-radius:10px;display:block;margin:10px auto}
.rich-content table{width:100%}
.rich-content pre{white-space:pre-wrap;word-break:break-all}
