/* Give the phone hub a document layout instead of overlapping floating cards. */
@media (max-width:900px) {
 .home-screen {
  box-sizing:border-box; display:grid; position:relative; height:auto; min-height:100svh; min-height:100dvh;
  grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto clamp(235px,37svh,430px) auto auto auto auto auto auto auto auto;
  grid-template-areas:'header' 'profile' 'hero' 'cast' 'progress' 'actions' 'guide' 'greeting' 'notice' 'dock' 'footer';
  gap:12px; padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  overflow:visible; overflow-x:clip; padding-bottom:calc(92px + env(safe-area-inset-bottom));
 }
 .home-screen[hidden] {display:none}
 .home-screen .home-header {grid-area:header;position:relative;inset:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;padding:0 0 6px;align-items:center;width:100%;min-width:0}
 .home-screen .home-brand {grid-column:1/-1;box-sizing:border-box;min-width:0;padding-left:31px;min-height:38px}
 .home-screen .home-brand:before {width:24px;height:36px}
 .home-screen .home-brand strong {font-size:20px;line-height:1.2;white-space:nowrap}
 .home-screen .home-brand small {font-size:6px;letter-spacing:1.7px;margin-top:5px}
 .home-screen .home-header-actions {display:contents;max-width:none}
 .home-screen .home-header-actions .home-quiet {box-sizing:border-box;min-height:42px;padding:9px 12px;font-size:10px;max-width:100%;margin:0}
 .home-screen .home-header-actions .region-control {grid-column:1;text-align:left}
 .home-screen .home-header-actions .home-quiet:last-child {grid-column:2;grid-row:2}
 .home-screen .home-header-actions .home-wallet {grid-column:1/-1;width:100%;font-size:11px;text-align:center;white-space:normal;line-height:1.5}
 .home-screen .home-header-actions .home-quiet:nth-last-child(2) {display:none}
 .home-screen .home-content {display:contents;position:static;inset:auto;width:auto;max-width:none;padding:0;pointer-events:auto}
 .home-screen .home-content>.home-eyebrow,.home-screen .home-content>h1,.home-screen .home-description,.home-screen .home-intake-note {display:none}
 .home-screen .hz-profile {grid-area:profile;box-sizing:border-box;position:relative;inset:auto;width:100%;max-width:none;margin:0;padding:9px 12px;gap:11px;min-height:54px;border-radius:10px}
 .home-screen .hz-profile img {width:34px;height:40px;flex-shrink:0}
 .home-screen .hz-profile>div {min-width:0}
 .home-screen .hz-profile strong {font-size:15px;line-height:1.3;overflow-wrap:anywhere}
 .home-screen .hz-profile small {font-size:9px;line-height:1.5;overflow-wrap:anywhere}
 .home-screen .home-portrait-wrap[data-actor-frame=true] {grid-area:hero;position:relative;inset:auto;width:100%;height:100%;min-width:0;min-height:0;opacity:1;overflow:hidden;mask-image:linear-gradient(#000 88%,transparent);-webkit-mask-image:linear-gradient(#000 88%,transparent)}
 .home-screen .home-cast {display:contents;position:static;inset:auto;width:auto;max-width:none}
 .home-screen .home-cast>.home-eyebrow {display:none}
 .home-screen .home-cast-buttons {grid-area:cast;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-width:0}
 .home-screen .home-cast-buttons button {box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:64px;padding:6px 3px;font-size:10px;gap:5px;text-align:center;overflow-wrap:anywhere}
 .home-screen .home-cast-buttons img {width:30px;height:34px;object-fit:cover}
 .home-screen .home-cast-caption {grid-area:hero;position:relative;inset:auto;align-self:end;justify-self:start;z-index:2;text-align:left;margin:0 0 12px;padding:10px 15px;border-radius:8px;background:#101a2ac9;max-width:80%;pointer-events:none}
 .home-screen .home-cast-caption strong {display:block;font-size:25px;line-height:1.15;margin:0 0 5px}
 .home-screen .home-cast-caption span {font-size:8px;letter-spacing:.08em}
 .home-screen .home-progress {grid-area:progress;position:static;inset:auto;width:auto;padding:13px;margin:0;border-radius:10px;box-sizing:border-box}
 .home-screen .home-progress>.home-eyebrow,.home-screen .home-progress>p {display:none}
 .home-screen .home-progress strong {font-size:18px;line-height:1.4;margin:0}
 .home-screen .home-main-actions {grid-area:actions;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .home-screen .home-main-actions button {font-size:11px;line-height:1.45;padding:12px;min-height:46px;min-width:0;white-space:normal}
 .home-screen .hub-greeting {grid-area:greeting;position:static;inset:auto;box-sizing:border-box;width:100%;max-width:none;margin:0;padding:12px 15px;font-size:14px;line-height:1.6;border-radius:10px}
 .home-screen .home-notice {grid-area:notice;position:static;inset:auto;max-width:none;margin:0;font-size:11px}
 .home-screen .home-notice:empty {display:none}
 .home-screen .hub-dock {grid-area:dock;box-sizing:border-box;position:fixed;inset:auto;bottom:max(8px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));transform:none;width:auto;margin:4px 0 0;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:6px 3px;border-radius:13px;z-index:8}
 .home-screen .hub-dock-button {min-width:0;min-height:52px;font-size:9px;gap:5px;padding:5px 1px}
 .home-screen .hub-nav-symbol {font-size:22px}
 .home-screen .home-footer {grid-area:footer;position:static;inset:auto;box-sizing:border-box;width:100%;padding:10px 0;margin:0;gap:10px;flex-wrap:wrap;font-size:6px;line-height:1.5}
}
@media (max-width:380px) {
 .home-screen {padding-inline:12px;gap:10px}
 .home-screen .home-main-actions {grid-template-columns:1fr}
 .home-screen .home-cast-buttons button {font-size:9px}
 .home-screen .home-progress strong {font-size:16px}
 .home-screen .hub-dock-button {font-size:8px}
}
@media (max-width:900px) and (max-height:520px) and (orientation:landscape) {
 .home-screen {grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto auto auto auto auto auto auto;grid-template-areas:'header header' 'profile hero' 'cast hero' 'progress hero' 'actions hero' 'guide guide' 'greeting greeting' 'notice notice' 'dock dock' 'footer footer';gap:10px}
 .home-screen .home-header {grid-template-columns:minmax(0,1fr) auto auto}
 .home-screen .home-brand {grid-column:1;grid-row:1}
 .home-screen .home-header-actions .region-control {grid-column:2;grid-row:1}
 .home-screen .home-header-actions .home-quiet:last-child {grid-column:3;grid-row:1}
 .home-screen .home-header-actions .home-wallet {grid-column:1/-1}
 .home-screen .home-portrait-wrap[data-actor-frame=true] {min-height:290px}
 .home-screen .home-cast-caption {display:block}
}

@media(max-width:900px){.home-screen .guide-launch{grid-area:guide;padding:4px 0;min-height:36px;justify-self:start;margin-top:-6px}}
