*{box-sizing:border-box}
html,body{margin:0}
:root{
  --bg:#f7f9fc;
  --panel:#fff;
  --text:#111827;
  --muted:#667085;
  --faint:#98a2b3;
  --line:#e7edf5;
  --line-strong:#dce4ef;
  --blue:#1769ff;
  --blue-deep:#0f5bed;
  --shadow:0 18px 45px rgba(31,41,55,.06);
}
body{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);
  color:var(--text);
  letter-spacing:0;
}
body.modal-open{overflow:hidden}
a{color:inherit}
button,input,textarea{font:inherit}
button{cursor:pointer}
img,svg{max-width:100%}
svg{display:block}
.box-page{
  min-height:100vh;
  background:
    radial-gradient(circle at 18% 0,rgba(37,99,235,.045),transparent 28%),
    radial-gradient(circle at 82% 12%,rgba(20,184,166,.038),transparent 24%),
    linear-gradient(180deg,#fbfdff 0,#f7f9fc 100%);
}
.box-shell{width:100%;max-width:1448px;margin:0 auto;padding:0 36px 28px}

.box-topbar{
  display:grid;
  grid-template-columns:1fr minmax(280px,430px) 1fr;
  align-items:center;
  gap:28px;
  min-height:88px;
  border-bottom:1px solid var(--line);
}
.brand{display:inline-flex;align-items:center;gap:18px;text-decoration:none;font-size:22px;font-weight:800;line-height:1}
.brand-mark{
  position:relative;
  width:32px;
  height:32px;
  border-radius:9px;
  background:linear-gradient(145deg,#1f75ff 0,#1458f2 100%);
  box-shadow:0 7px 14px rgba(23,105,255,.14),inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-mark:before{
  content:"";
  position:absolute;
  left:7px;
  top:8px;
  width:18px;
  height:15px;
  border-radius:3px 3px 4px 4px;
  background:#fff;
  opacity:.96;
  clip-path:polygon(0 0,38% 0,47% 16%,100% 16%,100% 100%,0 100%);
}
.brand-mark:after{
  content:"";
  position:absolute;
  left:11px;
  top:12px;
  width:10px;
  height:12px;
  border-radius:2px 2px 1px 1px;
  background:linear-gradient(180deg,#70a4ff,#1e6fff);
  clip-path:polygon(0 0,100% 0,100% 100%,50% 73%,0 100%);
}
.top-search{
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  max-width:430px;
  justify-self:center;
  height:50px;
  padding:0 12px 0 16px;
  border:1px solid #dfe5ee;
  border-radius:10px;
  background:rgba(255,255,255,.86);
  box-shadow:0 8px 20px rgba(15,23,42,.032),inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter:blur(12px);
}
.search-icon{width:20px;height:20px;color:#667085;flex:0 0 auto}
.search-icon svg,.top-actions svg,.card-actions svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.top-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#111827;font-size:13px;font-weight:500}
.top-search input::placeholder{color:#8b95a5}
.top-actions{display:flex;align-items:center;justify-content:flex-end}
.add-button,.card-icon-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  color:#344054;
  text-decoration:none;
}
.add-button{
  gap:10px;
  height:46px;
  padding:0 18px;
  border-radius:8px;
  background:var(--blue);
  color:#fff;
  box-shadow:0 9px 18px rgba(23,105,255,.18),inset 0 1px 0 rgba(255,255,255,.18);
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  border:0;
}
.add-button:hover{background:var(--blue-deep)}
.add-button svg{width:20px;height:20px}

.collection-bar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding-top:32px;
  margin-bottom:24px;
}
.type-tabs{display:flex;align-items:center;gap:18px;flex-wrap:wrap;min-width:0}
.type-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:66px;
  height:38px;
  padding:0 18px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#111827;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  box-shadow:0 5px 14px rgba(15,23,42,.02),inset 0 1px 0 rgba(255,255,255,.86);
  white-space:nowrap;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.type-tab:hover{border-color:#cfdbeb;background:#fff;transform:translateY(-1px)}
.type-tab.active{border-color:var(--blue);background:var(--blue);color:#fff;box-shadow:0 8px 18px rgba(23,105,255,.18)}

.box-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:24px;
}
.box-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:333px;
  padding:17px 16px 18px;
  border:1px solid var(--line-strong);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.9));
  box-shadow:0 9px 24px rgba(15,23,42,.032),inset 0 1px 0 rgba(255,255,255,.88);
  overflow:hidden;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.clickable-card{cursor:pointer}
.clickable-card:focus-within,.clickable-card:hover{border-color:#c8d7ea;box-shadow:0 14px 32px rgba(15,23,42,.052),inset 0 1px 0 rgba(255,255,255,.9);transform:translateY(-1px)}
.box-card.has-cover{padding:0}
.card-kind{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
  color:#475467;
  font-size:13px;
  font-weight:600;
}
.has-cover .card-kind{
  position:absolute;
  z-index:2;
  top:18px;
  left:16px;
  margin:0;
  color:#fff;
  text-shadow:0 1px 8px rgba(0,0,0,.22);
}
.kind-icon{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:8px;
  background:#eef4ff;
  color:var(--blue);
  flex:0 0 auto;
}
.has-cover .kind-icon{background:rgba(17,24,39,.32);color:#fff;backdrop-filter:blur(7px)}
.kind-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.card-cover{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  background:#eef2f7;
  text-decoration:none;
  border-bottom:1px solid #e7edf5;
}
.card-cover img{display:block;width:100%;height:100%;object-fit:cover}
.generated-cover{
  isolation:isolate;
  color:#fff;
  font-size:22px;
  font-weight:800;
  letter-spacing:0;
}
.generated-cover:before,.generated-cover:after{content:"";position:absolute;inset:0;z-index:-1}
.cover-site{background:#050b1c}
.cover-site:before{background:radial-gradient(circle at 84% 20%,rgba(37,99,235,.95),transparent 31%),linear-gradient(145deg,#060a17 0,#111827 54%,#0f5bed 100%)}
.cover-site:after{background:linear-gradient(120deg,transparent 0 56%,rgba(255,255,255,.2) 57%,transparent 58%),radial-gradient(circle at 8% 16%,rgba(255,255,255,.18),transparent 16%)}
.cover-design{background:linear-gradient(135deg,#dde8ea,#cbb18e 48%,#526a56)}
.cover-ai,.cover-video{background:linear-gradient(135deg,#0c1430,#172554 46%,#020617)}
.cover-ai:after,.cover-video:after{background:radial-gradient(circle at 74% 28%,rgba(96,165,250,.42),transparent 24%),linear-gradient(90deg,rgba(255,255,255,.05),transparent)}
.generated-cover>span:not(.play-button):not(.duration-pill){max-width:78%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:lowercase}
.play-button{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  transform:translate(-50%,-50%);
  border:4px solid #fff;
  border-radius:50%;
  background:rgba(0,0,0,.56);
  color:#fff;
  font-size:20px;
  line-height:1;
  padding-left:3px;
}
.duration-pill{
  position:absolute;
  right:14px;
  bottom:13px;
  z-index:2;
  height:27px;
  padding:0 8px;
  border-radius:5px;
  background:rgba(17,24,39,.62);
  color:#fff;
  font-size:13px;
  line-height:27px;
}

.card-copy{display:flex;flex-direction:column}
.has-cover .card-copy{padding:15px 14px 0}
.card-copy h2{
  margin:0 0 9px;
  color:#111827;
  font-size:17px;
  line-height:1.36;
  font-weight:750;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.text-only .card-copy h2{font-size:17px;margin-top:2px}
.card-copy h2 a{text-decoration:none}
.card-copy p{
  margin:0;
  color:#667085;
  font-size:13px;
  line-height:1.55;
  font-weight:400;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
}
.summary-line{min-height:40px}
.tag-row{display:flex;flex-wrap:nowrap;align-items:center;gap:9px;margin-top:auto;padding-top:16px;overflow:visible}
.has-cover .tag-row{padding:10px 14px 15px}
.tag-row a,.tag-row span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 1 auto;
  max-width:84px;
  min-height:26px;
  line-height:1.15;
  padding:5px 9px 4px;
  border-radius:6px;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tag-blue{background:#edf4ff;color:#1769ff}
.tag-violet{background:#f1edff;color:#7c3aed}
.tag-green{background:#e8f8ef;color:#16a34a}
.tag-orange{background:#fff0e5;color:#ea580c}
.card-actions{display:flex;align-items:center;gap:0;margin-left:auto;flex:0 0 auto}
.card-actions form{display:flex}
.card-icon-button{
  width:30px;
  height:30px;
  min-height:0;
  padding:0;
  color:#344054;
}
.card-icon-button:hover{color:var(--blue)}
.card-icon-button svg{width:18px;height:18px}
.delete-button{color:#667085}
.delete-button:hover{color:#dc2626}
.loaded-hint{display:flex;align-items:center;justify-content:center;gap:14px;margin:28px 0 0;color:#98a2b3;font-size:13px}
.loaded-hint:before,.loaded-hint:after{content:"";width:44px;height:1px;background:#dce3ee}
.box-empty{display:grid;place-items:center;min-height:360px;border:1px dashed #dce3ee;border-radius:12px;background:#fff;text-align:center}
.box-empty h2{margin:0 0 8px}
.box-empty p{margin:0;color:#667085}

.capture-modal[hidden]{display:none}
.capture-modal{
  position:fixed;
  inset:0;
  z-index:40;
  display:grid;
  place-items:center;
  padding:20px;
}
.capture-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.28);backdrop-filter:blur(8px)}
.capture-dialog{
  position:relative;
  z-index:1;
  width:min(460px,calc(100vw - 32px));
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.14);
  padding:26px;
}
.capture-dialog h2{margin:0 0 18px;font-size:20px;line-height:1.25}
.capture-close{
  position:absolute;
  top:14px;
  right:14px;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  min-height:32px;
  padding:0;
  border:0;
  border-radius:8px;
  background:#f3f6fb;
  color:#475467;
  font-size:24px;
  line-height:1;
}
.capture-form{display:grid;gap:16px}
.capture-form label{display:grid;gap:8px;color:#344054;font-size:13px;font-weight:700}
.capture-form input{
  width:100%;
  height:44px;
  border:1px solid #dfe5ee;
  border-radius:10px;
  padding:0 14px;
  outline:0;
  color:#111827;
}
.capture-form input:focus{border-color:#8eb4ff;box-shadow:0 0 0 3px rgba(23,105,255,.08)}
.capture-submit{
  height:44px;
  min-height:44px;
  border:0;
  border-radius:10px;
  background:var(--blue);
  color:#fff;
  font-weight:800;
}

.box-button,.button,button{min-height:40px}
.box-button,.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;padding:0 22px;text-decoration:none;font-weight:800;cursor:pointer}
.box-button.primary,.primary-button{background:#111827;color:#fff}
.box-button.ghost,.secondary-button{background:#fff;color:#172033;border:1px solid #dfe7f4}
.login-page{min-height:100vh;display:grid;place-items:center;background:#f8fbff}
.login-card{width:min(420px,92vw);background:#fff;border-radius:16px;padding:32px;border:1px solid #dfe7f4;box-shadow:0 14px 38px rgba(37,72,118,.06)}
.login-card h1{margin-top:0}
.login-card input,.editor input,.editor textarea{width:100%;padding:14px 16px;border:1px solid #dfe7f4;border-radius:12px;background:#fff;color:#172033}
.login-card button,.editor button{width:100%;margin-top:14px}
.error{background:#fee2e2;color:#991b1b;border-radius:10px;padding:10px;margin:12px 0}
.muted{color:#64748b;font-size:13px}
.form-page,.detail{max-width:880px;margin:24px auto;padding:0 18px}
.editor,.panel{background:#fff;border:1px solid #dfe7f4;border-radius:16px;padding:24px}
.editor label{display:block;margin-bottom:16px;font-weight:800}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.detail pre{white-space:pre-wrap;background:#f8fafc;border-radius:14px;padding:16px;line-height:1.6}
.attachment img{max-width:100%;border-radius:16px;margin-top:10px}
.quick-capture-page{max-width:900px;padding-top:36px;padding-bottom:42px}
.quick-capture-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}
.quick-capture-header h1{margin:0 0 10px;font-size:34px;line-height:1.15}
.quick-capture-header p{margin:0;color:#64748b;line-height:1.7}
.eyebrow{margin:0 0 8px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#64748b}
.quick-capture-form{padding:28px}
.quick-capture-form label span{display:block;margin-bottom:8px}
.primary-field input{font-size:20px;padding-block:18px}
.advanced-fields{margin:18px 0 24px;border:1px solid #dfe7f4;border-radius:14px;padding:16px 18px}
.advanced-fields summary{cursor:pointer;font-weight:800;color:#172033}
.advanced-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.full-span{grid-column:1/-1}

@media(max-width:1180px){
  .box-shell{padding-inline:28px}
  .box-topbar{grid-template-columns:auto 1fr auto;gap:20px}
  .top-actions{gap:14px}
  .box-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:960px){
  .box-topbar{grid-template-columns:1fr auto;min-height:78px}
  .top-search{grid-column:1/-1;grid-row:2}
  .top-actions{grid-column:2;grid-row:1}
  .box-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .collection-bar{align-items:flex-start;flex-direction:column;gap:18px}
}
@media(max-width:760px){
  .box-shell{padding-inline:18px}
  .add-button{width:44px;height:44px;padding:0;border-radius:10px}
  .add-button span{display:none}
  .collection-bar{padding-top:28px;margin-bottom:22px}
  .type-tabs{width:calc(100% + 36px);flex-wrap:nowrap;overflow-x:auto;margin-inline:-18px;padding-inline:18px;padding-bottom:4px;scrollbar-width:none}
  .type-tabs::-webkit-scrollbar{display:none}
  .type-tab{flex:0 0 auto}
}
@media(max-width:620px){
  .box-shell{padding-inline:14px}
  .box-topbar{gap:12px}
  .brand{font-size:22px;gap:12px}
  .brand-mark{width:30px;height:30px}
  .top-search{height:48px;padding-inline:13px}
  .type-tabs{width:calc(100% + 28px);margin-inline:-14px;padding-inline:14px;gap:12px}
  .type-tab{height:36px;min-width:60px;padding-inline:16px}
  .box-grid{grid-template-columns:1fr;gap:16px}
  .box-card{height:auto;min-height:300px}
  .card-copy h2{font-size:17px}
  .card-copy p{font-size:13px}
}
@media(max-width:420px){
  .box-shell{padding-inline:12px;padding-bottom:22px}
  .brand strong{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .type-tabs{margin-inline:-12px;padding-inline:12px}
}
@media(max-height:560px) and (orientation:landscape){
  .box-topbar{min-height:70px}
  .type-tabs{margin-top:22px;margin-bottom:20px}
  .box-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .box-card{min-height:285px}
  .card-cover{aspect-ratio:1/1}
  .card-copy p{-webkit-line-clamp:2}
}
