body.is-zebra-blackout .kpc-pair {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
body.is-zebra-blackout .kpc-unit {
  min-width: 0;
}
body.is-zebra-blackout .kpc-arch.has-chain-both .kpc-mid {
  grid-template-columns: 50px 20px minmax(0, 1fr) 20px 50px;
}
.kpc-zbbo-nowrap { white-space: nowrap; }

.kpc-zbbo-hero {
  min-height: 390px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2a211a, #15100d);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.kpc-zbbo-fit {
  --kpc-cass-h: 22px;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #121b18;
}
.kpc-zbbo-fit.is-hero {
  width: min(100%, 420px);
  aspect-ratio: 4 / 3;
  border: 10px solid #d4cdc2;
  box-shadow: inset 0 0 0 2px #9e9588, 0 12px 28px rgba(0, 0, 0, 0.45);
}
.kpc-zbbo-view {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kpc-zbbo-door .kpc-zbbo-leaf:first-child .kpc-zbbo-view { object-position: 30% center; }
.kpc-zbbo-door .kpc-zbbo-leaf:last-child .kpc-zbbo-view { object-position: 70% center; }
.kpc-zbbo-fit canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.kpc-zbbo-bo {
  position: absolute;
  left: 7px;
  right: 7px;
  z-index: 2;
  pointer-events: none;
}
.kpc-zbbo-bo.is-static {
  top: var(--kpc-cass-h);
  height: 29%;
  background: linear-gradient(180deg, #d8c49a, #a88855);
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.3);
}
.kpc-zbbo-bo.is-static::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: var(--zbbo-hardware, linear-gradient(180deg, #f4ead6, #b49a78));
}
.kpc-zbbo-bo-rail {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 8px;
  margin-top: -8px;
  z-index: 3;
  background: linear-gradient(180deg, #f4ead6, #d8c4a4 55%, #b49a78);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  pointer-events: none;
}
.kpc-zbbo-fit > .kpc-cass {
  left: 0;
  right: 0;
  width: auto;
  height: var(--kpc-cass-h);
  z-index: 8;
}
.kpc-zbbo-fit > .kpc-cass::after {
  background: var(--zbbo-hw-edge, #8a7348);
}
.kpc-zbbo-sg {
  position: absolute;
  top: var(--kpc-cass-h);
  bottom: 0;
  z-index: 3;
  width: 7px;
  background: linear-gradient(180deg, #f4ead6, #d8c4a4 55%, #b49a78);
  box-shadow: inset 0 0 0 1px rgba(70, 55, 35, 0.35);
  animation: kpc-zbbo-sg-blink 1.15s ease-in-out infinite;
  transition: filter 180ms ease, box-shadow 180ms ease;
  pointer-events: none;
}
.kpc-zbbo-sg.is-sealed {
  animation: none;
  box-shadow:
    inset 0 0 0 2px #f0d78a,
    0 0 14px 3px rgba(228, 201, 138, 0.78);
  filter: brightness(1.45);
}
.kpc-zbbo-sg.is-l { left: 0; }
.kpc-zbbo-sg.is-r { right: 0; }
@keyframes kpc-zbbo-sg-blink {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(70, 55, 35, 0.35),
      0 0 0 0 rgba(228, 201, 138, 0);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px #f0d78a,
      0 0 14px 3px rgba(228, 201, 138, 0.76);
    filter: brightness(1.42);
  }
}

.kpc-zbbo-door {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  background: #4c4337;
}
.kpc-zbbo-door .kpc-zbbo-fit {
  height: 100%;
  aspect-ratio: auto;
}

body.is-zebra-blackout .kpc-chain {
  padding-left: 4px;
  padding-right: 4px;
}
body.is-zebra-blackout .kpc-chain-hand {
  top: 41%;
  left: 12px;
  width: 24px;
  height: 34px;
}
body.is-zebra-blackout .kpc-mid > .kpc-chain:first-child .kpc-chain-hand {
  right: 12px;
  left: auto;
}
body.is-zebra-blackout .kpc-chain.is-zebra small { color: #e4c98a; }
body.is-zebra-blackout .kpc-chain.is-bo small { color: #f0d78a; }
.kpc-zbbo-modes {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
}
body.is-zebra-blackout .kpc-zbbo-modes button {
  width: 40px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
body.is-zebra-blackout .kpc-zbbo-modes button[aria-pressed="true"] {
  color: #fff3c4;
  border-color: #f0d78a;
  background: linear-gradient(180deg, #5a4b2d, #241e15);
  box-shadow: 0 0 7px rgba(240, 215, 138, 0.6);
}
body.is-zebra-blackout .kpc-chain button.is-active {
  color: #fff3c4;
  border-color: #f0d78a;
  box-shadow: 0 0 9px rgba(240, 215, 138, 0.7);
}

.kpc-zbbo-cord-card {
  width: min(100%, 760px);
  margin: 22px auto 0;
  padding: 22px 20px 84px;
  background: linear-gradient(180deg, #4a443c 0%, #322e29 72%, #221f1c 100%);
  box-shadow: inset 0 0 0 1px #5a5348;
}
.kpc-zbbo-cord-card .kpc-zbbo-fit {
  aspect-ratio: 16 / 9;
  overflow: visible;
}
.kpc-zbbo-cord-card .kpc-mid {
  flex: 0 0 auto;
}
.kpc-zbbo-cord-card .kpc-arch {
  width: 100%;
}
.kpc-zbbo-cord-card .kpc-hem {
  z-index: 9;
  pointer-events: auto;
}
.kpc-zbbo-cord-card .kpc-zbbo-bo-hem {
  z-index: 5;
}
.kpc-zbbo-cord-card .kpc-zbbo-zebra-hem {
  z-index: 9;
}
.kpc-zbbo-cord-card .kpc-hem-bar {
  left: 7px;
  right: 7px;
  width: auto;
  top: -3px;
  height: 7px;
}
.kpc-zbbo-cord-card .kpc-hem-ctrl {
  top: -9px;
  gap: 3px;
}
.kpc-zbbo-zebra-hem .kpc-hem-ctrl { left: 36%; }
.kpc-zbbo-bo-hem .kpc-hem-ctrl { left: 66%; }
.kpc-zbbo-cord-card .kpc-hand-hit {
  width: 42px;
  height: 58px;
}
.kpc-zbbo-cord-card .kpc-hem-arrow {
  width: 19px;
  height: 19px;
  font-size: 8px;
}
.kpc-zbbo-cord-card .kpc-hem-arrows {
  gap: 3px;
  padding-top: 4px;
}
.kpc-zbbo-zebra-hem .kpc-zbbo-modes {
  width: auto;
  margin-top: 4px;
}
.kpc-zbbo-zebra-hem .kpc-zbbo-modes button {
  border: 1px solid #c4a46a;
  background: linear-gradient(180deg, #2c2a27, #161412);
  color: #e4c98a;
  cursor: pointer;
}
.kpc-zbbo-control-name {
  align-self: flex-start;
  margin-top: 7px;
  padding: 5px 6px;
  border: 1px solid #c4a46a;
  border-radius: 5px;
  background: #171411;
  color: #f0d78a;
  font-size: 7px;
  font-weight: 800;
}

body.is-zebra-blackout .kpc-motor-block {
  grid-template-columns: minmax(0, 1fr) 210px;
}
.kpc-zbbo-remote {
  width: 210px;
}
.kpc-zbbo-remote .kpc-zbbo-selector-title {
  margin: 6px 0 4px;
  color: #b6ac9c;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.kpc-zbbo-remote .kpc-zbbo-opening-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 4px;
}
.kpc-zbbo-remote .kpc-zbbo-opening-row button {
  height: 32px;
  padding: 3px 2px;
  font-size: 7px;
  line-height: 1.05;
}
.kpc-zbbo-remote .kpc-zbbo-fabric-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 9px;
}
.kpc-zbbo-remote .kpc-zbbo-fabric-row button {
  height: 32px;
  padding: 3px 2px;
  font-size: 8px;
}

.kpc-zbbo-mem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 10px;
}
.kpc-zbbo-mem button {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #4a453c;
  background: linear-gradient(180deg, #2c2a27, #1a1917);
  color: #e8e2d6;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.kpc-zbbo-mem button[aria-pressed="true"] {
  border-color: #c4a46a;
  color: #e4c98a;
  box-shadow: 0 0 9px rgba(228, 201, 138, 0.4);
}
.kpc-zbbo-mem.is-disabled {
  opacity: 0.38;
}
.kpc-zbbo-mem button:disabled {
  cursor: not-allowed;
  border-color: #37332d;
  color: #777168;
  box-shadow: none;
}

@media (max-width: 900px) {
  body.is-zebra-blackout .kpc-pair {
    grid-template-columns: 1fr;
  }
  body.is-zebra-blackout .kpc-motor-block {
    grid-template-columns: 1fr;
  }
  .kpc-zbbo-remote {
    width: min(210px, calc(100% - 12px));
  }
  .kpc-zbbo-cord-card {
    padding-bottom: 100px;
  }
}
