/* Drydock — q100 / q300 rail column centering (side-rail + phone stack) */

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) #q100,
body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) #q300 {
  align-items: center;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-main {
  align-items: center;
  width: 100%;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-section {
  align-items: center;
  width: 100%;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-actions,
body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-scroll {
  width: 100%;
  align-items: center;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-btn,
body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-slot:not(.dd-rail-slot--xl) {
  width: auto;
  min-width: calc(var(--dd-rail-glyph) + 0.5rem);
  max-width: calc(var(--dd-rail-w) - 0.7rem);
  cursor: pointer;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-dock {
  width: 100%;
  justify-content: center;
}

body.dd-shell .dd-viewport:not(.dd-layout--phone-stack) .dd-rail-slot--xl {
  width: var(--dd-rail-xl);
  min-width: var(--dd-rail-xl);
  max-width: var(--dd-rail-xl);
}

/* Phone stack — horizontal rail strip; undo side-rail width caps */
body.dd-shell .dd-viewport.dd-layout--phone-stack #q100,
body.dd-shell .dd-viewport.dd-layout--phone-stack #q300 {
  align-items: stretch;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  overflow: visible;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-main {
  align-items: center;
  width: auto;
  flex: 0 0 auto;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-section {
  align-items: center;
  width: auto;
  flex: 0 0 auto;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-actions,
body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-scroll {
  width: auto;
  flex: 0 0 auto;
  align-items: center;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-btn,
body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-slot:not(.dd-rail-slot--xl) {
  width: var(--dd-phone-row-icon);
  height: var(--dd-phone-row-icon);
  min-width: var(--dd-phone-row-icon);
  max-width: var(--dd-phone-row-icon);
  min-height: var(--dd-phone-row-icon);
  max-height: var(--dd-phone-row-icon);
  flex: 0 0 var(--dd-phone-row-icon);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-btn i,
body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-slot i {
  font-size: calc(var(--dd-phone-row-icon) * 0.72);
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-rail-dock {
  width: auto;
  flex-shrink: 0;
}

body.dd-shell .dd-viewport.dd-layout--phone-stack .dd-stack-row--rails {
  align-items: center;
}
