/* The phone starts with the book and board visible together. */
.phone-tools-button{display:none}
.mobile-menu .support-link{display:block;padding:10px 12px;border:1px solid #b7ccd9;border-radius:6px;color:#164d66;text-decoration:none;font-size:14px;text-align:center;background:#fff}
@media(max-width:759px) and (orientation:portrait){
 body.phone-together{--header-height:62px;--mobile-nav:calc(54px + env(safe-area-inset-bottom))}
 body.phone-together .topbar{display:flex;flex-wrap:nowrap;padding:8px 10px;height:62px;min-height:62px;gap:8px}
 body.phone-together .brand{flex:0 0 auto;gap:5px}
 body.phone-together .brand h1{font-size:16px}
 body.phone-together .brand-piece{width:24px;height:29px;font-size:16px}
 body.phone-together .book-controls{flex:1;min-width:0;max-width:none;gap:6px}
 body.phone-together .book-controls select{width:0;flex:1;min-width:0;font-size:14px;height:40px}
 body.phone-together #add-book{font-size:12px;padding:6px 8px;min-height:40px;white-space:nowrap}
 body.phone-together .workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,var(--phone-book-height,44%)) 20px minmax(0,1fr);overflow:hidden}
 body.phone-together .reader-pane,body.phone-together .study-pane{display:flex!important;width:100%;height:100%;min-height:0;min-width:0;overflow:hidden}
 body.phone-together .reader-toolbar{padding:4px 6px;gap:5px;min-height:36px;flex-wrap:nowrap}
 body.phone-together .reader-toolbar button{min-height:30px;min-width:28px;padding:2px 5px}
 body.phone-together .pager{gap:3px;font-size:11px}
 body.phone-together .pager input{width:43px;padding:3px;font-size:14px}
 body.phone-together .reader-options{gap:4px;font-size:11px}
 body.phone-together .reader-options .sync{font-size:10px;margin-left:0}
 body.phone-together .reader-options .sync input{margin:0 2px 0 0}
 body.phone-together .pdf-scroll{padding:6px;min-height:0;min-width:0}
 body.phone-together #epub-frame{height:100%;min-height:0}
 body.phone-together .epub-navigation{padding:3px 6px;flex-shrink:0}
 body.phone-together .epub-navigation label{font-size:11px;display:flex;gap:6px;min-width:0;align-items:center}
 body.phone-together #section-picker{font-size:13px;min-width:0;max-width:75vw;padding:3px}
 body.phone-together .reader-footer{padding:3px 6px;gap:4px;min-height:0;flex-wrap:nowrap;flex-shrink:0}
 body.phone-together .reader-footer>div:first-child{flex:1;min-width:0}
 body.phone-together .reader-footer #reader-status,body.phone-together #book-scan-status{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px;line-height:1.5}
 body.phone-together .reader-footer button{min-width:0;min-height:32px;padding:3px 5px;font-size:10px;white-space:nowrap}
 body.phone-together .pdf-empty{padding:12px;font-size:12px}
 body.phone-together .pdf-empty .empty-icon,body.phone-together .pdf-empty p{display:none}
 body.phone-together .pdf-empty h2{font-size:16px;margin:4px 0}
 body.phone-together .pdf-empty button{font-size:12px;min-height:34px}
 body.phone-together .pane-splitter{display:flex;height:20px;min-height:20px;align-items:center;justify-content:center;cursor:row-resize;touch-action:none;background:#c4d3dc;border-block:1px solid #afc2ce}
 body.phone-together .pane-splitter span{width:42px;height:3px;border-radius:3px;background:#597d92}
 body.phone-together .study-pane{padding:4px 8px 3px;flex-direction:column}
 body.phone-together .study-head{flex-shrink:0;gap:6px;margin:0;min-height:24px}
 body.phone-together .study-head>div{flex:1;min-width:0}
 body.phone-together .study-head .eyebrow{display:none}
 body.phone-together .study-head h2{font-size:13px;line-height:1.6;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.phone-together #diagram-picker{font-size:12px;max-width:44%;padding:2px 4px;min-height:26px}
 body.phone-together .study-deck{display:flex;flex:1;min-height:0;flex-direction:column}
 body.phone-together .study-board-pane{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 body.phone-together .study-board-pane .study-board-view{flex:1;min-height:0;overflow:auto;scrollbar-gutter:auto;padding:0}
 body.phone-together .board-area{max-width:100%;margin:0 auto}
 body.phone-together .board-wrap{margin:0;padding:14px 14px 0 0}
 body.phone-together .file-labels{right:14px;font-size:9px}
 body.phone-together .rank-labels{top:14px;width:14px;font-size:9px}
 body.phone-together .board .cell{min-height:0;padding:0}
 body.phone-together .board .piece{font-size:min(24px,7.5cqw)}
 body.phone-together .board .piece.long{font-size:min(14px,4.5cqw)}
 body.phone-together .hand-row{min-height:20px;padding:0;gap:3px;flex-wrap:nowrap}
 body.phone-together .hand-row>span{font-size:9px;white-space:nowrap}
 body.phone-together .hand-pieces{min-height:18px;gap:2px}
 body.phone-together .hand-pieces button{font-size:12px;min-height:22px;min-width:22px;padding:0 3px}
 body.phone-together .empty-hand{font-size:9px}
 body.phone-together .whole-game-bar{font-size:10px;line-height:1.4;margin:0}
 body.phone-together .whole-game-bar #game-status{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 body.phone-together .whole-game-bar button{font-size:10px;padding:2px 4px;min-height:24px;white-space:nowrap}
 body.phone-together .board-info{margin:2px 0;gap:4px;flex-wrap:nowrap;font-size:10px}
 body.phone-together .board-info button{min-height:28px;padding:2px 6px;font-size:11px;white-space:nowrap}
 body.phone-together .phone-tools-button{display:inline-block;margin-left:auto}
 body.phone-together .playback{flex-shrink:0;padding-top:3px;gap:4px;flex-wrap:nowrap}
 body.phone-together .playback button{min-height:32px;min-width:30px;padding:2px 6px}
 body.phone-together .playback #ply-label{font-size:11px;min-width:54px}
 body.phone-together .playback .mainline{font-size:10px;min-width:0;padding:2px 4px}
 body.phone-together .move-slider{flex-shrink:0;height:16px;margin:2px 0 0}
 body.phone-together .study-splitter{display:none}
 .mobile-tabs button{font-size:11px}
 .mobile-tabs button[data-view]{display:block;min-width:0}
}
@media(max-width:759px) and (orientation:portrait) and (max-height:650px){
 body.phone-together .reader-footer,body.phone-together .move-slider{display:none}
}
@media(max-width:350px) and (orientation:portrait){
 body.phone-together .reader-options span{width:30px;font-size:10px}
 body.phone-together .reader-options .sync{font-size:9px;gap:2px}
}
@media(orientation:landscape) and (min-width:600px) and (max-height:650px){
 body.phone-side-together{--header-height:54px;--mobile-nav:calc(48px + env(safe-area-inset-bottom))}
 body.phone-side-together .topbar{height:54px;min-height:54px;padding:5px 10px;gap:8px}
 body.phone-side-together .brand h1{font-size:16px}
 body.phone-side-together .brand-piece{width:24px;height:29px;font-size:16px}
 body.phone-side-together .book-controls select{height:36px}
 body.phone-side-together .topbar button{min-height:36px;font-size:12px}
 body.phone-side-together .study-pane{display:flex!important;flex-direction:column;padding:4px 8px 3px;overflow:hidden}
 body.phone-side-together .study-head{flex-shrink:0;margin:0;min-height:24px}
 body.phone-side-together .study-head .eyebrow{display:none}
 body.phone-side-together .study-head h2{font-size:13px;margin:0}
 body.phone-side-together #diagram-picker{font-size:12px;padding:2px 4px;min-height:26px}
 body.phone-side-together .study-deck,body.phone-side-together .study-board-pane{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
 body.phone-side-together .study-board-pane .study-board-view{flex:1;min-height:0;overflow:auto;padding:0}
 body.phone-side-together .board-area{max-width:100%;margin:0 auto}
 body.phone-side-together .board-wrap{margin:0;padding:14px 14px 0 0}
 body.phone-side-together .file-labels{right:14px;font-size:9px}
 body.phone-side-together .rank-labels{top:14px;width:14px;font-size:9px}
 body.phone-side-together .hand-row{min-height:16px;padding:0;gap:3px;flex-wrap:nowrap}
 body.phone-side-together .hand-row>span,body.phone-side-together .empty-hand{font-size:9px;white-space:nowrap}
 body.phone-side-together .hand-pieces{min-height:16px;gap:2px}
 body.phone-side-together .hand-pieces button{font-size:12px;min-height:20px;min-width:22px;padding:0 3px}
 body.phone-side-together .whole-game-bar{margin:0;font-size:10px;line-height:1.4}
 body.phone-side-together .whole-game-bar button{min-height:24px;font-size:10px;padding:2px 4px}
 body.phone-side-together .board-info{margin:2px 0;gap:4px;flex-wrap:nowrap;font-size:10px}
 body.phone-side-together .board-info button{min-height:28px;padding:2px 6px;font-size:11px}
 body.phone-side-together .phone-tools-button{display:inline-block;margin-left:auto}
 body.phone-side-together .playback{flex-shrink:0;flex-wrap:nowrap;padding-top:3px;gap:4px}
 body.phone-side-together .playback button{min-height:32px;min-width:30px;padding:2px 6px}
 body.phone-side-together .playback #ply-label{font-size:11px;min-width:54px}
 body.phone-side-together .playback .mainline{font-size:10px;padding:2px 4px;min-width:0}
 body.phone-side-together .move-slider,body.phone-side-together .study-splitter{display:none}
 body.phone-side-together #epub-frame{height:100%;min-height:0}
 body.phone-side-together .reader-toolbar{min-height:40px;padding:3px 6px;gap:5px;flex-wrap:nowrap}
 body.phone-side-together .reader-toolbar button{min-height:30px;min-width:28px;padding:2px 5px}
 body.phone-side-together .pager{gap:3px;font-size:11px}
 body.phone-side-together .pager input{width:43px;padding:3px}
 body.phone-side-together .reader-options{gap:4px;font-size:11px}
 body.phone-side-together .reader-options .sync{font-size:10px}
 body.phone-side-together .reader-footer{display:none}
 body.phone-side-together .epub-navigation{padding:3px 6px}
 body.phone-side-together .epub-navigation select{padding:3px}
}
#phone-tools-dialog .study-layout-controls{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#phone-tools-dialog .study-layout-controls label{font-size:12px}
#phone-tools-dialog .phone-position-actions{display:flex;gap:8px;margin:12px 0}
#phone-tools-dialog .study-analysis-pane{display:block;overflow:visible;padding:0;scrollbar-gutter:auto}
#phone-tools-dialog .reader-footer{display:flex;flex-wrap:wrap;padding:8px 0;margin-top:12px}
#phone-tools-dialog .reader-footer>div:first-child{flex:1 1 100%}
#phone-tools-dialog #reader-status,#phone-tools-dialog #book-scan-status{white-space:normal}
#phone-tools-dialog .epub-navigation{margin-top:12px}
#phone-tools-dialog .mobile-queue-actions{flex-wrap:wrap}
#phone-tools-dialog .move-list{max-height:220px}
@media(min-width:760px),(orientation:landscape) and (min-width:600px){
 .mobile-tabs button[data-view=together]{display:none}
}
