@media (max-width:767px){
  body{overflow-y:auto;overflow-x:hidden}
  body.sheet-open{overflow:hidden}
  .home-stage,.star-btn,.socials,.frog{display:none}
  .corner{top:calc(14px + env(safe-area-inset-top,0px));left:12px}
  .corner-btn{width:52px;height:54px}
  .corner-btn svg{width:38px;height:38px}

  .wave-wrap{height:38vh}

  .mobile-home{
    display:block;position:relative;z-index:10;min-height:100vh;min-height:100dvh;
    padding:18vh 18px calc(190px + env(safe-area-inset-bottom));
    text-align:center;
  }
  .mobile-home .hero{
    font-size:clamp(42px,12.6vw,58px);line-height:1.12;white-space:nowrap;
  }
  .mobile-home .subtitle{font-size:clamp(15px,4vw,18px);margin-top:10px}
  .mobile-grid{
    display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
    max-width:370px;margin:30px auto 0;
  }
  .mobile-card{
    aspect-ratio:1/1;border:1px solid var(--line);border-radius:12px;
    background:var(--cream);display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:3px;cursor:pointer;
    box-shadow:0 3px 0 rgba(74,69,64,.04);
    transition:transform .15s ease;
  }
  .mobile-card:active{transform:scale(.97)}
  .mobile-card .icon{width:54px;height:54px;filter:drop-shadow(2px 2px 0 rgba(74,69,64,.1))}
  .mobile-card span{font:700 13px/1.3 var(--mono);color:var(--ink)}
  .star-svg.small{width:54px;height:56px;animation:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.12))}

  .sub-window{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;
    top:auto!important;width:100%!important;max-width:100%!important;
    height:90dvh!important;max-height:90dvh!important;margin:0!important;
    transform:none!important;scale:1!important;border-radius:14px 14px 0 0;
    z-index:80!important;transition:none;opacity:1;visibility:visible;
    pointer-events:auto;display:none;
  }
  .sub-window.is-open{display:flex;animation:sheetUp .28s cubic-bezier(.2,.8,.25,1)}
  .sub-window .titlebar{height:54px;flex-basis:54px;padding:0 18px;font-size:17px;cursor:default;border-radius:14px 14px 0 0}
  .sub-window .titlebar .close{padding-left:14px;font-size:19px}
  .sub-window .window-body{
    border-width:2px;border-radius:0;font-size:16px;line-height:1.8;
    padding:22px 20px calc(34px + env(safe-area-inset-bottom,0px));
  }
  html.dark .sub-window .titlebar{box-shadow:inset 0 0 0 2px #fff}
  .sub-window .titlebar.orange{box-shadow:none}

  .about-body{font-size:16px;line-height:1.8}
  .about-head{flex-direction:column;text-align:center;gap:14px;padding-top:0}
  .avatar{width:112px;height:112px;flex-basis:112px}
  .about-name{font-size:26px}
  .about-name span{font-size:16px}
  .about-intro p{font-size:13px}
  .about-body h3{font-size:14px}

  .links-body{padding:22px 16px 28px}
  .link-grid{grid-template-columns:repeat(3,1fr);gap:16px 6px}
  .link-card svg{width:46px;height:46px}
  .link-card span{font-size:10.5px}
  .hint-box{font-size:12px;padding:8px 12px;margin-top:22px}

  .work-body{font-size:14px;padding:20px 18px 30px}
  .callout{padding:14px 14px;margin-bottom:20px}
  .callout p{font-size:13px}
  .work-columns{grid-template-columns:1fr;gap:18px}
  .caps{font-size:18px}
  .chip{font-size:12px;padding:5px 8px}
  .work-row{gap:12px;padding:11px 0}
  .work-row h4{font-size:14px}
  .work-row p{font-size:12px}
  .status{font-size:10px}

  .faq-body{padding:16px 14px 26px}
  .faq-item{padding:0 14px;margin-bottom:11px}
  .faq-item summary{font-size:12.5px;padding:13px 0;gap:10px}
  .faq-item p{font-size:12.5px;line-height:1.7}

  .contact-body{padding:24px 20px 32px}
  .contact-title{font-size:21px}
  .contact-copy{font-size:13.5px}
  .mail-art{width:170px}

  .downloads-body{padding:16px 14px 28px}
  .downloads-intro{font-size:12.5px;padding:10px 12px}
  .dl-grid{grid-template-columns:1fr;gap:12px;margin-top:14px}
  .dl-card{display:grid;grid-template-columns:120px 1fr;grid-template-rows:auto auto 1fr;column-gap:10px;padding:7px}
  .dl-art{grid-row:1/4;aspect-ratio:1/1}
  .dl-card h3{text-align:left;margin:4px 0 0;font-size:13px}
  .dl-sub{text-align:left;margin:0 0 2px;font-size:10.5px}
  .dl-meta{text-align:left;margin:0;font-size:10.5px;padding:4px 6px}
  .dl-icons{display:none}

  .footer{bottom:0;height:0}
  .copyright{font-size:10px;bottom:calc(4px + env(safe-area-inset-bottom,0px));color:var(--muted);z-index:4}

  .mobile-note{
    position:fixed;left:0;right:0;bottom:0;z-index:60;
    display:flex;align-items:center;justify-content:space-between;gap:14px;
    padding:18px 18px calc(18px + env(safe-area-inset-bottom));
    background:var(--cream);color:var(--ink);
    border-top:1px solid var(--line);
    box-shadow:0 -8px 24px rgba(74,69,64,.12);
  }
  .mobile-note h3{margin:0 0 4px;font:700 18px/1.3 var(--mono)}
  .mobile-note p{margin:0;font-size:12.5px;line-height:1.55;max-width:255px}
  .mobile-note .small-btn{flex:0 0 auto;padding:10px 18px;font-size:14px;border-radius:7px}
  .mobile-note[hidden]{display:none!important}
  html.dark .mobile-note{background:var(--window);color:var(--ink);border-color:var(--line-soft);box-shadow:0 -8px 24px rgba(0,0,0,.5)}
  html.dark .mobile-card{background:var(--window);border-color:var(--line-soft)}
  html.dark .mobile-card .icon{filter:drop-shadow(2px 2px 0 rgba(255,255,255,.1))}
}

@media (max-height:760px) and (min-width:768px){
  .home-body{padding:46px 30px 28px}
  .home-body .hero{font-size:clamp(40px,4.6vw,56px)}
  .home-body .subtitle{font-size:clamp(14px,1.5vw,20px)}
  .home-icons{margin-top:32px;gap:10px}
  .desk-icon .icon{width:52px;height:52px}
  .desk-icon span{font-size:13px}
}

@media (max-width:380px){
  .mobile-home{padding-top:16vh}
  .mobile-home .hero{font-size:40px}
  .mobile-card .icon{width:44px;height:44px}
}

/* ============================================================
   MOTION / A11Y
   ============================================================ */
@keyframes waveSlide{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes bob{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-4px) rotate(1deg)}}
@keyframes notesFloat{0%,100%{transform:translateY(0);opacity:.9}50%{transform:translateY(-7px);opacity:.55}}
@keyframes sheetUp{from{translate:0 26px;opacity:0}to{translate:0 0;opacity:1}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important;
  }
}

/* ============================================================
   MOBILE SCROLLBAR / SAFE AREA
   ============================================================ */
@media (max-width:767px){
  ::-webkit-scrollbar{width:0;height:0}
}
