/** EmlogStudio local article-poster studio. */

.poster-share-dialog {
  --poster-accent: var(--green, #11a86b);
  --poster-accent-rgb: var(--accent-rgb, 17, 168, 107);
  --poster-bg: #f8fbfa;
  --poster-surface: #ffffff;
  --poster-panel: #ffffff;
  --poster-panel-hover: #f7fbf9;
  --poster-line: #dfe8e4;
  --poster-line-strong: #c9d7d1;
  --poster-ink: #0c2035;
  --poster-muted: #617184;
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100vh - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--poster-ink);
  color-scheme: light;
  background: var(--poster-surface);
  border: 1px solid rgba(36, 73, 61, .13);
  border-radius: 24px;
  box-shadow: 0 26px 72px rgba(20, 45, 37, .2);
}

.poster-share-dialog:not([open]) { display: none; }

.poster-share-dialog::backdrop { background: rgba(15, 31, 37, .58); }

.poster-share-shell {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 3% 4%, rgba(var(--poster-accent-rgb), .065), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #fbfdfc 58%, #f6faf8 100%);
}

.poster-share-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px 18px;
}

.poster-share-heading { min-width: 0; }

.poster-share-kicker {
  display: none;
  margin: 0;
}

.poster-share-head h2 {
  margin: 0;
  color: #0b2138;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.045em;
}

.poster-share-head p {
  margin: 10px 0 0;
  color: var(--poster-muted);
  font-size: 15px;
  line-height: 1.55;
}

.poster-share-close {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: #26384b;
  background: #edf2f0;
  border: 1px solid #e3eae7;
  border-radius: 13px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.poster-share-close:hover {
  color: #07192b;
  background: #e5ece9;
  border-color: #cedad5;
}

.poster-share-close svg,
.poster-share-section-icon svg,
.poster-share-export svg,
.poster-share-link-row button svg,
.poster-share-tip > svg,
.poster-share-rail-next svg,
.poster-share-scene-upload svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.poster-share-close svg { width: 20px; height: 20px; }

.poster-share-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(340px, .88fr) minmax(500px, 1.12fr);
  gap: 34px;
  align-items: stretch;
  padding: 18px 36px 30px;
  overflow: hidden;
}

.poster-share-preview {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
}

.poster-share-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(22, 57, 45, .025) 25%, transparent 25%, transparent 75%, rgba(22, 57, 45, .025) 75%),
    linear-gradient(45deg, rgba(22, 57, 45, .025) 25%, transparent 25%, transparent 75%, rgba(22, 57, 45, .025) 75%),
    #edf4f1;
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  border: 1px solid #dbe6e1;
  border-radius: 17px;
}

.poster-share-stage::after {
  position: absolute;
  inset: 12px;
  z-index: 0;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(14, 67, 49, .08);
  border-radius: 11px;
}

.poster-share-stage canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  background: #dce9e4;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(19, 54, 42, .19);
  transition: opacity .16s ease;
}

.poster-share-stage[aria-busy="true"] canvas { opacity: .58; }

@media (min-width: 821px) {
  .poster-share-stage canvas {
    position: absolute;
    inset: 12px;
    width: auto;
    max-width: calc(100% - 24px);
    height: auto;
    max-height: calc(100% - 24px);
    margin: auto;
  }
}

.poster-share-loading {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  padding: 9px 13px;
  color: #173c30;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(var(--poster-accent-rgb), .3);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(25, 61, 49, .15);
}

.poster-share-loading i {
  width: 9px;
  height: 9px;
  background: var(--poster-accent);
  border: 0;
  border-radius: 50%;
}

.poster-share-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px;
  color: #718077;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.poster-share-preview-meta span { display: inline-flex; align-items: center; gap: 6px; }
.poster-share-preview-meta i { width: 6px; height: 6px; background: var(--poster-accent); border-radius: 50%; }

.poster-share-controls {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 13px;
  padding: 1px 4px 3px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd9d3 transparent;
  scrollbar-width: thin;
}

.poster-share-controls::-webkit-scrollbar { width: 5px; }
.poster-share-controls::-webkit-scrollbar-thumb { background: #cbd9d3; border-radius: 9px; }

.poster-share-panel {
  min-width: 0;
  padding: 16px 18px;
  background: var(--poster-panel);
  border: 1px solid var(--poster-line);
  border-radius: 15px;
  box-shadow: 0 5px 18px rgba(27, 66, 53, .07);
}

.poster-share-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.poster-share-section-head.is-compact { margin-bottom: 12px; }
.poster-share-section-head > div { display: flex; min-width: 0; align-items: center; gap: 9px; }

.poster-share-section-head h3 {
  margin: 0;
  color: #14243a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.poster-share-section-head > span {
  color: #7c8895;
  font-size: 12px;
  font-weight: 600;
}

.poster-share-section-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #5d45e8;
  background: #f0edff;
  border: 1px solid #e4deff;
  border-radius: 8px;
}

.poster-share-section-icon.is-scene { color: #16955f; background: #eaf8f1; border-color: #d9f0e5; }
.poster-share-section-icon.is-link { color: #5766e8; background: #eff1ff; border-color: #dfe3ff; }
.poster-share-section-icon svg { width: 15px; height: 15px; }

.poster-share-style-list,
.poster-share-scene-list {
  display: grid;
  min-width: 0;
  grid-auto-flow: column;
  grid-auto-columns: 82px;
  gap: 12px;
  padding: 1px 1px 7px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: #d4e0db transparent;
  scrollbar-width: thin;
}

.poster-share-style-list::-webkit-scrollbar,
.poster-share-scene-list::-webkit-scrollbar { height: 4px; }
.poster-share-style-list::-webkit-scrollbar-thumb,
.poster-share-scene-list::-webkit-scrollbar-thumb { background: #d4e0db; border-radius: 999px; }

.poster-share-style-option {
  display: grid;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  gap: 7px;
  justify-items: center;
  color: #4f5d6d;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  background: transparent;
  border: 0;
  cursor: pointer;
  scroll-snap-align: start;
  touch-action: manipulation;
}

.poster-share-style-option > span:last-child {
  display: block;
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-share-style-thumb {
  position: relative;
  display: block;
  width: 68px;
  height: 104px;
  overflow: hidden;
  background: #eef4f1;
  border: 2px solid transparent;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(24, 56, 45, .1);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.poster-share-style-thumb canvas { display: block; width: 100%; height: 100%; }

.poster-share-style-thumb > i,
.poster-share-scene-option > i {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  display: none;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #fff;
  background: var(--poster-accent);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(13, 80, 57, .2);
}

.poster-share-style-thumb > i svg,
.poster-share-scene-option > i svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.poster-share-style-option:hover { color: #233346; }
.poster-share-style-option:hover .poster-share-style-thumb { border-color: rgba(var(--poster-accent-rgb), .42); }
.poster-share-style-option[aria-pressed="true"] { color: #143b2f; font-weight: 800; }
.poster-share-style-option[aria-pressed="true"] .poster-share-style-thumb { border-color: var(--poster-accent); box-shadow: 0 0 0 2px rgba(var(--poster-accent-rgb), .12), 0 5px 13px rgba(24, 56, 45, .13); }
.poster-share-style-option[aria-pressed="true"] .poster-share-style-thumb > i { display: grid; }

.poster-share-scene-rail-wrap { position: relative; min-width: 0; }
.poster-share-scene-list { grid-auto-columns: 86px; padding-right: 30px; }

.poster-share-scene-option {
  position: relative;
  display: grid;
  width: 86px;
  min-height: 44px;
  padding: 0;
  gap: 6px;
  justify-items: center;
  color: #52606f;
  font: inherit;
  font-size: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  scroll-snap-align: start;
  touch-action: manipulation;
}

.poster-share-scene-option img {
  display: block;
  width: 84px;
  height: 76px;
  object-fit: cover;
  background: #edf3f1;
  border: 2px solid transparent;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(24, 56, 45, .09);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.poster-share-scene-option > span:not([aria-hidden]) {
  display: block;
  width: 84px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-share-scene-option:hover img { border-color: rgba(var(--poster-accent-rgb), .42); }
.poster-share-scene-option[aria-pressed="true"] img { border-color: var(--poster-accent); box-shadow: 0 0 0 2px rgba(var(--poster-accent-rgb), .12), 0 5px 13px rgba(24, 56, 45, .12); }
.poster-share-scene-option[aria-pressed="true"] > i { bottom: 22px; display: grid; }

.poster-share-scene-option.is-missing::before {
  position: absolute;
  inset: 0 1px 20px;
  z-index: 1;
  content: "风景";
  display: grid;
  place-items: center;
  color: #678078;
  font-size: 11px;
  background: linear-gradient(150deg, #e7f2ed, #d3e3dc);
  border-radius: 9px;
}

.poster-share-scene-upload {
  align-content: center;
  min-height: 100px;
  padding: 8px;
  color: #31584a;
  background: #f5faf8;
  border: 1px dashed #a9c8bc;
  border-radius: 9px;
}

.poster-share-scene-upload > span {
  position: static;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  color: var(--poster-accent);
  background: rgba(var(--poster-accent-rgb), .1);
  border-radius: 9px;
}

.poster-share-scene-upload svg { width: 16px; height: 16px; }
.poster-share-scene-upload strong { font-size: 10px; }
.poster-share-scene-upload[aria-pressed="true"] { color: #164c39; border-color: var(--poster-accent); background: rgba(var(--poster-accent-rgb), .08); }

.poster-share-rail-next {
  position: absolute;
  top: 31px;
  right: -5px;
  z-index: 4;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: #5d6b77;
  background: rgba(255,255,255,.96);
  border: 1px solid #dce6e2;
  border-radius: 50%;
  box-shadow: 0 4px 13px rgba(29, 62, 51, .13);
  cursor: pointer;
  touch-action: manipulation;
}

.poster-share-rail-next:hover { color: var(--poster-accent); border-color: rgba(var(--poster-accent-rgb), .48); }
.poster-share-rail-next svg { width: 16px; height: 16px; }

.poster-share-custom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #7b8792;
  font-size: 10px;
}

.poster-share-custom-actions span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.poster-share-custom-actions button {
  min-height: 32px;
  padding: 0 10px;
  color: #27604d;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  background: #eff8f4;
  border: 1px solid #d8ebe3;
  border-radius: 8px;
  cursor: pointer;
}

.poster-share-link-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f8faf9;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
}

.poster-share-link-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  overflow: hidden;
  color: #344457;
  font: 12px/1.2 Consolas, "Cascadia Mono", monospace;
  text-overflow: ellipsis;
  background: transparent;
  border: 0;
  outline: 0;
}

.poster-share-link-row button {
  display: inline-flex;
  min-width: 92px;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: var(--poster-accent);
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.poster-share-link-row button:hover { background: var(--poster-accent); box-shadow: 0 0 0 3px rgba(var(--poster-accent-rgb), .12) inset; }
.poster-share-link-row button svg { width: 16px; height: 16px; }

.poster-share-export { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.poster-share-export button {
  display: inline-flex;
  min-width: 0;
  min-height: 50px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--poster-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  background: #fff;
  border: 1px solid rgba(var(--poster-accent-rgb), .62);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.poster-share-export button:hover { background: rgba(var(--poster-accent-rgb), .055); border-color: var(--poster-accent); }
.poster-share-export button:disabled { opacity: .5; cursor: wait; }
.poster-share-export button svg { width: 19px; height: 19px; }
.poster-share-export button span { color: currentColor; font-size: 11px; opacity: .8; }
.poster-share-export .is-primary { color: #fff; background: var(--poster-accent); border-color: var(--poster-accent); box-shadow: 0 8px 18px rgba(var(--poster-accent-rgb), .16); }
.poster-share-export .is-primary:hover { color: #fff; background: var(--poster-accent); border-color: var(--poster-accent); box-shadow: 0 8px 18px rgba(var(--poster-accent-rgb), .22); }

.poster-share-tip {
  display: flex;
  min-width: 0;
  gap: 11px;
  padding: 14px 16px;
  color: #6f7d8b;
  background: #fbfcfc;
  border: 1px solid #e5ebe8;
  border-radius: 13px;
}

.poster-share-tip > svg { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px; color: #f19a4a; }
.poster-share-tip div { display: grid; min-width: 0; gap: 4px; }
.poster-share-tip strong { color: #5e6b79; font-size: 12px; }
.poster-share-tip span { font-size: 11px; line-height: 1.5; }

.poster-share-status {
  min-height: 18px;
  margin: -4px 4px 0;
  color: #627268;
  font-size: 11px;
  line-height: 1.55;
}

.poster-share-dialog button:focus-visible,
.poster-share-dialog input:focus-visible,
.poster-share-dialog [tabindex]:focus-visible {
  outline: 3px solid rgba(var(--poster-accent-rgb), .25);
  outline-offset: 2px;
}

@media (max-width: 1080px) and (min-width: 821px) {
  .poster-share-body { grid-template-columns: minmax(310px, .78fr) minmax(440px, 1.22fr); gap: 22px; padding: 16px 24px 24px; }
  .poster-share-head { padding: 23px 26px 16px; }
  .poster-share-panel { padding: 14px; }
  .poster-share-style-list { grid-auto-columns: 76px; }
  .poster-share-style-thumb { width: 64px; height: 96px; }
}

@media (max-width: 820px) {
  .poster-share-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .poster-share-shell { display: block; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .poster-share-head { position: sticky; top: 0; z-index: 6; padding: calc(16px + env(safe-area-inset-top)) 16px 14px; background: rgba(255,255,255,.98); border-bottom: 1px solid #e5ece9; }
  .poster-share-head h2 { font-size: 24px; }
  .poster-share-head p { max-width: 390px; margin-top: 6px; padding-right: 6px; font-size: 12px; }
  .poster-share-close { width: 44px; height: 44px; border-radius: 11px; }
  .poster-share-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 13px calc(20px + env(safe-area-inset-bottom)); overflow: visible; }
  .poster-share-preview { display: block; }
  .poster-share-stage { min-height: auto; padding: 10px; }
  .poster-share-stage::after { inset: 10px; }
  .poster-share-stage canvas { width: min(100%, 330px); max-height: none; }
  .poster-share-preview-meta { width: min(100%, 330px); margin: 8px auto 0; }
  .poster-share-controls { gap: 11px; padding: 0; overflow: visible; }
  .poster-share-style-list { grid-auto-columns: 76px; }
  .poster-share-style-thumb { width: 64px; height: 98px; }
  .poster-share-scene-list { grid-auto-columns: 82px; }
  .poster-share-scene-option { width: 82px; }
  .poster-share-scene-option img,
  .poster-share-scene-option > span:not([aria-hidden]) { width: 80px; }
}

@media (max-width: 430px) {
  .poster-share-head h2 { font-size: 21px; }
  .poster-share-head p { max-width: 270px; }
  .poster-share-body { padding-inline: 11px; }
  .poster-share-panel { padding: 13px; border-radius: 14px; }
  .poster-share-link-row button { min-width: 82px; padding: 0 12px; }
  .poster-share-custom-actions span { max-width: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .poster-share-dialog *,
  .poster-share-dialog *::before,
  .poster-share-dialog *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
