.home { --column: 1040px; background: var(--paper); }
.home h1,.home h2,.home h3 { font-weight: 485; }
.skip-link { position: fixed; left: var(--edge); top: .5rem; z-index: 6; background: var(--paper); padding: .6rem; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.home .mast {
  height: clamp(64px, 9svh, 90px);
  width: min(calc(100% - var(--edge) * 2), 1300px);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: clamp(.88rem, 1.25vw, 1rem);
}
.opening {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: calc(100vh - clamp(64px, 9vh, 90px));
  min-height: calc(100svh - clamp(64px, 9svh, 90px));
  padding: 24px var(--edge) clamp(46px, 9svh, 100px);
}
.note { width: min(100%, 30rem); text-align: center; }
.note h1 {
  font-size: clamp(1.56rem, 2.8vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: .005em;
}
.note-intro { margin: .36em auto 0; font-size: clamp(1.1rem, 1.75vw, 1.52rem); line-height: 1.43; }
.coffee {
  display: inline-flex; flex-direction: column; align-items:center;
  min-height: 44px; padding: 4px 10px; gap: .27em;
}
.coffee > svg { width: clamp(43px, 4.2vw, 59px); height: auto; }
.index-list {
  display: grid; justify-content: start; margin: clamp(26px,5.7vh,58px) auto 0;
  padding-left: 0; width: fit-content; min-width: 52%; list-style: none; text-align: left;
}
.index-list a, .contents-list a {
  display: flex; align-items: center; gap: .78em;
  min-height: 44px; width: 100%; padding-inline: .45em;
}
.index-list a { min-height: clamp(44px, 6.1vh, 57px); font-size: clamp(1.08rem, 1.5vw, 1.25rem); }
.chapter-icon { width: 1.2em; height: 1.2em; flex: none; }
.index-list a span, .contents-list a span { position: relative; isolation: isolate; }
.index-list a span::before, .contents-list a span::before {
  content: ""; position: absolute; z-index: -1; inset: 44% -.18em 0;
  background: var(--marker); clip-path: polygon(1% 10%,98% 0,100% 83%,0 100%);
  transform: scaleX(0); transform-origin: left;
}
.contents-list a[aria-current] span::before, .contents-list a:focus-visible span::before,
.index-list a:focus-visible span::before { transform: scaleX(1); }
.quick-nav {
  --menu-edge: max(clamp(16px, 2.2vw, 28px), env(safe-area-inset-right), env(safe-area-inset-bottom));
  position: fixed; z-index: 5; bottom: var(--menu-edge); right: var(--menu-edge);
}
.quick-nav details { position: relative; }
.quick-nav summary {
  display: flex; align-items: center; justify-content:center; gap: 8px;
  min-height: 46px; padding: 0 15px;
  color: var(--ink); font: 1rem var(--hand); list-style:none; cursor:pointer;
  border: 1px solid #c5c3b5; border-radius: 6px 4px 7px 4px;
  background: #f9f7ef; box-shadow: 1px 2px 0 #d1cfc1;
}
.quick-nav summary::marker { content: ""; }
.quick-nav summary::-webkit-details-marker { display: none; }
.quick-nav summary svg { width: 22px; height: 22px; }
.quick-nav details[open] summary { background: #e7edda; }
.contents-list {
  position: absolute; right: -6px; bottom: calc(100% + 10px);
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px; padding: 6px 6px 10px;
  width: min(302px, calc(100vw - 26px)); max-height: min(60vh, calc(100dvh - 86px));
  overflow: auto; overscroll-behavior: contain;
}
.contents-list a {
  --turn: -1.2deg;
  --delay: 0ms;
  position: relative; min-width: 0; min-height: 57px;
  gap: 7px; padding: 7px 10px; font-size: .94rem; line-height: 1.14;
  background: #faf6ea; border: 1px solid #d4ceba;
  border-radius: 9px 12px 13px 8px; box-shadow: 0 2px 0 #d8d2bf;
}
.contents-list a:nth-child(even) { --turn: 1.2deg; --delay: 35ms; }
.contents-list a:nth-child(n+3) { --delay: 60ms; }
.contents-list a:nth-child(n+5) { --delay: 105ms; }
.contents-list a .chapter-icon { width: 19px; height: 19px; }
.contents-list a::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: 12px; height: 12px; background: #dde2bd;
  clip-path: polygon(0 100%,100% 0,100% 74%,74% 100%);
}
.contents-list a[aria-current], .contents-list a:focus-visible { background: #f0f2df; }
@media (hover: hover) {
  .contents-list a:hover span::before,.index-list a:hover span::before { transform: scaleX(1); }
  .quick-nav summary:hover { background: #f1f1e2; }
  .contents-list a:hover { background: #f0f2df; }
}
@media (prefers-reduced-motion: no-preference) {
  .index-list a span::before, .contents-list a span::before { transition: transform .32s ease-out; }
  .contents[open] .contents-list a {
    animation: menu-sticker-in .3s cubic-bezier(.22,.68,.3,1) var(--delay) both;
  }
  @keyframes menu-sticker-in { from { opacity: 0; transform: translateY(8px) rotate(var(--turn)); } }
  .contents-list a { transition: translate .22s ease, background .22s ease; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .contents-list a:hover { translate: 0 -2px; }
}
.home .chapter { padding: clamp(60px, 10vw, 145px) var(--edge); }
.home .chapter-inner { width: 100%; max-width:var(--column); margin-inline:auto; }
.home .section-head { margin-bottom: clamp(26px,4.6vw,62px); }
.home .chapter h2 { font-size: clamp(1.9rem, 3.7vw, 3.3rem); line-height: 1.15; letter-spacing: -.025em; }
.home .section-head p { margin-top: .72em; color: var(--soft); max-width: 33em; }
.work-chapter { background: #f7f4eb; scroll-margin-block-start: calc(-1 * var(--anchor-inset)); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: clamp(40px, 5.3vw, 72px);
}
.work-card { min-width: 0; }
.work-link { display: block; height: 100%; }
.work-plate {
  aspect-ratio: 3 / 2;
}
.work-plate img { width: 100%; height: auto; display: block; }
.work-caption { padding: clamp(15px, 2vw, 24px) clamp(12px, 2.6vw, 36px) 0; }
.work-title { display:flex; align-items: baseline; flex-wrap:wrap; gap:5px 14px; }
.work-title h3,.method-list h3 { font-size: clamp(1.35rem, 2.05vw, 1.75rem); line-height:1.26; }
.work-title > span { color: var(--soft); font-size: .88rem; }
.work-card p { margin-top: .48em; max-width: 37ch; font-size: clamp(1rem,1.42vw,1.15rem); line-height:1.5; }
.paper-link { display: inline-flex; min-height: 44px; align-items: center; }
.work-card .paper-link { margin-top: 3px; font-size: .96rem; }
.approach-layout .section-head p { max-width: 47ch; }
.method-list {
  list-style: none; counter-reset: method; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(14px, 2vw, 26px);
}
.method-list li {
  counter-increment: method; display: flex; flex-direction: column;
  position: relative;
  padding: clamp(18px, 2.5vw, 30px);
  padding-bottom: clamp(24px, 3.1vw, 38px);
  background: #f9f6ec;
  border: 1px solid #dbd5c3;
  border-radius: 13px 16px 18px 12px;
  box-shadow: 0 2px 0 #ded9c7;
}
.method-list li::before {
  content: counter(method, decimal-leading-zero);
  align-self: flex-start;
  padding: 1px 8px 2px; margin-bottom: 13px;
  font-size: .9rem; color: var(--ink);
  background: #dce4b9;
  border-radius: 49% 43% 46% 39% / 43% 52% 44% 54%;
  transform: rotate(-5deg);
}
.method-list p { margin-top: .65em; max-width: 40ch; color: var(--soft); }
.method-list .method-result {
  margin-top: auto; padding-top: 16px; color: var(--ink);
  text-decoration: underline wavy #809251; text-underline-offset: 4px;
}
.poster-chapter { background:#f7f4eb; }
.contact-inner { text-align:center; }
.author-drawing {
  display: block;
  width: clamp(150px, 27svh, 264px);
  max-width: 72%;
  height: auto;
  margin: 0 auto clamp(14px, 2.7svh, 28px);
}
.contact-address { margin: 1em 0 .8em; font-size: 1rem; color: var(--soft); }
.socials { display:flex; justify-content:center; flex-wrap:wrap; gap:0 21px; margin:0; padding:0; list-style:none; }
.social-note { max-width: 52ch; margin: 8px auto 0; color: var(--soft); font-size: .82rem; line-height: 1.45; text-wrap: pretty; }
.socials a { display:flex; align-items:center; min-height:44px; font-size:.98rem; }
.contact-inner .colophon { margin-top: 2.3rem; font-size:.9rem; color:var(--soft); }
@media (hover:hover) {
  .socials a:hover { text-decoration: underline wavy var(--pencil) 1px; text-underline-offset: .24em; }
}
@media (prefers-reduced-motion:no-preference) {
  html { scroll-behavior:smooth; }

}
@media (max-width:700px){
  .home { font-size: 1.025rem; }
  .home .mast { height:56px; }
  .home-tab { height: 43px; }
  .opening {min-height:calc(100svh - 56px); padding-top:14px; padding-bottom:clamp(36px,9svh,76px); }
  .note h1 {font-size:clamp(1.48rem,5.9vw,2rem);}
  .note-intro {font-size:clamp(1.1rem,4.6vw,1.37rem);}
  .index-list { min-width:52%; }

  .work-grid,.method-list {grid-template-columns:1fr;}
  .home .chapter {padding-block:60px;}
  .work-caption { padding: 14px 2px 0; }
  .contact-inner { padding-inline:10px; }
  .colophon { padding-bottom:26px; }
}
@media (max-height:630px) and (max-width:700px) {
  .opening {padding-bottom:24px;}
  .author-drawing {width: 126px; margin-bottom: 10px;}
  .index-list {margin-top:18px;}
  .index-list a { min-height:44px; }
}

.home .work-chapter, .home .poster-chapter { border-radius: clamp(12px, 1.4vw, 20px); }

.project-stack {
  display: flex; flex-direction: column; gap: clamp(40px,12svh,120px);
  max-width: 960px; margin-inline: auto; isolation: isolate;
}
.project-stack .work-card {
  background: #f9f6ec; border: 1px solid #d5d1c1; border-radius: 15px;
  padding: clamp(18px,3.8vw,56px); min-height: min(62svh,550px);
  display: grid; align-content: center; transform-origin: center top;
}
.project-stack .work-card:nth-child(even) { background: #edf0e2; }
.project-stack .work-card:not(:has(.work-link)), .project-stack .work-link {
  display:grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); align-items:center;
}
.project-stack .work-caption { grid-area:1/1; padding:0; }
.project-stack .work-plate { grid-area:1/2; }
@media (min-height:530px) and (prefers-reduced-motion:no-preference) {
  .project-stack:not(:has(:focus-visible)) .work-card {
    position:sticky; top:clamp(18px,8svh,80px);
    transform:scale(var(--scale,1)) rotate(var(--tilt,0deg));
  }
}
@media(max-width:640px) {
  .project-stack .work-card:not(:has(.work-link)), .project-stack .work-link {grid-template-columns:1fr;}
  .project-stack .work-caption,.project-stack .work-plate {grid-area:auto;}
  .project-stack .work-plate {width:min(100%,42svh);margin:auto;}
  .project-stack .work-caption {padding:12px 4px 0;}
}

.card-cursor {
  display: none;
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 4;
  pointer-events: none;
  width: max-content;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .card-cursor {
    display: block;
    visibility: hidden;
  }
  .card-cursor.is-visible { visibility: visible; }
}
.card-cursor > span {
  display: inline-block;
  padding: 9px 15px 10px;
  border: 1px solid #555a33;
  border-radius: 52% 44% 47% 43% / 43% 52% 44% 52%;
  background: #dce6a2;
  color: #282b1a;
  box-shadow: 1px 2px 0 #777c4755;
  font-size: 1rem;
  line-height: 1.2;
  transform: rotate(-6deg);
}
@media (prefers-reduced-motion: no-preference) {
  .card-cursor.is-visible > span { animation: card-cursor-in 170ms ease-out both; }
  @keyframes card-cursor-in {
    from { opacity: 0; transform: rotate(-12deg) scale(.88); }
  }
}

.method-list li::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 22px;
  height: 22px;
  background: #dedfc0;
  clip-path: polygon(0 100%, 100% 0, 100% 82%, 83% 100%);
  border-radius: 0 0 16px 0;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .method-list li {
    transition: translate .32s ease, rotate .32s ease, box-shadow .32s ease;
  }
  .method-list li::after {
    transform-origin: right bottom;
    transition: scale .32s ease, background .32s ease;
  }
  .method-list li:hover {
    translate: 0 -4px;
    rotate: -.65deg;
    box-shadow: 1px 7px 12px #463d281c;
  }
  .method-list li:nth-child(2):hover { rotate: .65deg; }
  .method-list li:hover::after { scale: 1.28; background: #cbd69c; }
}
