/* Hugging Space — quiet, system-native UI: the canvas is the product, the chrome stays out of the way. One floating toolbar for everyday controls; everything else lives one level deeper in "Advanced tweaking". */ :root { --bg: #f7f7f5; --surface: #ffffff; --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #a1a1a6; --hairline: rgba(0, 0, 0, 0.08); --fill: rgba(0, 0, 0, 0.05); --fill-strong: rgba(0, 0, 0, 0.08); --accent: #ff9d00; /* Huggy's orange, used only for focus and small marks */ --glass: rgba(255, 255, 255, 0.72); --shadow-float: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08); --radius: 12px; --ease: cubic-bezier(0.32, 0.72, 0, 1); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } * { box-sizing: border-box; } html, body { overscroll-behavior: none; } body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; -webkit-tap-highlight-color: transparent; } button, label, select { touch-action: manipulation; } [hidden] { display: none !important; } button, input, select { font: inherit; color: inherit; } :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; } /* ---- Header ---- */ .bar { height: calc(56px + env(safe-area-inset-top)); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: env(safe-area-inset-top) calc(16px + env(safe-area-inset-right)) 0 calc(20px + env(safe-area-inset-left)); position: relative; z-index: 10; } .brand { display: flex; align-items: center; gap: 10px; min-width: 0; } .brand-mark { flex: none; width: 22px; height: 22px; fill: #ef4444; /* the heart Huggy shows when hugging */ } .brand h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; } .actions { display: flex; align-items: center; gap: 8px; } /* ---- Buttons ---- */ .btn { appearance: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; user-select: none; transition: background 160ms ease, transform 120ms ease; } .btn:hover { background: var(--fill-strong); } .btn:active { transform: scale(0.97); } .btn.primary { background: var(--ink); color: #fff; } .btn.primary:hover { background: #000; } /* Export: a rounded rectangle (its menu's corners echo it) rather than a pill. */ #exportBtn { border-radius: 10px; } .btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--fill); } .btn.small { height: 30px; padding: 0 12px; font-size: 13px; } .btn .chevron { width: 14px; height: 14px; margin-right: -4px; opacity: 0.7; } .icon-btn { appearance: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background 160ms ease, color 160ms ease, transform 120ms ease; } .icon-btn:hover { background: var(--fill); color: var(--ink); } /* Nothing to do: dimmed and inert (no hover / press feedback). */ .icon-btn:disabled, .btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; } .icon-btn:active { transform: scale(0.94); } /* ---- Export menu ---- */ .menu-anchor { position: relative; } .menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-float); transform-origin: top right; animation: pop-in 180ms var(--ease); } .menu-item { appearance: none; width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; } .menu-item:hover, .menu-item:focus-visible { background: var(--fill); outline: none; } .menu-note { font-size: 12px; font-weight: 400; color: var(--ink-2); } @keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } } /* ---- Stage ---- */ .stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--bg); } .stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; } #logoLayer { cursor: grab; } #logoLayer.dragging { cursor: grabbing; } /* ---- Upload / drop overlay ---- The frosted, dashed panel over the stage. Shown on landing (.stage.welcome) and while a file is dragged over the stage (.stage.dragover). */ .drop { position: absolute; inset: 12px; z-index: 6; display: flex; align-items: center; justify-content: center; /* The stack sits a little above centre (optically centred over the toolbar below). */ padding-bottom: clamp(40px, 9vh, 84px); border-radius: 20px; overflow: hidden; font-size: 15px; font-weight: 500; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 240ms ease, visibility 0s linear 240ms; } .stage.welcome .drop, .stage.dragover .drop { opacity: 1; visibility: visible; transition: opacity 160ms ease, visibility 0s; } .stage.welcome .drop { pointer-events: auto; } /* Progressive blur with a clear difference between edge and centre. The first layer is the frosted, dashed panel with only a touch of blur (1.5 px), so the stage is nearly sharp at the edges. Each next layer adds more (4, 6, 8 px) and is masked to a smaller oval, so the blur builds to about 11 px behind the prompt. (Siblings, not nested: a backdrop-filter inside another one can't see the page.) */ .drop-blur { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; } .drop-blur:nth-child(1) { border: 1.5px dashed rgba(0, 0, 0, 0.18); background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); } .drop-blur:nth-child(2) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); -webkit-mask-image: radial-gradient(ellipse 72% 72% at center, #000 35%, transparent 100%); mask-image: radial-gradient(ellipse 72% 72% at center, #000 35%, transparent 100%); } .drop-blur:nth-child(3) { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); -webkit-mask-image: radial-gradient(ellipse 52% 52% at center, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 52% 52% at center, #000 30%, transparent 100%); } .drop-blur:nth-child(4) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); -webkit-mask-image: radial-gradient(ellipse 34% 34% at center, #000 25%, transparent 100%); mask-image: radial-gradient(ellipse 34% 34% at center, #000 25%, transparent 100%); } /* The prompt (icon and black text, no container), "or", then the way to the examples. */ .drop-row { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; /* with line-height 1 below, the same clear space above and below "or" */ padding: 0 16px; text-align: center; line-height: 1; } /* The demo loop above the prompt: a rounded card with a soft, layered shadow. */ .drop-video { width: min(100%, 460px); margin-bottom: 14px; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 14px rgba(0, 0, 0, 0.06), 0 24px 54px rgba(0, 0, 0, 0.13); } .drop-video video { display: block; width: 100%; height: 100%; object-fit: cover; } .drop-prompt { appearance: none; display: inline-flex; align-items: center; gap: 8px; /* a comfortable hit area that doesn't add to the spacing */ padding: 10px 12px; margin: -10px -12px; border: 0; border-radius: 12px; background: none; color: #000; font: inherit; font-weight: 600; line-height: 1; cursor: pointer; transition: transform 140ms var(--ease); } .drop-prompt .icon { flex: none; width: 18px; height: 18px; stroke-width: 1.8; } .drop-prompt:hover { transform: translateY(-1px); } .drop-or { /* "or" has no tall letters, so it sits high in its line: 3 px evens the space under it */ margin-bottom: 3px; color: var(--ink-2); /* lighter than the prompt and the button: it only joins them */ font-weight: 400; } .drop-example { appearance: none; height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: #000; color: #fff; font: inherit; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16), 0 8px 22px rgba(0, 0, 0, 0.18); transition: transform 140ms var(--ease), background 160ms ease; } .drop-example:hover { background: #2a2a2c; } .drop-prompt:active, .drop-example:active { transform: scale(0.97); } .drop-prompt:focus-visible, .drop-example:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; } /* A file is over the stage: the prompt answers (a small lift, the icon in Huggy's orange). */ .stage.dragover .drop-prompt { transform: scale(1.06); } .stage.dragover .drop-prompt .icon { color: var(--accent); } /* Dragging a file in after the welcome is gone: just the prompt. */ .stage.dragover:not(.welcome) .drop-example, .stage.dragover:not(.welcome) .drop-or, .stage.dragover:not(.welcome) .drop-video { display: none; } /* Short windows: the prompt matters more than the demo. */ @media (max-height: 560px) { .drop-video { display: none; } } /* ---- Floating toolbar ---- */ .dock { position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 5; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: calc(100% - 24px); } .hint { margin: 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; transition: opacity 400ms ease; } .hint.gone { opacity: 0; } .toolbar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--shadow-float); } .divider { width: 1px; height: 18px; margin: 0 4px; background: var(--hairline); flex: none; } .chips { display: flex; gap: 2px; } .chip { appearance: none; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-2); text-transform: capitalize; white-space: nowrap; cursor: pointer; transition: background 160ms ease, color 160ms ease, transform 120ms ease; } .chip:hover { color: var(--ink); background: var(--fill); } .chip:active { transform: scale(0.96); } .chip[aria-pressed='true'] { color: var(--ink); background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.08); } .mini { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; } .mini input[type='range'] { width: 92px; } .mini #size { width: 132px; /* its 44 px handle box still leaves ~88 px of travel */ /* The track starts half a handle box in; pull it toward its label so the smallest figure sits as far from "Size" as the rotate knob does from "Rotate". */ margin-left: calc(var(--ts-min, 16px) / 2 - var(--tb) / 2); } /* ---- Range sliders (thin track, white knob) ---- */ input[type='range'] { -webkit-appearance: none; appearance: none; height: 20px; margin: 0; background: transparent; cursor: pointer; } input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: var(--fill-strong); } input[type='range']::-moz-range-track { height: 4px; border-radius: 999px; background: var(--fill-strong); } input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 120ms ease; } input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.2); } input[type='range']:active::-webkit-slider-thumb { transform: scale(1.12); } /* ---- Size slider: the handle is a person that grows with the value ---- ui.ts sets --ts (handle size, px) and --thumb (the figure, drawn with a constant 2 px white outline and a 1 px, 0-blur shadow ring at any size) on the usual thin track. The input stays ≥ 36 px tall, so even the smallest figure is easy to grab. */ #size { --ts: 24px; /* the figure's size (set by ui.ts) */ --tb: 44px; /* the handle's constant box (≥ the largest figure): steady grab area, constant travel */ height: var(--tb); } /* The line spans exactly the handle's travel (centre to centre), so the person reaches its end. */ #size::-webkit-slider-runnable-track { background: linear-gradient(var(--fill-strong), var(--fill-strong)) center / calc(100% - var(--tb)) 100% no-repeat; } #size::-moz-range-track { background: linear-gradient(var(--fill-strong), var(--fill-strong)) center / calc(100% - var(--tb)) 100% no-repeat; } #size::-webkit-slider-thumb { width: var(--tb); height: var(--tb); margin-top: calc((4px - var(--tb)) / 2); border-radius: 0; background: var(--thumb) center / var(--ts) var(--ts) no-repeat; box-shadow: none; cursor: grab; } #size::-moz-range-thumb { width: var(--tb); height: var(--tb); border-radius: 0; background: var(--thumb) center / var(--ts) var(--ts) no-repeat; box-shadow: none; cursor: grab; } #size:active::-webkit-slider-thumb { cursor: grabbing; transform: none; } /* ---- Rotate slider: a dial knob whose indicator turns with the angle; tick at 0° ---- */ #rotation { height: 30px; } #rotation::-webkit-slider-runnable-track { background: linear-gradient(var(--ink-3), var(--ink-3)) center / 1.5px 100% no-repeat, var(--fill-strong); } #rotation::-moz-range-track { background: linear-gradient(var(--ink-3), var(--ink-3)) center / 1.5px 100% no-repeat, var(--fill-strong); } #rotation::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -8px; background: var(--thumb) center / contain no-repeat, #fff; } #rotation::-moz-range-thumb { width: 20px; height: 20px; background: var(--thumb) center / contain no-repeat, #fff; } /* "Examples:" label in front of the sample logos */ .examples { display: flex; align-items: center; gap: 4px; } .toolbar-label { padding: 0 4px 0 10px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; } /* ---- Toolbar groups: inline on wide screens, dropdowns when space is tight ---- */ .toolbar { position: relative; flex-wrap: nowrap; } .tgroup { position: relative; display: flex; align-items: center; } .tg-panel { display: flex; align-items: center; gap: 6px; } .tg-btn, .vsliders, .reset-label { display: none; } /* Dropdown groups (Examples always; Adjust when space is tight): a button that opens its controls in a popover above it. */ .tgroup.dropdown .tg-btn { display: inline-flex; } .toolbar.compact .divider { display: none; } .tgroup.dropdown .tg-panel { display: none; position: absolute; bottom: calc(100% + 14px); left: 50%; z-index: 8; translate: -50% 0; padding: 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-float); transform-origin: bottom center; animation: pop-up 200ms var(--ease); } .tgroup.dropdown.open .tg-panel { display: flex; } .tgroup.dropdown.open .tg-btn { background: var(--fill-strong); } .tgroup.dropdown .tg-btn .chevron { transition: transform 200ms var(--ease); } .tgroup.dropdown.open .tg-btn .chevron { transform: rotate(180deg); } @keyframes pop-up { from { opacity: 0; transform: scale(0.96) translateY(6px); } } /* Examples button: "Examples: " */ .tg-name { color: var(--ink-3); font-weight: 400; } .tg-current { text-transform: capitalize; } /* Examples popover: a vertical list with its label as the title. */ .tgroup.dropdown .examples { flex-direction: column; align-items: stretch; min-width: 168px; } .tgroup.dropdown .examples .toolbar-label { padding: 2px 8px 6px; } .tgroup.dropdown .chips { flex-direction: column; gap: 2px; } .tgroup.dropdown .chip { height: 38px; padding: 0 12px; text-align: left; border-radius: 10px; } .tgroup.dropdown .chip[aria-pressed='true'] { background: var(--fill); box-shadow: none; } /* Adjust popover: tall vertical sliders (Control Center style) and Reset. */ .tgroup.dropdown .adjust { flex-direction: column; gap: 10px; padding: 14px 14px 10px; } .tgroup.dropdown .adjust .mini { display: none; } .tgroup.dropdown .vsliders { display: flex; gap: 14px; } .dock:has(.tgroup.open) .hint, .sheet-open .hint { opacity: 0; } .tgroup.dropdown #reset { display: inline-flex; align-items: center; width: auto; height: 32px; padding: 0 12px; gap: 6px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); } .tgroup.dropdown .reset-label { display: inline; } .vs { display: flex; flex-direction: column; align-items: center; gap: 6px; outline: none; touch-action: none; user-select: none; } .vs-track { position: relative; width: 56px; height: 148px; border-radius: 18px; background: var(--fill-strong); overflow: hidden; cursor: ns-resize; } .vs-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: var(--ink); } .vs-figure { position: absolute; left: 50%; bottom: var(--fill, 50%); width: var(--ts, 24px); height: var(--ts, 24px); translate: -50% 50%; background: var(--thumb) center / contain no-repeat; pointer-events: none; } .vs:focus-visible .vs-track { box-shadow: 0 0 0 2px var(--accent); } .vs-label { font-size: 12.5px; font-weight: 500; } .vs-value { margin-top: -4px; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; } /* ---- Toast ---- */ .toast { position: absolute; left: 50%; top: 12px; z-index: 7; margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(29, 29, 31, 0.88); color: #fff; font-size: 13px; transform: translateX(-50%); box-shadow: var(--shadow-float); animation: pop-in 180ms var(--ease); } .toast:empty { display: none; } /* ---- Advanced sheet ---- */ .sheet { position: fixed; top: 64px; right: 12px; bottom: 12px; z-index: 20; width: 340px; display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-float); transition: transform 420ms var(--ease), box-shadow 420ms var(--ease); } /* Collapsed: slid off the right edge, only its grabber peeks out. */ .sheet.collapsed { transform: translateX(calc(100% + 12px)); box-shadow: none; } .sheet.dragging { transition: none; } /* iOS-style grabber: a vertical pill on the sheet's left edge (horizontal on small screens). */ .sheet-handle { appearance: none; position: absolute; top: 50%; left: -22px; width: 22px; height: 88px; margin-top: -44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; } .sheet.dragging .sheet-handle { cursor: grabbing; } .grabber { width: 5px; height: 40px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); transition: background 160ms ease, transform 160ms ease; } .sheet-handle:hover .grabber { background: rgba(0, 0, 0, 0.32); } .sheet-handle:active .grabber { transform: scaleY(0.9); } .sheet-handle:focus-visible { outline: none; } .sheet-handle:focus-visible .grabber { background: var(--accent); } .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; } .sheet-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; } .sheet-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; } .section { padding: 14px 0; border-top: 1px solid var(--hairline); } .section:first-child { border-top: 0; } .section h3, .tuner h2 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-2); } .note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); } .select { width: 100%; height: 34px; padding: 0 32px 0 12px; border: 0; border-radius: 10px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; -webkit-appearance: none; appearance: none; font-size: 13.5px; font-weight: 500; cursor: pointer; } /* iOS-style switch */ .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; cursor: pointer; } .switch { -webkit-appearance: none; appearance: none; position: relative; width: 36px; height: 22px; margin: 0; flex: none; border-radius: 999px; background: var(--fill-strong); cursor: pointer; transition: background 200ms ease; } .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 220ms var(--ease); } .switch:checked { background: #34c759; } .switch:checked::after { transform: translateX(14px); } /* Tuning panel (built by tuner.ts) */ .tuner .tune-group { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink); } .tune-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin-bottom: 10px; font-size: 13px; cursor: default; } .tune-row input[type='range'] { grid-column: 1 / -1; width: 100%; } .tune-row output { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); cursor: pointer; user-select: none; } .tuner > .btn { margin-top: 6px; } .tune-record { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; } .tune-note { height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill); font-size: 13px; } .tune-record .btn { justify-content: center; } .tune-list { display: flex; flex-direction: column; gap: 8px; } .tune-list .hint { white-space: normal; } .tune-item { padding: 10px 12px; border-radius: 12px; background: var(--fill); font-size: 12.5px; } .tune-item-head { display: flex; justify-content: space-between; gap: 8px; text-transform: capitalize; } .tune-when { color: var(--ink-2); text-transform: none; font-variant-numeric: tabular-nums; } .tune-note-text { margin-top: 2px; } .tune-note-text:empty { display: none; } .tune-summary { margin-top: 4px; line-height: 1.4; color: var(--ink-2); } .tune-item-actions, .tune-export { display: flex; gap: 6px; margin-top: 8px; } .tune-item .btn { background: #fff; } .tune-flash { min-height: 1em; margin: 8px 0 0; font-size: 12.5px; color: #248a3d; } /* ---- Draggable hands ---- */ #rightHand, #leftHand { cursor: grab; transition: opacity 180ms ease; } #rightHand.dragging, #leftHand.dragging { cursor: grabbing; } /* Even-width solid outline (0 blur) on hover / drag; hidden (opacity 0) otherwise and in exports. */ #rightHand:hover .hand-halo, #leftHand:hover .hand-halo, #rightHand.dragging .hand-halo, #leftHand.dragging .hand-halo { opacity: 0.12; } .magnet { position: absolute; z-index: 3; width: 28px; height: 28px; /* 2px of room around the 24px icon */ margin: -14px 0 0 -14px; /* positioned by its centre */ display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08); cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease; animation: magnet-in 160ms var(--ease); } .magnet:hover { transform: scale(1.08); } .magnet:active { transform: scale(0.94); } .magnet[hidden] { display: none; } @keyframes magnet-in { from { opacity: 0; transform: scale(0.6); } } /* Invisible safe hover zone between a pinned hand and its magnet button (shown with debug). */ .magnet-safe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; } .magnet-safe polygon { fill: transparent; pointer-events: none; } .magnet-safe polygon.armed { pointer-events: all; } .show-debug .magnet-safe polygon { fill: rgba(255, 157, 0, 0.12); stroke: rgba(255, 157, 0, 0.6); stroke-dasharray: 4 3; } /* Touch: comfortable targets (≥ 36 px tall, bigger slider knobs). */ @media (pointer: coarse) { .btn { height: 40px; } .btn.small { height: 36px; } .chip { height: 36px; padding: 0 13px; } .icon-btn { width: 36px; height: 36px; } .menu-item { padding: 13px 14px; } input[type='range'] { height: 30px; } input[type='range']::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; } input[type='range']::-moz-range-thumb { width: 22px; height: 22px; } #size { --tb: 48px; --ts-min: 20px; /* smallest figure on touch (ui.ts personRange) */ } #rotation::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -10px; } #rotation::-moz-range-thumb { width: 24px; height: 24px; } .tune-row { margin-bottom: 14px; } .select, .tune-note { height: 40px; } } /* Short screens (phones in landscape): slimmer chrome, no hint. */ @media (max-height: 520px) { .bar { height: calc(46px + env(safe-area-inset-top)); } .hint { display: none; } .dock { bottom: calc(10px + env(safe-area-inset-bottom)); } .sheet { top: calc(52px + env(safe-area-inset-top)); } } /* Pill toolbar: even 6 px padding all round. Its buttons are as tall as the bar's inside (36 px), so a hovered first / last item sits concentric with the pill's ends; the Size slider's larger handle box overhangs instead of making the bar taller. */ .toolbar { --bar-item: 36px; } .toolbar > .tgroup > .tg-btn, .toolbar > #advancedBtn { height: var(--bar-item); padding: 0 14px; } .toolbar #reset:not(.tgroup.dropdown #reset) { width: var(--bar-item); height: var(--bar-item); } .mini #size { margin-block: calc((var(--bar-item) - var(--tb)) / 2); } /* While the sheet is open, keep the toolbar centred in the space left of it. */ .dock { transition: left 320ms var(--ease); } .sheet-open .dock { left: calc((100% - 364px) / 2); max-width: calc(100% - 388px); } .btn.ghost.active { background: var(--fill-strong); } /* Hint text for mouse vs touch */ .for-touch { display: none; } @media (hover: none) { .for-pointer { display: none; } .for-touch { display: inline; } } /* ---- Small screens: toolbar wraps to two rows, the sheet comes up from the bottom ---- */ @media (max-width: 760px) { .brand h1 { font-size: 14px; } .actions .btn.ghost span { display: none; } .bar { gap: 8px; padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(10px + env(safe-area-inset-right)); } .dock, .sheet-open .dock { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; max-width: none; align-items: center; } .hint { white-space: normal; text-align: center; } .toolbar { justify-content: center; } .sheet { top: auto; left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 78dvh; } .sheet-body { padding-bottom: 28px; } .toast { max-width: calc(100% - 32px); white-space: normal; text-align: center; } .sheet.collapsed { transform: translateY(calc(100% + 16px)); } .sheet-handle { position: static; width: 100%; height: 22px; margin: 0; flex: none; } .grabber { width: 36px; height: 5px; } .sheet-head { padding-top: 2px; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } } @media (prefers-reduced-transparency: reduce) { .toolbar, .menu, .sheet { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } .drop-blur { backdrop-filter: none; -webkit-backdrop-filter: none; } .drop-blur:nth-child(1) { background: rgba(255, 255, 255, 0.94); } }