diff --git a/app/static/css/components.css b/app/static/css/components.css index fd7a865..e28d0a0 100644 --- a/app/static/css/components.css +++ b/app/static/css/components.css @@ -40,6 +40,17 @@ } } +@keyframes slideUpSheet { + from { + transform: translateY(100%); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } +} + .auth-header, .login-header { text-align: center; diff --git a/app/static/css/dictionary.css b/app/static/css/dictionary.css index d276528..c1b4d4e 100644 --- a/app/static/css/dictionary.css +++ b/app/static/css/dictionary.css @@ -757,56 +757,6 @@ } - /* 7. Bottom Sheet for Word Translation Popup on Mobile */ - .reader-word-popup { - position: fixed !important; - top: auto !important; - bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important; - left: 8px !important; - right: 8px !important; - width: auto !important; - max-width: none !important; - border-radius: 18px !important; - box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5) !important; - border: 1px solid var(--border-focus) !important; - background-color: var(--bg-surface) !important; - z-index: 10005 !important; - padding: 14px 16px !important; - animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important; - } - - .reader-settings-panel { - position: fixed !important; - top: auto !important; - bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important; - left: 8px !important; - right: 8px !important; - width: auto !important; - max-height: calc(85dvh - 60px) !important; - overflow-y: auto !important; - -webkit-overflow-scrolling: touch !important; - border-radius: 20px !important; - box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55) !important; - border: 1px solid var(--border-focus) !important; - background-color: var(--bg-surface) !important; - color: var(--text-main) !important; - padding: 16px 18px 24px !important; - z-index: 10006 !important; - animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important; - } - - @keyframes slideUpSheet { - from { - transform: translateY(100%); - opacity: 0; - } - to { - transform: translateY(0); - opacity: 1; - } - } - - /* --- Responsive Mobile Overrides (max-width: 768px) --- */ @media (max-width: 768px) { /* 4. Dictionary & Search */ diff --git a/app/static/css/reader.css b/app/static/css/reader.css index 34f037b..f59b0e2 100644 --- a/app/static/css/reader.css +++ b/app/static/css/reader.css @@ -1549,9 +1549,11 @@ background-color: var(--bg-surface); border: 1px solid var(--border-focus); border-radius: var(--radius-lg); - box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.5); - width: 320px; - max-width: calc(100vw - 32px); + box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.55); + width: 340px; + max-width: 360px; + max-height: calc(100vh - 40px); + overflow-y: auto; padding: 16px; animation: fadeInScale 0.15s ease-out; } @@ -2061,6 +2063,56 @@ font-size: 17px; line-height: 1.65; } + + /* Mobile Bottom Sheet for Word Translation Popup */ + .reader-word-popup { + position: fixed !important; + top: auto !important; + bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important; + left: 8px !important; + right: 8px !important; + width: auto !important; + max-width: none !important; + max-height: calc(85dvh - 60px) !important; + overflow-y: auto !important; + border-radius: 18px !important; + box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5) !important; + border: 1px solid var(--border-focus) !important; + background-color: var(--bg-surface) !important; + z-index: 10005 !important; + padding: 14px 16px !important; + animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important; + } + + body.zen-mode-active .reader-word-popup { + bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; + } + + /* Mobile Bottom Sheet for Reader Settings */ + .reader-settings-panel { + position: fixed !important; + top: auto !important; + bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important; + left: 8px !important; + right: 8px !important; + width: auto !important; + max-width: none !important; + max-height: calc(85dvh - 60px) !important; + overflow-y: auto !important; + -webkit-overflow-scrolling: touch !important; + border-radius: 20px !important; + box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55) !important; + border: 1px solid var(--border-focus) !important; + background-color: var(--bg-surface) !important; + color: var(--text-main) !important; + padding: 16px 18px 24px !important; + z-index: 10006 !important; + animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important; + } + + body.zen-mode-active .reader-settings-panel { + bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; + } } /* ========================================================================== diff --git a/app/static/index.html b/app/static/index.html index f7c964a..51aee9d 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -5,7 +5,7 @@