/* =========================================================
   YILEI PHOTO / MOBILE LAYER
   仅作用于 <= 1024px
   桌面端样式完全不参与覆盖
========================================================= */


/* =========================================================
   平板 / 手机共同规则
========================================================= */

@media (max-width:1024px){

:root{
--m-safe-top:env(safe-area-inset-top,0px);
--m-safe-right:env(safe-area-inset-right,0px);
--m-safe-bottom:env(safe-area-inset-bottom,0px);
--m-safe-left:env(safe-area-inset-left,0px);
--m-pad:24px;
}

html,
body{
max-width:100%;
overflow-x:hidden;
}

body{
-webkit-text-size-adjust:100%;
text-size-adjust:100%;
}

button,
a{
-webkit-tap-highlight-color:transparent;
}

img{
max-width:100%;
}

/* ---------- 顶部导航 ---------- */

.site-header,
.journal-body .site-header{
height:auto;
min-height:0;
padding:
calc(24px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
18px
calc(var(--m-pad) + var(--m-safe-left));
display:flex;
flex-direction:column;
align-items:flex-start;
justify-content:flex-start;
gap:15px;
}

.logo{
font-size:17px;
line-height:1;
letter-spacing:4.5px;
white-space:nowrap;
}

nav{
width:100%;
display:flex;
align-items:center;
justify-content:flex-start;
flex-wrap:wrap;
gap:9px 22px;
margin:0;
}

nav a{
margin:0;
font-size:10px;
line-height:1.45;
letter-spacing:1.5px;
white-space:nowrap;
}

/* ---------- 首页 Hero ---------- */

.hero{
height:100svh;
min-height:620px;
}

@supports (height:100dvh){
.hero{
height:100dvh;
}
}

.hero img{
object-position:center center;
}

.hero-text{
width:100%;
max-width:720px;
padding:
calc(86px + var(--m-safe-top))
calc(28px + var(--m-safe-right))
calc(48px + var(--m-safe-bottom))
calc(28px + var(--m-safe-left));
}

.hero h1{
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:12px;
}

.title-en{
font-size:clamp(32px,7.2vw,44px);
line-height:1.16;
letter-spacing:clamp(7px,1.8vw,11px);
}

.title-cn{
font-size:clamp(30px,6.6vw,40px);
line-height:1.2;
letter-spacing:3px;
}

.hero p{
max-width:650px;
margin-left:auto;
margin-right:auto;
font-size:13px;
line-height:1.9;
letter-spacing:1.3px;
}

/* ---------- 首页作品 ---------- */

.works{
padding:
82px
calc(var(--m-pad) + var(--m-safe-right))
90px
calc(var(--m-pad) + var(--m-safe-left));
}

.works h2{
font-size:16px;
line-height:1.5;
letter-spacing:3.5px;
}

.projects{
grid-template-columns:1fr 1fr;
gap:46px 18px;
margin-top:38px;
}

.project-image{
height:auto;
aspect-ratio:4/3;
}

.project-image img{
width:100%;
height:100%;
object-fit:cover;
}

.project-info{
padding-top:14px;
}

.project-info h3{
margin:0 0 10px;
font-size:12px;
line-height:1.55;
letter-spacing:2.7px;
}

.project-cn-title{
margin:0 0 9px;
font-size:15px!important;
line-height:1.45;
letter-spacing:1.5px!important;
}

.project-info p:not(.project-cn-title){
margin:0;
font-size:10px;
line-height:1.5;
letter-spacing:1px;
color:#888;
}

/* ---------- 普通项目页 ---------- */

.project-page{
padding:
calc(145px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
85px
calc(var(--m-pad) + var(--m-safe-left));
}

.project-title{
margin-bottom:62px;
}

.project-meta{
font-size:10px;
line-height:1.5;
letter-spacing:2px;
}

.project-title h1{
margin-top:18px;
margin-bottom:0;
font-size:clamp(30px,5.5vw,40px);
line-height:1.18;
letter-spacing:clamp(5px,1.2vw,8px);
overflow-wrap:anywhere;
}

.project-title-cn{
margin-top:14px;
font-size:19px;
line-height:1.45;
}

.description{
max-width:760px;
font-size:13px;
line-height:1.95;
}

.description p{
margin-top:0;
margin-bottom:18px;
}

/* ---------- 缩略图 ---------- */

.thumbnail-gallery,
.xining-gallery{
grid-template-columns:repeat(3,1fr);
gap:10px;
}

.thumb-button{
aspect-ratio:1/1;
}

/* ---------- 普通图片 Viewer ---------- */

.image-viewer{
height:100svh;
overscroll-behavior:none;
touch-action:none;
}

@supports (height:100dvh){
.image-viewer{
height:100dvh;
}
}

.viewer-layout{
height:100%;
display:flex;
flex-direction:column;
}

.viewer-info{
position:relative;
width:100%;
height:auto;
max-height:31svh;
flex:0 0 auto;
overflow-y:auto;
overscroll-behavior:contain;
padding:
calc(58px + var(--m-safe-top))
calc(24px + var(--m-safe-right))
18px
calc(24px + var(--m-safe-left));
justify-content:flex-start;
}

.viewer-info h2{
margin:0 0 8px;
font-size:22px;
line-height:1.25;
letter-spacing:4.5px;
}

.viewer-info h3{
margin:0 0 12px;
font-size:15px;
line-height:1.45;
}

.viewer-info p{
margin:0 0 10px;
font-size:12px;
line-height:1.7;
}

.viewer-photo-area{
width:100%;
height:auto;
min-height:0;
flex:1 1 auto;
padding:
8px
calc(22px + var(--m-safe-right))
calc(18px + var(--m-safe-bottom))
calc(22px + var(--m-safe-left));
display:flex;
align-items:center;
justify-content:center;
}

.viewer-image{
max-width:100%;
max-height:100%;
transform:none;
}

.viewer-topbar{
top:calc(10px + var(--m-safe-top));
right:calc(12px + var(--m-safe-right));
gap:7px;
}

.viewer-topbar button{
width:40px;
height:40px;
font-size:15px;
}

.viewer-prev,
.viewer-next{
top:auto;
bottom:calc(18px + var(--m-safe-bottom));
z-index:1001;
width:46px;
height:46px;
padding:0;
font-size:36px;
line-height:46px;
opacity:.32;
color:#111;
}

.viewer-prev{
left:calc(4px + var(--m-safe-left));
}

.viewer-next{
right:calc(4px + var(--m-safe-right));
}

.image-viewer:hover .viewer-prev,
.image-viewer:hover .viewer-next{
opacity:.32;
}

.image-viewer.fullscreen-mode .viewer-layout{
height:100%;
}

.image-viewer.fullscreen-mode .viewer-photo-area{
width:100%;
height:100%;
padding:
calc(16px + var(--m-safe-top))
calc(14px + var(--m-safe-right))
calc(16px + var(--m-safe-bottom))
calc(14px + var(--m-safe-left));
}

.image-viewer.fullscreen-mode .viewer-image{
max-width:98vw;
max-height:94svh;
}

/* ---------- Xining Viewer ---------- */

.xining-viewer{
height:100svh;
display:flex;
flex-direction:column;
overscroll-behavior:none;
touch-action:none;
}

@supports (height:100dvh){
.xining-viewer{
height:100dvh;
}
}

.xining-info{
position:relative;
width:100%;
height:auto;
max-height:33svh;
flex:0 0 auto;
overflow-y:auto;
overscroll-behavior:contain;
padding:
calc(58px + var(--m-safe-top))
calc(24px + var(--m-safe-right))
16px
calc(24px + var(--m-safe-left));
justify-content:flex-start;
}

.xining-info h2{
margin:0 0 8px;
font-size:22px;
line-height:1.25;
letter-spacing:4.5px;
}

.xining-info h3{
margin:0 0 12px;
font-size:15px;
line-height:1.45;
}

.xining-description{
font-size:12px;
line-height:1.72;
}

.xining-description p{
margin:0 0 10px;
}

.xining-photo-area{
width:100%;
height:auto;
min-height:0;
flex:1 1 auto;
padding:
7px
calc(22px + var(--m-safe-right))
calc(18px + var(--m-safe-bottom))
calc(22px + var(--m-safe-left));
}

.xining-photo-area img{
max-width:100%;
max-height:100%;
}

.x-prev,
.x-next{
top:auto;
bottom:calc(18px + var(--m-safe-bottom));
z-index:10001;
width:46px;
height:46px;
padding:0;
font-size:36px;
line-height:46px;
opacity:.32;
}

.x-prev{
left:calc(4px + var(--m-safe-left));
}

.x-next{
right:calc(4px + var(--m-safe-right));
}

.x-close{
right:calc(10px + var(--m-safe-right));
top:calc(8px + var(--m-safe-top));
z-index:10002;
width:44px;
height:44px;
padding:0;
font-size:34px;
line-height:44px;
}

/* ---------- DRIFT ---------- */

.drift-entry{
bottom:calc(20px + var(--m-safe-bottom));
min-height:44px;
padding:10px 12px;
font-size:10px;
letter-spacing:3px;
gap:10px;
}

.drift-mark{
transform:scale(.9);
transform-origin:center;
}

.drift-overlay{
height:100svh;
overscroll-behavior:none;
touch-action:none;
}

@supports (height:100dvh){
.drift-overlay{
height:100dvh;
}
}

.drift-stage{
padding:
var(--m-safe-top)
var(--m-safe-right)
var(--m-safe-bottom)
var(--m-safe-left);
}

.drift-image{
max-width:95vw;
max-height:calc(100svh - 82px - var(--m-safe-top) - var(--m-safe-bottom));
}

.drift-controls{
bottom:calc(10px + var(--m-safe-bottom));
gap:2px;
}

/* 触摸屏没有 hover，DRIFT 控件保持可达 */
@media (hover:none), (pointer:coarse){
.drift-overlay.is-running .drift-controls{
opacity:.78;
pointer-events:auto;
transform:translateX(-50%) translateY(0);
}
}

.drift-control{
width:46px;
height:44px;
line-height:44px;
font-size:18px;
}

.drift-control-pause{
font-size:13px;
}

.drift-control-exit{
font-size:21px;
margin-left:1px;
}

/* ---------- 首页 PHOTOBOOK 入口 ---------- */

.book-feature-wrap{
margin-top:72px;
padding-bottom:18px;
}

.book-feature{
width:min(700px,92vw);
}

.book-feature-title{
margin-top:14px;
font-size:13px;
line-height:1.7;
letter-spacing:3px;
opacity:.9;
transform:none;
}

/* ---------- PHOTOBOOK 项目页 ---------- */

.book-project-page{
padding:
calc(140px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
90px
calc(var(--m-pad) + var(--m-safe-left));
}

.book-project-intro{
grid-template-columns:minmax(190px,31%) minmax(0,1fr);
gap:6vw;
}

.book-project-heading h1{
overflow-wrap:anywhere;
}

.book-preview{
margin-top:100px;
}

.book-preview-page{
width:min(380px,42vw);
}

.book-preview-spread{
width:min(800px,86vw);
}

.read-book-trigger{
min-height:44px;
}

/* ---------- PHOTOBOOK Reader ---------- */

.book-reader{
height:100svh;
overscroll-behavior:none;
touch-action:none;
}

@supports (height:100dvh){
.book-reader{
height:100dvh;
}
}

.book-reader-controls{
bottom:calc(8px + var(--m-safe-bottom));
}

.book-reader-control{
min-width:44px;
min-height:44px;
}

.book-reader-close{
right:calc(7px + var(--m-safe-right));
top:calc(5px + var(--m-safe-top));
min-width:44px;
min-height:44px;
}

@media (hover:none), (pointer:coarse){
.book-reader.is-open .book-reader-controls,
.book-reader.is-open .book-reader-close{
opacity:.8;
pointer-events:auto;
}
}

/* ---------- JOURNAL ---------- */

.journal-hero{
height:250px;
min-height:0;
}

.journal-hero img{
object-position:center 42%;
}

.journal-hero-title{
margin-top:24px;
}

.journal-page{
padding:
46px
calc(var(--m-pad) + var(--m-safe-right))
90px
calc(var(--m-pad) + var(--m-safe-left));
}

.journal-row{
grid-template-columns:minmax(0,1fr) 76px;
gap:24px;
padding:21px 22px 20px;
}

.journal-title{
font-size:16px;
line-height:1.5;
letter-spacing:.8px;
}

.journal-date{
font-size:9px;
letter-spacing:1.3px;
}

.journal-reads{
min-width:64px;
}

.journal-reads-number{
font-size:16px;
}

.journal-reads-label{
font-size:6px;
letter-spacing:1.4px;
}

.journal-article{
max-width:760px;
margin-left:7%;
padding:38px 0 72px;
font-size:13.5px;
line-height:2;
}

/* ---------- Footer ---------- */

footer{
padding:
46px
calc(var(--m-pad) + var(--m-safe-right))
calc(46px + var(--m-safe-bottom))
calc(var(--m-pad) + var(--m-safe-left));
font-size:11px;
line-height:1.8;
}

.footer-record{
margin-top:8px;
}

}


/* =========================================================
   手机竖屏
========================================================= */

@media (max-width:768px){

:root{
--m-pad:18px;
}

/* ---------- Header ---------- */

.site-header,
.journal-body .site-header{
padding:
calc(20px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
14px
calc(var(--m-pad) + var(--m-safe-left));
gap:13px;
}

.logo{
font-size:15px;
letter-spacing:3.6px;
}

nav{
gap:7px 15px;
}

nav a{
font-size:9px;
letter-spacing:1.15px;
}

/* ---------- 首页 ---------- */

.hero{
min-height:560px;
}

.hero-text{
padding-left:24px;
padding-right:24px;
padding-top:112px;
}

.hero h1{
gap:10px;
}

.title-en{
font-size:clamp(27px,8.2vw,34px);
letter-spacing:clamp(5px,1.8vw,7px);
}

.title-cn{
font-size:28px;
letter-spacing:2.2px;
}

.hero p{
max-width:94%;
font-size:12px;
line-height:1.82;
letter-spacing:.8px;
}

.works{
padding:
66px
calc(var(--m-pad) + var(--m-safe-right))
78px
calc(var(--m-pad) + var(--m-safe-left));
}

.works h2{
font-size:14px;
letter-spacing:2.4px;
}

.projects{
grid-template-columns:1fr;
gap:48px;
margin-top:34px;
}

.project-image{
aspect-ratio:4/3;
}

.project-info{
padding-top:13px;
}

.project-info h3{
font-size:13px;
letter-spacing:2.7px;
}

.project-cn-title{
font-size:15px!important;
}

/* ---------- 普通项目页 ---------- */

.project-page{
padding:
calc(126px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
72px
calc(var(--m-pad) + var(--m-safe-left));
}

.project-title{
margin-bottom:48px;
}

.project-meta{
font-size:9px;
letter-spacing:1.7px;
}

.project-title h1{
margin-top:15px;
font-size:clamp(27px,8.1vw,32px);
line-height:1.2;
letter-spacing:clamp(3px,1.25vw,5px);
}

.project-title-cn{
margin-top:11px;
font-size:18px;
}

.description{
font-size:12.5px;
line-height:1.92;
}

/* 两列缩略图，比三列更适合摄影观看 */
.thumbnail-gallery,
.xining-gallery{
grid-template-columns:repeat(2,1fr);
gap:9px;
}

/* ---------- Viewer ---------- */

.viewer-info{
max-height:30svh;
padding:
calc(54px + var(--m-safe-top))
calc(18px + var(--m-safe-right))
13px
calc(18px + var(--m-safe-left));
}

.viewer-info h2{
font-size:19px;
letter-spacing:3.2px;
}

.viewer-info h3{
font-size:14px;
}

.viewer-info p{
font-size:11px;
line-height:1.62;
}

.viewer-photo-area{
padding:
5px
calc(12px + var(--m-safe-right))
calc(12px + var(--m-safe-bottom))
calc(12px + var(--m-safe-left));
}

.viewer-topbar{
top:calc(7px + var(--m-safe-top));
right:calc(7px + var(--m-safe-right));
}

.viewer-topbar button{
width:38px;
height:38px;
}

.viewer-prev,
.viewer-next{
bottom:calc(9px + var(--m-safe-bottom));
width:42px;
height:42px;
font-size:32px;
line-height:42px;
}

/* ---------- Xining ---------- */

.xining-info{
max-height:32svh;
padding:
calc(54px + var(--m-safe-top))
calc(18px + var(--m-safe-right))
13px
calc(18px + var(--m-safe-left));
}

.xining-info h2{
font-size:19px;
letter-spacing:3.2px;
}

.xining-info h3{
font-size:14px;
}

.xining-description{
font-size:11.5px;
line-height:1.65;
}

.xining-photo-area{
padding:
5px
calc(12px + var(--m-safe-right))
calc(12px + var(--m-safe-bottom))
calc(12px + var(--m-safe-left));
}

.x-prev,
.x-next{
bottom:calc(9px + var(--m-safe-bottom));
width:42px;
height:42px;
font-size:32px;
line-height:42px;
}

/* ---------- DRIFT ---------- */

.drift-entry{
bottom:calc(16px + var(--m-safe-bottom));
font-size:9px;
letter-spacing:2.5px;
}

.drift-image{
max-width:96vw;
max-height:calc(100svh - 70px - var(--m-safe-top) - var(--m-safe-bottom));
}

.drift-controls{
bottom:calc(7px + var(--m-safe-bottom));
}

.drift-control{
width:44px;
height:42px;
line-height:42px;
}

/* ---------- PHOTOBOOK 首页入口 ---------- */

.book-feature-wrap{
margin-top:62px;
}

.book-feature{
width:96vw;
}

.book-feature-title{
font-size:12px;
letter-spacing:2.3px;
}

/* ---------- PHOTOBOOK 项目 ---------- */

.book-project-page{
padding:
calc(122px + var(--m-safe-top))
calc(var(--m-pad) + var(--m-safe-right))
76px
calc(var(--m-pad) + var(--m-safe-left));
}

.book-project-intro{
display:block;
max-width:none;
}

.book-project-heading{
position:static;
margin-bottom:42px;
}

.book-kicker{
margin-bottom:18px;
font-size:8px;
letter-spacing:2px;
}

.book-project-heading h1{
font-size:clamp(25px,7.6vw,30px);
line-height:1.3;
letter-spacing:3px;
}

.book-project-heading .book-title-cn{
margin-top:12px;
font-size:18px;
letter-spacing:1.5px;
}

.book-meta{
margin-top:22px;
font-size:9px;
line-height:1.85;
letter-spacing:.6px;
}

.book-statement{
max-width:none;
font-size:13px;
line-height:2;
}

.book-statement p{
margin-bottom:18px;
}

.book-statement-en{
margin-top:34px;
font-size:12px;
line-height:1.92;
}

.book-preview{
margin-top:66px;
}

.book-preview-row{
min-height:auto;
margin-bottom:62px;
}

.book-preview-row.align-left,
.book-preview-row.align-right,
.book-preview-row.align-center{
justify-content:center;
}

.book-preview-page{
width:min(86vw,520px);
}

.book-preview-spread{
width:96vw;
gap:1px;
}

.book-preview-caption{
font-size:8px;
letter-spacing:1px;
}

.read-book-area{
min-height:30svh;
}

.read-book-trigger{
padding:12px 15px;
font-size:9px;
letter-spacing:2.5px;
}

/* 竖屏不拆跨页，直接提示横屏 */
.book-reader.is-open .book-rotate-prompt{
display:flex;
padding:
calc(24px + var(--m-safe-top))
calc(22px + var(--m-safe-right))
calc(24px + var(--m-safe-bottom))
calc(22px + var(--m-safe-left));
font-size:9px;
letter-spacing:2px;
}

/* ---------- JOURNAL ---------- */

.journal-hero{
height:205px;
}

.journal-hero-title{
margin-top:28px;
padding-left:18px;
padding-right:18px;
}

.journal-kicker{
margin-bottom:8px;
font-size:7px;
letter-spacing:2px;
}

.journal-hero-title h1{
font-size:26px;
letter-spacing:5px;
}

.journal-heading-cn{
margin-top:8px;
font-size:15px;
}

.journal-page{
padding:
34px
calc(var(--m-pad) + var(--m-safe-right))
74px
calc(var(--m-pad) + var(--m-safe-left));
}

.journal-row{
grid-template-columns:minmax(0,1fr) 54px;
gap:10px;
padding:18px 15px 17px;
}

.journal-row:hover,
.journal-row[aria-expanded="true"]{
padding-left:15px;
}

.journal-meta{
gap:5px;
}

.journal-title{
font-size:14px;
line-height:1.46;
letter-spacing:.5px;
}

.journal-date{
font-size:8px;
letter-spacing:1px;
}

.journal-reads{
min-width:48px;
}

.journal-reads-number{
font-size:14px;
}

.journal-reads-label{
margin-top:5px;
font-size:6px;
letter-spacing:1px;
}

.journal-article{
max-width:none;
margin-left:0;
padding:31px 3px 58px;
font-size:13px;
line-height:1.95;
}

.journal-article h2{
font-size:18px;
}

.journal-article h3{
font-size:15px;
}

footer{
padding-top:38px;
padding-bottom:calc(38px + var(--m-safe-bottom));
}

}


/* =========================================================
   小屏手机
========================================================= */

@media (max-width:480px){

:root{
--m-pad:16px;
}

.logo{
font-size:14px;
letter-spacing:3.2px;
}

nav{
gap:6px 12px;
}

nav a{
font-size:8.5px;
letter-spacing:1px;
}

.hero{
min-height:520px;
}

.hero-text{
padding-left:18px;
padding-right:18px;
}

.title-en{
font-size:clamp(25px,8vw,30px);
letter-spacing:4.7px;
}

.title-cn{
font-size:26px;
}

.hero p{
font-size:11.5px;
line-height:1.78;
}

.works{
padding-top:58px;
}

.projects{
gap:43px;
}

.project-title h1{
font-size:clamp(25px,8vw,29px);
letter-spacing:3px;
}

.viewer-info{
max-height:29svh;
padding-left:15px;
padding-right:15px;
}

.xining-info{
max-height:31svh;
padding-left:15px;
padding-right:15px;
}

.book-project-heading h1{
font-size:24px;
letter-spacing:2.7px;
}

.book-preview-page{
width:90vw;
}

.journal-row{
grid-template-columns:minmax(0,1fr) 48px;
padding-left:13px;
padding-right:13px;
}

.journal-row:hover,
.journal-row[aria-expanded="true"]{
padding-left:13px;
}

}


/* =========================================================
   手机横屏：把屏幕优先让给照片
========================================================= */

@media (max-width:1000px) and (orientation:landscape) and (max-height:650px){

.site-header,
.journal-body .site-header{
padding-top:calc(12px + var(--m-safe-top));
padding-bottom:10px;
gap:8px;
}

.logo{
font-size:13px;
}

nav{
gap:5px 14px;
}

nav a{
font-size:8px;
}

.hero{
min-height:100svh;
}

.viewer-layout{
flex-direction:row;
}

.viewer-info{
width:30%;
height:100%;
max-height:none;
padding:
calc(48px + var(--m-safe-top))
14px
calc(10px + var(--m-safe-bottom))
calc(14px + var(--m-safe-left));
}

.viewer-photo-area{
width:70%;
height:100%;
padding:
6px
calc(14px + var(--m-safe-right))
calc(6px + var(--m-safe-bottom))
6px;
}

.viewer-info h2{
font-size:16px;
letter-spacing:2.6px;
}

.viewer-info h3{
font-size:12px;
}

.viewer-info p{
font-size:10px;
line-height:1.5;
}

.viewer-prev,
.viewer-next{
top:50%;
bottom:auto;
transform:translateY(-50%);
}

.xining-viewer{
flex-direction:row;
}

.xining-info{
width:30%;
height:100%;
max-height:none;
padding:
calc(48px + var(--m-safe-top))
14px
calc(10px + var(--m-safe-bottom))
calc(14px + var(--m-safe-left));
}

.xining-photo-area{
width:70%;
height:100%;
padding:
6px
calc(14px + var(--m-safe-right))
calc(6px + var(--m-safe-bottom))
6px;
}

.xining-info h2{
font-size:16px;
letter-spacing:2.6px;
}

.xining-info h3{
font-size:12px;
}

.xining-description{
font-size:10px;
line-height:1.5;
}

.x-prev,
.x-next{
top:50%;
bottom:auto;
transform:translateY(-50%);
}

.drift-image{
max-width:96vw;
max-height:calc(100svh - 34px - var(--m-safe-top) - var(--m-safe-bottom));
}

.drift-controls{
bottom:calc(2px + var(--m-safe-bottom));
}

/* PHOTOBOOK 横屏保持完整跨页 */
.book-reader-stage{
padding:
calc(2vh + var(--m-safe-top))
calc(2vw + var(--m-safe-right))
calc(2vh + var(--m-safe-bottom))
calc(2vw + var(--m-safe-left));
}

.book-reader-layer{
inset:
calc(2vh + var(--m-safe-top))
calc(2vw + var(--m-safe-right))
calc(2vh + var(--m-safe-bottom))
calc(2vw + var(--m-safe-left));
gap:1px;
}

.book-reader-layer img{
max-width:49%;
max-height:94svh;
}

.book-reader-layer.single img{
max-width:58vw;
max-height:94svh;
}

.book-reader-zone{
width:25%;
}

.book-reader-controls{
bottom:calc(2px + var(--m-safe-bottom));
}

.book-reader-close{
right:calc(3px + var(--m-safe-right));
top:calc(1px + var(--m-safe-top));
}

}


/* =========================================================
   PHOTOBOOK 竖屏：强制保留横屏提示
========================================================= */

@media (max-width:900px) and (orientation:portrait){

.book-reader.is-open .book-rotate-prompt{
display:flex!important;
}

.book-reader.is-open .book-reader-stage,
.book-reader.is-open .book-reader-zone,
.book-reader.is-open .book-reader-controls,
.book-reader.is-open .book-reader-close{
visibility:hidden!important;
}

}
