/* Keep page layout fluid without changing fixed dialogs or the login shell. */
body { min-width: 0; }

.phone-shell:not(.login-screen),
.phone-shell > .ptr-root,
.phone-shell > .ptr-root > .ptr-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.source-home.imperial-page .hero-brand-lockup {
  left: 0;
  min-width: 0;
  max-width: 100%;
}

.source-home.imperial-page .hero-brand-lockup strong {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.source-home.imperial-page .hero-seal-img {
  flex-shrink: 0;
}

.source-home.imperial-page .video-panel,
.source-home.imperial-page .quick-grid,
.product-zone-grid,
.product-zone-grid > .product-zone-card,
.product-zone-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.product-zone-card .product-zone-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  color: #836855;
  font-size: 13px;
  line-height: 1.5;
}

.product-zone-card .product-zone-progress > span:last-of-type {
  color: #a51c25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Native semantics and real values, with consistent WebKit/Firefox rendering. */
.product-zone-card .product-zone-progress progress {
  grid-column: 1 / -1;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #f0e1c8;
  box-shadow: inset 0 0 0 1px #e3cdab;
}

.product-zone-card .product-zone-progress progress::-webkit-progress-bar {
  background: #f0e1c8;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px #e3cdab;
}

.product-zone-card .product-zone-progress progress::-webkit-progress-value {
  border-radius: 5px;
  background: linear-gradient(90deg, #a41420, #ce4231 65%, #d9a64e);
}

.product-zone-card .product-zone-progress progress::-moz-progress-bar {
  border-radius: 5px;
  background: linear-gradient(90deg, #a41420, #ce4231 65%, #d9a64e);
}

@media (max-width: 360px) {
  .source-home.imperial-page .hero-brand-lockup { gap: 10px; }
  .source-home.imperial-page .hero-brand-lockup strong { font-size: 26px; }
  .product-zone-card .product-zone-body { padding: 16px; }
}

.source-product-detail {
  padding-top: calc(112px + env(safe-area-inset-top, 0px));
}

.source-product-detail .holdings-page-header {
  position: fixed;
  top: 0;
  z-index: 40;
  display: grid;
  align-items: center;
  left: 0;
  width: 100%;
  max-width: none;
  height: calc(96px + env(safe-area-inset-top, 0px));
  min-height: 96px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  box-sizing: border-box;
  border-bottom: 1px solid #c5a068;
  background: linear-gradient(180deg, #9a20181a, #47080940), #8b1115 url("/static/images/subpage/showcase-palace-v1.png") center 55% / cover no-repeat;
  color: #fff2d8;
}

.source-product-detail .holdings-page-header::after {
  bottom: -1px;
  height: 1px;
  opacity: .8;
}

.source-product-detail .holdings-page-title h1 {
  margin: 0;
  color: #fff8e8;
  font-size: 22px;
  font-weight: 700;
  line-height: 32px;
  text-shadow: 0 1px 2px #39070740;
  letter-spacing: 0;
}

.source-product-detail .showcase-title-ornament {
  width: 128px;
  height: 10px;
  margin-top: 7px;
  stroke: #ecc783;
  opacity: .8;
}

.source-product-detail .holdings-page-header > button {
  border: 1px solid #ebc68140;
  border-radius: 8px;
  background: #4e090b26;
  color: #fff5df;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.source-product-detail .holdings-page-header > button:hover {
  background: #fff0ce14;
  border-color: #ebc68180;
}

.source-product-detail .holdings-page-header > button:active {
  background: #43080b66;
}

.source-product-detail .holdings-page-header > button svg {
  width: 22px;
  height: 22px;
}

.source-product-detail .holdings-page-header button:focus-visible {
  outline: 2px solid #c69d56;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .source-product-detail .holdings-page-header > button { transition: none; }
}

/* Product detail uses the same warm paper and vermilion palette as the shell. */
.page.source-product-detail {
  padding: calc(102px + env(safe-area-inset-top, 0px)) 12px 20px;
  background: linear-gradient(#fffaf2a6, #fff8ebcc), #faf4e8 url("/static/images/subpage/showcase-paper-v2.png") center bottom / 100% auto repeat-y;
  color: #413831;
}

.source-product-detail > section:not(.source-detail-bottom-space) {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.source-product-detail .source-product-main { gap: 0; }
.source-product-detail .source-product-cover {
  display: block;
  width: calc(100% + 8px);
  max-width: none;
  height: auto;
  margin-left: -4px;
  border: 1px solid #ddbb80;
  border-radius: 4px;
  object-fit: contain;
}

.source-product-detail .source-product-name {
  padding: 14px 4px 12px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.source-product-detail .source-product-name h1 { color: #8e1e24; font-size: 19px; }
.source-product-detail .source-product-name p { color: #776653; line-height: 1.65; }
.source-product-detail .source-product-name strong { color: #ad2631; font-size: 19px; }

.source-product-detail .source-detail-metrics {
  margin-top: 0;
  padding: 11px 0;
  gap: 0;
  border-block: 1px solid #ddc291;
  border-radius: 0;
  background: #fff8e9b3;
  box-shadow: none;
}
.source-product-detail .source-detail-metrics article {
  min-height: 0;
  padding: 0 4px;
  gap: 5px;
  background: transparent;
}
.source-product-detail .source-detail-metrics article + article { border-left: 1px solid #e2cfa8; }
.source-product-detail .source-detail-metrics span { color: #7d6a53; }
.source-product-detail .source-detail-metrics strong { color: #aa2330; font-size: 18px; }

.source-product-detail .source-product-copy,
.source-product-detail .source-product-rules {
  margin-top: 12px;
  padding: 14px;
  gap: 8px;
  border: 1px solid #dfc79d;
  border-radius: 6px;
  background: #fffaf0ed;
  box-shadow: none;
  color: #413831;
  font-size: 14px;
  line-height: 1.75;
}
.source-product-detail .source-product-rules h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 4px;
  color: #8e1e24;
  font-size: 18px;
  line-height: 28px;
}
.source-product-detail .source-product-rules h2::before,
.source-product-detail .source-product-rules h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4ac6c);
}
.source-product-detail .source-product-rules h2::after { transform: rotate(180deg); }
.source-product-detail .product-rule-label,
.source-product-detail .product-rule-emphasis { color: #81252a; }
.source-product-detail .product-rule-number { color: #ac2430; }
.source-product-detail .product-rule-paragraph + .product-rule-paragraph {
  padding-top: 8px;
  border-top-color: #e8d8bc;
}
.source-product-detail .source-dividend-table div { background: #f7ecd6; color: #58493a; }
.source-product-detail .source-dividend-table strong,
.source-product-detail .source-dividend-table b { color: #ac2430; }

.source-product-detail .source-detail-bottom-space { height: calc(90px + env(safe-area-inset-bottom, 0px)); }
.source-product-detail .source-detail-bar {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, .9fr) minmax(88px, 1fr) minmax(96px, 1.1fr);
  gap: 8px;
  padding: 10px max(12px, calc((100% - 760px) / 2)) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #d9b97c;
  background: #fff8e9;
  box-shadow: 0 -2px 10px #62432008;
}
.source-product-detail .source-detail-bar > div:first-child span,
.source-product-detail .source-detail-quantity > span { color: #7f705d; }
.source-product-detail .source-detail-bar > div:first-child strong { color: #b52430; }
.source-product-detail .source-detail-quantity { min-width: 0; width: 100%; }
.source-product-detail .source-detail-stepper {
  width: 100%;
  max-width: 120px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: #e1cba6;
  border-radius: 6px;
  color: #413831;
}
.source-product-detail .source-detail-stepper button { color: #554537; background: #fffaf0; }
.source-product-detail .source-detail-stepper button:disabled { color: #a99c89; background: #f3eadb; }
.source-product-detail .source-detail-stepper span { border-color: #eadcc5; background: #fffcf6; }
.source-product-detail .source-detail-bar > button {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid #a02027;
  border-radius: 6px;
  background: #af252d;
  color: #fff8eb;
  font-size: 15px;
  box-shadow: none;
  white-space: nowrap;
}
.source-product-detail .source-detail-bar > button:hover { background: #95212a; }
.source-product-detail .source-detail-bar button:focus-visible { outline: 2px solid #a22229; outline-offset: 3px; }
@media (max-width: 360px) {
  .source-product-detail .source-product-name { gap: 6px; }
  .source-product-detail .source-product-name h1,
  .source-product-detail .source-product-name strong { font-size: 17px; }
}
