/* Phone portrait only. Desktop/tablet styles and portfolio.js remain unchanged. */
@media (max-width:700px) and (orientation:portrait) {
  html,body{height:100%;overflow:hidden;overscroll-behavior-y:none}
  body{height:100svh;font-family:'PingFang SC','Microsoft YaHei',system-ui,sans-serif}
  .loading{display:none!important}
  header{height:68px;padding:12px 5%;padding-top:max(12px,env(safe-area-inset-top));background:linear-gradient(#091126 65%,#09112600)}
  .identity{font-size:8px;letter-spacing:1.2px;white-space:nowrap}
  .top-nav{gap:10px}.top-nav button{font-size:10px;letter-spacing:0;min-height:40px}
  .rail{display:none}
  footer{height:76px;min-height:76px;padding:16px 5% max(16px,env(safe-area-inset-bottom));background:linear-gradient(#080e2000,#080e20 36%)}
  .scroll-hint{max-width:45%;font-size:9px;letter-spacing:0;gap:6px}.footer-right{gap:12px}.next{font-size:11px;min-height:40px;padding:8px 13px}
  .panel{touch-action:pan-y;will-change:auto}
  .hello-scroll,.resume-scroll,.directory-scroll{position:absolute;inset:68px 0 76px;height:auto;padding:12px 6% 24px;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-padding:12px}
  .hello-scroll::-webkit-scrollbar,.resume-scroll::-webkit-scrollbar,.directory-scroll::-webkit-scrollbar{display:none}
  .mobile-intro-head{display:grid;grid-template-columns:1fr 1.12fr;align-items:center;gap:0;min-height:205px;margin:0 0 14px}
  .hello-block{width:auto;min-height:0;margin:0;position:relative;left:auto;top:auto}
  .hello-title{font-size:clamp(49px,14vw,76px);letter-spacing:-3px;line-height:1.15}
  .hello-block .script{font-size:clamp(31px,9vw,44px);margin:0 0 0 5px;line-height:1}
  .mobile-character-slot{height:205px;min-width:0;pointer-events:none}
  .mobile-work-stage{height:180px;margin:0 auto 14px;width:210px}
  .mobile-cover-stage{position:absolute;width:min(76vw,310px);height:min(76vw,310px);right:-3%;top:45%;pointer-events:none}
  #panel1 .profile{padding:20px 18px;border-radius:20px;gap:12px 14px;grid-template-columns:64px minmax(0,1fr);background:#0b1429d9}
  #panel1 .hello-name{padding:0 0 4px;gap:9px}#panel1 .hello-name h2{font-size:26px;letter-spacing:1px}
  #panel1 .profile .photo{width:64px;height:68px;grid-row:2/4}
  #panel1 .contact{font-size:clamp(10px,2.8vw,13px);line-height:1.65;overflow-wrap:anywhere}
  #panel1 .profile h3{margin-top:10px;font-size:20px}
  #panel1 .about-copy{font-size:14px;line-height:1.85}
  #panel1 .education{font-size:12px;line-height:1.85;margin-top:8px}
  #panel1 .education p:nth-child(2),#panel1 .education p:nth-child(3){display:block;margin-right:0}
  .resume-grid{margin:0;display:block;max-width:none}
  .work{padding:20px 18px;border:1px solid #b8d5ff16;border-radius:20px;background:#0b1429ed}
  .work>h3{margin-bottom:20px;font-size:23px;padding-bottom:14px}
  .company-row h4{font-size:18px;line-height:1.6}.company-row .job{font-size:12px;line-height:1.7}
  .achievement,.previous p{font-size:14px;line-height:1.85}.achievement p{margin-bottom:12px}
  .date-row{flex-wrap:wrap;gap:8px}.date{font-size:20px}.promotion{font-size:11px;overflow-wrap:anywhere;line-height:1.9}
  .previous{display:grid;grid-template-columns:1fr;gap:25px;margin-top:28px}.previous .company-row h4{font-size:18px}
  .software{width:190px;margin-top:24px}.software span{font-size:18px}
  .directory-glass{top:72px;bottom:76px;left:3%;right:3%;border-radius:24px;background:#080e20f2;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
  .directory-scroll{padding:24px 8% 32px}.directory-heading{margin-left:4%}.directory-heading h2{font-size:29px}.directory-heading .script{font-size:30px}.directory-heading p{font-size:11px;margin-top:18px}
  .folder-grid{grid-template-columns:1fr;gap:28px;margin:34px auto 0;max-width:300px;padding-bottom:10px}
  .folder-wrap:nth-child(even){padding-top:0}
  .folder-card{aspect-ratio:310/276;min-height:0;cursor:default;touch-action:pan-y}
  .folder-copy h3{font-size:clamp(23px,7vw,30px)}.folder-role{font-size:clamp(16px,4.8vw,21px);line-height:1.35}.folder-desc{font-size:13px;line-height:1.7;padding-top:10px;margin-top:10px}
  .folder-number{font-size:11px}.folder-note,.folder-wrap:nth-child(even) .folder-note{margin:17px 0 0;opacity:1;transform:none;font-size:12px}
  .folder-note img,.folder-wrap:nth-child(even) .folder-note img{width:16px;height:26px;margin:0 auto 7px;transform:none}
  .folder-card:hover,.folder-card:focus-visible,.folder-wrap:nth-child(even) .folder-card:hover{transform:none;filter:none}
  .folder-card:active{transform:rotate(-3deg)}.folder-card:hover .folder-face,.folder-card:focus-visible .folder-face{transform:none}
  .folder-card:hover .folder-rings{transform:none}
  .cover{top:12%;left:7%;width:86%}.cover h1{font-size:clamp(46px,12vw,66px);margin-top:14px}.cover .script{font-size:clamp(35px,10vw,48px);left:43%;top:23%}
  .cover .en{font-size:8px;margin-top:16px}.cover .role{font-size:10px;margin-top:10px}
  .cover-foot{left:7%;bottom:16%;font-size:8px;max-width:39%;line-height:1.6}.cover-foot .english{font-size:7px}
  .glow{will-change:auto}.glow.warm,.glow.purple,.glow.teal,.glow.red{display:none}
  .world{background:radial-gradient(ellipse at 15% 18%,#263d79 0,transparent 65%),linear-gradient(130deg,#14223f,#070b18)}
  .glow.top,.glow.blue{background-image:none}.backword{font-size:22vw}.backword.name{font-size:23vw}
  .toast{bottom:90px;font-size:13px;width:max-content;max-width:88%;padding:12px 18px;text-align:center}
  @media(max-height:700px){.mobile-intro-head{min-height:175px}.mobile-character-slot{height:175px}.mobile-work-stage{height:150px}.mobile-cover-stage{top:44%;width:66vw;height:66vw}.cover{top:12%}.cover h1{font-size:46px}.cover .en{margin-top:10px}.cover-foot{bottom:17%;font-size:7px}.cover .role{font-size:9px}}
}
