/* First-paint geometry for generated set/part SEO pages. Vue replaces this
 * preview after its current bundle is loaded; keep selectors scoped so the
 * file is harmless on normal SPA entry points. */
@font-face {
  font-family: 'David Libre';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/brand/david-libre-erence.ttf') format('truetype');
  unicode-range: U+0063, U+0065, U+006E, U+0072;
}

@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/brand/noto-sans-sc-zh-caption.ttf') format('truetype');
  unicode-range: U+53C2, U+6728, U+79EF, U+8003;
}

.seo-detail-preview,
.seo-detail-preview * {
  box-sizing: border-box;
}

.seo-detail-preview {
  min-height: 100vh;
  background: #fafbfc;
  color: #22252a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.seo-detail-preview-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px max(18px, calc((100vw - 1200px) / 2 + 18px));
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(247, 248, 250, .96));
  border-bottom: 1px solid #e8eaed;
}

.seo-detail-preview-brand {
  width: auto;
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.seo-detail-preview-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.seo-detail-preview-brand-lockup {
  --brand-rule-gap: 3px;
  --brand-word-size: 26px;
  --brand-rule-pull: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  font-size: var(--brand-word-size);
}

.seo-detail-preview-brand-word {
  display: flex;
  align-items: baseline;
  font-size: var(--brand-word-size);
  font-weight: 800;
  line-height: 1;
}

.seo-detail-preview-brand-ref,
.seo-detail-preview-brand-erence,
.seo-detail-preview-brand-tag-ref {
  color: #d0313c;
}

.seo-detail-preview-brand-erence {
  font-family: 'David Libre', 'Palatino Linotype', Palatino, serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.14em;
  letter-spacing: -0.02em;
  margin-left: -0.06em;
  line-height: 1;
}

.seo-detail-preview-brand-mobile-monogram,
.seo-detail-preview-brand-mobile-b,
.seo-detail-preview-brand-mobile-r { display: none; }

.seo-detail-preview-brand-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--brand-rule-gap);
  padding-top: var(--brand-rule-gap);
  width: 100%;
  margin-top: calc(-1 * var(--brand-rule-pull));
}

.seo-detail-preview-brand-lockup-rule {
  align-self: stretch;
  width: 100%;
  height: 2px;
  background: #c8d0d8;
}

.seo-detail-preview-brand-tagline {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.4em;
}

.seo-detail-preview-brand-tag-brick,
.seo-detail-preview-brand-tag-ref {
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  -webkit-text-stroke: 0.55px currentColor;
  paint-order: stroke fill;
  transform: scaleY(0.84);
  transform-origin: top center;
}

.seo-detail-preview-brand-tag-brick { color: #29333e; }

.seo-detail-preview-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

.seo-detail-preview-nav span:first-child {
  color: #d0313c;
}

.seo-detail-preview-search {
  width: min(340px, 32vw);
  height: 36px;
  margin-left: auto;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
}

.seo-detail-preview-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 56px;
}

.seo-set-preview-body {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.seo-set-preview-gallery {
  flex: 0 1 480px;
  min-width: 280px;
}

.seo-preview-gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #f5f5f5;
}

.seo-preview-gallery-controls {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.seo-preview-gallery-control {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
}

.seo-preview-gallery-counter {
  width: 42px;
  height: 12px;
  border-radius: 6px;
  background: #e5e7eb;
}

.seo-preview-thumbs {
  display: flex;
  gap: 6px;
  height: 46px;
  overflow: hidden;
}

.seo-preview-thumb {
  width: 56px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background: #f0f0f0;
}

.seo-set-preview-meta {
  min-width: 0;
  flex: 1 1 280px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "title title"
    "tags tags"
    "info social"
    "keywords keywords"
    "message message";
  align-content: start;
  align-items: start;
  column-gap: 16px;
  row-gap: 12px;
}

.seo-preview-title-wrap {
  grid-area: title;
}

.seo-preview-title,
.seo-preview-part-name {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  color: #22252a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.seo-preview-title-code,
.seo-preview-part-code {
  color: #555;
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .5px;
}

.seo-preview-title-alt,
.seo-preview-part-alt {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  color: #888;
  font-size: 14px;
  line-height: 1.4;
}

.seo-preview-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seo-preview-tag {
  padding: 3px 10px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #c62828;
  font-size: 12px;
  font-weight: 700;
}

.seo-preview-info {
  grid-area: info;
  min-width: 0;
}

.seo-preview-info-row {
  display: flex;
  gap: 8px;
  min-height: 25px;
  margin-bottom: 6px;
  font-size: 13px;
}

.seo-preview-info-label {
  min-width: 60px;
  color: #888;
}

.seo-preview-info-value {
  min-width: 0;
  color: #333;
  overflow-wrap: anywhere;
}

.seo-preview-social {
  grid-area: social;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.seo-preview-social-row {
  width: min(180px, 100%);
  height: 30px;
  border: 1px solid #e7e8eb;
  border-radius: 6px;
  background: #fff;
}

.seo-preview-keywords {
  grid-area: keywords;
  height: 42px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.seo-preview-message {
  grid-area: message;
  height: 20px;
}

.seo-preview-description,
.seo-preview-parts {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.seo-preview-description {
  min-height: 78px;
}

.seo-preview-section-title {
  width: 120px;
  height: 13px;
  margin-bottom: 10px;
  border-radius: 7px;
  background: #e5e7eb;
}

.seo-preview-text-line {
  width: 88%;
  height: 11px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: #eef0f3;
}

.seo-preview-text-line.short {
  width: 58%;
}

.seo-preview-part-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 8px 0 16px;
}

.seo-preview-part-image {
  width: 320px;
  height: 320px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #f5f5f5;
}

.seo-preview-part-side {
  min-width: 0;
  flex: 1;
}

.seo-preview-part-color {
  height: 74px;
  margin-bottom: 12px;
  border: 1.5px solid #e8eaed;
  border-radius: 8px;
  background: #fff;
}

.seo-preview-part-meta-row {
  height: 13px;
  margin: 0 0 10px;
  border-radius: 7px;
  background: #eef0f3;
}

.seo-preview-part-meta-row.short {
  width: 72%;
}

.seo-preview-part-name-block {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .seo-detail-preview-brand {
    width: auto;
    height: 46px;
    justify-content: center;
  }

  .seo-detail-preview-brand img {
    display: block;
    width: 36px;
    height: 36px;
  }

  .seo-detail-preview-brand-word > .seo-detail-preview-brand-brick,
  .seo-detail-preview-brand-word > .seo-detail-preview-brand-ref,
  .seo-detail-preview-brand-erence,
  .seo-detail-preview-nav,
  .seo-detail-preview-search {
    display: none;
  }

  .seo-detail-preview-brand-lockup {
    --brand-word-size: 20px;
    --brand-rule-pull: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
  }

  .seo-detail-preview-brand-mobile-monogram,
  .seo-detail-preview-brand-mobile-b,
  .seo-detail-preview-brand-mobile-r {
    display: inline;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1;
  }

  .seo-detail-preview-brand-mobile-b { color: #29333e; }
  .seo-detail-preview-brand-mobile-r { color: #d0313c; }

  .seo-detail-preview-brand-caption {
    width: 100%;
    margin-top: calc(-1 * var(--brand-rule-pull));
    padding-top: var(--brand-rule-gap);
    gap: var(--brand-rule-gap);
  }

  .seo-detail-preview-brand-tag-brick,
  .seo-detail-preview-brand-tag-ref {
    font-size: 13px;
    text-align: center;
    transform: scaleY(0.84);
  }

  .seo-detail-preview-header {
    min-height: 56px;
    padding: 6px 10px;
  }
}

@media (max-width: 760px) {
  .seo-detail-preview-main {
    padding: 14px 14px 40px;
  }

  .seo-set-preview-body {
    display: block;
    margin-bottom: 18px;
  }

  .seo-set-preview-gallery {
    min-width: 0;
    margin-bottom: 16px;
  }

  .seo-preview-gallery-main {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: #fff;
  }

  .seo-set-preview-meta {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title title"
      "tags tags"
      "info social"
      "keywords keywords"
      "message message";
    row-gap: 0;
  }

  .seo-preview-tags {
    margin: 8px 0;
  }

  .seo-preview-social-row {
    width: 128px;
  }

  .seo-preview-part-body {
    display: block;
  }

  .seo-preview-part-image {
    width: min(100%, 360px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto 14px;
  }

  .seo-preview-part-side {
    width: 100%;
  }
}
