/* Homepage interactive extension demo. Everything is scoped to .ext-demo. */
.ext-demo {
  --xd-ink: #171717;
  --xd-muted: #777;
  --xd-line: #e6e6e6;
  --xd-ext-line: #d4d4d4;
  --xd-green: #5f8c5d;
  --xd-green-soft: #eef4ed;
  --xd-hot: #2f6fed;
  --xd-shadow: 0 1px 1px rgb(255 255 255 / .78) inset, 0 24px 70px rgb(0 0 0 / .18), 0 5px 18px rgb(0 0 0 / .1);
  padding: 30px 0 70px;
  margin: 0;
  border: 0;
}
.ext-demo__heading { text-align: center; max-width: 640px; margin: 0 auto 26px; }
.ext-demo__lede { color: #888; font-size: 14px; line-height: 1.65; margin: 14px auto 0; max-width: 520px; }
.ext-demo__noscript { text-align: center; color: var(--xd-muted); font-size: 13px; }

.ext-demo__tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 auto 18px; }
.ext-demo__tabs button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 8px 16px; border: 1px solid transparent; border-radius: 99px;
  background: transparent; color: #666; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.ext-demo__tabs button:hover { color: var(--xd-ink); background: #f1f1f1; }
.ext-demo__tabs button[aria-selected="true"] { color: var(--xd-ink); background: #fff; border-color: var(--xd-line); box-shadow: 0 2px 6px -3px #0002; }
.ext-demo__tabs button span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #999; }
.ext-demo__tabs button:focus-visible, .ext-demo button:focus-visible, .ext-demo select:focus-visible, .ext-demo textarea:focus-visible, .ext-demo input:focus-visible {
  outline: 2px solid var(--xd-hot); outline-offset: 2px;
}

.ext-demo__stage { max-width: 1040px; margin: 0 auto; }
.ext-demo__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.ext-demo__cta .button { width: auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.ext-demo__cta .button--secondary { border-color: var(--line); background: #fff; }
.ext-demo__cta .firefox-logo, .ext-demo__cta .chrome-logo { width: 17px; height: 17px; }
.ext-demo__fineprint { text-align: center; color: #999; font-size: 11px; margin: 14px 0 0; }

/* ---------- guide ---------- */
.xd-guide { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0 4px 12px; }
.xd-guide__step {
  flex-shrink: 0; font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; color: #888;
  padding: 4px 9px; border-radius: 99px; background: #f1f1f1;
}
.xd-guide__step.is-done { background: var(--xd-green-soft); color: var(--xd-green); }
.xd-guide__text { flex: 1; min-width: 0; font-size: 16px; font-weight: 550; letter-spacing: -.02em; color: var(--xd-ink); }
.xd-guide__replay, .xd-guide__next {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  min-height: 34px; padding: 6px 13px; border-radius: 99px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.xd-guide__replay { border: 1px solid var(--xd-line); background: #fff; color: #555; }
.xd-guide__next { border: 1px solid #454545; background: #202020; color: #fff; }
.xd-guide__replay[hidden], .xd-guide__next[hidden] { display: none; }
.xd-guide .xd-icon { width: 14px; height: 14px; }

/* ---------- layout ---------- */
.xd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: stretch; }
.xd-icon { width: 18px; height: 18px; flex-shrink: 0; }
.xd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.xd-window {
  min-width: 0; border: 1px solid var(--xd-line); border-radius: 16px; background: #fff; overflow: hidden;
  box-shadow: 0 30px 60px -40px #0005, 0 2px 6px #00000008;
}
.xd-chrome { display: flex; align-items: flex-end; gap: 14px; padding: 10px 14px 0; background: #eeeeee; }
.xd-dots { display: flex; gap: 7px; padding-bottom: 12px; }
.xd-dots i { width: 11px; height: 11px; border-radius: 50%; background: #d8d8d8; }
.xd-dots i:nth-child(1) { background: #ff6159; }
.xd-dots i:nth-child(2) { background: #ffbd2e; }
.xd-dots i:nth-child(3) { background: #28c941; }
.xd-tab {
  max-width: 260px; min-width: 0; padding: 8px 16px; border-radius: 9px 9px 0 0; background: #fff;
  font-size: 12px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xd-toolbar { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--xd-line); }
.xd-nav { display: flex; gap: 6px; color: #aaa; }
.xd-nav .xd-icon { width: 16px; height: 16px; }
.xd-address {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px;
  background: #f3f3f3; font-size: 12px; color: #555; white-space: nowrap; overflow: hidden;
}
.xd-address span { overflow: hidden; text-overflow: ellipsis; }
.xd-address .xd-icon { width: 12px; height: 12px; color: #999; }
.xd-ext-btn {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.xd-ext-btn:hover, .xd-ext-btn.is-open { background: #ececec; }
.xd-ext-btn img { width: 18px; height: 18px; border-radius: 4px; }

.xd-viewport { position: relative; height: 480px; overflow: hidden; background: #fafafa; }
.xd-page { position: absolute; inset: 0; overflow: hidden; animation: xd-fade .35s ease; }
.xd-overlay { position: absolute; inset: 0; pointer-events: none; transition: background-color .25s; }
.xd-overlay > * { pointer-events: auto; }
.xd-overlay.has-dim { background: rgb(0 0 0 / .28); pointer-events: auto; }

/* Pulsing hotspot that marks the next thing to click. */
.xd-hot { position: relative; z-index: 1; }
.xd-hot::after {
  content: ""; position: absolute; inset: -5px; border-radius: inherit; border: 2px solid var(--xd-hot);
  pointer-events: none; animation: xd-pulse 1.6s ease-out infinite;
}

/* ---------- sample artwork ---------- */
.xd-art { background: #ddd; }

.xd-thumb { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #e5e5e5; }
.xd-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xd-duration {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 99px; background: rgb(0 0 0 / .6); color: #fff; font-size: 10px; font-weight: 500;
}
.xd-duration .xd-icon { width: 9px; height: 9px; fill: currentColor; }
.xd-avatar { display: block; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: #333; }
.xd-avatar--lg { width: 66px; height: 66px; border: 3px solid #000; }
.xd-skeleton { display: block; height: 9px; border-radius: 99px; background: #e9e9e9; margin: 9px 0; }
.xd-skeleton--short { width: 60%; }

/* ---------- scene: post ---------- */
[data-scene="post"] .xd-viewport, [data-scene="batch"] .xd-viewport { background: #000; }
.xd-post {
  width: min(470px, calc(100% - 32px)); margin: 18px auto 0; padding: 14px 16px 10px;
  border: 1px solid #2f3336; border-radius: 16px; color: #e7e9ea; font-size: 14px; line-height: 1.45;
}
.xd-post__head { display: flex; align-items: center; gap: 10px; }
.xd-post__head > span { display: flex; flex-direction: column; min-width: 0; }
.xd-post__head small { color: #71767b; font-size: 13px; }
.xd-post__more { margin-left: auto; color: #71767b; }
.xd-post p { margin: 10px 0 12px; }
.xd-post__media { border: 1px solid #2f3336; border-radius: 14px; overflow: hidden; background: #000; }
.xd-post__media img { display: block; width: 100%; height: 250px; object-fit: cover; }
.xd-post__actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: #71767b; font-size: 12px; }
.xd-post__actions > span { display: inline-flex; align-items: center; gap: 5px; flex: 1; }
.xd-post__actions .xd-icon { width: 16px; height: 16px; }
.xd-post__actions .xd-post__share { flex: 0 0 auto; margin-right: 6px; }
.xd-inject-btn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #71767b; cursor: pointer;
}
.xd-inject-btn:hover, .xd-inject-btn.xd-hot { color: #e7e9ea; background: rgb(255 255 255 / .08); }

/* ---------- scene: batch ---------- */
[data-scene="batch"] .xd-page { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.xd-profile { color: #e7e9ea; width: min(620px, 100%); margin: 0 auto; }
.xd-profile__banner { display: block; width: 100%; height: 92px; object-fit: cover; }
.xd-profile__id { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -30px; }
.xd-profile__id > span:last-child { display: flex; flex-direction: column; padding-bottom: 4px; font-size: 15px; }
.xd-profile__id small { color: #71767b; font-size: 12px; }
.xd-profile__tabs { display: flex; gap: 24px; padding: 12px 16px 0; border-bottom: 1px solid #2f3336; font-size: 13px; color: #71767b; }
.xd-profile__tabs span { padding-bottom: 10px; }
.xd-profile__tabs .is-active { color: #e7e9ea; font-weight: 600; box-shadow: inset 0 -3px 0 #1d9bf0; }
.xd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.xd-grid__item { position: relative; padding: 0; border: 0; background: none; cursor: default; aspect-ratio: 1.35; }
.xd-grid__item .xd-thumb { width: 100%; height: 100%; border-radius: 2px; }
.xd-grid__check {
  position: absolute; top: 7px; right: 7px; display: none; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid #fff; background: rgb(0 0 0 / .35); color: transparent;
}
.xd-grid__check .xd-icon { width: 13px; height: 13px; stroke-width: 3; }
.xd-grid.is-selecting .xd-grid__item { cursor: pointer; }
.xd-grid.is-selecting .xd-grid__check { display: grid; }
.xd-grid.is-selecting .xd-grid__item::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border: 2px dashed rgb(255 255 255 / .35); border-radius: 2px; pointer-events: none;
}
.xd-grid.is-selecting .xd-grid__item[aria-pressed="true"]::before { border: 3px solid var(--xd-hot); background: rgb(47 111 237 / .18); }
.xd-grid__item[aria-pressed="true"] .xd-grid__check { background: var(--xd-hot); border-color: var(--xd-hot); color: #fff; }

.xd-selectbar {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(620px, calc(100% - 24px)); box-sizing: border-box;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; overflow: hidden;
  border: 1px solid var(--xd-ext-line); border-radius: 12px; background: #fff; box-shadow: var(--xd-shadow);
  font-size: 12px; color: #262626; animation: xd-rise .3s cubic-bezier(.22, 1, .36, 1);
}
.xd-selectbar__hint { flex: 1 1 220px; display: inline-flex; align-items: center; gap: 6px; color: #666; }
.xd-selectbar.is-done { border-color: var(--xd-green); }
.xd-selectbar.is-done .xd-selectbar__hint { color: var(--xd-green); font-weight: 600; }
.xd-selectbar__hint .xd-icon { width: 15px; height: 15px; }
.xd-selectbar__count { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- scene: paste ---------- */
[data-scene="paste"] .xd-viewport { background: #fff; }
.xd-reel { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; width: min(560px, calc(100% - 32px)); margin: 22px auto 0; }
.xd-reel__video { position: relative; height: 400px; border-radius: 10px; overflow: hidden; background: #222; }
.xd-reel__video > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.xd-reel__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fffd; }
.xd-reel__play .xd-icon { width: 38px; height: 38px; fill: currentColor; }
.xd-reel__side { padding-top: 6px; font-size: 13px; color: #262626; }
.xd-reel__user { display: flex; align-items: center; gap: 9px; }
.xd-reel__user .xd-avatar { width: 30px; height: 30px; }
.xd-reel__copy { display: inline-block; margin-top: 18px; padding: 7px 10px; border-radius: 8px; background: #f3f3f3; color: #666; font-size: 11px; }
.xd-reel__copy code { font-family: "Geist Mono", ui-monospace, monospace; color: #262626; }

.xd-popup {
  position: absolute; top: 6px; right: 8px; width: min(340px, calc(100% - 16px));
  border: 1px solid var(--xd-ext-line); border-radius: 10px; background: #fff; box-shadow: var(--xd-shadow);
  color: #262626; font-size: 12px; transform-origin: top right; animation: xd-pop .25s cubic-bezier(.22, 1, .36, 1);
}
.xd-popup__bar { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px 9px 14px; border-bottom: 1px solid #ebebeb; font-size: 13px; }
.xd-popup__tools { display: flex; gap: 2px; }
.xd-popup__tool { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #555; cursor: pointer; }
.xd-popup__tool .xd-icon { width: 15px; height: 15px; }
.xd-popup__tool:hover { background: #f1f1f1; }
.xd-popup__status { display: flex; align-items: center; gap: 7px; margin: 0; padding: 8px 14px; border-bottom: 1px solid #ebebeb; font-weight: 600; }
.xd-popup__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--xd-green); }
.xd-popup__status small { margin-left: auto; font-weight: 400; color: #888; }
.xd-popup__body { display: grid; gap: 9px; padding: 12px 14px 14px; }
.xd-popup__label { margin: 0; color: #666; font-size: 11px; font-weight: 500; }
.xd-popup__choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.xd-choice {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--xd-ext-line);
  border-radius: 8px; background: #fff; font: inherit; font-size: 11px; color: #444; cursor: pointer;
}
.xd-choice[aria-pressed="true"] { border-color: #262626; box-shadow: 0 0 0 1px #262626 inset; color: #262626; font-weight: 600; }
.xd-choice img, .xd-choice .xd-local-logo { width: 18px; height: 18px; }
.xd-popup__row { display: flex; justify-content: space-between; align-items: center; }
.xd-popup__folder { display: inline-flex; align-items: center; gap: 4px; color: #666; font-size: 11px; }
.xd-popup__folder .xd-icon { width: 12px; height: 12px; }
.xd-popup__input {
  width: 100%; box-sizing: border-box; resize: none; padding: 8px 10px; border: 1px solid var(--xd-ext-line); border-radius: 8px;
  font: 12px/1.45 "Geist Mono", ui-monospace, monospace; color: #262626; background: #fff;
}
.xd-pasted {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; overflow: hidden;
  border: 1px solid var(--xd-ext-line); border-radius: 8px; animation: xd-rise .3s cubic-bezier(.22, 1, .36, 1);
}
.xd-pasted .xd-thumb { width: 64px; height: 64px; flex-shrink: 0; }
.xd-pasted > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xd-pasted strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-pasted small { color: #777; font-size: 11px; }
.xd-pasted.is-done { border-color: var(--xd-green); background: var(--xd-green-soft); }
.xd-pasted.is-done small { color: var(--xd-green); }
.xd-pasted__ok { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--xd-green); color: #fff; animation: xd-check .45s cubic-bezier(.34, 1.35, .64, 1); }
.xd-pasted__ok .xd-icon { width: 14px; height: 14px; stroke-width: 3; }
.xd-popup__save { width: 100%; }

/* ---------- scene: web ---------- */
[data-scene="web"] .xd-viewport { background: #fffdf8; }
.xd-blog { width: min(640px, calc(100% - 40px)); margin: 26px auto 0; padding-bottom: 20px; color: #2b2b2b; }
[data-scene="web"] .xd-page { overflow-y: auto; scrollbar-width: thin; }
.xd-blog__media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.xd-blog__kicker { margin: 0 0 6px; color: #a07a4a; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.xd-blog h3 { margin: 0 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; letter-spacing: -.01em; }
.xd-blog__photo { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; background: none; cursor: context-menu; }
.xd-blog__photo { position: relative; }
.xd-blog__photo .xd-thumb { height: 230px; border-radius: 10px; }
.xd-blog__video .xd-duration { display: none; }
.xd-blog__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgb(0 0 0 / .45); color: #fff; backdrop-filter: blur(4px); }
.xd-blog__play .xd-icon { width: 20px; height: 20px; fill: currentColor; margin-left: 3px; }
.xd-blog__controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 18px 12px 10px; border-radius: 0 0 10px 10px; background: linear-gradient(transparent, rgb(0 0 0 / .6)); color: #fff; font-size: 10px; }
.xd-blog__controls .xd-icon { width: 12px; height: 12px; fill: currentColor; }
.xd-blog__controls i { flex: 1; height: 3px; border-radius: 99px; background: rgb(255 255 255 / .35); }
.xd-blog__controls b { display: block; width: 30%; height: 100%; border-radius: inherit; background: #fff; }
.xd-menu {
  position: absolute; width: 210px; display: grid; padding: 5px; border: 1px solid #d6d6d6; border-radius: 9px;
  background: rgb(250 250 250 / .97); box-shadow: 0 12px 34px rgb(0 0 0 / .2); font-size: 13px; color: #262626;
  animation: xd-pop .16s ease-out; transform-origin: top left;
}
.xd-menu span { padding: 6px 10px; color: #9a9a9a; }
.xd-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid #e3e3e3; }
.xd-menu__tma {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent;
  font: inherit; color: #262626; text-align: left; cursor: pointer;
}
.xd-menu__tma:hover, .xd-menu__tma:focus-visible { background: var(--xd-hot); color: #fff; outline: none; }
.xd-menu__tma img { border-radius: 3px; }

/* ---------- platform switcher (Save a post) ---------- */
.xd-platforms { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.xd-platforms[hidden] { display: none; }
.xd-platform {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 12px 5px 7px;
  border: 1px solid var(--xd-line); border-radius: 99px; background: #fff; color: #555;
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: border-color .2s, box-shadow .2s, color .2s;
}
.xd-platform img { width: 20px; height: 20px; border-radius: 5px; }
.xd-platform:hover { color: var(--xd-ink); border-color: #cfcfcf; }
.xd-platform[aria-pressed="true"] { color: var(--xd-ink); border-color: var(--xd-ink); box-shadow: 0 0 0 1px var(--xd-ink) inset; }

/* ---------- Instagram ---------- */
.xd-ig { width: min(400px, calc(100% - 32px)); margin: 14px auto 0; color: #f5f5f5; font-size: 13px; }
.xd-ig__head { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
.xd-ig__head .xd-avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px #000, 0 0 0 4px #d62976; }
.xd-ig__head small { color: #a8a8a8; }
.xd-ig__follow { color: #0095f6; font-weight: 600; }
.xd-ig__more { margin-left: auto; }
.xd-ig__media .xd-thumb { height: 300px; border-radius: 4px; }
.xd-ig__actions { display: flex; align-items: center; gap: 14px; padding: 10px 0 6px; }
.xd-ig__actions > .xd-icon { width: 22px; height: 22px; }
.xd-ig__actions .xd-inject-btn { width: 32px; height: 32px; margin-left: -6px; color: #f5f5f5; }
.xd-ig__spacer { flex: 1; }
.xd-ig__caption { margin: 0; line-height: 1.5; }

/* ---------- Threads ---------- */
[data-platform="threads"] .xd-viewport { background: #101010; }
.xd-th { display: flex; gap: 12px; width: min(500px, calc(100% - 32px)); margin: 22px auto 0; padding: 16px; box-sizing: border-box; border: 1px solid #2d2d2d; border-radius: 18px; background: #181818; color: #f3f5f7; font-size: 14px; }
.xd-th .xd-avatar { width: 36px; height: 36px; }
.xd-th__body { flex: 1; min-width: 0; }
.xd-th__body p { margin: 0 0 8px; }
.xd-th__who { display: flex; align-items: center; gap: 8px; }
.xd-th__who small { color: #777; }
.xd-th__more { margin-left: auto; color: #777; }
.xd-th__media .xd-thumb { height: 260px; border-radius: 8px; }
.xd-th__actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; color: #ccc; font-size: 12px; }
.xd-th__actions > span { display: inline-flex; align-items: center; gap: 5px; }
.xd-th__actions .xd-icon { width: 18px; height: 18px; }
.xd-th__actions .xd-inject-btn { color: #ccc; margin-left: -6px; }

/* ---------- Reddit ---------- */
[data-platform="reddit"] .xd-viewport { background: #0e1113; }
.xd-rd { width: min(560px, calc(100% - 32px)); margin: 18px auto 0; color: #d7dadc; font-size: 13px; }
.xd-rd__sub { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 12px; }
.xd-rd__sub .xd-avatar { width: 22px; height: 22px; }
.xd-rd__sub small { color: #8ba2ad; }
.xd-rd h4 { margin: 0 0 10px; color: #f2f4f5; font-size: 17px; font-weight: 600; line-height: 1.3; }
.xd-rd__media .xd-thumb { height: 280px; border-radius: 14px; }
.xd-rd__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.xd-rd__pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: #2a3236; color: #d7dadc; font-size: 12px; font-weight: 600; }
.xd-rd__pill .xd-icon { width: 16px; height: 16px; }
.xd-inject-btn.xd-rd__pill { display: inline-flex; width: auto; height: 32px; padding: 0 12px; border-radius: 99px; background: #2a3236; color: #d7dadc; }
.xd-inject-btn.xd-rd__pill:hover, .xd-inject-btn.xd-rd__pill.xd-hot { background: #3a4449; }

/* ---------- 4chan (Yotsuba B) ---------- */
[data-platform="fourchan"] .xd-viewport { background: #eef2ff; }
.xd-4c { padding: 14px 18px; color: #000; font: 13px/1.45 arial, helvetica, sans-serif; }
.xd-4c p { margin: 0; }
.xd-4c__board { text-align: center; color: #af0a0f; font: 700 24px/1.2 tahoma, sans-serif; letter-spacing: -1px; }
.xd-4c hr { border: 0; border-top: 1px solid #b7c5d9; margin: 10px 0; }
.xd-4c__file { font-size: 12px; margin-bottom: 4px !important; }
.xd-4c__file u { color: #34345c; }
.xd-4c__row { display: flex; align-items: flex-start; gap: 14px; }
.xd-4c__thumb { width: 190px; height: 126px; flex-shrink: 0; border-radius: 0; }
.xd-4c__thumb--sm { width: 120px; height: 80px; }
.xd-4c__meta { font-size: 12px; margin-bottom: 6px !important; }
.xd-4c__subject { color: #0f0c5d; }
.xd-4c__name { color: #117743; }
.xd-4c__dl { padding: 2px 4px; border: 0; border-radius: 3px; background: transparent; color: #34345c; font: inherit; cursor: pointer; }
.xd-4c__dl:hover, .xd-4c__dl.xd-hot { color: #dd0000; }
.xd-4c__reply { display: table; margin: 8px 0 0 12px; padding: 6px 10px; background: #d6daf0; border: 1px solid #b7c5d9; border-left: 0; border-top: 0; }
.xd-4c__reply .xd-4c__row p { max-width: 260px; }

/* ---------- multi-media picker candidates ---------- */
.xd-cands__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; }
.xd-cands__bar .xd-btn { min-height: 28px; padding: 4px 10px; font-size: 11px; }
.xd-cands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.xd-cand { position: relative; display: grid; gap: 4px; padding: 5px; border: 1px solid var(--xd-ext-line); border-radius: 9px; background: #fff; cursor: pointer; text-align: left; }
.xd-cand .xd-thumb { height: 78px; border-radius: 6px; }
.xd-cand small { color: #666; font-size: 10px; }
.xd-cand .xd-grid__check { display: grid; top: 9px; right: 9px; }
.xd-cand[aria-pressed="true"] { border-color: var(--xd-green); background: var(--xd-green-soft); }
.xd-cand[aria-pressed="true"] .xd-grid__check { background: var(--xd-green); border-color: var(--xd-green); color: #fff; }
.xd-cand:disabled { cursor: default; }

/* ---------- website sign in (mirrors website/downloads) ---------- */
[data-scene="login"] .xd-viewport { background: #faf9f6; }
[data-scene="login"] .xd-page { overflow-y: auto; scrollbar-width: thin; }
.xd-web { width: min(560px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 24px; color: #171717; }
.xd-web__nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-size: 13px; font-weight: 600; letter-spacing: -.02em; }
.xd-web__nav span { display: inline-flex; align-items: center; gap: 8px; }
.xd-web__nav img { border-radius: 5px; }
.xd-web__nav small { color: #777; font-size: 12px; font-weight: 400; }
.xd-web__login { display: grid; gap: 18px; max-width: 360px; margin: 58px auto 0; text-align: center; }
.xd-web__login h3 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.035em; line-height: 1.2; }
.xd-web__login p { margin: 0; color: #66625c; font-size: 13px; line-height: 1.6; }
.xd-web__google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border: 1px solid #d2d2d7; border-radius: 12px; background: #fff; color: #171717; font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
}
.xd-web__google:disabled { cursor: default; opacity: .7; }
.xd-g { width: 18px; height: 18px; }
.xd-web__account { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid rgb(0 0 0 / .045); border-radius: 18px; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .025); }
.xd-web--dash.is-new .xd-web__account { animation: xd-rise .35s cubic-bezier(.22, 1, .36, 1); }
.xd-web__avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: #f4ede3; color: #c96f2c; font-weight: 500; }
.xd-web__account > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.xd-web__account strong { font-size: 13px; }
.xd-web__account small { color: #777; font-size: 11px; }
.xd-web__logout { margin-left: auto; font-size: 12px; font-weight: 500; }
.xd-web__title { margin: 26px 0 18px; text-align: center; font-size: 34px; font-weight: 550; letter-spacing: -.05em; }
.xd-web__bar { border: 1px solid #e3ddd2; border-radius: 16px; background: #fffdf8; overflow: hidden; }
.xd-web__paste { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 14px; border-bottom: 1px solid #e9e4db; }
.xd-web__paste input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: #171717; }
.xd-web__paste input:focus { outline: none; }
.xd-web__go { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 11px; background: #171717; color: #fff; cursor: pointer; }
.xd-web__go:disabled { opacity: .35; cursor: default; }
.xd-web__folder { display: flex; gap: 14px; padding: 11px 14px; font-size: 12px; }
.xd-web__folder span { color: #777; }
.xd-web__folder strong { font-weight: 500; }
.xd-web__dests { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.xd-web__dests span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #e3ddd2; border-radius: 10px; background: #fff; font-size: 12px; color: #555; }
.xd-web__dests span.is-on { background: #f4f0e8; color: #171717; font-weight: 500; }
.xd-web__dests .xd-icon, .xd-web__dests img { width: 15px; height: 15px; }
.xd-web__sample { margin: 16px auto 0; display: flex; width: fit-content; }
.xd-web__media { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px; overflow: hidden; border: 1px solid #e3ddd2; border-radius: 16px; background: #fff; }
.xd-web__media.is-saving { animation: xd-rise .3s cubic-bezier(.22, 1, .36, 1); }
.xd-web__media.is-done { border-color: #bcd9c4; background: #eef7f0; }
.xd-web__media .xd-thumb { width: 84px; height: 60px; flex-shrink: 0; }
.xd-web__media > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; font-size: 13px; }
.xd-web__media small { color: #777; font-size: 11px; }
.xd-web__media .xd-pasted__ok { margin-left: auto; }

.xd-auth {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 24px)); overflow: hidden;
  border: 1px solid #cfcfcf; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgb(0 0 0 / .3); color: #202124;
  animation: xd-modal .3s cubic-bezier(.22, 1, .36, 1);
}
.xd-auth__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #efefef; border-bottom: 1px solid #e0e0e0; }
.xd-auth__bar .xd-dots { padding: 0; }
.xd-auth__bar .xd-dots i { width: 9px; height: 9px; }
.xd-auth__url { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 4px 10px; border-radius: 99px; background: #fff; color: #555; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xd-auth__url .xd-icon { width: 11px; height: 11px; color: #999; }
.xd-auth__body { display: grid; gap: 14px; padding: 22px 22px 16px; font-size: 13px; }
.xd-auth__logos { display: flex; justify-content: center; }
.xd-auth__logos .xd-g { width: 28px; height: 28px; }
.xd-auth h4 { margin: 0; text-align: center; font-size: 18px; font-weight: 500; line-height: 1.35; }
.xd-auth h4 small { color: #5f6368; font-size: 13px; font-weight: 400; }
.xd-auth__pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #dadce0; border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.xd-auth__pick:hover { background: #f7f8f8; }
.xd-auth__pick > span:last-child { display: grid; gap: 1px; }
.xd-auth__pick small { color: #5f6368; font-size: 12px; }
.xd-auth__avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #5f8c5d; color: #fff; font-size: 13px; font-weight: 700; }
.xd-auth__note { margin: 0; text-align: center; color: #999; font-size: 10.5px; }

/* ---------- save picker (mirrors extension/context-save.html) ---------- */
.xd-picker {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 24px));
  display: grid; gap: 9px; padding: 14px; overflow: hidden; box-sizing: border-box;
  border: 1px solid var(--xd-ext-line); border-radius: 12px; background: #fff; box-shadow: var(--xd-shadow);
  color: #262626; font-size: 12px; animation: xd-modal .25s cubic-bezier(.22, 1, .36, 1);
  transition: border-color .2s;
}
.xd-picker.is-done { border-color: var(--xd-green); }
.xd-picker__close {
  position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--xd-ext-line); border-radius: 50%; background: #fff; color: #262626; cursor: pointer;
}
.xd-picker__close .xd-icon { width: 13px; height: 13px; }
.xd-picker__head { display: flex; align-items: center; gap: 10px; }
.xd-picker__head > span:last-child { display: flex; flex-direction: column; }
.xd-picker__head strong { font-size: 14px; }
.xd-picker__head small { color: #666; font-size: 11px; }
.xd-picker__icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--xd-ext-line); border-radius: 7px; }
.xd-picker__card { margin: 0; padding: 7px; border: 1px solid var(--xd-green); border-radius: 9px; background: var(--xd-green-soft); }
.xd-picker__card > img, .xd-picker__card .xd-picker__art { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 6px; }
.xd-picker__card figcaption { padding: 6px 2px 0; color: #666; font-size: 11px; }
.xd-picker__hint { margin: 2px 0 0; color: #888; font-size: 10.5px; }
.xd-field { position: relative; display: block; }
.xd-field select, .xd-field input {
  width: 100%; box-sizing: border-box; min-height: 34px; padding: 6px 10px; border: 1px solid var(--xd-ext-line); border-radius: 8px;
  background: #fff; font: inherit; font-size: 12px; color: #262626;
}
.xd-field select { padding-left: 32px; cursor: pointer; }
.xd-select-logo { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: grid; pointer-events: none; }
.xd-select-logo img, .xd-select-logo .xd-local-logo { width: 16px; height: 16px; }
.xd-local-logo { display: grid; place-items: center; color: #262626; }
.xd-local-logo .xd-icon { width: 100%; height: 100%; }
.xd-picker__actions { display: flex; justify-content: flex-end; gap: 8px; }
.xd-picker__done {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; border-radius: 8px; background: var(--xd-green-soft); color: var(--xd-green); font-size: 12px;
}
.xd-picker__done .xd-icon { width: 22px; height: 22px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--xd-green); color: #fff; stroke-width: 3; animation: xd-check .45s cubic-bezier(.34, 1.35, .64, 1); }

.xd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 14px;
  border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.xd-btn:disabled { cursor: default; opacity: .6; }
.xd-btn--primary { border: 1px solid #262626; background: #262626; color: #fff; }
.xd-btn--ghost { border: 1px solid var(--xd-ext-line); background: #fff; color: #262626; }
.xd-btn--soft { border: 1px dashed #b9b9b9; background: #f7f7f7; color: #262626; }

/* Thin progress line along the bottom edge, like the extension's .context-progress. */
.xd-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none; }
.xd-progress i { display: block; height: 100%; width: 0; background: var(--xd-ink); }
.is-saving > .xd-progress i { animation: xd-fill 1.5s cubic-bezier(.4, 0, .2, 1) forwards; }
.is-done > .xd-progress i { width: 100%; background: var(--xd-green); }

/* ---------- storage shelf ---------- */
.xd-shelf {
  display: flex; flex-direction: column; min-width: 0; padding: 16px; box-sizing: border-box;
  border: 1px solid var(--xd-line); border-radius: 16px; background: #f4f4f4;
}
.xd-shelf__title { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--xd-ink); }
.xd-shelf__list { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: 490px; overflow: auto; }
.xd-shelf__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 12px; border: 1px dashed #d6d6d6; border-radius: 12px; color: #999; font-size: 12px; line-height: 1.5; text-align: center; }
.xd-shelf__empty .xd-icon { width: 24px; height: 24px; }
.xd-file { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid #ececec; }
.xd-file.is-fresh { animation: xd-land .6s cubic-bezier(.22, 1, .36, 1); }
.xd-file .xd-thumb { width: 42px; height: 42px; flex-shrink: 0; border-radius: 6px; }
.xd-file .xd-duration { display: none; }
.xd-file__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.xd-file__meta strong { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-file__meta small { display: flex; align-items: center; gap: 4px; color: #888; font-size: 10.5px; white-space: nowrap; overflow: hidden; }
.xd-file__meta small img, .xd-file__meta small .xd-local-logo { width: 12px; height: 12px; flex-shrink: 0; }
.xd-file__size { color: #aaa; font-size: 10.5px; white-space: nowrap; }

@keyframes xd-fade { from { opacity: 0; } }
@keyframes xd-pulse { 0% { opacity: 1; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
@keyframes xd-pop { from { opacity: 0; transform: scale(.94); } }
@keyframes xd-modal { from { opacity: 0; transform: translate(-50%, -48%) scale(.96); } }
@keyframes xd-rise { from { opacity: 0; transform: translate(var(--xd-tx, 0), var(--xd-ty, 10px)); } }
.xd-selectbar { --xd-tx: -50%; --xd-ty: -10px; }
@keyframes xd-fill { to { width: 100%; } }
@keyframes xd-check { from { opacity: 0; transform: scale(.4) rotate(-40deg); } }
@keyframes xd-land { from { opacity: 0; transform: translateY(-14px) scale(.96); background: var(--xd-green-soft); } }

@media (max-width: 860px) {
  .xd-layout { grid-template-columns: minmax(0, 1fr); }
  .xd-shelf__list { max-height: 260px; }
}
@media (max-width: 600px) {
  .ext-demo { padding: 10px 0 50px; }
  .xd-guide { flex-wrap: wrap; gap: 8px 10px; }
  .xd-guide__text { flex-basis: calc(100% - 70px); font-size: 14px; }
  .xd-viewport { height: 520px; }
  .xd-nav { display: none; }
  .xd-tab { max-width: 180px; }
  .xd-reel { grid-template-columns: minmax(0, 1fr); }
  .xd-reel__video { height: 260px; }
  .xd-post__media img, .xd-blog__photo .xd-thumb { height: 180px; }
  .xd-blog__media { grid-template-columns: minmax(0, 1fr); }
  .xd-blog h3 { font-size: 22px; }
  .xd-grid { grid-template-columns: repeat(2, 1fr); }
  .xd-ig__media .xd-thumb, .xd-th__media .xd-thumb, .xd-rd__media .xd-thumb { height: 200px; }
  .xd-4c__row { flex-direction: column; gap: 6px; }
  .xd-4c__thumb { width: 100%; height: 150px; }
  .xd-4c__thumb--sm { width: 140px; height: 90px; }
  .xd-platform span { display: none; }
  .xd-platform { padding: 5px 7px; }
  .xd-selectbar__hint { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ext-demo *, .ext-demo *::before, .ext-demo *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .xd-hot::after { opacity: 1; transform: none; }
}

/* Inside the hero, the demo takes the old demo video's place: full width, compact heading. */
.hero .ext-demo { width: 100%; min-width: 0; padding: 12px 0 0; text-align: left; }
.hero .ext-demo__heading { text-align: center; margin-bottom: 18px; }
.hero .ext-demo__heading h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 8px 0 0; }
.hero .ext-demo__lede { font-size: 13px; margin-top: 8px; }
