/* 屋苑成交（estate.html）—— 版面數值逐格對 app
   app/src/main/res/layout/activity_estate_deals.xml、item_estate_deal.xml、item_estate_card.xml、
   dialog_district_filter.xml；顏色對 app/src/main/res/values/colors.xml。
   1dp = 1px（同 css/tokens.css 一樣假設）。 */

.est-wrap {
  max-width: 411px;          /* 同 .app 一樣模擬手機闊度 */
  margin: 0 auto;
  min-height: 100vh;
  background: #F5F6F7;       /* activity_estate_deals.xml root background */
  position: relative;
  padding-bottom: 0;
}

/* [hidden] 屬性要壓得過下面自訂 display:flex */
.est-wrap [hidden],
.est-sheet[hidden],
.est-toast[hidden] { display: none !important; }

/* ---------- 固定頂部（app：header / tabBar / searchCard / hsvFilters 都喺 RecyclerView 之外）---------- */
.est-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #FFFFFF;
}
.est-header { margin: 0; }

/* ---------- 買樓／租樓 tab（tabBar 45dp、白底；text 16sp；indicator 60×3dp #FF8000）---------- */
.est-tabs {
  display: flex;
  height: 45px;
  background: #FFFFFF;
}
.est-tab {
  flex: 1 1 0;
  position: relative;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 16px;           /* tvTabBuy / tvTabRent 16sp */
  color: #000000;
  cursor: pointer;
  padding: 0;
}
.est-tab[aria-selected="true"] {
  color: #FF8000;            /* red / brand_orange */
  font-weight: 700;
}
.est-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 60px;
  height: 3px;
  background: #FF8000;
}
.est-divider {
  height: 1px;
  background: #E5E5E5;       /* tabDivider */
}

/* ---------- 搜尋列（searchCard 44dp、圓角 8dp、elevation 2dp；btnReset 36dp）---------- */
.est-search-row {
  display: flex;
  align-items: center;
  gap: 8px;                  /* btnReset layout_marginStart 8dp */
  margin-top: 12px;          /* searchCard layout_marginTop 12dp */
  padding: 0 16px;           /* marginStart 16dp / marginEnd 16dp */
  background: #F5F6F7;       /* card 底下係 root #F5F6F7 */
}
.est-search-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .12);
}
.est-search-ico {
  width: 18px;
  height: 18px;
  flex: none;
  color: #666666;            /* tint nav_gray */
}
.est-search-input {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;           /* etSearch 14sp */
  color: #000000;
  outline: none;
  padding: 0;
}
.est-search-input::placeholder { color: #999999; }
.est-search-input::-webkit-search-cancel-button,
.est-search-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.est-search-clear {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-right: -2px;
  border: 0;
  background: none;
  color: #666666;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.est-search-clear svg { width: 18px; height: 18px; display: block; }

.est-reset {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;        /* bg_phrase_unselected */
  background: #F5F5F5;
  color: #9E9E9E;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.est-reset.on {
  background: #333333;
  color: #FFFFFF;
}

/* ---------- 篩選 chip（hsvFilters 45dp 白底；chip 36dp、4dp 圓角、1dp #E5E5E5、12sp）---------- */
.est-filters {
  display: flex;
  align-items: center;
  gap: 8px;                  /* layout_marginEnd 8dp */
  height: 45px;
  margin-top: 8px;
  padding: 0 12px;
  background: #FFFFFF;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.est-filters::-webkit-scrollbar { display: none; }

.est-chip {
  flex: none;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #E5E5E5;
  border-radius: 4px;
  background: #FFFFFF;
  color: #333333;            /* updateFilterButtonsUi：未選 = #333333 */
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.est-chip.on {
  color: #FF8000;            /* 選中 = #FF8000 字、#FFF3F3 底 */
  background: #FFF3F3;
}
.est-chip-estate {
  color: #FF8000;
  font-weight: 700;
  max-width: 200px;          /* chipEstate maxWidth 200dp */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-note {
  margin: 10px 12px 0;
  font-size: 12px;
  color: #666666;
  line-height: 1.5;
}

/* ---------- 進度 / 清單 ---------- */
.est-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}
.est-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #E5E5E5;
  border-top-color: #0056B3;   /* logo_blue */
  border-radius: 50%;
  animation: est-spin .8s linear infinite;
}
@keyframes est-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .est-spinner { animation-duration: 2.4s; }
}

.est-list {
  padding: 12px;             /* rvDeals padding 12dp */
  min-height: 30vh;
}

/* ---------- 成交卡（item_estate_deal.xml：白卡 8dp 圓角、elevation 1dp、padding 12dp、marginBottom 8dp）---------- */
.est-deal {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 12px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
}
.est-deal-main { flex: 1 1 0; min-width: 0; }
.est-deal-addr {
  font-size: 16px;           /* tvAddress 16sp bold */
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* maxLines 2 + ellipsize end */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.est-deal-meta {
  margin-top: 4px;
  font-size: 12px;           /* tvMeta 12sp nav_gray */
  color: #666666;
}
.est-deal-side {
  flex: none;
  margin-left: 8px;
  text-align: right;
}
.est-deal-date {
  font-size: 12px;
  color: #666666;
}
.est-deal-price {
  margin-top: 4px;
  font-size: 16px;           /* tvPrice 16sp bold red(#FF8000) */
  font-weight: 700;
  color: #FF8000;
  white-space: nowrap;
}
.est-deal-unit {
  margin-top: 4px;
  font-size: 12px;
  color: #666666;
  white-space: nowrap;
}
/* 資料來源說明（清單底部）：同 app 一樣，市場資訊要寫明唔係官方紀錄 */
.est-srcnote {
  margin: 14px 16px 20px;
  font-size: 12px;
  line-height: 1.5;
  color: #8A94A0;
}
.est-srcnote strong { color: #5A6572; font-weight: 600; }

/* ---------- 屋苑列（item_estate_card.xml）---------- */
.est-estate {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  background: #FFFFFF;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.est-estate-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.est-estate-name {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 英文名（「愉景新城 (Discovery Park)」）—— 同放盤建議清單一樣普通字重 */
.est-estate-en {
  font-weight: 400;
  white-space: nowrap;
}
.est-estate-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #666666;
}
.est-estate-side {
  flex: none;
  display: flex;
  align-items: center;
  margin-left: 8px;
  color: #666666;
  font-size: 12px;
}
.est-estate-newest { white-space: nowrap; }
.est-chevron {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  flex: none;
}

/* ---------- 空狀態（llEmptyState：64dp 圖 + 14sp 灰字 marginTop 12dp）---------- */
.est-empty {
  padding: 48px 16px;
  text-align: center;
  color: #666666;
}
.est-empty-ico {
  width: 64px;
  height: 64px;
  color: #666666;            /* tint nav_gray */
}
.est-empty-msg {
  margin-top: 12px;
  font-size: 14px;
  color: #666666;
}

/* ---------- 底部（llFooter 52dp 白底、置中）---------- */
.est-footer {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  background: #FFFFFF;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, .08);
}
.est-more {
  height: 38px;              /* btnLoadMore 38dp */
  padding: 0 20px;
  border: 1px solid #E5E5E5;
  border-radius: 4px;
  background: #FFFFFF;
  color: #FF8000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.est-loaded {
  font-size: 12px;           /* tvLoadedAll 12sp nav_gray */
  color: #666666;
}

/* ---------- 篩選面板：地區三欄（dialog_district_filter.xml，欄闊 0.85 / 0.95 / 1.2）---------- */
.est-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.est-sheet-veil {
  position: absolute;
  inset: 0;
  background: transparent;   /* app clearFlags(FLAG_DIM_BEHIND) → 唔調暗 */
}
.est-sheet-panel {
  position: absolute;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.est-sheet-title {
  padding: 18px 16px 10px;
  font-size: 16px;
  font-weight: 700;
  color: #111111;
}
.est-dd-cols {
  display: flex;
  height: 360px;             /* 三欄區 360dp */
}
.est-dd-col {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.est-dd-col[data-col="region"] { flex: 0.85; }
.est-dd-col[data-col="group"] { flex: 0.95; }
.est-dd-col[data-col="district"] { flex: 1.2; }
.est-dd-sep {
  width: 1px;
  background: #E5E5E5;
  flex: none;
}
.est-dd-row {
  display: block;
  width: 100%;
  min-height: 38px;          /* TextListAdapter minHeight 38dp */
  padding: 0 6px 0 10px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;           /* 13sp */
  color: #333333;
  text-align: left;
  cursor: pointer;
}
.est-dd-row.on {
  color: #FF8000;
  background: #FFF3F3;
}
.est-dd-bar {
  display: flex;
  height: 52px;              /* 底部按鈕列 52dp */
  border-top: 1px solid #E5E5E5;
}
.est-dd-clear,
.est-dd-ok {
  flex: 1 1 0;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
.est-dd-clear { background: #F5F6F7; color: #111111; }
.est-dd-ok { background: #FF8000; color: #FFFFFF; font-weight: 700; }

/* ---------- 單選面板（價格／面積／排序：app AlertDialog setSingleChoiceItems）---------- */
.est-choice {
  padding-bottom: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.est-choice-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 16px;
  color: #333333;
  text-align: left;
  cursor: pointer;
}
.est-choice-row.on {
  color: #FF8000;
  background: #FFF3F3;
  font-weight: 700;
}

/* ---------- toast（app Toast：短暫、唔阻擋）---------- */
.est-toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: 84vw;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .78);
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.4;
}

/* ==========================================================================
   桌面寬版（≥961px，2026-11-22 Alan「用盡屏幕、唔好置中」規則）
   手機 ≤960px 完全唔變：欄頭 .est-head 同推廣位 .est-ad 預設 display:none。
   版面：上方工具列（app header／買租 tab／搜尋／篩選）＋左邊成交清單（欄頭對齊）＋右邊 300px 推廣位。
   ========================================================================== */
.est-head,
.est-ad { display: none; }

@media (min-width: 961px) {
  .est-wrap {
    --est-cols: 108px minmax(0, 1fr) 200px 150px 130px;
    max-width: none;
    margin: 0;
    padding: 0 28px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 24px;
    grid-template-areas:
      "top top"
      "note note"
      "progress progress"
      "head aside"
      "list aside"
      "empty aside"
      "footer aside";
    align-content: start;
  }

  /* ---- 工具列 ---- */
  .est-top {
    grid-area: top;
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(260px, 560px) 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px 0 10px;
    background: #F5F6F7;
  }
  .est-header {
    grid-column: 1 / -1;
    border-radius: 10px;
    overflow: hidden;
  }
  .est-tabs {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: 44px;
    padding: 3px;
    border: 1px solid #E5E5E5;
    border-radius: 999px;
    background: #FFFFFF;
    display: inline-flex;
    flex: none;
  }
  .est-tab {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14px;
  }
  .est-tab[aria-selected="true"] { background: #FFF3F3; }
  .est-tab[aria-selected="true"]::after { display: none; }
  .est-divider { display: none; }

  .est-search-row {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  .est-search-card {
    border: 1px solid #E5E5E5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  }
  .est-filters {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    overflow: visible;
    flex-wrap: wrap;
  }

  .est-note { grid-area: note; margin: 10px 0 0; }
  .est-progress { grid-area: progress; }
  .est-empty { grid-area: empty; }

  /* ---- 欄頭 ＋ 對齊列 ---- */
  .est-head {
    grid-area: head;
    display: grid;
    grid-template-columns: var(--est-cols);
    gap: 0 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E5E5;
    font-size: 12px;
    font-weight: 700;
    color: #8A94A0;
  }
  .est-head span:nth-child(4),
  .est-head span:nth-child(5) { text-align: right; }

  .est-list {
    grid-area: list;
    padding: 0;
    min-height: 45vh;
  }
  .est-deal {
    display: grid;
    grid-template-columns: var(--est-cols);
    gap: 0 16px;
    align-items: center;
    margin: 0;
    padding: 13px 16px;
    background: transparent;
    border-bottom: 1px solid #F0F2F4;
    border-radius: 0;
    box-shadow: none;
  }
  .est-deal:hover { background: #FAFBFD; }
  .est-deal-main,
  .est-deal-side { display: contents; }        /* 拆開：地址／日期／價錢各自入欄 */
  /* ⚠️ 一定要寫死 grid-column：日期／面積／呎價經常有空值，靠 order＋auto 會令後面嘅欄左移 */
  .est-deal-date { grid-column: 1; grid-row: 1; margin: 0; font-size: 13px; }
  .est-deal-addr {
    grid-column: 2;
    grid-row: 1;
    font-size: 15px;
    -webkit-line-clamp: 1;
  }
  .est-deal-meta { grid-column: 3; grid-row: 1; margin: 0; font-size: 13px; }
  .est-deal-price { grid-column: 4; grid-row: 1; margin: 0; text-align: right; font-size: 17px; }
  .est-deal-unit { grid-column: 5; grid-row: 1; margin: 0; text-align: right; font-size: 13px; }

  /* 屋苑列（搵屋苑時出）—— 桌面用同一個節奏，唔好拉到成行散開 */
  .est-estate {
    max-width: 720px;
    margin-bottom: 6px;
    padding: 14px 16px;
    border: 1px solid #EDF0F3;
  }

  .est-footer {
    grid-area: footer;
    position: static;
    height: auto;
    justify-content: flex-start;
    padding: 16px 0 0;
    background: transparent;
    border-top: 1px solid #E5E5E5;
    box-shadow: none;
  }

  /* ---- 右邊推廣位 ---- */
  .est-ad {
    grid-area: aside;
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
  }
  .est-ad-card {
    padding: 14px 16px 8px;
    background: #FFFFFF;
    border: 1px solid #E3E7EC;
    border-radius: 14px;
  }
  .est-ad-label {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: .5px;
    color: #9AA4B0;
  }
  .est-ad-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F1F4F8;
    text-decoration: none;
  }
  .est-ad-card .est-ad-row:last-child { border-bottom: 0; }
  .est-ad-ico {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #FFF3E6;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .est-ad-ico img { width: 20px; height: 20px; object-fit: contain; }
  .est-ad-txt { display: flex; flex-direction: column; min-width: 0; }
  .est-ad-txt b { font-size: 13.5px; font-weight: 700; color: #1A2E4C; }
  .est-ad-txt span {
    font-size: 11.5px;
    color: #8B95A1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .est-ad-go { margin-left: auto; color: #B6BEC8; font-size: 16px; line-height: 1; }
  .est-ad-row:hover .est-ad-txt b { color: #FF8000; }

  .est-ad-cta {
    display: block;
    margin-top: 14px;
    padding: 16px;
    border-radius: 14px;
    background: #FF8000;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 128, 0, .28);
  }
  .est-ad-cta b { display: block; font-size: 16px; font-weight: 800; color: #111; }
  .est-ad-cta span { display: block; margin-top: 4px; font-size: 12.5px; color: #3D2A12; }
  .est-ad-cta-go { margin-top: 10px; font-size: 13px; font-weight: 800; }
}

/* 961–1279：篩選 chips 移去第三行，右欄收窄，欄闊跟住收 */
@media (min-width: 961px) and (max-width: 1279px) {
  .est-wrap {
    --est-cols: 96px minmax(0, 1fr) 150px 132px 110px;
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .est-top { grid-template-columns: auto minmax(0, 1fr); }
  .est-filters {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    margin-top: 2px;
  }
}

/* 屋苑成交「市場行情」（2026-11-26 Alan：同工商舖一致） */
.est-em { background:#fff; border:1px solid #EEE; border-radius:10px; padding:12px; margin:0 0 10px; }
.est-em-h { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:8px; }
.est-em-h span:first-child { font-size:13px; font-weight:700; color:#111; }
.est-em-win { font-size:10px; color:#999; }
.est-em-grid { display:flex; gap:8px; }
.est-em-cell { flex:1 1 0; min-width:0; }
.est-em-l { font-size:10px; color:#888; }
.est-em-v { font-size:14px; font-weight:700; color:#111; margin-top:3px; white-space:nowrap; }
.est-em-f { font-size:9.5px; color:#999; margin-top:2px; }
.est-em-tabs { display:flex; gap:8px; margin:10px 0 4px; }
.est-em-tab { font:inherit; font-size:11px; color:#666; background:#fff; border:1px solid #DDD;
  border-radius:14px; padding:4px 12px; cursor:pointer; }
.est-em-tab.on { color:#C25E00; background:#FFF3E6; border-color:#FF8000; font-weight:700; }
.est-em-chart { margin-top:6px; }
.est-em-svg { display:block; width:100%; height:130px; }
.est-em-note { font-size:9.5px; color:#999; margin-top:2px; }
.est-em-years { display:flex; gap:6px; margin:2px 0 4px; }
.est-em-year { font:inherit; font-size:10px; color:#888; background:#fff; border:1px solid #DDD; border-radius:10px; padding:3px 9px; cursor:pointer; }
.est-em-year.on { color:#C25E00; background:#FFF3E6; border-color:#FF8000; font-weight:700; }
.est-em-empty { font-size:11px; color:#999; padding:8px 0; }

/* 估算回報公式 ⓘ（2026-11-27 Alan） */
.est-em-info { font: inherit; font-size: 11px; color: #999; background: none; border: 0; padding: 0 2px; cursor: pointer; }

/* ---------- 成交詳情面板（app EstateHistoryDialog／iOS EstateHistorySheet 網站版）----------
   Alan 2026-11-27：「why cannot click for further detail?」→ 三平台要有同一個詳情頁。
   版式跟 app dialog_commercial_detail.xml：統計三個數 → 市場行情 → 出售／出租 tab → 成交表。 */
.est-detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #F5F6F7;
  /* 2026-11-27 Alan：「pop up page is not movable」→ 捲動容器搬上整個面板：
     舊寫法只有 .est-detail-body 可以捲，滑輪喺左右兩邊 dim 位就會捲到底下嗰頁（面板一動不動）。 */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.est-detail[hidden] { display: none !important; }
.est-dt-header {
  flex: none; margin: 0;
  position: sticky; top: 0; z-index: 3;   /* 返回掣一路見到 */
}
.est-detail-body {
  flex: 1 0 auto;
  min-height: 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
body.est-dt-open { overflow: hidden; }     /* 面板開住時，底下嗰頁唔准捲 */
.est-dt-main { padding: 12px; }
.est-dt-head h2 {
  margin: 2px 2px 2px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}
.est-dt-sub { margin: 0 2px 10px; font-size: 12px; color: #8A94A0; }

.est-dt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 8px;
  margin-bottom: 10px;
  background: #FFFFFF;
  border: 1px solid #EEE;
  border-radius: 10px;
}
.est-dt-stats > div { text-align: center; min-width: 0; }
.est-dt-stats b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.est-dt-stats span { font-size: 10px; color: #8A94A0; }

.est-dt-tabs { display: flex; gap: 8px; margin: 4px 0 8px; }
.est-dt-tab {
  font: inherit;
  font-size: 12px;
  color: #666;
  background: #FFFFFF;
  border: 1px solid #DDD;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
}
.est-dt-tab.on { color: #C25E00; background: #FFF3E6; border-color: #FF8000; font-weight: 700; }

.est-dt-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border: 1px solid #EEE;
  border-radius: 10px;
  overflow: hidden;
  font-size: 12px;
}
.est-dt-table th {
  padding: 8px 6px;
  background: #FAFBFC;
  border-bottom: 1px solid #EEE;
  font-size: 10.5px;
  font-weight: 700;
  color: #8A94A0;
  text-align: left;
  white-space: nowrap;
}
.est-dt-table td {
  padding: 9px 6px;
  border-bottom: 1px solid #F4F5F7;
  color: #333;
  vertical-align: top;
}
.est-dt-table tr.on td { background: #FFF6EC; }
.est-dt-table td:nth-child(3),
.est-dt-table td:nth-child(5),
.est-dt-table th:nth-child(3),
.est-dt-table th:nth-child(5) { text-align: right; white-space: nowrap; }
.est-dt-amt { color: #FF8000; font-weight: 700; white-space: nowrap; }
.est-dt-note { margin: 10px 2px 0; font-size: 11px; line-height: 1.5; color: #8A94A0; }
.est-dt-empty { padding: 16px 12px; font-size: 12px; color: #8A94A0; background: #FFFFFF;
  border: 1px solid #EEE; border-radius: 10px; }
.est-dt-loading { padding: 28px 12px; text-align: center; font-size: 13px; color: #8A94A0; }

/* 成交卡可撳（詳情）：hover／focus 要有反應，否則冇人知撳得 */
.est-deal { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .12s ease; }
.est-deal:active { background: #F3F6FA; }
.est-deal:focus-visible { outline: 2px solid #0056B3; outline-offset: -2px; }
.est-deal-unit.is-na { color: #B0B6C0; }

@media (min-width: 961px) {
  .est-detail { background: rgba(17, 24, 39, .45); padding: 24px 0; }
  .est-detail-body {
    max-width: 860px;
    width: 100%;
    margin: 0 auto 24px;
    background: #F5F6F7;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
    padding-bottom: 8px;
  }
  .est-dt-header {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, .18);
  }
  .est-deal { cursor: pointer; }
}

/* ⓘ 貼喺「估算回報」數字後面同一行（2026-11-27 Alan 多次要求） */
.est-em-v { white-space: nowrap; }
.est-em-v .est-em-info {
  display: inline-block; margin-left: 3px; padding: 0 1px;
  background: none; border: 0; color: #999; font-size: 11px;
  line-height: 1; vertical-align: 1px; cursor: pointer;
}
.cm-mkt-v .cm-info {
  margin-left: 3px; padding: 0 1px; border: 0; background: none;
  color: #999; font-size: 11px; vertical-align: 1px; cursor: pointer;
}
