Files
walkersim/styles.css

478 lines
7.5 KiB
CSS

:root {
color-scheme: dark;
--bg: #15181d;
--panel: #1d222b;
--text: #ecf0f5;
--muted: #a7b1bf;
--accent: #5fb3ff;
--viewport-height: 100dvh;
}
* {
box-sizing: border-box;
}
html,
body {
overflow-x: hidden;
max-width: 100vw;
}
body {
margin: 0;
font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.4;
min-height: var(--viewport-height);
}
.app {
display: grid;
grid-template-columns: 1fr 320px;
height: var(--viewport-height);
max-width: 100vw;
overflow: hidden;
}
/* ── Mobile view toggle (hidden on desktop) ── */
.mobile-view-toggle {
display: none;
}
.views-wrap {
padding: 12px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
min-height: 0;
height: 100%;
width: 100%;
max-width: 100%;
min-width: 0;
overflow-x: hidden;
}
.views-wrap.single-view {
grid-template-columns: 1fr;
}
.view-panel {
width: 100%;
max-width: 100%;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.view-panel h2 {
margin: 0 0 8px;
}
.canvas-container {
width: 100%;
max-width: 100%;
height: auto;
min-height: clamp(140px, 24vh, 260px);
background: #0f1116;
border: 1px solid #2a3342;
border-radius: 8px;
overflow: hidden;
position: relative;
flex: 1 1 0%;
margin: 0 auto;
}
#sim-canvas {
width: 100%;
max-width: 100%;
height: 100%;
display: block;
}
.sim-3d {
width: 100%;
max-width: 100%;
height: auto;
background: #0f1116;
border: 1px solid #2a3342;
border-radius: 8px;
min-height: clamp(140px, 24vh, 260px);
overflow: hidden;
flex: 1 1 0%;
margin: 0 auto;
}
.sim-3d canvas {
width: 100%;
max-width: 100%;
height: 100%;
display: block;
}
.panel {
background: var(--panel);
border-left: 1px solid #2a3342;
padding: 16px;
min-width: 0;
overflow-y: auto;
}
#tweakpane-root {
margin-bottom: 12px;
}
#tweakpane-root .tp-dfwv {
width: 100%;
}
h1 {
margin: 0 0 14px;
font-size: 1.1rem;
}
h2 {
margin: 12px 0 8px;
font-size: 0.95rem;
}
.settings-section {
margin: 14px 0;
}
.settings-section > summary {
cursor: pointer;
font-size: 0.95rem;
font-weight: 600;
list-style: none;
margin: 0;
}
.settings-section > summary::-webkit-details-marker {
display: none;
}
.settings-section > summary::before {
content: '>';
display: inline-block;
margin-right: 6px;
transform: translateY(-1px);
}
.settings-section[open] > summary::before {
content: 'v';
}
.row {
display: grid;
grid-template-columns: 1fr;
gap: 6px;
margin-bottom: 12px;
}
.row output {
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.buttons {
grid-template-columns: 1fr 1fr;
}
.buttons.single {
grid-template-columns: 1fr;
}
button {
background: #2b3850;
border: 1px solid #3d5274;
color: var(--text);
border-radius: 6px;
padding: 8px 10px;
cursor: pointer;
}
button:hover {
background: #35486a;
}
input[type='range'] {
width: 100%;
}
input[type='text'],
select {
width: 100%;
background: #10141b;
color: var(--text);
border: 1px solid #2f3a4d;
border-radius: 6px;
padding: 8px;
}
.check {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.diag pre {
margin: 0;
background: #10141b;
border: 1px solid #2a3342;
border-radius: 6px;
padding: 10px;
white-space: pre-wrap;
color: #d4dbe7;
line-height: 1.3;
font-size: 12px;
}
.mujoco-import {
padding: 10px;
border: 1px solid #2a3342;
border-radius: 8px;
background: #141922;
}
.mujoco-import > summary {
margin-bottom: 8px;
}
.mujoco-import:not([open]) {
padding-bottom: 10px;
}
.mujoco-import p {
margin: 0 0 8px;
color: var(--muted);
font-size: 0.86rem;
}
.mujoco-import input[type='file'] {
width: 100%;
margin-bottom: 8px;
}
.mujoco-playback {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #2a3342;
}
.mujoco-playback label {
display: block;
margin: 8px 0 4px;
color: var(--muted);
font-size: 0.84rem;
}
.mujoco-playback output {
display: block;
margin-top: 4px;
color: #d4dbe7;
font-size: 0.82rem;
font-variant-numeric: tabular-nums;
}
.mujoco-playback .check {
margin: 0;
justify-content: center;
}
:root[data-mobile-layout='1'] .app {
grid-template-columns: 1fr;
grid-template-rows: minmax(0, 1fr) auto;
}
:root[data-mobile-layout='1'] .panel {
border-left: 0;
border-top: 1px solid #2a3342;
padding: 12px;
}
:root[data-mobile-layout='1'] .views-wrap {
grid-template-columns: 1fr;
min-height: 0;
padding: 8px;
gap: 8px;
}
:root[data-mobile-layout='1'] .mobile-view-toggle {
display: flex;
gap: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #3d5274;
margin-bottom: 8px;
}
:root[data-mobile-layout='1'] .toggle-btn {
flex: 1;
padding: 10px 0;
border: none;
border-radius: 0;
background: #1d222b;
color: var(--muted);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, color 0.15s;
min-height: 0;
}
:root[data-mobile-layout='1'] .toggle-btn.active {
background: var(--accent);
color: #111;
}
:root[data-mobile-layout='1'] .views-wrap[data-mobile-view="3d"] #view-2d-panel {
display: none;
}
:root[data-mobile-layout='1'] .views-wrap[data-mobile-view="2d"] #view-3d-panel {
display: none;
}
:root[data-mobile-layout='1'] .view-panel h2 {
display: none;
}
:root[data-mobile-layout='1'] .canvas-container,
:root[data-mobile-layout='1'] .sim-3d {
min-height: clamp(130px, 30vh, 220px);
border-radius: 6px;
}
@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
.app {
grid-template-columns: 1fr;
grid-template-rows: minmax(0, 1fr) auto;
}
.panel {
border-left: 0;
border-top: 1px solid #2a3342;
}
.views-wrap {
grid-template-columns: 1fr;
min-height: 0;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
height: auto;
min-height: clamp(140px, 28vh, 240px);
}
}
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
.mobile-view-toggle {
display: flex;
gap: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #3d5274;
margin-bottom: 8px;
}
.toggle-btn {
flex: 1;
padding: 10px 0;
border: none;
border-radius: 0;
background: #1d222b;
color: var(--muted);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, color 0.15s;
min-height: 0;
}
.toggle-btn.active {
background: var(--accent);
color: #111;
}
/* Hide the inactive view panel on mobile */
.views-wrap[data-mobile-view="3d"] #view-2d-panel {
display: none;
}
.views-wrap[data-mobile-view="2d"] #view-3d-panel {
display: none;
}
/* Hide h2 titles on mobile (toggle replaces them) */
.view-panel h2 {
display: none;
}
.views-wrap {
padding: 8px;
gap: 8px;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
min-height: clamp(130px, 30vh, 220px);
border-radius: 6px;
}
.panel {
padding: 12px;
}
h1 {
font-size: 1rem;
margin-bottom: 10px;
}
h2 {
margin-top: 10px;
font-size: 0.9rem;
}
.row {
margin-bottom: 10px;
}
button,
input[type='text'],
select {
min-height: 40px;
}
}
@media (max-width: 480px) {
.views-wrap {
padding: 6px;
gap: 6px;
}
.canvas-container,
.sim-3d {
aspect-ratio: auto;
min-height: clamp(120px, 28vh, 190px);
}
.panel {
padding: 10px;
}
.buttons {
grid-template-columns: 1fr;
}
.diag pre {
font-size: 11px;
padding: 8px;
}
}