98b83a5f75
Allow any orientation in manifest, widen content and enable dual-column mode in installed apps on tablet viewports, with iOS display-mode fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
160 lines
3.3 KiB
CSS
160 lines
3.3 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
@layer base {
|
|
:root {
|
|
--background: 60 9% 98%;
|
|
--foreground: 0 0% 32%;
|
|
|
|
--card: 60 9% 98%;
|
|
--card-foreground: 0 0% 32%;
|
|
|
|
--popover: 60 9% 98%;
|
|
--popover-foreground: 0 0% 32%;
|
|
|
|
--primary: 0 0% 32%;
|
|
--primary-foreground: 60 9.1% 97.8%;
|
|
|
|
--secondary: 60 5% 96%;
|
|
--secondary-foreground: 0 0% 32%;
|
|
|
|
--muted: 60 4.8% 95.9%;
|
|
--muted-foreground: 25 5.3% 44.7%;
|
|
|
|
--accent: 20 5.9% 94%;
|
|
--accent-foreground: 24 9.8% 10%;
|
|
|
|
--destructive: 0 84.2% 60.2%;
|
|
--destructive-foreground: 60 9.1% 97.8%;
|
|
|
|
--border: 20 5.9% 90%;
|
|
--input: 24 6% 85%;
|
|
--ring: 0 0% 32%;
|
|
|
|
--radius: 0.5rem;
|
|
}
|
|
|
|
.dark {
|
|
--background: 24 10% 10%;
|
|
--foreground: 60 9.1% 97.8%;
|
|
|
|
--card: 24 10% 10%;
|
|
--card-foreground: 60 9.1% 97.8%;
|
|
|
|
--popover: 24 10% 10%;
|
|
--popover-foreground: 60 9.1% 97.8%;
|
|
|
|
--primary: 60 9.1% 97.8%;
|
|
--primary-foreground: 0 0% 32%;
|
|
|
|
--secondary: 0 0% 20%;
|
|
--secondary-foreground: 60 9.1% 97.8%;
|
|
|
|
--muted: 24 10% 10%;
|
|
--muted-foreground: 24 5.4% 66%;
|
|
|
|
--accent: 0 0% 20%;
|
|
--accent-foreground: 60 9.1% 97.8%;
|
|
|
|
--destructive: 0 74% 42%;
|
|
--destructive-foreground: 60 9.1% 97.8%;
|
|
|
|
--border: 30 6% 25%;
|
|
--input: 33 5% 32%;
|
|
--ring: 20 6% 90%;
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border;
|
|
}
|
|
|
|
body {
|
|
@apply gap flex flex-col bg-background/95 text-foreground;
|
|
}
|
|
|
|
body {
|
|
font-family: 'LXGW WenKai Screen';
|
|
font-weight: normal;
|
|
}
|
|
|
|
body,
|
|
html {
|
|
@apply h-full;
|
|
}
|
|
|
|
footer {
|
|
padding-bottom: max(env(safe-area-inset-bottom), 8px);
|
|
}
|
|
}
|
|
|
|
@layer utilities {
|
|
.gap {
|
|
@apply gap-4 sm:gap-6;
|
|
}
|
|
}
|
|
|
|
@layer utilities {
|
|
::-webkit-scrollbar {
|
|
--bar-width: 5px;
|
|
width: var(--bar-width);
|
|
height: var(--bar-width);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
@apply rounded-md bg-border;
|
|
}
|
|
|
|
.zen-bg {
|
|
background-image:
|
|
radial-gradient(ellipse 80% 50% at 50% -20%, hsl(40 20% 90% / 0.5), transparent),
|
|
radial-gradient(circle at 100% 100%, hsl(30 15% 92% / 0.4), transparent 40%);
|
|
}
|
|
|
|
.dark .zen-bg {
|
|
background-image:
|
|
radial-gradient(ellipse 80% 50% at 50% -20%, hsl(30 10% 20% / 0.5), transparent),
|
|
radial-gradient(circle at 100% 100%, hsl(25 8% 15% / 0.4), transparent 40%);
|
|
}
|
|
|
|
.zen-card-glow {
|
|
background: radial-gradient(circle, hsl(var(--primary) / 0.06) 0%, transparent 70%);
|
|
}
|
|
|
|
.zen-card {
|
|
@apply bg-card/85 backdrop-blur-sm;
|
|
}
|
|
|
|
/* PWA 安装后:iPad 等平板视口常 <1024px,单独放宽宽度与双栏 */
|
|
@media (display-mode: standalone) and (min-width: 768px) and (max-width: 1919px) {
|
|
.site-content-shell {
|
|
max-width: 72rem;
|
|
}
|
|
|
|
.site-content-shell-narrow {
|
|
max-width: 64rem;
|
|
}
|
|
|
|
.mode-workspace-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
}
|
|
|
|
/* iOS PWA 兜底:部分系统不识别 display-mode 媒体查询 */
|
|
@media (min-width: 768px) and (max-width: 1919px) {
|
|
html[data-display-mode="standalone"] .site-content-shell {
|
|
max-width: 72rem;
|
|
}
|
|
|
|
html[data-display-mode="standalone"] .site-content-shell-narrow {
|
|
max-width: 64rem;
|
|
}
|
|
|
|
html[data-display-mode="standalone"] .mode-workspace-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|