/* =========================================================
   学习小屋 · 前台设计系统
   由 mu-plugin 注入，加载在 Astra 之后（同选择器后者胜）
   视觉：Coze 渐变语言 + Dify 分区节奏；亮色版
   ========================================================= */

:root{
  color-scheme:light;
  --brand-1:#5b52ff; --brand-2:#b95cf0; --brand-3:#ff8a5c;
  --brand-grad:linear-gradient(90deg,#5b52ff 0%,#b95cf0 50%,#ff8a5c 100%);
  --brand-grad-soft:linear-gradient(135deg,rgba(91,82,255,.10),rgba(185,92,240,.09) 50%,rgba(255,138,92,.10));
  --brand-ink:#3a30e0;
  --bg:#ffffff; --bg-soft:#f6f7fc; --card:#ffffff;
  --fg:#101014; --fg-2:#46475a; --fg-3:#82859a;
  --stroke:#edeef5; --stroke-strong:#dcdff0;
  --shadow-xs:0 1px 2px rgba(16,16,20,.04);
  --shadow-sm:0 6px 18px -8px rgba(91,82,255,.18),0 2px 6px rgba(16,16,20,.04);
  --shadow-md:0 14px 34px -16px rgba(91,82,255,.30);
  --shadow-brand:0 10px 26px -10px rgba(91,82,255,.45);
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:24px; --r-pill:999px;
  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
}

/* ---------- 1. 基础排版 ---------- */
body,button,input,select,textarea{
  font-family:var(--font);
}
body{
  color:var(--fg); font-size:16.5px; line-height:1.9;
  -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(1100px 520px at 10% -10%, rgba(91,82,255,.10), transparent 62%),
    radial-gradient(900px 460px at 92% -8%, rgba(255,138,92,.09), transparent 60%),
    #fff;
  background-attachment:fixed;
}
h1,h2,h3,h4,h5,h6,.entry-title{color:var(--fg); letter-spacing:-.01em; font-weight:650}
a{color:var(--brand-1); text-decoration:none}
a:hover,a:focus{color:var(--brand-ink)}
::selection{background:rgba(91,82,255,.16)}
/* 容器宽度阶梯：大屏不再把内容缩成中间一条（原来永远 1200），
   同时给长文正文留一条阅读上限（见 .entry-content 的 max-width）。
   页头容器跟着同一档走，logo 与正文左边缘才对得齐。 */
.ast-container{max-width:1200px}
@media (min-width:1500px){ .ast-container{max-width:1360px} }
@media (min-width:1800px){ .ast-container{max-width:1520px} }
@media (min-width:2200px){ .ast-container{max-width:1680px} }
.screen-reader-text{position:absolute;clip:rect(1px,1px,1px,1px)}

/* ---------- 2. 页头（玻璃吸顶） ---------- */
.site-header{
  background:rgba(255,255,255,.82) !important;
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--stroke);
  position:sticky; top:0; z-index:60;
}
body.admin-bar .site-header{top:32px}
.site-header .main-header-bar,.site-header .ast-primary-header-bar,
.site-header .ast-above-header-bar,.site-header .ast-below-header-bar{
  background:transparent !important; border-bottom:0 !important;
}
.site-title a{color:var(--fg); font-weight:700; letter-spacing:-.02em}
.site-title a:hover{color:var(--brand-1)}
.site-description{color:var(--fg-3); font-size:13px; line-height:1.6}
.main-header-menu > .menu-item > .menu-link{
  color:var(--fg-2); font-size:15px; font-weight:500;
  border-radius:var(--r-pill); padding:7px 14px !important; transition:.16s ease;
}
.main-header-menu > .menu-item > .menu-link:hover{background:var(--bg-soft); color:var(--fg)}
.main-header-menu > .menu-item.current-menu-item > .menu-link,
.main-header-menu > .menu-item.current_page_item > .menu-link{
  background:var(--brand-grad-soft); color:var(--brand-ink); font-weight:600;
}
/* 最后一项「写点什么」做成主按钮 */
.main-header-menu > .menu-item:last-child > .menu-link{
  background:var(--brand-grad); color:#fff !important; font-weight:600;
  box-shadow:var(--shadow-brand); margin-left:6px;
}
.main-header-menu > .menu-item:last-child > .menu-link:hover{transform:translateY(-1px)}
.main-header-menu .sub-menu{
  border:1px solid var(--stroke); border-radius:var(--r-md); box-shadow:var(--shadow-sm);
  overflow:hidden; background:#fff;
}
/* 移动端触发按钮 */
.ast-mobile-menu-trigger-minimal,.main-header-menu-toggle,.ast-button-wrap .menu-toggle{
  border:1px solid var(--stroke) !important; border-radius:var(--r-pill) !important; background:#fff !important;
}
.ast-mobile-popup-drawer .ast-mobile-popup-inner{background:#fff}
.ast-mobile-popup-drawer .menu-link{font-size:16px; color:var(--fg-2)}

/* ---------- 3. 页脚 ---------- */
.site-footer{background:var(--bg-soft); border-top:1px solid var(--stroke); color:var(--fg-3)}
.site-footer .ast-container{padding-top:34px; padding-bottom:26px}
.site-footer a{color:var(--fg-3)}
.site-footer a:hover{color:var(--brand-1)}
.ast-footer-copyright,.site-footer .copyright{font-size:13.5px; color:var(--fg-3)}
.site-below-footer-wrap,.ast-small-footer{border-top:1px solid var(--stroke); background:var(--bg-soft)}

/* ---------- 4. 按钮 / 表单 ---------- */
.ast-button,.wp-block-button__link,button,input[type="submit"],input[type="button"],
.search-submit,.comment-form #submit,.wp-block-search__button{
  background:var(--brand-grad); color:#fff; border:0; border-radius:var(--r-pill);
  padding:.68em 1.5em; font-weight:600; box-shadow:var(--shadow-brand);
  text-shadow:none; transition:transform .16s ease,box-shadow .16s ease;
}
.ast-button:hover,.wp-block-button__link:hover,input[type="submit"]:hover,
.search-submit:hover,.comment-form #submit:hover,button:hover{
  transform:translateY(-2px); box-shadow:0 14px 34px -10px rgba(91,82,255,.55); color:#fff;
}
.ast-outline-button,.wp-block-button.is-style-outline .wp-block-button__link{
  background:transparent; color:var(--brand-1); border:1px solid var(--stroke-strong); box-shadow:none;
}
input[type="text"],input[type="email"],input[type="url"],input[type="search"],
input[type="password"],input[type="tel"],textarea,select{
  border:1px solid var(--stroke); border-radius:var(--r-md); background:#fff;
  color:var(--fg); font-size:15px; padding:9px 13px; box-shadow:none;
}
input:focus,textarea:focus,select:focus{
  border-color:var(--brand-1) !important; box-shadow:0 0 0 3px rgba(91,82,255,.14) !important; outline:none;
}

/* ---------- 5. 首页区块（沿用原型类名） ---------- */
.hero{
  border-radius:var(--r-xl) !important;
  box-shadow:0 24px 60px -28px rgba(91,82,255,.6);
  padding:44px 32px !important;
}
.hero h1,.hero h2,.hero h3,.hero p,.hero .wp-block-heading{color:#fff !important}
.hero p{color:rgba(255,255,255,.93) !important}
.hero .wp-block-button__link{background:#fff !important; color:#2b25c9 !important; box-shadow:0 10px 24px -12px rgba(2,6,23,.5)}
.hero .wp-block-button.is-style-outline .wp-block-button__link{
  background:transparent !important; color:#fff !important; border:1.5px solid rgba(255,255,255,.85) !important; box-shadow:none;
}
.cards{margin:2.2em 0 1.2em !important; gap:18px}
.card{border-radius:var(--r-lg) !important; box-shadow:var(--shadow-xs); transition:transform .18s ease,box-shadow .18s ease}
.card:hover{transform:translateY(-3px); box-shadow:var(--shadow-sm)}
.card .wp-block-heading{margin:0 0 .5em}
.card h3 a{color:inherit; text-decoration:none}
.card .more{margin:.9em 0 0}
.card .more a{font-weight:600; text-decoration:none}
.latest .wp-block-latest-posts__list{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:18px; list-style:none; padding:0;
}
.latest .wp-block-latest-posts__list li{
  margin:0; padding:20px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.latest .wp-block-latest-posts__list li:hover{transform:translateY(-3px); box-shadow:var(--shadow-sm); border-color:var(--stroke-strong)}
.latest .wp-block-latest-posts__post-title{font-size:1.06rem; font-weight:600; line-height:1.5; color:var(--fg)}
.latest .wp-block-latest-posts__post-date{color:var(--fg-3); font-size:.85rem}
.latest .wp-block-latest-posts__post-excerpt{margin:.6em 0 0; color:var(--fg-2); font-size:.93rem; line-height:1.75}
.latest .wp-block-latest-posts__read-more{font-weight:600; font-size:13.5px}
.cta{border:1px solid var(--stroke) !important; border-radius:var(--r-lg) !important}
.navcard{height:100%; border-radius:var(--r-lg) !important; transition:transform .18s ease,box-shadow .18s ease}
.navcard:hover{transform:translateY(-3px); box-shadow:var(--shadow-sm)}
.navcard h3{margin:0 0 .4em}
.navcard h3 a{text-decoration:none; color:inherit}
.navcard p:last-child{margin-bottom:0}
.navgrid{margin-bottom:1.8em !important; gap:18px}
body.home .entry-header .entry-title,
body.home .ast-single-entry-banner{display:none}

/* ---------- 6. 归档 / 分类 / 博客列表 ---------- */
.ast-archive-description{border-bottom:1px solid var(--stroke); padding-bottom:14px; margin-bottom:8px}
.ast-archive-description .ast-archive-title,
.ast-archive-description .page-title{font-size:30px; letter-spacing:-.02em; color:var(--fg)}
.ast-archive-description p,.taxonomy-description{color:var(--fg-3); font-size:14.5px}
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-grid-common-col{
  background:#fff;
}
.ast-article-post{
  border:1px solid var(--stroke) !important; border-radius:var(--r-lg);
  padding:24px !important; margin-bottom:18px;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.ast-article-post:hover{transform:translateY(-2px); box-shadow:var(--shadow-sm); border-color:var(--stroke-strong) !important}
.ast-article-post .entry-title{font-size:20px; line-height:1.45; margin-bottom:.35em}
.ast-article-post .entry-title a{color:var(--fg)}
.ast-article-post .entry-title a:hover{color:var(--brand-1)}
.ast-article-post .entry-content{color:var(--fg-2); font-size:15px; line-height:1.8}
.ast-article-post .post-thumb img{border-radius:var(--r-md)}
.entry-meta,.ast-blog-meta,.ast-blog-single-element.ast-blog-meta{
  font-size:13px; color:var(--fg-3); display:flex; flex-wrap:wrap; gap:10px; align-items:center;
}
.entry-meta a{color:var(--fg-3)}
.entry-meta a:hover{color:var(--brand-1)}
.ast-blog-single-element.ast-blog-meta-separator--space{display:none}
.ast-pagination{display:flex; gap:8px; justify-content:center; margin:32px 0}
.ast-pagination .page-numbers{
  min-width:38px; height:38px; padding:0 12px; display:inline-flex !important; align-items:center; justify-content:center;
  border:1px solid var(--stroke); border-radius:var(--r-pill); background:#fff; color:var(--fg-2); font-size:14px;
}
.ast-pagination .page-numbers:hover{border-color:var(--stroke-strong); color:var(--fg)}
.ast-pagination .page-numbers.current{background:var(--brand-grad); border-color:transparent; color:#fff; box-shadow:var(--shadow-brand)}

/* ---------- 7. 文章页 ---------- */
.ast-single-post .entry-title{font-size:clamp(28px,3.4vw,40px); line-height:1.28; letter-spacing:-.02em}
.ast-single-post .entry-header{margin-bottom:18px}
.ast-single-post .post-thumb img{border-radius:var(--r-xl)}
.entry-content{color:var(--fg-2); font-size:16.5px; line-height:1.9}
.entry-content > *{max-width:100%}
.entry-content h2{margin:2em 0 .8em; font-size:24px; line-height:1.4; color:var(--fg)}
.entry-content h3{margin:1.6em 0 .6em; font-size:19px; line-height:1.5; color:var(--fg)}
.entry-content h4{margin:1.4em 0 .5em; font-size:17px; color:var(--fg)}
.entry-content p{margin-bottom:1.35em}
.entry-content ul,.entry-content ol{margin-bottom:1.35em; padding-left:1.4em}
.entry-content li{margin:.4em 0}
.entry-content a{text-decoration:underline; text-underline-offset:.18em}
.entry-content img{border-radius:var(--r-lg); border:1px solid var(--stroke)}
.wp-caption-text,figcaption{font-size:13px; color:var(--fg-3); text-align:center}
.entry-content blockquote{
  margin:1.6em 0; padding:4px 0 4px 20px; border-left:3px solid var(--brand-1);
  background:none; color:var(--fg-2); font-style:normal;
}
.entry-content blockquote cite{color:var(--fg-3); font-size:13.5px}
.entry-content code{
  font-family:var(--mono); font-size:.88em; background:var(--bg-soft);
  border:1px solid var(--stroke); border-radius:6px; padding:2px 6px; color:var(--fg);
}
.entry-content pre,.hcb_wrap{
  background:var(--bg-soft) !important; border:1px solid var(--stroke); border-radius:var(--r-lg);
  padding:16px 18px; overflow:auto;
}
.entry-content pre code,.hcb_wrap code{background:none; border:0; padding:0; font-size:13.5px; line-height:1.75}
.entry-content table{border-collapse:separate; border-spacing:0; border:1px solid var(--stroke); border-radius:var(--r-md); overflow:hidden; width:100%}
.entry-content th,.entry-content td{border-bottom:1px solid var(--stroke); padding:10px 14px; text-align:left}
.entry-content th{background:var(--bg-soft); color:var(--fg); font-weight:600}
.entry-content hr{border:0; border-top:1px solid var(--stroke); margin:2.4em 0}
.taxonomy-post-cat-link,.cat-links a,.tags-links a{color:var(--fg-3); font-size:13px}

/* ---------- 8. 评论 ---------- */
.comments-area{margin-top:56px; padding-top:30px; border-top:1px solid var(--stroke)}
.comments-title,.comment-reply-title{font-size:20px; letter-spacing:-.01em; color:var(--fg)}
.comment-list{list-style:none; padding:0; margin:0}
.comment-list .comment-body{padding:18px 0; border-bottom:1px solid var(--stroke)}
.comment-list .children{list-style:none; padding-left:24px}
.comment-list .avatar{border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px var(--stroke)}
.comment-author .fn{font-style:normal; font-weight:600; color:var(--fg)}
.comment-metadata{font-size:12.5px; color:var(--fg-3); margin-top:2px}
.comment-metadata a{color:var(--fg-3)}
.comment-content{margin-top:10px; color:var(--fg-2); font-size:14.5px; line-height:1.8}
.comment-respond{margin-top:36px}
.comment-form label{font-size:13.5px; color:var(--fg-3)}
.comment-form textarea,.comment-form input{border-radius:var(--r-md)}
.comment-form .form-submit input#submit{padding:.7em 1.6em}
.comment-reply-link{font-size:13px; color:var(--brand-1)}
.comment-navigation .nav-links,.pagination.navigation{display:flex; gap:12px; margin:20px 0}

/* ---------- 9. 搜索 / 空状态 / 404 ---------- */
.search-form{display:flex; gap:10px; align-items:center; max-width:520px}
.search-form .search-field{
  flex:1; border-radius:var(--r-pill) !important; padding:10px 18px !important;
  border:1px solid var(--stroke) !important; background:#fff;
}
.search-form .search-submit{border-radius:var(--r-pill); padding:11px 22px}
.no-results,.ast-no-search-result{padding:40px 24px; text-align:center; border:1px dashed var(--stroke-strong); border-radius:var(--r-lg); background:#fff}
.no-results .page-title,.ast-no-search-result h2{font-size:20px; margin-bottom:8px}
.no-results .page-content,.ast-no-search-result p{color:var(--fg-3); font-size:14.5px}
.error404 .site-content{padding-top:40px}
.error404 .page-title,.error404 .entry-title{font-size:clamp(34px,7vw,64px); line-height:1.1; letter-spacing:-.03em}
.error404 .page-content{color:var(--fg-3); font-size:15px; max-width:36em}
.error404 .ast-404-search{margin-top:22px}

/* ---------- 10. 成员条 / 悬浮发布按钮 ---------- */
.cottage-bar{
  background:var(--brand-grad-soft); border-bottom:1px solid var(--stroke);
  font-size:13.5px; color:var(--fg-2);
}
.cottage-bar .inner{
  max-width:1200px; margin:0 auto; padding:9px 24px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.cottage-bar .tag{
  background:var(--brand-grad); color:#fff; border-radius:var(--r-pill);
  font-size:11.5px; font-weight:700; padding:2px 8px;
}
.cottage-bar a{font-weight:600}
.cottage-fab{
  position:fixed; right:20px; bottom:24px; z-index:70;
  display:inline-flex; align-items:center; gap:8px;
  background:var(--brand-grad); color:#fff !important; border-radius:var(--r-pill);
  padding:12px 20px; font-weight:600; font-size:14px; text-decoration:none;
  box-shadow:0 14px 34px -12px rgba(91,82,255,.65);
  transition:transform .16s ease,box-shadow .16s ease,opacity .18s ease;
}
.cottage-fab:hover{transform:translateY(-2px); box-shadow:0 18px 40px -14px rgba(91,82,255,.75)}
/* 键盘 / 输入法状态条起来了就让位（front.js 加 .kb-hide） */
.cottage-fab.kb-hide{opacity:0; transform:translateY(16px); pointer-events:none}
/* 宽屏不挂悬浮球：那儿它离内容太远，孤零零漂在屏幕右下角；
   宽屏的常驻入口是顶栏右上那颗「发新帖」（.cottage-nav-new） */
@media (min-width:1101px){ .cottage-fab{display:none} }
@media print{.cottage-fab,.cottage-bar{display:none}}

/* ---------- 11. 响应式 ---------- */
@media (max-width:1024px){
  .navgrid,.cards{flex-wrap:wrap}
}
@media (max-width:768px){
  body{font-size:16px}
  body.admin-bar .site-header{top:46px}
  .hero{padding:30px 22px !important}
  .hero h1{font-size:30px !important}
  .latest .wp-block-latest-posts__list{grid-template-columns:1fr}
  .ast-article-post{padding:18px !important}
  /* 避开 iPhone 底部那条横条（safe-area） */
  .cottage-fab{right:14px; bottom:calc(16px + env(safe-area-inset-bottom,0px)); padding:11px 16px; font-size:13.5px}
  .cottage-bar .inner{padding:8px 18px}
}

/* ---------- 12. 通用小工具类（发布页、成员条等用到） ---------- */
.badge{
  display:inline-flex; align-items:center; gap:8px; height:32px; padding:0 14px;
  border-radius:var(--r-pill); font-size:13px; font-weight:500; color:var(--brand-ink);
  background:var(--brand-grad-soft); border:1px solid rgba(91,82,255,.16);
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:44px; padding:0 22px; border-radius:var(--r-pill); font-size:15px; font-weight:600;
  border:1px solid transparent; cursor:pointer; transition:transform .16s ease,box-shadow .16s ease;
}
.btn-primary{background:var(--brand-grad); color:#fff !important; box-shadow:var(--shadow-brand)}
.btn-primary:hover{transform:translateY(-2px); box-shadow:0 14px 34px -10px rgba(91,82,255,.55)}
.btn-ghost{background:#fff; color:var(--fg) !important; border-color:var(--stroke)}
.btn-ghost:hover{border-color:var(--stroke-strong); transform:translateY(-2px); box-shadow:var(--shadow-xs)}

/* ---------- 13. 前台发布页 ---------- */
.cottage-compose-page .entry-header,
.cottage-compose-page .ast-single-entry-banner{display:none}
.cottage-compose-page .site-content .ast-container{padding-top:8px}
.cottage-compose{max-width:1200px; margin:0 auto}
.compose-head{padding:26px 0 0; max-width:44em}
.compose-head h1{margin:16px 0 0; font-size:clamp(26px,3.2vw,34px); letter-spacing:-.02em}
.compose-head p{margin:12px 0 0; color:var(--fg-2); font-size:15.5px}
.compose-form{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:28px; align-items:start; margin:26px 0 60px}
.editor{padding:26px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg); box-shadow:var(--shadow-sm)}
.editor-title{
  width:100%; border:0 !important; outline:0; background:transparent !important; color:var(--fg);
  font-size:26px; font-weight:650; letter-spacing:-.02em; padding:0 0 14px !important;
  border-bottom:1px solid var(--stroke) !important; border-radius:0 !important; box-shadow:none !important;
}
.editor-title::placeholder{color:var(--fg-3); font-weight:500}
.editor-tools{display:flex; flex-wrap:wrap; gap:6px; padding:12px 0; border-bottom:1px solid var(--stroke)}
.tool{
  min-width:34px; height:34px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid transparent; border-radius:var(--r-sm); background:transparent; color:var(--fg-2);
  font-size:13.5px; cursor:pointer; box-shadow:none !important;
}
.tool:hover{background:var(--bg-soft); border-color:var(--stroke); transform:none !important}
.editor-body{
  width:100%; min-height:340px; border:0 !important; outline:0; resize:vertical; background:transparent !important;
  font-family:var(--font); font-size:16px; line-height:1.9; color:var(--fg); padding:16px 0 0 !important;
  border-radius:0 !important; box-shadow:none !important;
}
.editor-body::placeholder{color:var(--fg-3)}
.editor-foot{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:16px; padding-top:16px; border-top:1px solid var(--stroke)}
.editor-foot .hint{font-size:12.5px; color:var(--fg-3)}
.editor-actions{display:flex; gap:10px; flex-wrap:wrap}
.side-card{padding:20px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg)}
.side-card + .side-card{margin-top:14px}
.side-card h3{margin:0 0 12px; font-size:14px; letter-spacing:.01em}
.field{margin-bottom:14px}
.field label{display:block; font-size:12.5px; color:var(--fg-3); margin-bottom:6px}
.field input,.field select{width:100%; height:38px}
.side-note{margin:0; font-size:12.5px; line-height:1.8; color:var(--fg-3)}
.mine{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px}
.mine li{display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:13.5px}
.mine li a{color:var(--fg-2); text-decoration:none}
.mine li a:hover{color:var(--brand-1)}
.mine li span{font-size:11.5px; color:var(--fg-3); white-space:nowrap}
.cottage-gate{
  max-width:520px; margin:60px auto; padding:36px; text-align:center;
  background:#fff; border:1px solid var(--stroke); border-radius:var(--r-xl); box-shadow:var(--shadow-sm);
}
.cottage-gate h2{margin:18px 0 0; font-size:22px}
.cottage-gate p{margin:12px 0 22px; color:var(--fg-3); font-size:14.5px; line-height:1.8}
.cottage-ok .tag{background:linear-gradient(90deg,#10b981,#22d3ee)}

@media (max-width:1024px){
  .compose-form{grid-template-columns:1fr}
}

/* =========================================================
   14. 补齐设计稿的页面结构（页头品牌 / 页脚 / 动态 / 留言 / 文章增强）
   ========================================================= */

/* ---------- 页头：渐变 logo 标记 + 去 tagline ---------- */
.site-title a{display:inline-flex; align-items:center; gap:10px}
.site-title a::before{
  content:"屋"; display:grid; place-items:center; width:32px; height:32px; border-radius:10px;
  background:var(--brand-grad); color:#fff; font-size:15px; font-weight:700;
  box-shadow:var(--shadow-brand); flex:0 0 32px;
}
.site-description{display:none}

/* ---------- 页脚（紧凑版：两行，不再占一大块） ---------- */
.cottage-footer{background:var(--bg-soft); border-top:1px solid var(--stroke); padding:16px 0 0}
.cottage-footer .inner{
  max-width:1200px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; gap:8px 18px; flex-wrap:wrap;
}
.cottage-footer .brand{display:inline-flex; align-items:center; gap:9px; font-weight:700; color:var(--fg); font-size:15px}
.cottage-footer .brand::before{
  content:"屋"; display:grid; place-items:center; width:27px; height:27px; border-radius:9px;
  background:var(--brand-grad); color:#fff; font-size:13px; font-weight:700;
}
.cottage-footer .tag{font-size:13px; color:var(--fg-3)}
.cottage-footer .flinks{margin-left:auto; display:flex; align-items:center; gap:6px 15px; flex-wrap:wrap}
.cottage-footer .flinks a{font-size:13px; color:var(--fg-3); text-decoration:none}
.cottage-footer .flinks a:hover{color:var(--brand-1)}
.cottage-footer .flinks .div{width:1px; height:13px; background:var(--stroke-strong); margin:0 3px}
.cottage-footer .friends{display:flex; align-items:center}
.cottage-footer .friends span{
  width:25px; height:25px; border-radius:50%; display:grid; place-items:center; margin-right:-7px;
  background:var(--brand-grad); color:#fff; font-size:11px; border:2px solid var(--bg-soft);
}
.cottage-footer .bottom{
  max-width:1200px; margin:13px auto 0; padding:11px 24px 15px; border-top:1px solid var(--stroke);
  display:flex; justify-content:space-between; gap:6px 16px; flex-wrap:wrap; font-size:12.5px; color:var(--fg-3);
}
.cottage-footer .bottom a{color:var(--fg-3)}
.cottage-footer .bottom a:hover{color:var(--brand-1)}
/* 公安备案的警徽图标（官方 20×20，页面里按 16 显示，跟文字基线对齐） */
.cottage-footer .beian-ico{width:16px; height:16px; vertical-align:-3px; margin-right:4px; border:0; border-radius:2px}
@media (max-width:900px){
  .cottage-footer .inner{padding:0 18px}
  .cottage-footer .flinks{margin-left:0; flex-basis:100%; order:3}   /* 窄屏：链接自己占一行 */
  .cottage-footer .bottom{padding:11px 18px 15px}
}

/* ---------- 通用页头（动态 / 留言页复用） ---------- */
.page-head{padding:36px 0 0; max-width:760px}
.page-head h1{margin:16px 0 0; font-size:clamp(26px,3.2vw,36px); letter-spacing:-.02em}
.page-head p{margin:12px 0 0; color:var(--fg-2); font-size:15.5px; line-height:1.85}

/* ---------- 动态时间线 ---------- */
.timeline{position:relative; padding-left:26px; margin-top:28px}
.timeline::before{content:""; position:absolute; left:5px; top:8px; bottom:8px; width:2px; border-radius:2px;
  background:linear-gradient(var(--brand-1),var(--brand-2),var(--brand-3)); opacity:.35}
.tl-item{position:relative; padding-bottom:22px}
.tl-item::before{content:""; position:absolute; left:-26px; top:24px; width:12px; height:12px; border-radius:50%;
  background:#fff; border:2px solid var(--brand-1); box-shadow:0 0 0 4px #fff}
.tl-date{font-size:12.5px; color:var(--fg-3); margin-bottom:8px}
.tl-body{padding:20px 22px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg); transition:.18s ease}
.tl-body:hover{transform:translateY(-2px); box-shadow:var(--shadow-sm)}
.tl-body h3{margin:0; font-size:16.5px; line-height:1.55}
.tl-body h3 a{color:var(--fg)}
.tl-body p{margin:8px 0 0; color:var(--fg-2); font-size:14.5px; line-height:1.8}
.kind{display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 10px; border-radius:var(--r-pill);
  font-size:12px; font-weight:600; margin-right:8px; vertical-align:2px}
.kind.k1{background:rgba(91,82,255,.12); color:#3d34d6}
.kind.k2{background:rgba(185,92,240,.12); color:#8f36bd}
.kind.k3{background:rgba(255,138,92,.14); color:#c2542a}
.kind.k4{background:rgba(14,165,233,.14); color:#0b7ea6}
.composer-cta{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:22px; padding:18px 20px;
  border-radius:var(--r-lg); background:var(--brand-grad-soft); border:1px solid rgba(91,82,255,.16)}
.composer-cta p{margin:0; font-size:14px; color:var(--fg-2); flex:1; min-width:200px}

/* ---------- 留言板 ---------- */
.cottage-guestbook .comment-list{list-style:none; padding:0; margin:26px 0 0}
.cottage-guestbook .comment-list .comment-body{
  padding:20px 22px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg); margin-bottom:14px;
}
.cottage-guestbook .comment-list .children .comment-body{background:var(--bg-soft)}
.cottage-guestbook .comment-respond{margin-top:32px; padding:22px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg)}
.cottage-guestbook .comment-reply-title{font-size:17px}
.cottage-guestbook .comment-form .comment-form-comment{display:block}
.cottage-guestbook .comment-form textarea{min-height:110px}

/* ---------- 文章页增强：目录 / 作者卡 / 相关文章 / 操作条 / 进度条 ---------- */
.progress{position:fixed; top:0; left:0; height:3px; width:0; background:var(--brand-grad); z-index:99; transition:width .1s linear}
body.admin-bar .progress{top:32px}
@media (max-width:768px){ body.admin-bar .progress{top:46px} }
.cottage-toc{margin:0 0 28px; padding:18px 22px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg)}
.cottage-toc strong{display:block; font-size:12.5px; letter-spacing:.06em; color:var(--fg-3); margin-bottom:10px}
.cottage-toc a{display:block; padding:5px 0; font-size:14px; color:var(--fg-3)}
.cottage-toc a.on{color:var(--fg); font-weight:600}
.cottage-toc a.lv3{padding-left:14px; font-size:13.5px}
.cottage-actions{display:flex; flex-wrap:wrap; gap:10px; margin:32px 0 0}
.cottage-actions .act{
  display:inline-flex; align-items:center; gap:7px; height:38px; padding:0 16px; font-size:14px; font-family:inherit;
  border:1px solid var(--stroke); border-radius:var(--r-pill); background:#fff; color:var(--fg-2); text-decoration:none;
  transition:.16s ease; cursor:pointer;
}
.cottage-actions .act:hover{border-color:var(--stroke-strong); transform:translateY(-1px); color:var(--fg)}
.cottage-actions .act.on{background:var(--brand-grad-soft); border-color:rgba(91,82,255,.3); color:var(--brand-ink); font-weight:600}
.cottage-author{display:flex; gap:16px; align-items:flex-start; margin-top:36px; padding:22px;
  background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg)}
.cottage-author .who{font-size:16px; font-weight:650; color:var(--fg)}
.cottage-author p{margin:6px 0 0; font-size:14px; color:var(--fg-3); line-height:1.8}
.cottage-author .avatar{border-radius:50%}
.cottage-related{margin-top:40px}
.cottage-related h2{font-size:20px; margin:0 0 16px}
.cottage-related .grid{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}
.cottage-related .grid a{padding:18px; background:#fff; border:1px solid var(--stroke); border-radius:var(--r-lg); transition:.18s ease}
.cottage-related .grid a:hover{transform:translateY(-3px); box-shadow:var(--shadow-sm)}
.cottage-related h3{margin:8px 0 0; font-size:15px; line-height:1.55; color:var(--fg)}
@media (max-width:1024px){ .cottage-related .grid{grid-template-columns:1fr 1fr} }
@media (max-width:768px){ .cottage-related .grid{grid-template-columns:1fr} }

/* ---------- 15. 页脚接管：隐藏 Astra 默认版权条 ---------- */
.site-footer{padding:0 !important; background:transparent !important; border-top:0 !important}
.site-below-footer-wrap{display:none !important}
.entry-content .cottage-actions a.act{text-decoration:none}
.entry-content .cottage-actions .act b{font-weight:600}
.entry-content .cottage-author p{margin:6px 0 0}
.wall-foot a{color:var(--brand-1)}

/* FAB 在窄屏留出底部安全距离，避免压住页脚内容（含 iPhone 底部横条） */
@media (max-width:768px){
  body.cottage-has-fab{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
}
