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

:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#f2efe6;
  --white:#fff;
  --line:3px solid var(--ink);
  --shadow:5px 5px 0 var(--ink);
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",system-ui,-apple-system,sans-serif;
  font-size:17px;
  line-height:1.8;
  overflow-x:hidden;
}

h1,h2,h3,h4{
  font-family:"Noto Serif JP","Hiragino Mincho ProN","Yu Mincho",serif;
  font-weight:700;
  letter-spacing:.015em;
}

a{color:var(--ink)}
img{max-width:100%;height:auto;display:block}

main [id]{scroll-margin-top:104px}

/* ---------- 顶栏 ---------- */
.bar{
  position:sticky;
  top:0;
  z-index:40;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  background:var(--white);
  border-bottom:4px solid var(--ink);
}

.brand{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:4px 6px;
  font-family:"Noto Serif JP",serif;
  font-weight:700;
  font-size:clamp(1rem,4.2vw,1.28rem);
  line-height:1.2;
  text-decoration:none;
  letter-spacing:.03em;
  text-align:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 14px;
  border:var(--line);
  border-radius:999px;
  background:var(--red);
  color:var(--white);
  font-weight:700;
  font-size:16px;
  text-decoration:none;
  box-shadow:3px 3px 0 var(--ink);
  transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn:hover{
  transform:translate(-2px,-2px);
  box-shadow:6px 6px 0 var(--ink);
  background:var(--blue);
  color:var(--ink);
}

/* ---------- 折叠菜单 ---------- */
.nav{position:relative}

.nav>summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:0 15px;
  border:var(--line);
  border-radius:999px;
  background:var(--blue);
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  box-shadow:3px 3px 0 var(--ink);
}

.nav>summary::-webkit-details-marker{display:none}
.nav>summary::before{content:"≡";font-size:1.2em;line-height:1}

.nav>menu{
  position:absolute;
  left:0;
  top:calc(100% + 12px);
  margin:0;
  padding:10px;
  min-width:232px;
  list-style:none;
  display:grid;
  gap:7px;
  background:var(--white);
  border:var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
}

.nav menu a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:4px 14px;
  border:var(--line);
  border-radius:999px;
  background:var(--white);
  font-weight:700;
  font-size:16px;
  text-decoration:none;
  transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.nav menu a:hover{
  background:var(--blue);
  transform:translate(-2px,-2px);
  box-shadow:3px 3px 0 var(--ink);
}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  display:grid;
  gap:22px;
  align-content:start;
  overflow:hidden;
  padding:42px 18px 50px;
  min-height:clamp(430px,70vh,700px);
  background:var(--white);
  border-bottom:4px solid var(--ink);
}

.hero::before{
  content:"八";
  position:absolute;
  right:-2vw;
  top:-7vh;
  z-index:0;
  font-family:"Noto Serif JP",serif;
  font-weight:700;
  font-size:clamp(170px,32vw,360px);
  line-height:1;
  color:var(--blue);
  opacity:.32;
  pointer-events:none;
}

.hero>*{position:relative;z-index:1}

.tag{
  display:inline-block;
  margin:0 0 14px;
  padding:4px 15px;
  border:var(--line);
  border-radius:999px;
  background:var(--red);
  color:var(--white);
  font-weight:700;
  font-size:15px;
  letter-spacing:.06em;
  box-shadow:3px 3px 0 var(--ink);
}

.hero h1{
  margin:0 0 16px;
  font-size:clamp(1.78rem,7.2vw,3.4rem);
  line-height:1.22;
}

.lede{
  margin:0 0 22px;
  max-width:46ch;
  font-size:1.02rem;
  line-height:1.85;
}

.btn.big{
  min-height:54px;
  padding:0 28px;
  font-size:17px;
  background:var(--blue);
  color:var(--ink);
}

.hero-art{margin:0}

.hero-img{
  width:100%;
  max-height:380px;
  object-fit:cover;
  border:var(--line);
  border-radius:18px;
  box-shadow:8px 8px 0 var(--ink);
}

/* ---------- 主区 ---------- */
.wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:26px;
  max-width:1140px;
  margin:0 auto;
  padding:32px 16px 56px;
}

.content{min-width:0}

.prose>article,
.prose>section,
.prose>.card{
  background:var(--white);
  border:var(--line);
  border-bottom:9px solid var(--blue);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:20px 18px;
  margin:0 0 26px;
}

.prose>*:first-child{margin-top:0}

.prose p{margin:0 0 1.05em;line-height:1.9}

.prose h2,
.prose h3{
  margin:0 0 14px;
  line-height:1.4;
  border-bottom:4px solid var(--ink);
  padding-bottom:8px;
}

.prose h2{font-size:clamp(1.3rem,4.4vw,1.72rem)}
.prose h3{font-size:clamp(1.1rem,3.6vw,1.3rem)}

.prose h2>span,
.prose h3>span{box-shadow:inset 0 -.42em rgba(59,177,255,.55)}

.prose a{
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-underline-offset:3px;
  font-weight:700;
}

.prose a:hover{background:var(--blue)}

.prose ul,
.prose ol{padding-left:22px;margin:0 0 1.1em}
.prose li{margin:.45em 0}
.prose blockquote{
  margin:0 0 1.1em;
  padding:12px 16px;
  border-left:8px solid var(--red);
  background:var(--paper);
  font-weight:500;
}
.prose img{border:var(--line);border-radius:18px;box-shadow:var(--shadow);margin:0 0 1.1em}
.prose table{width:100%;border-collapse:collapse;margin:0 0 1.1em;font-size:16px}
.prose th,.prose td{border:var(--line);padding:8px 10px;text-align:left}
.prose th{background:var(--blue)}

/* ---------- 侧栏 ---------- */
.side{
  order:-1;
  align-self:start;
  background:var(--white);
  border:var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:16px;
}

.side-t{
  margin:0 0 12px;
  font-size:1.04rem;
  line-height:1.4;
}

.side-t>span{box-shadow:inset 0 -.42em rgba(255,82,82,.4)}
.side-t:not(:first-child){margin-top:22px}

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

.side-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:4px 11px;
  border:var(--line);
  border-radius:12px;
  background:var(--paper);
  font-weight:700;
  font-size:15.5px;
  text-decoration:none;
  transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.side-list b{
  font-family:"Noto Serif JP",serif;
  color:var(--red);
  font-size:14px;
  letter-spacing:.04em;
}

.side-list a:hover{
  background:var(--blue);
  transform:translate(-2px,-2px);
  box-shadow:3px 3px 0 var(--ink);
}

.side-contact{margin:0}
.side-contact a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  border:var(--line);
  border-radius:999px;
  background:var(--red);
  color:var(--white);
  font-weight:700;
  font-size:15.5px;
  text-decoration:none;
}

/* ---------- 页脚 ---------- */
.foot{
  background:var(--ink);
  color:var(--white);
  border-top:4px solid var(--ink);
  padding:30px 16px 20px;
}

.foot-top{
  max-width:1140px;
  margin:0 auto 24px;
  padding-bottom:20px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  border-bottom:3px solid #555;
}

.foot-brand{
  margin:0;
  font-family:"Noto Serif JP",serif;
  font-weight:700;
  font-size:1.16rem;
  color:var(--blue);
  letter-spacing:.04em;
}

.sub{display:flex;flex-wrap:wrap;gap:8px;margin:0}

.sub input{
  width:186px;
  min-height:46px;
  padding:0 14px;
  border:3px solid var(--white);
  border-radius:999px;
  background:#141414;
  color:var(--white);
  font-family:inherit;
  font-size:16px;
}

.sub input::placeholder{color:#b9b9b9}

.sub button{
  min-height:46px;
  padding:0 20px;
  border:3px solid var(--white);
  border-radius:999px;
  background:var(--red);
  color:var(--white);
  font-family:inherit;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  transition:transform .16s ease, background-color .16s ease;
}

.sub button:hover{transform:translate(-2px,-2px);background:var(--blue);color:var(--ink)}

.foot-grid{
  max-width:1140px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:22px;
}

.foot dl{margin:0}
.foot dt{
  margin:0 0 8px;
  padding-bottom:6px;
  border-bottom:3px solid var(--blue);
  font-family:"Noto Serif JP",serif;
  font-weight:700;
  font-size:1rem;
  color:var(--blue);
}
.foot dd{margin:0;font-size:16px;color:#eaeaea}

.foot dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--white);
  text-decoration:none;
  font-size:16px;
}

.foot dd a:hover{
  color:var(--blue);
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-underline-offset:4px;
}

.copy{
  max-width:1140px;
  margin:26px auto 0;
  padding-top:14px;
  border-top:3px solid #555;
  text-align:center;
  font-size:15px;
  color:#cfcfcf;
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference){
  .side-list li{
    opacity:0;
    transform:translateX(12px);
    animation:slide-in .34s ease forwards;
  }
  .side-list li:nth-child(1){animation-delay:.03s}
  .side-list li:nth-child(2){animation-delay:.06s}
  .side-list li:nth-child(3){animation-delay:.09s}
  .side-list li:nth-child(4){animation-delay:.12s}
  .side-list li:nth-child(5){animation-delay:.15s}
  .side-list li:nth-child(6){animation-delay:.18s}
  .side-list li:nth-child(7){animation-delay:.21s}
}

@keyframes slide-in{
  to{opacity:1;transform:none}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    transition-duration:.001ms !important;
  }
  .side-list li{opacity:1;transform:none}
}

/* ---------- 断点 ---------- */
@media (min-width:700px){
  .foot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .prose>article,
  .prose>section{padding:26px 24px}
}

@media (min-width:900px){
  .wrap{
    grid-template-columns:minmax(0,1fr) 300px;
    align-items:start;
    gap:32px;
    padding:44px 20px 68px;
  }
  .side{order:0;position:sticky;top:98px}
  .hero{padding:60px 24px 64px}
  .hero-copy{padding-left:8px}
}

@media (min-width:1080px){
  .bar{padding:12px 22px}
  .nav>summary{display:none}
  .nav>menu{
    position:static;
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    min-width:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .nav menu a{padding:4px 12px;font-size:15.5px}
  .brand{font-size:1.32rem}
}

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