Files
supergeometry.app/src/style.css
T

3959 lines
86 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:root {
--bg: #2b2d31;
--chrome: rgba(31, 33, 37, 0.94);
--chrome-solid: #1f2125;
--line: rgba(255, 255, 255, 0.08);
--text: #e8e9ec;
--muted: #9a9ea6;
--accent: #3d8bff;
--accent-soft: rgba(61, 139, 255, 0.18);
--ok: #4fd18b;
--danger: #ff6b5e;
--radius: 10px;
--tap: 40px;
--safe-l: env(safe-area-inset-left, 0px);
--safe-r: env(safe-area-inset-right, 0px);
--safe-b: env(safe-area-inset-bottom, 0px);
--safe-t: env(safe-area-inset-top, 0px);
color-scheme: dark;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
height: 100%;
overflow: hidden;
background: var(--bg);
color: var(--text);
font: 13.5px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-user-select: none;
user-select: none;
-webkit-touch-callout: none;
overscroll-behavior: none;
}
button {
font: inherit;
color: inherit;
background: none;
border: 0;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
button:disabled {
opacity: 0.35;
cursor: default;
}
kbd {
font: 10.5px/1 ui-monospace, monospace;
color: var(--muted);
border: 1px solid var(--line);
border-radius: 4px;
padding: 2px 4px;
margin-left: 6px;
}
@media (pointer: coarse) {
kbd {
display: none;
}
}
#view {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
display: block;
touch-action: none;
}
/* ---------------------------------------------------------------- top bar */
#topbar {
position: fixed;
top: calc(8px + var(--safe-t));
left: calc(8px + var(--safe-l));
display: flex;
align-items: center;
gap: 4px;
/* Above the tool column so the File menu is never covered. */
z-index: 35;
}
/* As wide as the Items panel below it (258 px), the name filling it. */
.brand {
box-sizing: border-box;
width: 258px;
/* + the top bar's 4 px gap: the name box starts at 274 px, where the tool column sits beside Items. */
margin-right: 4px;
font-size: 24px;
line-height: 36px;
font-weight: 750;
letter-spacing: 0.01em;
padding: 0 6px;
white-space: nowrap;
overflow: hidden;
color: #cfd6e4;
/* All lowercase: its letters centre on their x-height, ~4 px below the box middle.
Lift it so it lines up with the File / Items / More labels. */
position: relative;
top: -4px;
}
.brand-tld {
color: var(--accent);
font-weight: 600;
}
/* The project name reads as a tab; click it to type a new name. */
.project-name {
width: 300px;
min-height: 36px;
padding: 0 12px;
margin-right: 10px;
border-radius: 8px;
border: 1px solid transparent;
background: var(--chrome);
color: var(--text);
font: inherit;
font-weight: 550;
text-overflow: ellipsis;
cursor: text;
-webkit-user-select: text;
user-select: text;
}
/* The saved mark at its end: a tick once every change is on this device, a
faint dot while one is being written (not while the name is typed). */
.project-name {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%237fd39a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 9px center;
background-size: 15px 15px;
}
.project-name.saving {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='none' stroke='%239aa3b2' stroke-width='1.6'/%3E%3C/svg%3E");
}
.project-name:focus {
background-image: none;
}
/* (Room for it: beats the phones' narrower padding.) */
#topbar .project-name {
padding-right: 28px;
}
.project-name:hover {
border-color: var(--line);
}
.project-name:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
background: #2b2e34;
}
.text-btn {
min-height: 36px;
padding: 0 12px;
border-radius: 8px;
background: var(--chrome);
display: inline-flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}
.text-btn svg {
width: 18px;
height: 18px;
}
.text-btn:hover:not(:disabled),
.icon-btn:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.1);
}
.text-btn.primary {
background: var(--accent);
color: white;
}
.text-btn.primary:hover {
background: #5a9dff;
}
.icon-btn {
width: 36px;
height: 36px;
border-radius: 8px;
display: inline-grid;
place-items: center;
background: var(--chrome);
flex: none;
}
/* History's bin after one tap: a second tap deletes. */
.icon-btn.armed {
color: #fff;
background: var(--danger);
}
.icon-btn.small {
width: 26px;
height: 26px;
background: none;
margin-left: auto;
}
.icon-btn svg {
width: 20px;
height: 20px;
}
.menu-wrap {
position: relative;
}
.menu {
position: absolute;
top: 42px;
left: 0;
min-width: 210px;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 6px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
z-index: 30;
}
.menu button {
display: flex;
justify-content: space-between;
width: 100%;
text-align: left;
padding: 10px;
border-radius: 6px;
}
.menu button:hover {
background: rgba(255, 255, 255, 0.08);
}
.copy-toggle {
position: fixed;
left: 0;
top: 0;
display: flex;
align-items: center;
gap: 5px;
height: 32px;
padding: 0 10px 0 8px;
border-radius: 16px;
background: var(--chrome-solid);
border: 1px solid var(--line);
color: var(--muted);
font-size: 12.5px;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
z-index: 12;
}
.copy-toggle svg {
width: 17px;
height: 17px;
}
.copy-toggle.on {
background: var(--accent);
border-color: var(--accent);
color: white;
}
.copy-toggle[hidden] {
display: none;
}
.swatch {
width: 20px;
height: 20px;
border-radius: 50%;
display: inline-block;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
flex: none;
}
#flyout.swatch-grid {
display: grid;
grid-template-columns: repeat(5, 44px);
gap: 4px;
padding: 8px;
}
#flyout.swatch-grid .tool {
width: 44px;
height: 44px;
padding: 0;
justify-content: center;
}
#flyout.swatch-grid .tool .swatch {
width: 28px;
height: 28px;
}
#flyout.swatch-grid .tool.active .swatch {
box-shadow: 0 0 0 2px var(--chrome-solid), 0 0 0 4px var(--accent);
}
#flyout.swatch-grid .tool-label,
#flyout.swatch-grid .tool-key {
display: none;
}
.menu-soon {
font-size: 11px;
color: var(--muted);
}
/* An update waiting (its notice put away): More pulses, and so does NEW on
Update. */
/* A ring that grows and fades, over and over (transform and opacity only:
the GPU just moves a layer, no repaint each frame - the glow it replaced
repainted every frame and kept the graphics card busy in every open tab). */
@keyframes update-pulse {
0% {
transform: scale(1);
opacity: 0.8;
}
100% {
transform: scale(1.35);
opacity: 0;
}
}
body.update-pending #more-btn {
position: relative;
color: #fff;
background: var(--accent);
}
body.update-pending #more-btn::after,
.new-badge::after,
.library-full.pulse::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
border: 2px solid var(--accent);
pointer-events: none;
opacity: 0;
animation: update-pulse 1.6s ease-out infinite;
}
.new-badge {
align-self: center;
margin-left: 8px;
padding: 1px 6px;
border-radius: 8px;
background: var(--accent);
color: #fff;
font: 700 10px/1.4 system-ui, sans-serif;
letter-spacing: 0.04em;
position: relative;
}
.library-full.pulse {
position: relative;
}
@media (prefers-reduced-motion: reduce) {
body.update-pending #more-btn::after,
.new-badge::after,
.library-full.pulse::after {
animation: none;
}
}
.menu-note {
padding: 8px 10px 4px;
color: var(--muted);
font-size: 12px;
}
/* Undo / redo dock: bottom-left corner, always; the section/measure buttons sit above it. */
#undo-dock {
position: fixed;
left: calc(8px + var(--safe-l));
bottom: calc(10px + var(--safe-b));
display: flex;
gap: 2px;
padding: 4px;
background: var(--chrome);
border-radius: var(--radius);
z-index: 10;
}
.dock-btn {
width: 52px;
height: 44px;
border-radius: 9px;
display: grid;
place-items: center;
}
.dock-btn svg {
width: 24px;
height: 24px;
}
.dock-btn:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.08);
}
.dock-btn:disabled {
opacity: 0.35;
}
body.items-open #undo-dock {
left: calc(274px + var(--safe-l));
}
.menu hr {
border: 0;
border-top: 1px solid var(--line);
margin: 4px 0;
}
/* ------------------------------------------------------------ tool column */
#toolbar,
#bottom-left,
#flyout {
position: fixed;
display: flex;
flex-direction: column;
gap: 1px;
background: var(--chrome);
border-radius: var(--radius);
padding: 4px;
z-index: 10;
}
/* Vertically centred on the left edge. */
#toolbar {
left: calc(8px + var(--safe-l));
top: 50%;
transform: translateY(-50%);
max-height: calc(100vh - 200px - var(--safe-t) - var(--safe-b));
overflow-y: auto;
}
#toolbar:empty,
#bottom-left:empty {
display: none;
}
#bottom-left {
left: calc(8px + var(--safe-l));
/* Above the undo/redo dock (52 px tall) with a gap. */
bottom: calc(76px + var(--safe-b));
}
#flyout {
z-index: 25;
max-height: calc(100vh - 20px);
overflow-y: auto;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
#flyout[hidden] {
display: none;
}
.tool {
display: flex;
align-items: center;
gap: 9px;
min-height: var(--tap);
padding: 0 12px 0 7px;
border-radius: 7px;
white-space: nowrap;
text-align: left;
position: relative;
}
.tool svg {
width: 21px;
height: 21px;
flex: none;
}
.tool:hover:not(.disabled) {
background: rgba(255, 255, 255, 0.07);
}
.tool.active {
background: var(--accent-soft);
color: #b9d4ff;
}
/* The tool whose window is open (and Exit Sketch once a shape is closed):
a ring grows and fades round its icon. */
body.panel-open .tool.active::before,
.tool.pulse::before {
content: "";
position: absolute;
inset: 1px;
border-radius: inherit;
border: 2px solid var(--accent);
pointer-events: none;
opacity: 0;
animation: tool-pulse 1.4s ease-out infinite;
}
/* A wide button with its name grows too much at the update ring's scale. */
@keyframes tool-pulse {
0% {
transform: scale(1);
opacity: 0.9;
}
100% {
transform: scale(1.1, 1.22);
opacity: 0;
}
}
.tool.pulse {
color: #fff;
}
@media (prefers-reduced-motion: reduce) {
body.panel-open .tool.active::before,
.tool.pulse::before {
animation: none;
opacity: 1;
}
}
.tool.disabled {
opacity: 0.38;
cursor: default;
}
.tool.has-children::after {
content: "";
position: absolute;
left: 23px;
top: 25px;
border: 3px solid transparent;
border-left-color: currentColor;
border-bottom-color: currentColor;
transform: rotate(-90deg);
opacity: 0.7;
}
.tool-label {
display: flex;
flex-direction: column;
}
.tool-name {
display: flex;
align-items: center;
}
.tool-sub {
font-size: 11px;
color: var(--muted);
}
.tool-sep {
height: 1px;
background: var(--line);
margin: 3px 4px;
}
/* ------------------------------------------------- right column + popover */
#viewcube-host {
position: fixed;
top: calc(10px + var(--safe-t));
right: calc(60px + var(--safe-r));
z-index: 5;
}
#viewcube {
position: relative;
width: 143px;
height: 143px;
}
#viewcube canvas {
display: block;
touch-action: none;
cursor: grab;
}
.vc-roll {
position: absolute;
top: 0;
width: 29px;
height: 29px;
border-radius: 50%;
font-size: 18px;
color: var(--muted);
}
.vc-roll.left {
left: 0;
}
.vc-roll.right {
right: 0;
}
.vc-roll:hover {
color: var(--text);
background: var(--chrome);
}
#right-col {
position: fixed;
top: calc(8px + var(--safe-t));
right: calc(8px + var(--safe-r));
display: flex;
flex-direction: column;
gap: 2px;
background: var(--chrome);
border-radius: var(--radius);
padding: 4px;
z-index: 10;
}
.right-btn {
width: 40px;
min-height: 40px;
border-radius: 7px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1px;
}
.right-btn svg {
width: 20px;
height: 20px;
}
.right-btn:hover {
background: rgba(255, 255, 255, 0.08);
}
.right-btn.on {
background: var(--accent-soft);
color: #b9d4ff;
}
/* Buttons that only make sense while sketching. */
.right-btn.sketch-only {
display: none;
}
body.sketching .right-btn.sketch-only {
display: flex;
}
.right-label {
font-size: 9.5px;
color: var(--muted);
}
#popover {
position: fixed;
right: calc(60px + var(--safe-r));
width: 270px;
max-height: calc(100vh - 20px);
overflow-y: auto;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 8px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
z-index: 30;
}
#popover[hidden] {
display: none;
}
.pop-heading {
font-weight: 600;
padding: 8px 8px 4px;
}
.pop-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
text-align: left;
min-height: 38px;
padding: 0 8px;
border-radius: 6px;
}
.pop-row:hover {
background: rgba(255, 255, 255, 0.06);
}
.choice-row.active {
box-shadow: inset 3px 0 0 var(--accent);
background: rgba(255, 255, 255, 0.05);
}
.switch {
width: 34px;
height: 20px;
border-radius: 10px;
background: #4a4e57;
position: relative;
flex: none;
transition: 0.15s;
}
.switch::after {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 14px;
height: 14px;
border-radius: 50%;
background: #cfd3da;
transition: 0.15s;
}
.toggle-row.on .switch {
background: var(--accent);
}
.toggle-row.on .switch::after {
left: 17px;
background: white;
}
.pop-note {
color: var(--muted);
font-size: 12px;
padding: 6px 8px;
}
.pop-input {
width: 70px;
font: 13px ui-monospace, monospace;
color: var(--text);
background: #2b2e34;
border: 1px solid var(--line);
border-radius: 6px;
padding: 6px;
-webkit-user-select: text;
user-select: text;
}
.pop-tabs {
display: flex;
gap: 4px;
padding: 2px 2px 6px;
border-bottom: 1px solid var(--line);
margin-bottom: 4px;
}
.pop-tabs button {
padding: 6px 10px;
border-radius: 6px;
color: var(--muted);
}
.pop-tabs button.active {
color: var(--text);
background: rgba(255, 255, 255, 0.08);
}
/* ------------------------------------------------------ hint / status / label */
/* Below the top bar, so it never covers File / Items / Undo. */
#hint {
position: fixed;
top: calc(54px + var(--safe-t));
left: 50%;
transform: translateX(-50%);
max-width: min(560px, calc(100vw - 440px));
background: var(--chrome);
border-radius: 12px;
padding: 8px 16px;
color: #c6cad2;
text-align: center;
pointer-events: none;
z-index: 9;
}
#hint[hidden],
#status[hidden],
#panel[hidden],
#label[hidden] {
display: none;
}
#status {
position: fixed;
inset: 0;
margin: auto;
width: fit-content;
height: fit-content;
max-width: calc(100vw - 32px);
background: var(--chrome-solid);
border-radius: var(--radius);
padding: 14px 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
z-index: 40;
}
#label {
position: fixed;
left: 0;
top: 0;
pointer-events: none;
background: var(--chrome-solid);
border: 1px solid rgba(61, 139, 255, 0.55);
border-radius: 8px;
padding: 4px 8px;
font: 13px/1.25 ui-monospace, monospace;
white-space: nowrap;
z-index: 20;
display: flex;
flex-direction: column;
gap: 2px;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.label-value {
font-weight: 600;
}
.label-tip {
font: 11px/1.2 system-ui, sans-serif;
color: #9fc3ff;
}
#label.typing {
border-color: var(--accent);
background: #1d2a40;
}
#toast {
position: fixed;
left: 50%;
bottom: calc(96px + var(--safe-b));
transform: translate(-50%, 20px);
opacity: 0;
transition: 0.2s;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 10px 16px;
pointer-events: none;
max-width: calc(100vw - 32px);
z-index: 45;
}
#toast.show {
opacity: 1;
transform: translate(-50%, 0);
}
#toast.top {
bottom: auto;
top: calc(100px + var(--safe-t));
}
#toast.error {
border-color: rgba(255, 107, 94, 0.5);
}
.dim-widget {
position: fixed;
left: 0;
top: 0;
display: flex;
align-items: center;
gap: 4px;
padding: 3px;
background: rgba(31, 33, 37, 0.95);
border: 1px solid rgba(61, 139, 255, 0.7);
border-radius: 8px;
/* Above the constraint labels, toasts and popovers: it's what you're typing into. */
z-index: 46;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.dim-widget[hidden] {
display: none;
}
.dim-widget select {
font: inherit;
font-size: 12px;
color: var(--text);
background: #2b2e34;
border: 0;
border-radius: 5px;
padding: 4px 2px;
}
.dim-widget input {
width: 64px;
font: 13px ui-monospace, monospace;
color: var(--text);
background: #2b2e34;
border: 1px solid transparent;
border-radius: 5px;
padding: 4px 6px;
-webkit-user-select: text;
user-select: text;
}
.dim-widget input:focus {
border-color: var(--accent);
outline: none;
}
.dim-widget input.invalid,
.dim-widget.invalid input {
border-color: var(--danger);
}
/* Variables on: a tag per variable where it acts on the model (its kind's mark
and name, like a constraint mark), its value box by it when tapped. */
.vtags {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 7;
}
.vtags[hidden] {
display: none;
}
.vtag-lines {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: visible;
}
/* What the open variable changes: yellow dashes on the model, a dot at each end. */
.vtag-lines .mark {
fill: none;
stroke: #ffd34d;
stroke-width: 2;
stroke-dasharray: 6 4;
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}
.vtag-lines circle.mark {
fill: #ffd34d;
stroke: none;
}
/* A tap on one: the tags related to it stay lit, the rest fade back. */
.vtag.faded {
opacity: 0.35;
}
.vtag.rel {
border-color: rgba(159, 209, 255, 0.85);
}
/* Under the open box: what's made from it ("→ p2 = p1 + arm1"). */
.vtag-rel {
position: fixed;
left: 0;
top: 0;
z-index: 47;
padding: 4px 8px;
border-radius: 8px;
background: rgba(31, 33, 37, 0.92);
border: 1px solid rgba(255, 255, 255, 0.14);
font: 11.5px ui-monospace, monospace;
color: #bcd2ee;
white-space: nowrap;
pointer-events: none;
}
.vtag-rel[hidden] {
display: none;
}
.vtag {
position: absolute;
left: 0;
top: 0;
pointer-events: auto;
display: inline-flex;
align-items: center;
gap: 3px;
height: 20px;
padding: 0 5px 0 3px;
border-radius: 6px;
font: 600 11px ui-monospace, monospace;
white-space: nowrap;
color: #e8f1ff;
background: rgba(31, 33, 37, 0.88);
border: 1px solid rgba(255, 255, 255, 0.22);
touch-action: manipulation;
}
.vtag[hidden] {
display: none;
}
/* Fingers: a bigger target than the tag looks. */
.vtag::before {
content: "";
position: absolute;
inset: -7px -4px;
}
.vtag-mark {
display: inline-grid;
place-items: center;
min-width: 14px;
height: 14px;
border-radius: 4px;
font-size: 11px;
color: #10151d;
}
.vtag[data-kind="length"] .vtag-mark {
background: #7fb8ff;
}
.vtag[data-kind="angle"] .vtag-mark {
background: #ffb86b;
}
.vtag[data-kind="number"] .vtag-mark {
background: #9be38f;
}
/* Made from other variables: the name in italics. */
.vtag.formula .vtag-name {
font-style: italic;
color: #ffe08a;
}
.vtag.sel {
border-color: #ffd34d;
box-shadow: 0 0 0 2px rgba(255, 211, 77, 0.35);
}
.vtag-box {
z-index: 47;
}
.vtag-box[hidden] {
display: none;
}
.vtag-box input {
width: auto;
min-width: 64px;
}
.vtag-box-name {
font: 600 12px ui-monospace, monospace;
color: #cfe3ff;
padding-left: 4px;
white-space: nowrap;
}
.vtag-box-value {
font: 12px ui-monospace, monospace;
color: var(--muted);
padding-right: 4px;
white-space: nowrap;
}
.vtag-box-value:empty {
display: none;
}
/* Keys typed while drawing land here (the box isn't focused). */
.dim-widget.typing input {
border-color: var(--accent);
background: #1d2a40;
}
.dim-unit {
font-size: 11.5px;
color: var(--muted);
}
.dim-pin {
font-size: 13px;
padding: 2px 4px;
border-radius: 5px;
}
.dim-pin:hover {
background: rgba(255, 255, 255, 0.1);
}
/* Sketch constraints: column of buttons + badges next to the geometry. */
/* Placed by the sketch tool: beside the right-hand bar, its top at the Constraints button. */
#constraint-bar {
position: fixed;
right: calc(60px + var(--safe-r));
top: 50%;
display: flex;
flex-direction: column;
gap: 1px;
background: var(--chrome);
border-radius: var(--radius);
padding: 4px;
z-index: 10;
}
#constraint-bar button {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
min-height: 34px;
padding: 0 10px;
border-radius: 7px;
text-align: left;
white-space: nowrap;
}
#constraint-bar button:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.07);
}
#constraint-bar button.on {
background: var(--accent-soft);
color: #cfe0ff;
}
#constraint-bar button.on .cg::after {
content: " ✓";
font-size: 10px;
}
#constraint-bar hr {
border: 0;
border-top: 1px solid var(--line);
margin: 3px 2px;
}
.cbar-toggle .switch {
width: 28px;
height: 16px;
border-radius: 8px;
background: #3a3e46;
position: relative;
flex: none;
}
.cbar-toggle .switch::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 12px;
height: 12px;
border-radius: 50%;
background: #c9ced8;
transition: left 0.12s;
}
.cbar-toggle.on .switch {
background: var(--accent);
}
.cbar-toggle.on .switch::after {
left: 14px;
background: white;
}
#constraint-bar .cg {
width: 22px;
text-align: center;
color: #9fd1ff;
font-weight: 600;
}
.cglyphs[hidden] {
display: none;
}
.cglyphs {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 7;
}
.cglyph {
position: absolute;
left: 0;
top: 0;
pointer-events: auto;
min-width: 18px;
height: 18px;
padding: 0 4px;
font-size: 11px;
line-height: 18px;
border-radius: 5px;
color: #cfe3ff;
background: rgba(40, 70, 120, 0.85);
border: 1px solid rgba(110, 160, 255, 0.6);
}
.cglyph.dim {
height: 22px;
line-height: 20px;
padding: 0 6px;
font: 12px ui-monospace, monospace;
color: #fff;
background: rgba(31, 33, 37, 0.92);
border-color: rgba(255, 255, 255, 0.35);
}
.cglyph.expr {
color: #9fd1ff;
}
.cglyph.sel {
border-color: #ffd34d;
box-shadow: 0 0 0 2px rgba(255, 211, 77, 0.35);
}
.cglyph[hidden] {
display: none;
}
@media (max-width: 720px) {
#constraint-bar {
top: auto;
transform: none;
bottom: calc(120px + var(--safe-b));
right: calc(8px + var(--safe-r));
max-height: 40vh;
overflow-y: auto;
}
#constraint-bar .cl {
display: none;
}
}
#warn {
position: fixed;
left: 50%;
bottom: calc(62px + var(--safe-b));
transform: translateX(-50%);
max-width: min(520px, calc(100vw - 32px));
padding: 5px 12px;
border-radius: 999px;
font-size: 12px;
color: #ffd2a8;
background: rgba(60, 38, 20, 0.85);
border: 1px solid rgba(255, 154, 61, 0.45);
pointer-events: none;
z-index: 9;
}
#warn[hidden] {
display: none;
}
#marquee {
position: fixed;
border: 1px solid var(--accent);
background: rgba(61, 139, 255, 0.12);
pointer-events: none;
z-index: 6;
}
#marquee[hidden] {
display: none;
}
#pins {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 4;
}
.pin {
position: absolute;
left: 0;
top: 0;
background: rgba(31, 33, 37, 0.92);
border: 1px solid rgba(61, 139, 255, 0.6);
border-radius: 6px;
padding: 3px 7px;
font: 12px ui-monospace, monospace;
white-space: nowrap;
}
/* ---------------------------------------------------------- value panel */
#panel {
position: fixed;
bottom: calc(10px + var(--safe-b));
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: 14px;
padding: 8px 8px 8px 14px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
max-width: min(980px, calc(100vw - 16px));
z-index: 15;
}
.panel-title {
font-weight: 600;
}
.panel-fields,
.panel-buttons {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
}
.field {
display: flex;
align-items: center;
gap: 5px;
color: var(--muted);
}
.field input,
.text-input {
width: 92px;
min-height: 36px;
font: 14px ui-monospace, monospace;
color: var(--text);
background: #2b2e34;
border: 1px solid var(--line);
border-radius: 8px;
padding: 0 8px;
-webkit-user-select: text;
user-select: text;
}
.text-input {
width: 180px;
font-family: inherit;
}
.field input:focus,
.text-input:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
}
.field input.invalid {
outline: 2px solid var(--danger);
}
.field input.has-expr {
color: #9fd1ff;
}
.fx-btn {
font: italic 600 12px Georgia, serif;
color: var(--muted);
padding: 4px 6px;
border-radius: 6px;
}
.fx-btn:hover {
color: var(--text);
background: rgba(255, 255, 255, 0.08);
}
.slot {
display: flex;
flex-direction: column;
align-items: flex-start;
min-height: 38px;
padding: 3px 10px;
border-radius: 8px;
border: 1px dashed rgba(255, 255, 255, 0.25);
text-align: left;
}
.slot.active {
border: 1px solid var(--accent);
background: var(--accent-soft);
}
.slot.filled {
border-style: solid;
}
.slot-label {
font-size: 11px;
color: var(--muted);
}
.choice {
display: flex;
align-items: center;
gap: 2px;
background: #2b2e34;
border-radius: 8px;
padding: 2px;
}
.choice-list select {
max-width: 180px;
min-width: 0;
padding: 7px 8px;
border-radius: 8px;
border: 1px solid var(--line);
background: #2b2e34;
color: var(--text);
font: inherit;
}
.choice {
flex-wrap: wrap;
max-width: 100%;
}
.choice button {
padding: 7px 10px;
border-radius: 6px;
color: var(--muted);
}
.choice button.active {
background: var(--accent);
color: white;
}
.toggle {
padding: 8px 12px;
border-radius: 8px;
background: #2b2e34;
color: var(--muted);
}
.toggle.on {
background: var(--accent-soft);
color: #b9d4ff;
box-shadow: inset 0 0 0 1px var(--accent);
}
#panel .tool {
min-height: 36px;
background: #2b2e34;
}
/* --------------------------------------------------------------- history */
/* History docks at the right edge; the right column, cube and popovers slide left of it. */
#history {
position: fixed;
top: calc(8px + var(--safe-t));
right: calc(8px + var(--safe-r));
bottom: calc(8px + var(--safe-b));
width: 250px;
display: none;
flex-direction: column;
background: var(--chrome);
border-radius: var(--radius);
overflow: hidden;
z-index: 8;
}
#history.open {
display: flex;
}
.history-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 4px 4px 12px;
font-weight: 600;
border-bottom: 1px solid var(--line);
}
.history-head .icon-btn {
background: none;
}
#history-list {
list-style: none;
margin: 0;
padding: 4px;
overflow-y: auto;
}
.history-item {
display: flex;
flex-wrap: wrap;
align-items: center;
border-radius: 8px;
}
.history-item:hover {
background: rgba(255, 255, 255, 0.05);
}
.history-item.active {
background: var(--accent-soft);
}
.history-item.suppressed .history-name {
opacity: 0.45;
text-decoration: line-through;
}
.history-name {
flex: 1;
text-align: left;
min-height: 36px;
padding: 0 10px;
}
.history-item .icon-btn {
background: none;
opacity: 0.55;
width: 32px;
height: 32px;
}
.history-item .icon-btn:hover {
opacity: 1;
}
.history-item.error .history-name {
color: var(--danger);
}
.history-warn {
display: inline-grid;
place-items: center;
width: 16px;
height: 16px;
margin-right: 7px;
border-radius: 50%;
background: var(--danger);
color: white;
font-size: 11px;
font-weight: 700;
vertical-align: 1px;
}
.history-error {
flex-basis: 100%;
padding: 0 10px 8px;
color: var(--danger);
font-size: 12px;
}
.history-empty {
color: var(--muted);
padding: 12px;
}
body.history-open #right-col {
right: calc(266px + var(--safe-r));
}
body.history-open #viewcube-host {
right: calc(318px + var(--safe-r));
}
body.history-open #popover,
body.history-open .measure-card {
right: calc(318px + var(--safe-r));
}
/* Items docks at the left edge (like History on the right); the tools move right of it. */
body.items-open #toolbar,
body.items-open #bottom-left {
left: calc(274px + var(--safe-l));
}
/* ----------------------------------------------------------------- items */
#items {
position: fixed;
top: calc(52px + var(--safe-t));
left: calc(8px + var(--safe-l));
bottom: calc(8px + var(--safe-b));
width: 258px;
display: none;
flex-direction: column;
background: var(--chrome);
border-radius: var(--radius);
overflow: hidden;
z-index: 8;
}
#items.open {
display: flex;
}
#items-list {
list-style: none;
margin: 0;
padding: 4px;
overflow-y: auto;
}
.items-heading {
font-size: 11.5px;
color: var(--muted);
padding: 8px 8px 2px;
}
.items-empty {
color: var(--muted);
padding: 4px 10px 8px;
}
.items-row {
display: flex;
align-items: center;
border-radius: 7px;
}
.items-head-btns {
display: flex;
align-items: center;
gap: 2px;
}
.text-btn.small {
min-height: 28px;
padding: 0 9px;
font-size: 12.5px;
background: none;
}
.text-btn.small.on {
background: var(--accent-soft);
color: #cfe0ff;
}
.items-check {
margin: 0 2px 0 8px;
accent-color: var(--accent);
}
.items-row.checked {
background: var(--accent-soft);
}
.items-row.selected {
background: var(--accent-soft);
}
.items-row.selected .items-name {
color: var(--accent);
}
.items-row.in-folder {
padding-left: 18px;
}
.folder-row .items-name {
font-weight: 600;
}
.items-count {
color: var(--muted);
font-weight: 400;
}
.items-caret {
color: var(--muted);
}
.items-groupbar {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 8px 6px;
position: sticky;
bottom: 0;
background: var(--chrome-solid);
border-top: 1px solid var(--line);
}
/* Moving: what to do next, under the buttons; the folders to pick stand out. */
.items-groupbar-hint {
flex-basis: 100%;
font-size: 12px;
color: var(--muted);
padding: 0 2px;
}
.folder-row.move-target {
background: var(--accent-soft);
}
/* The buttons (New folder, Remove, Move) inside Items, wrapping as needed. */
.items-groupbar .text-btn {
padding: 0 9px;
font-size: 12.5px;
min-width: 0;
}
.items-row:hover {
background: rgba(255, 255, 255, 0.05);
}
.items-row .icon-btn {
background: none;
width: 32px;
height: 32px;
opacity: 0.6;
}
.items-row .icon-btn:hover {
opacity: 1;
}
.items-name {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
min-height: 34px;
text-align: left;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.items-name svg {
width: 17px;
height: 17px;
flex: none;
opacity: 0.8;
}
.hidden-item .items-name,
.isolated-out .items-name {
opacity: 0.4;
}
/* --------------------------------------------------------------- measure */
.measure-card {
position: fixed;
right: calc(60px + var(--safe-r));
bottom: calc(10px + var(--safe-b));
width: 280px;
max-height: 50vh;
overflow-y: auto;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 8px;
z-index: 15;
}
.measure-toggle {
display: flex;
gap: 8px;
align-items: center;
padding: 4px 6px 8px;
color: var(--muted);
}
.measure-row {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
padding: 6px;
border-radius: 6px;
}
.measure-row:hover {
background: rgba(255, 255, 255, 0.05);
}
.measure-row .icon-btn {
grid-row: 1 / span 2;
grid-column: 2;
background: none;
}
.measure-value {
grid-column: 1;
font: 14px ui-monospace, monospace;
}
.measure-name {
grid-column: 1;
font-size: 11.5px;
color: var(--muted);
}
.measure-empty {
color: var(--muted);
padding: 6px;
}
/* ---------------------------------------------------------------- dialog */
.dialog-back {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
display: grid;
place-items: center;
z-index: 50;
}
.dialog {
width: min(380px, calc(100vw - 24px));
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: 14px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 10px;
}
.dialog-note {
color: var(--muted);
font-size: 12.5px;
}
.dialog-field {
display: flex;
flex-direction: column;
gap: 4px;
color: var(--muted);
}
.dialog-field input {
min-height: 38px;
font: 14px ui-monospace, monospace;
color: var(--text);
background: #2b2e34;
border: 1px solid var(--line);
border-radius: 8px;
padding: 0 10px;
-webkit-user-select: text;
user-select: text;
}
.dialog .panel-buttons {
justify-content: flex-end;
}
/* A button across the top (New Variable). */
.dialog-action {
justify-content: center;
border: 1px dashed var(--line);
flex: none;
}
/* The fields: as tall as the screen allows, then they scroll (with a bar always shown). */
form.dialog {
max-height: calc(100dvh - 24px - var(--safe-t) - var(--safe-b));
}
.dialog-list {
display: flex;
flex-direction: column;
gap: 10px;
min-height: 0;
overflow-y: auto;
overscroll-behavior: contain;
margin-right: -8px;
padding-right: 8px;
scrollbar-width: thin;
scrollbar-color: rgba(200, 210, 230, 0.5) transparent;
}
.dialog-list::-webkit-scrollbar {
display: block;
width: 6px;
}
.dialog-list::-webkit-scrollbar-thumb {
background: rgba(200, 210, 230, 0.5);
border-radius: 3px;
}
/* Color → Custom…: the body shows each colour as it's chosen, so the view stays clear behind. */
.dialog-back.see-through {
background: transparent;
}
.color-dialog {
width: min(232px, calc(100vw - 24px));
padding: 6px 12px 12px;
gap: 8px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.color-grip {
height: 16px;
margin: 0 -12px -4px;
display: grid;
place-items: center;
cursor: grab;
touch-action: none;
}
.color-grip span {
width: 32px;
height: 4px;
border-radius: 2px;
background: var(--muted);
opacity: 0.55;
}
.color-grip:active {
cursor: grabbing;
}
/* Cancel and Done side by side in the narrow window (the key hints left out). */
.color-dialog .panel-buttons {
flex-wrap: nowrap;
}
.color-dialog .panel-buttons .text-btn {
flex: 1;
justify-content: center;
}
.color-dialog .panel-buttons kbd {
display: none;
}
.color-sv,
.color-hue {
position: relative;
border-radius: 8px;
touch-action: none;
cursor: crosshair;
}
.color-sv {
height: 140px;
}
.color-hue {
height: 18px;
border-radius: 9px;
background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.color-dot {
position: absolute;
width: 18px;
height: 18px;
border-radius: 50%;
border: 2px solid white;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
transform: translate(-50%, -50%);
pointer-events: none;
}
.color-hue .color-dot {
top: 50%;
}
.color-row {
display: flex;
align-items: center;
gap: 10px;
}
.color-preview {
width: 32px;
height: 32px;
}
.color-hex {
flex: 1;
min-height: 36px;
font: 14px ui-monospace, monospace;
color: var(--text);
background: #2b2e34;
border: 1px solid var(--line);
border-radius: 8px;
padding: 0 10px;
-webkit-user-select: text;
user-select: text;
}
/* File → Open: the projects kept on this device. */
.dialog.library {
width: min(780px, calc(100vw - 24px));
max-height: min(86vh, calc(100vh - 24px - var(--safe-t) - var(--safe-b)));
padding: 14px;
}
/* More → About: the README, read in the app. */
.dialog.about {
width: min(720px, calc(100vw - 24px));
max-height: min(88vh, calc(100vh - 24px - var(--safe-t) - var(--safe-b)));
padding: 14px;
display: flex;
flex-direction: column;
gap: 8px;
}
.about-body {
overflow: auto;
min-height: 0;
padding: 0 4px 8px;
font-size: 14px;
line-height: 1.55;
}
.about-body h1 {
font-size: 22px;
margin: 8px 0 6px;
}
.about-body h2 {
font-size: 18px;
margin: 22px 0 6px;
padding-bottom: 4px;
border-bottom: 1px solid var(--line);
}
.about-body h3 {
font-size: 15px;
margin: 16px 0 4px;
}
.about-body p,
.about-body ul,
.about-body ol {
margin: 6px 0;
}
.about-body ul,
.about-body ol {
padding-left: 22px;
}
.about-body li {
margin: 3px 0;
}
.about-body a {
color: var(--accent);
}
.about-body code {
font: 12.5px ui-monospace, Consolas, monospace;
padding: 1px 4px;
border-radius: 4px;
background: rgba(127, 127, 127, 0.16);
}
.about-body pre {
overflow: auto;
padding: 10px;
border-radius: 8px;
background: rgba(127, 127, 127, 0.12);
}
.about-body pre code {
padding: 0;
background: none;
}
.about-body hr {
border: 0;
border-top: 1px solid var(--line);
margin: 18px 0;
}
.about-table {
overflow: auto;
}
.about-body table {
border-collapse: collapse;
margin: 8px 0;
}
.about-body th,
.about-body td {
border: 1px solid var(--line);
padding: 5px 8px;
text-align: left;
vertical-align: top;
}
.library-head {
display: flex;
align-items: center;
gap: 8px;
}
.library-head .panel-title {
margin-right: auto;
}
.library-close {
background: none;
}
/* One row, as many cards as there are: it scrolls side to side, with a bar
that stays in sight (the app's other windows only show one while scrolling). */
.library-grid {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 200px;
gap: 10px;
overflow-x: auto;
overflow-y: hidden;
overscroll-behavior-x: contain;
scroll-snap-type: x proximity;
margin: 0 -2px;
padding: 2px 2px 10px;
scrollbar-width: thin;
scrollbar-color: rgba(200, 210, 230, 0.5) transparent;
}
.library-grid.empty {
display: block;
}
.library-grid::-webkit-scrollbar {
display: block;
height: 8px;
}
.library-grid::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.06);
border-radius: 4px;
}
.library-grid::-webkit-scrollbar-thumb {
background: rgba(200, 210, 230, 0.5);
border-radius: 4px;
}
.library-card {
scroll-snap-align: start;
}
.library-card {
display: flex;
flex-direction: column;
background: var(--chrome);
border: 1px solid var(--line);
border-radius: 10px;
overflow: hidden;
}
.library-card.current {
border-color: var(--accent);
}
.library-pic {
position: relative;
display: grid;
place-items: center;
aspect-ratio: 4 / 3;
padding: 0;
border: 0;
background: #24272c;
color: var(--muted);
cursor: pointer;
}
.library-pic img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.library-pic > svg {
width: 36px;
height: 36px;
opacity: 0.6;
}
.library-pic:hover img {
filter: brightness(1.12);
}
.library-badge {
position: absolute;
left: 6px;
top: 6px;
padding: 2px 7px;
border-radius: 999px;
font-size: 11px;
color: #fff;
background: var(--accent);
}
.library-info {
display: flex;
align-items: center;
gap: 0;
padding: 6px 2px 6px 10px;
}
.library-text {
flex: 1;
min-width: 0;
}
.library-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.library-date {
font-size: 11.5px;
color: var(--muted);
}
.library-info .icon-btn {
width: 28px;
height: 30px;
background: none;
color: var(--muted);
}
.library-info .icon-btn svg {
width: 18px;
height: 18px;
}
.library-info .icon-btn.danger:hover {
color: var(--danger);
}
.library-empty {
grid-column: 1 / -1;
padding: 28px 8px;
text-align: center;
color: var(--muted);
}
.library-note {
font-size: 11.5px;
}
.library-welcome {
color: var(--text);
font-size: 13.5px;
line-height: 1.45;
padding: 10px 12px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: rgba(255, 255, 255, 0.03);
}
.library-section {
color: var(--muted);
font-size: 12px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
margin-bottom: -4px;
}
/* The ways to support it: a few words, then a button each with room for its logo. */
.library-support {
display: flex;
flex-direction: column;
gap: 8px;
padding: 10px 12px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: rgba(255, 255, 255, 0.03);
}
.library-support-text {
font-size: 12.5px;
line-height: 1.45;
color: var(--muted);
}
.library-support-row {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
}
.library-support-btn {
display: flex;
align-items: center;
gap: 10px;
min-height: 48px;
padding: 6px 10px 6px 6px;
border: 1px solid var(--line);
border-radius: 9px;
background: rgba(255, 255, 255, 0.04);
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
}
.library-support-btn:hover:not(:disabled) {
border-color: var(--accent);
background: var(--accent-soft);
}
.library-support-btn:disabled {
cursor: default;
opacity: 0.55;
}
.library-support-logo {
flex: none;
display: grid;
place-items: center;
width: 36px;
height: 36px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.07);
color: var(--muted);
overflow: hidden;
}
.library-support-logo svg {
width: 22px;
height: 22px;
}
.library-support-logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
/* MakerWorld's Boost, as their pages show it: a rocket and the word, in violet. */
.library-support-tag {
flex: none;
display: inline-flex;
align-items: center;
gap: 4px;
margin-left: auto;
padding: 4px 8px 4px 6px;
border-radius: 7px;
background: rgba(176, 108, 255, 0.16);
color: #c08cff;
font-size: 12.5px;
font-weight: 600;
}
.library-support-tag svg {
width: 15px;
height: 15px;
}
/* A site's own logo: its colours, on its own tile. */
.library-support-logo.has-logo {
background: none;
}
.library-support-btn:disabled .library-support-logo.has-logo {
filter: saturate(0.6);
}
.library-support-name {
display: flex;
flex-direction: column;
min-width: 0;
font-size: 12px;
color: var(--muted);
}
.library-support-name b {
font-size: 13px;
font-weight: 600;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 560px) {
/* The title and close on top, New project and Open file… under them. */
.library-head {
flex-wrap: wrap;
}
.library-head .panel-title {
flex: 1 1 calc(100% - 50px);
order: 0;
}
.library-head .library-close {
order: 1;
}
.library-head .text-btn {
order: 2;
flex: 1;
justify-content: center;
}
/* Full screen: just its icon. */
.library-head .library-full {
flex: none;
padding-inline: 10px;
}
.library-full-text {
display: none;
}
.library-support-row {
grid-template-columns: 1fr;
gap: 6px;
}
.library-support-btn {
min-height: 42px;
}
}
@media (max-width: 720px) {
/* Two cards across, the next one peeking in at the edge. */
.library-grid {
grid-auto-columns: calc((100% - 16px) / 2.2);
gap: 8px;
}
}
/* ---------------------------------------------------------- small screens */
@media (max-width: 720px) {
.brand {
display: none;
}
/* Tool column becomes a scrollable strip along the bottom, labels hidden. */
#toolbar {
top: auto;
transform: none;
bottom: calc(8px + var(--safe-b));
left: calc(8px + var(--safe-l));
right: calc(8px + var(--safe-r));
flex-direction: row;
overflow-x: auto;
overflow-y: hidden;
max-height: none;
}
#toolbar .tool-label,
#bottom-left .tool-label {
display: none;
}
#bottom-left {
bottom: calc(64px + var(--safe-b));
/* Right of the undo dock, which keeps the corner. */
left: calc(128px + var(--safe-l));
flex-direction: row;
}
#undo-dock {
bottom: calc(64px + var(--safe-b));
}
.dock-btn {
width: 46px;
height: 40px;
}
.tool {
padding: 0 9px;
}
.tool.has-children::after {
left: 25px;
}
#panel {
bottom: calc(120px + var(--safe-b));
}
#hint {
top: auto;
bottom: calc(66px + var(--safe-b));
left: auto;
right: calc(8px + var(--safe-r));
transform: none;
max-width: calc(100vw - 140px);
font-size: 12px;
text-align: left;
}
#viewcube-host {
right: calc(56px + var(--safe-r));
transform: scale(0.8);
transform-origin: top right;
}
#history {
left: calc(8px + var(--safe-l));
right: calc(60px + var(--safe-r));
bottom: auto;
width: auto;
max-height: 45vh;
}
/* On phones History floats instead of docking. */
body.history-open #right-col {
right: calc(8px + var(--safe-r));
}
body.history-open #viewcube-host {
right: calc(56px + var(--safe-r));
}
body.history-open #popover,
body.history-open .measure-card {
right: calc(60px + var(--safe-r));
}
/* On phones Items floats over the view instead of docking. */
#items {
width: auto;
right: calc(60px + var(--safe-r));
bottom: auto;
max-height: 55vh;
z-index: 34;
background: var(--chrome-solid);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
body.items-open #toolbar,
body.items-open #bottom-left {
left: calc(128px + var(--safe-l));
}
body.items-open #undo-dock {
left: calc(8px + var(--safe-l));
}
.measure-card {
left: calc(8px + var(--safe-l));
width: auto;
bottom: calc(120px + var(--safe-b));
}
}
/* Steps done inside a sketch, under it in History. */
.history-steps {
list-style: none;
display: flex;
flex-direction: column;
padding: 0 0 4px 22px;
}
.history-step {
text-align: left;
font-size: 12px;
color: var(--muted, #9aa3b5);
background: none;
border: 0;
padding: 2px 6px;
border-left: 1px solid var(--line);
cursor: pointer;
}
.history-step:hover {
color: var(--text, #e6ebf5);
}
.history-step.more {
cursor: default;
font-style: italic;
}
/* Orbit centre button, under the view cube. */
.pivot-btn {
display: block;
margin: 2px auto 0;
width: 30px;
height: 30px;
padding: 5px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--chrome-solid);
color: var(--muted);
cursor: pointer;
}
.pivot-btn:hover {
color: var(--text);
}
.pivot-btn.on {
color: #fff;
background: #3d8bff;
border-color: #3d8bff;
}
.pivot-cursor {
position: fixed;
left: 0;
top: 0;
width: 22px;
height: 22px;
color: #3d8bff;
pointer-events: none;
z-index: 40;
}
.pivot-cursor[hidden] {
display: none;
}
/* Pattern count + spacing box. */
.pattern-box input:first-of-type {
width: 3.2em;
}
.pattern-box select {
margin: 0 4px;
}
/* Busy indicator: the geometry engine is working. */
#busy {
position: fixed;
left: 50%;
top: calc(62px + var(--safe-t));
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
border-radius: 999px;
background: var(--chrome-solid);
border: 1px solid var(--line);
color: var(--text);
font-size: 13px;
z-index: 60;
pointer-events: none;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
#busy .busy-stop {
margin-left: 4px;
padding: 3px 10px;
border-radius: 6px;
border: 1px solid rgba(255, 90, 90, 0.55);
background: rgba(255, 70, 70, 0.16);
color: #ffb3b3;
font: inherit;
font-size: 12px;
cursor: pointer;
pointer-events: auto;
}
#busy .busy-stop:hover {
background: rgba(255, 70, 70, 0.3);
}
#busy[hidden] {
display: none;
}
#busy .spinner {
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.25);
border-top-color: #3d8bff;
animation: busy-spin 0.8s linear infinite;
}
@keyframes busy-spin {
to {
transform: rotate(360deg);
}
}
/* ------------------------------------------------ phones: nothing overlaps */
@media (max-width: 720px) {
/* The top bar stops before the right-hand column; the name shrinks to fit. */
#topbar {
right: calc(60px + var(--safe-r));
}
.project-name {
flex: 1 1 auto;
width: auto;
min-width: 0;
margin-right: 2px;
padding: 0 8px;
}
#topbar .text-btn {
padding: 0 8px;
}
/* The view cube sits under the top bar, beside the column. */
#viewcube-host,
body.history-open #viewcube-host {
top: calc(50px + var(--safe-t));
}
#busy {
top: calc(96px + var(--safe-t));
}
}
/* Tablets in portrait: the brand gives way so the bar fits beside the column. */
@media (min-width: 721px) and (max-width: 1100px) {
.brand {
width: auto;
font-size: 20px;
}
.project-name {
width: 220px;
}
}
@media (max-width: 720px) {
/* The hint goes under the top bar, left of the view cube (clear of the bottom buttons). */
#hint {
top: calc(52px + var(--safe-t));
bottom: auto;
left: calc(8px + var(--safe-l));
right: auto;
max-width: calc(100vw - 170px);
}
/* History / Items open under the top bar; the view cube steps aside meanwhile. */
#history,
#items {
top: calc(52px + var(--safe-t));
}
body.history-open #viewcube-host,
body.items-open #viewcube-host {
display: none;
}
}
@media (min-width: 721px) and (max-width: 1100px) {
/* The bar ends before the view cube (which keeps its corner); the name shrinks. */
#topbar {
right: calc(178px + var(--safe-r));
}
body.history-open #topbar {
right: calc(436px + var(--safe-r));
}
body.history-open .brand {
display: none;
}
.project-name {
flex: 0 1 220px;
min-width: 80px;
}
}
@media (min-width: 721px) and (max-width: 1100px) {
/* History docked leaves no room for the hint line: it steps aside until History closes. */
body.history-open #hint {
display: none;
}
}
/* Fullscreen on a tablet (touch, wide): Safari's close button sits at the top
left, so the top bar starts a little to the right of it. */
@media (pointer: coarse) and (min-width: 721px) {
body.is-fullscreen #topbar {
left: calc(64px + var(--safe-l));
}
}
/* ------------------------------------- phones held sideways (short screens) */
@media (max-height: 500px) and (min-width: 721px) {
/* Tools: an icon column between the top bar and the bottom row (scrolls if needed). */
#toolbar {
top: calc(52px + var(--safe-t));
bottom: calc(64px + var(--safe-b));
transform: none;
max-height: none !important;
align-content: flex-start;
}
#toolbar .tool-label,
#bottom-left .tool-label {
display: none;
}
.tool {
padding: 0 9px;
}
/* Section / Measure / Isolate: one row beside undo/redo at the bottom. */
#bottom-left {
bottom: calc(10px + var(--safe-b));
left: calc(120px + var(--safe-l));
flex-direction: row;
}
#undo-dock {
bottom: calc(10px + var(--safe-b));
}
/* Items: narrower, above the bottom row; the tool column moves beside it. */
#items {
top: calc(52px + var(--safe-t));
bottom: calc(64px + var(--safe-b));
width: 230px;
}
body.items-open #toolbar {
left: calc(246px + var(--safe-l));
}
body.items-open #bottom-left {
left: calc(120px + var(--safe-l));
}
body.items-open #undo-dock {
left: calc(8px + var(--safe-l));
}
/* The value panel sits right of the bottom row. */
#panel {
left: calc(50% + 70px);
max-width: calc(100vw - 420px);
}
/* History floats over the right side, under the top bar. */
#history {
top: calc(52px + var(--safe-t));
bottom: calc(8px + var(--safe-b));
}
}
@media (max-height: 500px) and (min-width: 721px) {
#bottom-left,
body.items-open #bottom-left {
left: calc(130px + var(--safe-l));
}
#toolbar {
bottom: calc(70px + var(--safe-b));
}
/* The constraint column: under the view cube, beside the right column, scrolling. */
#constraint-bar {
top: calc(170px + var(--safe-t)) !important;
bottom: calc(10px + var(--safe-b));
right: calc(64px + var(--safe-r)) !important;
max-height: none;
overflow-y: auto;
}
#constraint-bar .cl {
display: none;
}
}
@media (max-height: 500px) and (min-width: 721px) {
/* With Items open there's no room for the hint line. */
body.items-open #hint {
display: none;
}
}
/* Press-and-hold name of a tool (touch screens). */
.tool-ghost {
position: fixed;
left: 50%;
top: 42%;
transform: translate(-50%, -50%);
padding: 12px 22px;
border-radius: 14px;
background: rgba(20, 22, 26, 0.82);
color: #fff;
font-size: 22px;
font-weight: 650;
letter-spacing: 0.01em;
pointer-events: none;
z-index: 80;
white-space: nowrap;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.tool-ghost[hidden] {
display: none;
}
/* No text-selection callout or magnifier on long presses of tool buttons. */
.tool {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.history-caret {
background: none;
border: 0;
color: var(--muted);
width: 18px;
padding: 0;
cursor: pointer;
font-size: 12px;
}
.history-caret:hover {
color: var(--text);
}
/* ⟲ + the line type a toggle switches to. */
.tool-trailing {
display: inline-flex;
gap: 2px;
margin-left: auto;
padding-left: 8px;
opacity: 0.75;
}
.tool-trailing svg {
width: 16px;
height: 16px;
}
/* On-screen numpad for value boxes. */
.numpad {
position: fixed;
z-index: 70;
display: grid;
grid-template-columns: repeat(4, 52px);
gap: 5px;
padding: 8px;
border-radius: 14px;
background: var(--chrome-solid);
border: 1px solid var(--line);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.numpad[hidden] {
display: none;
}
.numpad button {
height: 44px;
border-radius: 9px;
border: 0;
background: #30343c;
color: var(--text);
font-size: 19px;
font-weight: 600;
touch-action: manipulation;
-webkit-user-select: none;
user-select: none;
}
.numpad button:active {
background: #3d8bff;
}
.numpad .np-enter {
grid-row: span 2;
height: auto;
background: #3d8bff;
color: #fff;
}
.numpad .np-close {
font-size: 15px;
color: var(--muted);
}
/* ƒx on: + × / and the variables (tap one to type its name), + New makes one from the value. */
.numpad .np-fx-row,
.numpad .np-chips {
display: none;
grid-column: 1 / -1;
}
/* As wide as the keys above (whatever size they are on this screen). */
.numpad.fx .np-fx-row {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: inherit;
}
.numpad.fx .np-chips:not(:empty) {
display: flex;
flex-wrap: wrap;
gap: inherit;
min-width: 0;
max-height: 118px;
overflow-y: auto;
}
.numpad.fx .np-fx {
background: var(--accent-soft);
color: #b9d4ff;
}
.numpad .np-abc {
font-size: 15px;
color: var(--muted);
}
.numpad button.np-chip {
height: 34px;
padding: 0 8px;
font: 600 14px ui-monospace, monospace;
color: #9fd1ff;
}
.numpad button.np-new {
font-family: inherit;
color: var(--text);
border: 1px dashed var(--line);
background: none;
}
/* ƒx: pick a variable for a value box. */
.dim-var {
margin-left: 4px;
background: #2b2e34;
color: var(--accent);
border: 1px solid var(--line);
border-radius: 6px;
font-weight: 650;
padding: 2px 4px;
}
/* Headset browsers (Quest…): bigger targets for controller rays. */
body.headset .tool {
min-height: 46px;
}
body.headset .right-btn {
min-width: 48px;
min-height: 48px;
}
body.headset .text-btn {
min-height: 42px;
}
/* ------------- right column at the middle of the right edge (all devices) */
#right-col {
top: 50%;
transform: translateY(-50%);
max-height: calc(100vh - 140px);
overflow-y: auto;
}
/* The view cube takes the top right corner, above the column. */
#viewcube-host {
right: calc(8px + var(--safe-r));
}
body.history-open #viewcube-host {
right: calc(266px + var(--safe-r));
}
@media (max-width: 720px) {
/* Phones: the top bar can use the whole width (the column is lower down). */
#topbar {
right: calc(8px + var(--safe-r));
}
#viewcube-host,
body.history-open #viewcube-host {
right: calc(8px + var(--safe-r));
}
}
@media (min-width: 721px) and (max-width: 1100px) {
#topbar {
right: calc(126px + var(--safe-r));
}
body.history-open #topbar {
right: calc(384px + var(--safe-r));
}
}
/* Short screens (phones sideways): too low for cube above column - the cube sits left of it. */
@media (max-height: 600px) {
#viewcube-host {
right: calc(64px + var(--safe-r));
}
body.history-open #viewcube-host {
right: calc(318px + var(--safe-r));
}
#right-col {
max-height: calc(100vh - 16px);
}
}
@media (max-height: 600px) and (min-width: 721px) {
#topbar {
right: calc(182px + var(--safe-r));
}
}
/* ---------------------------------------------------------------- help */
.help-panel {
position: fixed;
z-index: 75;
top: calc(56px + var(--safe-t));
left: 50%;
transform: translateX(-50%);
width: min(680px, calc(100vw - 24px));
max-height: calc(100vh - 80px - var(--safe-t) - var(--safe-b));
display: flex;
flex-direction: column;
background: var(--chrome-solid);
border: 1px solid var(--line);
border-radius: 14px;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.help-panel[hidden] {
display: none;
}
.help-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px 6px 18px;
border-bottom: 1px solid var(--line);
}
.help-head h2 {
margin: 0;
font-size: 17px;
}
.help-body {
overflow-y: auto;
padding: 4px 18px 16px;
-webkit-overflow-scrolling: touch;
}
.help-body h3 {
margin: 16px 0 6px;
font-size: 14px;
color: var(--accent);
}
.help-intro {
margin: 0 0 8px;
color: var(--muted);
font-size: 13px;
line-height: 1.45;
}
.help-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 7px;
}
.help-list li {
display: flex;
gap: 10px;
align-items: flex-start;
font-size: 13px;
line-height: 1.45;
}
.help-icon svg {
width: 20px;
height: 20px;
flex: none;
margin-top: 1px;
}
.help-list b {
font-weight: 650;
}
/* Phones: nearly full screen, under the top bar. */
@media (max-width: 720px) {
.help-panel {
top: calc(52px + var(--safe-t));
width: calc(100vw - 16px);
max-height: calc(100vh - 64px - var(--safe-t) - var(--safe-b));
}
}
/* Phones sideways: use the full height. */
@media (max-height: 500px) {
.help-panel {
top: calc(8px + var(--safe-t));
max-height: calc(100vh - 16px - var(--safe-t) - var(--safe-b));
}
}
body.headset .help-list li {
font-size: 15px;
}
@media (max-width: 720px) {
/* The warning line sits under the top bar (clear of the bottom buttons). */
#warn {
top: calc(96px + var(--safe-t));
bottom: auto;
max-width: calc(100vw - 150px);
left: calc(8px + var(--safe-l));
transform: none;
}
}
@media (max-width: 720px) {
/* The warning line goes just above the bottom buttons; a panel or an open
History/Items takes priority over it. */
#warn {
top: auto;
bottom: calc(118px + var(--safe-b));
}
body.history-open #warn,
body.items-open #warn,
body:has(#panel:not([hidden])) #warn,
body:has(#flyout:not([hidden])) #warn {
display: none;
}
}
@media (max-height: 600px) and (min-width: 721px) {
body.history-open #topbar {
right: calc(436px + var(--safe-r));
}
body.history-open .brand {
display: none;
}
/* The warning line sits in the bottom row, right of the buttons there;
panels and open lists take priority over it. */
#warn {
bottom: calc(14px + var(--safe-b));
left: calc(270px + var(--safe-l));
transform: none;
max-width: calc(100vw - 340px);
}
body.history-open #warn,
body.items-open #warn,
body:has(#panel:not([hidden])) #warn,
body:has(#flyout:not([hidden])) #warn {
display: none;
}
}
/* The warning line gives way to panels and open lists on every screen. */
body.history-open #warn,
body.items-open #warn,
body:has(#flyout:not([hidden])) #warn {
display: none;
}
@media (min-width: 721px) and (max-width: 1100px) {
/* Right of the bottom-left buttons. */
#warn {
left: calc(50% + 110px);
max-width: calc(100vw - 460px);
}
}
/* "A newer version is ready" notice. */
.update-banner {
position: fixed;
z-index: 90;
left: 50%;
top: calc(56px + var(--safe-t));
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
max-width: calc(100vw - 24px);
padding: 8px 10px 8px 16px;
border-radius: 14px;
background: var(--chrome-solid);
border: 1px solid var(--accent);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.update-banner[hidden] {
display: none;
}
.numpad button.down {
background: #3d8bff;
}
.numpad {
touch-action: none;
-webkit-user-select: none;
user-select: none;
}
/* --------------- cube zone: four small round buttons at the cube's corners */
.vc-roll {
display: flex;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
z-index: 1;
}
.vc-roll.bottom {
top: auto;
bottom: 0;
}
.vc-roll svg {
width: 20px;
height: 20px;
}
.vc-roll.pivot-btn {
margin: 0;
width: 29px;
height: 29px;
padding: 0;
border: 0;
border-radius: 50%;
background: transparent;
color: var(--muted);
}
.vc-roll.pivot-btn.on,
.vc-roll.pop-open {
color: var(--accent);
background: var(--chrome);
}
body.headset .vc-roll {
width: 39px;
height: 39px;
}
/* The mouse over the cube: its four buttons light up (so they're found), the
one under the pointer brighter still. */
@media (hover: hover) {
.vc-roll {
transition: background 0.12s, color 0.12s;
}
#viewcube:hover .vc-roll {
color: var(--text);
background: var(--chrome);
box-shadow: 0 0 0 1px var(--line);
}
#viewcube:hover .vc-roll:hover {
color: #fff;
background: var(--accent);
box-shadow: none;
}
}
/* ---------- top bar at the top centre, on every device (clear of the corners,
where tablets put their own buttons in fullscreen and the view cube sits) */
body #topbar {
left: 50%;
right: auto !important;
transform: translateX(-50%);
max-width: calc(100vw - 272px);
}
.brand {
width: auto;
margin-right: 4px;
}
.project-name {
flex: 0 1 300px;
width: auto;
min-width: 80px;
}
/* History docked on the right: centred in the space left of it and the view cube. */
body.history-open #topbar {
left: calc((100vw - 384px) / 2);
max-width: calc(100vw - 400px);
}
@media (max-width: 1100px) {
.brand {
display: none;
}
}
@media (max-width: 720px) {
body #topbar,
body.history-open #topbar {
left: 50%;
width: calc(100vw - 16px);
max-width: none;
}
.project-name {
flex: 1 1 auto;
}
/* File / More open at the left edge on phones (like Items), not off the right.
(The bar spans the width, so its left edge is the screen's left gutter.) */
.menu-wrap {
position: static;
}
#file-menu,
#more-menu {
left: 0;
top: 44px;
max-width: calc(100vw - 16px);
}
}
/* Tablets: File / More open from the top bar's left edge too (like phones), so
they drop into the view instead of over History docked on the right. */
html[data-screen="tablet"] .menu-wrap {
position: static;
}
html[data-screen="tablet"] #file-menu,
html[data-screen="tablet"] #more-menu {
left: 0;
top: 44px;
}
@media (max-height: 600px) and (min-width: 721px) {
body #topbar {
max-width: calc(100vw - 380px);
}
body.history-open #topbar {
left: calc((100vw - 318px) / 2);
max-width: calc(100vw - 318px - 380px);
}
}
.brand {
flex: none;
}
@media (max-height: 600px) and (min-width: 721px) {
/* History docked: centred in the space left of it and the view cube. */
body.history-open #topbar {
left: calc((100vw - 436px) / 2);
max-width: calc(100vw - 452px);
}
}
/* Project name: a little wider, shrinking on smaller screens. */
.project-name {
flex: 0 1 360px;
}
/* History: the ! folds out what's wrong. */
.history-warn {
border: 0;
cursor: pointer;
flex: none;
}
.history-warning-text {
flex-basis: 100%;
font-size: 12px;
color: #ffc58a;
padding: 2px 8px 6px 26px;
line-height: 1.4;
}
/* Share button at the right of an export in the File menu. */
#file-menu button {
display: flex;
align-items: center;
gap: 8px;
}
.menu-share {
margin-left: auto;
display: inline-grid;
place-items: center;
width: 30px;
height: 26px;
border-radius: 7px;
color: var(--muted);
flex: none;
}
.menu-share:hover {
color: var(--text);
background: #30343c;
}
.menu-share svg {
width: 17px;
height: 17px;
}
/* Phones upright: the guide text at the bottom, above undo/redo, across the
whole width (not over the panels at the top). */
@media (max-width: 720px) and (orientation: portrait) {
/* As wide as its words (up to a comfortable line), centred - not a band
across the whole screen. */
body #hint {
top: auto;
bottom: calc(122px + var(--safe-b));
left: 50%;
right: auto;
transform: translateX(-50%);
width: max-content;
max-width: min(300px, calc(100vw - 32px - var(--safe-l, 0px) - var(--safe-r, 0px)));
padding: 6px 12px;
border-radius: 10px;
font-size: 12px;
line-height: 1.35;
text-align: center;
z-index: 9;
}
/* The tool panel moves up to make room for it. */
body:has(#hint:not([hidden])) #panel {
bottom: calc(170px + var(--safe-b));
}
}
/* Phones upright, sketching: the sketch tools as a column on the left (like
the other tool lists), with their names until one is picked - then icons only. */
@media (max-width: 720px) and (orientation: portrait) {
body.sketching #toolbar {
flex-direction: column;
top: calc(64px + var(--safe-t));
bottom: calc(118px + var(--safe-b));
left: calc(8px + var(--safe-l));
right: auto;
transform: none;
max-height: none;
height: fit-content;
max-height: calc(100vh - 190px - var(--safe-t) - var(--safe-b));
overflow-x: hidden;
overflow-y: auto;
z-index: 26;
}
body.sketching #toolbar .tool-label {
display: flex;
}
body.sketching.sketch-compact #toolbar .tool-label {
display: none;
}
/* Clear of the guide text when it's showing. */
body.sketching:has(#hint:not([hidden])) #toolbar {
max-height: calc(100vh - 250px - var(--safe-t) - var(--safe-b));
}
}
/* More → Boost / Donate / Support: the ways, indented under it. */
.menu-sub {
display: flex;
flex-direction: column;
padding-left: 12px;
}
.menu-sub[hidden] {
display: none;
}
.menu button.disabled {
opacity: 0.55;
}
/* ------------------------------------------------------------------------
A tool's values as a short list (like a right-click menu), each name with
its box after it - hung under the value box on the model, or by the
pointer. Placed from script (left/top); never the wide bar at the bottom. */
body #panel.as-list {
left: 0;
top: 0;
/* (Phone rules move the old bottom bar up by its bottom edge: not this card.) */
bottom: auto !important;
right: auto !important;
height: auto !important;
transform: none;
flex-direction: column;
flex-wrap: nowrap;
align-items: stretch;
justify-content: flex-start;
gap: 4px;
width: max-content;
min-width: 210px;
max-width: min(320px, calc(100vw - 16px));
max-height: calc(100vh - 70px);
overflow-y: auto;
padding: 6px;
border-radius: 10px;
border: 1px solid rgba(61, 139, 255, 0.45);
background: rgba(31, 33, 37, 0.97);
z-index: 45;
}
#panel.as-list .panel-title {
font-size: 11px;
font-weight: 600;
color: var(--muted);
padding: 2px 6px 0;
text-transform: uppercase;
letter-spacing: 0.04em;
}
#panel.as-list .panel-fields,
#panel.as-list .panel-buttons {
flex-direction: column;
flex-wrap: nowrap;
align-items: stretch;
gap: 2px;
}
#panel.as-list .field {
justify-content: space-between;
gap: 10px;
padding: 2px 4px 2px 6px;
border-radius: 6px;
}
#panel.as-list .field:hover {
background: rgba(255, 255, 255, 0.04);
}
#panel.as-list .field input {
width: 84px;
}
#panel.as-list .choice,
#panel.as-list .slot,
#panel.as-list .toggle,
#panel.as-list .panel-fields > .text-btn,
#panel.as-list .panel-buttons .tool {
width: 100%;
justify-content: flex-start;
}
#panel.as-list .choice {
flex-wrap: wrap;
}
#panel.as-list .choice .field-label {
width: 100%;
padding: 2px 4px;
}
#panel.as-list .panel-buttons {
flex-direction: row;
justify-content: flex-end;
border-top: 1px solid var(--line);
padding-top: 6px;
margin-top: 2px;
}
/* Attached to a value box: that value is in the box, not again in the list. */
#panel.as-list.attached [data-inbox] {
display: none;
}
/* Phones: the tool's options sit in one fixed place, right above the hint
text, across the screen (placed from script). Short, scrolling if long. */
html[data-screen="phone"] body #panel.as-list {
width: max-content;
max-width: min(520px, calc(100vw - 16px));
min-width: 0;
max-height: 38vh;
}
/* The tool's ✕ next to undo/redo (phones, while a tool is on). */
#cancel-dock-btn {
display: none;
}
html[data-screen="phone"] body.tool-cancel-dock #cancel-dock-btn {
display: flex;
}
html[data-screen="phone"] body.tool-cancel-dock #toolbar {
display: none;
}
/* No strip under it any more: the buttons go down to the bottom, the hint with them. */
html[data-screen="phone"] body.tool-cancel-dock #undo-dock {
bottom: calc(8px + var(--safe-b));
}
@media (max-width: 720px) and (orientation: portrait) {
html[data-screen="phone"] body.tool-cancel-dock #hint {
bottom: calc(66px + var(--safe-b));
}
}
/* Phones: the options and Done on one row (✕ beside undo cancels), no title -
the hint under it says what the tool does. Wraps if it can't fit. */
html[data-screen="phone"] body #panel.as-list {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 6px;
}
html[data-screen="phone"] #panel.as-list .panel-title,
html[data-screen="phone"] #panel.as-list .panel-cancel {
display: none;
}
html[data-screen="phone"] #panel.as-list .panel-fields {
flex: 1 1 auto;
flex-direction: row;
flex-wrap: wrap;
min-width: 0;
}
html[data-screen="phone"] #panel.as-list .choice {
width: auto;
flex-wrap: nowrap;
overflow-x: auto;
}
html[data-screen="phone"] #panel.as-list .panel-buttons {
flex-direction: row;
border-top: none;
padding-top: 0;
margin: 0 0 0 auto;
}
html[data-screen="phone"] #panel.as-list .panel-buttons:empty {
display: none;
}
/* ---------- The top bar is one group - app name (or icon), project name, File,
Items, More - always centred at the top, on every screen. It never runs
under the view cube: the space it may use is the same on both sides. */
html body #topbar,
html body.history-open #topbar,
html body.items-open #topbar {
left: 50% !important;
right: auto !important;
transform: translateX(-50%) !important;
width: max-content !important;
max-width: calc(100vw - 2 * 190px) !important;
}
/* The name box: a good width, giving way first when space is short. */
html body #topbar .project-name {
flex: 0 1 auto;
width: 320px;
min-width: 90px;
}
@media (max-width: 720px) {
html body #topbar .project-name {
flex: 1 1 auto;
width: auto;
}
}
/* Phones upright: the view cube is below the bar - the whole width is free. */
@media (max-width: 720px) {
html body #topbar,
html body.history-open #topbar,
html body.items-open #topbar {
max-width: calc(100vw - 16px) !important;
}
}
/* Phones sideways: the cube sits up beside the bar (narrower on each side). */
@media (max-height: 500px) and (min-width: 721px) {
html body #topbar,
html body.history-open #topbar,
html body.items-open #topbar {
max-width: calc(100vw - 2 * 216px) !important;
}
}
.brand-icon {
display: none;
width: 30px;
height: 30px;
border-radius: 7px;
}
/* Smaller screens: just the app's icon instead of its name. */
@media (max-width: 1100px), (max-height: 500px) {
html body .brand,
html body.history-open .brand {
display: flex;
align-items: center;
width: auto;
padding: 0 2px;
margin-right: 2px;
top: 0;
}
.brand-name {
display: none;
}
.brand-icon {
display: block;
}
}
/* Phones sideways with History open: the view cube and its column move left,
into the middle - they start under the top bar there, not beside it. */
@media (max-height: 500px), (max-width: 1100px) {
html body.history-open #viewcube-host {
top: calc(50px + var(--safe-t)) !important;
}
html body.history-open #right-col {
top: calc(52px + var(--safe-t)) !important;
bottom: auto !important;
transform: none !important;
max-height: calc(100vh - 60px - var(--safe-t) - var(--safe-b));
overflow-y: auto;
}
}
/* The numpad's grip: drag it to move the numpad (it stays there). */
.numpad .np-grip {
grid-column: 1 / -1;
height: 18px;
margin: -4px 0 0;
display: grid;
place-items: center;
cursor: grab;
touch-action: none;
}
.numpad .np-grip span {
width: 36px;
height: 4px;
border-radius: 2px;
background: var(--muted);
opacity: 0.6;
}
.numpad .np-grip:active {
cursor: grabbing;
}
/* Phones: keys the size of the tool buttons (40 px). */
html[data-screen="phone"] .numpad {
grid-template-columns: repeat(4, 40px);
gap: 4px;
padding: 6px;
border-radius: 12px;
}
html[data-screen="phone"] .numpad button {
height: 40px;
border-radius: 8px;
font-size: 17px;
}
html[data-screen="phone"] .numpad .np-enter {
height: auto;
}
html[data-screen="phone"] .numpad .np-grip {
height: 16px;
margin-top: -2px;
}
/* Phones upright, sketching: the tools are a column on the left, so the row
of buttons along the bottom drops into the strip's place (no empty band),
the hint with it. */
@media (max-width: 720px) and (orientation: portrait) {
html body.sketching #undo-dock,
html body.sketching #bottom-left {
bottom: calc(8px + var(--safe-b));
}
html body.sketching #hint {
bottom: calc(66px + var(--safe-b));
}
html body.sketching #toolbar {
bottom: calc(62px + var(--safe-b));
max-height: calc(100vh - 134px - var(--safe-t) - var(--safe-b));
}
html body.sketching:has(#hint:not([hidden])) #toolbar {
max-height: calc(100vh - 134px - var(--hint-h, 63px) - var(--safe-t) - var(--safe-b));
}
}
/* Full screen on phones: the browser's bars are gone, so the edges come in -
a little margin left for rounded screen corners, and at the top for the
camera (that's what the top inset is). */
html[data-screen="phone"] body.is-fullscreen {
--safe-b: 4px;
--safe-t: max(0px, calc(env(safe-area-inset-top, 0px) - 14px));
}
/* Full screen on tablets (or opened from the home screen): the same - the home
bar's inset left an empty strip along the bottom. */
@media (pointer: coarse) {
html[data-screen="tablet"] body.is-fullscreen {
--safe-b: 4px;
}
}
@media (pointer: coarse) and (display-mode: standalone), (pointer: coarse) and (display-mode: fullscreen) {
html[data-screen="tablet"] body {
--safe-b: 4px;
}
}
/* "Use the whole screen?" and "Update available": one short line with its button. */
.compact-banner {
flex-wrap: nowrap;
white-space: nowrap;
gap: 6px;
padding: 4px 4px 4px 12px;
border-radius: 10px;
font-size: 12.5px;
}
/* Compact: small buttons, the question in a quieter colour. */
.compact-banner > span {
color: var(--muted);
margin-right: 2px;
}
.compact-banner .text-btn {
min-height: 28px;
padding: 0 10px;
border-radius: 7px;
font-size: 12.5px;
}
@media (pointer: coarse) {
.compact-banner .text-btn {
min-height: 32px;
}
}
/* Small phones (320 px): still one line, a little tighter. */
@media (max-width: 360px) {
.compact-banner {
gap: 4px;
padding-left: 10px;
}
.compact-banner > span,
.compact-banner .text-btn {
font-size: 12px;
}
.compact-banner .text-btn {
padding: 0 8px;
}
}
/* The card's grip (like the numpad's): drag it to move the card. */
#panel .panel-grip {
flex: 0 0 100%;
align-self: stretch;
height: 14px;
margin: -4px 0 -2px;
display: grid;
place-items: center;
cursor: grab;
touch-action: none;
}
#panel .panel-grip span {
width: 32px;
height: 4px;
border-radius: 2px;
background: var(--muted);
opacity: 0.55;
}
#panel .panel-grip:active {
cursor: grabbing;
}
/* Folded (double-tap on the grip): just the grip and the window's name. */
#panel.folded > :not(.panel-grip):not(.panel-title) {
display: none !important;
}
/* No scroll bars inside the windows: a thin one shows outside the window's
edge while it scrolls (ui/scrollbars.ts), then fades. */
* {
scrollbar-width: none;
}
*::-webkit-scrollbar {
display: none;
}
.outer-scroll {
position: fixed;
z-index: 95;
border-radius: 3px;
background: rgba(200, 210, 230, 0.55);
opacity: 0;
transition: opacity 0.25s;
touch-action: none;
}
.outer-scroll[hidden] {
display: none;
}
.outer-scroll.on {
opacity: 1;
}
/* Easier to grab with a mouse. */
@media (pointer: fine) {
.outer-scroll.v {
margin-left: -2px;
border-left: 2px solid transparent;
border-right: 2px solid transparent;
background-clip: padding-box;
box-sizing: content-box;
}
}
/* Constraint marks (H, V, ∥, ⟂, ●…): just the symbol, small and faint, in the
background - they never cover or catch a tap meant for the drawing (the
sketch picks one when a tap finds nothing else). Dimensions keep their box. */
.cglyph:not(.dim) {
pointer-events: none;
min-width: 0;
height: 14px;
padding: 0 1px;
font-size: 10px;
line-height: 14px;
font-weight: 600;
color: rgba(150, 190, 255, 0.55);
background: none;
border: 0;
text-shadow: 0 0 3px rgba(20, 22, 26, 0.9);
}
.cglyph.sel:not(.dim) {
color: #ffd34d;
box-shadow: none;
}
/* Constraint marks: one colour per kind, so they're told apart at a glance
(still faint - they stay in the background). */
.cglyph:not(.dim)[data-type="horizontal"],
.cglyph:not(.dim)[data-type="vertical"] { color: rgba(255, 196, 90, 0.75); }
.cglyph:not(.dim)[data-type="parallel"] { color: rgba(110, 200, 255, 0.8); }
.cglyph:not(.dim)[data-type="perpendicular"] { color: rgba(130, 230, 160, 0.8); }
.cglyph:not(.dim)[data-type="coincident"] { color: rgba(235, 235, 245, 0.7); }
.cglyph:not(.dim)[data-type="tangent"] { color: rgba(255, 140, 200, 0.8); }
.cglyph:not(.dim)[data-type="equal"] { color: rgba(190, 160, 255, 0.85); }
.cglyph:not(.dim)[data-type="midpoint"] { color: rgba(255, 150, 120, 0.8); }
.cglyph:not(.dim)[data-type="concentric"] { color: rgba(120, 230, 230, 0.8); }
.cglyph:not(.dim)[data-type="symmetric"] { color: rgba(240, 230, 120, 0.8); }
.cglyph:not(.dim)[data-type="fix"] { color: rgba(255, 110, 100, 0.8); }
.cglyph.sel:not(.dim) { color: #ffd34d !important; text-decoration: underline; }
/* History groups: a folder row, its steps indented under it. */
#history .history-head {
gap: 6px;
}
#history .history-head > span {
flex: 1;
}
.history-group .history-name {
display: flex;
align-items: center;
gap: 6px;
font-weight: 600;
}
.history-group .history-name svg {
width: 16px;
height: 16px;
flex: none;
}
.history-count {
color: var(--muted);
font-weight: 500;
font-size: 12px;
}
.history-item.in-group {
padding-left: 22px;
}
.history-item.checked {
background: var(--accent-soft);
}
/* Phones: value fields side by side and small - name, a short box, the
unit - so three of them (ΔX ΔY ΔZ) and Done fit on one or two rows. */
html[data-screen="phone"] #panel.as-list .field {
flex: 0 0 auto;
gap: 3px;
padding: 0 2px;
}
html[data-screen="phone"] #panel.as-list .field input {
width: 58px;
height: 34px;
padding: 0 6px;
font-size: 15px;
}
/* Long values (-123.45) widen their box rather than hide digits, where the browser can. */
@supports (field-sizing: content) {
html[data-screen="phone"] #panel.as-list .field input {
field-sizing: content;
width: auto;
min-width: 58px;
max-width: 92px;
}
}
html[data-screen="phone"] #panel.as-list .field-label {
font-size: 12px;
}
html[data-screen="phone"] #panel.as-list .field-unit {
font-size: 11px;
margin-left: -1px;
}
html[data-screen="phone"] #panel.as-list .fx-btn {
min-width: 0;
width: 20px;
padding: 0;
font-size: 12px;
}
html[data-screen="phone"] #panel.as-list .panel-buttons .tool,
html[data-screen="phone"] #panel.as-list .panel-buttons .text-btn {
min-height: 34px;
}
/* Phones: nothing in the card wider than it needs. The unit is the one in
the right column (mm…), ƒx is on the numpad - so a value is its name and box. */
html[data-screen="phone"] #panel.as-list .field-unit,
html[data-screen="phone"] #panel.as-list .fx-btn {
display: none;
}
/* Picks (From point, To point…) as small chips: the name, and what's picked
only once it's picked - what to tap is in the hint text under the card. */
html[data-screen="phone"] #panel.as-list .slot {
width: auto !important;
flex: 0 0 auto;
min-height: 34px;
padding: 2px 8px;
justify-content: center;
}
html[data-screen="phone"] #panel.as-list .slot:not(.filled) .slot-value {
display: none;
}
html[data-screen="phone"] #panel.as-list .slot-label {
font-size: 12px;
color: var(--text);
}
html[data-screen="phone"] #panel.as-list .slot.filled .slot-label {
font-size: 10px;
color: var(--muted);
}
html[data-screen="phone"] #panel.as-list .slot-value {
font-size: 12px;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
html[data-screen="phone"] #panel.as-list .toggle,
html[data-screen="phone"] #panel.as-list .panel-fields > .text-btn {
width: auto !important;
flex: 0 0 auto;
min-height: 34px;
}
html[data-screen="phone"] body #panel.as-list .panel-fields {
flex: 0 1 auto;
}
/* Phones: fields and buttons flow together, so Done sits at the end of the
last row instead of a row of its own. */
html[data-screen="phone"] body #panel.as-list .panel-fields,
html[data-screen="phone"] body #panel.as-list .panel-buttons {
display: contents;
}
html[data-screen="phone"] body #panel.as-list .panel-buttons > :first-child {
margin-left: auto;
}
/* Card sliders (Freeform's Bend, Taper, Arch…): a full row, easy to drag with a thumb. */
#panel .slider-field {
flex: 1 1 100%;
display: flex;
align-items: center;
gap: 8px;
}
#panel .slider-field .field-label {
flex: 0 0 auto;
min-width: 52px;
}
#panel .slider-field input[type="range"] {
flex: 1 1 auto;
min-width: 0;
height: 28px;
accent-color: #3d8bff;
}
#panel .slider-field .slider-value {
flex: 0 0 auto;
min-width: 48px;
text-align: right;
font-variant-numeric: tabular-nums;
opacity: 0.85;
}
/* ---- Tablets and up (not short screens): Items as tall as History, the view
cube below the top bar (it sat beside Items / More), Working… under the hint. */
@media (min-width: 721px) and (min-height: 501px) {
#items {
top: calc(8px + var(--safe-t));
}
#viewcube-host,
html body.history-open #viewcube-host {
top: calc(56px + var(--safe-t)) !important;
}
}
/* Tablets upright with History open: the column moves up beside History, so
the view cube goes left of it (it sat half under the column). */
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 501px) {
html body.history-open #viewcube-host {
right: calc(318px + var(--safe-r));
}
}
@media (min-width: 721px) and (min-height: 501px) {
/* Items open: the bar centres in the room right of it (it overlapped Items on a tablet). */
html body.items-open #topbar {
left: calc(274px + (100vw - 274px - 8px) / 2) !important;
max-width: calc(100vw - 290px) !important;
}
html body.items-open.history-open #topbar {
left: calc(274px + (100vw - 274px - 266px) / 2) !important;
max-width: calc(100vw - 548px) !important;
}
/* History open alone: the bar centres in the room left of it (it ran under History). */
html body.history-open:not(.items-open) #topbar {
left: calc(8px + (100vw - 8px - 266px) / 2) !important;
max-width: calc(100vw - 290px) !important;
}
}
/* Working… sits below the hint line (they overlapped at the top). */
#busy {
top: calc(112px + var(--safe-t));
}
@media (max-width: 720px) {
#busy {
top: calc(124px + var(--safe-t));
}
}
/* Items: a kind's heading folds it away. */
.items-category {
padding: 4px 2px 0;
}
.items-category-btn {
all: unset;
box-sizing: border-box;
width: 100%;
padding: 4px 6px;
border-radius: 6px;
font-size: 11.5px;
color: var(--muted);
cursor: pointer;
}
.items-category-btn:hover {
background: var(--hover, rgba(255, 255, 255, 0.06));
color: var(--text);
}
/* Value boxes scrub left / right with a press and drag, selected or not; a formula is text. */
@media (pointer: fine) {
input[data-scrub] {
cursor: ew-resize;
}
input[data-scrub].scrub-off {
cursor: text;
}
}
input.scrubbing {
cursor: ew-resize;
user-select: none;
}
/* A drag's value box by the pointer (gimbals, scale handles). */
.dim-widget.float-value {
transform: none;
}
/* Subtract / Intersect: + on the body changed, − on the ones it's changed with. */
.bool-mark {
position: fixed;
left: 0;
top: 0;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font: 700 20px/1 system-ui, sans-serif;
color: #fff;
background: #2f9e57;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
pointer-events: none;
z-index: 30;
}
.bool-mark.minus {
background: #d9534f;
}
/* The sign as two bars (a font's + and − sit on its baseline, off the middle). */
.bool-mark::before,
.bool-mark::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
width: 14px;
height: 3px;
border-radius: 2px;
background: currentColor;
transform: translate(-50%, -50%);
}
.bool-mark::after {
transform: translate(-50%, -50%) rotate(90deg);
}
.bool-mark.minus::after {
display: none;
}
.bool-mark[hidden] {
display: none;
}
/* Cards as compact as they can be with a mouse (touch keeps finger-sized targets). */
@media (pointer: fine) {
#panel {
gap: 6px;
padding: 6px 6px 6px 10px;
}
.panel-fields,
.panel-buttons {
gap: 5px;
}
.field input,
#panel .text-input {
min-height: 30px;
width: 84px;
}
.slot {
min-height: 32px;
padding: 2px 8px;
}
.choice button {
padding: 5px 8px;
}
.toggle {
padding: 6px 10px;
}
#panel .tool {
min-height: 30px;
}
#panel .text-btn {
padding-top: 5px;
padding-bottom: 5px;
}
}
/* A card's sections apart with a dim line: its values, its own actions, Cancel / Done. */
.panel-actions {
display: flex;
flex-wrap: wrap;
gap: 5px;
align-items: center;
}
#panel:not(.as-list) .panel-actions,
#panel:not(.as-list) .panel-fields + .panel-buttons,
#panel:not(.as-list) .panel-actions + .panel-buttons {
border-top: 1px solid var(--line);
padding-top: 6px;
width: 100%;
}
.panel-actions .text-btn svg {
width: 16px;
height: 16px;
}
/* Delete buttons after one tap (ui.ts twoTap): red - a second tap deletes. */
.icon-btn.armed,
.text-btn.armed,
.tool.armed,
.icon-btn.armed:hover:not(:disabled),
.text-btn.armed:hover:not(:disabled),
.tool.armed:hover {
color: #fff;
background: var(--danger);
}
.tool.armed .tool-sub,
.tool.armed kbd {
color: #fff;
}
/* Text for search engines and screen readers only (index.html: what the app is). */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}