/* Shared image markup plugin UI. */
.plugin-overlay-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 121;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.plugin-overlay-dock > * {
  pointer-events: auto;
}

.plugin-overlay-dock.is-toolbar {
  left: 50%;
  right: auto;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(calc(100vw - 24px), 920px);
  max-width: calc(100vw - 24px);
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 22, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.plugin-overlay-dock.is-toolbar .annotate-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.plugin-overlay-dock.is-toolbar .annotate-tool-group {
  gap: 8px;
}

.plugin-overlay-dock.is-toolbar .annotate-tool-btn,
.plugin-overlay-dock.is-toolbar .chip {
  min-height: 42px;
}

.plugin-overlay-dock.is-toolbar .annotate-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #eef3fb;
}

.plugin-overlay-dock.is-toolbar .annotate-control-icon {
  font-size: 1rem;
  line-height: 1;
}

.plugin-overlay-dock.is-toolbar .annotate-color-control {
  gap: 10px;
}

.plugin-overlay-dock.is-toolbar .annotate-color-palette {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plugin-overlay-dock.is-toolbar .annotate-color-swatch {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  padding: 0;
  background: var(--annotate-swatch-color, #ff3b30);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.plugin-overlay-dock.is-toolbar .annotate-color-swatch.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(0, 0, 0, 0.26);
}

.plugin-overlay-dock.is-toolbar input[type="color"] {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.plugin-overlay-dock.is-toolbar input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.plugin-overlay-dock.is-toolbar input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.plugin-overlay-dock.is-toolbar input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.plugin-overlay-dock.is-toolbar input[type="range"] {
  width: 96px;
}

.plugin-dock-btn {
  width: auto;
  min-width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 18, 28, 0.72);
  color: #f4f7ff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.plugin-overlay-dock .chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(12, 18, 28, 0.72);
  color: #f4f7ff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.plugin-overlay-dock .chip.primary {
  border-color: rgba(122, 181, 255, 0.34);
  background: rgba(67, 115, 187, 0.34);
  color: #e8f2ff;
}

.plugin-overlay-image {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 90px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.annotate-stage {
  width: min(calc(100vw - 32px), 1200px);
  height: min(calc(100vh - 128px), 820px);
  min-height: 320px;
  background: #111723;
  border-radius: 18px;
  overflow: hidden;
}

.annotate-viewport {
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
}

.annotate-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid rgba(229, 230, 238, 0.16);
  background: rgba(10, 14, 22, 0.32);
  position: relative;
  z-index: 2;
}

.annotate-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.annotate-tool-btn {
  min-width: 58px;
}

.annotate-tool-btn.is-active {
  border-color: rgba(122, 181, 255, 0.34);
  background: rgba(67, 115, 187, 0.26);
  color: #e8f2ff;
}

.annotate-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eef3fb;
  font-size: 0.84rem;
}

.annotate-toolbar input[type="color"] {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
}

.annotate-toolbar input[type="range"] {
  width: 120px;
}

.plugin-overlay-hint {
  color: #b5c0d2;
  font-size: 0.8rem;
}

.annotate-canvas-wrap {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 12px;
  position: relative;
  touch-action: none;
}

.annotate-scene {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  will-change: transform;
  touch-action: none;
}

.annotate-canvas {
  display: block;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.34);
  touch-action: none;
  cursor: crosshair;
}

.annotate-keyboard-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  user-select: none;
}

.annotate-keyboard-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.annotate-loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #f3f7ff;
  font: 700 1rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.annotate-text-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  touch-action: none;
}

.annotate-text-layer.is-editing,
.annotate-text-layer.is-moving {
  pointer-events: auto;
}

.annotate-text-box {
  position: absolute;
  min-width: 56px;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  resize: none;
  overflow: visible;
  pointer-events: auto;
}

.annotate-text-box.is-selected {
  z-index: 3;
}

.annotate-text-resize-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(10, 14, 22, 0.82);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  z-index: 5;
}

.annotate-text-resize-handle.is-nw {
  top: -14px;
  left: -14px;
  cursor: nwse-resize;
}

.annotate-text-resize-handle.is-ne {
  top: -14px;
  right: -14px;
  cursor: nesw-resize;
}

.annotate-text-resize-handle.is-sw {
  bottom: -14px;
  left: -14px;
  cursor: nesw-resize;
}

.annotate-text-resize-handle.is-se {
  right: -14px;
  bottom: -14px;
  cursor: nwse-resize;
}

.annotate-text-box.is-selected .annotate-text-resize-handle,
.annotate-text-box.is-editing .annotate-text-resize-handle {
  opacity: 1;
  pointer-events: auto;
}

.annotate-text-box.is-editing .annotate-text-resize-handle {
  pointer-events: none;
}

.annotate-text-box.is-selected .annotate-text-input,
.annotate-text-box.is-editing .annotate-text-input {
  background: rgba(10, 14, 22, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.64), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.annotate-text-input {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border-radius: 8px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--annotate-text-color, #ff3b30);
  caret-color: var(--annotate-text-color, #ff3b30);
  font: 600 112px/1.18 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  overflow: hidden;
  white-space: pre;
}

.annotate-text-input::placeholder {
  color: color-mix(in srgb, var(--annotate-text-color, #ff3b30) 72%, transparent);
}

.annotate-text-box:not(.is-selected):not(.is-editing) .annotate-text-input {
  pointer-events: none;
}

/* Image Markup v2: UI derived from mockups/ios-markup-concept.html. */
.plugin-overlay-dock.is-toolbar:empty {
  display: none;
}

.annotate-v2-app {
  --annotate-v2-ink: #f8fafc;
  --annotate-v2-muted: rgba(248, 250, 252, 0.68);
  --annotate-v2-line: rgba(255, 255, 255, 0.16);
  --annotate-v2-panel: rgba(21, 23, 29, 0.74);
  --annotate-v2-panel-strong: rgba(12, 14, 19, 0.86);
  --annotate-v2-active: #0a84ff;
  --annotate-v2-nib: 18px;
  width: 100%;
  min-height: min(100vh, 920px);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  color: var(--annotate-v2-ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(10, 132, 255, 0.22), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(255, 214, 10, 0.12), transparent 28%),
    linear-gradient(150deg, #0b0d12 0%, #151821 52%, #090a0d 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  overflow: hidden;
}

.annotate-v2-app *,
.annotate-v2-app *::before,
.annotate-v2-app *::after {
  box-sizing: border-box;
}

.annotate-v2-top-bar {
  height: 52px;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  align-items: center;
  padding: 0 6px;
}

.annotate-v2-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.annotate-v2-bar-actions.is-right {
  justify-content: flex-end;
}

.annotate-v2-bar-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 18px;
  border: 1px solid var(--annotate-v2-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px) saturate(1.35);
  font-weight: 700;
  white-space: nowrap;
}

.annotate-v2-nav-button,
.annotate-v2-icon-button,
.annotate-v2-done-button,
.annotate-v2-add-button {
  border: 1px solid var(--annotate-v2-line);
  border-radius: 999px;
  color: var(--annotate-v2-ink);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.annotate-v2-nav-button {
  min-height: 38px;
  padding: 0 16px;
  color: #89c2ff;
  font-weight: 650;
}

.annotate-v2-done-button {
  min-height: 38px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(10, 132, 255, 0.86);
  border-color: rgba(158, 207, 255, 0.38);
  font-weight: 750;
}

.annotate-v2-icon-button,
.annotate-v2-add-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.annotate-v2-icon,
.annotate-v2-icon-button .annotate-keyboard-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.annotate-v2-stage-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  padding: 8px 4px;
}

.annotate-v2-stage {
  width: min(100%, 980px);
  height: min(100%, 650px);
  max-height: calc(100vh - 210px);
  aspect-ratio: 4 / 3;
  min-height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f7f2;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  touch-action: none;
}

.annotate-v2-stage .annotate-viewport {
  display: grid;
  place-items: center;
}

.annotate-v2-stage .annotate-canvas-wrap {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: #f6f7f2;
  border: 0;
  box-shadow: none;
}

.annotate-v2-stage .annotate-canvas {
  border-radius: 0;
  box-shadow: none;
}

.annotate-v2-stage .annotate-text-box.is-selected .annotate-text-input,
.annotate-v2-stage .annotate-text-box.is-editing .annotate-text-input {
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.96), 0 0 0 3px rgba(255, 255, 255, 0.32), 0 12px 34px rgba(0, 0, 0, 0.14);
}

.annotate-v2-stage .annotate-text-resize-handle {
  width: calc(40px * var(--annotate-inverse-scale, 1));
  height: calc(40px * var(--annotate-inverse-scale, 1));
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.annotate-v2-stage .annotate-text-resize-handle::after {
  content: "";
  width: var(--annotate-handle-visible-size, calc(16px * var(--annotate-inverse-scale, 1)));
  height: var(--annotate-handle-visible-size, calc(16px * var(--annotate-inverse-scale, 1)));
  border-radius: 999px;
  border: var(--annotate-handle-border-size, calc(2px * var(--annotate-inverse-scale, 1))) solid #ffffff;
  background: var(--annotate-v2-active);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26);
}

.annotate-v2-stage .annotate-text-resize-handle.is-nw {
  top: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
  left: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
}

.annotate-v2-stage .annotate-text-resize-handle.is-ne {
  top: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
  right: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
}

.annotate-v2-stage .annotate-text-resize-handle.is-sw {
  bottom: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
  left: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
}

.annotate-v2-stage .annotate-text-resize-handle.is-se {
  right: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
  bottom: var(--annotate-handle-outside-offset, calc(-28px * var(--annotate-inverse-scale, 1)));
}

.annotate-v2-floating-menu {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: 18px;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--annotate-v2-line);
  border-radius: 24px;
  background: rgba(14, 16, 22, 0.72);
  backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
}

.annotate-v2-floating-menu .annotate-v2-icon-button {
  box-shadow: none;
}

.annotate-v2-tool-popover {
  position: fixed;
  left: 50%;
  bottom: 102px;
  width: min(340px, calc(100vw - 34px));
  transform: translateX(-50%);
  padding: 14px;
  border-radius: 26px;
  border: 1px solid var(--annotate-v2-line);
  background: var(--annotate-v2-panel-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(30px) saturate(1.45);
  display: none;
  gap: 12px;
}

.annotate-v2-popover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.annotate-v2-preset {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.annotate-v2-preset::before {
  content: "";
  display: block;
  width: var(--annotate-v2-dot);
  height: var(--annotate-v2-dot);
  border-radius: 999px;
  background: var(--annotate-active-color, #ff3b30);
}

.annotate-v2-bottom-panel {
  justify-self: center;
  width: min(100%, 860px);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--annotate-v2-line);
  border-radius: 30px;
  background: var(--annotate-v2-panel);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(28px) saturate(1.5);
}

.annotate-v2-tool-strip,
.annotate-v2-quick-actions,
.annotate-v2-color-control .annotate-color-palette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.annotate-v2-tool-strip {
  padding: 4px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.annotate-v2-tool-btn {
  position: relative;
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  cursor: pointer;
}

.annotate-v2-text-tool-btn {
  width: auto;
  min-width: 92px;
  padding: 0 12px;
  font: 750 12px/1.05 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
}

.annotate-v2-center-btn {
  min-width: 72px;
}

.annotate-v2-tool-btn.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.annotate-v2-tool-btn.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--annotate-active-color, #ff3b30);
}

.annotate-v2-size-control {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.annotate-v2-nib-preview {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.annotate-v2-nib-preview::before {
  content: "";
  width: var(--annotate-v2-nib, 18px);
  height: var(--annotate-v2-nib, 18px);
  max-width: 28px;
  max-height: 28px;
  border-radius: 999px;
  background: var(--annotate-active-color, #ff3b30);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
}

.annotate-v2-size-slider {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 30px;
  background: transparent;
  accent-color: var(--annotate-active-color, #ff3b30);
}

.annotate-v2-size-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--annotate-active-color, #ff3b30));
}

.annotate-v2-size-slider::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: var(--annotate-active-color, #ff3b30);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34);
}

.annotate-v2-size-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), var(--annotate-active-color, #ff3b30));
}

.annotate-v2-size-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: var(--annotate-active-color, #ff3b30);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34);
}

.annotate-v2-color-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.annotate-v2-color-control input[type="color"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.annotate-v2-color-control .annotate-color-swatch {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--annotate-swatch-color, #ff3b30);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.24), 0 0 0 2px rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.annotate-v2-color-control .annotate-color-swatch.is-active {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), 0 0 0 3px #ffffff, 0 0 0 6px rgba(255, 255, 255, 0.16);
}

.annotate-v2-add-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
}

.annotate-v2-add-button input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
}

@media (max-width: 760px) {
  .annotate-v2-app {
    gap: 10px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: max(72px, env(safe-area-inset-bottom));
  }

  .annotate-v2-top-bar {
    height: 48px;
    grid-template-columns: auto 1fr auto;
  }

  .annotate-v2-bar-title {
    padding: 9px 12px;
    font-size: 0.94rem;
  }

  .annotate-v2-nav-button,
  .annotate-v2-done-button {
    min-height: 36px;
    padding: 0 12px;
  }

  .annotate-v2-stage {
    width: 100%;
    max-height: calc(100vh - 320px);
    border-radius: 15px;
  }

  .annotate-v2-floating-menu {
    top: 12px;
    right: 12px;
  }

  .annotate-v2-tool-popover {
    display: none;
  }

  .annotate-v2-bottom-panel {
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    padding: 9px;
    border-radius: 26px;
  }

  .annotate-v2-tool-strip {
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .annotate-v2-tool-strip::-webkit-scrollbar {
    display: none;
  }

  .annotate-v2-tool-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  .annotate-v2-text-tool-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
    padding: 0 10px;
    font-size: 11px;
  }

  .annotate-v2-center-btn {
    min-width: 68px;
  }

  .annotate-v2-size-control {
    grid-template-columns: auto 1fr auto;
  }

  .annotate-v2-quick-actions {
    display: none;
  }

  .annotate-v2-color-control,
  .annotate-v2-color-control .annotate-color-palette {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 430px) {
  .annotate-v2-bar-title {
    max-width: 132px;
  }

  .annotate-v2-color-control .annotate-color-swatch {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
}
