/* Phone usability refinements. The same folders, paper and art direction. */
@media (max-width:760px){
 :root{--rhythm-clearance:calc(76px + env(safe-area-inset-bottom,0px));scroll-padding-top:84px}
 .header-word{display:inline-flex;align-items:center;min-height:44px}
 #navigation{padding:12px 20px;max-height:calc(100dvh - 162px - env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
 #navigation a,#navigation #language{min-height:48px;padding:14px 0}
 #rhythm{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
 .hero-photo figcaption{font-size:10px;line-height:1.35}
 .hero-photo-board{will-change:auto}

 .menu-folder-page{padding-top:84px;overflow-x:clip;padding-bottom:calc(160px + env(safe-area-inset-bottom,0px))}
 .menu-folder-page .menu-page-heading{margin-bottom:18px;gap:12px;align-items:flex-end}
 .menu-folder-page .menu-page-heading>div{min-width:0}
 .menu-folder-page .menu-page-heading h1{font-size:clamp(24px,6.5vw,30px);line-height:1.15;max-width:none}
 .menu-folder-page .file-back{min-height:44px;margin-bottom:2px}
 .menu-folder-page .menu-page-heading .text-button{flex-shrink:0;min-height:44px;font-size:14px;padding:10px 8px;max-width:112px}
 .menu-folder-shell{width:calc(100% - 60px);left:-16px;padding:12px 6px 18px 10px;min-height:640px}
 .menu-folder-paper{padding:20px 10px 24px 20px;min-height:604px}
 .menu-folder-paper:before{left:5px;width:5px;padding-right:8px;background-size:5px 108px}
 .menu-paper-heading{padding-bottom:12px;margin-bottom:10px}
 .menu-paper-heading h2{font-size:21px;line-height:1.15}
 .menu-paper-heading>span{margin-top:8px;line-height:1.4}
 .menu-folder-paper .menu-subbar{gap:8px;margin-bottom:6px;min-width:0}
 .menu-folder-paper .group-tabs{width:100%;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#b9b3a7 transparent}
 .menu-folder-paper .group-tabs:empty{display:none}
 .menu-folder-paper .group-tabs button{flex-shrink:0;min-width:44px;min-height:44px;padding:10px 8px;white-space:nowrap}
 .menu-folder-paper .menu-search{min-width:0;padding:10px 0;scroll-margin-top:100px}
 .menu-folder-paper .menu-ledger .dish-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'name price' 'description description';column-gap:12px;row-gap:8px;padding:18px 0;align-items:start}
 .menu-folder-paper .dish-number{display:none}
 .menu-folder-paper .dish-info{display:contents}
 .menu-folder-paper .dish-name{grid-area:name;font-size:18px;line-height:1.4;overflow-wrap:anywhere}
 .menu-folder-paper .dish-desc{grid-area:description;font-size:16px;line-height:1.5;margin:0}
 .menu-folder-paper .dish-price{grid-area:price;font-size:16px;white-space:nowrap}
 .menu-folder-paper .dish-price small{font-size:14px;white-space:nowrap;margin-top:6px}
 .menu-folder-paper .menu-footnote{font-size:13px;line-height:1.6}
 .file-tabs{top:84px;max-height:calc(100dvh - 244px - env(safe-area-inset-bottom,0px));scrollbar-width:thin;scrollbar-color:var(--surface-line) transparent}
 .file-tab{font-size:15px}
 .file-tab .folder-shoulder{height:12px}
 .file-tab .folder-tag-text{padding:8px;min-height:44px}
 .cart-dock{width:calc(100% - 24px);min-height:56px;padding:14px 16px;gap:14px;font-size:16px;text-align:left}
 .cart-dock>span:first-child{display:flex;align-items:center;min-width:0;flex-wrap:wrap;gap:4px}
 .cart-dock>span:last-child{white-space:nowrap;flex-shrink:0}
 .cart-dock .dock-count{margin-right:6px;flex-shrink:0}
 .cart-dock small{flex-basis:100%}

 #sheet{max-height:calc(100dvh - 16px);padding-bottom:env(safe-area-inset-bottom,0px);scroll-padding-block:56px 160px}
 #sheet-content{padding:30px 20px 24px}
 #sheet-content>.meta{display:block;padding-right:28px;font-size:12px}
 .sheet-title{padding-right:22px}
 .close-sheet{top:8px;right:8px}
 .detail-actions{position:sticky;bottom:0;z-index:2;background:var(--surface);padding:12px 0 4px;box-shadow:0 -10px 0 var(--surface);border-top:1px solid var(--surface-line)}
 .detail-actions .item-bottom{margin:0 0 12px;gap:16px}
 .detail-actions .item-bottom>div{display:flex;align-items:center;gap:10px}
 .detail-actions .item-bottom small{font-size:14px}
 .detail-actions .primary{min-height:52px;padding:14px 18px}
 #sheet-content.has-detail-actions{padding-bottom:10px}
 #sheet-content.has-detail-actions>.review-note{font-size:12px;margin-top:10px}
 .field{font-size:16px;min-width:0}
 input,textarea,select{min-width:0;font-size:16px;scroll-margin-block:64px 160px}
 .cart-line-actions{gap:8px;flex-wrap:wrap}
 .cart-line-actions>div:first-child{display:flex;gap:8px}
 .cart-line-actions>div:first-child button{min-width:44px;min-height:44px;padding:8px 4px;text-decoration:underline;text-underline-offset:4px}
 .cart-line-actions .stepper button{width:44px;height:44px}
 .cart-line-head>span:first-child{min-width:0;overflow-wrap:anywhere}
 .cart-line-head>span:last-child{white-space:nowrap}
 .review-back{min-height:44px;margin:-10px 0 18px}
 .confirm-table{font-size:16px;min-height:44px}
 .confirm-table input{width:24px;height:24px;margin:0;flex-shrink:0}
 .review-note{font-size:14px}
 #toast{max-width:calc(100% - 32px);white-space:normal;bottom:calc(var(--rhythm-clearance) + 76px);text-align:center}

 .artifact-back p{font-size:16px;line-height:1.6}
 .artifact-back{overscroll-behavior:contain;scroll-padding:20px}
 .artifact-controls{bottom:calc(12px + env(safe-area-inset-bottom,0px));gap:12px;left:16px;right:16px;font-size:14px}
 .artifact-controls button{min-height:44px;padding:10px 4px}
 .artifact-controls span{margin-left:4px}
 .globe-controls [data-globe-turn]{min-width:44px;min-height:44px}
 .globe-drag-label{display:none}
 .globe-controls button{font-size:14px}
 .globe-footer{font-size:14px}
 .site-footer{gap:12px 24px;font-size:14px}
 .site-footer a{display:inline-flex;align-items:center;min-height:44px}
 .site-footer>span:first-child{flex-basis:100%;font-size:12px}
 .visit-grid{grid-template-columns:minmax(0,1fr)}
 .visit-page .field{margin:18px 0}
 .receipt-status{flex-wrap:wrap;gap:10px;font-size:14px}
}
@media(max-width:760px) and (max-height:580px){
 .menu-paper-heading h2{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .menu-paper-heading>span{margin-top:0}
 #sheet .detail-actions .item-bottom>div{gap:6px}
 .hero:has(.hero-photo-board){min-height:0}
}
@media(hover:none){
 .menu-folder-paper .dish-row:hover{padding-left:0}
 .fragment:hover img{transform:none}
}
