/* Base shell + tabBar. Colours and metrics follow the extracted WXSS:
   theme #606ff8, accent #368eff, AI purple #733cf1. */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
/* Several rules set display:flex; without this they would beat the hidden attribute. */
[hidden]{display:none !important}
/* The mini program draws its tabBar outside the webview, so WXSS bottom:0 means
   "just above the tabBar". In H5 the tabBar lives in the same document, so the
   fixed bars inside tab pages have to clear it. */
:root{--tab-h:56px}
html,body{height:100%}
body{
  margin:0;background:linear-gradient(90deg,#faf9fa,#f0ecf7);overflow-x:hidden;
  color:#3f3e3e;font:14px/1.5 "Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea{font-family:inherit}
::-webkit-scrollbar{width:0;height:0;color:transparent}
img{display:block}

#app{
  position:relative;max-width:520px;min-height:100%;margin:0 auto;
  background:linear-gradient(90deg,#faf9fa,#f0ecf7);
  box-shadow:0 0 24px rgba(60,50,90,.12);
  padding-bottom:60px;
}

.view{display:none;min-height:calc(100vh - 60px)}
.view.on{display:block}

/* ---------------- navbar (non-custom pages) ---------------- */
.navbar{
  position:sticky;top:0;z-index:900;height:46px;display:flex;align-items:center;
  background:#fff;border-bottom:1px solid #f2f2f2;padding:0 12px;
}
.nav-back{width:34px;height:34px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.nav-back svg{width:20px;height:20px}
.nav-title{flex:1;text-align:center;font-size:16px;font-weight:600;color:#333;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}
.nav-right{width:34px}

/* ---------------- tabBar ---------------- */
.tabbar{
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);
  width:100%;max-width:520px;display:flex;background:#fff;z-index:1000;
  border-top:1px solid #ededed;padding-bottom:env(safe-area-inset-bottom);
}
.tab-item{
  flex:1;min-height:var(--tab-h);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:6px 0 5px;color:#515151;font-size:11px;cursor:pointer;user-select:none;
}
.tab-item svg{width:24px;height:24px;margin-bottom:2px}
.tab-item .tab-icon{width:26px;height:26px;margin-bottom:2px;display:block}
.tab-item.on{color:#606ff8}

/* ---------------- shared bits ---------------- */
.title{color:#3f3e3e;font-size:13px;font-weight:700;padding:12px 0 10px}
.no-data{color:#b1adad;text-align:center;padding:30px 0;font-size:13px}
.toast{
  position:fixed;left:50%;bottom:90px;transform:translateX(-50%);
  background:rgba(31,30,30,.82);color:#fff;font-size:13px;padding:10px 18px;
  border-radius:20px;z-index:99999;max-width:80%;text-align:center;
}

.over-content{
  position:fixed;left:50%;bottom:0;transform:translateX(-50%);
  width:100%;max-width:520px;height:100%;background:rgba(31,30,30,.7);z-index:99999;
}
.param-info{
  position:absolute;bottom:0;left:0;width:100%;background:#fff;
  border-top-left-radius:20px;border-top-right-radius:20px;max-height:82vh;overflow:auto;
}
.param-list{padding:12px}
.param-info-list{padding:0 12px 12px}
.param-top-content{display:flex;flex-direction:row;font-size:16px;letter-spacing:1px;padding:15px 15px 5px}
.top-left{text-align:left;width:20%;cursor:pointer;color:#8b888b;font-size:14px}
.top-name{font-size:17px;text-align:center;width:60%}
.top-name-info{display:flex;justify-content:center;font-size:17px;margin:auto;text-align:center;width:60%}
.top-right{width:20%}
.param-bot{background:#606ff8;border-radius:10px;color:#fff;margin:20px 12px;padding:13px;text-align:center;cursor:pointer}
.input-css{background-color:#f5f5f5;border-radius:4px;color:#3f3e3e;font-size:14px;padding:10px;width:100%;border:none;outline:none}

/* pill tag rows, used by index / canvas tabs / ai chips */
.ai-list{display:flex;flex-wrap:wrap;margin-top:10px}
.item-info{background-color:#f5f5f5;border-radius:4px;color:#5f6264;font-size:13px;margin-bottom:10px;margin-right:10px;padding:8px 10px;cursor:pointer}
.item-ai-info{border:1px solid #f5f5f5;border-radius:4px;color:#5f6264;font-size:12px;margin-bottom:10px;margin-right:10px;padding:8px 10px;cursor:pointer}

/* horizontal fixed tag rail */
.tag-info{
  background:#fff;width:100%;font-size:14px;height:43px;line-height:32px;
  margin-top:15px;overflow:hidden;white-space:nowrap;z-index:99;
  padding-top:10px;overflow-x:auto;
}
.tag-content{background:#fff;padding-left:12px;padding-right:12px}
.tag-item-info{display:inline-block;margin-left:20px;margin-right:20px;text-align:center;cursor:pointer}
.active{color:#606ff8}
.active .tag-item-info::after,.tag-item-info.active::after{
  border-bottom:2px solid #606ff8;content:"";display:block;height:1px;margin:5px auto 0;width:15px;
}

/* template card row (from pages/ku/ku.wxss) */
.copy-list{border-bottom:1px solid #f2f2f2;display:flex;flex-direction:row;padding:10px;cursor:pointer}
.copy-left{
  box-shadow:0 1px 4px rgba(0,0,0,.3),inset 0 0 20px rgba(0,0,0,.1);
  border-radius:4px;height:90px;width:120px;overflow:hidden;flex:none;background:#fff;
}
.copy-left img{width:100%;height:100%;object-fit:cover}
.copy-right{font-size:14px;padding-left:8px;min-width:0;flex:1}
.copy-name{
  color:#5b5a5a;font-size:14px;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;
}
.copy-desc{color:#b1adad;display:flex;flex-direction:row;font-size:12px;padding-top:10px;width:100%;justify-content:space-between}
.look{width:70px}

.content-block{background:#fff;border-radius:8px;margin:12px;padding:12px}

/* search box (from ku.wxss) */
.top-search{display:flex;flex-direction:row;height:38px;margin-left:12px;margin-right:12px;align-items:center}
.top-search-item{
  border:1px solid #ebeae9;border-radius:18px;display:flex;flex-direction:row;height:38px;
  padding-left:14px;width:80%;background:#fff;align-items:center;
}
.top-search-item-img{padding-top:2px}
.top-search-item-text{color:#6f6c6c;font-size:12px;padding-left:6px}
.ku-key-input{border:none;outline:none;background:transparent;font-size:13px;color:#3f3e3e;width:100%;padding-left:6px}
.ai-bot{background:#368eff;border-radius:50%;font-size:13px;height:40px;width:40px;margin-left:12px;
  display:flex;align-items:center;justify-content:center;color:#fff;cursor:pointer;flex:none}
.item-img-css{height:18px;width:18px}

/* ---------------- login ---------------- */
#view-login.on{display:block}
.login-wrap{padding:70px 24px 40px;min-height:100vh}
.login-logo{font-size:32px;font-weight:800;color:#606ff8;letter-spacing:2px}
.login-sub{color:#a19da1;font-size:13px;padding-top:8px}
.login-card{background:#fff;border-radius:14px;padding:22px 18px;margin-top:34px;box-shadow:0 6px 24px rgba(96,111,248,.12)}
.login-field{display:flex;align-items:center;background:#f5f5f5;border-radius:8px;padding:0 12px;margin-bottom:14px;height:46px}
.login-pre{color:#6f6c6c;font-size:14px;padding-right:10px;border-right:1px solid #ddd;margin-right:10px}
.login-field input{flex:1;border:none;background:transparent;outline:none;font-size:15px}
.login-send{border:none;background:transparent;color:#606ff8;font-size:13px;cursor:pointer;white-space:nowrap}
.login-send[disabled]{color:#a19da1}
.login-submit{width:100%;height:46px;border:none;border-radius:10px;background:#606ff8;color:#fff;font-size:16px;cursor:pointer;margin-top:6px}
.login-tip{color:#b1adad;font-size:12px;text-align:center;padding-top:14px}

/* ---------------- confirm dialog (wx.showModal equivalent) ---------------- */
.confirm-mask{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.5);z-index:1200;
  display:flex;align-items:center;justify-content:center}
.confirm-box{background:#fff;border-radius:14px;width:74%;max-width:320px;overflow:hidden}
.confirm-title{font-size:16px;font-weight:600;color:#333;text-align:center;padding:18px 16px 6px}
.confirm-body{font-size:14px;color:#666;text-align:center;padding:6px 18px 18px;line-height:1.6}
.confirm-actions{display:flex;border-top:1px solid #eee}
.confirm-btn{flex:1;text-align:center;padding:13px 0;font-size:15px;cursor:pointer}
.confirm-btn.cancel{color:#999;border-right:1px solid #eee}
.confirm-btn.ok{color:#606ff8;font-weight:600}
