:root {
    --blackish: #012c38;
    --yolo-yellow: #fcfa79;
    --fresh-mint: #c4fdd0;
    --tasty-teal: #01c9d7;
    --chilled-electric: #effbff;
    --hot-pink: #fa00af;
    --chilled-pink: #fdcde4;

    --title-font: "San Francisco", "Helvetica Neue", "Helvetica", "Arial";
    --niche-font: "Courier New", Courier, monospace;

    /* Native desktop UI */
    --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --accent: var(--hot-pink);
    --accent-hover: color-mix(in srgb, var(--hot-pink) 82%, var(--blackish));
    --panel-bg: rgba(246, 246, 246, 0.86);
    --panel-border: rgba(0, 0, 0, 0.12);
    --panel-shadow: 0 10px 32px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
    --panel-blur: saturate(180%) blur(30px);

    /* Brand touches: the hard offset shadow of the original buttons */
    --brand-shadow: 2px 2px 0 var(--blackish);
    --brand-shadow-half: 1px 1px 0 var(--blackish);
}

.dark {
    --accent: var(--hot-pink);
    --accent-hover: color-mix(in srgb, var(--hot-pink) 82%, var(--blackish));
    --panel-bg: rgba(44, 44, 46, 0.88);
    --panel-border: rgba(255, 255, 255, 0.12);
    --panel-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}

/* Layer for the on-canvas UI (menu bar, toolbar, objects list) */

.controls-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.controls-overlay div {
        pointer-events: all;
    }

/* Icon buttons; sizing and states live with the toolbar in menubar.css */

.tool-button {
    touch-action: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.tool-button svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.tool-button:hover {
        cursor: pointer;
    }

/* Brand button: menus and popups restyle it; the error screen uses it as is */

.button {
    padding: 7px 17px;
    margin-top: 5px;
    border: 2px solid var(--blackish);
    border-radius: 20px;
    box-shadow: 3px 3px 0 var(--blackish);
    background-color: var(--yolo-yellow);
    color: var(--blackish);
    font-family: var(--niche-font);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button.pink {
      background-color: var(--chilled-pink);
    }

.button.mint {
      background-color: var(--fresh-mint);
    }

.button.yellow {
        background-color: var(--yolo-yellow);
    }

.button.small {
        padding: 3px 12px;
    }

.button:hover {
      box-shadow: none;
      transform: translate(2px,2px);
    }

.dark .button {
    border-color: #000;
    box-shadow: 3px 3px #000;
}

.dark .button:hover {
        box-shadow: none;
    }

@keyframes loading {
    0% {
        transform: scaleY(1);
    }
    49% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(-1);
    }
    100% {
        transform: scaleY(-1);
    }
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    flex-flow: column;
    align-items: center;
    background-color: rgba(10, 10, 10, 0.86);
    z-index: 10;
    pointer-events: all;
    text-align: center;
    color: #fff;
    font-weight: bold;
}

#loading svg {
      width: 50px;
      height: 50px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;

      animation: loading 1s infinite;
    }

#loading.is-active {
    display: flex;
}

.loader {
    text-align: center;
}

.loader svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        width: 30px;
        height: 30px;
        animation: loading 1s infinite;
    }

.button-loader svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        animation: loading 1s infinite;
        margin-bottom: -8px;
    }

@media only screen and (hover: hover) {
        .tool-button:hover .tooltip {
            display: block;
        }
}

.tooltip {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: max-content;
    max-width: 220px;
    background-color: rgba(30, 30, 30, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-align: left;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
    pointer-events: none;
    z-index: 2;
}

.tooltip.right {
        left: unset;
        right: 0;
    }

.tooltip.tab-tooltip {
        position: fixed;
        white-space: nowrap;
        transform: translateY(-50%);
        z-index: 10;
    }

/*
  Objects list: one row per character or prop down the left edge (built in
  helpers/Tabs.js). Its top offset changes with the menu bar's height; see the
  compact and short-screen rules in menubar.css.
*/

.character-tabs {
  --tabs-top: calc(43px + env(safe-area-inset-top));
  /* Run right to the bottom edge; anything overlapping sits in front */
  --tabs-bottom: 0px;

  position: absolute;
  top: var(--tabs-top);
  left: env(safe-area-inset-left);
}

.character-tabs #characters {
    margin: 0;
    list-style: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: none;
    touch-action: pan-y;
    /* rtl puts the scrollbar on the left, away from the rows */
    direction: rtl;
    /* Room for the selected row's outline, which the scrolling list would clip */
    padding: 3px 6px 3px 0;
    max-height: calc(100dvh - var(--tabs-top) - var(--tabs-bottom));
  }

.character-tabs #characters li.object-row {
      /* The list is rtl to put its scrollbar on the left; rows read ltr */
      direction: ltr;
      display: flex;
      align-items: center;
      gap: 2px;
      box-sizing: border-box;
      width: fit-content;
      height: 40px;
      /* auto right margin: the list is rtl, so this keeps rows on the left */
      margin: 0 auto 4px 8px;
      padding: 0 4px;
      border: 0.5px solid var(--panel-border);
      border-radius: 9px;
      background-color: var(--panel-bg);
      -webkit-backdrop-filter: var(--panel-blur);
      backdrop-filter: var(--panel-blur);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      color: #1d1d1f;
      font-family: var(--ui-font);
      font-size: 13px;
    }

.character-tabs #characters li.object-row button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        padding: 0;
        border: none;
        background: none;
        color: inherit;
        cursor: pointer;

        /* Feather icons are outlines */
      }

.character-tabs #characters li.object-row button svg {
          fill: none;
          stroke: currentColor;
          stroke-width: 2;
          stroke-linecap: round;
          stroke-linejoin: round;
        }

.character-tabs #characters li.object-row .row-select {
        flex: none;
        height: 100%;
        gap: 4px;
        padding: 0 2px;
      }

.character-tabs #characters li.object-row .row-select img {
          width: 28px;
          height: 28px;
          object-fit: contain;
          flex: none;
        }

.character-tabs #characters li.object-row .row-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 28px;
        height: 28px;
      }

.character-tabs #characters li.object-row .row-icon svg {
          width: 18px;
          height: 18px;
        }

.character-tabs #characters li.object-row .row-attached {
        display: none;
        flex: none;
        color: var(--accent);
      }

.character-tabs #characters li.object-row .row-attached svg {
          width: 12px;
          height: 12px;
        }

.character-tabs #characters li.object-row.is-attached .row-attached {
        display: flex;
      }

.character-tabs #characters li.object-row .row-toggle,
      .character-tabs #characters li.object-row .row-more {
        flex: none;
        width: 26px;
        height: 26px;
        border-radius: 6px;
        color: rgba(0, 0, 0, 0.5);
      }

.character-tabs #characters li.object-row .row-toggle svg, .character-tabs #characters li.object-row .row-more svg {
          width: 15px;
          height: 15px;
          stroke-width: 1.75;
        }

.character-tabs #characters li.object-row .row-toggle:hover, .character-tabs #characters li.object-row .row-more:hover {
          background: rgba(0, 0, 0, 0.06);
          color: inherit;
        }

/* "…" is always there; eye and lock only while switched on
         (Hide and Lock live in the menus and on H and K) */

.character-tabs #characters li.object-row .row-toggle {
        display: none;
      }

.character-tabs #characters li.object-row.is-hidden .row-toggle[data-shortcut="hide"],
      .character-tabs #characters li.object-row.is-locked .row-toggle[data-shortcut="lock"] {
        display: flex;
        color: var(--accent);
      }

.character-tabs #characters li.object-row.is-hidden .row-select {
        opacity: 0.45;
      }

.character-tabs #characters li.object-row.active {
        box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0, 0, 0, 0.1);
      }

.dark .character-tabs #characters li.object-row {
  color: #ececec;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark .character-tabs #characters li.object-row .row-toggle,
  .dark .character-tabs #characters li.object-row .row-more {
    color: rgba(255, 255, 255, 0.55);
  }

.dark .character-tabs #characters li.object-row .row-toggle:hover, .dark .character-tabs #characters li.object-row .row-more:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }

.dark .character-tabs #characters li.object-row.active {
    box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0, 0, 0, 0.4);
  }

/*
  Popup menus built by CoolGUI: base layout and behaviour only.
  Their look (panel, tabs, rows, buttons) lives in menubar.css.
*/

.popup-menu {
  display: none;
  flex-flow: column nowrap;
  position: absolute;
  overflow-y: auto;
  overscroll-behavior: none;
  touch-action: pan-y;
  list-style: none;
  z-index: 5;

  /* Overflow should scroll, rather than compressing controls and text. */
}

.popup-menu > * {
    flex-shrink: 0;
  }

.popup-menu.is-active {
    display: flex;
  }

.popup-menu h2 {
    text-align: center;
  }

.popup-menu .panel-tabs {
    display: flex;
  }

.popup-menu a {
    text-decoration: none;
  }

.popup-menu .panel-block {
    display: flex;
    align-items: center;
  }

.popup-menu .panel-block > * {
      min-width: 0;
    }

.popup-menu .panel-block button:not(.delete) {
      width: 100%;
      margin-bottom: 10px;
    }

.popup-menu .panel-block .delete {
      border: none;
      border-radius: 50%;
      padding: 0;
      cursor: pointer;
      flex: none;
    }

.popup-menu .panel-block .delete:before {
        content: "\00d7";
        font-weight: 300;
        font-family: Arial, sans-serif;
      }

/* Collapsible groups in menus (CoolGUI addAccordion); styled in menubar.css */

.accordion {
    cursor: pointer;
    width: 100%;
    /* After the plain rows in a menu */
    order: 1;
}

.accordion .header {
        margin: 0;
    }

.accordion .items {
        display: none;
        overflow: hidden;
    }

.accordion .items.active {
            display: block;
        }

.accordion .items .panel-block {
            font-weight: normal;
        }

/* Small gap before each prop's thumbnail */

#props-menu .panel-block:before {
    content: '';
    padding-right: 5px;
}

.popup-container {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.popup {
  display: none;
  background: var(--panel-bg);
  -webkit-backdrop-filter: var(--panel-blur);
  backdrop-filter: var(--panel-blur);
  width: 80vw;
  max-width: 420px;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  overscroll-behavior: none;
  touch-action: pan-y;
  padding: 20px 24px;
  border: 0.5px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
  font-family: var(--ui-font);
  font-size: 13px;
  z-index: 1;
  pointer-events: all;
}

.popup h2 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
  }

.popup label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
  }

.popup .text-input {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 8px;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font: inherit;
    line-height: 1.6;
  }

/* The old brand button: a hard shadow that it presses into */

.popup .button {
    float: right;
    padding: 4px 16px;
    border: 1px solid var(--blackish);
    border-radius: 6px;
    box-shadow: var(--brand-shadow);
    background: var(--yolo-yellow);
    color: var(--blackish);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
  }

.popup .button:hover {
      box-shadow: var(--brand-shadow-half);
      transform: translate(1px, 1px);
    }

.popup .button:active {
      box-shadow: none;
      transform: translate(2px, 2px);
    }

.popup a {
    color: var(--hot-pink);
    text-decoration: none;
  }

.popup a:hover {
      text-decoration: none;
      color: var(--tasty-teal);
    }

.popup svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

.popup.is-active {
    display: flow-root;
    animation: bounce-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  }

/* The original menus' springy entrance, kept for popups and the upgrade panel */

@keyframes bounce-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dark .popup,
.dark #alert {
  color: #ececec;
}

:is(.dark .popup,.dark #alert) .text-input {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    color: inherit;
  }

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.shortcuts-table td {
    padding: 4px 0;
  }

.shortcuts-table td:first-child {
    padding-right: 16px;
  }

.shortcuts-table kbd {
    display: inline-block;
    white-space: nowrap;
    margin: 1px 0;
    padding: 1px 6px;
    border: 0.5px solid var(--panel-border);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--panel-border);
    font-family: inherit;
    font-size: 0.85em;
  }

#redesign-popup p {
  margin: 0 0 16px;
  line-height: 1.5;
}

#redesign-popup .signoff {
  margin-bottom: 20px;
  font-family: var(--niche-font);
  font-size: 14px;
}

#redesign-popup a {
  color: var(--accent);
  font-weight: 500;
}

#redesign-popup a:hover {
  color: var(--accent-hover);
}

#welcome-popup h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}

#welcome-popup ul {
  margin: 0 0 16px;
  padding-left: 18px;
  line-height: 1.5;
}

#welcome-popup li {
  margin-bottom: 4px;
}

#welcome-popup .inline-icon {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Inspector-style panel, like a macOS floating palette */

#adjustable-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(46px + env(safe-area-inset-top));
    margin: 0 8px;
    z-index: 10;
    width: min(260px, calc(100vw - 16px));
    box-sizing: border-box;
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
    overscroll-behavior: none;
    padding: 4px 12px 12px;
    border: 0.5px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
    background-color: var(--panel-bg);
    -webkit-backdrop-filter: var(--panel-blur);
    backdrop-filter: var(--panel-blur);
    font-family: var(--ui-font);
    font-size: 13px;
}

#adjustable-panel.is-active {
        display: block;
        animation: menu-appear 0.12s ease-out both;
    }

#adjustable-panel .adjustable-group {
        margin-top: 12px;
        padding: 2px 0;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.55;
    }

#adjustable-panel .adjustable-row {
        display: block;
        padding: 3px 0;
    }

#adjustable-panel .adjustable-row span {
            display: block;
        }

#adjustable-panel .adjustable-row input[type="range"] {
            width: 100%;
        }

/* Saved presets: name applies it, x deletes it */

#adjustable-panel .adjustable-preset {
        display: flex;
        align-items: center;
        margin-top: 2px;
        border-radius: 6px;
    }

#adjustable-panel .adjustable-preset:hover {
            background: rgba(127, 127, 127, 0.15);
        }

#adjustable-panel .adjustable-preset button {
            padding: 5px 6px;
            background: none;
            border: none;
            color: inherit;
            font-family: inherit;
            font-size: 13px;
            text-align: left;
            cursor: pointer;
        }

#adjustable-panel .adjustable-preset button:first-child {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

#adjustable-panel .adjustable-preset svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            opacity: 0.5;
        }

/* Secondary push button, matching the menus */

#adjustable-panel button.button {
        width: 100%;
        height: 28px;
        margin-top: 12px;
        padding: 0 10px;
        border: 0.5px solid rgba(0, 0, 0, 0.15);
        border-radius: 6px;
        box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.12);
        background: #fff;
        color: inherit;
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
    }

#adjustable-panel button.button:hover {
            transform: none;
            background: #f4f4f5;
        }

.dark #adjustable-panel {
    color: #ececec;
}

.dark #adjustable-panel button.button {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }

.dark #adjustable-panel button.button:hover {
            background: rgba(255, 255, 255, 0.18);
        }

/* Character menu: group the adjustable models in a highlighted box */

#character-menu .panel-block.adjustable-callout {
        display: block;
        margin-top: 4px;
        padding: 8px 10px;
        border: 2px solid var(--hot-pink);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        background: var(--chilled-pink);
        font-size: 13px;
        line-height: 1.35;
        cursor: default;
    }

#character-menu .panel-block.adjustable-item {
        padding-left: 8px;
        border-left: 2px solid var(--hot-pink);
        border-right: 2px solid var(--hot-pink);
        /* Square middle rows; menu rows are otherwise rounded, which breaks the box's sides */
        border-radius: 0;
    }

#character-menu .panel-block.adjustable-item.last {
            margin-bottom: 10px;
            border-bottom: 2px solid var(--hot-pink);
            border-radius: 0 0 12px 12px;
        }

.dark #character-menu .panel-block.adjustable-callout {
    background: #4a1f38;
}

/* Opened from the adjustable panel, so it must sit above it */

#save-body-type-popup {
    z-index: 11;
}

#scale-bar {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    z-index: 10;
    width: min(420px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 8px 14px;
    align-items: center;
    gap: 10px;
    background: var(--panel-bg);
    -webkit-backdrop-filter: var(--panel-blur);
    backdrop-filter: var(--panel-blur);
    border: 0.5px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
    font-family: var(--ui-font);
    font-size: 13px;
}

#scale-bar.is-active {
        display: flex;
    }

@media only screen and (min-width: 769px) {

#scale-bar {
        bottom: 16px;
}
    }

#scale-bar input[type="range"] {
        flex: 1;
        min-width: 0;
    }

#scale-bar output {
        width: 34px;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

.dark #scale-bar {
    color: #ececec;
}

.obit-controls-gizmo {
	position: absolute;
    bottom: 70px;
	right: 10px;
    z-index: 0;
    background-color: #FFF0;
    border-radius: 100%;
    transition: background-color .15s linear;
    cursor: pointer;
    user-select: none;
}

@media only screen and (min-width: 769px) {

.obit-controls-gizmo {
        bottom: 12px;
}
    }

.obit-controls-gizmo.dragging, .obit-controls-gizmo:hover  {
    background-color: #FFF3;

}

.obit-controls-gizmo.inactive {
    pointer-events: none;
    background-color: #FFF0 !important;
}

#drop-overlay {
    position: absolute;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(42, 215, 215, 0.8);
    z-index: 2;
}

#drop-overlay .box {
        max-width: 400px;
        width: 90%;
        height: 400px;
        border: 2px dashed #fff;
        border-radius: 20px;
        color: #fff;
        background-color: rgba(42, 215, 215, 0.9);
        text-align: center;
    }

#drop-overlay .box #drop-text, #drop-overlay .box ul {
            text-align: left;
            padding: 0 75px;
        }

.hand-editor {
    display: none;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
}

.hand-editor .overlay {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        background: rgba(1, 201, 215, 0.81);
        pointer-events: all;
        cursor: not-allowed;
        transition: all 0.5s ease;
    }

@media only screen and (min-width: 768px) {

.hand-editor .overlay {
            flex-direction: column;
    }
        }

.hand-editor .overlay.top {
            top: 0;
            bottom: unset;
        }

.hand-editor .overlay.bottom {
            top: unset;
            bottom: 0;
        }

.hand-editor .overlay.right {
            left: unset;
            right: 0;
        }

.hand-editor .overlay.left {
            right: unset;
            left: 0;
        }

.hand-editor .close {
        position: absolute;
        bottom: 20px;
        right: calc(50% - 95px);
        z-index: 4;
        pointer-events: all;
    }

#alert {
    position: absolute;
    top: -350vh;
    left: 7px;
    right: 7px;
    max-width: 500px;
    margin: 0 auto;
    z-index: 3;
    background-color: var(--panel-bg);
    -webkit-backdrop-filter: var(--panel-blur);
    backdrop-filter: var(--panel-blur);
    padding: 14px 18px;
    border: 0.5px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
    font-family: var(--ui-font);
    font-size: 13px;
    text-align: center;
    transition: 1s ease-in-out;
    cursor: pointer;
}

#alert.visible {
        top: calc(48px + env(safe-area-inset-top));
    }

#alert svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        width: 18px;
        height: 18px;
    }

.app-banner,
.instructions-banner {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    align-items: center;
    background-color: #f7f7f7;
    padding: 10px 15px;
    font-size: 14px;
    user-select: none;
    transition: margin 0.3s ease-in-out;
    z-index: 100;
}

.app-banner {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    max-height: 82px;
    padding-left: 0;
    border-bottom: 1px solid #ebebeb;
}

.app-banner.hidden {
    margin-top: -90px;
}

.app-icon {
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    background-color: #e0e0e0;
    background-size: contain;
    border-radius: 15px;
    margin-right: 15px;
    border: 1px solid #ebebeb;
}

.app-info {
    flex-grow: 1;
    cursor: default;
}

.app-title {
    font-size: 18px;
    opacity: 1;
}

.app-subtitle {
    opacity: 0.5;
}

.get-button {
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 15px;
    font-size: 16px;
    cursor: pointer;
}

.get-button:active {
    background-color: #a8c6fe;
}

.instructions-banner {
    max-height: 200px;
    flex-flow: column nowrap;
    position: fixed;
    bottom: 0px;
    right: 0px;
    left: 0px;
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
    text-align: center;
}

.instructions-banner.hidden {
    margin-bottom: -220px;
}

.instructions-banner img {
    height: 16px;
    width: 16px;
    margin-bottom: -3px;
}

.instructions-banner a {
    color: #007aff;
    text-decoration: none;
}

.close-button {
    font-size: 24px;
    padding: 8px;
    opacity: 0.5;
    cursor: pointer;
}

.instructions-banner .close-button {
    position: absolute;
    top: 0;
    right: 8px;
    padding: 0;
}

/*
  macOS-style menu bar: text menus on the left, tool controls on the right.
  Below 1024px it becomes compact: the menus scroll sideways, open as full-width
  sheets, and the tools move to a floating pill at the bottom (thumb reach).
*/

.menubar {
  --bar-height: 38px;
  --dropdown-gap: 4px;
  --bar-bg: rgba(250, 250, 250, 0.78);
  --bar-border: rgba(0, 0, 0, 0.1);
  --bar-text: #1d1d1f;
  --bar-hover: rgba(0, 0, 0, 0.07);
  --menu-muted: rgba(0, 0, 0, 0.45);
  --control-bg: rgba(0, 0, 0, 0.06);
  --control-active: #fff;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--bar-height) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 6px;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  border-bottom: 0.5px solid var(--bar-border);
  color: var(--bar-text);
  font-family: var(--ui-font);
  font-size: 13px;
  z-index: 5;
  -webkit-font-smoothing: antialiased;

  /* The blur lives on a pseudo-element so the bar doesn't become the
     containing block for the fixed-position sheets on small screens */
}

.menubar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }

.menubar button {
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
  }

.menubar-logo {
  flex: none;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  /* A link, so take the bar's text colour rather than link blue */
  color: inherit;
  background-color: currentColor;
  -webkit-tap-highlight-color: transparent;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.menubar-logo:hover {
    opacity: 0.7;
  }

.menubar-menus {
  display: flex;
  align-items: center;
  min-width: 0;
}

.menubar-item {
  position: relative;
  flex: none;
}

.menubar-title {
  height: 24px;
  padding: 0 9px;
  border: none;
  border-radius: 5px;
  background: none;
  white-space: nowrap;
  cursor: pointer;
}

.menubar-title:hover,
  .menubar-title.is-active {
    background: var(--bar-hover);
  }

.menubar-title:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

/* ---------- Toolbar ---------- */

.menubar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.segmented {
  display: flex;
  padding: 2px;
  gap: 2px;
  border-radius: 7px;
  background: var(--control-bg);
}

.menubar-tools .tool-button {
  width: 30px;
  height: 24px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--bar-text);
  cursor: pointer;
}

.menubar-tools .tool-button svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.75;
  }

.menubar-tools .tool-button:hover {
    background: var(--control-bg);
  }

.menubar-tools .tool-button.is-active {
    background: var(--control-active);
    color: var(--accent);
    box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.2);
  }

.menubar-tools .tool-button .tooltip {
    top: 32px;
    font-family: inherit;
  }

/* Hidden until License shows it for free accounts (inline display) */

.menubar #upgrade-button {
  display: none;
  height: 24px;
  padding: 0 12px;
  border: 1px solid var(--blackish);
  border-radius: 6px;
  box-shadow: var(--brand-shadow);
  background: var(--yolo-yellow);
  color: var(--blackish);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  align-items: center;

  /* The old brand button: a hard shadow that it presses into */
}

.menubar #upgrade-button:hover {
    box-shadow: var(--brand-shadow-half);
    transform: translate(1px, 1px);
  }

/* Nudge free users every couple of minutes (class added from index.js) */

.menubar #upgrade-button.pulse {
    animation: upgrade-pulse 1.2s ease-in-out;
  }

.menubar #upgrade-button:active,
  .menubar #upgrade-button.is-active {
    box-shadow: none;
    transform: translate(2px, 2px);
  }

/* Mirror posing and lock camera change how everything behaves, so they glow pink while on */

.menubar-tools :is(#mirror-posing, #lock-camera).is-active {
  background: var(--chilled-pink);
  color: var(--hot-pink);
}

.dark .menubar-tools :is(#mirror-posing, #lock-camera).is-active {
  background: color-mix(in srgb, var(--hot-pink) 22%, transparent);
  color: #ff6fd0;
}

/* ---------- Drop-down menus ---------- */

.menubar .popup-menu {
  top: calc(100% + 7px + var(--dropdown-gap));
  left: 0;
  margin: 0;
  padding: 5px;
  min-width: 230px;
  max-height: calc(100dvh - var(--bar-height) - 24px);
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  border: 0.5px solid var(--panel-border);
  border-radius: 9px;
  background: var(--panel-bg);
  -webkit-backdrop-filter: var(--panel-blur);
  backdrop-filter: var(--panel-blur);
  box-shadow: var(--panel-shadow);
  color: var(--bar-text);
  font-size: 13px;
  line-height: 1.35;
}

.menubar .popup-menu.is-active {
    animation: menu-appear 0.12s ease-out both;
  }

.menubar .popup-menu.right {
    left: auto;
    right: 0;
  }

.menubar .popup-menu h2 {
    font-size: 13px;
    font-weight: 500;
    margin: 8px;
  }

/* The menu title already names the menu */

.menubar .popup-menu .panel-heading {
    display: none;
  }

.menubar .popup-menu .panel-tabs {
    justify-content: stretch;
    gap: 2px;
    margin: 2px 2px 6px;
    padding: 2px;
    border-radius: 7px;
    background: var(--control-bg);
  }

.menubar .popup-menu .panel-tabs a {
      flex: 1;
      padding: 3px 6px;
      border-radius: 5px;
      text-align: center;
      font-size: 12px;
      white-space: nowrap;
      cursor: pointer;
    }

.menubar .popup-menu .panel-tabs a.is-active {
        background: var(--control-active);
        box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.2);
      }

.menubar .popup-menu .panel-block {
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: default;

    /* Clickable rows, buttons, and the switches in Settings */
  }

.menubar .popup-menu .panel-block:is(a),
    .menubar .popup-menu .panel-block label,
    .menubar .popup-menu .panel-block .switch input,
    .menubar .popup-menu .panel-block .button {
      cursor: pointer;
    }

/* Rows highlight on hover; rows that only wrap a button don't */

.menubar .popup-menu .panel-block:is(a):not(:has(.button)):hover {
      background: var(--accent);
      color: #fff;
    }

.menubar .popup-menu .panel-block:is(a):not(:has(.button)):hover .delete {
        color: #fff;
      }

.menubar .popup-menu .panel-block.stacked {
      gap: 4px;
      padding: 6px 8px;
    }

.menubar .popup-menu .panel-block .button {
      margin: 2px 0;
      padding: 4px 10px;
      border: 0.5px solid rgba(0, 0, 0, 0.15);
      border-radius: 6px;
      box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.12);
      background: #fff;
      color: var(--bar-text);
      font-family: inherit;
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
    }

.menubar .popup-menu .panel-block .button:hover {
        transform: none;
        background: #f4f4f5;
      }

.menubar .popup-menu .panel-block .button.pink {
        background: var(--accent);
        border-color: transparent;
        color: #fff;
      }

.menubar .popup-menu .panel-block .button.pink:hover {
          background: var(--accent-hover);
        }

/* Primary actions (Get Pro, Take screenshot) keep the old brand button */

.menubar .popup-menu .panel-block .button.yellow {
        border: 1px solid var(--blackish);
        box-shadow: var(--brand-shadow);
        background: var(--yolo-yellow);
        color: var(--blackish);
        font-weight: 600;
      }

.menubar .popup-menu .panel-block .button.yellow:hover {
          box-shadow: var(--brand-shadow-half);
          transform: translate(1px, 1px);
        }

.menubar .popup-menu .panel-block .button.yellow:active {
          box-shadow: none;
          transform: translate(2px, 2px);
        }

/* Two equal buttons side by side (Export / Import) */

.menubar .popup-menu .panel-block > .button.small {
      flex: 1;
      width: auto;
      margin: 2px 0 4px;
      font-size: 12px;
    }

.menubar .popup-menu .panel-block > .button.small:last-child {
        margin-left: 8px;
      }

/* Hand poses: name, then Left / Right */

.menubar .popup-menu .panel-block.double-button {
      justify-content: flex-start;
      gap: 6px;
      text-align: left;
    }

.menubar .popup-menu .panel-block.double-button span {
        flex: 1;
        min-width: 0;
      }

.menubar .popup-menu .panel-block.double-button .button {
        width: 52px;
        margin: 0;
        padding: 2px 0;
        font-size: 12px;
      }

.menubar .popup-menu .panel-block.double-button .button.pink {
        background: #fff;
        border-color: rgba(0, 0, 0, 0.15);
        color: var(--bar-text);
      }

.menubar .popup-menu .panel-block.double-button .button.mint {
        background: #fff;
      }

/* Row delete: a quiet ×, emphasised on hover */

.menubar .popup-menu .panel-block .delete {
      width: 18px;
      height: 18px;
      background: none;
      color: var(--menu-muted);
      opacity: 0.7;
    }

.menubar .popup-menu .panel-block .delete:before {
        color: currentColor;
        font-size: 16px;
      }

.menubar .popup-menu .panel-block .delete:hover {
        background: rgba(0, 0, 0, 0.12);
        opacity: 1;
      }

.menubar .popup-menu .thumbnail {
    width: 40px;
    height: 40px;
  }

.menubar .popup-menu .thumbnail.icon {
      width: 18px;
      height: 18px;
    }

.menubar .popup-menu .accordion {
    font-weight: 500;
  }

.menubar .popup-menu .accordion .header {
      padding: 4px 8px;
      border-radius: 5px;

      /* Disclosure chevron */
    }

.menubar .popup-menu .accordion .header:before {
        content: "";
        display: inline-block;
        width: 5px;
        height: 5px;
        margin: 0 9px 1px 1px;
        border-right: 1.5px solid var(--menu-muted);
        border-bottom: 1.5px solid var(--menu-muted);
        transform: rotate(-45deg);
        transition: transform 0.12s;
      }

.menubar .popup-menu .accordion .header:hover {
        background: var(--control-bg);
      }

.menubar .popup-menu .accordion.active .header:before {
      transform: rotate(45deg);
    }

.menubar .popup-menu .accordion .items .panel-block {
      padding-left: 22px;
    }

.menubar .popup-menu .text-input {
    width: 100%;
    box-sizing: border-box;
    padding: 3px 6px;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    line-height: 1.6;
    font: inherit;
  }

.menubar .popup-menu input[type="range"] {
    width: 100%;
  }

/* A section heading inside a menu (e.g. Account in Settings) */

.menubar .popup-menu .panel-block.menu-section {
  min-height: 0;
  margin-top: 6px;
  padding: 10px 8px 2px;
  border-top: 0.5px solid var(--panel-border);
  border-radius: 0;
  color: var(--menu-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: default;
}

#hand-pose-menu,
#pose-menu,
#scene-menu,
#options-menu {
  min-width: 290px;
}

/* Native-style command lists (Edit, View, Help) */

.menubar .menu-list {
  min-width: 240px;
}

.menubar .menu-list hr {
    margin: 5px 10px;
    border: none;
    border-top: 0.5px solid var(--panel-border);
  }

.menu-list-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  width: 100%;
  height: 24px;
  padding: 0 10px 0 6px;
  border: none;
  border-radius: 5px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.menu-list-item:disabled {
    cursor: default;
  }

.menu-list-item .check {
    font-size: 11px;
  }

.menu-list-item .shortcut {
    padding-left: 24px;
    color: var(--menu-muted);
    letter-spacing: 0.05em;
  }

.menu-list-item:not(:disabled):hover {
    background: var(--accent);
    color: #fff;
  }

.menu-list-item:not(:disabled):hover .shortcut {
      color: inherit;
      opacity: 0.85;
    }

.menu-list-item:disabled {
    opacity: 0.35;
  }

/* Keyboard shortcuts mean little on a touchscreen */

@media (hover: none) {
    .menu-list-item .shortcut {
      display: none;
    }
  }

/* Extra detail at the end of a menu row (version, supported formats), muted like a shortcut */

.menu-detail {
  margin-left: auto;
  padding-left: 16px;
  color: var(--menu-muted);
  font-variant-numeric: tabular-nums;
}

/* Small "voice" moments get the old typewriter font */

.menu-detail.app-version-number {
  font-family: var(--niche-font);
  font-size: 12px;
}

.menubar .popup-menu .panel-block.empty-state {
  padding: 10px;
  color: var(--menu-muted);
  font-family: var(--niche-font);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.panel-block:is(a):hover .menu-detail {
  color: inherit;
  opacity: 0.85;
}

.menubar .popup-menu .panel-block.app-version {
  display: flex;
}

/* A labelled slider inside a command list (View menu lighting) */

.menu-list-slider {
  display: block;
  padding: 4px 12px 4px 22px;
}

.menu-list-slider .label {
    display: block;
    margin-bottom: 2px;
  }

.menu-list-slider input[type="range"] {
    width: 100%;
    margin: 0;
  }

/* Object context menu: opens at the pointer, not as a sheet */

.menubar #object-menu,
.menubar #object-menu.right {
  position: fixed;
  right: auto;
  width: max-content !important;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  z-index: 20;
}

/* Colour palette, shown in the object menu */

.color-palette {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  gap: 6px;
  padding: 6px 10px;
}

.color-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  cursor: pointer;
}

.color-swatch:hover {
    transform: scale(1.12);
  }

.color-swatch.is-current {
    box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px #3a8ee6;
  }

.color-custom {
  cursor: pointer;
}

.color-custom input[type="color"] {
    width: 28px;
    height: 18px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }

@keyframes upgrade-pulse {
  0%, 50%, 100% {
    transform: scale(1);
  }
  25%, 75% {
    transform: scale(1.12);
  }
}

@keyframes menu-appear {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Compact layout (tablets, phones, narrow windows) ---------- */

@media only screen and (max-width: 1023px) {
  /* Shared by the bottom toolbar and the scale bar above it, so they line up */
  :root {
    --toolbar-width: min(314px, calc(100vw - 16px));
  }

  .menubar {
    --bar-height: 44px;
    padding-right: 0;
  }

  /* Menus scroll sideways; the clipped title at the edge hints there's more */
  .menubar-menus {
    flex: 1;
    align-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
  }

    .menubar-menus::-webkit-scrollbar {
      display: none;
    }

    .menubar-menus::after {
      content: "";
      flex: 0 0 8px;
    }

    /* Fade the right edge so the overflow reads as scrollable, until the end is reached.
       Dropped while a menu is open, as the mask would hide its fixed-position sheet too. */
    .menubar-menus.has-more:not(:has(.popup-menu.is-active)) {
      -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
      mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    }

  .menubar-title {
    height: 32px;
    padding: 0 10px;
    font-size: 15px;
  }

  /* Menus open as sheets spanning the screen width */
  .menubar .popup-menu,
  .menubar .popup-menu.right {
    position: fixed;
    top: calc(var(--bar-height) + env(safe-area-inset-top) + var(--dropdown-gap));
    left: 8px;
    right: 8px;
    width: auto !important;
    min-width: 0;
    max-width: 480px;
    max-height: calc(100dvh - var(--bar-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 84px);
    font-size: 15px;
  }

  .menubar .menu-list {
    max-width: 320px;
  }

  .menu-list-item {
    height: 36px;
  }

  .menubar .popup-menu .panel-block {
    min-height: 32px;
  }

  .menubar .popup-menu .panel-tabs a {
    padding: 6px;
    font-size: 13px;
  }

  /* Tools float at the bottom, within thumb reach */
  .menubar-tools {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(10px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    width: var(--toolbar-width);
    justify-content: center;
    margin: 0 auto;
    padding: 4px;
    gap: 6px;
    border: 0.5px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
  }

    .menubar-tools::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      border-radius: inherit;
      background: var(--bar-bg);
      -webkit-backdrop-filter: saturate(180%) blur(20px);
      backdrop-filter: saturate(180%) blur(20px);
    }

    .menubar-tools .tool-button {
      width: 40px;
      height: 36px;
    }

      .menubar-tools .tool-button svg {
        width: 18px;
        height: 18px;
      }

    .menubar-tools .segmented {
      border-radius: 9px;
    }

    .menubar-tools .tool-button {
      border-radius: 7px;
    }

    /* The toolbar is at the bottom here, so tooltips go above it */
    .menubar-tools .tool-button .tooltip {
      top: auto;
      bottom: calc(100% + 10px);
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }

  /* Upgrade leads the menu titles here (moved by MenuBar.js); the margin leaves room for its pulse */
  .menubar #upgrade-button {
    height: 26px;
    margin: 0 6px 0 8px;
    font-size: 13px;
  }

  .character-tabs {
    --tabs-top: calc(47px + env(safe-area-inset-top));
  }

  /* Same height as the bottom toolbar it sits above */
  #scale-bar {
    width: var(--toolbar-width);
    height: 50px;
    bottom: calc(66px + env(safe-area-inset-bottom));
  }
}

/* Short screens (phones in landscape): tighter bar and rows, and sheets use the height */

@media only screen and (max-width: 1023px) and (max-height: 500px) {
  .menubar {
    --bar-height: 38px;
  }

  .menubar-title {
    height: 28px;
    font-size: 14px;
  }

  .menubar .popup-menu,
  .menubar .popup-menu.right {
    max-height: calc(100dvh - var(--bar-height) - env(safe-area-inset-top) - 14px);
    font-size: 14px;
  }

  .menu-list-item {
    height: 30px;
  }

  .menubar .popup-menu .panel-block {
    min-height: 28px;
  }

  .menubar #upgrade-button {
    height: 24px;
  }

  .character-tabs {
    --tabs-top: calc(41px + env(safe-area-inset-top));
  }

  /* End above the scale bar, which it would otherwise overlap */
  #adjustable-panel {
    max-height: calc(100dvh - 162px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

/* ---------- Dark mode ---------- */

.dark .menubar {
  --bar-bg: rgba(40, 40, 42, 0.78);
  --bar-border: rgba(0, 0, 0, 0.6);
  --bar-text: #ececec;
  --bar-hover: rgba(255, 255, 255, 0.1);
  --menu-muted: rgba(255, 255, 255, 0.45);
  --control-bg: rgba(255, 255, 255, 0.08);
  --control-active: rgba(255, 255, 255, 0.2);
}

.dark .menubar .tool-button.is-active {
    color: #fff;
  }

.dark .menubar .popup-menu .panel-block .button:not(.yellow, .pink), .dark .menubar .popup-menu .panel-block.double-button .button.pink {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.1);
      color: var(--bar-text);
    }

:is(.dark .menubar .popup-menu .panel-block .button:not(.yellow, .pink),.dark .menubar .popup-menu .panel-block.double-button .button.pink):hover {
        background: rgba(255, 255, 255, 0.18);
      }

.dark .menubar .popup-menu .delete:hover {
      background: rgba(255, 255, 255, 0.15);
    }

.dark .menubar .popup-menu .text-input {
      background: rgba(0, 0, 0, 0.25);
      border-color: rgba(255, 255, 255, 0.15);
      color: var(--bar-text);
    }

/* Settings: language picker as a segmented control */

.menubar .popup-menu .panel-block.languages {
  gap: 2px;
  margin: 0 2px 6px;
  padding: 2px;
  min-height: 0;
  border-radius: 7px;
  background: var(--control-bg);
}

.menubar .popup-menu .panel-block.languages a {
    flex: 1;
    padding: 3px 4px;
    border-radius: 5px;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
    color: inherit;
    cursor: pointer;
  }

.menubar .popup-menu .panel-block.languages a:hover {
      background: var(--control-bg);
    }

.menubar .popup-menu .panel-block.languages a.is-active {
      background: var(--control-active);
      box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.2);
    }

/* Props: a divider between the upload actions and the prop groups */

#props-menu > div.accordion:first-of-type {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 0.5px solid var(--panel-border);
}

/*
  One way to mark Pro features, everywhere.

  - Anything that needs Pro carries the `pro-feature` class (rows, accordion
    headers, icon buttons), or a `.pro-badge` span inside its label (buttons).
  - Whole sections that need Pro get one `.pro-notice` row at the top instead
    of badging every control inside.
  - License toggles `has-pro` on <body>; once it's there every mark disappears.
*/

.pro-badge,
.panel-block.pro-feature::after,
.accordion.pro-feature > .header::after {
  content: "Pro";
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 16px;
  padding: 0 5px;
  border: 1px solid var(--blackish);
  border-radius: 4px;
  /* Brand yellow badge with a tiny hard shadow, like the original buttons */
  box-shadow: 1px 1px 0 var(--blackish);
  background: var(--yolo-yellow);
  color: var(--blackish);
  font: 700 10px/1 var(--ui-font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* Trailing badge on rows and accordion headers */

.panel-block.pro-feature::after,
.accordion.pro-feature > .header::after {
  margin-left: auto;
  padding-left: 5px;
}

.accordion.pro-feature > .header {
  display: flex;
  align-items: center;
}

/* Inline badge after a button label */

.button .pro-badge {
  margin-left: 6px;
}

/* On accent-coloured buttons */

.button.pink .pro-badge {
  box-shadow: none;
}

/* Small icon buttons: a dot in the corner */

button.pro-feature {
  position: relative;
}

button.pro-feature::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot-pink);
  box-shadow: 0 0 0 1.5px #fff;
}

/* One notice for a section that is entirely Pro. Scoped to the menus so it
   outranks their general row padding and rounding. */

.menubar .popup-menu .panel-block.pro-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 6px;
  padding: 8px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--chilled-pink) 40%, transparent);
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
}

.menubar .popup-menu .panel-block.pro-notice:hover {
    background: color-mix(in srgb, var(--chilled-pink) 60%, transparent);
  }

.menubar .popup-menu .panel-block.pro-notice .pro-notice-text {
    flex: 1;
  }

.dark .pro-badge,
  .dark .panel-block.pro-feature::after,
  .dark .accordion.pro-feature > .header::after {
    box-shadow: 1px 1px 0 #000;
  }

.dark .menubar .popup-menu .panel-block.pro-notice {
    background: color-mix(in srgb, var(--chilled-pink) 12%, transparent);
  }

.dark .menubar .popup-menu .panel-block.pro-notice:hover {
      background: color-mix(in srgb, var(--chilled-pink) 22%, transparent);
    }

.dark .menubar #upgrade-menu #ppp:not(:empty) {
    background: color-mix(in srgb, var(--fresh-mint) 12%, transparent);
  }

.dark button.pro-feature::after {
    box-shadow: 0 0 0 1.5px #2c2c2e;
  }

/* Pro users see none of it */

.has-pro .pro-badge,
  .has-pro .pro-notice {
    display: none !important;
  }

.has-pro .pro-feature::after,
  .has-pro .pro-feature > .header::after {
    content: none !important;
  }

/* ---------- Upgrade menu ---------- */

.menubar #upgrade-menu {
  width: 340px;
  padding: 8px;

  /* Springs open from the Upgrade button, like the original menus */
}

.menubar #upgrade-menu.is-active {
    transform-origin: top right;
    animation: bounce-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  }

.menubar #upgrade-menu .panel-block {
    cursor: default;
  }

.menubar #upgrade-menu .panel-block:is(a):hover {
    background: none;
    color: inherit;
  }

/* Pitch: hero, title, benefits */

.menubar #upgrade-menu .upgrade-pitch {
    display: block;
    padding: 0 6px;
  }

.menubar #upgrade-menu .upgrade-hero {
    display: block;
    width: calc(100% + 12px);
    max-width: none;
    max-height: 170px;
    margin: 0 -6px 14px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--chilled-electric);
  }

.menubar #upgrade-menu .upgrade-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

.menubar #upgrade-menu .upgrade-tagline {
    margin: 2px 0 12px;
    color: var(--menu-muted);
  }

.menubar #upgrade-menu .upgrade-features {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
  }

.menubar #upgrade-menu .upgrade-features li {
      position: relative;
      padding: 3px 0 3px 22px;
    }

.menubar #upgrade-menu .upgrade-features li::before {
      content: "✓";
      position: absolute;
      left: 2px;
      color: var(--hot-pink);
      font-weight: 700;
    }

.menubar #upgrade-menu #ppp:not(:empty) {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--fresh-mint) 60%, transparent);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
  }

/* One clear primary action */

.menubar #upgrade-menu .panel-block .button.yellow {
    width: 100%;
    height: 34px;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
  }

/* Already a member: key + Activate on one line */

.menubar #upgrade-menu .panel-block.license-key {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin-top: 8px;
    padding: 12px 6px 0;
    border-top: 0.5px solid var(--panel-border);
    border-radius: 0;
  }

.menubar #upgrade-menu .panel-block.license-key h4 {
      grid-column: 1 / -1;
      margin: 0;
      font-size: 13px;
      font-weight: 600;
    }

.menubar #upgrade-menu .panel-block.license-key .text-input {
      height: 28px;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12px;
    }

.menubar #upgrade-menu .panel-block.license-key .text-input:focus {
      outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
      outline-offset: 0;
      border-color: var(--accent);
    }

.menubar #upgrade-menu .panel-block.license-key button.button {
      width: auto;
      height: 28px;
      margin: 0;
      padding: 0 14px;
    }

.menubar #upgrade-menu .upgrade-hint {
    padding: 4px 6px 2px;
    min-height: 0;
    color: var(--menu-muted);
    font-size: 11px;
  }

@media only screen and (max-width: 1023px) {
  .menubar #upgrade-menu {
    width: auto;

    /* 16px stops iOS zooming the page when the field gets focus */
  }
    .menubar #upgrade-menu .panel-block.license-key :is(.text-input, button.button) {
      height: 36px;
      font-size: 16px;
    }
}

html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--title-font);
  color: var(--blackish);
  background-color: #fff;
  margin: 0px;
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  /* Allow vertical scrolling in panels, without browser pinch zoom. */
  touch-action: pan-y;
  user-select: none;
}

canvas {
  display: block;
  outline: none;
  touch-action: none;
}

.selectable {
  user-select: all;
}

.stacked {
  flex-flow: column nowrap;
  align-items: stretch !important;
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-right: 5px;
}

.thumbnail.icon {
    width: 18px;
    height: 18px;
    text-align: center;
  }

.thumbnail.icon svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

img {
  max-width: 50px;
  max-height: 50px;
}

.delete {
  margin-left: auto;
}

#options-menu .panel-block {
  justify-content: space-between !important;
}

/** Slider styles: native control, tinted with the accent colour **/

input[type="range"] {
  touch-action: none;
  flex-shrink: 0;
  box-sizing: border-box;
  max-width: 100%;
  width: 230px;
  margin: 4px 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/** Switch styles **/

/* The switch - the box around the slider */

.switch {
  margin-left: 5px;
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

/* Hide default HTML checkbox */

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.1s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.1s;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:focus-visible + .slider {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Rounded sliders */

.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Text input */

.text-input {
  width: 95%;
  border: 2px solid;
  line-height: 2;
  border-radius: 5px;
}

/* DARK MODE STYLES */

.dark .thumbnail {
  color: #fff;
}


/*# sourceMappingURL=bundle.cfd69dedc00e1eb4d144.css.map*/