/* Every step fits the usable web view. Only the voting gallery has document scroll. */
html:not([data-page="gallery"]),html:not([data-page="gallery"]) body{height:var(--viewport-height);min-height:0;overflow:hidden;overscroll-behavior:none}
html:not([data-page="gallery"]) body{position:fixed;inset:0;width:100%}
html:not([data-page="gallery"]) #app{height:var(--viewport-height);min-height:0;width:100%;padding-inline:clamp(16px,5vw,27px);padding-left:max(clamp(16px,5vw,27px),env(safe-area-inset-left,0px));padding-right:max(clamp(16px,5vw,27px),env(safe-area-inset-right,0px))}
.screen:not(.page-gallery){height:var(--viewport-height);min-height:0;overflow:hidden;padding-top:max(6px,var(--safe-top));padding-bottom:max(10px,var(--safe-bottom));animation:scanner-appear .3s ease}
.screen:not(.page-gallery)>*{flex-shrink:0;min-width:0}
.screen .head{height:52px;padding-top:0}
.screen .topbar{height:44px;padding-top:0;flex:none}
.screen .steps{margin:8px 0 14px;flex:none}
.page-heading{flex:none;min-width:0}
.page-heading .page-title{font-size:clamp(21px,5.8vw,26px);margin:5px 0 6px;line-height:1.5}
.page-heading .page-sub{font-size:11px;line-height:1.7;margin:0 0 10px}
.screen:not(.page-gallery) .bottom-actions{flex:none;padding-top:12px}
.screen:not(.page-gallery) .primary,.screen:not(.page-gallery) .secondary{min-height:48px;font-size:13px}
.screen:not(.page-gallery) .bottom-actions .small{font-size:10px;margin-top:7px;line-height:1.5}
.screen:not(.page-gallery) .tip{font-size:10px;line-height:1.65;margin:10px 0 0;padding-left:9px}
/* The artwork, rather than the buttons, expands and contracts with screen height. */
.home .intro{padding-top:clamp(12px,3vh,28px)}
.home h1{font-size:clamp(28px,8vw,40px);letter-spacing:3px;line-height:1.4;margin:10px 0}
.home .slogan{font-size:11px;letter-spacing:.7px;line-height:1.7;margin:8px 0}
.home .planet-scene{flex:1 1 0;min-height:0;height:auto;margin:0;--planet-size:220px}
.home .earth{width:var(--planet-size);height:var(--planet-size)}
.home .planet-scene:before{width:130%;height:100%;max-height:430px}
.home .orbit{width:calc(var(--planet-size)*1.5);height:calc(var(--planet-size)*.57)}
.home .orbit.second{width:calc(var(--planet-size)*1.22);height:calc(var(--planet-size)*1.18)}
.home .orbit.third{width:calc(var(--planet-size)*1.72);height:calc(var(--planet-size)*.8)}
.home .coordinate.left{left:0}.home .coordinate.right{right:0}
.home .coordinate{font-size:7px;letter-spacing:.4px}
.home .invitation{margin:8px 0 12px;gap:8px}
.home .invitation .mono{font-size:7px;letter-spacing:1px;white-space:nowrap}
.home .bottom-actions{padding-top:0!important;margin-top:0}
.home .primary{height:50px}
.home .home-footer{font-size:7px;letter-spacing:.2px;margin-top:10px;gap:6px}
.home .brand-text{letter-spacing:1px}.screen .brand-text span{letter-spacing:.6px}
.screen .brand{gap:9px}.screen .status{font-size:7px;letter-spacing:.3px}
.screen .brand-mark{flex:none}
.page-crop .crop-wrap{flex:1 1 0;min-height:0;max-width:none;display:grid;place-items:center;background:transparent;padding:20px}
.page-crop .crop-stage{max-width:none;flex:none;margin:0}
.page-crop .crop-stage>canvas{width:100%;height:100%;max-width:none;max-height:none}
.page-crop .crop-controls{margin-top:7px;flex:none}
.page-crop .crop-controls .text-button{padding:4px 8px;font-size:11px;min-height:32px}
.page-crop .handle{touch-action:none}
.page-preview .preview-space{flex:1 1 0;min-height:0;margin:4px 0 8px;--sphere-size:200px}
.page-preview .ecosystem{width:var(--sphere-size);height:var(--sphere-size)}
.page-preview .ecosystem:before{width:calc(var(--sphere-size)*1.24);height:calc(var(--sphere-size)*.32)}
.page-preview .preview-space:before{height:35%;bottom:0;width:100%}
.page-preview .space-label{font-size:7px;left:0;top:0;letter-spacing:.3px}
.page-preview .space-label.right{left:auto;right:0;top:auto;bottom:0}
.page-preview .preview-description{padding:10px 0;font-size:10px}
.page-profile .profile-mini{margin:0 0 10px;gap:10px}
.page-profile .profile-mini img{width:38px;height:38px}
.page-profile .profile-mini .mono{font-size:8px;margin-top:3px!important}
#profile-form{flex:1 1 0;min-height:0;display:flex;flex-direction:column}
#profile-form .field{flex:none;margin-bottom:9px;min-width:0}
#profile-form .field label{font-size:11px;line-height:16px;margin-bottom:4px}
#profile-form .field input{height:42px;padding:7px 10px;font-size:16px}
#profile-form .field textarea{font-size:16px;line-height:1.5;padding:7px 10px;resize:none;min-height:64px;height:0;flex:1 1 0;overflow:auto;overscroll-behavior:contain}
#profile-form .field:nth-child(3){display:flex;flex-direction:column;flex:1 1 0;min-height:84px}
#profile-form .category{padding:5px;font-size:11px;min-height:34px;gap:5px}
#profile-form .category .icon{width:16px;height:16px}
#profile-form .categories{gap:5px}
#profile-form .privacy-note{font-size:9px;line-height:1.5;margin:2px 0 7px;flex:none}
#profile-form>.primary{flex:none}
.keyboard-toolbar{display:none}
.center-page .page-heading .page-title{margin-top:7px}
.center-page .page-heading .eyebrow{letter-spacing:1.8px;font-size:9px}
.center-page .upload-orbit{margin:clamp(12px,3vh,30px) auto 16px;width:clamp(70px,16vh,140px);height:clamp(70px,16vh,140px)}
.page-uploading .upload-orbit,.page-checking .upload-orbit{margin-top:auto}
.center-page .upload-orbit img{width:55%;height:55%;object-fit:cover}
.center-page .upload-percent{font-size:38px;margin:6px 0 12px}
.center-page .upload-logs{padding-top:10px;font-size:10px}
.center-page .upload-log{padding:7px 0;font-size:11px}
.center-page>p.small{font-size:10px;padding-top:14px!important;margin-bottom:0}
.center-page .panel{padding:12px;margin-top:12px!important}
.result-content,.success-content{flex:1 1 0!important;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center}
.result-content>*,.success-content>*{flex:none;max-width:100%}
.result-content .result-mark,.success-content .result-mark{width:clamp(58px,11vh,83px);height:clamp(58px,11vh,83px);margin:10px auto 18px}
.result-content .badge{margin-bottom:8px}
.result-content>.mono{font-size:10px;margin-top:18px!important;letter-spacing:1px!important}
.success-content .archive-ticket{width:100%;padding:14px;margin-top:16px}
.success-content .ticket-image{gap:12px;padding-bottom:12px;margin-bottom:10px}
.success-content .ticket-image img{width:54px;height:54px;flex:none}
.success-content .ticket-image>div{min-width:0}
.success-content .ticket-image h3{font-size:15px;overflow-wrap:anywhere}
.success-content .ticket-image .small{font-size:11px;overflow-wrap:anywhere}
.success-content .archive-id{font-size:13px;letter-spacing:.5px;overflow-wrap:anywhere}
.success-content>p.small{font-size:10px;margin:14px 0 0!important}
.page-success .bottom-actions{margin-top:0}
.detail-category{margin:5px 0 7px}
.detail-workspace{flex:1 1 0!important;min-height:0;display:grid;place-items:center}
.detail-workspace .detail-art{width:100%;height:100%;min-height:0;object-fit:contain;margin:0;background:transparent}
.page-detail .longpress{margin:7px 0 9px;font-size:10px}
.page-detail .detail-header{gap:10px;margin:0 0 6px}
.page-detail .detail-header .page-title{font-size:20px;line-height:1.4;overflow-wrap:anywhere;min-width:0}
.page-detail .detail-header .vote-button{flex:none}
.page-detail .detail-description{font-size:11px;line-height:1.65;margin:0 0 8px;white-space:normal}
.detail-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:3px 12px;font-size:10px;overflow-wrap:anywhere}
.page-detail .bottom-actions{margin-top:0}
.modal-backdrop{height:var(--viewport-height);bottom:auto}
.modal{max-height:calc(var(--viewport-height) - 12px);overflow:hidden;padding:16px 18px max(12px,var(--safe-bottom));display:flex;flex-direction:column}
.modal-top{flex:none;margin-bottom:10px}.modal h3{font-size:16px}
.modal .poster{min-height:0;flex:1 1 0;width:100%;height:calc(var(--viewport-height) - 250px);max-height:560px;margin:0;object-fit:contain}
.modal .small{font-size:11px;margin:8px 0}.modal .tiny{font-size:9px;margin:7px 0}
.modal .share-link{flex:none}.modal .primary,.modal .secondary{min-height:44px;font-size:12px}
.modal .text-button{min-height:32px;padding:5px;font-size:11px;flex:none}
.modal .panel{padding:12px}
.share-modal{height:calc(var(--viewport-height) - 12px)}
.share-modal>*:not(.poster){flex:none}
html[data-short-viewport="true"] .screen .head{height:42px}
html[data-short-viewport="true"] .screen .topbar{height:34px}
html[data-short-viewport="true"] .screen .steps{margin:5px 0 9px}
html[data-short-viewport="true"] .page-heading .eyebrow{font-size:8px;letter-spacing:1.8px}
html[data-short-viewport="true"] .page-heading .page-title{font-size:22px;margin:3px 0;line-height:1.4}
html[data-short-viewport="true"] .page-heading .page-sub{font-size:10px;line-height:1.5;margin-bottom:7px}
html[data-short-viewport="true"] .screen:not(.page-gallery) .primary,
html[data-short-viewport="true"] .screen:not(.page-gallery) .secondary{min-height:44px}
html[data-short-viewport="true"] .screen:not(.page-gallery) .bottom-actions{padding-top:8px}
html[data-short-viewport="true"] .home .intro{padding-top:12px}
html[data-short-viewport="true"] .home h1{font-size:clamp(27px,7.6vw,35px);margin:7px 0;letter-spacing:2px}
html[data-short-viewport="true"] .home .slogan{font-size:10px;margin:5px 0}
html[data-short-viewport="true"] .home .invitation{margin:5px 0 9px}
html[data-short-viewport="true"] .home .home-footer{margin-top:7px;font-size:6px}
html[data-short-viewport="true"] .screen:not(.page-gallery) .tip{font-size:9px;margin-top:7px}
html[data-short-viewport="true"] .page-profile .profile-mini{margin-bottom:7px}
html[data-short-viewport="true"] .page-profile .profile-mini img{width:30px;height:30px}
html[data-short-viewport="true"] #profile-form .field{margin-bottom:6px}
html[data-short-viewport="true"] #profile-form .field label{margin-bottom:2px}
html[data-short-viewport="true"] #profile-form .field input{height:38px;padding:5px 9px}
html[data-short-viewport="true"] #profile-form .field:nth-child(3){min-height:72px}
html[data-short-viewport="true"] #profile-form .field textarea{min-height:54px}
html[data-short-viewport="true"] #profile-form .category{min-height:30px;padding:3px;font-size:10px}
html[data-short-viewport="true"] #profile-form .privacy-note{margin:2px 0 5px}
html[data-short-viewport="true"] .center-page .upload-orbit{width:90px;height:90px;margin-bottom:12px}
html[data-short-viewport="true"] .center-page .upload-log{padding:5px 0;font-size:10px}
html[data-short-viewport="true"] .center-page .upload-percent{font-size:32px;margin:4px 0 9px}
html[data-short-viewport="true"] .success-content .result-mark{width:58px;height:58px;margin:6px auto 12px}
html[data-short-viewport="true"] .success-content .archive-ticket{padding:11px;margin-top:12px}
html[data-short-viewport="true"] .success-content .ticket-image{padding-bottom:9px;margin-bottom:7px}
html[data-short-viewport="true"] .success-content>p.small{margin-top:10px!important}
html[data-short-viewport="true"] .page-detail .detail-header .page-title{font-size:18px}
html[data-short-viewport="true"] .page-detail .detail-description{font-size:10px;line-height:1.6}
html[data-compact-viewport="true"] .page-profile .profile-mini{display:none}
html[data-compact-viewport="true"] .page-profile .page-heading .eyebrow{display:none}
html[data-compact-viewport="true"] .page-profile .page-heading .page-sub{display:none}
html[data-compact-viewport="true"] .page-profile .topbar{height:30px}
html[data-compact-viewport="true"] .page-profile .steps{margin:3px 0 5px}
html[data-compact-viewport="true"] #profile-form .category{min-height:28px}
html[data-compact-viewport="true"] #profile-form .privacy-note{font-size:8px;margin-bottom:3px}
/* When the keyboard occupies the screen, keep the active field and navigation visible. */
html[data-keyboard="true"] .page-profile .topbar,
html[data-keyboard="true"] .page-profile .steps,
html[data-keyboard="true"] .page-profile .page-heading,
html[data-keyboard="true"] .page-profile .profile-mini{display:none}
html[data-keyboard="true"] #profile-form .field:not(.editing),
html[data-keyboard="true"] #profile-form .privacy-note{display:none}
html[data-keyboard="true"] #profile-form .field.editing{display:flex;flex-direction:column;flex:1 1 0;min-height:0;margin:8px 0}
html[data-keyboard="true"] #profile-form .field.editing textarea{height:0;min-height:0;max-height:none;flex:1 1 0}
html[data-keyboard="true"] #profile-form .keyboard-toolbar{display:flex;align-items:center;gap:6px;flex:none;margin:6px 0}
.keyboard-toolbar span{flex:1;font-size:11px;color:var(--mint)}
.keyboard-toolbar button{border:1px solid var(--line);background:var(--panel);font-size:11px;padding:5px 8px;min-height:36px;border-radius:3px}
/* Landscape puts visual content alongside the controls. */
html[data-landscape-viewport="true"] .page-home{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:40px minmax(0,1fr) auto;column-gap:20px}
html[data-landscape-viewport="true"] .page-home .head{grid-column:1/-1;height:40px}
html[data-landscape-viewport="true"] .page-home .intro{grid-column:1;grid-row:2;padding-top:8px;align-self:center}
html[data-landscape-viewport="true"] .page-home h1{font-size:25px;letter-spacing:1px}
html[data-landscape-viewport="true"] .page-home .planet-scene{grid-column:2;grid-row:2/4;height:100%}
html[data-landscape-viewport="true"] .page-home .invitation{display:none}
html[data-landscape-viewport="true"] .page-home .bottom-actions{grid-column:1;grid-row:3}
html[data-landscape-viewport="true"] .home-footer{display:none}
html[data-landscape-viewport="true"] .page-crop,
html[data-landscape-viewport="true"] .page-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:34px auto auto minmax(0,1fr) auto;column-gap:20px}
html[data-landscape-viewport="true"] :is(.page-crop,.page-preview) .topbar{grid-column:1/-1;grid-row:1}
html[data-landscape-viewport="true"] :is(.page-crop,.page-preview) .steps{display:none}
html[data-landscape-viewport="true"] :is(.page-crop,.page-preview) .page-heading{grid-column:2;grid-row:2}
html[data-landscape-viewport="true"] .page-crop .crop-wrap,
html[data-landscape-viewport="true"] .page-preview .preview-space{grid-column:1;grid-row:2/6;height:100%}
html[data-landscape-viewport="true"] .page-crop .crop-controls,
html[data-landscape-viewport="true"] .page-preview .preview-description{grid-column:2;grid-row:3}
html[data-landscape-viewport="true"] :is(.page-crop,.page-preview) .tip{grid-column:2;grid-row:4;align-self:start}
html[data-landscape-viewport="true"] :is(.page-crop,.page-preview) .bottom-actions{grid-column:2;grid-row:5}
html[data-landscape-viewport="true"] .page-profile{display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:34px minmax(0,1fr);gap:6px 20px}
html[data-landscape-viewport="true"] .page-profile .topbar{grid-column:1/-1}
html[data-landscape-viewport="true"] .page-profile .steps,
html[data-landscape-viewport="true"] .page-profile .profile-mini{display:none}
html[data-landscape-viewport="true"] .page-profile .page-heading{grid-column:1;grid-row:2;align-self:center}
html[data-landscape-viewport="true"] #profile-form{grid-column:2;grid-row:2;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) auto auto;gap:4px 8px}
html[data-landscape-viewport="true"] #profile-form .field{margin:0;min-height:0}
html[data-landscape-viewport="true"] #profile-form .field:nth-child(3){grid-column:1;grid-row:2;min-height:0}
html[data-landscape-viewport="true"] #profile-form .field textarea{min-height:0}
html[data-landscape-viewport="true"] #profile-form .field:nth-child(4){grid-column:2;grid-row:2}
html[data-landscape-viewport="true"] #profile-form .categories{grid-template-columns:1fr 1fr;gap:4px}
html[data-landscape-viewport="true"] #profile-form .category{font-size:9px;gap:2px}
html[data-landscape-viewport="true"] #profile-form .category .icon{width:12px}
html[data-landscape-viewport="true"] #profile-form .privacy-note{grid-column:1/-1;margin:0}
html[data-landscape-viewport="true"] #profile-form>.primary{grid-column:1/-1}
html[data-landscape-viewport="true"] .page-detail{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:34px auto auto minmax(0,1fr) auto auto;gap:4px 16px}
html[data-landscape-viewport="true"] .page-detail .topbar{grid-column:1/-1}
html[data-landscape-viewport="true"] .page-detail .detail-workspace{grid-column:1;grid-row:2/6;height:100%}
html[data-landscape-viewport="true"] .page-detail .longpress{grid-column:1;grid-row:6;margin:0;font-size:9px}
html[data-landscape-viewport="true"] .page-detail :is(.detail-category,.detail-header,.detail-description,.detail-meta,.bottom-actions){grid-column:2;margin:0}
html[data-landscape-viewport="true"] .page-detail .detail-description{align-self:start}
html[data-landscape-viewport="true"] .center-page .head{height:34px}
html[data-landscape-viewport="true"] .center-page .upload-orbit{width:56px;height:56px;margin:5px auto}
html[data-landscape-viewport="true"] .center-page .upload-percent{font-size:26px;margin:2px}
html[data-landscape-viewport="true"] .center-page .upload-log{padding:2px 0}
html[data-landscape-viewport="true"] .center-page .page-sub{margin-bottom:2px}
html[data-landscape-viewport="true"] .center-page>p.small{padding-top:4px!important}
html[data-landscape-viewport="true"] .success-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto auto;gap:4px 20px}
html[data-landscape-viewport="true"] .success-content .result-mark{grid-column:1;grid-row:1;width:48px;height:48px;margin:0 auto 8px;align-self:end}
html[data-landscape-viewport="true"] .success-content .page-heading{grid-column:1;grid-row:2;align-self:start}
html[data-landscape-viewport="true"] .success-content .archive-ticket{grid-column:2;grid-row:1/3;margin:0}
html[data-landscape-viewport="true"] .success-content>p.small{grid-column:1/-1;margin:0!important}
html[data-landscape-viewport="true"] .modal .poster{height:calc(var(--viewport-height) - 220px)}
:root{--viewport-height:100vh;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
@supports(height:100dvh){:root{--viewport-height:100dvh}}
html[data-page="scanner"],html[data-page="scanner"] body{
  width:100%;height:var(--viewport-height);min-height:0;overflow:hidden;overscroll-behavior:none;
}
html[data-page="scanner"] #app{
  width:100%;height:var(--viewport-height);min-height:0;
  padding-inline:clamp(16px,5vw,27px);padding-left:max(clamp(16px,5vw,27px),env(safe-area-inset-left,0px));padding-right:max(clamp(16px,5vw,27px),env(safe-area-inset-right,0px));margin-inline:auto;
}
.page-scanner{
  height:var(--viewport-height);min-height:0;overflow:hidden;
  padding-top:max(6px,var(--safe-top));
  padding-bottom:max(10px,var(--safe-bottom));
  animation:scanner-appear .3s ease;
}
.page-scanner .topbar{height:44px;padding-top:0;flex:0 0 auto}
.page-scanner .steps{flex:0 0 auto;margin:8px 0 15px}
.scan-heading{flex:0 0 auto}
.scan-heading .page-title{font-size:clamp(22px,6vw,26px);margin:5px 0 6px}
.scan-heading .page-sub{font-size:11px;line-height:1.7;margin-bottom:14px}
.scan-workspace{
  flex:1 1 0;min-height:0;min-width:0;display:grid;place-items:center;
  position:relative;width:100%;
}
.page-scanner .camera-box{
  flex:none;min-height:0;max-height:none;max-width:100%;
  margin:0;aspect-ratio:3/4;align-self:center;justify-self:center;
}
.page-scanner .camera-box video{inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.page-scanner .camera-box canvas{inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}
.page-scanner .camera-placeholder{padding:10px;font-size:11px;max-width:100%;max-height:100%;overflow:hidden}
.page-scanner .camera-placeholder .icon{width:26px;height:26px;margin-bottom:5px}
.page-scanner .camera-placeholder p{margin:6px 0;font-size:10px}
.page-scanner .camera-placeholder .text-button{min-height:32px;padding:4px;font-size:10px}
.page-scanner .scan-info{flex:0 0 auto;gap:10px;margin:9px 0 5px;font-size:10px;line-height:1.5;min-width:0}
.page-scanner #scan-status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-scanner #engine-status{flex:none;font-size:8px;white-space:nowrap;letter-spacing:.3px}
.scanner-actions{
  flex:0 0 auto;margin:0;padding-top:6px;display:flex;flex-direction:column;align-items:center;
}
.scanner-actions .capture{width:56px;height:56px;min-height:56px;flex:none;margin:0;padding:6px}
.capture-caption{font-size:10px;color:#a5c5bd;line-height:16px;margin-top:3px}
.scanner-actions .camera-tools{width:100%;justify-content:center;gap:10px;margin-top:3px;flex-wrap:nowrap}
.scanner-actions .camera-tools label,.scanner-actions .camera-tools .text-button{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  white-space:nowrap;min-height:36px;padding:4px 5px;font-size:11px;
}
.scanner-actions .camera-tools .icon{width:14px;height:14px}
.scanner-actions>[data-action="paper"]{min-height:28px;padding:3px 8px;font-size:10px}
.scanner-actions>[data-action="paper"] .icon{width:12px;height:12px}
html[data-page="scanner"] .modal{max-height:calc(var(--viewport-height)*.92)}
@keyframes scanner-appear{from{opacity:0}to{opacity:1}}

/* Compact phones and reduced WeChat web views retain every camera control. */
html[data-short-viewport="true"] .page-scanner .topbar{height:38px}
html[data-short-viewport="true"] .page-scanner .steps{margin:5px 0 10px}
html[data-short-viewport="true"] .scan-heading .eyebrow{font-size:8px;letter-spacing:1.8px}
html[data-short-viewport="true"] .scan-heading .page-title{font-size:22px;margin:3px 0}
html[data-short-viewport="true"] .scan-heading .page-sub{font-size:10px;line-height:1.5;margin-bottom:9px}
html[data-short-viewport="true"] .page-scanner .scan-info{margin:5px 0 3px;font-size:9px}
html[data-short-viewport="true"] .scanner-actions{padding-top:3px}
html[data-short-viewport="true"] .scanner-actions .capture{width:50px;height:50px;min-height:50px}
html[data-short-viewport="true"] .scanner-actions .camera-tools label,
html[data-short-viewport="true"] .scanner-actions .camera-tools .text-button{min-height:32px;font-size:10px}
html[data-short-viewport="true"] .scanner-actions>[data-action="paper"]{min-height:24px;font-size:9px}

/* A rotated phone places capture controls beside the camera instead of below it. */
html[data-landscape-viewport="true"] #app{max-width:900px}
html[data-landscape-viewport="true"] .page-scanner{
  display:grid;grid-template-columns:minmax(0,1fr) 128px;
  grid-template-rows:34px auto minmax(0,1fr) 20px;column-gap:20px;
}
html[data-landscape-viewport="true"] .page-scanner .camera-box{aspect-ratio:4/3}
html[data-landscape-viewport="true"] .page-scanner .topbar{grid-column:1/-1;height:34px}
html[data-landscape-viewport="true"] .page-scanner .steps{display:none}
html[data-landscape-viewport="true"] .scan-heading{grid-column:1;margin:0}
html[data-landscape-viewport="true"] .scan-heading .eyebrow{display:none}
html[data-landscape-viewport="true"] .scan-heading .page-title{font-size:18px}
html[data-landscape-viewport="true"] .scan-heading .page-sub{margin-bottom:5px;font-size:10px}
html[data-landscape-viewport="true"] .scan-workspace{grid-column:1;grid-row:3;align-self:stretch;height:100%}
html[data-landscape-viewport="true"] .page-scanner .scan-info{grid-column:1;grid-row:4;margin:0}
html[data-landscape-viewport="true"] .scanner-actions{grid-column:2;grid-row:2/5;justify-content:center}
html[data-landscape-viewport="true"] .scanner-actions .camera-tools{flex-direction:column;gap:0;margin-top:8px}
