/* ==========================================================================
   AETTC 项目详情页「海报下载」· poster.css
   H3 定稿配色（米色顶栏 #f8f6f1 + 底部浅米票根），中英不同号 36/26，高度自适应
   MARK: AETTC-POSTER-2026-11-15
   ========================================================================== */

/* ---------- 1. 详情页上的下载按钮 ---------- */
/* HD-V1-2026-11-21 · 新刊头页（body.hdv1）的按钮位置与视觉由详情页模板自带 CSS 负责，
   本文件只服务旧版深红页头页面（malta-door / 产教课题页等），避免两处 top 值互相打架。 */
.detail-header { position: relative; }
body:not(.hdv1) .detail-header { padding-top: 2.6rem !important; }

body:not(.hdv1) .at-poster-btn {
  position: absolute; top: 11px; right: 11px; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff; font-size: 13px; font-weight: 600; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s;
  -webkit-tap-highlight-color: transparent;
}
body:not(.hdv1) .at-poster-btn:hover { background: rgba(255, 255, 255, .32); border-color: #fff; }
.at-poster-btn:active { transform: translateY(1px); }
.at-poster-btn[disabled] { opacity: .55; cursor: default; }
@media (max-width: 768px) {
  body:not(.hdv1) .detail-header { padding-top: 2.4rem !important; }
  body:not(.hdv1) .at-poster-btn { top: 8px; right: 8px; padding: 6px 11px; font-size: 12px; }
}

/* ---------- 2. 生成中的遮罩 ---------- */
.at-mask {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(9, 12, 17, .82);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.at-mask.on { opacity: 1; }
.at-mask-box {
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .5px;
  display: flex; align-items: center; gap: 10px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.at-spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28); border-top-color: #fff;
  animation: at-spin .8s linear infinite;
}
@keyframes at-spin { to { transform: rotate(360deg); } }

/* ---------- 3. 海报舞台（离屏/临时挂载） ---------- */
.at-stage {
  position: fixed; left: 0; top: 0; z-index: 99999;
  background: #0b0f14; padding: 24px;
  max-height: 100vh; overflow: auto;
}

/* ---------- 4. 海报本体 1080 × auto ---------- */
.at-poster {
  position: relative; width: 1080px; min-height: 1440px; height: auto;
  background: #f2eee6; color: #141414; padding: 8px; border-radius: 32px;
  display: flex; flex-direction: column;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.at-poster *, .at-poster *::before, .at-poster *::after { box-sizing: border-box; }

.at-ticket {
  flex: 1 1 auto; min-height: 0; background: #fff; border-radius: 24px;
  display: flex; flex-direction: column; overflow: hidden;
}
.at-body { flex: none; padding: 0 48px 36px; display: flex; flex-direction: column; }

/* ---- 顶部品牌栏（H3 米色浅条） ---- */
.at-head {
  display: flex; align-items: center; gap: 16px; flex: none;
  margin: 0 -48px; padding: 30px 48px 22px;
  background: #f8f6f1; border-bottom: 2px solid #eae4d8;
}
.at-logo { width: 56px; height: 56px; flex: none; }
.at-logo img { width: 56px; height: 56px; object-fit: contain; display: block; }
.at-brand { font-size: 30px; font-weight: 900; letter-spacing: .5px; line-height: 1.2; color: #141414; }
.at-country {
  margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 8px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px #efe8dc inset;
}
.at-flag { width: 30px; height: 30px; flex: none; display: block; }
.at-cn { font-size: 19px; font-weight: 900; letter-spacing: 2px; color: #c41e3a; }
.at-country i { font-style: normal; font-weight: 900; font-size: 15px; color: #d8b3bb; }
.at-ce { font-size: 14px; font-weight: 900; letter-spacing: 1.8px; color: #b08a91; }

/* ---- 标题 / 元信息 ---- */
.at-title {
  flex: none; margin: 30px 0 0; font-size: 56px; font-weight: 900; line-height: 1.26;
  letter-spacing: -1px; color: #141414;
}
.at-meta {
  flex: none; margin-top: 18px; padding-bottom: 14px; border-bottom: 2px solid #efece7;
  font-size: 15px; letter-spacing: .3px; color: #b3b3b3;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
}
.at-meta i { font-style: normal; margin-right: 7px; }
.at-meta b { font-size: 16.5px; color: #141414; font-weight: 900; }

/* ---- 项目内容（中 36 / 英 26，字号由 JS 自适应） ---- */
.at-content { flex: none; margin-top: 24px; }
.at-lb { font-size: 13px; letter-spacing: 4px; font-weight: 900; color: #c41e3a; }
.at-desc {
  margin: 14px 0 0; font-size: 36px; line-height: 1.9; color: #242424;
  letter-spacing: -.2px; text-align: justify;
}
.at-desc-en {
  margin: 24px 0 0; padding-left: 22px; border-left: 4px solid #e4e0d7;
  font-size: 26px; line-height: 1.62; color: #6a6a6a; letter-spacing: 0;
}

/* ---- 底部票根 ---- */
.at-stub {
  position: relative; flex: none; margin-top: auto; min-height: 148px;
  border-top: 3px dashed #cfc9bd; background: #f8f6f1;
  border-radius: 0 0 24px 24px; padding: 16px 44px;
  display: flex; align-items: center; gap: 26px;
}
/* 缺口 = 票根被撕掉的一口：底色同外框（读作"透出背景"），再叠一层碗状内阴影贴图
   （html2canvas 不支持 radial-gradient 渐变，故用 PNG，渲染 100% 一致） */
.at-notch { position: absolute; top: -25px; width: 46px; height: 46px; border-radius: 50%; background: #f2eee6; }
.at-notch i { position: absolute; inset: 0; display: block; border-radius: 50%;
              background: url("notch-shadow.png?v=20261116a") center / 100% 100% no-repeat; }
.at-notch.l { left: -24px; }
.at-notch.r { right: -24px; }
.at-qr { width: 108px; height: 108px; padding: 5px; background: #fff; flex: none; }
.at-qr canvas, .at-qr img { width: 98px !important; height: 98px !important; display: block; }
.at-fc { flex: 1 1 auto; min-width: 0; }
.at-slogan { font-size: 31px; font-weight: 900; letter-spacing: -.5px; color: #141414; }
.at-slogan .dot { color: #c41e3a; }
.at-tip { font-size: 16px; color: #5d564a; margin-top: 10px; font-weight: 700; }
.at-date { margin-left: auto; flex: none; font-size: 14px; letter-spacing: .8px; color: #9d9484; font-weight: 900; }
