.verified-rating-inline {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 10px;
  margin-top: 8px;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce4eb;
  border-radius: 4px;
  color: #42566d;
  background: #fff;
  font-size: 12px;
}
.verified-rating-inline:hover { border-color: var(--blue, #2357e8); color: var(--blue, #2357e8); }
.verified-rating-inline b { color: #182941; font-size: 13px; }
.verified-rating-inline span:last-child { color: #718196; }
.verified-review-all-inline { min-height: 34px; padding: 7px 3px; margin: 8px 0 0 4px; border: 0; color: var(--theme-accent, #b88a32); background: transparent; font-size: 11px; font-weight: 800; }
.verified-review-all-inline:hover { color: var(--theme-accent-dark, #8a671e); text-decoration: underline; }
.review-star-display { color: #f0a126; font-size: 14px; letter-spacing: 0; white-space: nowrap; }
.verified-order-badge,
.review-refund-badge { display: inline-flex; padding: 3px 6px; align-items: center; border-radius: 3px; font-size: 10px; font-weight: 700; }
.verified-order-badge { color: #117261; background: #eaf8f4; }
.review-refund-badge { color: #9b5c2c; background: #fff2e6; }

.product-buy-actions { grid-template-columns: minmax(96px, .78fr) minmax(105px, .78fr) 60px minmax(112px, 1.2fr); }
.product-buy-actions .product-enter-store,
.product-buy-actions .product-consult { border-color: var(--blue, #2357e8); color: var(--blue, #2357e8); background: var(--theme-accent-soft, #f5f8ff); }
.product-buy-actions .product-enter-store:hover,
.product-buy-actions .product-consult:hover { color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); }
.product-buy-actions .product-save { display: grid; min-width: 48px; padding: 0; place-items: center; color: #64758a; font-size: 23px; line-height: 1; }
.product-buy-actions .product-save.saved,
.product-mobile-actions .mobile-save.saved { border-color: #efb3b8; color: #df3f4d; background: #fff6f7; }
.verified-reviews-section { background: #fff; }
.product-review-summary { display: grid; padding: 17px 0 19px; grid-template-columns: 180px minmax(0, 1fr); align-items: stretch; gap: 18px; }
.review-overall { display: flex; padding-right: 18px; flex-direction: column; justify-content: center; border-right: 1px solid #e4eaf0; }
.review-overall strong { color: #17273c; font-family: "Space Grotesk", sans-serif; font-size: 35px; line-height: 1; }
.review-overall > span { margin-top: 8px; }
.review-overall small { margin-top: 7px; color: #7c8b9a; font-size: 11px; }
.review-dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.review-dimensions > div { display: flex; min-width: 0; padding: 12px; flex-direction: column; justify-content: center; gap: 6px; border: 1px solid #e2e9ef; border-radius: 4px; background: #fafcfd; }
.review-dimensions span { color: #738497; font-size: 11px; overflow-wrap: anywhere; }
.review-dimensions b { color: #1d314a; font-family: "Space Grotesk", sans-serif; font-size: 19px; }
.product-review-preview,
.store-review-preview,
.seller-review-feed,
.review-list-feed { display: grid; gap: 10px; }
.verified-review-card { padding: 16px; border: 1px solid #e0e7ed; border-radius: 5px; background: #fff; }
.verified-review-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.verified-review-card > header > div { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 6px; }
.verified-review-card > header b { color: #3e5167; font-size: 12px; overflow-wrap: anywhere; }
.verified-review-card > header time { flex: none; color: #8b98a6; font-size: 10px; }
.review-card-score { display: flex; margin-top: 10px; align-items: center; gap: 7px; }
.review-card-score b { color: #4f6073; font-size: 11px; }
.verified-review-card > p { margin: 10px 0 0; color: #526579; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.review-images { display: grid; margin-top: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.review-images a { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid #e0e5e9; border-radius: 4px; background: #f4f5f6; }
.review-images img { display: block; width: 100%; height: 100%; object-fit: cover; }
.review-tags { display: flex; margin-top: 9px; flex-wrap: wrap; gap: 5px; }
.review-tags span { padding: 4px 7px; border-radius: 3px; color: #4e6380; background: #eff3f8; font-size: 10px; }
.seller-review-reply { padding: 11px 12px; margin-top: 12px; border-left: 3px solid var(--blue, #2357e8); background: var(--theme-accent-soft, #f4f7fb); }
.seller-review-reply b { color: var(--blue, #2357e8); font-size: 11px; }
.seller-review-reply p { margin: 5px 0; color: #4f6176; font-size: 12px; line-height: 1.65; }
.seller-review-reply time { color: #8996a3; font-size: 9px; }
.review-view-all { width: 100%; min-height: 39px; margin-top: 12px; border: 1px solid var(--blue, #2357e8); border-radius: 4px; color: var(--blue, #2357e8); background: var(--theme-accent-soft, #fff); font-size: 12px; font-weight: 800; }
.review-empty,
.presale-empty { padding: 28px 16px; border: 1px dashed #d6dfe7; color: #8492a1; background: #fafcfd; text-align: center; font-size: 12px; }

.review-list-modal { color: #18283d; }
.review-list-head { display: flex; padding-bottom: 17px; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e1e7ed; }
.review-list-head h2 { margin: 7px 0 4px; font-size: 25px; }
.review-list-head p { margin: 0; color: #78889a; font-size: 12px; }
.review-overall-compact { display: flex; flex-direction: column; align-items: flex-end; }
.review-overall-compact strong { font-family: "Space Grotesk", sans-serif; font-size: 30px; }
.review-list-modal > .review-dimensions { margin: 17px 0; }
.review-filter-tabs,
.seller-feedback-tabs { display: flex; padding-bottom: 12px; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.review-filter-tabs button,
.seller-feedback-tabs button { min-height: 34px; padding: 7px 12px; border: 1px solid #d7e1e9; border-radius: 4px; color: #68798c; background: #fff; font-size: 11px; white-space: nowrap; }
.review-filter-tabs button.active,
.seller-feedback-tabs button.active { border-color: var(--blue, #2357e8); color: var(--blue, #2357e8); background: var(--theme-accent-soft, #eef3ff); font-weight: 800; }
.review-list-feed { max-height: min(58vh, 620px); padding-right: 3px; overflow-y: auto; }
.modal.review-modal { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
.review-modal #modalContent { display: flex; min-height: 0; overflow: hidden; flex: 1 1 auto; flex-direction: column; }
.review-modal .review-list-modal { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.review-modal .review-list-head,
.review-modal .review-dimensions,
.review-modal .review-filter-tabs { flex: 0 0 auto; }
.review-modal .review-list-feed { min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }

.store-review-band { padding: 34px 0; border-bottom: 1px solid #dfe6ec; background: #f6f8fb; }
.store-review-band header { display: flex; margin-bottom: 18px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.store-review-band h2 { margin: 7px 0 4px; font-size: 26px; }
.store-review-band header p { margin: 0; color: #78889a; font-size: 12px; }
.store-review-overall { display: flex; flex-direction: column; align-items: flex-end; }
.store-review-overall strong { color: #18293f; font-family: "Space Grotesk", sans-serif; font-size: 31px; }
.store-review-overall small { margin-top: 4px; color: #8290a0; font-size: 10px; }
.store-review-band .review-dimensions { margin-bottom: 14px; }
.store-review-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.store-review-actions { display: flex; margin-top: 13px; justify-content: flex-end; gap: 8px; }
.store-review-actions button { min-height: 36px; padding: 8px 13px; border: 1px solid var(--blue, #2357e8); border-radius: 4px; color: var(--blue, #2357e8); background: var(--theme-accent-soft, #fff); font-size: 11px; font-weight: 800; }
.store-review-actions button.primary { border-color: var(--blue, #2357e8); color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); }

.verified-review-form.review-form { display: block; padding: 0; margin: 0; border: 0; background: transparent; grid-template-columns: none; }
.review-form-workspace { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.45fr); gap: 0; border-top: 1px solid #dfe5ea; }
.review-score-panel { min-width: 0; padding: 24px 26px 24px 0; border-right: 1px solid #dfe5ea; }
.review-feedback-panel { min-width: 0; padding: 24px 0 0 26px; }
.review-form-head { display: flex; margin-bottom: 18px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-form-head b { color: #1b2d44; font-size: 20px; }
.review-form-head p { max-width: 300px; margin: 6px 0 0; color: #738396; font-size: 13px; line-height: 1.65; }
.review-score-grid { display: grid; grid-template-columns: 1fr; }
.review-score-row { display: flex; min-width: 0; min-height: 52px; padding: 10px 0; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e7ebef; }
.review-score-row:last-child { border-bottom: 0; }
.review-score-row > span { color: #526579; font-size: 14px; font-weight: 700; }
.review-star-input { display: flex; width: max-content; margin: 0; flex-direction: row-reverse; justify-content: flex-end; }
.review-star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.review-star-input label { color: #cfd7df; cursor: pointer; font-size: 28px; line-height: 1; }
.review-star-input label:hover,
.review-star-input label:hover ~ label,
.review-star-input input:checked ~ label { color: #f0a126; }
.review-star-input input:focus-visible + label { outline: 2px solid var(--blue, #2357e8); outline-offset: 2px; }
.review-tag-picker { min-width: 0; padding: 0; margin: 0; border: 0; }
.review-tag-picker > legend { padding: 0; margin-bottom: 13px; color: #26384c; font-size: 15px; font-weight: 800; }
.review-tag-picker > .review-tag-groups { display: grid; gap: 12px; }
.review-tag-group { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 12px; }
.review-tag-group > b { color: #657487; font-size: 13px; }
.review-tag-group > div { display: flex; min-width: 0; flex-wrap: wrap; gap: 8px; }
.review-tag-picker label { cursor: pointer; }
.review-tag-picker input { position: absolute; opacity: 0; }
.review-tag-picker span { display: inline-flex; min-height: 38px; padding: 8px 12px; align-items: center; border: 1px solid #d8e2ea; border-radius: 4px; color: #5e7186; background: #fff; font-size: 13px; }
.review-tag-picker input:checked + span { border-color: var(--blue, #b9892c); color: var(--blue, #8d681e); background: var(--theme-accent-soft, #fff8e8); }
.review-tag-picker label.issue input:checked + span { border-color: #d97960; color: #a64d3a; background: #fff1ed; }
.review-comment-field { display: block; margin-top: 24px; color: #26384c; font-size: 15px; font-weight: 800; }
.review-comment-field textarea { width: 100%; min-height: 168px; padding: 14px 15px; margin-top: 9px; resize: vertical; border: 1px solid #d6e0e8; border-radius: 4px; outline-color: var(--blue, #2357e8); color: #30445b; background: #fff; font: inherit; font-size: 15px; line-height: 1.65; box-sizing: border-box; }
.review-media-picker { display: inline-flex; min-height: 40px; padding: 8px 12px; margin-top: 10px; align-items: center; gap: 7px; border: 1px solid var(--theme-accent, #b88a2a); border-radius: 4px; color: var(--theme-accent, #8e691c); background: var(--theme-accent-soft, #fff8e8); cursor: pointer; font-size: 12px; font-weight: 800; }
.review-media-picker .ui-icon { width: 17px; height: 17px; }
.review-media-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.review-media-preview { margin-top: 8px; }
.seller-review-reply-form textarea { width: 100%; min-height: 86px; padding: 10px 11px; margin-top: 7px; resize: vertical; border: 1px solid #d6e0e8; border-radius: 4px; outline-color: var(--blue, #2357e8); color: #30445b; background: #fff; font: inherit; font-size: 12px; line-height: 1.6; box-sizing: border-box; }
.review-form-actions { display: flex; margin-top: 14px; align-items: center; justify-content: space-between; gap: 12px; }
.review-anonymous { display: inline-flex; align-items: center; gap: 7px; color: #66788b; cursor: pointer; font-size: 12px; font-weight: 700; }
.review-anonymous input { width: 17px; height: 17px; margin: 0; accent-color: var(--theme-accent, #b88a2a); }
.verified-review-form .review-submit { min-width: 148px; min-height: 46px; padding: 10px 22px; margin: 0; border: 0; border-radius: 4px; color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); font-size: 14px; font-weight: 800; }
.member-review-summary { padding: 11px 12px; margin-top: 10px; border-top: 1px solid #e3e9ef; background: #f9fbfc; }
.member-review-summary > span { color: #43566d; font-size: 11px; font-weight: 700; }
.member-review-summary p { margin: 6px 0 0; color: #5d6f82; font-size: 11px; line-height: 1.6; }
.member-review-summary small { display: block; margin-top: 7px; color: var(--blue, #2357e8); font-size: 10px; }
.member-review-like-count { display: inline-flex; margin-top: 8px; align-items: center; gap: 5px; color: var(--theme-accent, #a87d1d); font-size: 10px; }
.member-review-like-count .ui-icon { width: 14px; height: 14px; }
.review-social-actions { display: flex; padding-top: 10px; margin-top: 12px; justify-content: flex-end; border-top: 1px solid #edf0f2; color: inherit; background: transparent; }
.review-like-button { display: inline-flex; min-height: 34px; padding: 0 10px; align-items: center; gap: 6px; border: 1px solid #dbe2e8; border-radius: 4px; color: #68798a; background: #fff; font-size: 10px; font-weight: 800; }
.review-like-button .ui-icon { width: 15px; height: 15px; }
.review-like-button b { min-width: 15px; color: inherit; font-size: 10px; text-align: center; }
.review-like-button:hover:not(:disabled),.review-like-button.is-liked { border-color: var(--theme-accent, #d1a741); color: #755717; background: var(--theme-accent-soft, #fff8e6); }
.review-like-button:disabled { cursor: not-allowed; opacity: .55; }

.seller-feedback-score { display: flex; flex-direction: column; align-items: flex-end; }
.seller-feedback-score strong { font-family: "Space Grotesk", sans-serif; font-size: 29px; }
.seller-feedback-score small { color: #7d8b9b; font-size: 10px; }
.seller-feedback-metrics { margin: 18px 0 13px; }
.seller-feedback-tabs { margin-bottom: 4px; border-bottom: 1px solid #dfe6ec; }
.seller-feedback-tabs span { margin-left: 4px; }
.seller-review-feed { margin-top: 12px; }
.seller-review-reply-form { padding-top: 12px; margin-top: 12px; border-top: 1px solid #e0e7ed; }
.seller-review-reply-form label { display: block; color: #778799; font-size: 10px; }
.seller-review-reply-form button { min-height: 34px; padding: 7px 13px; margin-top: 7px; border: 0; border-radius: 4px; color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); font-size: 11px; font-weight: 800; }
.seller-presale-list { display: grid; margin-top: 12px; gap: 8px; }
.seller-presale-list > button { display: grid; min-width: 0; padding: 11px; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #dfe6ec; border-radius: 5px; color: #354a62; background: #fff; text-align: left; }
.seller-presale-list > button:hover { border-color: #9db5de; }
.seller-presale-list img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.seller-presale-list span { min-width: 0; }
.seller-presale-list b,
.seller-presale-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-presale-list b { font-size: 12px; }
.seller-presale-list small { margin-top: 5px; color: #7b8b9b; font-size: 10px; }
.seller-presale-list time { color: #8b98a6; font-size: 9px; }

@media (min-width: 901px) {
  .product-review-summary {
    padding: 20px 0 22px;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
  }
  .product-review-preview,
  .seller-route-page .seller-review-feed {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
    gap: 14px;
  }
  .product-review-preview .verified-review-card,
  .seller-route-page .seller-review-feed .verified-review-card {
    height: 100%;
    box-sizing: border-box;
  }
  .product-review-preview .verified-review-card > header b,
  .seller-route-page .seller-review-feed .verified-review-card > header b { font-size: 14px; }
  .product-review-preview .verified-review-card > header time,
  .seller-route-page .seller-review-feed .verified-review-card > header time { font-size: 11px; }
  .product-review-preview .verified-review-card > p,
  .seller-route-page .seller-review-feed .verified-review-card > p { font-size: 14px; line-height: 1.7; }
  .product-review-preview .review-tags span,
  .seller-route-page .seller-review-feed .review-tags span { font-size: 11px; }
  .product-review-summary .review-dimensions span,
  .seller-route-page .seller-feedback-metrics .review-dimensions span { font-size: 12px; }
  .product-review-summary .review-dimensions b,
  .seller-route-page .seller-feedback-metrics .review-dimensions b { font-size: 21px; }
  .seller-route-page .seller-feedback-score {
    min-width: 116px;
    padding: 13px 16px;
    border: 1px solid #e0e6eb;
    border-radius: 5px;
    background: #fafbfc;
  }
  .seller-route-page .seller-feedback-score strong { color: #18293f; font-size: 34px; line-height: 1; }
  .seller-route-page .seller-feedback-score small { margin-top: 7px; font-size: 12px; }
  .seller-route-page .seller-feedback-metrics {
    padding: 14px;
    margin: 0 0 18px;
    border: 1px solid #e0e6eb;
    border-radius: 5px;
    background: #fafbfc;
  }
  .seller-route-page .seller-feedback-metrics .review-dimensions > div {
    min-height: 72px;
    padding: 12px 15px;
    background: #fff;
  }
  .seller-route-page .seller-feedback-tabs { margin-bottom: 14px; padding-bottom: 10px; }
  .seller-route-page .seller-feedback-tabs button { display: inline-flex; min-width: 128px; align-items: center; justify-content: center; font-size: 12px; }
  .seller-route-page .seller-review-feed { margin-top: 0; }
  .seller-route-page .seller-review-reply-form { margin-top: 14px; }
}

.presale-chat { color: #1c2c42; }
.presale-chat-head { display: grid; padding: 0 52px 14px 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #e0e7ed; }
.presale-shop-avatar { display: grid; width: 42px; height: 42px; padding: 0; overflow: hidden; place-items: center; border: 1px solid var(--theme-accent, #b88a2a); border-radius: 50%; color: var(--theme-accent-contrast, #17130b); background: var(--theme-accent-soft, #fff8e8); cursor: pointer; }
.presale-shop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.presale-chat-title { min-width: 0; }
.presale-chat-head h2 { margin: 6px 0 3px; font-size: 23px; }
.presale-chat-head p { margin: 0; overflow: hidden; color: #758599; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.presale-chat-head > span { max-width: 180px; padding: 5px 8px; overflow: hidden; border-radius: 3px; color: var(--blue, #2357e8); background: var(--theme-accent-soft, #edf2ff); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.presale-chat-head > button { padding: 7px 10px; border: 1px solid var(--blue, #2357e8); border-radius: 4px; color: var(--blue, #2357e8); background: var(--theme-accent-soft, #fff); font-size: 11px; }
.presale-chat-head > .presale-shop-avatar { width: 42px; height: 42px; padding: 0; border-color: var(--theme-accent, #b88a2a); border-radius: 50%; color: var(--theme-accent-contrast, #17130b); }
.presale-modal .presale-back { position: absolute; z-index: 3; top: 11px; left: 13px; }
.presale-modal .presale-chat-head { padding-right: 12px; padding-left: 56px; grid-template-columns: 42px minmax(0, 1fr) auto; }
.presale-context { display: grid; padding: 11px 0; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; }
.presale-context img { width: 52px; height: 52px; border: 1px solid #e0e6ec; border-radius: 4px; object-fit: contain; }
.presale-context b,
.presale-context small { display: block; }
.presale-context b { font-size: 12px; overflow-wrap: anywhere; }
.presale-context small { margin-top: 5px; color: #7d8b99; font-size: 10px; }
.presale-safety { padding: 8px 10px; margin: 0 0 10px; border-left: 3px solid #d19a49; color: #735b36; background: #fff8ea; font-size: 10px; line-height: 1.6; }
.presale-log { display: flex; height: min(45vh, 420px); min-height: 250px; padding: 13px; flex-direction: column; gap: 9px; overflow-y: auto; border: 1px solid #e0e7ed; border-radius: 4px; background: #f7f9fb; }
.presale-log .presale-empty { margin: auto 0; }
.presale-product-card { display: grid; width: min(100%, 580px); padding: 11px; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #d8c17d; border-left: 4px solid var(--theme-accent, #b88a2a); border-radius: 6px; background: #fffaf0; }
.presale-product-image { display: grid; width: 52px; height: 52px; overflow: hidden; place-items: center; border-radius: 5px; color: #fff; background: var(--theme-accent, #b88a2a); font-size: 18px; font-weight: 800; }
.presale-product-image img { width: 100%; height: 100%; object-fit: cover; }
.presale-product-card > div { min-width: 0; }
.presale-product-card b,.presale-product-card small,.presale-product-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presale-product-card b { font-size: 12px; }
.presale-product-card small { margin-top: 4px; color: #8b7850; font-size: 9px; }
.presale-product-card em { width: fit-content; padding: 3px 6px; margin-top: 5px; border-radius: 3px; color: #8f6721; background: #f5e7bc; font-size: 8px; font-style: normal; font-weight: 800; }
.presale-product-card > strong { color: #9b7020; font-size: 13px; white-space: nowrap; }
.presale-empty > b { display: block; margin-bottom: 11px; color: #52667d; font-size: 12px; }
.presale-quick-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.presale-quick-questions button { min-height: 38px; padding: 7px 9px; border: 1px solid #cfdae4; border-radius: 4px; color: #49617e; background: #fff; font-size: 10px; line-height: 1.45; }
.presale-quick-questions button:hover { border-color: var(--blue, #2357e8); color: var(--blue, #2357e8); background: var(--theme-accent-soft, #f2f6ff); }
.presale-message { width: fit-content; min-width: 0; max-width: 78%; padding: 9px 11px; border: 1px solid #dce4eb; border-radius: 5px; background: #fff; }
.presale-message.buyer { align-self: flex-end; border-color: #b8caed; background: #edf3ff; }
.presale-message.seller { align-self: flex-start; }
.presale-message header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.presale-message header b { color: var(--blue, #2357e8); font-size: 10px; }
.presale-message header time { color: #8996a3; font-size: 8px; }
.presale-message-identity { display: inline-flex; min-width: 0; padding: 0; align-items: center; gap: 6px; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; }
.presale-message-identity.is-shop-link { cursor: pointer; }
.presale-message-avatar { display: grid; width: 25px; height: 25px; overflow: hidden; flex: none; place-items: center; border: 1px solid #dcc177; border-radius: 50%; color: var(--theme-accent-contrast, #17130b); background: var(--theme-accent, #b88a2a); font-size: 9px; font-weight: 800; }
.presale-message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.presale-message-identity > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presale-message p { margin: 5px 0 0; color: #40546b; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.presale-message .merchant-read-status { display: block; margin-top: 5px; color: var(--theme-accent, #a87d1d); font-size: 11px; font-weight: 800; text-align: right; }
#presaleMessageForm { display: grid; margin-top: 9px; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; }
#presaleMessageForm textarea { min-height: 66px; padding: 10px; resize: vertical; border: 1px solid #d7e0e8; border-radius: 4px; outline-color: var(--blue, #2357e8); font: inherit; font-size: 12px; line-height: 1.55; }
#presaleMessageForm button { min-width: 84px; border: 0; border-radius: 4px; color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); font-size: 12px; font-weight: 800; }
.presale-media-picker { display: grid; width: 42px; min-height: 42px; place-items: center; overflow: hidden; border: 1px solid var(--theme-accent, #b88a2a); border-radius: 4px; color: var(--theme-accent, #9a721f); background: var(--theme-accent-soft, #fff8e8); cursor: pointer; }
.presale-media-picker .ui-icon { width: 18px; height: 18px; }
.presale-media-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.presale-attachments { display: grid; margin-top: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.presale-attachments .presale-attachment-image,
.presale-attachments video { display: block; width: 100%; overflow: hidden; border: 1px solid #d9e0e6; border-radius: 4px; background: #111; }
.presale-attachments .presale-attachment-image { padding: 0; cursor: zoom-in; }
.presale-attachments img { display: block; width: 100%; max-height: 250px; object-fit: contain; }
.presale-attachments video { max-height: 270px; }

.product-mobile-actions { display: none; }

@media (max-width: 700px) {
  .review-form-workspace { grid-template-columns: 1fr; border-top: 0; }
  .review-score-panel { padding: 18px 0 20px; border-right: 0; border-bottom: 1px solid #dfe5ea; }
  .review-feedback-panel { padding: 20px 0 0; }
  .review-form-head { display: flex; }
  .review-form-head b { font-size: 18px; }
  .review-form-head p { font-size: 13px; }
  .review-score-row { min-height: 48px; }
  .review-score-row > span { font-size: 13px; }
  .review-star-input label { font-size: 26px; }
  .review-tag-group { grid-template-columns: 1fr; gap: 7px; }
  .review-tag-picker span { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .review-comment-field textarea { min-height: 132px; font-size: 16px; }
  .verified-review-form .review-submit { width: 100%; }
  .product-review-summary { grid-template-columns: 1fr; }
  .review-overall { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid #e4eaf0; }
  .review-dimensions { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .review-dimensions > div { padding: 9px 7px; }
  .review-dimensions span { font-size: 10px; }
  .review-dimensions b { font-size: 17px; }
  .store-review-band { padding: 27px 0; }
  .store-review-band header { align-items: flex-start; }
  .store-review-overall { flex: none; }
  .store-review-preview { grid-template-columns: 1fr; }
  .seller-presale-list > button { grid-template-columns: 44px minmax(0, 1fr); }
  .seller-presale-list img { width: 44px; height: 44px; }
  .seller-presale-list time { grid-column: 2; }
}

@media (max-width: 620px) {
  body.product-route { padding-bottom: calc(126px + env(safe-area-inset-bottom)); }
  body.review-modal-open .product-mobile-actions { display: none; }
  .modal-backdrop { z-index: 120; }
  .product-buy-actions { display: none; }
  .product-mobile-actions { position: fixed; z-index: 85; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; display: grid; min-height: 58px; padding: 7px 10px; grid-template-columns: minmax(0, .75fr) minmax(0, .75fr) 44px minmax(0, 1.15fr); align-items: stretch; gap: 6px; border-top: 1px solid #d8e1e9; background: #fff; box-shadow: 0 -8px 24px #2136551c; }
  .product-mobile-actions button { min-width: 0; min-height: 44px; padding: 7px 9px; border: 1px solid #d2dce5; border-radius: 4px; color: #4d6076; background: #fff; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
  .product-mobile-actions .mobile-enter-store,
  .product-mobile-actions .mobile-consult { color: var(--blue, #2357e8); border-color: var(--blue, #9bb3e1); }
  .product-mobile-actions .mobile-save { padding: 0; font-size: 22px; }
  .product-mobile-actions .mobile-buy { border-color: var(--blue, #2357e8); color: var(--theme-accent-contrast, #fff); background: var(--blue, #2357e8); }
  .review-list-head,
  .store-review-band header { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .review-list-head h2,
  .store-review-band h2 { font-size: 21px; }
  .verified-review-card { padding: 13px; }
  .verified-review-card > header { display: block; }
  .verified-review-card > header time { display: block; margin-top: 6px; }
  .verified-review-form { padding: 13px; }
  .review-form-head { display: block; }
  .review-form-head > .verified-order-badge { margin-top: 8px; }
  #presaleMessageForm { grid-template-columns: 44px minmax(0, 1fr) 70px; }
  #presaleMessageForm button { min-width: 0; min-height: 40px; }
  .presale-modal #modalContent,
  .presale-modal .presale-chat { height: 100%; min-height: 0; }
  .presale-modal .presale-chat { display: grid; padding-top: calc(10px + env(safe-area-inset-top)); grid-template-rows: auto auto auto minmax(0, 1fr) auto; overflow: hidden; background: #fff; }
  .presale-modal .presale-back { top: calc(12px + env(safe-area-inset-top)); left: 8px; }
  .presale-modal .presale-chat-head { min-height: 68px; padding: 0 8px 10px 56px; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
  .presale-modal .presale-chat-head > .presale-shop-name { display: none; }
  .presale-modal .presale-chat-head h2 { margin: 3px 0 2px; font-size: 18px; line-height: 1.2; }
  .presale-modal .presale-chat-head .kicker { font-size: 9px; }
  .presale-modal .presale-chat-head p { font-size: 11px; }
  .presale-modal .presale-context { min-height: 62px; padding: 7px 12px; }
  .presale-modal .presale-context img { width: 48px; height: 48px; }
  .presale-modal .presale-safety { padding: 7px 12px; margin: 0; border-left: 0; border-bottom: 1px solid #ead8b5; font-size: 11px; }
  .presale-modal .presale-log { height: auto; min-height: 0; padding: 16px 12px 20px; border: 0; border-radius: 0; background: #f3f6f8; overscroll-behavior: contain; }
  .presale-modal .presale-product-card { width: 100%; box-sizing: border-box; grid-template-columns: 48px minmax(0, 1fr) auto; }
  .presale-modal .presale-product-image { width: 48px; height: 48px; }
  .presale-modal .presale-product-card b { font-size: 13px; }
  .presale-modal .presale-product-card > strong { font-size: 14px; }
  .presale-modal #presaleMessageForm { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); margin: 0; grid-template-columns: 44px minmax(0, 1fr) 70px; gap: 8px; border-top: 1px solid #dfe6ec; background: #fff; box-shadow: 0 -5px 18px rgba(20, 32, 48, .06); }
  .presale-modal #presaleMessageForm textarea { min-height: 48px; max-height: 92px; padding: 11px 12px; font-size: 16px; resize: none; }
  .presale-modal #presaleMessageForm textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; transform: none; touch-action: manipulation; }
  .presale-modal #presaleMessageForm button { min-width: 0; min-height: 48px; font-size: 13px; }
  .presale-modal .presale-media-picker { width: 44px; min-height: 48px; }
  .presale-attachments { grid-template-columns: 1fr; }
  .review-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-form-actions { align-items: stretch; flex-direction: column; }
  .review-anonymous { min-height: 36px; }
  .presale-quick-questions { grid-template-columns: 1fr; }
  .presale-message { max-width: 86%; }
  .presale-modal .presale-message p { font-size: 14px; line-height: 1.5; }
}

/* The consultation entry point is the same conversation surface as the
   message center. Keep the modal viewport and scroll ownership identical. */
.modal.message-detail-modal,
.modal.presale-modal {
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}
.modal.message-detail-modal #modalContent,
.modal.presale-modal #modalContent,
.modal.message-detail-modal .support-shell,
.modal.presale-modal .presale-chat {
  height: 100%;
  min-height: 0;
}
.modal.presale-modal .presale-log,
.modal.message-detail-modal .chat-log {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
}
@media (max-width: 620px) {
  .modal.message-detail-modal,
  .modal.presale-modal {
    width: 100%;
    height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
  }
}

/* Keep the seller identity and its lightweight status visible in every
   consultation viewport. The identity is inside the title stack so phones
   do not hide it as an implicit third grid column. */
.presale-chat-title .presale-shop-name {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  margin-top: 4px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #18856d;
  background: transparent !important;
}
.presale-chat-head.no-shop-avatar .presale-chat-title { grid-column: 1 / -1; }
.presale-chat-title .presale-shop-name > b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presale-chat-title .presale-presence {
  flex: none;
  font-size: 10px;
}

/* Authoritative shared chat surface. These rules intentionally come last so
   the consultation dialog cannot fall back to the old fixed-height viewport. */
.modal.message-detail-modal,
.modal.presale-modal {
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}
.modal.message-detail-modal #modalContent,
.modal.presale-modal #modalContent,
.modal.message-detail-modal .support-shell,
.modal.presale-modal .presale-chat {
  height: 100%;
  min-height: 0;
}
.modal.message-detail-modal .support-shell,
.modal.presale-modal .presale-chat { display: flex; flex-direction: column; }
.modal.message-detail-modal .chat-log,
.modal.presale-modal .presale-log {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.modal.message-detail-modal .chat-presence,
.modal.message-detail-modal .support-viewer,
.modal.presale-modal .presale-presence,
.modal.presale-modal .presale-shop-name {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 620px) {
  .modal.message-detail-modal,
  .modal.presale-modal {
    width: 100%;
    height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
  }
  .modal.message-detail-modal .support-shell,
  .modal.presale-modal .presale-chat {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }
}

/* Keep product consultation and message chat on one shared viewport.  This
   final block intentionally comes after the legacy consultation rules so a
   fixed 280px log cannot override the flex scroll area. */
.modal.message-detail-modal,
.modal.presale-modal {
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}
.modal.message-detail-modal #modalContent,
.modal.presale-modal #modalContent,
.modal.message-detail-modal .support-shell,
.modal.presale-modal .presale-chat {
  height: 100%;
  min-height: 0;
}
.modal.message-detail-modal .support-shell,
.modal.presale-modal .presale-chat {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.modal.message-detail-modal .chat-log,
.modal.presale-modal .presale-log {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.modal.message-detail-modal .chat-presence,
.modal.presale-modal .presale-presence,
.modal.message-detail-modal .support-viewer,
.modal.presale-modal .presale-shop-name {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 620px) {
  .modal.message-detail-modal,
  .modal.presale-modal {
    width: 100%;
    height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
  }
  .modal.message-detail-modal .support-shell,
  .modal.presale-modal .presale-chat {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }
  .modal.message-detail-modal .chat-log,
  .modal.presale-modal .presale-log {
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 390px) {
  .review-dimensions { grid-template-columns: 1fr; }
  .product-mobile-actions { grid-template-columns: 82px 40px minmax(0, 1fr); }
  .product-mobile-actions button { font-size: 10px; }
.review-list-head,
  .store-review-band header { grid-template-columns: 1fr; }
  .review-overall-compact,
  .store-review-overall { align-items: flex-start; }
}

.review-list-head-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 12px; }
.review-product-action { min-height: 38px; padding: 0 12px; border: 1px solid var(--theme-accent, #b88a2a); border-radius: 4px; color: #815f1e; background: var(--theme-accent-soft, #fff8e8); font-size: 11px; font-weight: 800; white-space: nowrap; }
.review-product-action:hover { color: var(--theme-accent-contrast, #fff); background: var(--theme-accent, #b88a2a); }
@media (max-width: 390px) {
  .review-list-head-actions { justify-content: space-between; }
}

/* Match the compact left/right bubbles used by the unified order chat. */
.presale-message,
.presale-message.buyer,
.presale-message.seller {
  padding: 0;
  border: 0;
  background: transparent;
}
.presale-message > p {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  overflow-wrap: anywhere;
  border-radius: 4px 14px 14px 14px;
  color: #26384b;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(25, 40, 58, .1);
}
.presale-message.is-own > p {
  margin-right: 0;
  margin-left: auto;
  border-radius: 14px 4px 14px 14px;
  color: #fff;
  background: #1688f8;
}
.presale-message.is-other > p { margin-right: auto; margin-left: 0; }
.presale-message .chat-reply-reference { width: min(100%, 320px); box-sizing: border-box; margin: 0 0 5px; }
.presale-message .chat-reply-reference p { width: auto; padding: 0 !important; margin: 2px 0 0 !important; color: #7e6a42 !important; background: transparent !important; border: 0 !important; font-size: 9px !important; line-height: 1.4 !important; }
#presaleMessageForm .chat-reply-preview button { min-width: 24px; min-height: 24px; padding: 0; color: #8b6b2d; background: transparent; font-size: 18px; }

@media (max-width: 620px) {
  .presale-modal .presale-message > p { padding: 10px 13px; font-size: 15px; line-height: 1.45; }
}

/* Keep consultation presence and the message-center presence visually light. */
.chat-presence,
.chat-presence.header,
.presale-presence,
.support-viewer {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Final conversation viewport rules: both entry points use the same surface. */
.modal.message-detail-modal,
.modal.presale-modal {
  width: min(900px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}
.message-detail-modal #modalContent,
.presale-modal #modalContent,
.message-detail-modal .support-shell,
.presale-modal .presale-chat {
  height: 100%;
  min-height: 0;
}
.message-detail-modal .support-shell,
.presale-modal .presale-chat {
  display: flex;
  flex-direction: column;
}
.message-detail-modal .chat-log,
.presale-modal .presale-log {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.presale-chat-head > .presale-shop-name,
.chat-presence,
.chat-presence.header,
.presale-presence,
.support-viewer {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 620px) {
  .modal.message-detail-modal,
  .modal.presale-modal {
    height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 68px - env(safe-area-inset-bottom));
  }
  .message-detail-modal .support-shell {
    display: flex;
    flex-direction: column;
  }
  .presale-modal .presale-chat {
    display: flex;
    flex-direction: column;
  }
}
