/* DOTFIELD: the source renderer runs in an isolated same-origin frame.
   This HMI rail is a fine-material extension, never a box over the particles. */
.hero-stage.is-dotfield-photo .hero-scene,
.project-card-image-button[data-open="dotfield"] .card-scene,
.viewer-shell[data-scene="dotfield"] .viewer-scene {opacity:0;pointer-events:none}
.hero-stage.is-dotfield-photo .hero-poster {opacity:1;filter:contrast(1.09) saturate(1.15)}
.hero-stage.is-dotfield-photo .stage-glass {opacity:.22}
.viewer-shell[data-scene="dotfield"] {--acid:#ff90b8;--line-bright:rgba(242,129,179,.3)}
.viewer-shell[data-scene="dotfield"] .viewer-render {background:#050508}
.viewer-shell[data-scene="dotfield"] .viewer-render .dotfield-frame:not([hidden]){
  position:absolute;inset:0;width:100%;height:100%;border:0;
  z-index:3;display:block;opacity:1;background:#050508;pointer-events:auto;
}
.viewer-shell[data-scene="dotfield"] .viewer-poster{opacity:0}
.viewer-shell[data-scene="dotfield"] .viewer-info{
  padding:clamp(15px,1.9vw,28px);overflow:hidden;
  background:linear-gradient(145deg,#121018,#08090d 82%);
}
.viewer-shell[data-scene="dotfield"] .viewer-meta{margin-top:10px}
.viewer-shell[data-scene="dotfield"] .viewer-info h3{
  margin:8px 0 6px;font-weight:400;font-size:clamp(28px,2.5vw,40px);letter-spacing:-.05em;
}
.viewer-shell[data-scene="dotfield"] :is(.viewer-description,.viewer-interaction,.viewer-keyhint){display:none}
.viewer-shell[data-scene="dotfield"] .mini-hmi{
  margin-top:11px;padding:0;border:0;background:none;box-shadow:none;
}
.viewer-shell[data-scene="dotfield"] .mini-hmi::before{display:none}
.viewer-shell[data-scene="dotfield"] .hmi-header{
  margin:0;padding-bottom:10px;border-bottom:1px solid rgba(243,157,199,.18);
}
.viewer-shell[data-scene="dotfield"] .hmi-header-title{color:#b9aab6;font-size:10px}
.viewer-shell[data-scene="dotfield"] .hmi-header-led{height:4px;width:4px;background:#ff91b8;box-shadow:0 0 9px #ff91b8}
.viewer-shell[data-scene="dotfield"] .hmi-header button{font-size:9px;padding:5px 0}
.viewer-shell[data-scene="dotfield"] .hmi-task{display:none}
.viewer-shell[data-scene="dotfield"] .hmi-group{margin:14px 0 0}
.viewer-shell[data-scene="dotfield"] .hmi-field-label{
  margin-bottom:8px;font-size:10px;letter-spacing:.08em;color:#a99ca7;
}
.viewer-shell[data-scene="dotfield"] .hmi-field-label output{color:#ff92ba}
.dotfield-palette-options{display:flex;justify-content:space-around;align-items:center;gap:10px}
.dotfield-palette-choice{
  --tone:#fe4f90;flex:1;display:grid;justify-items:center;align-content:center;
  padding:7px 6px 6px;min-height:82px;background:transparent;border:0;
  color:#9b8996;cursor:pointer;gap:5px;position:relative;
  font:500 10px var(--mono);letter-spacing:.12em;
  transition:color .25s ease,transform .42s cubic-bezier(.2,1.35,.3,1);
}
.dotfield-palette-choice[data-hmi-value="1"]{--tone:#4ed8f0}
.dotfield-palette-choice[data-hmi-value="2"]{--tone:#ffba6e}
.dotfield-palette-choice svg{
  width:39px;height:39px;fill:var(--tone);opacity:.45;
  filter:drop-shadow(0 0 1px var(--tone));
  transition:opacity .3s,transform .48s cubic-bezier(.25,1.5,.28,1),filter .3s;
}
.dotfield-palette-choice:hover{color:#fff}
.dotfield-palette-choice:hover svg,
.dotfield-palette-choice.selected svg{
  opacity:1;transform:scale(1.12);filter:drop-shadow(0 0 6px var(--tone));
}
.dotfield-palette-choice.selected{color:#fff}
.dotfield-palette-choice::after{
  content:'';height:1px;position:absolute;bottom:0;left:28%;right:28%;
  background:var(--tone);opacity:0;transform:scaleX(.3);transition:opacity .3s,transform .3s;
}
.dotfield-palette-choice.selected::after{opacity:.9;transform:scaleX(1)}
.dotfield-palette-choice:active svg{transform:scale(.78)}
.viewer-shell[data-scene="dotfield"] .hmi-range-group input{accent-color:#ff91b8}
.viewer-shell[data-scene="dotfield"] .range-endpoints{font-size:10px;color:#766e77}
.dotfield-hold-note{
  display:flex;justify-content:space-between;gap:12px;margin-top:14px;
  border-top:1px solid rgba(242,145,185,.13);padding-top:13px;
  color:#b7a2af;font:500 10px var(--mono);letter-spacing:.045em;
}
.viewer-shell[data-scene="dotfield"] .hmi-telemetry{display:none}
.viewer-shell[data-scene="dotfield"] .viewer-nav{margin-top:auto;padding-top:11px;gap:9px}
.viewer-shell[data-scene="dotfield"] .viewer-nav button{width:36px;height:36px}
.viewer-shell[data-scene="dotfield"] .viewer-actions{
  display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px;
}
.viewer-shell[data-scene="dotfield"] .viewer-actions :is(button,a){
  min-height:37px;padding:7px 4px;font-size:9px;color:#b8aeb8;
  background:transparent;border:1px solid #403441;
}
.viewer-shell[data-scene="dotfield"] .viewer-actions a:last-child{grid-column:auto;background:transparent;border-color:#403441}
.viewer-shell[data-scene="dotfield"] .viewer-actions :is(button,a):hover{
  background:rgba(246,111,168,.095);color:#fff;border-color:#e889b6;
}
.viewer-shell[data-scene="dotfield"] .viewer-render-note{color:#f6c4db;text-shadow:0 2px 8px #030207}
@media(max-width:760px){
  .viewer-shell[data-scene="dotfield"] .viewer-render{height:clamp(190px,39dvh,290px);min-height:0}
  .viewer-shell[data-scene="dotfield"] .viewer-info{padding:9px 15px 12px}
  .viewer-shell[data-scene="dotfield"] :is(.viewer-index,.viewer-meta){display:none}
  .viewer-shell[data-scene="dotfield"] .viewer-info h3{font-size:24px;margin:0 0 2px}
  .viewer-shell[data-scene="dotfield"] .mini-hmi{margin-top:5px}
  .viewer-shell[data-scene="dotfield"] .hmi-header{padding-bottom:5px}
  .viewer-shell[data-scene="dotfield"] .hmi-group{margin-top:7px}
  .viewer-shell[data-scene="dotfield"] .hmi-field-label{margin-bottom:3px}
  .dotfield-palette-choice{min-height:52px;gap:2px;padding:3px}
  .dotfield-palette-choice svg{width:29px;height:29px}
  .dotfield-hold-note{margin-top:7px;padding-top:7px;font-size:9px}
  .viewer-shell[data-scene="dotfield"] .viewer-nav{padding-top:5px}
  .viewer-shell[data-scene="dotfield"] .viewer-nav button{width:32px;height:32px}
  .viewer-shell[data-scene="dotfield"] .viewer-actions{margin-top:6px;gap:5px}
  .viewer-shell[data-scene="dotfield"] .viewer-actions :is(button,a){min-height:32px;padding:5px 2px}
}
