/* Compact portrait Home screens in Kraft and Graphite.
   Preserve explanatory artwork, text sizes and the previous box form layout.
   Enlarged text and very short screens retain normal document scrolling. */
@media (min-width:360px) and (max-width:699px) {
 html[data-theme=kraft] .app.is-home.has-nav {
  padding-bottom:calc(var(--nav) + 10px + env(safe-area-inset-bottom));
 }
 html[data-theme=graphite] .app.is-home.has-nav {padding-bottom:calc(var(--nav) + 10px + env(safe-area-inset-bottom));}
 html[data-theme=kraft] .screen[data-screen=home] {gap:6px;}
 html[data-theme=kraft] .screen[data-screen=home] .action-stack {gap:8px;}
}
/* The same art and text on a shorter ordinary phone; buttons stay 54px high. */
@media (min-width:360px) and (max-width:699px) and (max-height:720px) {
 html[data-theme=kraft] .app.is-home.has-nav {padding-top:8px;}
 html[data-theme=kraft] .screen[data-screen=home] {gap:4px;}
 html[data-theme=kraft] .screen[data-screen=home] .action-stack {gap:6px;}
 html[data-theme=kraft] .screen[data-screen=home] .action-stack>.glass {min-height:54px;padding-top:10px;padding-bottom:10px;}
 html[data-theme=kraft] .home-brand p {margin-top:6px;}
}
/* 1.1.2: Settings fit ordinary phones (≈750–830px tall) and portrait tablets
   without scrolling; text size is unchanged, only tile padding and gaps shrink. */
@media (min-width:360px) and (max-width:699px) and (min-height:700px) and (max-height:900px) {
 html[data-theme] .app[data-route=settings] .settings-list {gap:8px;}
 html[data-theme] .app[data-route=settings] .settings-list>.glass {min-height:56px;padding-top:6px;padding-bottom:6px;}
 html[data-theme] .app[data-route=settings] .screen-header {margin-bottom:12px;}
}
@media (min-width:700px) {
 html[data-theme] .settings-list>.glass {min-height:clamp(60px,7dvh,84px);padding-top:10px;padding-bottom:10px;}
}
@media (min-width:360px) and (max-width:699px) and (min-height:700px) and (max-height:900px) {
 html[data-theme=stickers] .app[data-route=settings] .settings-list {gap:6px;}
 html[data-theme=stickers] .app[data-route=settings] .settings-list>.glass {min-height:52px;}
 html[data-theme=stickers] .app[data-route=settings] .universal-settings-footnote {margin-top:4px;padding-top:6px;padding-bottom:6px;}
 html[data-theme=kraft] .screen[data-screen=scan] .camera {min-height:clamp(300px,calc(100dvh - 312px),450px);}
}
