@font-face {
  font-family: "geogeo-Regular";
  src: url("./fonts/geogeoVF.ttf") format("truetype");
  font-weight: 250 700;
  font-variation-settings: "wdth" 630;
  font-display: swap;
}

@font-face {
  font-family: "geogeoVF";
  src: url("./fonts/geogeoVF.ttf") format("truetype");
  font-weight: 250 700;
  font-display: swap;
}

:root {
  --editor-ui-bg: var(--bg);
  --ui-surface: color-mix(in srgb, var(--bg) 78%, var(--fg) 22%);
  --ui-active-surface: color-mix(in srgb, var(--bg) 94%, var(--fg) 6%);
  --ui-active-outline: color-mix(in srgb, var(--fg) 14%, transparent);
  --editor-panel: #f4f4f7;
  --editor-panel-strong: #ffffff;
  --editor-tool-rail-bg: var(--ui-surface);
  --editor-tool-active-surface: var(--ui-active-surface);
  --editor-tool-outline: var(--ui-active-outline);
  --editor-line: rgba(0, 0, 0, 0.18);
  --editor-line-strong: rgba(0, 0, 0, 0.36);
  --editor-half-dot: rgba(0, 0, 0, 0.22);
  --editor-primary-dot: rgba(0, 0, 0, 0.58);
  --editor-glyph-stroke: #000000;
  --editor-draft-stroke: var(--sketch);
  --editor-line-tool-active: var(--connection);
  --editor-tool-select-color: #555558;
  --editor-tool-clear-color: var(--sketch);
  --editor-tool-back-color: #66666b;
  --editor-radius: 8px;
  --editor-ease: cubic-bezier(0.18, 0.9, 0.22, 1);
}

body.theme-light {
  --ui-surface: #f4f4f7;
  --ui-active-surface: #ffffff;
  --ui-active-outline: color-mix(in srgb, #000000 12%, transparent);
  --editor-tool-rail-bg: var(--ui-surface);
  --editor-tool-active-surface: var(--ui-active-surface);
  --editor-tool-outline: var(--ui-active-outline);
}

body.theme-grey {
  --ui-surface: #e4e4e8;
  --ui-active-surface: #fafafa;
  --ui-active-outline: color-mix(in srgb, #000000 12%, transparent);
  --bg: #f1f1f1;
  --editor-ui-bg: #f1f1f1;
  --editor-panel: #e9e9ec;
  --editor-panel-strong: #ffffff;
  --editor-line: rgba(0, 0, 0, 0.16);
}

body.theme-dark {
  --ui-surface: #202024;
  --ui-active-surface: color-mix(in srgb, #202024 94%, #ffffff 6%);
  --ui-active-outline: color-mix(in srgb, #ffffff 12%, transparent);
  --editor-ui-bg: var(--bg);
  --editor-line: rgba(255, 255, 255, 0.18);
  --editor-line-strong: rgba(255, 255, 255, 0.36);
  --editor-half-dot: rgba(255, 255, 255, 0.22);
  --editor-primary-dot: rgba(255, 255, 255, 0.58);
  --editor-glyph-stroke: #ffffff;
  --editor-tool-select-color: #8c8c91;
}

body.theme-dim {
  --ui-surface: #343437;
  --ui-active-surface: color-mix(in srgb, #343437 94%, #ffffff 6%);
  --ui-active-outline: color-mix(in srgb, #ffffff 11%, transparent);
  --editor-ui-bg: var(--bg);
  --editor-line: rgba(255, 255, 255, 0.18);
  --editor-line-strong: rgba(255, 255, 255, 0.36);
  --editor-half-dot: rgba(255, 255, 255, 0.22);
  --editor-primary-dot: rgba(255, 255, 255, 0.58);
  --editor-glyph-stroke: #ffffff;
  --editor-tool-select-color: #8c8c91;
}

body.theme-blue {
  --ui-surface: #18233a;
  --ui-active-surface: color-mix(in srgb, #18233a 88%, #8bafff 12%);
  --ui-active-outline: color-mix(in srgb, #8bafff 20%, transparent);
  --editor-ui-bg: var(--bg);
  --editor-panel: #f4f4f7;
  --editor-panel-strong: #ffffff;
  --editor-tool-select-color: var(--accent);
  --editor-tool-back-color: #ffffff;
  --editor-line: rgba(139, 175, 255, 0.2);
  --editor-line-strong: rgba(139, 175, 255, 0.4);
  --editor-half-dot: rgba(139, 175, 255, 0.24);
  --editor-primary-dot: rgba(139, 175, 255, 0.62);
  --editor-glyph-stroke: var(--fg);
  --editor-draft-stroke: var(--connection);
}

body {
  --editor-tool-rail-bg: var(--ui-surface);
  --editor-tool-active-surface: var(--ui-active-surface);
  --editor-tool-outline: var(--ui-active-outline);
  --editor-tool-clear-color: var(--sketch);
  --editor-line-tool-active: var(--connection);
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "geogeo-Regular", "SF Mono", "Menlo", ui-monospace, monospace;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

a,
label,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.font-editor-shell {
  --editor-left-track: max(184px, 21vw);
  --editor-right-track: max(230px, 25vw);
  --editor-panel-center-x: calc(
    var(--editor-left-track) + ((100vw - var(--editor-left-track) - var(--editor-right-track)) / 2)
  );
  --editor-section-left: var(--editor-left-track);
  --editor-section-right-gap: var(--editor-right-track);
  --glyph-overview-pad-x: max(14px, calc(env(safe-area-inset-left) + 14px));
  --glyph-overview-pad-top: calc(var(--font-design-top) + 76px);
  --font-design-left: var(--glyph-overview-pad-x);
  --font-design-top: max(44px, calc(env(safe-area-inset-top) + 44px));
  --glyph-overview-fade-height: 136px;
  --glyph-overview-fade-solid: 122px;
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--editor-left-track) minmax(0, 1fr) var(--editor-right-track);
  gap: 0;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
}

body.ipad-like-platform .font-editor-shell {
  --glyph-overview-pad-x: max(26px, calc(env(safe-area-inset-left) + 26px));
}

body.ipad-like-platform .font-design-panel {
  --font-design-menu-width: var(--font-design-panel-width);
}

body.ipad-like-platform .preview-panel {
  grid-template-rows: minmax(76px, 15vh) minmax(0, 1fr);
  padding-bottom: 24px;
}

body.ipad-like-platform .preview-input {
  padding-top: 16px;
  padding-bottom: 20px;
}

.font-editor-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 34;
  width: calc(var(--editor-left-track) - 1px);
  height: var(--glyph-overview-fade-height);
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
  background: linear-gradient(
    to bottom,
    var(--bg) 0,
    var(--bg) var(--glyph-overview-fade-solid),
    color-mix(in srgb, var(--bg) 90%, transparent) calc(var(--glyph-overview-fade-solid) + 8px),
    transparent 100%
  );
}

body.glyph-overview-scrolled .font-editor-shell::before {
  opacity: 1;
}

@keyframes editor-load-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editor-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes editor-tool-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes editor-canvas-enter-from-notes {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.982);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes editor-toolbar-item-in {
  from {
    opacity: 0;
    transform: translate3d(0, 7px, 0) scale(0.975);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes editor-tool-enter-from-notes {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.94);
  }

  62% {
    opacity: 1;
    transform: translate3d(0, -1.5px, 0) scale(1.018);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes editor-toolbar-shell-enter-from-notes {
  from {
    opacity: 0;
    transform: translate3d(0, -5px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes editor-tool-rail-enter-from-notes {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes editor-preview-panel-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

body.editor-ui-staggering .editor-toolbar,
body.editor-ui-staggering .editor-canvas-wrap,
body.editor-ui-staggering .notes-back-arrow,
body.editor-ui-staggering .font-design-panel,
body.editor-ui-staggering .editor-status,
body.editor-ui-staggering .bezier-text-toggle,
body.editor-ui-staggering .theme-text-toggle,
body.editor-ui-staggering .file-actions {
  animation: editor-fade-in 220ms ease both;
}

body.editor-ui-staggering .preview-panel {
  animation: editor-preview-panel-enter 340ms var(--editor-ease) both;
  animation-delay: 112ms;
  will-change: transform, opacity;
}

body.editor-ui-staggering .toolbar-left-controls > .segmented-control,
body.editor-ui-staggering .toolbar-left-controls > .glyph-tool-clear,
body.editor-ui-staggering .metric-controls > .metric-control,
body.editor-ui-staggering .marker-controls > * {
  animation: editor-tool-fade-in 240ms ease both;
}

body.editor-ui-staggering .segmented-control .editor-icon-button,
body.editor-ui-staggering .toolbar-left-controls > .glyph-tool-clear {
  animation: editor-tool-fade-in 240ms ease both;
  will-change: opacity;
}

body.editor-ui-staggering .toolbar-left-controls > .segmented-control {
  animation-delay: 55ms;
}

body.editor-ui-staggering .segmented-control .editor-icon-button:nth-child(1) {
  animation-delay: 92ms;
}

body.editor-ui-staggering .segmented-control .editor-icon-button:nth-child(2) {
  animation-delay: 138ms;
}

body.editor-ui-staggering .toolbar-left-controls > .glyph-tool-clear {
  animation-delay: 184ms;
}

body.editor-ui-staggering .metric-controls > .metric-control:first-child {
  animation-delay: 128ms;
}

body.editor-ui-staggering .metric-controls > .metric-control:last-child {
  animation-delay: 164ms;
}

body.editor-ui-staggering .marker-controls > *:first-child {
  animation-delay: 186ms;
}

body.editor-ui-staggering .marker-controls > *:last-child {
  animation-delay: 214ms;
}

body.editor-entering-from-notes .editor-canvas-wrap {
  animation: editor-canvas-enter-from-notes 420ms var(--editor-ease) both;
  will-change: transform, opacity;
}

body.editor-entering-from-notes .editor-toolbar {
  animation: editor-fade-in 240ms ease both;
  will-change: opacity;
}

body.editor-entering-from-notes .glyph-overview,
body.editor-entering-from-notes .notes-back-arrow,
body.editor-entering-from-notes .font-design-panel,
body.editor-entering-from-notes .bezier-text-toggle,
body.editor-entering-from-notes .theme-text-toggle {
  animation: editor-fade-in 260ms ease both;
}

body.editor-entering-from-notes .preview-panel {
  animation: editor-preview-panel-enter 380ms var(--editor-ease) both;
  animation-delay: 126ms;
  will-change: transform, opacity;
}

body.editor-entering-from-notes .toolbar-left-controls > .segmented-control {
  animation: editor-tool-fade-in 240ms ease both;
  animation-delay: 48ms;
  will-change: opacity;
}

body.editor-entering-from-notes .segmented-control .editor-icon-button,
body.editor-entering-from-notes .toolbar-left-controls > .glyph-tool-clear,
body.editor-entering-from-notes .metric-controls > .metric-control,
body.editor-entering-from-notes .marker-controls > * {
  animation: editor-tool-fade-in 240ms ease both;
  will-change: opacity;
}

body.editor-entering-from-notes .segmented-control .editor-icon-button:nth-child(1) {
  animation-delay: 104ms;
}

body.editor-entering-from-notes .segmented-control .editor-icon-button:nth-child(2) {
  animation-delay: 150ms;
}

body.editor-entering-from-notes .toolbar-left-controls > .glyph-tool-clear {
  animation-delay: 196ms;
}

body.editor-entering-from-notes .metric-controls > .metric-control:first-child {
  animation-delay: 132ms;
}

body.editor-entering-from-notes .metric-controls > .metric-control:last-child {
  animation-delay: 168ms;
}

body.editor-entering-from-notes .marker-controls > *:first-child {
  animation-delay: 162ms;
}

body.editor-entering-from-notes .marker-controls > *:last-child {
  animation-delay: 190ms;
}

body.editor-page-exiting .glyph-overview,
body.editor-page-exiting .editor-toolbar,
body.editor-page-exiting .editor-canvas-wrap,
body.editor-page-exiting .preview-panel,
body.editor-page-exiting .notes-back-arrow,
body.editor-page-exiting .font-design-panel,
body.editor-page-exiting .editor-status,
body.editor-page-exiting .bezier-text-toggle,
body.editor-page-exiting .theme-text-toggle,
body.editor-page-exiting .file-actions {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 130ms ease, transform 150ms cubic-bezier(0.4, 0, 1, 1);
}

body.editor-page-exiting .preview-panel {
  transform: none;
  transition: opacity 130ms ease;
}

body.editor-page-exiting .editor-toolbar,
body.editor-page-exiting .toolbar-left-controls > .segmented-control,
body.editor-page-exiting .segmented-control .editor-icon-button,
body.editor-page-exiting .toolbar-left-controls > .glyph-tool-clear,
body.editor-page-exiting .metric-controls > .metric-control,
body.editor-page-exiting .marker-controls > * {
  transform: none;
  transition: opacity 130ms ease;
}

body.editor-page-exiting-to-notes .editor-canvas-wrap {
  opacity: 0;
  transform: translate3d(0, -12px, 0) scale(1.026);
  transition:
    transform 300ms var(--editor-ease),
    opacity 240ms ease;
  will-change: transform, opacity;
}

.notes-back-arrow {
  position: fixed;
  left: max(34px, calc(env(safe-area-inset-left) + 34px));
  top: max(30px, calc(env(safe-area-inset-top) + 30px));
  z-index: 35;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--editor-line);
  border-radius: 999px;
  padding: 0 0 2px;
  background: var(--editor-ui-bg);
  color: var(--editor-tool-back-color);
  -webkit-text-fill-color: currentColor;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.notes-back-arrow::before,
.notes-back-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center center;
}

.notes-back-arrow::before {
  width: 17px;
  height: 2px;
  transform: translate(-42%, -50%);
}

.notes-back-arrow::after {
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
  border-radius: 1px;
  transform: translate(-58%, -50%) rotate(45deg);
}

.notes-back-arrow:hover,
.notes-back-arrow:focus-visible {
  border-color: transparent;
  background: color-mix(in srgb, var(--editor-tool-rail-bg) 82%, var(--fg) 18%);
  color: #ffffff;
}

.notes-back-arrow:focus,
.notes-back-arrow:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-design-panel {
  position: fixed;
  left: var(--font-design-left);
  top: var(--font-design-top);
  z-index: 36;
  --font-design-panel-width: calc(var(--editor-left-track) - var(--font-design-left) - 14px);
  --font-design-menu-width: min(356px, calc(100vw - var(--font-design-left) - 18px));
  --font-design-chip-hover-surface: color-mix(
    in srgb,
    var(--editor-tool-rail-bg) 92%,
    var(--fg) 8%
  );
  display: flex;
  align-items: center;
  width: var(--font-design-panel-width);
  gap: 10px;
  font-family: "geogeo-Regular", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.25;
  font-variation-settings: "wght" 500, "wdth" 630;
  letter-spacing: 0;
  color: var(--fg);
  -webkit-text-fill-color: currentColor;
}

.font-design-select-shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.font-design-chip {
  height: 34px;
  border: 0;
  border-radius: 999px;
  box-sizing: border-box;
  background: var(--editor-tool-rail-bg);
  color: var(--fg);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    opacity 150ms ease,
    transform 180ms var(--editor-ease);
}

.font-design-chip:hover,
.font-design-chip:focus-visible,
.font-design-select-button[aria-expanded="true"] {
  background: var(--font-design-chip-hover-surface);
}

.font-design-chip:focus,
.font-design-chip:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-design-chip:disabled {
  cursor: default;
  opacity: 0.45;
}

.font-design-select-button {
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 15px;
  text-align: left;
}

.font-design-select-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.28;
  padding-bottom: 2px;
  transform: translateY(1px);
}

.font-design-select-indicator {
  width: 7px;
  height: 7px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.68;
  flex: 0 0 auto;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.font-design-select-button[aria-expanded="true"] .font-design-select-indicator {
  opacity: 1;
  transform: translateY(1px) rotate(225deg);
}

.font-design-select-shell:hover .font-design-select-indicator,
.font-design-select-button:focus-visible .font-design-select-indicator {
  opacity: 1;
}

.font-design-circle-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  color: var(--editor-tool-back-color);
  font-size: 13px;
}

.font-design-plus-button {
  position: relative;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 0;
}

.font-design-plus-button span {
  display: none;
}

.font-design-plus-button::before,
.font-design-plus-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center center;
}

.font-design-plus-button::before {
  transform: translate(-50%, -50%);
}

.font-design-plus-button::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.font-design-action-button {
  position: relative;
}

.font-design-action-button span {
  display: none;
}

.font-design-action-button::before {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    7px 0 0 currentColor,
    14px 0 0 currentColor;
  transform: translate(-50%, -50%);
}

.font-design-select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  width: 100%;
  max-height: min(260px, calc(100vh - 92px));
  box-sizing: border-box;
  overflow: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  padding: 6px;
  background: color-mix(in srgb, var(--editor-tool-rail-bg) 98%, transparent);
  display: grid;
  gap: 4px;
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.font-design-select-menu::-webkit-scrollbar {
  display: none;
}

.font-design-select-menu[hidden] {
  display: none;
}

.font-design-select-option,
.font-design-select-empty {
  min-height: 26px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  box-sizing: border-box;
  background: transparent;
  color: var(--fg);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.font-design-select-option {
  cursor: pointer;
}

.font-design-select-option:hover,
.font-design-select-option:focus-visible,
.font-design-select-option[aria-selected="true"] {
  background: var(--font-design-chip-hover-surface);
}

.font-design-select-option:focus,
.font-design-select-option:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-design-select-empty {
  opacity: 0.58;
}

.font-design-action-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  width: var(--font-design-menu-width);
  box-sizing: border-box;
  border-radius: 18px;
  padding: 7px;
  background: var(--editor-tool-rail-bg);
  display: grid;
  gap: 7px;
  box-shadow: none;
}

.font-design-action-menu[hidden] {
  display: none;
}

.glyph-add-menu {
  top: calc(100% + 7px);
}

.glyph-overview > .glyph-add-menu {
  position: relative;
  left: auto;
  top: auto;
  width: min(108px, calc(var(--glyph-card-width) * 1.55));
  height: var(--glyph-card-height);
  min-height: 0;
  align-self: stretch;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--editor-line);
  background: transparent;
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}

.glyph-overview > .glyph-add-menu.is-invalid {
  border-color: color-mix(in srgb, var(--sketch) 78%, var(--editor-line));
  background: color-mix(in srgb, var(--sketch) 10%, transparent);
}

.glyph-add-row {
  grid-template-columns: minmax(0, 43px) auto;
  align-items: center;
}

.glyph-add-input {
  text-align: center;
  padding: 0 10px;
}

.glyph-add-input[aria-invalid="true"] {
  color: var(--sketch);
  -webkit-text-fill-color: var(--sketch);
}

.glyph-add-input[aria-invalid="true"],
.glyph-add-input[aria-invalid="true"]:hover,
.glyph-add-input[aria-invalid="true"]:focus {
  background: color-mix(in srgb, var(--sketch) 14%, var(--editor-tool-active-surface));
}

.font-design-rename-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.font-design-rename-field {
  position: relative;
  min-width: 0;
  min-height: 31px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--editor-tool-active-surface) 64%, transparent);
  overflow: hidden;
}

.font-design-rename-selection {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 0;
  width: 0;
  height: 23px;
  border-radius: 7px;
  background: var(--text-box-selection-bg, color-mix(in srgb, var(--fg) 13%, transparent));
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -50%, 0);
}

.font-design-rename-selection.visible {
  opacity: 1;
}

.font-design-rename-input,
.font-design-menu-action {
  min-height: 31px;
  border: 0;
  border-radius: 999px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--editor-tool-active-surface) 64%, transparent);
  color: var(--fg);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  font-variation-settings: "wght" 500, "wdth" 630;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.font-design-rename-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  justify-content: flex-start;
  padding: 0 13px;
  text-align: left;
  outline: none;
  cursor: text;
  caret-color: var(--fg);
  user-select: text;
  -webkit-user-select: text;
}

.font-design-rename-field .font-design-rename-input {
  background: transparent;
}

.font-design-rename-input::selection {
  background: transparent;
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
}

.font-design-menu-action {
  width: 100%;
  padding: 0 14px;
  cursor: pointer;
}

.font-design-rename-button {
  min-width: 78px;
}

.font-design-menu-action:hover,
.font-design-menu-action:focus-visible,
.font-design-rename-input:hover,
.font-design-rename-input:focus {
  background: var(--font-design-chip-hover-surface);
}

.font-design-rename-field:hover,
.font-design-rename-field:focus-within {
  background: var(--font-design-chip-hover-surface);
}

.font-design-rename-field .font-design-rename-input:hover,
.font-design-rename-field .font-design-rename-input:focus {
  background: transparent;
}

.font-design-menu-action:focus,
.font-design-menu-action:focus-visible,
.font-design-rename-input:focus,
.font-design-rename-input:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-design-menu-action:disabled,
.font-design-rename-input:disabled {
  cursor: default;
  opacity: 0.45;
}

.font-design-delete-button {
  color: var(--sketch);
}

.font-design-panel:not(.signed-in) .font-design-circle-button {
  display: none;
}

.font-design-panel.is-busy {
  pointer-events: none;
}

.glyph-overview,
.preview-panel {
  min-width: 0;
  overflow: auto;
  border-color: var(--editor-line);
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.glyph-overview {
  --glyph-card-width: 66px;
  --glyph-card-height: 70px;
  border-right: 1px solid var(--editor-line);
  padding: var(--glyph-overview-pad-top) 14px 14px var(--glyph-overview-pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--glyph-card-width), 1fr));
  grid-auto-rows: var(--glyph-card-height);
  grid-auto-flow: row;
  align-content: start;
  align-items: start;
  justify-content: start;
  gap: 8px;
}

.glyph-card {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--glyph-card-height);
  aspect-ratio: auto;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius);
  background: transparent;
  color: var(--fg);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

body:not(.editor-load-complete) .glyph-card,
body.glyph-overview-reloading .glyph-card {
  animation: editor-load-in 340ms cubic-bezier(0.2, 0.78, 0.22, 1) both;
  animation-delay: calc(90ms + min(var(--glyph-index, 1), 22) * 18ms);
}

.glyph-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}

.glyph-card:hover,
.glyph-card.hover-trail {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--editor-line));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.glyph-card:focus,
.glyph-card:focus-visible {
  outline: none;
  box-shadow: none;
}

.glyph-card.active:hover,
.glyph-card.active.hover-trail {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.glyph-card-delete-icon {
  position: absolute;
  z-index: 4;
  right: 7px;
  top: 7px;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--editor-tool-rail-bg);
  color: var(--editor-tool-back-color);
  opacity: 0.72;
  transform: scale(0.96);
  transition:
    background-color 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.glyph-card span.glyph-card-delete-icon {
  position: absolute;
  left: auto;
  top: 7px;
  font-size: 0;
  line-height: 0;
}

.glyph-card-delete-icon::before,
.glyph-card-delete-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center center;
}

.glyph-card-delete-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.glyph-card-delete-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.glyph-card-delete-icon:hover,
.glyph-card-delete-icon:focus-visible {
  background: var(--font-design-chip-hover-surface);
  opacity: 1;
  transform: scale(1);
  outline: none;
}

.glyph-card-add {
  display: grid;
  place-items: center;
  background: transparent;
}

.glyph-card-add-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 40px;
  height: 40px;
  line-height: 0;
  border-radius: 999px;
  background: var(--editor-tool-rail-bg);
  color: var(--editor-tool-back-color);
}

.glyph-card span.glyph-card-add-icon {
  position: relative;
  left: auto;
  top: auto;
  font-size: 0;
}

.glyph-card-add-icon::before,
.glyph-card-add-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center center;
}

.glyph-card-add-icon::before {
  transform: translate(-50%, -50%);
}

.glyph-card-add-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.glyph-card-add:hover,
.glyph-card-add.hover-trail {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--editor-line));
}

.glyph-card-add:hover .glyph-card-add-icon,
.glyph-card-add.hover-trail .glyph-card-add-icon {
  background: var(--font-design-chip-hover-surface);
}

.glyph-card-add.is-adding,
.glyph-card-add.is-adding:hover,
.glyph-card-add.is-adding.hover-trail {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.glyph-card-add.is-invalid,
.glyph-card-add.is-invalid:hover,
.glyph-card-add.is-invalid.hover-trail {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.glyph-card-add.is-adding .glyph-card-add-icon {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.glyph-card span.glyph-card-add-value {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: none;
  min-width: 0.7em;
  color: var(--editor-ink);
  font-size: 28px;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
}

.glyph-card-add.is-adding .glyph-card-add-value {
  display: block;
}

.glyph-card-add.is-adding .glyph-card-add-value::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.25em;
  margin-left: 2px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: -0.16em;
  animation: glyph-add-caret-blink 940ms steps(1, end) infinite;
}

@keyframes glyph-add-caret-blink {
  0%,
  52% {
    opacity: 1;
  }
  53%,
  100% {
    opacity: 0;
  }
}

.glyph-card.empty {
  opacity: 0.42;
}

.glyph-card span {
  position: absolute;
  z-index: 2;
  left: 7px;
  top: 5px;
  font-size: 11px;
  line-height: 1;
}

.glyph-card canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.editor-panel {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  touch-action: none;
}

.editor-toolbar {
  --toolbar-button-gap: 12px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 8px 18px;
  padding: 30px 14px 8px;
  border-bottom: none;
  background: var(--editor-ui-bg);
  transform: translate3d(0, 0, 0);
}

.toolbar-left-controls {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  justify-self: center;
  gap: var(--toolbar-button-gap);
  max-width: 100%;
}

.segmented-control {
  --editor-tool-dot-size: 38px;
  --editor-tool-dot-gap: 5px;
  --editor-tool-dot-pad: 3px;
  --editor-tool-core-size: 9px;
  --editor-tool-active-size: 32px;
  --editor-tool-icon-size: 19px;
  display: inline-flex;
  align-items: center;
  gap: var(--editor-tool-dot-gap);
  padding: var(--editor-tool-dot-pad);
  border-radius: 999px;
  background: var(--editor-tool-rail-bg);
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
}

.home-button {
  display: none;
}

.toolbar-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(230px, 1fr);
  grid-column: 1 / -1;
  grid-row: 1;
  align-items: center;
  justify-content: stretch;
  gap: 14px;
  margin-left: 0;
  pointer-events: none;
}

.toolbar-controls > * {
  pointer-events: auto;
}

.toolbar-controls .metric-controls {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.metric-controls {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
}

.marker-controls {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--toolbar-button-gap);
  justify-self: end;
}

.marker-controls[hidden] {
  display: none;
}

.metric-control {
  --metric-slider-track: color-mix(in srgb, var(--accent) 28%, transparent);
  --metric-slider-thumb-fill: color-mix(in srgb, var(--editor-ui-bg) 88%, var(--accent) 12%);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: var(--editor-radius);
  padding: 0 10px 0 13px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
}

.metric-control input[type="range"] {
  --metric-radius-thumb-radius: 6px;
  --metric-stroke-thumb-border: 4px;
  width: 126px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.metric-control input[type="range"]:focus,
.metric-control input[type="range"]:focus-visible {
  outline: none;
}

.metric-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--metric-slider-track);
}

.metric-control input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 999px;
  margin-top: -5px;
  background: var(--accent);
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 120ms ease, filter 120ms ease;
}

.metric-control input[type="range"]:hover::-webkit-slider-thumb,
.metric-control input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  filter: brightness(1.08);
}

#cornerRadiusInput::-webkit-slider-thumb {
  border-radius: var(--metric-radius-thumb-radius);
}

#strokeInput::-webkit-slider-thumb {
  border: var(--metric-stroke-thumb-border) solid var(--accent);
  background: var(--metric-slider-thumb-fill);
  border-radius: 999px;
  box-sizing: border-box;
}

.metric-control input[type="range"]::-moz-range-track {
  height: 6px;
  border: none;
  border-radius: 999px;
  background: var(--metric-slider-track);
}

.metric-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
  transition: box-shadow 120ms ease, filter 120ms ease;
}

.metric-control input[type="range"]:hover::-moz-range-thumb,
.metric-control input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  filter: brightness(1.08);
}

#cornerRadiusInput::-moz-range-thumb {
  border-radius: var(--metric-radius-thumb-radius);
}

#strokeInput::-moz-range-thumb {
  border: var(--metric-stroke-thumb-border) solid var(--accent);
  background: var(--metric-slider-thumb-fill);
  border-radius: 999px;
  box-sizing: border-box;
}

.tool-button,
.marker-control {
  min-height: 34px;
  border: 1px solid var(--editor-line);
  border-radius: var(--editor-radius);
  background: transparent;
  color: var(--fg);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  text-decoration: none;
  cursor: pointer;
}

.tool-button.editor-icon-button {
  --glyph-tool-color: var(--fg);
  position: relative;
  width: var(--editor-tool-dot-size, 38px);
  min-width: var(--editor-tool-dot-size, 38px);
  height: var(--editor-tool-dot-size, 38px);
  min-height: var(--editor-tool-dot-size, 38px);
  border: none;
  border-radius: 999px;
  padding: 0;
  color: var(--glyph-tool-color);
  background: transparent;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.segmented-control .editor-icon-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--editor-tool-active-size);
  height: var(--editor-tool-active-size);
  border-radius: 999px;
  background: var(--glyph-tool-color);
  opacity: 0.34;
  transform: translate(-50%, -50%);
  transition:
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 120ms ease,
    opacity 140ms ease;
  pointer-events: none;
}

.segmented-control .editor-icon-button:hover::before,
.segmented-control .editor-icon-button:focus-visible::before {
  opacity: 0.58;
}

.segmented-control .editor-icon-button.active::before {
  width: var(--editor-tool-active-size);
  height: var(--editor-tool-active-size);
  opacity: 1;
}

.segmented-control .editor-tool-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: var(--editor-tool-icon-size);
  height: var(--editor-tool-icon-size);
  --editor-tool-icon-offset-x: 0px;
  --editor-tool-icon-offset-y: 0px;
  color: #ffffff;
  fill: currentColor;
  stroke: none;
  transform:
    translate(
      calc(-50% + var(--editor-tool-icon-offset-x)),
      calc(-50% + var(--editor-tool-icon-offset-y))
    )
    scale(1);
  transform-origin: 50% 50%;
  opacity: 1;
  transition: opacity 140ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.segmented-control .editor-icon-button.active .editor-tool-icon {
  opacity: 1;
  transform:
    translate(
      calc(-50% + var(--editor-tool-icon-offset-x)),
      calc(-50% + var(--editor-tool-icon-offset-y))
    )
    scale(1);
}

.segmented-control .editor-tool-icon.editor-tool-icon-select {
  --editor-tool-icon-offset-x: 0.55px;
  --editor-tool-icon-offset-y: -1.45px;
  width: 18px;
  height: 18px;
}

.editor-tool-icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph-tool-draw .editor-tool-icon-stroke {
  stroke-width: 2;
}

.editor-tool-icon-oval .editor-tool-icon-stroke {
  stroke-width: 2.1;
}

.editor-tool-icon-clear .editor-tool-icon-stroke {
  stroke-width: 1.6;
}

.tool-button.glyph-tool-select {
  --glyph-tool-color: var(--editor-tool-select-color);
}

body.theme-dark .tool-button.glyph-tool-select,
body.theme-dim .tool-button.glyph-tool-select {
  --glyph-tool-color: #8c8c91;
}

body.theme-blue .tool-button.glyph-tool-select {
  --glyph-tool-color: var(--accent);
}

.tool-button.glyph-tool-draw {
  --glyph-tool-color: var(--connection);
}

.tool-button.glyph-tool-draw.active {
  --glyph-tool-color: var(--connection);
}

.tool-button.glyph-tool-oval {
  --glyph-tool-color: var(--connection);
}

.tool-button.glyph-tool-clear {
  --glyph-tool-color: var(--editor-tool-clear-color);
}

body .tool-button.glyph-tool-clear {
  --glyph-tool-color: var(--sketch);
}

.tool-button:focus,
.tool-button:focus-visible,
.marker-control:focus,
.marker-control:focus-visible {
  outline: none;
  box-shadow: none;
}

.marker-control {
  padding: 0 11px;
  cursor: pointer;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
}

.tool-button.primary {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.toolbar-left-controls > .glyph-tool-clear {
  display: none;
  --editor-tool-clear-color: var(--sketch);
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  background: var(--editor-tool-rail-bg);
  color: var(--glyph-tool-color);
}

.toolbar-left-controls > .glyph-tool-clear .editor-tool-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  color: currentColor;
  fill: none;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: color 120ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toolbar-left-controls > .glyph-tool-clear:hover,
.toolbar-left-controls > .glyph-tool-clear:focus-visible {
  background: var(--editor-tool-active-surface);
  box-shadow: 0 0 0 1px var(--editor-tool-outline);
  color: var(--fg);
}

.toolbar-left-controls > .glyph-tool-clear:hover .editor-tool-icon,
.toolbar-left-controls > .glyph-tool-clear:focus-visible .editor-tool-icon {
  transform: translate(-50%, -50%) scale(1.04);
}

.tool-button.danger {
  border-color: color-mix(in srgb, var(--sketch) 38%, var(--editor-line));
}

.tool-button:disabled {
  opacity: 0.32;
  cursor: default;
}

.home-button {
  width: 36px;
  display: none;
  padding: 0;
}

.bezier-text-toggle,
.theme-text-toggle {
  position: fixed;
  z-index: 36;
  bottom: max(14px, env(safe-area-inset-bottom));
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: color-mix(in srgb, var(--fg) 52%, transparent);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bezier-text-toggle::before,
.theme-text-toggle::before {
  content: "";
  position: absolute;
  inset: -12px -10px;
}

.bezier-text-toggle {
  right: calc(var(--editor-section-right-gap) + 100px);
}

.theme-text-toggle {
  right: calc(var(--editor-section-right-gap) + 14px);
}

.bezier-text-toggle.active {
  color: var(--accent);
}

.bezier-text-toggle:focus,
.bezier-text-toggle:focus-visible,
.theme-text-toggle:focus,
.theme-text-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.marker-menu {
  position: fixed;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 156px;
  padding: 6px;
  border-radius: var(--editor-radius);
  background: var(--editor-panel);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 90ms linear, transform 120ms ease;
}

.marker-menu.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.marker-menu-option {
  min-height: 28px;
  border: none;
  border-radius: 6px;
  padding: 0 9px;
  background: transparent;
  color: var(--fg);
  font-size: inherit;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.marker-menu-option.active,
.marker-menu-option:hover {
  background: var(--ui-active-surface, color-mix(in srgb, var(--editor-ui-bg) 94%, var(--fg) 6%));
}

.cursor-action-button {
  position: fixed;
  z-index: 42;
  min-height: 30px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--editor-ui-bg) 82%, var(--accent) 18%);
  color: var(--fg);
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, 10px);
  transition: opacity 70ms linear;
  cursor: pointer;
}

.cursor-action-button.visible {
  opacity: 1;
  pointer-events: auto;
}

.cursor-action-button:hover {
  background: color-mix(in srgb, var(--editor-ui-bg) 72%, var(--accent) 28%);
}

.cursor-action-button:focus,
.cursor-action-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.editor-canvas-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
  overscroll-behavior: contain;
  touch-action: none;
}

.editor-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-drag: none;
}

.editor-canvas.selecting {
  cursor: default;
}

.editor-canvas.oval-drawing {
  cursor: crosshair;
}

.editor-canvas.resizing {
  cursor: ew-resize;
}

.preview-panel {
  border-left: 1px solid var(--editor-line);
  padding: 0;
  display: grid;
  grid-template-rows: minmax(88px, 19vh) minmax(0, 1fr);
  gap: 0;
}

.preview-input {
  width: 100%;
  min-height: 0;
  resize: none;
  border: none;
  border-radius: 0;
  outline: none;
  background: var(--editor-ui-bg);
  color: var(--fg);
  caret-color: var(--fg);
  font-family: "geogeoVF", "geogeo-Regular", "SF Mono", "Menlo", ui-monospace, monospace;
  font-weight: 500;
  font-variation-settings: "wdth" 630;
  padding: 18px 30px 30px;
  line-height: 1.35;
  text-transform: uppercase;
  user-select: text;
  -webkit-user-select: text;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.preview-input::selection {
  background: color-mix(in srgb, var(--tool-select) 32%, transparent);
  color: var(--fg);
}

.preview-input::-moz-selection {
  background: color-mix(in srgb, var(--tool-select) 32%, transparent);
  color: var(--fg);
}

.preview-input:focus {
  outline: none;
}

.preview-input.keyboard-suppressed {
  caret-color: var(--fg);
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: none;
}

.actual-preview-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-top: 1px solid var(--editor-line);
  border-radius: 0;
  background: var(--editor-ui-bg);
}

.editor-status {
  position: fixed;
  left: calc(var(--editor-section-left) + 14px);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 30;
  max-width: min(32vw, 360px);
  min-height: 0;
  margin: 0;
  color: color-mix(in srgb, var(--fg) 58%, transparent);
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  text-align: left;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.editor-status.visible {
  opacity: 1;
}

.file-actions {
  --file-action-gap: 12px;
  position: fixed;
  right: max(26px, calc(env(safe-area-inset-right) + 26px));
  bottom: max(12px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 30;
  display: none;
  align-items: center;
  gap: var(--file-action-gap);
}

@media (max-width: 1180px) {
  .font-editor-shell {
    --editor-panel-center-x: 50vw;
    --editor-section-left: 0px;
    --editor-section-right-gap: 0px;
    grid-template-columns: 1fr;
    grid-template-rows: 126px 1fr 220px;
  }

  .glyph-overview {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    border-right: none;
    border-bottom: 1px solid var(--editor-line);
  }

  .glyph-card {
    flex: 0 0 var(--glyph-card-width);
    height: var(--glyph-card-height);
  }

  .glyph-overview::before {
    flex: 0 0 var(--glyph-card-width);
    width: var(--glyph-card-width);
    height: var(--glyph-card-height);
  }

  .preview-panel {
    border-left: none;
    border-top: 1px solid var(--editor-line);
    grid-template-rows: 70px minmax(0, 1fr);
  }

  .toolbar-controls {
    width: 100%;
  }

  .editor-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-left-controls,
  .toolbar-controls {
    grid-column: 1;
  }

  .toolbar-left-controls {
    grid-row: 1;
  }

  .toolbar-controls {
    grid-row: 2;
    margin-left: 0;
  }

  .metric-control input[type="range"] {
    min-width: 92px;
  }

  .preview-input {
    padding-top: 22px;
    padding-right: 22px;
    padding-bottom: 22px;
    padding-left: 22px;
  }

  .editor-status {
    max-width: calc(100vw - 160px);
  }

  .file-actions {
    bottom: max(2px, calc(env(safe-area-inset-bottom) - 8px));
  }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .font-editor-shell {
    --editor-left-track: clamp(218px, 29vw, 316px);
    --editor-right-track: clamp(220px, 27vw, 300px);
    --glyph-overview-pad-x: max(24px, calc(env(safe-area-inset-left) + 24px));
    --glyph-overview-pad-top: calc(var(--font-design-top) + 76px);
    --font-design-left: var(--glyph-overview-pad-x);
    --font-design-top: max(42px, calc(env(safe-area-inset-top) + 42px));
    --glyph-overview-fade-height: 134px;
    --glyph-overview-fade-solid: 120px;
    --editor-panel-center-x: calc(
      var(--editor-left-track) + ((100vw - var(--editor-left-track) - var(--editor-right-track)) / 2)
    );
    --editor-section-left: var(--editor-left-track);
    --editor-section-right-gap: var(--editor-right-track);
    grid-template-columns: var(--editor-left-track) minmax(300px, 1fr) var(--editor-right-track);
    grid-template-rows: 1fr;
  }

  .glyph-overview {
    --glyph-card-height: clamp(74px, 8.1vw, 92px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: var(--glyph-card-height);
    row-gap: 14px;
    column-gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: start;
    align-content: start;
    border-right: 1px solid var(--editor-line);
    border-bottom: none;
    padding: var(--glyph-overview-pad-top) 12px 12px var(--glyph-overview-pad-x);
  }

  .notes-back-arrow {
    top: max(
      clamp(32px, calc(4.05vw - 5px), 41px),
      calc(env(safe-area-inset-top) + clamp(32px, calc(4.05vw - 5px), 41px))
    );
  }

  .glyph-overview::before {
    display: block;
    width: 100%;
    height: var(--glyph-card-height);
    aspect-ratio: auto;
  }

  .glyph-card {
    width: 100%;
    min-width: 0;
    height: var(--glyph-card-height);
    aspect-ratio: auto;
  }

  .preview-panel {
    border-left: 1px solid var(--editor-line);
    border-top: none;
  }
}

@media (pointer: coarse) and (min-width: 701px) {
  .notes-back-arrow {
    left: max(37px, calc(env(safe-area-inset-left) + 37px));
  }

  .editor-toolbar {
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 6px 10px;
    padding: 26px 10px 8px;
  }

  .toolbar-left-controls {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    gap: 8px;
  }

  .toolbar-controls {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(134px, 1fr) auto minmax(126px, 1fr);
    gap: 8px;
    width: auto;
  }

  .metric-control {
    padding: 0 9px 0 12px;
  }

  .metric-control input[type="range"] {
    width: clamp(112px, 12vw, 140px);
    min-width: 0;
  }

  .marker-controls {
    gap: 6px;
  }

  .marker-control,
  .tool-button {
    padding-left: 8px;
    padding-right: 8px;
  }

  .bezier-text-toggle,
  .theme-text-toggle,
  .editor-status {
    bottom: max(0px, calc(env(safe-area-inset-bottom) - 4px));
  }

  .glyph-overview {
    --glyph-card-height: 82px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: var(--glyph-card-height);
    row-gap: 10px;
    column-gap: 12px;
    padding: 20px 14px 28px;
  }

  .glyph-overview::before,
  .glyph-card {
    height: var(--glyph-card-height);
    aspect-ratio: auto;
  }

  .file-actions {
    isolation: isolate;
    bottom: max(-4px, calc(env(safe-area-inset-bottom) - 14px));
  }

  .file-actions::before {
    content: "";
    position: absolute;
    inset: -12px -10px;
    z-index: -1;
    background: var(--editor-ui-bg);
    border-radius: 12px;
  }
}

@media (max-width: 700px) {
  .font-editor-shell {
    --editor-panel-center-x: 50vw;
    --editor-section-left: 0px;
    --editor-section-right-gap: 0px;
    grid-template-columns: 1fr;
    grid-template-rows: 84px auto minmax(300px, 46vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .font-editor-shell::before {
    display: none;
  }

  .notes-back-arrow {
    left: max(16px, calc(env(safe-area-inset-left) + 16px));
    top: max(23px, calc(env(safe-area-inset-top) + 13px));
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .font-design-panel {
    left: max(56px, calc(env(safe-area-inset-left) + 56px));
    top: max(23px, calc(env(safe-area-inset-top) + 13px));
    --font-design-panel-width: calc(var(--editor-left-track) - max(56px, calc(env(safe-area-inset-left) + 56px)) - 10px);
    --font-design-menu-width: var(--font-design-panel-width);
    gap: 6px;
    font-size: 12px;
  }

  .font-design-chip {
    height: 32px;
  }

  .font-design-select-button {
    padding-left: 13px;
    padding-right: 11px;
  }

  .font-design-circle-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .font-design-action-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .font-design-action-menu {
    border-radius: 17px;
    padding: 6px;
    gap: 6px;
  }

  .font-design-rename-row {
    gap: 6px;
  }

  .glyph-overview {
    --glyph-card-width: 48px;
    --glyph-card-height: 58px;
    gap: 6px;
    padding: max(10px, env(safe-area-inset-top)) 10px 10px
      max(52px, calc(env(safe-area-inset-left) + 52px));
    scroll-padding-left: max(52px, calc(env(safe-area-inset-left) + 52px));
  }

  .glyph-overview::before {
    display: none;
  }

  .glyph-card span {
    left: 6px;
    top: 5px;
    font-size: 10px;
  }

  .editor-panel {
    min-height: 520px;
    grid-template-rows: auto minmax(430px, 64vh);
    border-bottom: 1px solid var(--editor-line);
  }

  .editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: auto 1fr;
    gap: 6px;
    padding: 18px 10px 8px;
    align-items: flex-start;
  }

  .toolbar-left-controls {
    grid-column: 1;
    grid-row: 1;
  }

  .toolbar-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
  }

  .bezier-text-toggle {
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 58px));
  }

  .tool-button,
  .marker-control,
  .metric-control {
    min-height: 32px;
    border-radius: 7px;
  }

  .tool-button {
    padding: 0 9px;
  }

  .home-button {
    width: 34px;
  }

  .toolbar-controls {
    width: 100%;
    gap: 6px;
  }

  .metric-control {
    padding: 0 9px 0 12px;
  }

  .metric-control input[type="range"] {
    min-width: 120px;
  }

  .marker-controls {
    gap: 6px;
  }

  .marker-control {
    padding: 0 8px;
  }

  .editor-canvas-wrap {
    min-height: 430px;
  }

  .preview-panel {
    min-height: 348px;
    grid-template-rows: 68px minmax(230px, 1fr);
    padding-bottom: 48px;
  }

  .preview-input {
    padding: 18px 16px;
    line-height: 1.25;
  }

  .editor-status {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 58px));
    z-index: 30;
    max-width: none;
    padding: 0;
    border-top: none;
    background: transparent;
  }

  .file-actions {
    position: static;
    justify-content: flex-end;
    transform: none;
    gap: var(--file-action-gap);
    padding: 8px max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--editor-line);
    background: var(--editor-ui-bg);
  }

  .file-actions .tool-button {
    min-height: 32px;
    padding: 0 10px;
  }
}

@media (min-width: 701px) {
  .notes-back-arrow {
    left: auto;
    right: calc(var(--editor-section-right-gap) + 30px);
    top: max(30px, calc(env(safe-area-inset-top) + 30px));
    width: 48px;
    height: 48px;
    border: none;
    padding: 0;
    background: var(--editor-tool-rail-bg);
    color: var(--editor-tool-back-color);
    transform: translateY(-2px);
  }

  .notes-back-arrow:hover,
  .notes-back-arrow:focus-visible {
    border-color: transparent;
    background: color-mix(in srgb, var(--editor-tool-rail-bg) 84%, var(--fg) 16%);
    color: #ffffff;
  }

  .editor-toolbar {
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
    align-items: start;
    gap: 0 18px;
    padding: 22px 20px 10px;
    background: transparent;
  }

  .toolbar-left-controls {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    gap: 16px;
  }

  .segmented-control {
    --editor-tool-dot-size: 48px;
    --editor-tool-dot-gap: 8px;
    --editor-tool-dot-pad: 6px;
    --editor-tool-core-size: 10px;
    --editor-tool-active-size: 42px;
    --editor-tool-icon-size: 22px;
    align-items: center;
    gap: var(--editor-tool-dot-gap);
    padding: var(--editor-tool-dot-pad);
    border-radius: 999px;
    background: var(--editor-tool-rail-bg);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .toolbar-controls {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: auto;
    justify-self: start;
    gap: 0;
    width: auto;
    margin: 0;
  }

  .toolbar-controls .metric-controls {
    justify-self: start;
    margin-top: 6px;
    margin-left: 20px;
  }

  .metric-controls {
    display: grid;
    gap: 16px;
    align-content: start;
  }

  .metric-control {
    min-height: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .metric-control input[type="range"] {
    width: 136px;
  }

  .metric-control input[type="range"]:hover::-webkit-slider-thumb,
  .metric-control input[type="range"]:focus-visible::-webkit-slider-thumb,
  .metric-control input[type="range"]:hover::-moz-range-thumb,
  .metric-control input[type="range"]:focus-visible::-moz-range-thumb {
    box-shadow: none;
    filter: brightness(1);
  }

  .tool-button.editor-icon-button {
    width: var(--editor-tool-dot-size, 48px);
    min-width: var(--editor-tool-dot-size, 48px);
    height: var(--editor-tool-dot-size, 48px);
    min-height: var(--editor-tool-dot-size, 48px);
  }

  .segmented-control .editor-icon-button {
    opacity: 1;
  }

  .segmented-control .editor-icon-button.active {
    opacity: 1;
  }

  .segmented-control .editor-icon-button:hover,
  .segmented-control .editor-icon-button:focus-visible {
    opacity: 1;
  }

  .segmented-control .editor-icon-button::before {
    width: var(--editor-tool-active-size);
    height: var(--editor-tool-active-size);
  }

  .segmented-control .editor-icon-button:hover::before,
  .segmented-control .editor-icon-button:focus-visible::before {
    width: var(--editor-tool-active-size);
    height: var(--editor-tool-active-size);
  }

  .segmented-control .editor-icon-button.active::before {
    width: var(--editor-tool-active-size);
    height: var(--editor-tool-active-size);
  }

  .segmented-control .editor-tool-icon {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--editor-tool-icon-offset-x)),
        calc(-50% + var(--editor-tool-icon-offset-y))
      )
      scale(1);
  }

  .segmented-control .editor-icon-button:hover .editor-tool-icon,
  .segmented-control .editor-icon-button:focus-visible .editor-tool-icon {
    opacity: 1;
  }

  .segmented-control .editor-icon-button.active .editor-tool-icon {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--editor-tool-icon-offset-x)),
        calc(-50% + var(--editor-tool-icon-offset-y))
      )
      scale(1);
  }

  .tool-button.glyph-tool-select {
    --glyph-tool-color: var(--editor-tool-select-color);
  }

  .segmented-control .editor-tool-icon.editor-tool-icon-select {
    --editor-tool-icon-offset-x: 0.55px;
    --editor-tool-icon-offset-y: -1.25px;
    width: 18px;
    height: 18px;
  }

  .tool-button.glyph-tool-draw {
    --glyph-tool-color: var(--connection);
  }

  .tool-button.glyph-tool-clear {
    --glyph-tool-color: var(--editor-tool-clear-color);
  }

  .toolbar-left-controls > .glyph-tool-clear {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    border: none;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    color: #ffffff;
    opacity: 1;
  }

  .toolbar-left-controls > .glyph-tool-clear::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--editor-tool-clear-color);
    transform: translate(-50%, -50%);
  }

  .toolbar-left-controls > .glyph-tool-clear .editor-tool-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1);
  }

  .toolbar-left-controls > .glyph-tool-clear:hover,
  .toolbar-left-controls > .glyph-tool-clear:focus-visible {
    background: transparent;
    box-shadow: none;
    opacity: 0.9;
    color: #ffffff;
  }

  .toolbar-left-controls > .glyph-tool-clear:hover .editor-tool-icon,
  .toolbar-left-controls > .glyph-tool-clear:focus-visible .editor-tool-icon {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glyph-overview,
  .notes-back-arrow,
  .font-design-panel,
  .editor-toolbar,
  .editor-canvas-wrap,
  .preview-panel,
  .editor-status,
  .file-actions,
  .glyph-card,
  .segmented-control,
  .segmented-control .editor-icon-button,
  .toolbar-left-controls > .glyph-tool-clear,
  .metric-control,
  .marker-control {
    animation: none;
  }

  body.editor-page-exiting .glyph-overview,
  body.editor-page-exiting .editor-toolbar,
  body.editor-page-exiting .editor-canvas-wrap,
  body.editor-page-exiting .preview-panel,
  body.editor-page-exiting .notes-back-arrow,
  body.editor-page-exiting .font-design-panel,
  body.editor-page-exiting .editor-status,
  body.editor-page-exiting .bezier-text-toggle,
  body.editor-page-exiting .theme-text-toggle,
  body.editor-page-exiting .file-actions {
    transform: none;
    transition: none;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 701px) {
  .glyph-overview {
    padding:
      var(--glyph-overview-pad-top)
      14px
      28px
      var(--glyph-overview-pad-x);
  }

  .editor-toolbar {
    padding-top: max(16px, calc(env(safe-area-inset-top) + 16px));
  }

  .toolbar-controls .metric-controls {
    transform: translateX(15px);
  }

  .notes-back-arrow {
    top: max(22px, calc(env(safe-area-inset-top) + 22px));
    transform: none;
  }

  .bezier-text-toggle,
  .theme-text-toggle,
  .editor-status {
    bottom: max(26px, calc(env(safe-area-inset-bottom) + 26px));
  }
}
