@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root{
  --red:#ff0000;
  --violet:#8b00ff;
  --ink:#261717;
  --muted:#6f5b5b;
  --glass:rgba(255,255,255,.58);
  --edge:rgba(255,255,255,.72);
  --r:18px;
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  font-family:Figtree,"Noto Sans",system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.72;
  color:var(--ink);
  background:
    radial-gradient(58vw 58vw at 6% -8%, rgba(255,0,0,.30), transparent 62%),
    radial-gradient(54vw 54vw at 98% 6%, rgba(139,0,255,.26), transparent 60%),
    radial-gradient(72vw 52vw at 50% 110%, rgba(139,0,255,.18), transparent 66%),
    linear-gradient(180deg,#fff8f8 0%,#fdf3fb 42%,#fbf6ff 100%);
  background-attachment:fixed;
  padding-bottom:164px;
  overflow-wrap:break-word;
}

img{max-width:100%;height:auto;display:block}

a{color:inherit}

a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline:2px solid var(--violet);
  outline-offset:2px;
  border-radius:8px;
}

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:0 14px;
}

/* ---------- 底部固定条 ---------- */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:60;
  display:flex;
  justify-content:center;
  padding:9px 10px calc(9px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.52);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  backdrop-filter:blur(18px) saturate(150%);
  border-top:1px solid rgba(255,255,255,.85);
  box-shadow:0 -14px 36px rgba(38,23,23,.14);
}

.dock-in{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
  width:100%;
  max-width:1120px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:2px 4px;
  text-decoration:none;
  color:var(--ink);
  font-weight:600;
  letter-spacing:.01em;
}

.brand b{font-size:16px;font-weight:600}

.dot{
  width:22px;height:22px;
  flex:none;
  border-radius:8px;
  background:linear-gradient(135deg,var(--red),var(--violet));
  box-shadow:0 5px 14px rgba(139,0,255,.42);
}

.mark{width:24px;height:24px;flex:none;object-fit:contain;border-radius:8px}

.dock-nav{
  order:3;
  flex:1 1 100%;
  display:flex;
  gap:6px;
  min-width:0;
  overflow-x:auto;
  padding:2px 0;
  scrollbar-width:none;
}

.dock-nav::-webkit-scrollbar{display:none}

.dock-nav a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:9px 12px;
  border-radius:13px;
  font-size:16px;
  line-height:1.3;
  white-space:nowrap;
  text-decoration:none;
  color:var(--ink);
  background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.8);
  transition:background .2s ease,color .2s ease;
}

.dock-nav a svg{width:16px;height:16px;flex:none;color:var(--violet)}

.dock-nav a:hover,
.dock-nav a:focus-visible{background:rgba(255,0,0,.12);color:#a80000}

.dock-nav a.off{display:none}

.search{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:2px;
  padding:2px 3px;
  border-radius:14px;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(255,255,255,.9);
}

.search input{
  width:80px;
  min-height:40px;
  padding:0 8px;
  border:0;
  background:transparent;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  outline:none;
  -webkit-appearance:none;
  appearance:none;
}

.search button{
  display:grid;
  place-items:center;
  min-width:40px;
  min-height:40px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--violet);
  cursor:pointer;
}

.search button svg{width:18px;height:18px}

/* ---------- 主区 ---------- */
.hero{
  display:grid;
  gap:16px;
  align-items:center;
  min-height:45vh;
  padding:20px 0 8px;
}

.hero-copy{text-align:center}

.hero h1{
  margin:0 0 10px;
  font-size:clamp(1.65rem,6.4vw,2.45rem);
  line-height:1.26;
  letter-spacing:-.012em;
  font-weight:700;
  background:linear-gradient(120deg,#261717 30%,#a3005c 70%,#7a00e0);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.lede{
  margin:0 auto;
  max-width:36ch;
  font-size:16px;
  color:var(--muted);
}

.fig{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--edge);
  background:linear-gradient(135deg,rgba(255,0,0,.24),rgba(139,0,255,.28));
  box-shadow:0 20px 48px rgba(38,23,23,.18);
  aspect-ratio:16/10;
  min-height:170px;
}

.fig img{width:100%;height:100%;object-fit:cover}

.badge{
  position:absolute;
  left:12px;
  bottom:12px;
  display:flex;
  align-items:center;
  max-width:80%;
  min-height:40px;
  padding:8px 14px;
  border-radius:14px;
  font-size:16px;
  font-weight:500;
  text-decoration:none;
  color:var(--ink);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  background:rgba(255,255,255,.66);
  border:1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 22px rgba(38,23,23,.16);
}

.board{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:20px;
  margin:10px 0 26px;
}

.post{
  padding:6px 16px 20px;
  border-radius:24px;
  background:rgba(255,255,255,.6);
  border:1px solid rgba(255,255,255,.78);
  -webkit-backdrop-filter:blur(15px);
  backdrop-filter:blur(15px);
  box-shadow:0 22px 52px rgba(38,23,23,.11);
}

.post > div{
  padding:22px 0 6px;
  margin-top:16px;
  border-top:1px dashed rgba(38,23,23,.16);
  scroll-margin-top:14px;
}

.post > div:first-child{
  margin-top:0;
  border-top:0;
  padding-top:18px;
}

.post h2{
  margin:26px 0 12px;
  font-size:1.3rem;
  line-height:1.4;
  letter-spacing:-.01em;
}

.post h2:first-child{margin-top:6px}

.post h2 > span{
  position:relative;
  z-index:0;
  display:inline-block;
}

.post h2 > span::after{
  content:"";
  position:absolute;
  left:-2px;right:-2px;bottom:0;
  height:9px;
  border-radius:9px;
  background:linear-gradient(90deg,rgba(255,0,0,.35),rgba(139,0,255,.28));
  z-index:-1;
}

.post h3{
  margin:22px 0 8px;
  font-size:1.08rem;
  line-height:1.45;
}

.post h3 > span{
  border-bottom:2px solid rgba(139,0,255,.4);
  padding-bottom:1px;
}

.post p{margin:0 0 14px}

.post ul,.post ol{margin:0 0 16px;padding-left:1.3em}

.post li{margin:0 0 8px}

.post a{
  color:#bf0033;
  text-decoration:underline;
  text-underline-offset:3px;
}

.post a:hover{color:var(--violet)}

.post strong{color:#a1006e}

.post blockquote{
  margin:0 0 16px;
  padding:12px 16px;
  border-left:4px solid rgba(139,0,255,.45);
  border-radius:0 14px 14px 0;
  background:rgba(255,255,255,.6);
  color:#3c2626;
}

.post table{
  width:100%;
  margin:0 0 16px;
  border-collapse:collapse;
  font-size:16px;
}

.post th,.post td{
  padding:9px 10px;
  text-align:left;
  border-bottom:1px solid rgba(38,23,23,.14);
  vertical-align:top;
}

.post th{background:rgba(255,0,0,.07)}

.post hr{
  border:0;
  border-top:1px dashed rgba(38,23,23,.18);
  margin:20px 0;
}

.post code{
  font-size:.94em;
  padding:1px 5px;
  border-radius:6px;
  background:rgba(38,23,23,.08);
}

.post pre{
  overflow-x:auto;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(38,23,23,.9);
  color:#fbeeee;
}

.post pre code{background:none;padding:0;color:inherit}

/* ---------- 侧栏 ---------- */
.side{
  display:grid;
  gap:14px;
  align-content:start;
}

.side-card{
  padding:16px 16px 14px;
  border-radius:var(--r);
  background:#fff;
  box-shadow:0 12px 28px rgba(38,23,23,.1);
}

.side-card h2{
  margin:0 0 10px;
  font-size:16px;
  letter-spacing:.08em;
  color:#8a0050;
}

.side-card h2 > span{
  display:inline-block;
  padding-bottom:2px;
  border-bottom:2px solid rgba(255,0,0,.3);
}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:6px;
}

.side-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:8px 11px;
  border-radius:12px;
  font-size:16px;
  line-height:1.35;
  text-decoration:none;
  color:var(--ink);
  background:linear-gradient(180deg,#fdf5f9,#fbf0f7);
  transition:background .2s ease,color .2s ease;
}

.side-list a:hover,
.side-list a:focus-visible{background:rgba(139,0,255,.12);color:#6b00c4}

/* ---------- 页脚 ---------- */
.foot-wrap{padding:0 14px}

.foot{
  max-width:1120px;
  margin:0 auto 18px;
  padding:22px 18px 14px;
  border-radius:24px;
  display:grid;
  gap:20px;
  color:#f8eded;
  background:rgba(38,23,23,.94);
  box-shadow:0 18px 40px rgba(38,23,23,.24);
}

.foot a{color:#ffd8dc;text-decoration:none}

.foot a:hover,.foot a:focus-visible{color:#fff;text-decoration:underline;text-underline-offset:3px}

.foot-brand .brand{color:#fff;padding:0}

.foot-brand p{
  margin:8px 0 0;
  font-size:16px;
  line-height:1.65;
  color:#d6c3c6;
}

.foot-cols{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 14px;
}

.foot h3{
  margin:0 0 8px;
  font-size:16px;
  letter-spacing:.06em;
  color:#ffb9c2;
  font-weight:600;
}

.foot h3 > span{
  display:inline-block;
  padding-bottom:2px;
  border-bottom:2px solid rgba(255,0,0,.55);
}

.foot dl{margin:0;display:grid;gap:2px}

.foot dt{font-size:16px;line-height:1.4}

.foot dt a{display:inline-flex;align-items:center;min-height:40px}

.foot dd{margin:0 0 6px;font-size:15px;color:#c9b6ba}

.foot nav dd{display:none}

.copy{
  grid-column:1/-1;
  margin:2px 0 4px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.14);
  text-align:center;
  font-size:16px;
  color:#dccbce;
}

/* ---------- 回到顶部 ---------- */
.top{
  position:fixed;
  right:12px;
  bottom:170px;
  z-index:59;
  display:none;
  align-items:center;
  min-height:44px;
  padding:0 15px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.9);
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  color:var(--ink);
  font:inherit;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(38,23,23,.16);
}

.top.on{display:inline-flex}

/* ---------- 滚动显现 ---------- */
.rv{opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}

.rv.in{opacity:1;transform:none}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  .badge{transition:none}
}

/* ---------- 断点 ---------- */
@media (min-width:620px){
  .wrap{padding:0 22px}
  .foot-wrap{padding:0 22px}
  .post{padding:10px 26px 24px}
  .search input{width:110px}
}

@media (min-width:820px){
  body{padding-bottom:104px}
  .hero{
    grid-template-columns:minmax(0,1fr) minmax(0,.92fr);
    gap:26px;
    min-height:45vh;
    padding:26px 0 12px;
  }
  .top{bottom:102px}
}

@media (min-width:900px){
  .board{grid-template-columns:minmax(0,1fr) 284px;gap:26px;align-items:start}
  .side{position:sticky;top:18px}
  .post > div{scroll-margin-top:20px}
  .foot{grid-template-columns:1fr 1.5fr;padding:26px 24px 16px}
  .foot-cols{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dock-nav{order:0;flex:1 1 auto}
  .dock-in{flex-wrap:nowrap}
}

@media (min-width:1100px){
  .post{padding:14px 34px 28px}
}

button[aria-expanded]{min-width:44px;min-height:44px}
