/* One shared frame connects the existing video card and its native modal. */
html body dialog.mg-dialog.mg-motion-dialog {
  position:fixed;inset:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;
  margin:0;padding:16px;border:0;border-radius:0;background:transparent!important;
  box-shadow:none;overflow:hidden;animation:none;box-sizing:border-box;
}
html body dialog.mg-motion-dialog[open] {display:grid;place-items:center;}
html body dialog.mg-motion-dialog::backdrop {background:rgba(8,17,14,.86);backdrop-filter:blur(7px);animation:gifs-mg-dim 420ms ease both;}
html body dialog.mg-motion-dialog[data-phase="closing"]::backdrop {animation:gifs-mg-undim 310ms ease both;}
html body dialog.mg-motion-dialog .mg-viewer {position:relative;z-index:1;width:min(1100px,100%);max-height:100%;min-width:0;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;background:#19382d;border:1px solid #bca77870;border-radius:8px;box-shadow:0 25px 100px #0007;transition:opacity 180ms ease;}
html body dialog.mg-motion-dialog[data-phase="opening"] .mg-viewer {animation:gifs-mg-panel 420ms ease both;}
html body dialog.mg-motion-dialog[data-phase="closing"] .mg-viewer {opacity:0;pointer-events:none;}
html body dialog.mg-motion-dialog[data-flight="on"] .mg-video-shell {visibility:hidden;}
html body dialog.mg-motion-dialog .mg-motion-flight {display:none;position:fixed;z-index:2;pointer-events:none;overflow:hidden;background:#0f1713;box-shadow:0 16px 60px #0004;}
html body dialog.mg-motion-dialog[data-flight="on"] .mg-motion-flight {display:block;}
html body dialog.mg-motion-dialog .mg-motion-flight video {width:100%;height:100%;display:block;object-fit:contain;}
html body dialog.mg-motion-dialog .mg-viewer :is(p,span,button,a) {font-family:Arial,sans-serif!important;}
html body dialog.mg-motion-dialog .mg-viewer p {font-size:17px!important;line-height:1.5!important;}
html body dialog.mg-motion-dialog .mg-viewer-head span {font-size:14px!important;line-height:1.5!important;}
html body dialog.mg-motion-dialog .mg-viewer-head h2 {font-family:'GIFS Serif',Georgia,serif!important;font-size:clamp(28px,3vw,40px)!important;line-height:1.1!important;}
html body dialog.mg-motion-dialog .mg-viewer-foot a {font-size:16px!important;white-space:normal;}
html body dialog.mg-motion-dialog .mg-viewer-foot {align-items:start;gap:20px;flex-wrap:wrap;}
html body dialog.mg-motion-dialog .mg-video-shell {min-height:0;}
@keyframes gifs-mg-dim {from {background:rgba(8,17,14,0);backdrop-filter:blur(0);} to {background:rgba(8,17,14,.86);backdrop-filter:blur(7px);}}
@keyframes gifs-mg-undim {from {background:rgba(8,17,14,.86);backdrop-filter:blur(7px);} to {background:rgba(8,17,14,0);backdrop-filter:blur(0);}}
@keyframes gifs-mg-panel {0% {opacity:0;} 45% {opacity:.4;} 100% {opacity:1;}}
@media(max-width:600px) {html body dialog.mg-dialog.mg-motion-dialog {padding:8px;} html body dialog.mg-motion-dialog .mg-viewer {padding:14px;} html body dialog.mg-motion-dialog .mg-viewer p {font-size:16px!important;} html body dialog.mg-motion-dialog .mg-viewer-head {gap:12px;} }
@media(prefers-reduced-motion:reduce) {html body dialog.mg-motion-dialog::backdrop,html body dialog.mg-motion-dialog .mg-viewer {animation:none!important;transition:none!important;}}

/* Scoped to f3(). No global typography, scroll, or route changes. */
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion {
  overflow-anchor: none;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .craft-demo-spread {
  position: relative;
  isolation: isolate;
  align-items: start;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion [hidden] { display: none !important; }
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .craft-ticket-sheet {
  opacity: 1 !important;
  transform: none !important;
  transition: border-color 260ms ease, box-shadow 260ms ease;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .craft-ticket-sheet[data-ready="true"] {
  border-color: rgba(48, 102, 62, .5);
  box-shadow: 0 12px 32px rgba(41, 69, 40, .07);
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-source {
  font: inherit !important;
  color: inherit !important;
  padding: 2px 0 !important;
  border-radius: 3px;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-source[data-active] {
  background: #f5dfa3;
  box-shadow: 0 0 0 3px #f5dfa3;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-source[data-collected] {
  background: #dfead7;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-replies {
  display: grid;
  gap: 14px;
  animation: gifs-bot-reply-in 300ms ease both;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-rule {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 2px solid #c7cbb3;
  background: rgba(250, 248, 239, .65);
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-rule > div { display: grid; gap: 5px; }
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-rule > div > span {
  font: 600 14px/1.4 Arial, sans-serif !important;
  color: #5c6552 !important;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-rule mark { justify-self: start; font-size: 16px !important; }
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin: 0 0 16px !important;
  color: #4d6243 !important;
  font: 16px/1.45 Arial, sans-serif !important;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-status i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #a0aa92;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion[data-phase="ready"] .gifs-bot-status i { background: #42713c; }
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-field dd {
  position: relative;
  min-height: 3em;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-value {
  display: block;
  visibility: hidden;
  font: inherit !important;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-field[data-filled] .gifs-bot-value {
  visibility: visible;
  animation: gifs-bot-value-in 260ms ease both;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-placeholder {
  position: absolute;
  inset: 0;
  color: #707566 !important;
  font: 16px/1.5 Arial, sans-serif !important;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-demo-note {
  margin: 20px 0 0 !important;
  color: #69705f !important;
  font: 14px/1.55 Arial, sans-serif !important;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-flight {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  pointer-events: none;
  padding: 9px 12px;
  border: 1px solid #b3c9a6;
  border-radius: 5px;
  color: #294528 !important;
  background: #eff5e8;
  box-shadow: 0 6px 18px rgba(38, 65, 37, .12);
  font: 600 16px/1.45 Arial, sans-serif !important;
  overflow-wrap: anywhere;
  animation: gifs-bot-transfer 560ms cubic-bezier(.22,.7,.22,1) both;
}
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-flight[data-local] { animation-name: gifs-bot-transfer-local; }
html.gifs-refined body #root#root#root#root#root .gifs-bot-motion button:focus-visible { outline: 3px solid #597a43; outline-offset: 4px; }
@keyframes gifs-bot-reply-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gifs-bot-value-in { from { opacity: .3; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gifs-bot-transfer {
  0% { opacity: 0; transform: translate(0, 0) scale(.96); }
  16% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--bot-dx), var(--bot-dy)) scale(1); }
}
@keyframes gifs-bot-transfer-local {
  0% { opacity: 0; transform: translate(0, 0); }
  28% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--bot-dx), var(--bot-dy)); }
}
@media (max-width: 760px) {
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .craft-demo-spread { grid-template-columns: minmax(0, 1fr) !important; }
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .craft-demo-next { width: 100%; justify-content: space-between; }
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-field dd { min-height: 3em; }
}
@media (prefers-reduced-motion: reduce) {
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion *,
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion *::before,
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion *::after { animation: none !important; transition: none !important; }
  html.gifs-refined body #root#root#root#root#root .gifs-bot-motion .gifs-bot-flight { display: none !important; }
}

/* Apps: the same interface reshapes from a desktop window into a phone. */
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-preview {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(24px, 3vw, 42px);
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 452px;
  padding: 8px 0;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-frame {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 286px;
  margin: 0;
  padding: 20px 18px !important;
  border: 2px solid #bca678;
  border-radius: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  box-shadow: 0 14px 32px #193c291a;
  transition: max-width 640ms cubic-bezier(.22,.75,.2,1), min-height 640ms cubic-bezier(.22,.75,.2,1), border-radius 640ms cubic-bezier(.22,.75,.2,1), padding 640ms cubic-bezier(.22,.75,.2,1);
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-frame.is-phone {
  max-width: 310px;
  min-height: 426px;
  border-radius: 30px;
  padding: 24px 16px !important;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding-bottom: 14px !important;
  line-height: 1.5;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-top > span {
  font-size: 16px !important;
  color: #f3e9d2;
  overflow-wrap: anywhere;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-top > strong {
  font-size: 13px !important;
  font-weight: 400;
  color: #cbdcb7;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  min-width: 0;
  padding: 12px !important;
  font-size: 16px !important;
  line-height: 1.5;
  text-align: left;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-row > span,
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-row > strong {
  flex: 1 1 138px;
  min-width: 0;
  overflow-wrap: anywhere;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-row > strong {
  color: #f3e9d2;
  font-weight: 600;
}
html.gifs-refined body #root#root#root#root#root .craft-apps .craft-task-tabs button:focus-visible {
  outline: 3px solid #26734d;
  outline-offset: 4px;
}
@media (max-width: 900px) {
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-preview {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage {
    width: 100%;
    max-width: 540px;
    justify-self: center;
  }
}
@media (max-width: 440px) {
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-preview {
    padding: 20px 14px !important;
  }
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-frame,
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-device-stage .craft-device-frame.is-phone {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.gifs-refined body #root#root#root#root#root .craft-apps .apps-motion-preview * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Parser demo: scoped to the existing third stage, never changes deck scrolling. */
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo,
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo * {
  box-sizing: border-box !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo {
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid #bca98070;
  border-radius: 18px;
  background: #18211fe6;
  color: #f6eedb;
  isolation: isolate;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo h3 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: -.015em !important;
  color: #fff5df !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-label {
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #c8baa0 !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-status {
  margin: 10px 0 18px !important;
  font-size: 17px !important;
  line-height: 1.5 !important;
  color: #e3d9c4 !important;
  min-height: 3em;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-table {
  width: 100%;
  min-width: 0;
  margin-bottom: 18px;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-columns {
  display: grid;
  grid-template-columns: .9fr .8fr 1.1fr;
  gap: 8px;
  height: 0;
  padding: 0 12px;
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: #d2c3a8 !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-columns {
  height: auto;
  padding-bottom: 10px;
  visibility: visible;
  opacity: 1;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-columns > :last-child {
  text-align: right;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 12px;
  font-size: 17px !important;
  line-height: 1.45 !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-surface {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid #bca98055;
  border-radius: 10px;
  background: #36423b;
  transform-origin: 0 0;
  pointer-events: none;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-row > span {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: 0 !important;
  transform-origin: 0 0;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-source {
  font-weight: 600 !important;
  color: #f2d69c !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-product {
  color: #e7dfce !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-price {
  justify-self: end;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #fff5df !important;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-rows {
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-row {
  grid-template-columns: .9fr .8fr 1.1fr;
  gap: 8px;
  margin: 0;
  width: 100%;
  padding: 13px 12px;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-surface {
  border-radius: 3px;
  border-color: #bca98030;
  background: #303d35;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-price {
  text-align: right;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 11px 18px;
  border: 1px solid #dfc184;
  border-radius: 10px;
  background: #e4cc98;
  color: #16231d !important;
  font-size: 17px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}
html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-button:hover {
  background: #f2deb4;
}
@media (max-width: 600px) {
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo {
    padding: 16px 12px;
  }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-row {
    width: calc(100% - 16px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    padding: 10px 12px;
    font-size: 16px !important;
  }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-row:nth-child(2) { margin-left: 8px; }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-row:nth-child(3) { margin-left: 16px; }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-source { grid-column: 1 / -1; }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-price { text-align: right; }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-row {
    margin-left: 0;
    padding-inline: 8px;
    gap: 5px;
  }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo.is-collected .gifs-parser-demo-source { grid-column: auto; }
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo-columns { padding-inline: 8px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html.gifs-refined body #root#root#root#root#root .v9-parsers-deck .gifs-parser-demo * {
    animation: none !important;
    transition: none !important;
  }
}
