/* Fidelity35: visual parity for the existing CSS hardware fallback.
 * Keep the accepted WebGL renderer, live form, folding controller and depths.
 * Optical proportions follow the private owner reference; these are authored
 * visual values, not claimed manufacturer bezel/camera measurements.
 */
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) {
  --f35-spine-radius:calc(var(--r24-leaf-depth,26px) * .6923076923);
  --f35-spine-glass-radius:max(2px,calc(var(--f35-spine-radius) - var(--r38-oled-inset,12px)));
  --f35-free-glass-radius:max(2px,calc(var(--duo-radius) - var(--r38-oled-inset,12px)));
}

/* The inactive OLED surround is black. Only the narrow outermost reflected
 * line is metal; the previous fallback painted the whole surround silver.
 * Keeping the existing inset preserves the live form and controller metrics.
 */
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) :is(.tt-duo__leaf--right,.tt-duo__leaf-face--inside,.tt-duo__leaf-face--outside) {
  background:#050609;
  border-color:#858f94;
  box-shadow:inset 0 0 0 1px #aeb7ba,inset 0 0 0 2px #11171b;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__leaf-face--outside {
  border-radius:var(--f35-spine-radius) var(--duo-radius) var(--duo-radius) var(--f35-spine-radius);
}
/* Same rigid perimeters as the immutable successor's CSS sidewall mesh.
 * These corners do not morph while folding; only the hinge rotates. */
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__leaf-face--inside {
  border-radius:var(--duo-radius) var(--f35-spine-radius) var(--f35-spine-radius) var(--duo-radius);
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__leaf--right {
  border-radius:var(--f35-spine-radius) var(--duo-radius) var(--duo-radius) var(--f35-spine-radius);
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__leaf-face--outside::after {
  border-radius:inherit;
  box-shadow:inset 0 0 0 .5px #d5dcde80;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-screen {
  border-radius:var(--f35-spine-glass-radius) var(--f35-free-glass-radius) var(--f35-free-glass-radius) var(--f35-spine-glass-radius);
  box-shadow:inset 0 0 0 .5px #2b343b;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__rear {
  border-radius:var(--duo-radius) var(--f35-spine-radius) var(--f35-spine-radius) var(--duo-radius);
}

/* Use the existing decorative camera node, now a corner punch hole. The rail
 * remains pointer-transparent and never covers a live contact control.
 * x=.885,y=.063 are the same normalized optical anchor as the live renderer.
 */
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail {
  top:0;right:0;bottom:0;left:0;width:auto;height:auto;
  pointer-events:none;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail .tt-duo__island {
  position:absolute;
  left:88.5%;top:6.3%;right:auto;bottom:auto;
  width:calc(var(--r24-leaf-depth,26px) * 1.0192307692);
  height:calc(var(--r24-leaf-depth,26px) * 1.0192307692);
  transform:translate(-50%,-50%);
  padding:0;flex:none;border-radius:50%;
  align-items:center;justify-content:center;
  background:radial-gradient(circle at 38% 29%,#151b20,#030405 60%);
  box-shadow:0 0 0 .6px #253036,inset 0 0 0 1px #000;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail .tt-duo__island > i {
  width:43%;height:43%;
  background:radial-gradient(circle at 30% 25%,#637d8b 0 8%,#183247 19%,#081019 45%,#010305 72%);
  box-shadow:0 0 0 .7px #30404a;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail .tt-duo__time {
  position:absolute;left:8%;top:4.2%;margin:0;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail .tt-duo__signal {
  position:absolute;right:25%;top:4.4%;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__outer-rail .tt-duo__battery {
  position:absolute;right:18%;top:4.6%;
}
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__display-status .tt-duo__island {
  visibility:hidden;
}

/* The existing hinge cover completes the continuous inner-glass outline
 * once the existing controller declares the fold ready. The two rigid leaf
 * corners remain unchanged. Its +1px plane is above their +.5px faces and
 * below Repair34's display (+2px) and editable form (+3px). */
.tt-duo[data-duo-premium="true"].is-ready [data-duo-stage]:not([data-r25-renderer="active"]) .tt-duo__hinge {
  top:0;height:100%;
  left:calc(50% - var(--f35-spine-radius) - 1px);
  width:calc(var(--f35-spine-radius) * 2 + 2px);
  border-radius:0;
  background:#050609;
  box-shadow:inset 0 1px 0 #aeb7ba,inset 0 -1px 0 #aeb7ba;
  transform:translateZ(1px);
  opacity:1;
  pointer-events:none;
}

/* In a preserved 3D subtree the parent's hidden reverse face does not cull
 * each child's independently transformed plane. Cull physical faces too.
 * Do not flatten the entire rear: its optical barrels retain their depth.
 * The separate flash glow is deliberately excluded (flash35 owns it).
 */
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) :is(.tt-duo__rear-camera,.tt-duo__rear-lens,.tt-duo__rear-flash,.tt-duo__rear-mic,.tt-duo__rear-sensor,.tt-duo__rear-brand,.tt-r22-side-keys,.tt-r22-side-keys > i),
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) :is(.tt-duo__rear-camera,.tt-duo__rear-lens,.tt-duo__rear-flash,.tt-duo__rear-mic,.tt-duo__rear-sensor,.tt-duo__rear-brand)::before,
.tt-duo[data-duo-premium="true"] [data-duo-stage]:not([data-r25-renderer="active"]) :is(.tt-duo__rear-camera,.tt-duo__rear-lens,.tt-duo__rear-flash,.tt-duo__rear-mic,.tt-duo__rear-sensor,.tt-duo__rear-brand)::after {
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
