/* Merchant-backend integration: one shared mode switch across every shell. */
.product-switch.experience-switch {
  display:flex;
  align-items:center;
  justify-self:center;
  gap:2px;
  padding:3px;
  border:1px solid var(--yb-line,#dce4f0);
  border-radius:100px;
  color:var(--yb-muted,#64748b);
  background:var(--yb-panel-soft,#f8faff);
}
.experience-switch { position:relative; }
.experience-switch::before {
  position:absolute;
  top:50%;
  left:50%;
  width:1px;
  height:18px;
  background:var(--yb-line,#dce4f0);
  content:"";
  pointer-events:none;
  transform:translate(-50%,-50%);
}
.experience-switch a {
  display:grid;
  place-items:center;
  min-width:92px;
  height:30px;
  padding:0 11px;
  border-radius:100px;
  color:var(--yb-muted,#64748b);
  font-size:10px;
  white-space:nowrap;
  transition:color .2s ease,background .2s ease,box-shadow .2s ease;
}
.experience-switch a:hover { color:var(--yb-primary,#2f63f2); }
.experience-switch a.is-active {
  color:var(--yb-primary,#2f63f2);
  background:#fff;
  box-shadow:0 4px 14px rgba(47,99,242,.1);
}
.flow-menu-fallback {
  display:grid;
  place-items:center;
  height:34px;
  padding:0 12px;
  border:1px solid var(--yb-line,#dce4f0);
  border-radius:100px;
  color:var(--yb-muted,#64748b);
  background:var(--yb-panel-soft,#f8faff);
  font-size:9px;
  white-space:nowrap;
}
.flow-menu-fallback:hover { color:var(--yb-primary,#2f63f2); border-color:#b9c9ed; }

/* Product page: keep the familiar product menu one click away from the AI scene. */
.product-entry-switch {
  display:flex;
  align-items:center;
  gap:4px;
  width:max-content;
  margin:18px 0 8px;
  padding:4px;
  border:1px solid var(--yb-line,#dce4f0);
  border-radius:12px;
  background:rgba(255,255,255,.74);
  box-shadow:0 8px 25px rgba(32,62,124,.05);
}
.product-entry-switch a {
  display:flex;
  align-items:center;
  gap:7px;
  height:34px;
  padding:0 12px;
  border-radius:9px;
  color:var(--yb-muted,#64748b);
  font-size:9px;
  font-weight:750;
}
.product-entry-switch a i { font-style:normal; }
.product-entry-switch a.is-active { color:#fff; background:var(--yb-primary,#2f63f2); box-shadow:0 8px 20px rgba(47,99,242,.18); }
.product-channel-switch {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  margin-bottom:13px;
  padding:4px;
  border:1px solid var(--yb-line,#dce4f0);
  border-radius:13px;
  background:#eef3fb;
}
.product-channel-switch button {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:48px;
  padding:8px 11px;
  border:0;
  border-radius:10px;
  color:#718098;
  background:transparent;
  cursor:pointer;
  text-align:left;
}
.product-channel-switch button > i { display:grid; place-items:center; flex:0 0 auto; width:27px; height:27px; border-radius:8px; color:#7081a0; background:rgba(255,255,255,.7); font-style:normal; }
.product-channel-switch button span { display:flex; flex-direction:column; gap:3px; }
.product-channel-switch button strong { color:#50617d; font-size:9px; }
.product-channel-switch button small { color:#8c9ab0; font-size:8px; }
.product-channel-switch button.is-active { background:#fff; box-shadow:0 7px 18px rgba(47,99,242,.09); }
.product-channel-switch button.is-active > i { color:#fff; background:linear-gradient(145deg,var(--yb-primary,#2f63f2),var(--yb-ai,#16c3e0)); box-shadow:0 6px 15px rgba(47,99,242,.18); }
.product-channel-switch button.is-active strong { color:var(--yb-primary,#2f63f2); }
.product-channel-panel { display:none; }
.product-channel-panel.is-active { display:block; }
.product-input-view.is-client-channel > .product-generate,
.product-input-view.is-client-channel > .task-boundary { display:none; }
.product-client-launch { position:relative; min-height:315px; padding:20px; overflow:hidden; border:1px solid #d5e1f5; border-radius:16px; background:radial-gradient(circle at 85% 15%,rgba(22,195,224,.13),transparent 30%),linear-gradient(145deg,#fff,#f2f6ff); }
.product-client-launch.is-active { display:grid; align-content:center; justify-items:center; text-align:center; }
.product-client-launch::before { position:absolute; inset:auto -60px -95px auto; width:230px; height:230px; border:1px solid rgba(47,99,242,.1); border-radius:50%; content:""; }
.client-launch-visual { position:relative; display:grid; place-items:center; width:112px; height:78px; margin-bottom:7px; }
.client-launch-visual::before,.client-launch-visual::after { position:absolute; inset:8px 24px; border:1px solid rgba(47,99,242,.2); border-radius:50%; content:""; animation:client-orbit 4s linear infinite; }
.client-launch-visual::after { inset:0 14px; border-color:rgba(22,195,224,.18); animation-direction:reverse; animation-duration:5.5s; }
.client-launch-visual .one-avatar { z-index:2; width:43px; height:43px; }
.client-launch-visual > div { position:absolute; inset:0; }
.client-launch-visual > div i { position:absolute; width:6px; height:6px; border-radius:50%; background:var(--yb-primary,#2f63f2); box-shadow:0 0 12px rgba(47,99,242,.45); animation:client-node 2.4s ease-in-out infinite; }
.client-launch-visual > div i:nth-child(1) { top:9px; left:17px; }
.client-launch-visual > div i:nth-child(2) { right:10px; bottom:16px; animation-delay:.5s; background:var(--yb-ai,#16c3e0); }
.client-launch-visual > div i:nth-child(3) { bottom:6px; left:32px; animation-delay:1s; background:var(--yb-success,#14a673); }
.product-client-launch > small { position:relative; z-index:1; color:var(--yb-primary,#2f63f2); font-size:8px; font-weight:850; letter-spacing:.14em; }
.product-client-launch h3 { position:relative; z-index:1; margin:8px 0 7px; color:var(--yb-text,#14213d); font-size:23px; letter-spacing:-.04em; }
.product-client-launch p { position:relative; z-index:1; max-width:485px; margin:0; color:#6c7c94; font-size:9px; line-height:1.6; }
.client-full-route { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; gap:6px; margin:14px 0; }
.client-full-route span { padding:6px 8px; border:1px solid #d8e2f2; border-radius:8px; color:#52637d; background:#fff; font-size:8px; font-weight:750; animation:client-route-glow 3.5s ease-in-out infinite; }
.client-full-route span:nth-of-type(2) { animation-delay:.35s; }
.client-full-route span:nth-of-type(3) { animation-delay:.7s; }
.client-full-route span:nth-of-type(4) { animation-delay:1.05s; }
.client-full-route span:nth-of-type(5) { animation-delay:1.4s; }
.client-full-route span:nth-of-type(6) { animation-delay:1.75s; }
.client-full-route span:nth-of-type(7) { animation-delay:2.1s; }
.client-full-route i { color:#90a1ba; font-size:8px; font-style:normal; }
.product-client-launch > button { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; min-width:240px; height:42px; padding:0 15px; border:0; border-radius:100px; color:#fff; background:var(--yb-primary,#2f63f2); box-shadow:0 13px 28px rgba(47,99,242,.2); cursor:pointer; font-size:9px; font-weight:850; }
.product-client-launch > button i { font-style:normal; }
.product-client-launch > em { position:relative; z-index:1; margin-top:9px; color:#91a0b5; font-size:7px; font-style:normal; }
@keyframes client-orbit { to { transform:rotate(360deg); } }
@keyframes client-node { 0%,100% { opacity:.35; transform:scale(.8); } 50% { opacity:1; transform:scale(1.25); } }
@keyframes client-route-glow { 0%,65%,100% { border-color:#d8e2f2; color:#52637d; box-shadow:none; } 20% { border-color:#9db8f4; color:var(--yb-primary,#2f63f2); box-shadow:0 5px 14px rgba(47,99,242,.1); } }

/* Conventional fallback shell. Intentionally calm and familiar. */
.legacy-body { overflow:auto; background:#f5f7fb; }
.legacy-shell { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:calc(100svh - 72px); padding-top:72px; color:var(--yb-text,#14213d); }
.legacy-sidebar {
  position:sticky;
  top:72px;
  align-self:start;
  height:calc(100svh - 72px);
  padding:22px 14px;
  border-right:1px solid var(--yb-line,#dce4f0);
  background:rgba(255,255,255,.92);
}
.legacy-sidebar > small { display:block; padding:0 12px 12px; color:#91a0b5; font-size:8px; font-weight:800; letter-spacing:.15em; }
.legacy-sidebar nav { display:flex; flex-direction:column; gap:4px; }
.legacy-sidebar a { display:flex; align-items:center; gap:11px; min-height:42px; padding:0 12px; border-radius:10px; color:#65758e; font-size:11px; }
.legacy-sidebar a i { display:grid; place-items:center; width:24px; color:#8190a6; font-style:normal; }
.legacy-sidebar a:hover,.legacy-sidebar a.is-active { color:var(--yb-primary,#2f63f2); background:var(--yb-primary-soft,#eaf0ff); }
.legacy-sidebar a.is-active { font-weight:800; }
.legacy-sidebar footer { position:absolute; right:14px; bottom:18px; left:14px; padding:12px; border:1px solid var(--yb-line,#dce4f0); border-radius:12px; color:#728198; background:#f8faff; font-size:8px; line-height:1.6; }
.legacy-main { min-width:0; padding:26px clamp(24px,3vw,46px) 55px; }
.legacy-breadcrumb { display:flex; align-items:center; gap:7px; color:#8998ae; font-size:9px; }
.legacy-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-top:18px; }
.legacy-heading h1 { margin:0; font-size:30px; letter-spacing:-.04em; }
.legacy-heading p { margin:7px 0 0; color:#718098; font-size:10px; }
.legacy-actions { display:flex; gap:8px; }
.legacy-actions a,.legacy-actions button { display:grid; place-items:center; min-width:104px; height:38px; padding:0 12px; border:1px solid var(--yb-line,#dce4f0); border-radius:9px; color:#60708a; background:#fff; font-size:9px; }
.legacy-actions .is-primary { border-color:var(--yb-primary,#2f63f2); color:#fff; background:var(--yb-primary,#2f63f2); }
.legacy-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:22px; }
.legacy-summary article { padding:15px; border:1px solid var(--yb-line,#dce4f0); border-radius:13px; background:#fff; box-shadow:var(--yb-shadow-soft,0 8px 28px rgba(32,62,124,.075)); }
.legacy-summary small { color:#8493aa; font-size:8px; }
.legacy-summary strong { display:block; margin-top:8px; font-size:23px; }
.legacy-summary em { display:block; margin-top:4px; color:#6f8098; font-size:8px; font-style:normal; }
.legacy-ai-bridge { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:13px; margin-top:14px; padding:14px 16px; border:1px solid #cbd8f4; border-radius:14px; background:linear-gradient(110deg,#fff,#f2f6ff); }
.legacy-ai-bridge > i { display:grid; place-items:center; width:39px; height:39px; border-radius:12px; color:#fff; background:linear-gradient(145deg,var(--yb-primary,#2f63f2),var(--yb-ai,#16c3e0)); font-style:normal; }
.legacy-ai-bridge span { display:flex; flex-direction:column; gap:4px; }
.legacy-ai-bridge strong { font-size:12px; }
.legacy-ai-bridge small { color:#6f7f96; font-size:9px; }
.legacy-ai-bridge a { display:grid; place-items:center; min-width:145px; height:38px; border-radius:9px; color:#fff; background:var(--yb-primary,#2f63f2); font-size:9px; font-weight:800; }
.legacy-panel { margin-top:14px; overflow:hidden; border:1px solid var(--yb-line,#dce4f0); border-radius:15px; background:#fff; box-shadow:var(--yb-shadow-soft,0 8px 28px rgba(32,62,124,.075)); }
.legacy-panel__head { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; min-height:58px; padding:0 16px; border-bottom:1px solid var(--yb-line,#dce4f0); }
.legacy-panel__head strong { font-size:12px; }
.legacy-panel__head input { width:210px; height:34px; padding:0 10px; border:1px solid var(--yb-line,#dce4f0); border-radius:8px; color:#61718a; background:#f9fbff; font-size:9px; }
.legacy-filter { height:34px; padding:0 10px; border:1px solid var(--yb-line,#dce4f0); border-radius:8px; color:#61718a; background:#fff; font-size:9px; }
.legacy-table { width:100%; border-collapse:collapse; }
.legacy-table th,.legacy-table td { padding:11px 14px; border-bottom:1px solid #edf1f7; text-align:left; }
.legacy-table th { color:#8b99ad; background:#fbfcff; font-size:8px; font-weight:800; }
.legacy-table td { color:#5e6e86; font-size:9px; }
.legacy-product { display:flex; align-items:center; gap:10px; }
.legacy-product img { width:42px; height:49px; border-radius:8px; object-fit:cover; background:#e8eef4; }
.legacy-product span { display:flex; flex-direction:column; gap:4px; }
.legacy-product strong { color:var(--yb-text,#14213d); font-size:10px; }
.legacy-status { display:inline-flex; align-items:center; gap:5px; padding:5px 7px; border-radius:100px; color:var(--yb-success,#14a673); background:var(--yb-success-soft,#e7f7f1); font-size:8px; }
.legacy-status.is-draft { color:#8a6b4b; background:#fff4e8; }
.legacy-table td:last-child a { color:var(--yb-primary,#2f63f2); }

/* Deep-entry scene catalogue for later placement inside the real backend. */
.scene-hub-body { overflow:auto; }
.scene-hub-main { min-height:100svh; padding:104px clamp(24px,4vw,60px) 70px 104px; }
.scene-hub-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.scene-hub-head small { color:var(--yb-primary,#2f63f2); font-size:9px; font-weight:850; letter-spacing:.15em; }
.scene-hub-head h1 { margin:9px 0 0; font-size:40px; letter-spacing:-.05em; }
.scene-hub-head p { max-width:500px; margin:0; color:#6d7d95; font-size:10px; line-height:1.7; }
.scene-group { margin-top:28px; }
.scene-group > header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.scene-group > header i { display:grid; place-items:center; width:27px; height:27px; border-radius:9px; color:#fff; background:var(--yb-primary,#2f63f2); font-style:normal; }
.scene-group > header strong { font-size:13px; }
.scene-group > header span { color:#8997aa; font-size:9px; }
.scene-entry-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.scene-entry-card { position:relative; display:flex; flex-direction:column; min-height:145px; padding:15px; overflow:hidden; border:1px solid var(--yb-line,#dce4f0); border-radius:15px; color:inherit; background:#fff; box-shadow:var(--yb-shadow-soft,0 8px 28px rgba(32,62,124,.075)); transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease; }
.scene-entry-card:hover { border-color:#b9caf1; box-shadow:0 16px 36px rgba(47,99,242,.11); transform:translateY(-3px); }
.scene-entry-card > i { color:var(--yb-primary,#2f63f2); font-size:8px; font-style:normal; font-weight:850; letter-spacing:.12em; }
.scene-entry-card strong { margin-top:16px; font-size:14px; }
.scene-entry-card p { margin:6px 0 0; color:#73829a; font-size:9px; line-height:1.5; }
.scene-entry-card span { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:12px; color:var(--yb-primary,#2f63f2); font-size:9px; font-weight:800; }
.scene-entry-card.is-external { border-color:#c9daf4; background:linear-gradient(145deg,#fff,#f2f7ff); }
.scene-entry-card.is-external::after { position:absolute; top:-25px; right:-20px; width:90px; height:90px; border-radius:50%; background:rgba(22,195,224,.08); content:""; }
.scene-hub-note { margin-top:25px; padding:14px 16px; border:1px solid #d8e2f1; border-radius:14px; color:#62728b; background:#fff; font-size:9px; line-height:1.7; }
.scene-hub-note strong { color:var(--yb-text,#14213d); }

@media(max-width:1180px){
  .product-switch.experience-switch { display:flex; }
  .experience-switch a { min-width:92px; padding-inline:8px; }
  .scene-entry-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:900px){
  .product-switch.experience-switch {
    position:fixed;
    right:14px;
    bottom:14px;
    z-index:260;
    display:flex;
    border-color:var(--yb-line,#dce4f0);
    background:rgba(245,247,251,.94);
    box-shadow:0 12px 34px rgba(32,62,124,.16);
    backdrop-filter:blur(14px);
  }
  .merchant-topbar .experience-switch + .merchant-topbar__right { position:absolute; right:226px; }
  .merchant-topbar .experience-switch + .merchant-topbar__right .merchant-user { display:none; }
  .legacy-shell { grid-template-columns:1fr; padding-top:66px; }
  .legacy-sidebar { display:none; }
  .legacy-main { padding:24px 16px 90px; }
  .legacy-summary { grid-template-columns:repeat(2,1fr); }
  .scene-hub-main { padding:92px 16px 95px; }
  .scene-hub-head { align-items:flex-start; flex-direction:column; }
  .scene-entry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-entry-switch { margin-top:13px; }
}
@media(max-width:620px){
  .merchant-topbar:has(.experience-switch) .store-switcher { display:none; }
  .legacy-heading { align-items:flex-start; flex-direction:column; }
  .legacy-actions { width:100%; }
  .legacy-actions a,.legacy-actions button { flex:1; }
  .legacy-summary { grid-template-columns:1fr 1fr; }
  .legacy-ai-bridge { grid-template-columns:auto 1fr; }
  .legacy-ai-bridge a { grid-column:1/3; }
  .legacy-panel { overflow-x:auto; }
  .legacy-table { min-width:720px; }
  .scene-entry-grid { grid-template-columns:1fr; }
  .product-channel-switch { grid-template-columns:1fr; }
  .client-full-route { flex-wrap:wrap; }
  .product-client-launch h3 { font-size:20px; }
}
