.capture-section {
  --capture-ink: var(--ink, #28262e);
  --capture-muted: var(--muted, #67636f);
  --capture-accent: var(--accent, #7360b6);
  --capture-accent-deep: var(--accent-deep, #5c489b);
  --capture-paper: var(--paper, #fff);
  --capture-lavender: var(--lavender, #e9e3f2);
  --capture-ease: var(--ease-out, cubic-bezier(.23, 1, .32, 1));
  margin-top: 150px;
  color: var(--capture-ink);
}
.capture-frame { width: min(100% - var(--gutter, 40px) * 2, 1280px); margin-inline: auto; }
.capture-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 10%; margin-bottom: 42px; }
.capture-heading h2 { margin: 0; font-size: var(--heading, 50px); line-height: 1.2; font-weight: 600; letter-spacing: -.06em; text-wrap: balance; }
.capture-heading p { max-width: 33em; margin: 0 0 4px; line-height: 1.75; text-wrap: pretty; }
.capture-demo { overflow: hidden; border-radius: var(--radius, 24px); background: var(--capture-lavender); }
.capture-fallback { margin: 0; padding: 36px 0 25px; }
.capture-fallback img { display: block; width: 100%; height: auto; }
.capture-fallback figcaption { padding: 20px 28px 0; font-size: 14px; color: var(--capture-muted); }
.capture-enhanced .capture-fallback { display: none; }
.capture-interactive[hidden], .capture-hanging-card[hidden], .capture-selection[hidden], .capture-recording-badge[hidden], .capture-video-mark[hidden], .capture-video-duration[hidden], .capture-reset[hidden] { display: none; }
.capture-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px 0; }
.capture-modes { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 100px; background: #f6f3fa; }
.capture-mode { min-width: 76px; min-height: 44px; padding: 10px 21px; border: 0; border-radius: 100px; background: transparent; color: var(--capture-muted); font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer; touch-action: manipulation; transition: background-color 180ms ease, color 180ms ease; }
.capture-mode[aria-selected="true"] { background: var(--capture-ink); color: var(--capture-paper); }
.capture-demo-label { color: #62566f; font-size: 13px; white-space: nowrap; }
.capture-scene { position: relative; height: 430px; isolation: isolate; overflow: hidden; }
.capture-rope { display: block; position: absolute; inset: 0 0 auto; width: 100%; height: 120px; overflow: visible; pointer-events: none; }
.capture-rope path { fill: none; stroke: #aa9cbd; stroke-width: 2; }
.capture-window { position: absolute; left: 6%; top: 119px; width: 65%; height: 266px; overflow: hidden; border-radius: 15px; background: #f6f5f8; }
.capture-window-bar { position: relative; display: flex; align-items: center; justify-content: center; height: 37px; padding-inline: 76px; color: #6e6677; background: #fbfafc; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.capture-window-dots { position: absolute; left: 15px; display: flex; gap: 6px; }
.capture-window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d7cddf; }
.capture-window-dots i:nth-child(2) { background: #ded7ce; }
.capture-window-dots i:nth-child(3) { background: #cbd9d1; }
.capture-window-body { position: relative; display: grid; height: calc(100% - 37px); align-items: center; padding: 19px 26px; }
.capture-window-paper { min-width: 0; padding: 15px 20px 11px; border-radius: 8px; background: var(--capture-paper); }
.capture-window-heading { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 550; letter-spacing: -.025em; }
.capture-source-image { display: block; width: 100%; height: auto; max-height: 119px; object-fit: cover; border-radius: 4px; background: #e6ebef; }
.capture-window-caption { display: block; margin-top: 8px; color: var(--capture-muted); font-size: 11px; }
.capture-selection { position: absolute; inset: 55px 25px 20px; border: 1.5px solid var(--capture-accent); border-radius: 3px; background: #c9b7e313; transform-origin: 0 0; pointer-events: none; }
.capture-selection-corner { position: absolute; inset: -4px; }
.capture-selection-corner::before, .capture-selection-corner::after { content: ""; position: absolute; width: 13px; height: 13px; }
.capture-selection-corner::before { left: 0; top: 0; border-top: 2px solid var(--capture-accent); border-left: 2px solid var(--capture-accent); }
.capture-selection-corner::after { right: 0; bottom: 0; border-bottom: 2px solid var(--capture-accent); border-right: 2px solid var(--capture-accent); }
.capture-selection-label { position: absolute; bottom: 9px; right: 9px; padding: 4px 8px; border-radius: 4px; background: var(--capture-accent); color: var(--capture-paper); font-size: 11px; white-space: nowrap; }
.capture-crosshair { display: block; position: absolute; bottom: -12px; right: -12px; width: 24px; height: 24px; stroke: var(--capture-accent-deep); stroke-width: 1.5; }
.capture-recording-badge { position: absolute; top: 10px; right: 13px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 100px; background: #fff; color: #87505c; font-size: 11px; line-height: 1.4; }
.capture-recording-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #b46578; }
.capture-elapsed, .capture-video-duration { font-variant-numeric: tabular-nums; }
.capture-card-slot { position: absolute; right: 7%; top: 79px; width: 184px; }
.capture-empty { position: relative; display: grid; place-items: center; height: 206px; border: 1px dashed #a99abb; border-radius: 15px; color: #746882; font-size: 12px; }
.capture-empty-clip { position: absolute; top: -19px; left: calc(50% - 5px); width: 11px; height: 33px; border: 1.5px solid #b0a2c0; border-radius: 9px; background: #ffffff33; transform: rotate(8deg); }
.capture-hanging-card { position: relative; width: 100%; min-height: 206px; padding: 23px 13px 13px; border-radius: 15px; background: #fdfcfe; transform: rotate(3deg); transform-origin: 50% -12px; }
.capture-paperclip { position: absolute; z-index: 1; top: -20px; left: calc(50% - 6px); width: 13px; height: 37px; border: 1.7px solid #a89bb3; border-radius: 9px; background: #ffffff50; transform: rotate(8deg); }
.capture-paperclip::after { content: ""; position: absolute; inset: 3px 3px -3px; border: 1.3px solid #a89bb3; border-radius: 5px; }
.capture-card-kind { display: block; color: #74677e; font-size: 11px; line-height: 1.3; }
.capture-card-preview { position: relative; height: 100px; margin-block: 11px 10px; overflow: hidden; border-radius: 5px; background: #e6ebef; }
.capture-card-preview > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 36% center; }
.capture-video-mark { position: absolute; inset: 0; display: grid; place-items: center; background: #33273a12; }
.capture-video-mark > svg { display: block; width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: #fffef0e8; fill: #67527f; }
.capture-video-duration { position: absolute; right: 6px; bottom: 6px; padding: 1px 4px; border-radius: 3px; background: #33273acc; color: #fff; font-size: 10px; line-height: 1.5; }
.capture-card-name { display: block; overflow: hidden; color: var(--capture-ink); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.capture-card-ready { display: block; margin-top: 4px; color: #7a6b87; font-size: 10px; line-height: 1.4; }
.capture-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 98px; margin: 0 24px 24px; padding: 20px 22px; border-radius: 13px; background: #f6f3fa; }
.capture-status { flex: 1; max-width: 38em; min-width: 0; margin: 0; color: #63556f; font-size: 14px; line-height: 1.7; }
.capture-actions { display: flex; align-items: center; flex: none; gap: 8px; }
.capture-primary, .capture-reset { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 46px; min-width: 44px; padding: 12px 19px; border: 0; border-radius: 100px; font: inherit; font-size: 14px; line-height: 1.3; white-space: nowrap; cursor: pointer; touch-action: manipulation; transition: transform 160ms var(--capture-ease), background-color 180ms ease; }
.capture-primary { background: var(--capture-accent); color: var(--capture-paper); }
.capture-primary > svg { display: block; width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.capture-primary:disabled { cursor: wait; opacity: .7; }
.capture-reset { padding-inline: 12px; color: var(--capture-muted); background: transparent; }
.capture-mode:focus-visible, .capture-primary:focus-visible, .capture-reset:focus-visible, .capture-scene:focus-visible { outline: 3px solid var(--capture-accent); outline-offset: 4px; }
.capture-primary:active:not(:disabled), .capture-reset:active { transform: scale(.97); }
.capture-demo[data-capture-state="hanging"] .capture-empty, .capture-demo[data-capture-state="done"] .capture-empty { visibility: hidden; }
.capture-demo[data-capture-state="hanging"] .capture-hanging-card, .capture-demo[data-capture-state="done"] .capture-hanging-card { position: absolute; inset: 0 0 auto; }
.capture-demo[data-capture-mode="recording"][data-capture-state="recording"] .capture-empty > span:last-child { max-width: 7em; text-align: center; }
@media (hover: hover) and (pointer: fine) {
  .capture-primary:hover:not(:disabled) { background: var(--capture-accent-deep); }
  .capture-mode[aria-selected="false"]:hover, .capture-reset:hover { background: #e8e0f0; color: var(--capture-ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .capture-demo[data-capture-state="selecting"] .capture-selection { animation: capture-select 650ms var(--capture-ease) both; }
  .capture-demo[data-capture-state="captured"] .capture-window-paper { animation: capture-shutter 300ms ease-out both; }
  .capture-demo[data-capture-state="hanging"] .capture-hanging-card { animation: capture-hang 700ms var(--capture-ease) both; }
  .capture-demo[data-capture-state="recording"] .capture-recording-dot { animation: capture-record 1.1s ease-in-out infinite; }
}
@keyframes capture-select { from { opacity: 0; transform: scale(.16, .12); } to { opacity: 1; transform: scale(1); } }
@keyframes capture-shutter { 0%, 100% { opacity: 1; } 35% { opacity: .25; } }
@keyframes capture-hang { 0% { opacity: 0; transform: translate(clamp(-510px, -38vw, -145px), 122px) scale(.68) rotate(-7deg); } 65% { opacity: 1; transform: translate(0, -6px) scale(1.02) rotate(-3deg); } 100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(3deg); } }
@keyframes capture-record { 50% { opacity: .45; } }
@media (max-width: 900px) {
  .capture-heading { gap: 6%; }
  .capture-heading p { font-size: 16px; }
  .capture-window { left: 5%; width: 68%; }
  .capture-card-slot { right: 5%; width: 164px; }
  .capture-controls { gap: 16px; }
}
@media (max-width: 650px) {
  .capture-section { margin-top: 88px; }
  .capture-heading { grid-template-columns: 1fr; gap: 23px; margin-bottom: 30px; }
  .capture-heading h2 { font-size: 32px; }
  .capture-heading p { max-width: 33em; margin: 0; line-height: 1.75; }
  .capture-demo { border-radius: 20px; }
  .capture-topbar { padding: 16px 14px 0; gap: 8px; }
  .capture-modes { padding: 3px; gap: 0; }
  .capture-mode { min-width: 63px; padding: 10px 14px; font-size: 13px; }
  .capture-demo-label { font-size: 11px; }
  .capture-scene { height: 405px; }
  .capture-rope { top: 0; height: 78px; }
  .capture-card-slot { top: 44px; right: 7%; width: 138px; }
  .capture-empty { height: 160px; border-radius: 12px; font-size: 11px; }
  .capture-hanging-card { min-height: 160px; padding: 18px 10px 10px; border-radius: 12px; }
  .capture-paperclip { top: -16px; width: 11px; height: 30px; border-width: 1.4px; }
  .capture-paperclip::after { inset: 2px 2px -3px; border-width: 1px; }
  .capture-card-kind { font-size: 10px; }
  .capture-card-preview { height: 69px; margin-block: 8px; }
  .capture-card-name { font-size: 11px; }
  .capture-card-ready { font-size: 9px; }
  .capture-window { top: 218px; left: 7%; width: 86%; height: 176px; border-radius: 11px; }
  .capture-window-bar { height: 30px; padding-inline: 59px; font-size: 9px; }
  .capture-window-dots { left: 11px; gap: 5px; }
  .capture-window-dots i { width: 6px; height: 6px; }
  .capture-window-body { height: calc(100% - 30px); padding: 13px 15px; }
  .capture-window-paper { padding: 10px 12px 8px; border-radius: 6px; }
  .capture-window-heading { font-size: 12px; margin-bottom: 8px; }
  .capture-source-image { max-height: 76px; }
  .capture-window-caption { font-size: 9px; margin-top: 6px; }
  .capture-selection { inset: 42px 14px 13px; }
  .capture-selection-label { bottom: 7px; right: 7px; font-size: 9px; }
  .capture-recording-badge { top: 5px; right: 6px; font-size: 9px; gap: 5px; padding: 4px 7px; }
  .capture-controls { display: grid; gap: 15px; margin: 0 12px 12px; padding: 16px; min-height: 147px; }
  .capture-status { font-size: 13px; min-height: 44px; }
  .capture-actions { justify-content: space-between; gap: 10px; }
  .capture-primary { min-height: 46px; padding-inline: 18px; font-size: 13px; }
  .capture-reset { font-size: 13px; }
  .capture-fallback { padding-block: 22px 20px; }
  .capture-fallback figcaption { padding: 15px 18px 0; font-size: 13px; }
}
@media (max-width: 650px) and (prefers-reduced-motion: no-preference) {
  .capture-demo[data-capture-state="hanging"] .capture-hanging-card { animation-name: capture-hang-phone; }
}
@keyframes capture-hang-phone { 0% { opacity: 0; transform: translate(-80px, 230px) scale(.68) rotate(-7deg); } 65% { opacity: 1; transform: translate(0, -6px) scale(1.02) rotate(-3deg); } 100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) {
  .capture-mode, .capture-primary, .capture-reset { transition: none; }
  .capture-primary:active:not(:disabled), .capture-reset:active { transform: none; }
}
