Spaces:
Running
Running
File size: 4,659 Bytes
052f728 6b2de60 5e46a10 6b2de60 5e46a10 6b2de60 5e46a10 6b2de60 5e46a10 6b2de60 5e46a10 fa29273 5e46a10 6b2de60 fa29273 6b2de60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | /* Reachy Blocks β global styles. Desktop-first, fluid to tablet.
Theme via [data-theme="light"|"dark"] on <html> (set by index.html
bootstrap; updated live by the host's onThemeChange). */
:root {
--bg: #ffffff;
--bg-panel: #f4f6fb;
--text: #1c1e26;
--accent: #4c97ff;
--run: #3fbf5a;
--stop: #e94f4f;
--outline: #d5dae6;
}
:root[data-theme="dark"] {
--bg: #17181d;
--bg-panel: #22242c;
--text: #f0f1f5;
--outline: #33363f;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
height: 100%;
overflow: hidden;
background: var(--bg);
color: var(--text);
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
#root {
height: 100%;
}
/* ββ App shell: workspace (left) + stage (right) βββββββββββββββββββ */
.app-shell {
display: flex;
height: 100%;
}
.workspace-pane {
position: relative;
flex: 1;
min-width: 0;
}
.blockly-host {
position: absolute;
inset: 0;
}
/* Transparent shield over the workspace while a program runs: blocks
edits (and multi-touch chaos) but keeps the highlight visible. */
.run-overlay {
position: absolute;
inset: 0;
z-index: 50;
background: transparent;
}
.stage-pane {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
width: clamp(260px, 28vw, 380px);
padding: 16px;
background: var(--bg-panel);
border-left: 2px solid var(--outline);
}
.stage-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.15rem;
font-weight: 700;
align-self: flex-start;
}
.puppet-host {
width: 100%;
max-width: 340px;
flex: 1;
display: flex;
align-items: center;
min-height: 0;
}
.run-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
width: 100%;
max-width: 300px;
min-height: 76px;
border: none;
border-radius: 24px;
background: var(--run);
color: #fff;
font-size: 1.6rem;
font-weight: 800;
font-family: inherit;
cursor: pointer;
box-shadow: 0 4px 0 rgb(0 0 0 / 22%);
transition: transform 80ms ease, background 150ms ease;
touch-action: manipulation;
}
.run-btn:active {
transform: translateY(3px);
box-shadow: 0 1px 0 rgb(0 0 0 / 22%);
}
.run-btn.running {
background: var(--stop);
}
.run-btn-glyph {
font-size: 1.9rem;
line-height: 1;
}
/* Portrait tablets / narrow windows: stage moves on top as a bar. */
@media (max-width: 900px) {
.app-shell {
flex-direction: column-reverse;
}
.stage-pane {
flex-direction: row;
justify-content: space-between;
width: 100%;
height: clamp(150px, 26vh, 220px);
border-left: none;
border-bottom: 2px solid var(--outline);
}
.stage-title {
display: none;
}
.puppet-host {
height: 100%;
width: auto;
max-width: 40vw;
justify-content: center;
}
/* Height-driven in the top-bar layout so the whole robot stays visible.
(Extra specificity: the base .puppet rule appears later in the file.) */
.stage-pane .puppet {
width: auto;
height: 100%;
}
.run-btn {
width: auto;
min-width: 150px;
}
}
.puppet {
display: block;
width: 100%;
height: auto;
touch-action: none;
user-select: none;
-webkit-user-select: none;
}
.pp-shadow { fill: rgb(0 0 0 / 14%); }
.pp-body { fill: #e7e9f0; stroke: #b9becf; stroke-width: 2; }
.pp-stripe { fill: var(--accent); }
.pp-head { fill: #f7f8fc; stroke: #b9becf; stroke-width: 2; }
.pp-face { fill: #2b2d36; }
.pp-eye { fill: #fafafa; }
.pp-eye-shine { fill: #ffffff; opacity: 0.9; }
.pp-ant-line { stroke: #9aa0b2; stroke-width: 5; stroke-linecap: round; }
.pp-ant-tip-r { fill: #fbbf24; }
.pp-ant-tip-l { fill: #f472b6; }
.pp-ant-hit { fill: transparent; cursor: pointer; }
:root[data-theme="dark"] .pp-shadow { fill: rgb(0 0 0 / 45%); }
:root[data-theme="dark"] .pp-body { fill: #3a3d49; stroke: #565b6b; }
:root[data-theme="dark"] .pp-head { fill: #464a58; stroke: #565b6b; }
:root[data-theme="dark"] .pp-face { fill: #1b1c22; }
.pp-ant.pp-ant-tapped .pp-ant-tip {
animation: ant-flash 0.5s ease-out;
}
/* Idle blink: on the eye circles only β the pose engine never writes
transforms on these, so CSS animation can't fight it. */
.pp-eye,
.pp-eye-shine {
transform-box: fill-box;
transform-origin: center;
animation: eye-blink 5.2s infinite;
}
@keyframes eye-blink {
0%, 94%, 100% { transform: scaleY(1); }
96%, 98% { transform: scaleY(0.08); }
}
@media (prefers-reduced-motion: reduce) {
.pp-eye,
.pp-eye-shine {
animation: none;
}
}
@keyframes ant-flash {
0% { filter: brightness(1.9); }
100% { filter: brightness(1); }
}
|