Pi4 / space.css
yyfz233's picture
Reuse input video for RGB previews and remove redundant viewer chrome
76d2cc7
Raw History Blame Contribute Delete
15.3 kB
@font-face {
font-family: 'Inter';
src: url('/space-assets/fonts/inter.ttf') format('truetype');
font-style: normal;
font-weight: 100 900;
font-display: swap;
}
@font-face {
font-family: 'Caveat';
src: url('/space-assets/fonts/caveat.ttf') format('truetype');
font-style: normal;
font-weight: 500;
font-display: swap;
}
@font-face {
font-family: 'Gilda Display';
src: url('/space-assets/fonts/gilda-display.ttf') format('truetype');
font-style: normal;
font-weight: 400;
font-display: swap;
}
:root { color-scheme: light; --paper: #f7f7f9; --surface: #ffffff; --ink: #26272e; --muted: #737580; --line: #26272e21; --sans: 'Inter', Arial, sans-serif; --serif: 'Gilda Display', Georgia, serif; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body, .gradio-container { background: #f7f7f9 !important; color: #26272e !important; font-family: var(--sans) !important; }
.gradio-container { --font: var(--sans); width: 100% !important; max-width: 1488px !important; margin: 0 auto !important; padding: 0 40px 24px !important; -webkit-font-smoothing: antialiased; }
.gradio-container .main { gap: 0 !important; padding: 0 !important; }
.gradio-container .prose { font-size: 12px; line-height: 1.7; }
#pi4-header, #pi4-header > div { padding: 0; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 104px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark { display: inline-flex; align-items: center; gap: 18px; flex-shrink: 0; }
.paper-logo { display: block; width: 44px; height: auto; stroke: none; }
.site-header svg, .site-footer svg { width: 20px; height: 20px; color: inherit; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-header svg *, .site-footer svg *, .nav-note span { color: inherit; }
.site-header .paper-logo, .site-footer .paper-logo { width: 44px; height: auto; fill: url(#space-logo-gradient); stroke: none; }
.lab-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lab-brand { display: block; flex-shrink: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.lab-brand img { display: block; width: auto; height: 32px; }
.team-name { flex-shrink: 0; color: #42454f; font-family: var(--serif); font-size: 16px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.site-header nav { display: flex; align-items: center; gap: 8px; color: #42454f; font-size: 14px; }
.nav-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff70; color: inherit; font-weight: 550; line-height: 1.25; text-decoration: none; white-space: nowrap; transition: color .2s, border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.nav-button:hover { color: var(--ink); border-color: #26272e50; background: var(--surface); }
.nav-button[aria-disabled=true] { color: var(--muted); cursor: default; }
.nav-button svg { width: 16px; height: 16px; }
.nav-item { position: relative; display: inline-flex; min-width: 0; }
.nav-item .nav-button { width: 100%; }
.nav-note { position: absolute; z-index: 2; top: calc(100% + 7px); left: calc(50% - 24px); display: flex; align-items: flex-start; color: #ad99ba; font: 700 21px / 1 'Caveat', 'Segoe Print', cursive; white-space: nowrap; pointer-events: none; }
.nav-note svg { width: 23px; height: 19px; margin-left: 12px; stroke-width: 1.4; transform: scaleY(-1); transform-origin: center; }
.nav-note-left { transform: translateX(-50%) rotate(-5deg); }
.nav-note-right { transform: translateX(-50%) rotate(4deg); }
.nav-external { border-color: #26272e2e; background: #fff; box-shadow: 0 4px 14px #272b3808; }
.nav-external:hover { border-color: #7c3aed70; color: #6d28d9; box-shadow: 0 7px 20px #7c3aed14; transform: translateY(-1px); }
.site-header a:focus-visible, .site-footer a:focus-visible { outline: 2px solid #48576b; outline-offset: 4px; }
.empty-scene .scene-title { display: flex; align-items: center; justify-content: center; gap: .25em; max-width: 100%; margin: 0; color: #26272e; font: 400 min(30px, 3.55cqw) / 1.3 var(--serif); letter-spacing: -.035em; white-space: nowrap; }
.hero-title-brand { display: inline-flex; align-items: baseline; gap: 4px; flex-shrink: 0; color: #7c3aed; }
.hero-title-brand .paper-logo { width: 1.2em; height: auto; }
.hero-title-copy { min-width: 0; }
.hero-title-line { display: inline; }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
#pi4-workspace { gap: 22px; min-width: 0 !important; margin-top: 20px; }
#pi4-controls { gap: 22px; align-items: flex-start; }
#pi4-input-card, #pi4-examples-card { min-width: 0 !important; gap: 14px; padding: 23px; border: 1px solid #e9e6ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 32px #33224003; }
#pi4-input-type { margin: 2px 0 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
#pi4-input-type .wrap { display: flex; flex-wrap: nowrap; gap: 3px; padding: 4px; border: 1px solid #efebf4; border-radius: 9px; background: #faf8fc; }
#pi4-input-type label { display: flex; flex: 1; justify-content: center; align-items: center; min-height: 31px; margin: 0; padding: 5px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #a394b0; box-shadow: none; font-size: 11px; cursor: pointer; }
#pi4-input-type label:has(input:checked) { border-color: #e5dbea; background: #fff; color: #8060a6; box-shadow: 0 1px 5px #53347706; }
#pi4-input-type input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#pi4-input-type label:focus-within { outline: 2px solid #ac8dce; outline-offset: 1px; }
#pi4-video, #pi4-images { overflow: hidden; min-height: 206px; border: 1px dashed #ddd3e7 !important; border-radius: 10px; background: #fdfcfe !important; }
#pi4-video .wrap, #pi4-video .upload-container, #pi4-images .wrap { background: #fdfcfe !important; }
#pi4-video svg, #pi4-images svg { color: #ae98c5; }
#pi4-video .upload-text, #pi4-images .upload-text { color: #9a8ba8; font-size: 11px; }
#pi4-upload-hint .prose p { margin: -5px 0 0; color: #afa4b9; font-size: 10px; }
#pi4-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; }
#pi4-examples > .block { flex: 1 1 0 !important; min-width: 0 !important; padding: 0; overflow: visible; }
#pi4-examples .html-container { padding: 0; }
#pi4-examples-hint .prose p, #pi4-examples-note .prose p { margin: 0; color: #9a8ba8; font-size: 11px; line-height: 1.8; }
#pi4-examples-note .prose p { color: #b1a4be; font-size: 10px; }
#pi4-examples-note .prose strong { color: #927ca3; font-weight: 500; }
.example-card { display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; border: 1px solid #eae3f0; border-radius: 11px; background: #fff; color: #504557; text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.example-card:hover { transform: translateY(-2px); border-color: #b69acb; box-shadow: 0 6px 18px #73518f12; }
.example-card:focus-visible { outline: 2px solid #ac8dce; outline-offset: 3px; }
.example-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #f1edf5; }
.example-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.example-badge { position: absolute; top: 11px; left: 11px; padding: 5px 7px; border: 1px solid #ffffff50; border-radius: 5px; background: #24202a66; color: #fff; font: 7px / 1 'SFMono-Regular', Consolas, monospace; letter-spacing: 1px; backdrop-filter: blur(8px); }
.example-load { position: absolute; right: 10px; bottom: 10px; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #ffffff80; border-radius: 50%; background: #ffffffdf; color: #69527e; font-size: 15px; line-height: 1; }
.example-copy { display: block; padding: 15px 13px 13px; }
.example-title { display: block; color: #665172; font-size: 13px; font-weight: 500; }
.example-description { display: block; min-height: 32px; margin-top: 6px; color: #a092ad; font-size: 10px; line-height: 1.6; }
.example-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #f0ebf5; color: #b1a1be; font: 8px / 1.5 'SFMono-Regular', Consolas, monospace; }
.example-meta > span { color: #8b6da3; }
#pi4-tracking { padding: 5px 0 1px; border: 0; background: transparent; }
#pi4-tracking label { gap: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#pi4-tracking label span { color: #8b7a9b; font-size: 11px; font-weight: 400; }
#pi4-tracking input { width: 14px; height: 14px; border-radius: 4px; }
#pi4-sampling { border: 0; border-top: 1px solid #f0ecf5; border-bottom: 1px solid #f0ecf5; border-radius: 0; background: #fff; }
#pi4-sampling > button.label-wrap { padding: 13px 0; color: #93829f; font-size: 11px; font-weight: 400; }
#pi4-sampling .label-wrap > span { font-size: 11px; }
#pi4-sampling .block { border: 0; background: #fff; box-shadow: none; }
#pi4-sampling .prose { color: #a498af; font-size: 10px; }
.inference-defaults { display: flex; align-items: center; justify-content: center; gap: 10px; color: #b09fc0; font: 9px / 1.5 'SFMono-Regular', Consolas, monospace; }
.inference-defaults i { width: 2px; height: 2px; border-radius: 50%; background: #c9bdd5; }
#pi4-submit { min-height: 48px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 550; box-shadow: none; transition: background .2s, border-color .2s; }
#pi4-submit:hover { border-color: #454650; background: #454650; color: #fff; }
#pi4-input-note .prose p { margin: 0 0 4px; color: #b1a4be; font-size: 9px; line-height: 1.7; text-align: center; }
#pi4-input-note .prose p:last-child { margin-bottom: 0; }
#pi4-results { width: 100%; min-width: 0 !important; gap: 12px; }
#pi4-scene-card { gap: 0; overflow: hidden; border: 1px solid #e9e6ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 32px #33224003; }
#pi4-viewer, #pi4-viewer .html-container { overflow: hidden; padding: 0; }
.empty-scene { display: flex; min-height: 477px; flex-direction: column; justify-content: center; align-items: center; padding: 35px 24px; background: #fff; text-align: center; container-type: inline-size; }
.empty-scene-icon { display: grid; width: 106px; height: 106px; margin-bottom: 21px; place-items: center; border: 1px solid #f1ebf6; border-radius: 28px; background: #fdfbff; }
.empty-scene-icon svg { width: 76px; height: 76px; }
.empty-scene h2 { margin: 13px 0 10px; color: #8e799f; font: 400 28px / 1.3 var(--serif); letter-spacing: -.6px; }
.empty-scene > p { margin: 0; color: #b4a6c0; font-size: 11px; line-height: 1.9; }
.empty-scene-steps { display: flex; align-items: center; gap: 12px; margin-top: 32px; color: #b5a6c2; font-size: 9px; }
.empty-scene-steps b { margin-right: 5px; color: #c3b2d1; font: 8px 'SFMono-Regular', Consolas, monospace; }
.empty-scene-steps i { width: 18px; height: 1px; background: #eee7f5; }
.viewer-link { display: flex; justify-content: flex-end; padding: 11px 23px; border-bottom: 1px solid #f3eff7; }
.viewer-link a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff70; color: #52545e; font-size: 12px; text-decoration: none; transition: background .2s, border-color .2s; }
.viewer-link a:hover { border-color: #26272e50; background: var(--surface); color: var(--ink); }
#pi4-status { padding: 15px 25px; border-top: 1px solid #f3eff7; background: #fdfcfe; }
#pi4-status .prose p { margin: 0; color: #ac9ab9; font-size: 10px; line-height: 1.8; }
#pi4-status .prose p + p { margin-top: 4px; font-size: 9px; }
#pi4-status .prose strong { color: #8a6d9e; font-weight: 500; }
#pi4-artifacts { border: 1px solid #e9e6ee; border-radius: 10px; background: #fff; }
#pi4-artifacts > button.label-wrap { padding: 15px 23px; color: #ab9bb7; font-size: 10px; font-weight: 400; }
#pi4-artifacts .label-wrap > span { font-size: 10px; }
#pi4-footer { margin-top: 27px; padding: 0; border-top: 1px solid var(--line); }
#pi4-footer .html-container { padding: 0; }
.site-footer { padding: 30px 0 38px; }
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-license { margin: 24px 0 5px; color: #737580; font-size: 10px; line-height: 1.9; }
.footer-license span { margin-left: 15px; }
.footer-notice { margin: 0; color: #858793; font-size: 9px; line-height: 1.9; }
@media (max-width: 1280px) {
.site-header { flex-wrap: wrap; gap: 16px; padding: 20px 0 36px; }
.site-header .brand-lockup { width: 100%; justify-content: space-between; }
.site-header nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-size: 12px; }
}
@media (max-width: 1050px) {
#pi4-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gradio-container { padding-right: 24px !important; padding-left: 24px !important; }
#pi4-workspace, #pi4-controls { gap: 15px; }
#pi4-input-card, #pi4-examples-card { padding: 20px; }
.empty-scene h2 { font-size: 24px; }
.empty-scene-steps { gap: 6px; }
}
@media (max-width: 760px) {
.gradio-container { padding: 0 16px 20px !important; }
.site-header { min-height: 78px; gap: 16px; }
.wordmark { gap: 12px; }
.site-header .paper-logo, .site-footer .paper-logo { width: 36px; }
.site-header nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 10px; font-size: 12px; }
.nav-button { min-height: 44px; padding: 0 10px; }
.footer-main { flex-wrap: wrap; }
#pi4-workspace, #pi4-controls { flex-direction: column; gap: 16px; }
#pi4-input-card, #pi4-examples-card { flex: auto !important; width: 100%; padding: 20px; }
#pi4-results { width: 100%; }
.empty-scene { min-height: 390px; padding: 24px 15px; }
.empty-scene h2 { font-size: 23px; }
.empty-scene-steps { font-size: 8px; }
.empty-scene-steps i { width: 10px; }
#pi4-status { padding: 14px 20px; }
#pi4-footer { margin-top: 22px; }
}
@media (max-width: 560px) {
html { scroll-padding-top: 22px; }
.site-header { gap: 14px; padding-top: 16px; }
.site-header .brand-lockup, .site-footer .brand-lockup { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
.lab-lockup { width: 100%; flex-wrap: wrap; gap: 8px 12px; }
.lab-brand { padding-left: 0; border-left: 0; }
.lab-brand img { height: 24px; }
.team-name { font-size: 12px; }
.site-header nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 8px; }
.nav-button { font-size: 12px; line-height: 1.25; white-space: normal; }
.nav-button svg { width: 14px; height: 14px; }
.nav-note { font-size: 19px; }
.nav-note svg { width: 20px; height: 17px; }
}
@media (max-width: 400px) {
#pi4-examples { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after { transition: none !important; }
}