/* account detail — Figma 2209:150419 / 2358:155152 */

.account-detail-page {
  --tpl-bg-card: var(--ep-color-b);
  --tpl-bg-panel: #1f2937;
  --tpl-bg-muted: var(--ep-color-n);
  --tpl-text: var(--ep-color-d);
  --tpl-text-secondary: var(--ep-color-g);
  --tpl-text-muted: var(--ep-color-e);
  --tpl-border: rgba(34, 46, 66, 0.4);
  --tpl-blue: #308dff;
  --tpl-brand: #006ef5;
  --tpl-orange: #f26822;
  --tpl-green: #1fc66b;
  --tpl-section-gap: 24px;
  --tpl-card-radius: 8px;
  --tpl-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
  clear: both;
  color: var(--tpl-text);
  padding: 24px 0 64px;
}

html.dark .account-detail-page {
  --tpl-bg-card: #ffffff;
  --tpl-bg-panel: #ffffff;
  --tpl-bg-muted: #f8f8fb;
  --tpl-text: #0c111c;
  --tpl-text-secondary: #52525b;
  --tpl-text-muted: #77859a;
  --tpl-border: #e4e8ef;
}

.account-detail-page .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.account-detail-page .tpl-main {
  display: flex;
  flex-direction: column;
  gap: var(--tpl-section-gap);
  width: 100%;
}

.account-detail-page a {
  color: #006EF5;
  text-decoration: none;
}

.account-detail-page button {
  font-family: inherit;
}

/* Breadcrumb — 与 account/list .acc-catalog-crumb 对齐 */
.acc-detail-crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1;
  color: var(--tpl-text-muted);
}

.account-detail-page .acc-detail-crumb a {
  color: inherit;
}

.account-detail-page .acc-detail-crumb a:hover {
  color: inherit;
}

.acc-detail-crumb__sep {
  width: 6px;
  height: 10px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10' viewBox='0 0 6 10' fill='none'%3E%3Cpath d='M1 1L5 5L1 9' stroke='%2377859a' stroke-width='1.2'/%3E%3C/svg%3E") center/contain no-repeat;
}

.acc-detail-crumb__current {
  color: var(--tpl-text);
}

/* Top grid: gallery+buy row1, specs+qc row2 (Figma 2209:150419) */
.acc-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 506px);
  column-gap: 21px;
  row-gap: 24px;
  align-items: stretch;
}

.acc-detail-gallery {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: none;
  height: auto;
  padding: 0;
  box-sizing: border-box;
  border-radius: 16px;
  background: var(--tpl-bg-card);
  border: 1px solid var(--tpl-border);
  box-shadow: var(--tpl-shadow-card);
  overflow: hidden;
}

.acc-detail-gallery__stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tpl-bg-muted);
}

/* 主图铺满；右侧附图轨叠在图内（Figma 2209:150419） */
.acc-detail-gallery__stage::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 200px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.acc-detail-gallery__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.acc-detail-gallery__badge {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 2;
  width: 54px;
  height: auto;
  pointer-events: none;
}

.acc-detail-gallery__thumbs {
  position: absolute;
  top: 56px;
  right: 6px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 169px;
  height: auto;
  max-height: calc(100% - 72px);
  box-sizing: border-box;
  transform: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.acc-detail-gallery__thumbs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.acc-detail-gallery__thumb {
  flex: none;
  width: 169px;
  height: auto;
  aspect-ratio: 169 / 101;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.acc-detail-gallery__thumb.is-active {
  border-color: var(--tpl-orange);
  box-shadow: 0 0 0 1px var(--tpl-orange);
}

.acc-detail-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Buy panel (Figma 2324:152160) */
.acc-detail-buy {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  min-height: 560px;
  max-height: none;
  height: auto;
  --buy-title: var(--tpl-text);
  --buy-body: var(--tpl-text);
  --buy-muted: var(--tpl-text-muted);
  --buy-price: var(--tpl-orange);
  --buy-accent: var(--tpl-green);
  --buy-brand: var(--tpl-brand);
  --buy-card-bg: var(--tpl-bg-muted);
  --buy-card-selected-bg: rgba(13, 105, 242, 0.05);
  --buy-popular-bg: var(--tpl-orange);
  --buy-learn-bg: rgba(0, 110, 245, 0.16);
  background: var(--tpl-bg-card);
  border: 1px solid var(--tpl-border);
  border-radius: 16px;
  padding: 24px 30px 32px 16px;
  box-shadow: var(--tpl-shadow-card);
  box-sizing: border-box;
  overflow: visible;
}

html.dark .acc-detail-buy {
  --buy-title: #0c111c;
  --buy-body: #0c111c;
  --buy-muted: #77859a;
  --buy-price: #f26822;
  --buy-accent: #1fc66b;
  --buy-brand: #006ef5;
  --buy-card-bg: #f2f2f7;
  --buy-card-selected-bg: rgba(13, 105, 242, 0.05);
  --buy-popular-bg: #ffd033;
  --buy-learn-bg: #eaf2fe;
  --buy-footer: #0f1b2d;
}

.acc-detail-buy__head {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.acc-detail-buy__title {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 96px;
  box-sizing: border-box;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--buy-title);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  word-break: break-word;
}

.acc-detail-buy__meta {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--buy-body);
}

.acc-detail-buy__price-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.acc-detail-buy__stock {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 140px);
  width: auto;
}

.acc-detail-buy__stock-num {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--buy-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-detail-buy__stock-label {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--buy-body);
}

.acc-detail-buy__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  text-align: left;
}

.acc-detail-buy__now {
  display: block;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--buy-price);
  font-variant-numeric: lining-nums;
}

.acc-detail-buy__was {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--buy-muted);
}

.acc-detail-buy__was s {
  text-decoration: line-through;
}

.acc-detail-buy__note {
  margin: 0;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--buy-body);
}

.acc-detail-buy__plans {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.acc-detail-protection {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 0 0 16px;
  margin: 0;
  box-sizing: border-box;
}

.acc-detail-protection__icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  object-fit: contain;
}

.acc-detail-protection__copy {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.acc-detail-protection__meta {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.acc-detail-protection__title {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--buy-body);
  white-space: nowrap;
}

.acc-detail-protection__hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 15px;
  font-weight: 400;
  color: var(--buy-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-detail-protection__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px 9px;
  border: 0;
  border-radius: 45px;
  background: var(--buy-learn-bg);
  color: #006EF5;
  font-size: 12px;
  line-height: 15px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}

.acc-detail-protection__link:hover,
.acc-detail-protection__link:focus {
  border: 0;
  color: #006EF5;
  background: var(--buy-learn-bg);
  text-decoration: none;
  opacity: 0.92;
}

.acc-detail-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  margin-top: auto;
  width: 100%;
  align-content: flex-start;
}

.acc-detail-coverage__card {
  position: relative;
  display: flex;
  flex: 1 1 calc(50% - 4px);
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  min-height: 98px;
  padding: 13px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--buy-card-bg);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
}

.acc-detail-coverage__card.is-selected {
  border-color: var(--buy-brand);
  background: var(--buy-card-selected-bg);
}

.acc-detail-coverage__badge {
  position: absolute;
  top: -10px;
  right: 0;
  padding: 2px 6px;
  border-radius: 65px;
  background: var(--buy-popular-bg);
  color: #000;
  font-size: 8px;
  line-height: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.acc-detail-coverage__name {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--buy-body);
}

.acc-detail-coverage__price {
  font-size: 12px;
  line-height: 14px;
  font-weight: 600;
  color: var(--buy-accent);
}

.acc-detail-coverage__desc {
  font-size: 10px;
  line-height: 14px;
  font-weight: 400;
  color: var(--buy-body);
}

.acc-detail-buy__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 58px;
  width: 100%;
  height: 58px;
  min-height: 58px;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff6d23 0%, #ffa532 100%);
  color: #0c111c;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.acc-detail-buy__cta:hover {
  opacity: 0.92;
}

@keyframes acc-detail-agree-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  10% { transform: translate3d(-10px, 0, 0); }
  20% { transform: translate3d(10px, 0, 0); }
  30% { transform: translate3d(-8px, 0, 0); }
  40% { transform: translate3d(8px, 0, 0); }
  50% { transform: translate3d(-6px, 0, 0); }
  60% { transform: translate3d(6px, 0, 0); }
  70% { transform: translate3d(-3px, 0, 0); }
  80% { transform: translate3d(3px, 0, 0); }
  90% { transform: translate3d(-1px, 0, 0); }
}

.acc-detail-buy__agree.is-shake {
  display: flex;
  animation: acc-detail-agree-shake 0.55s ease-in-out;
}

.acc-detail-buy__agree {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding-bottom: 16px;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
}

.acc-detail-buy__agree-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 与 account/list .acc-catalog-check__box 对齐 */
.acc-detail-buy__agree-box {
  width: 16px;
  height: 16px;
  margin-top: 0.25px;
  border: 1px solid var(--tpl-border);
  border-radius: 4px;
  background: var(--tpl-bg-card);
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.acc-detail-buy__agree-check:checked + .acc-detail-buy__agree-box {
  border-color: var(--tpl-brand);
  background: var(--tpl-brand);
}

.acc-detail-buy__agree-check:checked + .acc-detail-buy__agree-box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
  background: none;
  border-radius: 0;
}

html:not(.dark) .account-detail-page .acc-detail-buy__agree-box {
  background: transparent;
}

.acc-detail-buy__agree-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 400;
  text-align: left;
  color: var(--buy-footer, var(--tpl-text, var(--ep-color-d)));
}

html.dark .acc-detail-buy__agree-text {
  color: #0f1b2d;
}

.acc-detail-buy__contract-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #006ef5;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
}

.acc-detail-buy__contract-link:hover {
  text-decoration: underline;
}

/* Electronic Trade Contract modal — above .header (10000000)
   Modal sits outside .account-detail-page, so define night/day tokens here. */
.acc-detail-contract-modal {
  --tpl-bg-card: var(--ep-color-b, #1f2937);
  --tpl-bg-muted: var(--ep-color-n, #24303f);
  --tpl-text: var(--ep-color-d, #fff);
  --tpl-text-muted: var(--ep-color-e, #6d7d96);
  --tpl-border: rgba(34, 46, 66, 0.4);
  position: fixed;
  inset: 0;
  z-index: 10000050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

html.dark .acc-detail-contract-modal {
  --tpl-bg-card: #ffffff;
  --tpl-bg-muted: #f8f8fb;
  --tpl-text: #0c111c;
  --tpl-text-muted: #77859a;
  --tpl-border: #e4e8ef;
}

.acc-detail-contract-modal[hidden] {
  display: none !important;
}

.acc-detail-contract-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(12, 17, 28, 0.55);
}

.acc-detail-contract-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(80vh, 840px);
  border-radius: 12px;
  background: var(--tpl-bg-card, #fff);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.acc-detail-contract-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tpl-border, #e4e8ef);
}

.acc-detail-contract-modal__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tpl-text, #0c111c);
}

.acc-detail-contract-modal__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tpl-text-muted, #77859a);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.acc-detail-contract-modal__close:hover {
  background: var(--tpl-bg-muted, #f2f2f7);
  color: var(--tpl-text, #0c111c);
}

.acc-detail-contract-modal__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 20px 24px;
  color: var(--tpl-text, #0c111c);
  font-size: 13px;
  line-height: 1.55;
}

.acc-detail-contract-modal__body h3 {
  margin: 20px 0 8px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

.acc-detail-contract-modal__body h3:first-child {
  margin-top: 0;
}

.acc-detail-contract-modal__body p,
.acc-detail-contract-modal__body ol {
  margin: 0 0 10px;
}

.acc-detail-contract-modal__body ol {
  padding-left: 1.25em;
}

.acc-detail-contract-modal__body li {
  margin-bottom: 6px;
}

.acc-detail-contract-modal__quote {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--tpl-border, #e4e8ef);
  color: var(--tpl-text-muted, #77859a);
  font-style: italic;
}

body.is-acc-detail-contract-open {
  overflow: hidden;
}

/* Shared panel */
.acc-detail-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--tpl-bg-card);
  border: 1px solid var(--tpl-border);
  border-radius: var(--tpl-card-radius);
  padding: 24px;
  box-shadow: var(--tpl-shadow-card);
}

.acc-detail-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.acc-detail-panel__title {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

.acc-detail-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 498px;
  gap: 32px;
  align-items: stretch;
}

.acc-detail-duo > .acc-detail-table {
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/* Specs — left column under gallery (Figma 2209:151265) */
.acc-detail-specs {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  --specs-stat-bg: var(--tpl-bg-muted);
  --specs-stat-num: var(--tpl-brand);
  --specs-stat-label: var(--tpl-text);
  --specs-row-border: var(--tpl-border);
  --specs-label: var(--tpl-text);
  --specs-value: var(--tpl-text);
  gap: 16px;
  padding: 24px 24px 32px;
  border-radius: 16px;
}

html.dark .acc-detail-specs {
  --specs-stat-bg: #f2f2f7;
  --specs-stat-num: #006ef5;
  --specs-stat-label: #0c111c;
  --specs-row-border: #f2f2f7;
  --specs-label: #0c111c;
  --specs-value: #0c111c;
}

.acc-detail-specs__title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--specs-value);
}

.acc-detail-specs__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  width: 100%;
}

.acc-detail-specs__highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 75px;
  padding: 8px 6px;
  border-radius: 8px;
  background: var(--specs-stat-bg);
  text-align: center;
  box-sizing: border-box;
}

.acc-detail-specs__stat {
  display: block;
  font-size: 24px;
  line-height: 28px;
  font-weight: 600;
  color: var(--specs-stat-num);
  word-break: break-word;
}

.acc-detail-specs__stat-label {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--specs-stat-label);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.acc-detail-specs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.acc-detail-specs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--specs-row-border);
}

.acc-detail-specs__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.acc-detail-specs__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--specs-label);
}

.acc-detail-specs__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.acc-detail-specs__value {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--specs-value);
  text-align: right;
}

/* QC — right column under buy panel (Figma 2209:151226) */
.acc-detail-qc {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 24px 16px 32px;
  border-radius: 16px;
  box-sizing: border-box;
  --qc-divider: #f2f2f7;
}

html:not(.dark) .acc-detail-qc {
  --qc-divider: #2c3340;
}

.acc-detail-qc__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--qc-divider, #f2f2f7);
}

.acc-detail-qc__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 12px;
}

.acc-detail-qc__intro {
  flex: 1;
  min-width: 0;
  padding-right: 52px;
}

.acc-detail-qc__title {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: var(--tpl-text);
}

.acc-detail-qc__meta {
  margin: 0;
  font-size: 14px;
  line-height: 16px;
  font-weight: 400;
  color: #77859a;
}

.acc-detail-qc__verified {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 39px;
  flex-shrink: 0;
}

.acc-detail-qc__verified-badge {
  display: block;
  width: 39px;
  height: 38px;
  object-fit: contain;
}

.acc-detail-qc__verified-label {
  font-size: 14px;
  line-height: 16.5px;
  font-weight: 600;
  color: var(--tpl-brand);
  white-space: nowrap;
}

.acc-detail-qc__status {
  margin: 0;
  padding-bottom: 8px;
  font-size: 14px;
  line-height: 16px;
  font-weight: 600;
  color: var(--tpl-text);
}

.acc-detail-qc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}

.acc-detail-qc__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26.5px;
  padding: 5px 9px;
  border: 1px solid #006ef5;
  border-radius: 4px;
  background: rgba(0, 110, 245, 0.08);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 400;
  color: var(--tpl-brand);
  box-sizing: border-box;
}

.acc-detail-qc__tag img {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.acc-detail-qc__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.acc-detail-qc__foot p {
  margin: 0;
  font-size: 12px;
  line-height: 16.5px;
  font-weight: 400;
  color: #77859a;
}

/* Assets */
.acc-detail-assets__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--tpl-border);
  padding-bottom: 12px;
}

.acc-detail-assets__tabs button {
  border: 0;
  background: var(--tpl-bg-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--tpl-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.acc-detail-assets__tabs button.is-active {
  background: #006ef5;
  color: #fff;
  font-weight: 600;
}

.acc-detail-assets__filters {
  margin-bottom: 16px;
}

.acc-detail-assets__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acc-detail-assets__pills button {
  border: 1px solid var(--tpl-border);
  background: var(--tpl-bg-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--tpl-text-secondary);
  cursor: pointer;
}

.acc-detail-assets__pills button.is-active {
  border-color: var(--tpl-brand);
  color: var(--tpl-brand);
  background: rgba(0, 110, 245, 0.08);
}

.acc-detail-assets__pills em {
  font-style: normal;
  margin-left: 4px;
  opacity: 0.7;
}

.acc-detail-assets__shot {
  border-radius: 8px;
  overflow: hidden;
  background: var(--tpl-bg-muted);
}

.acc-detail-assets__shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.acc-detail-assets__shot img[hidden],
.acc-detail-assets__richtext[hidden] {
  display: none !important;
}

.acc-detail-assets__richtext {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--tpl-text);
  box-sizing: border-box;
}

.acc-detail-assets__richtext p {
  margin: 0 0 12px;
}

.acc-detail-assets__richtext p:last-child {
  margin-bottom: 0;
}

.acc-detail-assets__richtext img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0;
}

.acc-detail-assets__richtext a {
  color: #006ef5;
  text-decoration: underline;
}

.acc-detail-assets__richtext ul,
.acc-detail-assets__richtext ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.acc-detail-assets__richtext h1,
.acc-detail-assets__richtext h2,
.acc-detail-assets__richtext h3,
.acc-detail-assets__richtext h4 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--tpl-text);
}

/* Delivery */
.acc-detail-delivery__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.acc-detail-delivery__step {
  padding: 16px;
  border-radius: 8px;
  background: var(--tpl-bg-muted);
  border: 1px solid var(--tpl-border);
}

.acc-detail-delivery__step-no {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tpl-brand);
}

.acc-detail-delivery__step h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.acc-detail-delivery__step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tpl-text-muted);
}

.acc-detail-delivery__note {
  margin: 0;
  font-size: 12px;
  color: var(--tpl-text-muted);
}

/* KV tables (legacy) */
.acc-detail-kv {
  margin: 0;
}

.acc-detail-kv > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tpl-border);
  font-size: 14px;
}

.acc-detail-kv > div:last-child {
  border-bottom: 0;
}

.acc-detail-kv dt {
  margin: 0;
  color: var(--tpl-text-secondary);
  font-weight: 400;
}

.acc-detail-kv dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

/* QC / Spec tables (Figma 2209:150419 / 2324:152580) */
.acc-detail-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 24px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.acc-detail-table .acc-detail-panel__head {
  margin-bottom: 0;
  padding-bottom: 16px;
}

.acc-detail-table--specdel .acc-detail-panel__head {
  padding-bottom: 8px;
}

.acc-detail-table .acc-detail-panel__title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--tpl-text);
}

.acc-detail-table__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.acc-detail-table__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  padding: 13px;
  border-radius: 8px;
  background: var(--tpl-bg-muted);
  box-sizing: border-box;
}

html.dark .acc-detail-table__cell {
  background: #f2f2f7;
}

.acc-detail-table__label {
  display: block;
  padding-bottom: 2px;
  font-size: 10px;
  line-height: 15px;
  font-weight: 400;
  color: var(--tpl-text);
}

html.dark .acc-detail-table__label {
  color: #0c111c;
}

.acc-detail-table__value {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--tpl-brand);
}

/* Spec & Delivery — row list (Figma 2324:153236) */
.acc-detail-table--specdel {
  --specdel-row-border: #f2f2f7;
}

/* Night mode：分割线用低对比深灰，对齐原型（勿用 #f2f2f7 浅线） */
html:not(.dark) .acc-detail-table--specdel {
  --specdel-row-border: #2c3340;
}

.acc-detail-table__rows {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.acc-detail-table__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 45px;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--specdel-row-border, #f2f2f7);
  box-sizing: border-box;
}

.acc-detail-table__row:last-child {
  min-height: 44px;
  padding-bottom: 12px;
}

.acc-detail-table__row dt {
  margin: 0;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--tpl-text);
}

.acc-detail-table__row dd {
  margin: 0;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--tpl-text);
  text-align: right;
}

/* FAQ：CMS about-words（与商品页 goods_many 同结构） */
.acc-detail-faq__cms {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-detail-faq .about-words {
  margin: 0;
}

.acc-detail-faq .about-words.page-container,
.acc-detail-faq .about-words.areas,
.acc-detail-faq .about-words.block-widget {
  width: 100%;
  max-width: none;
  padding: 0;
}

.acc-detail-faq .about-words > .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--tpl-border);
  border-radius: 8px;
  background: var(--tpl-bg-muted);
  box-sizing: border-box;
}

.acc-detail-faq .about-words .title-5 {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 18px;
  padding-right: 28px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--tpl-text);
  cursor: pointer;
}

.acc-detail-faq .about-words .title-5::before {
  top: 0;
  height: 20px;
}

.acc-detail-faq .about-words .title-5 .iden {
  display: none;
}

.acc-detail-faq .about-words .title-5 .faq-arrow {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
  flex: none;
  line-height: 1;
  color: var(--tpl-text-muted);
  transform: rotate(180deg);
  transition: transform 0.2s;
}

.acc-detail-faq .about-words .title-5 > .icon,
.acc-detail-faq .about-words .title-5 > [class*="dragon-ico"] {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
  flex: none;
}

.acc-detail-faq .about-words .open .title-5 .faq-arrow {
  transform: rotate(0deg);
}

.acc-detail-faq .about-words .title-5 .faq-arrow .icon {
  font-size: 20px;
  line-height: 1;
}

.acc-detail-faq .about-words .text {
  display: none;
  padding-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tpl-text-secondary);
}

.acc-detail-faq .about-words .open .text {
  display: block;
}

/* E-Contract banner — same as account/index .acc-safeguard (Figma 2209:136433) */
.account-detail-page .acc-detail-contract {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 46, 66, 0.4);
  border-radius: 12px;
  min-height: 170px;
  background: #0b1019;
  box-sizing: border-box;
}

.account-detail-page .acc-detail-contract__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.account-detail-page .acc-detail-contract__bg-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 103.63%;
  height: 112.94%;
  max-width: none;
  object-fit: cover;
}

.account-detail-page .acc-detail-contract__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 33px;
  min-height: 170px;
  box-sizing: border-box;
}

.account-detail-page .acc-detail-contract__lead {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.account-detail-page .acc-detail-contract__shield {
  flex-shrink: 0;
  width: 114px;
  height: 105px;
  object-fit: contain;
}

.account-detail-page .acc-detail-contract__copy {
  flex: 1;
  min-width: 0;
  max-width: 672px;
}

.account-detail-page .acc-detail-contract__eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 15px;
  color: #308dff;
  text-transform: uppercase;
}

.account-detail-page .acc-detail-contract__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #fff;
}

.account-detail-page .acc-detail-contract__desc {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  color: #fff;
}

.account-detail-page .acc-detail-contract__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 163px;
  height: 40px;
  padding: 0 20px;
  border-radius: 4px;
  background: #006ef5;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
  box-sizing: border-box;
}

.account-detail-page .acc-detail-contract__btn img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Promise (Figma 2324:152693) */
.acc-detail-promise {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 24px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.acc-detail-promise .acc-detail-panel__head {
  margin-bottom: 0;
}

.acc-detail-promise .acc-detail-panel__title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--tpl-text);
}

.acc-detail-promise__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.acc-detail-promise__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 22px;
  padding-top: 12px;
  min-width: 0;
}

.acc-detail-promise__item:first-child {
  padding-top: 0;
}

.acc-detail-promise__mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: var(--tpl-brand);
}

.acc-detail-promise__mark img {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.acc-detail-promise__text {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--tpl-text);
  word-break: break-word;
}

.acc-detail-promise__text strong {
  font-weight: 600;
  color: var(--tpl-text);
}

.acc-detail-promise__text span {
  font-weight: 400;
  color: var(--tpl-text);
}

@media (max-width: 1200px) {
  .acc-detail-top {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .acc-detail-gallery,
  .acc-detail-buy,
  .acc-detail-specs,
  .acc-detail-qc {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .acc-detail-gallery,
  .acc-detail-buy {
    min-height: 0;
    max-height: none;
    height: auto;
  }

  .acc-detail-duo {
    grid-template-columns: 1fr;
  }

  .acc-detail-delivery__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
