
#preview.b12-photo-editor[open] {
 display:block;
 height:var(--b12-editor-height,100dvh);
 overflow:clip;
}
#preview.b12-photo-editor #preview-markup-actions { display:none !important; }

#preview.b12-photo-editor > :not(.b12-editor) {
 display:none;
}
.b12-editor {
 --b12-menu-height:48px;
 position:absolute;
 inset:0;
 display:grid;
 grid-template-rows:minmax(0,1fr) auto;
 background:#08243d;
 color:#f8fafc;
}
.b12-editor [hidden] {
 display:none !important;
}
.b12-editor button {
 font-size:.875rem;
}
.b12-photo {
 position:relative;
 display:grid;
 min-height:0;
}
.b12-stage {
 min-width:0;
 min-height:0;
 overflow:hidden;
 touch-action:none;
 -webkit-touch-callout:none;
}
.b12-editor .b12-menu,
.b12-editor .b12-save {
 position:absolute;
 z-index:2;
 right:var(--b12-action-right,8px);
}
.b12-editor .b12-menu {
 top:var(--b12-menu-top,8px);
 width:48px;
 height:var(--b12-menu-height);
 padding:0;
 background:#f8fafc9c;
 color:#08243d;
 font-size:1.5rem;
 line-height:1;
}
.b12-editor .b12-save {
 top:var(--b12-save-top,calc(100% - 44px));
 width:76px;
 height:36px;
 padding:0;
 background:#08243d;
 color:#f8fafc;
 border:1px solid #f8fafc80;
}
.b12-editor .b12-save:not([data-dirty]) {
 background:#f8fafcee;
 color:#08243d;
 border-color:#08243d80;
}
.b12-tools {
 position:relative;
 padding:0 max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left));
 background:#08243d;
}
.b12-tabs {
 position:absolute;
 inset:auto 0 100%;
 display:flex;
 align-items:flex-end;
 pointer-events:none;
}
.b12-tabs button,
.b12-note-header button {
 width:76px;
 height:36px;
 padding:0 8px;
 border-radius:0 10px 0 0;
 pointer-events:auto;
}
.b12-tabs .b12-aa,
.b12-note-header .b12-notes-aa {
 font-size:1rem;
 background:#08243d;
 color:#f8fafc;
 border:1px solid #647a88;
 border-left:0;
 border-bottom:0;
}
.b12-tabs .b12-aa {
 z-index:1;
 touch-action:none;
}
.b12-tabs .b12-open-notes,
.b12-note-header .b12-note-tab {
 margin-left:-10px;
 padding-left:14px;
 background:#f8fafc;
 color:#08243d;
}
.b12-drawing {
 display:grid;
 grid-template-columns:repeat(8,minmax(0,1fr));
 gap:2px;
 max-width:620px;
 margin:auto;
 min-height:var(--photo-tool-row-size);
 align-items:center;
}
.b12-drawing button {
 display:grid;
 place-items:center;
 min-width:0;
 height:44px;
 padding:0;
 background:transparent;
}
.b12-drawing [aria-pressed="true"] {
 background:#08243d;
 box-shadow:inset 0 0 0 2px #ff7900;
}
.b12-drawing svg {
 width:24px;
 height:24px;
 fill:none;
 stroke:currentColor;
 stroke-width:1.7;
 stroke-linecap:round;
 stroke-linejoin:round;
}
.b12-drawing [data-filled] svg {
 fill:currentColor;
}
.b12-status {
 position:absolute;
 right:8px;
 bottom:100%;
 max-width:55%;
 margin:0 0 10px;
 padding:8px;
 border-radius:6px;
 background:#08243d;
 font-size:.875rem;
}
.b12-status:empty {
 display:none;
}
.b12-editor .b12-size {
 position:absolute;
 z-index:3;
 top:var(--b12-size-top,33%);
 left:10px;
 width:44px;
 height:var(--b12-size-height,150px);
 margin:0;
 writing-mode:vertical-lr;
 direction:rtl;
 appearance:none;
 background:transparent;
 touch-action:none;
}
.b12-size::-webkit-slider-runnable-track {
 width:3px;
 height:100%;
 border-radius:2px;
 background:#fff9;
}
.b12-size::-webkit-slider-thumb {
 appearance:none;
 width:22px;
 height:22px;
 margin-left:-9.5px;
 border-radius:50%;
 border:2px solid var(--b12-thumb-ring,#142a34);
 background:var(--b12-thumb,#fff);
}
.b12-size::-moz-range-track {
 width:3px;
 height:100%;
 background:#fff9;
}
.b12-size::-moz-range-thumb {
 width:18px;
 height:18px;
 border-radius:50%;
 border:2px solid var(--b12-thumb-ring,#142a34);
 background:var(--b12-thumb,#fff);
}
.b12-size-value {
 position:absolute;
 top:calc(var(--b12-size-top,33%) - 25px);
 left:15px;
 padding:2px 7px;
 border-radius:4px;
 background:#08243d;
}
.b12-editor:not([data-mode=""]) .b12-tools > :is(.b12-tabs,.b12-drawing),
.b12-editor:is([data-mode="notes"],[data-mode="crop"]) .b12-size,
.b12-editor[data-mode="text"] .b12-menu,
.b12-editor[data-mode="crop"] :is(.b12-menu,.b12-save) {
 visibility:hidden;
}
.b12-editor[data-mode="text"] .b12-save {
 top:max(8px,calc(var(--b12-visible-top,0px) + 8px),env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));min-height:44px;
}
.b12-editor[data-mode="text"] .b12-size {
 top:18%;
 height:clamp(46px,calc((100% - env(keyboard-inset-height,0px)) * .28),160px);
}
.b12-inset-probe {
 position:absolute;
 bottom:0;
 width:0;
 height:env(keyboard-inset-height,0px);
 visibility:hidden;
 pointer-events:none;
}
.b12-dock {
 position:absolute;
 --b12-dock-bottom:max(env(safe-area-inset-bottom,0px),env(keyboard-inset-height,0px),var(--b12-keyboard-gap,0px));
 inset:var(--b12-visible-top,0px) 0 var(--b12-dock-bottom);
 display:flex;
 flex-direction:column;
 justify-content:flex-end;
 padding-top:48px;
 z-index:4;
 pointer-events:none;
}
.b12-editor[data-mode="notes"] .b12-dock:has(.b12-note:not([readonly])) {
 bottom:var(--b12-notes-lift,0px);
}
.b12-editor[data-mode="notes"] .b12-dock:has(.b12-notes[data-view="expanded"]),
.b12-editor[data-mode="notes"] .b12-dock.saved-note-reading:has(.b12-note:not([readonly])) {
 padding-top:max(48px,calc(var(--b12-menu-top,8px) + var(--b12-menu-height) + 6px - var(--b12-visible-top,0px)));
}
.b12-editor[data-mode="notes"] .b12-dock:has(.b12-note:not([readonly]))::after {
 content:"";
 position:absolute;
 top:100%;
 inset-inline:0;
 height:var(--b12-dock-bottom);
 background:#f8fafc;
 pointer-events:none;
}
.b12-note-header {
 display:flex;
 align-items:flex-end;
 flex:none;
}
.b12-note-header .b12-note-tab {
 z-index:1;
}
.b12-note-header .b12-note-close {
 width:auto;
 margin:0 8px 3px auto;
 border-radius:7px;
 background:#f8fafc;
 color:#08243d;
}
.b12-notes[data-view="compact"] .b12-note-close {
 visibility:hidden;
}
.b12-notes {
 display:flex;
 flex-direction:column;
 min-height:0;
 max-height:100%;
}
.b12-note-card {
 position:relative;
 display:flex;
 flex-direction:column;
 min-height:0;
 padding-inline:5px;
 padding-bottom:4px;
 border-radius:6px 6px 0 0;
 background:#f8fafc;
 pointer-events:auto;
}
.b12-editor .b12-note-resize {
 height:15px;
 padding:0;
 flex:none;
 width:100%;
 background:#f8fafc;
 color:#08243d;
 font-size:.75rem;
 letter-spacing:2px;
 border-radius:6px 6px 0 0;
 cursor:ns-resize;
 touch-action:none;
}
.b12-editor .b12-note-expand {
 position:absolute;
 top:16px;
 right:8px;
 padding:0;
 width:36px;
 height:36px;
 background:transparent;
 color:#08243d;
 font-size:1.125rem;
}
.b12-note {
 display:block;
 box-sizing:border-box;
 width:100%;
 height:var(--b12-note-height,calc(var(--b12-note-rows,2) * 1lh + 14px));
 min-height:0;
 padding:6px 40px 6px 7px;
 margin:0;
 color:#08243d;
 background:#f8fafc;
 border:1px solid transparent;
 border-top-color:#ced2d4;
 border-radius:0;
 font:inherit;
 line-height:1.35;
 resize:none;
 overscroll-behavior:contain;
}
.b12-note:focus {
 outline:none;
 border-top-color:#909699;
}
@media (forced-colors:active) {
 .b12-note {border:0;border-top:1px solid GrayText}
 .b12-note:focus {border-top-color:Highlight}
}
.b12-notes[data-view="peek"] {--b12-note-rows:4}
.b12-notes:is([data-view="compact"],[data-view="peek"]) .b12-note-resize {display:none}
.b12-notes[data-view="editing"] .b12-note {--b12-note-rows:var(--b12-edit-rows,10)}
.b12-notes[data-view="expanded"] {--b12-note-rows:28}
.b12-photo-text {
 position:absolute;
 z-index:2;
 top:var(--b12-text-top,28%);
 left:16%;
 width:68%;
 min-height:1.3em;
 max-height:var(--b12-text-room,40dvh);
 box-sizing:border-box;
 overflow-y:auto;
 overflow-wrap:anywhere;
 background-color:transparent;
 background-repeat:no-repeat;
 padding:3px 5px;
 border:0;
 border-bottom:2px solid #b4dbdb;
 outline:none;
 box-shadow:none;
 resize:none;
 font:24px/1.15 Arial,sans-serif;
}
@media (forced-colors:active){.b12-photo-text:focus-visible{outline:2px solid Highlight}}
.b12-format {
 display:flex;
 align-items:center;
 flex:none;
 align-self:flex-start;
 width:100%;
 padding:3px max(16px,calc(100% - 416px)) 3px 4px;
 border-radius:0 12px 0 0;
 background:rgb(248 250 252 / .5);
 border:1px solid #f8fafc80;
 border-left:0;
 border-bottom:0;
 pointer-events:auto;
}
.b12-editor .b12-format button {
 display:grid;
 place-items:center;
 flex:1 1 0;
 min-width:0;
 height:40px;
 padding:0;
 background:#08243d;
 color:#f8fafc;
 font-size:1rem;
}
.b12-editor .b12-format .b12-text-done {
 flex:0 0 48px;
 font-size:.8rem;
}
.b12-format [aria-pressed="true"] {
 text-decoration:underline;
}
.b12-bold strong { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.b12-color-dot {
 width:20px;
 height:20px;
 border:1px solid #d0dde3;
 border-radius:50%;
 background:var(--swatch,#fff);
}
.b12-crop {
 position:absolute;
 z-index:4;
 inset:auto 0 0;
 display:flex;
 justify-content:center;
 gap:6px;
 padding:8px;
 background:#08243d;
}
.b12-editor dialog {
 border:0;
 border-radius:12px;
 color:#08243d;
 background:#f8fafc;
 width:min(94vw,390px);
 max-width:none;
}
.b12-editor dialog::backdrop {
 background:#10171a88;
}
.b12-options[open] {
 display:grid;
 gap:6px;
}
.b12-dialog-actions {
 display:flex;
 justify-content:flex-end;
 gap:8px;
 margin-top:10px;
}
.b12-palette {
 position:fixed;
 top:var(--b12-palette-top,0px);
 bottom:max(env(keyboard-inset-height,0px),var(--b12-palette-bottom,0px));
 margin:auto;
 max-height:calc(100% - 32px);
 overflow:auto;
}
.b12-palette-title {
 display:flex;
 justify-content:space-between;
 gap:8px;
 margin-bottom:8px;
}

.b12-editor[data-mode="text"] .b12-save { visibility: hidden; }
#konva-stage { -webkit-touch-callout:none; }
#markup-text-entry .text-format-row { isolation: isolate; }
#markup-text-entry .text-format-row::before {
 content: "";
 position: absolute;
 inset: 0 auto 0 50%;
 width: 100vw;
 transform: translateX(-50%);
 background-color: rgb(248 250 252 / .5);
 pointer-events: none;
 z-index: -1;
}
.markup-tools [data-filled="translucent"] svg,
.b12-drawing [data-filled="translucent"] svg { fill-opacity: .5; }
#preview #konva-panel #markup-remove[data-group]:enabled,
.b12-drawing [data-tool="remove"][data-group]:enabled {
 box-shadow: inset 0 0 0 2px #ff7900;
}
#preview.marker-preview:has(#konva-panel:not([hidden])),
#preview.marker-preview:has(#konva-panel:not([hidden])) #preview-body,
#preview.marker-preview :is(#markup-save, #markup-size-readout),
#preview > #markup-callout-dock,
#preview #markup-notes-dock #markup-notes-aa,
#preview #markup-notes-panel,
#preview #konva-panel,
#preview #markup-crop-actions,
#markup-text-entry .text-format-row button,
#markup-callout-menu .text-format-row button { background-color: #08243d; color: #f8fafc; }
#markup-callout-more .callout-text,
#preview #konva-panel .markup-icon { color: #f8fafc; }
#preview #konva-panel .markup-icon[aria-pressed="true"] {
 background-color: #08243d;
 box-shadow: inset 0 0 0 2px #ff7900;
}
#preview.marker-preview #markup-cancel { background-color: #f8fafc9c; color: #08243d; }
#preview #markup-notes-dock :is(#markup-notes-tab, #markup-notes-close),
#preview #markup-notes-panel :is(#markup-note, #markup-note-resize),
#preview.markup-note-keyboard-visible #markup-notes-panel::after,
#preview #markup-notes-panel .note-expand {
 background-color: #f8fafc;
 color: #08243d;
}
#markup-text-entry .text-format-row button[aria-pressed="true"],
.b12-editor .b12-format button[aria-pressed="true"] {
 box-shadow: inset 0 0 0 2px #ff7900;
 border-radius: .4rem;
}
#markup-text-entry #markup-text-fill-control:is([data-fill-state="translucent"], [data-fill-state="solid"]) {
 background-color: #f8fafc;
 color: #08243d;
}
#markup-text-entry #markup-text-fill-control[data-fill-state="underline"] { border-bottom-color: #ff7900; }
#markup-text-entry #markup-text-fill-control[data-fill-state="translucent"] svg { fill: currentColor; fill-opacity: .4; }
#markup-text-entry #markup-text-fill-control[data-fill-state="transparent"] svg { opacity: .8; }
#markup-text-controls[data-reveal="waiting"], .b12-format[data-reveal="waiting"] {
 visibility: hidden;
}
@media (prefers-reduced-motion: no-preference) {
 #markup-text-controls[data-reveal="visible"], .b12-format[data-reveal="visible"]:not([hidden]) {
  animation: lite-format-in 900ms ease-out both;
 }
 @keyframes lite-format-in {
  from { opacity: 0; }
  to { opacity: 1; }
 }
}
#markup-palette .palette-header, .b12-editor dialog.b12-palette, .b12-palette-title {
 background: #f8fafc; color: #08243d; color-scheme: light;
}
.photo-color-code {
 display:flex;
 flex:none;
 align-items:center;
 gap:6px;
}
.photo-color-code::before {
 content:"";
 width:18px;
 height:18px;
 border:1px solid #82939c;
 border-radius:50%;
 background:var(--photo-color-chip,#fff);
}
.photo-color-code input {
 width:calc(8ch + 12px);
 min-height:36px;
 padding:3px 5px;
 border:1px solid #82939c;
 border-radius:6px;
 background:white;
 color:#08243d;
 font:inherit;
 font-size:.85rem;
 text-transform:uppercase;
}
.photo-color-code input[aria-invalid="true"] { border-color:#a12e2e; }
.photo-color-sets,
.photo-color-grid {
 display:grid;
 grid-template-columns:repeat(5,minmax(0,1fr));
 gap:4px;
 margin:0 0 10px;
}
.photo-color-tools,
.photo-color-swatches {
 display:grid;
 gap:4px;
}
.photo-color-swatches {
 grid-column:2/-1;
 grid-template-columns:repeat(4,minmax(0,1fr));
}
.photo-color-sets button,
.photo-color-swatch {
 min-width:0;
 min-height:36px;
 padding:2px;
 border-radius:6px;
 background:#e5eef1;
 color:#08243d;
 font-size:.75rem;
}
.photo-color-sets button[aria-pressed="true"] {
 background:#08243d;
 color:#f8fafc;
 box-shadow:inset 0 -3px #ff7900;
}
.photo-color-swatches .photo-color-swatch {
 background:var(--swatch);
 border:1px solid #82939c;
}
.photo-color-swatch[aria-pressed="true"] {
 outline:2px solid #ff7900;
 outline-offset:1px;
}
.photo-wheel,
.photo-eyedropper {
 position:relative;
 display:grid;
 place-items:center;
 box-sizing:border-box;
 width:100%;
 height:36px;
 padding:0;
 border:1px solid #82939c;
 border-radius:6px;
 background:#f8fafc;
 color:#08243d;
 cursor:pointer;
}
.photo-wheel:focus-within { outline:2px solid #ff7900; outline-offset:1px; }
.photo-wheel input {
 position:absolute;
 inset:0;
 width:100%;
 height:100%;
 margin:0;
 opacity:0;
 cursor:pointer;
}
.photo-wheel-icon {
 width:22px;
 height:22px;
 border:1px solid #82939c;
 border-radius:50%;
 background:radial-gradient(circle,#fff,transparent 68%),
  conic-gradient(#e72e32,#ffe000,#18834b,#16cbea,#2377df,#7939c9,#e72e32);
}
.photo-eyedropper-icon {
 position:relative;
 width:6px;
 height:14px;
 margin-top:5px;
 border:2px solid currentColor;
 border-radius:3px 3px 2px 2px;
 transform:rotate(42deg);
}
.photo-eyedropper-icon::before {
 content:"";
 position:absolute;
 inset:-8px -4px auto;
 height:8px;
 border-radius:4px 4px 2px 2px;
 background:currentColor;
}
dialog.photo-color-sampler {
 position:fixed;
 inset:0;
 width:100%;
 height:100%;
 max-width:none;
 max-height:none;
 margin:0;
 padding:max(12px,env(safe-area-inset-top)) 12px 12px;
 border:0;
 border-radius:0;
 background:transparent;
 color:#08243d;
 cursor:crosshair;
 touch-action:none;
}
dialog.photo-color-sampler::backdrop { background:transparent; }
.photo-sampling-prompt {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 width:min(100%,340px);
 margin:0 auto;
 padding:8px;
 border-radius:8px;
 background:#f8fafc;
 cursor:auto;
}
