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

:root{
  --sky:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#fdf8ec;
  --pop:6px 6px 0 #000;
  --pop-sm:4px 4px 0 #000;
  --edge:3px solid #000;
  --title:"Righteous","Poppins","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --body:"Poppins","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}

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

body{
  margin:0;
  padding-bottom:104px;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.72;
  overflow-x:hidden;
}

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

h1,h2,h3,h4{
  font-family:var(--title);
  font-weight:700;
  letter-spacing:.01em;
}

a{color:inherit}

:focus-visible{outline:3px solid var(--red);outline-offset:3px}

/* 角落品牌图标 */
.mark{
  position:fixed;
  top:14px;
  left:14px;
  z-index:90;
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#fff;
  border:var(--edge);
  border-radius:16px;
  box-shadow:var(--pop-sm);
  text-decoration:none;
}
.mark:active{transform:translate(2px,2px);box-shadow:2px 2px 0 #000}
.markimg{width:100%;height:100%;object-fit:cover}
.markch{font-family:var(--title);font-size:26px;line-height:1}

/* 底部固定条 */
.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:80;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:#fff;
  border-top:var(--edge);
}

.drawer{position:relative}
.drawer summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:10px 20px;
  background:var(--red);
  border:var(--edge);
  border-radius:999px;
  box-shadow:var(--pop-sm);
  font-family:var(--title);
  font-size:16px;
  font-weight:700;
}
.drawer summary::-webkit-details-marker{display:none}
.drawer summary::after{
  content:"";
  width:0;
  height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-bottom:7px solid #000;
}
.drawer[open] summary{background:#fff;transform:translate(2px,2px);box-shadow:2px 2px 0 #000}
.drawer[open] summary::after{border-bottom:0;border-top:7px solid #000}

.stack{
  position:absolute;
  left:0;
  bottom:calc(100% + 16px);
  margin:0;
  padding:12px;
  list-style:none;
  width:min(86vw,440px);
  max-height:60vh;
  overflow:auto;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  background:#fff;
  border:var(--edge);
  border-radius:24px;
  box-shadow:var(--pop);
}
.stack li{flex:0 0 auto}
.stack a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 16px;
  background:var(--sky);
  border:var(--edge);
  border-radius:999px;
  color:#000;
  text-decoration:none;
  font-size:16px;
  font-weight:700;
}
.stack li:nth-child(2n) a{background:#fff}
.stack a:hover{background:var(--red)}

.seek{
  flex:1;
  min-width:0;
  max-width:460px;
  margin-left:auto;
  display:flex;
}
.seek input{
  width:100%;
  min-height:46px;
  padding:8px 18px;
  font-family:var(--body);
  font-size:16px;
  color:#000;
  background:#fff;
  border:var(--edge);
  border-radius:999px;
  box-shadow:var(--pop-sm);
}
.seek input:focus{background:#eaf7ff;outline:none}

/* 主体网格：内容左栏贴 aside */
main{
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  column-gap:26px;
  row-gap:0;
  align-items:start;
  max-width:1120px;
  margin:0 auto;
  padding:78px 18px 40px;
}

main > section{
  grid-column:2;
  min-width:0;
  margin-bottom:22px;
}

main > aside{
  grid-column:1;
  grid-row:2 / span 24;
  position:sticky;
  top:86px;
}

/* 顶部大图 */
main > .hero{
  grid-column:1 / -1;
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  min-height:clamp(250px,45vh,400px);
  padding:22px;
  background:var(--sky);
  border:var(--edge);
  border-radius:28px;
  box-shadow:8px 8px 0 #000;
  overflow:hidden;
}

.herofig{
  position:absolute;
  inset:0;
  margin:0;
  background:var(--sky);
}
.heroimg{width:100%;height:100%;object-fit:cover;transform:scale(1.06)}
.herofig::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.42);
  pointer-events:none;
}

.badge{
  position:absolute;
  z-index:3;
  top:16px;
  right:16px;
  padding:5px 16px;
  background:var(--red);
  border:var(--edge);
  border-radius:999px;
  box-shadow:var(--pop-sm);
  font-family:var(--title);
  font-size:16px;
  font-weight:700;
}

.herotxt{
  position:relative;
  z-index:2;
  max-width:min(660px,92%);
  text-align:right;
}
.herotxt h1{
  margin:0;
  font-size:clamp(28px,5.4vw,52px);
  line-height:1.16;
  color:#fff;
  text-shadow:3px 3px 0 #000;
  word-break:break-word;
}

/* 左侧栏 */
.railcard{
  display:grid;
  gap:10px;
  padding:16px;
  background:#000;
  border:var(--edge);
  border-radius:24px;
  box-shadow:6px 6px 0 var(--red);
}
.railfig{
  margin:0;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#fff;
  border:var(--edge);
  border-radius:16px;
}
.raillogo{width:100%;height:100%;object-fit:cover}
.railch{font-family:var(--title);font-size:44px;color:#000}
.kick{
  justify-self:start;
  padding:2px 12px;
  background:var(--sky);
  border:var(--edge);
  border-radius:999px;
  font-size:16px;
  font-weight:700;
  color:#000;
}
.railname{
  margin:0;
  font-size:24px;
  line-height:1.2;
  color:#fff;
  word-break:break-word;
}

/* 正文区块 */
main > section[id]{
  grid-column:2;
  min-width:0;
  margin-bottom:24px;
  padding:24px 22px 26px;
  background:#fff;
  border:var(--edge);
  border-bottom:10px solid var(--sky);
  border-radius:28px;
  box-shadow:8px 8px 0 #000;
  scroll-margin-top:88px;
}
main > section[id]:nth-of-type(2n){border-bottom-color:var(--red)}

main > section[id] h2{
  margin:0 0 12px;
  padding-left:14px;
  border-left:9px solid var(--sky);
  font-size:clamp(22px,2.9vw,30px);
  line-height:1.26;
}
main > section[id]:nth-of-type(2n) h2{border-left-color:var(--red)}

main > section[id] h3{
  margin:20px 0 8px;
  padding-left:12px;
  border-left:7px solid var(--red);
  font-size:20px;
  line-height:1.3;
}

main > section[id] small{
  display:block;
  margin-bottom:6px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.06em;
}

main > section[id] p{margin:0 0 14px}
main > section[id] strong{font-weight:700}
main > section[id] em{font-style:normal;box-shadow:inset 0 -8px 0 var(--sky)}
main > section[id] ul,
main > section[id] ol{margin:0 0 14px;padding-left:24px}
main > section[id] li{margin:6px 0}
main > section[id] li::marker{color:var(--red);font-weight:700}

main > section[id] a{
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-underline-offset:3px;
}
main > section[id] a:hover{background:var(--sky)}

main > section[id] img{
  height:auto;
  margin:14px 0;
  border:var(--edge);
  border-radius:18px;
  box-shadow:5px 5px 0 #000;
}

main > section[id] figure{margin:16px 0}

main > section[id] blockquote{
  margin:16px 0;
  padding:14px 16px;
  background:#fff2f2;
  border:var(--edge);
  border-left:10px solid var(--red);
  border-radius:18px;
}
main > section[id] blockquote p:last-child{margin-bottom:0}

main > section[id] table{
  display:block;
  width:100%;
  margin:14px 0;
  overflow-x:auto;
  border-collapse:collapse;
  font-size:16px;
}
main > section[id] th,
main > section[id] td{
  border:var(--edge);
  padding:8px 10px;
  text-align:left;
}
main > section[id] th{background:var(--sky)}

main > section[id] > :last-child{margin-bottom:0}

/* 页脚 */
.end{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  max-width:1120px;
  margin:0 auto;
  padding:26px 18px 18px;
}
.end p{
  margin:0;
  padding:6px 22px;
  background:var(--red);
  border:var(--edge);
  border-radius:999px;
  box-shadow:5px 5px 0 #000;
  font-family:var(--title);
  font-size:clamp(20px,3.6vw,32px);
  line-height:1.3;
}
.end small{font-size:16px;font-weight:600}

/* 动效 */
.rv{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .5s ease,transform .5s ease;
}
.rv.in{opacity:1;transform:none}

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

@media (max-width:880px){
  body{font-size:16px;padding-bottom:96px}
  main{
    grid-template-columns:1fr;
    column-gap:0;
    padding:74px 14px 28px;
  }
  main > section,
  main > section[id],
  main > .hero{grid-column:1}
  main > aside{grid-column:1;grid-row:auto;position:static;margin-bottom:18px}
  .railcard{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px;
    border-radius:20px;
    box-shadow:5px 5px 0 var(--red);
  }
  .railfig{width:64px;flex:0 0 64px;border-radius:12px}
  .railch{font-size:30px}
  .railname{font-size:20px}
  .kick{position:absolute;margin-top:-46px;margin-left:76px}
  .hero{min-height:clamp(230px,44vh,340px);padding:16px;border-radius:24px;box-shadow:6px 6px 0 #000}
  main > section[id]{padding:20px 16px 22px;border-radius:22px;box-shadow:5px 5px 0 #000;border-bottom-width:8px}
  .end{flex-wrap:wrap;padding:22px 14px 16px}
}

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