/* 荧火虫照明 · responsive layer (loaded LAST). Fluid container, reflowing grids, touch targets. */
:root{--cw:1200px}
@media(min-width:1600px){:root{--cw:1360px;--gutter:clamp(40px,3vw,64px)}}
@media(min-width:1900px){:root{--cw:1520px}}
@media(min-width:2300px){:root{--cw:1840px;--gutter:72px}body{font-size:19px}}
html{overflow-x:hidden}
body{min-width:320px;overflow-x:clip}
img,video,svg{max-width:100%}
img{height:auto}
/* header lines up with page content on wide screens */
@media(min-width:1001px){.nav .in{max-width:max(1480px,var(--max));padding-left:var(--gutter);padding-right:var(--gutter)}}
body.art .wrap{max-width:max(1360px,var(--max))}
.duo{max-width:max(1600px,var(--max))}
/* wide-screen headings keep growing a little */
@media(min-width:1900px){.h-xl,html[lang=en] .h-xl{font-size:clamp(72px,3.9vw,96px)}.h-l{font-size:clamp(48px,2.7vw,62px)}.h-m{font-size:clamp(30px,1.7vw,38px)}.lead{max-width:820px;font-size:21px}}
/* grids reflow 4 > 3 > 2 > 1 */
.grid.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1280px){.grid.g4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){.grid.g4{grid-template-columns:repeat(2,minmax(0,1fr))}}
.agrid.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1280px){.agrid.g4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.agrid.g4{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cart-wrap{max-width:max(1180px,var(--max))}
@media(max-width:900px){.cart-wrap{grid-template-columns:minmax(0,1fr);gap:28px}}
/* long words / urls never push the page wider */
h1,h2,h3,p,li,td,th,a,.card,.tx{overflow-wrap:anywhere}
table{max-width:100%}
.spec-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
/* header: hamburger works on phone and iPad */
.menu-btn{min-width:44px;min-height:44px;touch-action:manipulation}
/* hamburger breakpoints follow art.css: CN <=1120, EN <=1400 */
@media(max-width:1120px){
 html[lang^=zh] .nav nav{max-height:calc(100dvh - 56px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-left:var(--gutter,24px);padding-right:var(--gutter,24px)}
 html[lang^=zh] .nav nav>a,html[lang^=zh] .nav nav .dd>a{min-height:48px;display:flex;align-items:center}
 html[lang^=zh] .dd .menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px}
 html[lang^=zh] .dd .menu a{min-height:44px;display:flex;align-items:center;font-size:14.5px;line-height:1.3}
 html[lang^=zh] .dd .menu a:first-child{grid-column:1/-1}
 html[lang^=zh] .nav .lang a{padding:12px 6px}
}
@media(max-width:1400px){
 html[lang=en] .nav nav{max-height:calc(100dvh - 56px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-left:var(--gutter,24px);padding-right:var(--gutter,24px)}
 html[lang=en] .nav nav>a,html[lang=en] .nav nav .dd>a{min-height:48px;display:flex;align-items:center}
 html[lang=en] .dd .menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px}
 html[lang=en] .dd .menu a{min-height:44px;display:flex;align-items:center;font-size:14.5px;line-height:1.3}
 html[lang=en] .dd .menu a:first-child{grid-column:1/-1}
 html[lang=en] .nav .lang a{padding:12px 6px}
}
@media(min-width:768px) and (max-width:1120px){html[lang^=zh] .nav nav{left:auto;width:min(440px,100%);border-left:1px solid var(--line);box-shadow:0 18px 40px rgba(0,0,0,.12);border-radius:0 0 0 16px}}
@media(min-width:768px) and (max-width:1400px){html[lang=en] .nav nav{left:auto;width:min(440px,100%);border-left:1px solid var(--line);box-shadow:0 18px 40px rgba(0,0,0,.12);border-radius:0 0 0 16px}}
/* touch targets */
@media(pointer:coarse),(max-width:1000px){
 .btn,button.btn,input[type=submit]{min-height:46px}
 .dm-pill{min-height:40px;padding:11px 16px}
 .thumbs button,.thumbs img{min-width:56px;min-height:56px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:46px;font-size:16px}
 footer .cols>div:not(:last-child) a{padding:8px 0}
}
/* phones */
@media(max-width:560px){
 .grid:not(.g3){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .grid:not(.g3) .card .tx{padding:12px 12px 16px}
 .grid:not(.g3) .card h3{font-size:15px;line-height:1.35}
 .grid:not(.g3) .card small{font-size:12.5px}
 body .yhc-fab{height:44px;padding:0 14px 0 10px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));font-size:13px}
 body{font-size:16px}
 section{padding-top:clamp(44px,12vw,64px);padding-bottom:clamp(44px,12vw,64px)}
 .hero{min-height:min(78svh,640px)}
 .btn{padding:13px 24px}
}
@media(max-width:360px){.wrap{padding-left:16px;padding-right:16px}}
@media(min-width:521px) and (max-width:860px){.series>a:last-child:nth-child(odd){grid-column:1/-1}}
.tiles{max-width:max(1600px,var(--max));margin-left:auto;margin-right:auto}
