/* Screenshot editor and text capture (assets/js/sim/capture.js). Source/Capture.swift: editor window (min 880 × 560),
   sidebar 280 pt ("Edit" 18 semibold), preview on white 0.1, actions in a capsule under the picture; note card 320 × 240. */
[data-sim="capture"] .cv { --acc: #86c7ed; --sec: rgba(255,255,255,.56); }
[data-sim="capture"] :where(.cv button) { border: 0; padding: 0; background: none; cursor: pointer; }
[data-sim="capture"] .cv .scene { position: absolute; inset: 0; }
[data-sim="capture"] .cv .lights { display: flex; gap: 8px; }
[data-sim="capture"] .cv .lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
[data-sim="capture"] .cv .lights i:nth-child(2) { background: #febc2e; } [data-sim="capture"] .cv .lights i:nth-child(3) { background: #28c840; }

/* the message to capture (a plain mail window) */
[data-sim="capture"] .cv .msg { position: absolute; left: 230px; top: 112px; width: 540px; border-radius: 12px; overflow: hidden; color: #1d1d1f; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.3), 0 22px 60px rgba(0,0,0,.45); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
[data-sim="capture"] .cv .msg .mt { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; background: #f3f3f5; border-bottom: 1px solid #e2e2e6; font-size: 13px; }
[data-sim="capture"] .cv .msg .mt .lights { position: absolute; left: 14px; }
[data-sim="capture"] .cv .msg .mh { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid #ececf0; }
[data-sim="capture"] .cv .msg .av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(180deg, #a7b0c0, #7d8698); }
[data-sim="capture"] .cv .msg .mh > div { flex: 1; display: grid; gap: 1px; }
[data-sim="capture"] .cv .msg .mh b { font-size: 14px; }
[data-sim="capture"] .cv .msg .mh small { font-size: 12px; color: #6e6e73; }
[data-sim="capture"] .cv .msg .mh .tm { flex: none; }
[data-sim="capture"] .cv .msg .mb { padding: 14px 20px 18px; font-size: 13.5px; line-height: 1.5; }
[data-sim="capture"] .cv .msg .mb p { margin: 0 0 6px; }
[data-sim="capture"] .cv .msg .kv { display: grid; gap: 2px; margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #f5f5f7; font-size: 13px; }
[data-sim="capture"] .cv .msg [data-pii] { font-variant-numeric: tabular-nums; }

/* menu bar + notch with its notice strip */
[data-sim="capture"] .cv .mbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: 37px; padding: 0 14px 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.92); background: rgba(10,14,30,.18); -webkit-backdrop-filter: blur(40px) saturate(1.5); backdrop-filter: blur(40px) saturate(1.5); }
[data-sim="capture"] .cv .mbar .l, [data-sim="capture"] .cv .mbar .r { display: flex; align-items: center; gap: 20px; }
[data-sim="capture"] .cv .mbar .r { gap: 16px; }
[data-sim="capture"] .cv .mbar img { height: 16px; }
[data-sim="capture"] .cv .isl { position: absolute; z-index: 45; top: 0; left: 50%; width: 200px; height: 37px; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: #000; overflow: hidden; transition: width .5s cubic-bezier(.32,1.18,.36,1), height .5s cubic-bezier(.32,1.18,.36,1), border-radius .4s; }
[data-sim="capture"] .cv .isl.on { width: 320px; height: 84px; border-radius: 0 0 24px 24px; }
[data-sim="capture"] .cv .isl .nt { position: absolute; left: 0; right: 0; top: 37px; height: 47px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; opacity: 0; transition: opacity .2s; }
[data-sim="capture"] .cv .isl.on .nt { opacity: 1; transition-delay: .2s; }
[data-sim="capture"] .cv .isl .nt img { height: 15px; filter: brightness(0) saturate(100%) invert(80%) sepia(19%) saturate(800%) hue-rotate(166deg) brightness(97%); }
[data-sim="capture"] .cv .isl .nt div { display: grid; gap: 1px; min-width: 0; }
[data-sim="capture"] .cv .isl .nt b { font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-sim="capture"] .cv .isl .nt small { font-size: 10px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the crosshair picker */
[data-sim="capture"] .cv .xh { position: absolute; inset: 0; z-index: 40; cursor: crosshair; touch-action: none; }
[data-sim="capture"] .cv .xh.drag { cursor: none; }
[data-sim="capture"] .cv .sel { position: absolute; display: none; background: rgba(120,120,128,.18); box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 0 0 9999px rgba(0,0,0,.18); }
[data-sim="capture"] .cv .sel .dim { position: absolute; right: -6px; bottom: -22px; transform: translateX(100%); padding: 2px 6px; border-radius: 4px; font: 500 11px -apple-system, sans-serif; background: rgba(0,0,0,.6); white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-sim="capture"] .cv .keys { position: absolute; z-index: 46; left: 50%; bottom: 74px; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; font: 600 26px -apple-system, sans-serif; letter-spacing: .06em; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; pointer-events: none; }
[data-sim="capture"] .cv .keys.on { animation: x-keys 1.4s ease forwards; }
@keyframes x-keys { 0% { opacity: 0; transform: translateX(-50%) scale(.9); } 15%, 70% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; } }

/* the note card (⇧⌘1) */
[data-sim="capture"] .cv .note { position: absolute; z-index: 30; width: 320px; height: 240px; border-radius: 12px; background: var(--nt, #5cd18c); box-shadow: 0 16px 40px rgba(0,0,0,.4); opacity: 0; transform: scale(.96); transition: opacity .18s, transform .18s; }
[data-sim="capture"] .cv .note.on { opacity: 1; transform: none; }
[data-sim="capture"] .cv .note textarea { position: absolute; inset: 38px 10px 8px; border: 0; outline: 0; resize: none; background: none; color: rgba(0,0,0,.85); font: 12.5px/1.35 -apple-system, BlinkMacSystemFont, sans-serif; }
[data-sim="capture"] .cv .note .bar { position: absolute; z-index: 1; left: 6px; right: 6px; top: 6px; display: flex; gap: 4px; padding: 5px; border-radius: 17px; background: rgba(255,255,255,.4); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
[data-sim="capture"] .cv .note .bar button { width: 24px; height: 22px; display: grid; place-items: center; }
[data-sim="capture"] .cv .note .bar img { height: 11px; filter: invert(1); opacity: .8; }
[data-sim="capture"] .cv .note .sp { flex: 1; }

/* the editor window */
[data-sim="capture"] .cv .ed { position: absolute; inset: 0; z-index: 35; opacity: 0; transition: opacity .2s; }
[data-sim="capture"] .cv .ed.on { opacity: 1; }
[data-sim="capture"] .cv .ew { position: absolute; left: 60px; top: 60px; width: 880px; height: 560px; display: flex; border-radius: 10px; overflow: hidden; background: #262629; box-shadow: inset 0 0 0 .7px rgba(255,255,255,.14), 0 0 0 .5px rgba(0,0,0,.6), 0 30px 70px rgba(0,0,0,.5); transform: scale(.97); transition: transform .25s cubic-bezier(.3,1.3,.5,1); }
[data-sim="capture"] .cv .ed.on .ew { transform: none; }
[data-sim="capture"] .cv .ew > .lights { position: absolute; z-index: 2; left: 20px; top: 18px; }
[data-sim="capture"] .cv .ew aside { width: 280px; flex: none; display: flex; flex-direction: column; background: rgba(255,255,255,.04); }
[data-sim="capture"] .cv .ew h2 { margin: 0; padding: 40px 22px 8px; font-size: 18px; font-weight: 600; }
[data-sim="capture"] .cv .ew .scroll { flex: 1; overflow-y: auto; padding: 0 22px 20px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
[data-sim="capture"] .cv .grp { display: grid; gap: 6px; }
[data-sim="capture"] .cv .grp h4 { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--sec); }
[data-sim="capture"] .cv .sw { display: grid; grid-template-columns: repeat(4, 44px); gap: 8px; }
[data-sim="capture"] .cv .sw button { width: 44px; height: 32px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
[data-sim="capture"] .cv .sw button.on { box-shadow: inset 0 0 0 2px var(--acc); }
[data-sim="capture"] .cv .sw .wp { background: url('/assets/img/wallpaper.jpg') center / cover; }
[data-sim="capture"] .cv .sw .none { display: grid; place-items: center; }
[data-sim="capture"] .cv .sw .none img { height: 14px; opacity: .55; }
[data-sim="capture"] .cv input[type=range] { width: 100%; height: 18px; margin: 0; accent-color: var(--acc); cursor: pointer; }
[data-sim="capture"] .cv .rt, [data-sim="capture"] .cv .tl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
[data-sim="capture"] .cv .rt button, [data-sim="capture"] .cv .tl button {
  height: 28px; border-radius: 9px; font-size: 11px; font-weight: 500; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.045)); box-shadow: inset 0 0 0 .7px rgba(255,255,255,.15), inset 0 .7px 0 rgba(255,255,255,.1);
}
[data-sim="capture"] .cv .tl button { height: 42px; border-radius: 10px; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 9.5px; font-weight: 400; }
[data-sim="capture"] .cv .tl button img { height: 13px; }
[data-sim="capture"] .cv .rt button.on, [data-sim="capture"] .cv .tl button.on { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.1)); box-shadow: inset 0 0 0 .7px rgba(255,255,255,.3), 0 2px 5px rgba(0,0,0,.25); }
[data-sim="capture"] .cv .cl { display: flex; align-items: center; gap: 6px; }
[data-sim="capture"] .cv .cl [data-c] { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 .8px rgba(255,255,255,.2); }
[data-sim="capture"] .cv .cl [data-c].on { box-shadow: 0 0 0 2px #fff; }
[data-sim="capture"] .cv .cl .sp { flex: 1; }
[data-sim="capture"] .cv .circ { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.045)); box-shadow: inset 0 0 0 .7px rgba(255,255,255,.16); }
[data-sim="capture"] .cv .circ img { height: 10px; }
[data-sim="capture"] .cv .circ[disabled] { opacity: .4; cursor: default; }
[data-sim="capture"] .cv .tf { height: 22px; padding: 0 6px; border: 0; border-radius: 5px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.2); color: #fff; font: 12px var(--ui); outline: none; }
[data-sim="capture"] .cv .xhint, [data-sim="capture"] .cv .pnote { font-size: 10.5px; color: var(--sec); line-height: 1.35; }
[data-sim="capture"] .cv .pnote { font-size: 11px; margin-top: -8px; }
[data-sim="capture"] .cv .tg { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
[data-sim="capture"] .cv .tg.sm { font-size: 11.5px; }
[data-sim="capture"] .cv .swt { position: relative; width: 38px; height: 22px; flex: none; border-radius: 11px; background: rgba(255,255,255,.22); transition: background .2s; }
[data-sim="capture"] .cv .swt i { position: absolute; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 50%; background: #f2f2f2; box-shadow: 0 1px 2px rgba(0,0,0,.35); transition: transform .2s cubic-bezier(.3,1.2,.5,1); }
[data-sim="capture"] .cv .swt.on { background: #0a84ff; }
[data-sim="capture"] .cv .swt.on i { transform: translateX(16px); }
[data-sim="capture"] .cv .ew hr { width: 100%; margin: 0; border: 0; height: 1px; background: rgba(255,255,255,.1); }

[data-sim="capture"] .cv .area { position: relative; flex: 1; background: #1a1a1a; overflow: hidden; touch-action: none; }
[data-sim="capture"] .cv .stage { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; display: grid; place-items: center; overflow: hidden; }
[data-sim="capture"] .cv .stage.clear { background: repeating-conic-gradient(#2a2a2a 0 25%, #222 0 50%) 0 0 / 20px 20px; }
[data-sim="capture"] .cv .bgl { position: absolute; inset: 0; }
[data-sim="capture"] .cv .shot { position: relative; overflow: hidden; }
[data-sim="capture"] .cv .clip { position: absolute; inset: 0; overflow: hidden; }
[data-sim="capture"] .cv .clip .scene { position: absolute; }
[data-sim="capture"] .cv .red { position: absolute; inset: 0; pointer-events: none; }
[data-sim="capture"] .cv .red i { position: absolute; border-radius: 4px; background: #333; animation: x-in .3s ease both; }
@keyframes x-in { from { opacity: 0; } }
[data-sim="capture"] .cv .mk { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
[data-sim="capture"] .cv .acts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 30px; background: rgba(60,60,64,.55); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: inset 0 0 0 .7px rgba(255,255,255,.12); white-space: nowrap; }
[data-sim="capture"] .cv .pri { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 22px; border-radius: 21px; font: 600 13px var(--ui); color: #000; background: linear-gradient(180deg, #fff, #dbdbdb); box-shadow: inset 0 0 0 .6px rgba(255,255,255,.6), 0 2px 6px rgba(0,0,0,.25); transition: transform .1s; }
[data-sim="capture"] .cv .pri img { height: 13px; filter: invert(1); }
[data-sim="capture"] .cv .pri.done { animation: x-pop .35s ease; }
@keyframes x-pop { 50% { transform: scale(1.06); } }
[data-sim="capture"] .cv .act { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 10px; font: 500 10px var(--ui); color: rgba(255,255,255,.9); background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.045)); box-shadow: inset 0 0 0 .7px rgba(255,255,255,.16), inset 0 .7px 0 rgba(255,255,255,.1); }
[data-sim="capture"] .cv .act img { height: 10px; }
[data-sim="capture"] .cv .act.pulse { animation: x-pop .35s ease; }

/* hint chip with the two shortcuts */
[data-sim="capture"] .cv .try { display: flex; gap: 6px; padding: 5px; }
[data-sim="capture"] .cv .try button { display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 15px; font: 600 14px var(--ui); color: #fff; transition: background .15s; }
[data-sim="capture"] .cv .try button:hover { background: rgba(255,255,255,.14); }

/* demo pointer */
[data-sim="capture"] .cv .cur { position: absolute; z-index: 70; left: 0; top: 0; width: 22px; height: 30px; margin: -2px 0 0 -3px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M3 2v22l5.5-5.3 3.6 8.3 3.4-1.5-3.5-8.1H19z' fill='%23000' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); transition: transform .65s cubic-bezier(.4,.1,.2,1), opacity .3s; }
[data-sim="capture"] .cv .xh:not([hidden]) ~ .cur, [data-sim="capture"] .cv .cur.cross { width: 24px; height: 24px; margin: -12px 0 0 -12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1v22M1 12h22' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M12 1v22M1 12h22' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat; }
[data-sim="capture"] .cv .cur.down { scale: .86; }
[data-sim="capture"] .cv .cur.gone { opacity: 0; }
[data-sim="capture"] .cv.instant *, [data-sim="capture"] .cv.instant { transition: none !important; animation: none !important; }
[data-sim="capture"] .cv .ed.on ~ .try { opacity: 0; pointer-events: none; }
[data-sim="capture"] .cv [hidden] { display: none !important; }

/* phone crop (384 × 660): a smaller message; the editor is its picture with a compact tool row under it */
[data-sim="capture"] .cv.ph .mbar .l span, [data-sim="capture"] .cv.ph .mbar .r > img, [data-sim="capture"] .cv.ph .mbar .clk { display: none; }
[data-sim="capture"] .cv.ph .msg { left: 14px; top: 120px; width: 356px; }
[data-sim="capture"] .cv.ph .msg .mb { font-size: 13px; padding: 12px 16px 14px; }
[data-sim="capture"] .cv.ph .ew { left: 8px; top: 46px; width: 368px; height: 600px; flex-direction: column-reverse; }
[data-sim="capture"] .cv.ph .ew aside { width: 100%; flex: none; }
[data-sim="capture"] .cv.ph .ew h2, [data-sim="capture"] .cv.ph .ew .grp:not(.mk-grp), [data-sim="capture"] .cv.ph .ew hr, [data-sim="capture"] .cv.ph .ew .tg.sm, [data-sim="capture"] .cv.ph .ew .tg.sm + .xhint, [data-sim="capture"] .cv.ph .ew .grp > h4 { display: none; }
[data-sim="capture"] .cv.ph .ew .scroll { overflow: visible; padding: 12px 14px 14px; gap: 10px; }
[data-sim="capture"] .cv.ph .tl { grid-template-columns: repeat(6, 1fr); }
[data-sim="capture"] .cv.ph .tl button { height: 46px; font-size: 10.5px; }
[data-sim="capture"] .cv.ph .ew > .lights { top: 14px; left: 14px; }
[data-sim="capture"] .cv.ph .area { padding-top: 30px; }
[data-sim="capture"] .cv.ph .acts { bottom: 12px; gap: 6px; padding: 6px; }
[data-sim="capture"] .cv.ph .acts [data-a="save"], [data-sim="capture"] .cv.ph .acts [data-a="shelf"] { display: none; }
[data-sim="capture"] .cv.ph .act { font-size: 11.5px; }
[data-sim="capture"] .cv.ph .pnote, [data-sim="capture"] .cv.ph .xhint { font-size: 11.5px; }
[data-sim="capture"] .cv.ph .try { width: 356px; justify-content: center; }
[data-sim="capture"] .cv.ph .try button { font-size: 13px; }
[data-sim="capture"] .cv.ph .msg .mt { justify-content: flex-start; padding-left: 74px; }
