diff --git a/src/DownloadCenter.css b/src/DownloadCenter.css index ac5337b..51f7c8d 100644 --- a/src/DownloadCenter.css +++ b/src/DownloadCenter.css @@ -26,3 +26,11 @@ .download-center-card:focus-within, .download-center-card:hover { border-color: #659372; box-shadow: 0 14px 32px #2b304021; } } @keyframes download-center-arrive { from { transform: translateY(6px); } } + +@media (max-width: 720px) { + .download-center-actions > a, + .download-center-header a, + .download-center summary { min-height: 44px; } + .download-center summary { padding-block: 10px; } + .download-center-content { overflow-wrap: anywhere; } +} diff --git a/src/PlayerHub.css b/src/PlayerHub.css index dcb72f2..f0d9438 100644 --- a/src/PlayerHub.css +++ b/src/PlayerHub.css @@ -100,7 +100,15 @@ .spido-hub-inventory :is(ul, p) { margin: 0; color: var(--muted); font-size: .875rem; } .spido-hub-inventory ul { padding-inline-start: 1.15em; list-style: disc; } @media (max-width: 850px) { .spido-hub-zero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } } -@media (max-width: 400px) { .spido-hub-zero-stats { grid-template-columns: minmax(0, 1fr); } } +@media (max-width: 520px) { + .spido-hub-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } + .spido-hub .spido-hub-games button { padding-inline: 8px; } + .spido-hub-account button, .spido-hub .spido-hub-refresh { width: 100%; } + .spido-hub-inventory { overflow-wrap: anywhere; } +} +@media (max-width: 359px) { + .spido-hub-zero-stats { grid-template-columns: minmax(0, 1fr); } +} @media (prefers-reduced-motion: no-preference) { .spido-hub-game:not([hidden]) { animation: spido-hub-enter 180ms ease-out; } } diff --git a/src/SimpleLanding.css b/src/SimpleLanding.css index 7ce5327..f40c245 100644 --- a/src/SimpleLanding.css +++ b/src/SimpleLanding.css @@ -1524,9 +1524,6 @@ } @media (max-width: 640px) { - .simple-nav-links { - display: none; - } .sec-footer-top { grid-template-columns: 1fr; } @@ -1758,3 +1755,91 @@ } } + +.simple-nav-menu { display: contents; } +.simple-nav-toggle { display: none; } + +@media (max-width: 820px) { + .simple-nav-toggle { + display: grid; + place-items: center; + width: 44px; + height: 44px; + border: 1px solid #b7c6bc; + border-radius: 10px; + color: #285837; + background: #fff; + cursor: pointer; + } + + .simple-nav :is(a, button):focus-visible { + outline: 2px solid #285837; + outline-offset: 2px; + } + + .simple-nav-menu { + display: flex; + flex-direction: column; + position: absolute; + inset: 100% 0 auto; + padding: 12px max(20px, calc((100% - 1140px) / 2)); + max-height: calc(100vh - 71px); + max-height: calc(100dvh - 71px); + overflow-y: auto; + background: #eef1f6; + border-bottom: 1px solid #cbd2dc; + box-shadow: 0 12px 20px #16182118; + visibility: hidden; + opacity: 0; + transform: translateY(-6px); + } + + .simple-nav-menu[data-open="true"] { + visibility: visible; + opacity: 1; + transform: none; + } + + .simple-nav-links { align-items: stretch; flex-direction: column; gap: 0; } + .simple-nav-links a { display: flex; align-items: center; min-height: 44px; } + .simple-nav-cta-group { flex-wrap: wrap; margin-top: 8px; } + .simple-nav-cta-group:not(:empty) { padding-top: 10px; border-top: 1px solid #cbd2dc; } + + .simple-nav-cta-group :is(a, button), + .simple-site :is(.btn-download-hero, .ada-hint-btn) { min-height: 44px; } + + .sec-footer-col ul { gap: 0; } + .sec-footer-col a { display: inline-flex; align-items: center; min-height: 44px; } + .simple-site :where(section[id]) { scroll-margin-top: 76px; } +} + +@media (max-width: 820px) and (prefers-reduced-motion: no-preference) { + .simple-nav-menu { transition: opacity 160ms ease, transform 160ms ease, visibility 160ms; } +} + +@media (max-width: 640px) { + .simple-container { width: calc(100% - 32px); } + .sec-hero-title { font-size: clamp(2.1rem, 9vw, 2.8rem); } + .game-app-card { + flex-direction: column; + gap: 16px; + padding: clamp(16px, 5vw, 28px); + } + + .game-app-read-more { min-height: 44px; } + .game-hero-section { padding-block: 32px 48px; } + .game-central-title { font-size: clamp(1.9rem, 8vw, 2.4rem); } + .game-central-card, .game-feature-box { padding-inline: clamp(14px, 5vw, 24px); } +} + +@media (max-width: 359px) { + .ada-hint-selector { grid-template-columns: minmax(0, 1fr); } +} + +@media (hover: none), (pointer: coarse) { + .simple-site [data-motion-card] { transition: none; } +} + +@media (prefers-reduced-motion: reduce) { + .simple-site { scroll-behavior: auto; } +} diff --git a/src/SimpleLanding.tsx b/src/SimpleLanding.tsx index a001aef..c1c2265 100644 --- a/src/SimpleLanding.tsx +++ b/src/SimpleLanding.tsx @@ -99,6 +99,18 @@ export function Nav() { const [checking, setChecking] = useState(true) const [busy, setBusy] = useState(false) const [scrolled, setScrolled] = useState(false) + const [menuOpen, setMenuOpen] = useState(false) + const menuToggle = useRef(null) + + useEffect(() => { + const desktop = window.matchMedia('(min-width: 821px)') + const closeOnDesktop = () => { + if (desktop.matches) setMenuOpen(false) + } + desktop.addEventListener('change', closeOnDesktop) + return () => desktop.removeEventListener('change', closeOnDesktop) + }, []) + const mounted = useRef(false) useEffect(() => { @@ -152,44 +164,66 @@ export function Nav() { } return ( -
+
{ + if (event.key !== 'Escape' || !menuOpen) return + setMenuOpen(false) + menuToggle.current?.focus() + }} + >
- + setMenuOpen(false)} data-motion-card="2"> SPIDOCODE - - -
- {checking ? null : session ? ( - <> - - Mi Perfil - - - - ) : ( - <> - - Iniciar sesión - - - Registrarse - - - )} + +
diff --git a/src/WebAuth.css b/src/WebAuth.css index 6123ea7..621193d 100644 --- a/src/WebAuth.css +++ b/src/WebAuth.css @@ -222,3 +222,18 @@ text-decoration: underline; text-underline-offset: 3px; } + +@media (max-width: 700px) { + .spido-auth-header nav a, + .spido-auth-switch a, + .spido-auth-recovery-link, + .spido-verify-page :is(.spido-verify-back, .spido-verify-gmail) { + display: inline-flex; + align-items: center; + min-height: 44px; + } + + .spido-auth-header > .spido-auth-container { gap: 4px 16px; } + .spido-auth-switch { margin-block: 8px 0; } + .spido-auth-card input { scroll-margin-block: 16px; } +}