.screenshot-editor { position: fixed; inset: 0; margin: auto; width: min(1100px, calc(100vw - 36px)); height: min(900px, calc(100dvh - 36px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--border-glass-strong); border-radius: 24px; background: var(--surface-solid); color: var(--text-primary); box-shadow: var(--shadow-float); overflow: hidden; }
.screenshot-editor[open] { display: flex; flex-direction: column; animation: screenshot-editor-enter .3s var(--ease-premium) both; }
.screenshot-editor::backdrop { background: rgba(6, 17, 10, .68); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.screenshot-editor [hidden] { display: none !important; }
.screenshot-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 24px 15px; flex-shrink: 0; }
.screenshot-editor-header > div { min-width: 0; }
.screenshot-editor-header h2 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.screenshot-editor-header p { color: var(--text-tertiary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 6px 0 0; }
.screenshot-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 20px; padding: 10px; background: var(--control-bg); border: 1px solid var(--border-glass); border-radius: 16px; flex-shrink: 0; }
.screenshot-editor-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.screenshot-editor-toolbar button:hover:not(:disabled) { color: var(--text-primary); background: var(--control-hover); }
.screenshot-editor-toolbar button[aria-pressed="true"] { color: var(--color-gold); background: var(--accent-soft); border-color: var(--accent-border); }
.screenshot-editor button:focus-visible, .screenshot-editor input:focus-visible, .screenshot-editor canvas:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.screenshot-editor button:disabled { opacity: .4; cursor: default; }
.screenshot-editor-divider { width: 1px; height: 22px; margin-inline: 4px; background: var(--divider); }
.screenshot-editor-toolbar .screenshot-editor-color { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.screenshot-editor-color::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #ef665f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.screenshot-editor-color.is-gold::after { background: #dec98f; }
.screenshot-editor-toolbar .screenshot-editor-color[aria-pressed="true"] { border-color: var(--text-secondary); background: transparent; }
.screenshot-editor-text, .screenshot-editor-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 24px 0; font-size: 12px; flex-shrink: 0; }
.screenshot-editor-text label { display: flex; align-items: center; gap: 10px; color: var(--text-primary); flex: 1 1 290px; }
.screenshot-editor-text input { min-width: 0; flex: 1; width: 100%; border: 1px solid var(--border-glass-strong); border-radius: 9px; background: var(--control-bg); color: var(--text-primary); font: inherit; padding: 9px 11px; }
.screenshot-editor-text > span { color: var(--text-tertiary); }
.screenshot-editor-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 0; min-height: 100px; overflow: hidden; margin: 16px 20px 0; border: 1px solid var(--border-glass); border-radius: 14px; background: rgba(0, 0, 0, .17); }
.screenshot-editor-stage canvas { display: block; flex-shrink: 0; max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; box-shadow: 0 3px 24px rgba(0, 0, 0, .2); }
.screenshot-editor-cursor { pointer-events: none; position: absolute; width: 17px; height: 17px; border: 1px solid white; border-radius: 50%; translate: -50% -50%; box-shadow: 0 0 0 1px #111; background: rgba(0, 0, 0, .25); }
.screenshot-editor-cursor::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: white; }
.screenshot-editor-hint { flex-shrink: 0; padding: 10px 24px 0; margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; min-height: 28px; }
.screenshot-editor-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 17px 24px 20px; flex-shrink: 0; }
.screenshot-editor-footer > span { flex: 1; color: var(--text-tertiary); font-size: 11px; line-height: 1.5; }
@keyframes screenshot-editor-enter { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 650px) {
  .screenshot-editor { width: 100%; max-width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .screenshot-editor-header { padding: 16px 14px 12px; }
  .screenshot-editor-header h2 { font-size: 17px; }
  .screenshot-editor-toolbar { margin-inline: 10px; padding: 7px; gap: 4px; }
  .screenshot-editor-toolbar button { min-height: 40px; padding-inline: 8px; font-size: 11px; }
  .screenshot-editor-toolbar button svg { width: 17px; height: 17px; }
  .screenshot-editor-toolbar .screenshot-editor-divider { margin-inline: 1px; }
  .screenshot-editor-stage { margin: 12px 10px 0; }
  .screenshot-editor-hint { padding-inline: 14px; font-size: 10px; }
  .screenshot-editor-text, .screenshot-editor-confirm { margin-inline: 14px; }
  .screenshot-editor-footer { padding: 12px 14px max(14px, env(safe-area-inset-bottom)); gap: 8px; flex-wrap: wrap; }
  .screenshot-editor-footer > span { flex-basis: 100%; }
  .screenshot-editor-footer > button { flex: 1; font-size: 12px; }
}
@media (max-height: 520px) {
  .screenshot-editor { height: 100dvh; }
  .screenshot-editor-header { padding-block: 9px; }
  .screenshot-editor-header p { display: none; }
  .screenshot-editor-toolbar { padding-block: 4px; }
  .screenshot-editor-stage { min-height: 50px; margin-top: 8px; }
  .screenshot-editor-hint { padding-top: 6px; min-height: 0; }
  .screenshot-editor-footer { padding-block: 8px; }
  .screenshot-editor-footer > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screenshot-editor[open] { animation: none; }
  .screenshot-editor-toolbar button { transition: none; }
}
