.phone-home-control{display:none}
@media (max-width: 600px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) {
  html[data-device=phone][data-theme] .desktop-icons.has-phone-pages{
    --phone-app-row-gap:14px;
    display:flex;bottom:44px;gap:0;padding:0;align-items:stretch;align-content:normal;
    overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;
    overscroll-behavior-x:contain;touch-action:pan-x pinch-zoom;
  }
  html[data-device=phone] .desktop-icons.has-phone-pages::-webkit-scrollbar{display:none}
  html[data-device=phone] .phone-app-page{
    flex:0 0 100%;min-width:0;display:grid;box-sizing:border-box;padding:4px;
    grid-template-columns:repeat(var(--phone-app-columns,3),minmax(0,1fr));
    grid-auto-rows:var(--phone-app-row-height,91px);gap:var(--phone-app-row-gap) 4px;
    align-content:start;scroll-snap-align:start;scroll-snap-stop:always;
  }
  html[data-device=phone][data-theme] .phone-app-page .desktop-icon{width:100%;max-width:100%;align-self:start}
  html[data-device=phone] .phone-home-control{
    position:absolute;left:50%;bottom:0;height:44px;width:var(--phone-control-width,88px);max-width:calc(100% - 28px);transform:translateX(-50%);z-index:1;display:block;
  }
  html[data-device=phone] .phone-page-dots{
    position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:0;
    transition:opacity .2s ease;opacity:1;
  }
  html[data-device=phone] .phone-home-control.is-search .phone-page-dots{opacity:0;pointer-events:none}
  html[data-device=phone] .phone-home-search{
    position:absolute;inset:0;min-height:44px;width:100%;padding:0 12px;display:flex;align-items:center;justify-content:center;gap:7px;
    border:0;border-radius:22px;background:rgba(255,255,255,.22);color:white;font:600 13px system-ui,sans-serif;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);backdrop-filter:blur(16px);cursor:pointer;
    transition:opacity .2s ease;opacity:0;pointer-events:none;
  }
  html[data-device=phone] .phone-home-control.is-search .phone-home-search{opacity:1;pointer-events:auto}
  html[data-device=phone] .phone-home-search:focus-visible{outline:2px solid currentColor;outline-offset:2px}
  html[data-device=phone] .phone-search-glyph{position:relative;display:inline-block;width:10px;height:10px;border:1.7px solid currentColor;border-radius:50%;margin-right:3px;box-sizing:border-box}
  html[data-device=phone] .phone-search-glyph::after{content:'';position:absolute;width:5px;height:1.7px;background:currentColor;transform:rotate(45deg);right:-4px;bottom:-2px}
  html[data-device=phone][data-theme=modern] .phone-home-search{color:#243b31;background:rgba(255,255,255,.68)}
  html[data-device=phone][data-theme=retro] .phone-home-search{color:#293523;background:#dbe4ce;border:1px solid #748364;border-radius:16px;box-shadow:1px 2px 0 #6b795b;font-family:monospace}
  html[data-device=phone] .phone-home-control[hidden],
  html[data-device=phone] .phone-app-open .phone-home-control{display:none}
  html[data-device=phone] .phone-page-dots[hidden]{display:none}
  html[data-device=phone] .phone-page-dots button{
    display:grid;place-items:center;min-width:24px;width:24px;min-height:44px;height:44px;
    padding:0;border:0;border-radius:50%;background:transparent;color:#fff;box-shadow:none;cursor:pointer;
  }
  html[data-device=phone] .phone-page-dots button::after{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.35}
  html[data-device=phone] .phone-page-dots button[aria-current=true]::after{opacity:1}
  html[data-device=phone] .phone-page-dots button:focus-visible{outline:2px solid currentColor;outline-offset:-3px}
  html[data-device=phone][data-theme=modern] .phone-page-dots button{color:#31463d}
  html[data-device=phone][data-theme=retro] .phone-page-dots button{color:#293523}
  html[data-device=phone][data-theme] .desktop-hint{display:none}
}
@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  html[data-device=phone][data-theme] .desktop-icons.has-phone-pages{--phone-app-row-gap:8px}
  html[data-device=phone] .phone-home-control{left:62.5%}
}

.phone-search-dialog{
  box-sizing:border-box;width:min(560px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);
  margin:auto;padding:18px;border:1px solid #c7d4cb;border-radius:24px;background:#f3f7f3;color:#213a30;
  box-shadow:0 24px 90px #081c3755;font:15px/1.45 system-ui,sans-serif;overflow:auto;overscroll-behavior:contain;
}
.phone-search-dialog::backdrop{background:rgba(12,24,37,.48);backdrop-filter:blur(9px)}
.phone-search-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.phone-search-header h2{margin:0;font-size:24px;line-height:1.2}
.phone-search-close{flex:none;width:44px;height:44px;min-width:44px;min-height:44px;border:0;border-radius:50%;background:#dfe8e1;color:inherit;font:28px/1 system-ui;cursor:pointer}
.phone-search-dialog input[type=search]{box-sizing:border-box;display:block;width:100%;min-height:48px;margin:0;padding:10px 12px;border:1px solid #90a799;border-radius:12px;background:white;color:#213a30;font:16px/1.4 system-ui,sans-serif}
.phone-search-results section{margin-top:20px}
.phone-search-results h3{font-size:12px;letter-spacing:.06em;text-transform:uppercase;margin:0 0 8px;color:inherit;opacity:.75}
.phone-search-result{box-sizing:border-box;width:100%;min-height:48px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;margin:0 0 6px;padding:12px;border:1px solid #d3ded5;border-radius:12px;background:#fff;color:inherit;text-align:left;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.phone-search-result small{font-size:12px;opacity:.72}
.phone-search-note{font-size:13px;opacity:.8}
.phone-search-dialog button:focus-visible,.phone-search-dialog input:focus-visible{outline:3px solid #286344;outline-offset:2px}
html[data-theme=retro] .phone-search-dialog{background:#e3e9d7;color:#293523;border:2px solid #63714e;border-radius:5px;box-shadow:5px 5px 0 #253419;font-family:monospace}
html[data-theme=retro] .phone-search-dialog input[type=search],html[data-theme=retro] .phone-search-result{border-color:#879372;border-radius:3px;background:#f5f5e8;color:#293523}
html[data-theme=retro] .phone-search-close{border:1px solid #879372;border-radius:3px;background:#d1dac1}
html[data-theme=macos] .phone-search-dialog{background:#faf9fb;color:#302c38;border-color:#d3ceda;border-radius:20px}
html[data-theme=macos] .phone-search-dialog input[type=search],html[data-theme=macos] .phone-search-result{border-color:#d3ceda;color:#302c38}
html[data-theme=macos] .phone-search-close{background:#eae6f3}
@media (max-height:480px){.phone-search-dialog{padding:12px}.phone-search-header{margin-bottom:6px}.phone-search-header h2{font-size:20px}.phone-search-results section{margin-top:12px}}
@media (prefers-reduced-motion:reduce){html[data-device=phone] .phone-home-control .phone-page-dots,html[data-device=phone] .phone-home-search{transition:none}}

html[data-theme=macos] .phone-search-dialog :is(button,input):focus-visible{outline-color:#315fa6}
