/* 機器人介紹頁：大型 3D 檢視是主角，其餘資訊安靜排列 */
.rb-hero { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* 機器人切換：固定在頁首下方，捲到任何區塊都能切換對照 */
.rb-tabbar {
  position: sticky; top: var(--head-h); z-index: 20; padding: 36px 28px 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: padding .3s var(--ease), box-shadow .3s var(--ease);
}
.rb-tabbar.stuck { padding-top: 0; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(20,36,48,.05); }
.rb-tabs { display: flex; gap: 8px; max-width: 1184px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.rb-tabbar.stuck .rb-tabs { border-bottom-color: transparent; }
.rb-tabbar.stuck .rb-tabs button { padding-top: 10px; padding-bottom: 11px; }
.rb-tabbar.stuck .rb-tabs button b { font-size: 18px; }
.rb-tabs button b, .rb-tabs button { transition: color .25s var(--ease), padding .3s var(--ease), font-size .3s var(--ease); }
/* 換機器人時，目前所在的區塊輕輕閃一下，提示內容已更新 */
[data-anchor].flash { animation: rb-flash .9s var(--ease); }
@keyframes rb-flash { 0% { opacity: .35; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
[data-anchor] { scroll-margin-top: calc(var(--head-h) + 72px); }
.rb-tabs button {
  position: relative; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; text-align: left;
  padding: 14px 22px 16px 4px; margin-right: 24px; color: var(--muted); transition: color .25s var(--ease);
}
.rb-tabs button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); align-self: center; opacity: .45; transition: opacity .25s; }
.rb-tabs button b { font: 400 22px/1.2 var(--en); letter-spacing: -.01em; }
.rb-tabs button span { grid-column: 2; font-size: 13px; }
.rb-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--c);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.rb-tabs button:hover { color: var(--ink-2); }
.rb-tabs button[aria-selected="true"] { color: var(--ink); }
.rb-tabs button[aria-selected="true"] i { opacity: 1; }
.rb-tabs button[aria-selected="true"]::after { transform: scaleX(1); }

.rb-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; margin-top: 32px; align-items: start; }

/* 3D 檢視 */
.rb-stage {
  position: relative; height: min(70vh, 660px); min-height: 460px; border-radius: 24px; overflow: hidden; cursor: grab;
  background: radial-gradient(90% 70% at 50% 35%, #FFFFFF 0%, #EEF2F5 65%, #E6EBEF 100%);
}
.rb-stage:active { cursor: grabbing; }
.rb-stage > canvas { position: absolute; inset: 0; display: block; }
.rb-stage > canvas, .rb-stage .label-layer { transition: opacity .3s var(--ease); }
.rb-stage.fading > canvas, .rb-stage.fading .label-layer { opacity: 0; transition-duration: .18s; }
.rb-stage .label-layer { position: absolute; inset: 0; pointer-events: none; }
.rb-variants {
  position: absolute; left: 20px; bottom: 20px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 4px 4px 4px 12px; border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 1px 3px rgba(20,36,48,.08);
}
.rb-variants span { font-size: 12px; color: var(--muted); margin-right: 6px; }
.rb-variants button { font-size: 13px; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); transition: background .25s var(--ease), color .25s; }
.rb-variants button:hover { color: var(--ink); }
.rb-variants button.on { background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 80%, black); font-weight: 500; }
.rb-hint { position: absolute; right: 20px; bottom: 24px; margin: 0; z-index: 3; font-size: 12px; color: var(--muted); pointer-events: none; }

/* 模型上的熱點 */
.hs { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 8px; padding: 0; }
/* 注意：不可對 .hs 本身做 transform 動畫（3D 標籤靠它定位） */
.hs-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; flex: none;
  box-shadow: 0 0 0 2px var(--brand-deep), 0 2px 8px rgba(20,36,48,.25);
  display: grid; place-items: center; transition: transform .25s var(--ease), background .25s;
  animation: hsIn .45s var(--d, 0ms) var(--ease) both;
}
.hs-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-deep); transition: background .25s; }
.hs-label {
  font-family: var(--en); font-size: 12.5px; white-space: nowrap; color: var(--ink); padding: 4px 10px; border-radius: 8px;
  background: rgba(255,255,255,.96); box-shadow: 0 2px 8px rgba(20,36,48,.12);
  opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.hs:hover .hs-dot, .hs:focus-visible .hs-dot { transform: scale(1.15); }
.hs:hover .hs-label, .hs:focus-visible .hs-label, .hs.on .hs-label { opacity: 1; transform: none; }
.hs.on .hs-dot { background: var(--brand-deep); }
.hs.on .hs-dot::after { background: #fff; }
@keyframes hsIn { from { opacity: 0; transform: scale(.4); } }

/* 右側資訊 */
.rb-info { padding-top: 20px; }
.rb-info.enter > * { animation: rise .45s var(--ease) both; }
.rb-info.enter > *:nth-child(2) { animation-delay: .04s; }
.rb-info.enter > *:nth-child(3) { animation-delay: .08s; }
.rb-info.enter > *:nth-child(n+4) { animation-delay: .12s; }
.rb-name { margin: 0; font: 300 64px/1 var(--en); letter-spacing: -.03em; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.rb-name span { font-size: 22px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.rb-role { margin: 14px 0 0; font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--c) 85%, black); }
.rb-tagline { margin: 18px 0 20px; font-size: 16px; line-height: 1.9; color: var(--ink-2); max-width: 30em; }
.rb-info .floor-list { flex-wrap: wrap; margin-bottom: 28px; }
.rb-detail { min-height: 150px; margin-bottom: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.rb-detail.enter > * { animation: rise .35s var(--ease) both; }
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.hs-list button {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 8px 10px; margin-left: -10px; border-radius: 8px;
  transition: background .2s, color .2s;
}
.hs-list button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--brand-deep); flex: none; }
.hs-list button:hover { background: var(--paper); color: var(--brand-deep); }
.hs-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.hs-card { position: relative; padding: 18px 20px 18px 22px; border-radius: 14px; background: var(--surface); box-shadow: inset 3px 0 0 var(--brand-deep), 0 1px 2px rgba(20,36,48,.05); }
.hs-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.hs-card p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.hs-close { margin-top: 12px; font-size: 13px; color: var(--muted); }
.hs-close:hover { color: var(--brand-deep); }

/* 下方段落 */
.rb-section { max-width: 1160px; margin: 0 auto; padding: 128px 28px 0; }
.rb-section > h2, .rb-two h2 { margin: 0 0 32px; font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; }
.rb-scs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rb-scs.enter > * { animation: rise .4s var(--ease) both; }
.rb-sc {
  display: flex; gap: 20px; align-items: flex-start; padding: 20px 22px; border-radius: 16px; background: var(--surface);
  text-decoration: none; box-shadow: 0 1px 2px rgba(20,36,48,.04); transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.rb-sc:hover { box-shadow: 0 8px 24px rgba(20,36,48,.08); transform: translateY(-2px); }
.rb-sc-floor { font: 300 34px/1 var(--en); color: var(--c); min-width: 52px; letter-spacing: -.02em; }
.rb-sc-body { display: flex; flex-direction: column; gap: 3px; }
.rb-sc-body b { font-size: 15.5px; font-weight: 500; }
.rb-sc-body span { font-size: 13px; color: var(--ink-2); }
.rb-sc-body small { font-size: 12px; color: var(--muted); }

.rb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.rb-int { margin: 0; }
.rb-int div { padding: 16px 0; border-top: 1px solid var(--line); }
.rb-int dt { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.rb-int dd { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.rb-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.rb-specs th, .rb-specs td { padding: 14px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.rb-specs th { font-weight: 400; color: var(--muted); width: 46%; padding-right: 16px; }
.rb-specs td { font-family: var(--en); color: var(--ink); }
.rb-specs td.pending { color: #A4B0B9; }

.rb-compare-wrap { overflow-x: auto; }
.rb-compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.rb-compare th, .rb-compare td { text-align: left; vertical-align: top; padding: 16px 18px; border-top: 1px solid var(--line); transition: background .35s var(--ease); }
.rb-compare thead th, .rb-compare thead td { border-top: 0; padding-top: 6px; }
.rb-compare tbody th { font-weight: 400; color: var(--muted); width: 16%; padding-left: 0; }
.rb-compare thead button { display: flex; align-items: center; gap: 8px; font: 400 18px var(--en); color: var(--ink-2); }
.rb-compare thead button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.rb-compare thead button:hover { color: var(--ink); }
.rb-compare .cur { background: color-mix(in srgb, var(--wash) 70%, white); }
.rb-compare thead .cur { border-radius: 12px 12px 0 0; }
.rb-compare thead .cur button { color: var(--ink); font-weight: 500; }
.rb-compare td { color: var(--ink-2); line-height: 1.7; }
.rb-compare td.cur { color: var(--ink); }

.page-robots .final { margin-top: 128px; }

@media (max-width: 1024px) {
  .rb-grid { grid-template-columns: 1fr; gap: 24px; }
  .rb-stage { height: 62vh; min-height: 380px; }
  .rb-two { grid-template-columns: 1fr; gap: 64px; }
}
@media (max-width: 640px) {
  .rb-hero { padding: 20px 16px 0; }
  .rb-tabbar { padding-left: 16px; padding-right: 16px; }
  .rb-tabs { overflow-x: auto; scrollbar-width: none; }
  .rb-tabs button { margin-right: 4px; padding-right: 12px; }
  .rb-tabs button span { display: none; }
  .rb-name { font-size: 48px; }
  .rb-hint { display: none; }
  .rb-section { padding: 96px 16px 0; }
  .hs-list { grid-template-columns: 1fr; }
}

/* Dali 抽屜配置說明 */
.rb-vnote { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, white); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.rb-vnote b { display: block; margin-bottom: 2px; font-weight: 500; color: color-mix(in srgb, var(--c) 80%, black); }

/* Angus 機型切換（A／B） */
.rb-variants .rb-vsep { width: 1px; height: 18px; margin: 0 6px; background: var(--line, #DCE3E8); }
.rb-variants button:disabled { color: var(--muted); opacity: .6; cursor: not-allowed; }
.rb-variants button small { margin-left: 4px; font-size: 11px; }

/* ---------- 可點擊元素區隔：選配籤片加框線 ---------- */
.rb-variants button { box-shadow: inset 0 0 0 1px var(--hit-line); background: var(--surface); margin: 2px; }
.rb-variants button:hover { box-shadow: inset 0 0 0 1px var(--hit-hover); }
.rb-variants button.on { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, white); }
.rb-variants button:disabled { box-shadow: inset 0 0 0 1px var(--line); background: transparent; }
.rb-compare thead button { padding: 6px 12px 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hit-line); background: var(--surface); }
.rb-compare thead button:hover { box-shadow: inset 0 0 0 1px var(--hit-hover); }
.rb-tabs button { border-radius: 10px 10px 0 0; transition: background .2s, color .25s var(--ease), padding .3s var(--ease); }
.rb-tabs button:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }

/* ---------- 入場：整頁淡入（與導入規劃頁的開場節奏一致，不做個別元素動畫） ---------- */
.page-robots main { animation: rbPageIn .9s var(--ease) both; }
@keyframes rbPageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-robots main { animation: none; } }

/* 機型重點：四點，兩欄排列，前方綠色打勾 */
.rb-points { list-style: none; margin: -6px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; max-width: 34em; }
.rb-points li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.rb-points li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 640px) { .rb-points { grid-template-columns: 1fr; } }

/* ============================================================
   手機版調整
   ============================================================ */
/* 3D 機型：上下滑動捲動頁面，左右拖曳才旋轉 */
@media (max-width: 860px) {
  .rb-stage > canvas { touch-action: pan-y !important; }
}
/* 比較表：第一欄（項目名稱）固定在左側，機器人欄縮窄，橫向滑動時仍看得到在比什麼 */
@media (max-width: 640px) {
  .rb-compare { width: auto; min-width: 0; }
  .rb-compare th, .rb-compare td { padding: 14px 12px; }
  .rb-compare td, .rb-compare thead th { width: 190px; min-width: 190px; }
  .rb-compare tr > :first-child { position: sticky; left: 0; z-index: 1; width: 76px; min-width: 76px; padding-left: 0; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
  /* 機器人分頁籤：三等分，名稱下方顯示方案名稱 */
  .rb-tabs { overflow: visible; gap: 0; }
  .rb-tabs button { flex: 1 1 0; min-width: 0; margin: 0; padding: 10px 6px 12px 2px; column-gap: 7px; }
  .rb-tabs button b { font-size: 18px; }
  .rb-tabs button span { display: block; font-size: 12px; line-height: 1.35; }
  .rb-tabbar.stuck .rb-tabs button { padding-top: 8px; padding-bottom: 9px; }
  .rb-tabbar.stuck .rb-tabs button b { font-size: 17px; }
  /* Angus 機型（A／B）與搭載分兩行：分隔線改成換行 */
  .rb-variants { left: 12px; bottom: 12px; max-width: calc(100% - 24px); row-gap: 2px; }
  .rb-variants .rb-vsep { flex-basis: 100%; height: 0; margin: 0; background: none; }
  .rb-variants span { min-width: 2.5em; }
}

/* 按鈕統一為圓角矩形 */
.rb-compare thead button, .rb-variants button { border-radius: var(--btn-r); }
