
/* The legacy 9-star UI is fully retired. The underlying legacy state remains only for migration. */
#beta3StarRouteChip,#beta3StarComplete,.beta3-star-route-panel{display:none!important}
#beta584StarRouteChip{white-space:nowrap}

/* NITI: keep every story arc inside the page width; only its inner shelf may scroll sideways. */
#threads,#threads .thread-workspace,#threads .thread-arc-group,#threads .thread-arc-body{
  min-width:0!important;max-width:100%!important;
}
#threads .thread-arc-group{overflow:hidden!important}
#threads .thread-arc-body{
  position:relative!important;
  overflow:hidden!important;
  padding:11px 48px 29px!important;
}
#threads .thread-arc-grid{
  width:100%!important;max-width:100%!important;min-width:0!important;
  grid-auto-columns:clamp(300px,34%,390px)!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;
  scroll-behavior:smooth;
  scrollbar-width:none!important;
  -ms-overflow-style:none;
  touch-action:pan-x pan-y;
}
#threads .thread-arc-grid::-webkit-scrollbar{display:none!important}
#threads .thread-workspace.view-arcs .thread-card{scroll-snap-align:start;scroll-snap-stop:normal}

/* Soft edge masks appear only when more quests exist in that direction. */
#threads .thread-arc-body::before,#threads .thread-arc-body::after{
  content:"";position:absolute;top:0;bottom:26px;width:54px;z-index:3;pointer-events:none;
  opacity:0;transition:opacity .18s ease;
}
#threads .thread-arc-body::before{left:0;background:linear-gradient(90deg,rgba(16,15,21,.96),rgba(16,15,21,0))}
#threads .thread-arc-body::after{right:0;background:linear-gradient(270deg,rgba(16,15,21,.96),rgba(16,15,21,0))}
#threads .thread-arc-body.beta584-can-left::before{opacity:1}
#threads .thread-arc-body.beta584-can-right::after{opacity:1}

.beta584-shelf-nav{
  position:absolute;inset:0;z-index:5;pointer-events:none;
}
.beta584-shelf-arrow{
  position:absolute;top:50%;transform:translateY(-58%);
  width:34px;height:44px;padding:0;border:1px solid color-mix(in srgb,var(--arc-color,#d2b174) 28%,var(--line));
  border-radius:12px;background:rgba(18,17,23,.88);color:color-mix(in srgb,var(--arc-color,#d2b174) 80%,#fff);
  box-shadow:0 8px 20px rgba(0,0,0,.24);backdrop-filter:blur(9px);
  display:grid;place-items:center;font:600 21px/1 Georgia,serif;pointer-events:auto;
  opacity:.86;transition:opacity .16s ease,transform .16s ease,border-color .16s ease;
}
.beta584-shelf-arrow:hover,.beta584-shelf-arrow:focus-visible{opacity:1;transform:translateY(-58%) scale(1.06);border-color:color-mix(in srgb,var(--arc-color,#d2b174) 58%,var(--line))}
.beta584-shelf-arrow[disabled]{opacity:.16!important;pointer-events:none}
.beta584-shelf-prev{left:8px}.beta584-shelf-next{right:8px}
.beta584-shelf-count{
  position:absolute;right:13px;bottom:6px;pointer-events:none;
  min-width:48px;padding:3px 7px;border:1px solid color-mix(in srgb,var(--arc-color,#d2b174) 22%,var(--line));
  border-radius:999px;background:rgba(18,17,23,.72);color:var(--muted);text-align:center;font-size:10px;
  backdrop-filter:blur(7px);
}
.beta584-shelf-count strong{color:color-mix(in srgb,var(--arc-color,#d2b174) 78%,#fff);font-weight:600}

@media(max-width:980px) and (min-width:761px){
  #threads .thread-arc-grid{grid-auto-columns:clamp(300px,44%,370px)!important}
}
@media(max-width:760px){
  #threads .thread-arc-body{padding:9px 8px 28px!important}
  #threads .thread-arc-grid{grid-auto-columns:min(86vw,350px)!important}
  .beta584-shelf-arrow{display:none!important}
  #threads .thread-arc-body::before,#threads .thread-arc-body::after{width:24px;bottom:25px}
  .beta584-shelf-count{right:9px;bottom:5px}
}
