.garage-openness {
    --garage-door-open: 0;
    --garage-accent: #6ce5d0;
    --garage-accent-rgb: 108, 229, 208;
    --garage-warm: #ffc977;
    --garage-pad: clamp(10px, min(3.1cqw, 3.1cqh), 24px);
    --garage-gap: clamp(8px, min(2.2cqw, 2.2cqh), 18px);
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 0;
    padding: var(--garage-pad);
    overflow: hidden;
    box-sizing: border-box;
    color: #f5fbff;
    text-align: left;
    font-family: aa_normal, sans_serif_normal, Arial, sans-serif;
    container-type: size;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(14px, min(3.4cqw, 3.4cqh), 28px);
    background:
        radial-gradient(circle at 88% 8%, rgba(var(--garage-accent-rgb), 0.19), transparent 38%),
        linear-gradient(145deg, rgba(43, 53, 66, 0.97), rgba(17, 22, 29, 0.99) 54%, rgba(10, 14, 19, 0.99));
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45);
    transition: border-color 420ms ease, box-shadow 620ms ease;
}

.garage-openness::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    opacity: calc(0.12 + (var(--garage-door-open) * 0.42));
    background:
        linear-gradient(115deg, transparent 22%, rgba(var(--garage-accent-rgb), 0.2) 48%, transparent 70%);
    transform: translate3d(calc((var(--garage-door-open) - 0.5) * 16%), 0, 0);
}

.garage-openness *,
.garage-openness *::before,
.garage-openness *::after {
    box-sizing: border-box;
}

.garage-openness-header,
.garage-openness-footer {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    min-width: 0;
}

.garage-openness-header {
    justify-content: space-between;
    gap: var(--garage-gap);
    padding-bottom: clamp(7px, 2cqh, 16px);
}

.garage-openness-title {
    overflow: hidden;
    color: rgba(243, 249, 255, 0.9);
    font-family: aa_bold, sans_serif_bold, Arial, sans-serif;
    font-size: clamp(12px, min(4.2cqw, 4.2cqh), 21px);
    letter-spacing: -0.01em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.garage-openness-live {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: clamp(5px, 1.4cqw, 9px);
    color: rgba(221, 235, 245, 0.62);
    font-family: odudo_semibold, sans_serif_bold, monospace;
    font-size: clamp(8px, min(2.4cqw, 2.5cqh), 12px);
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.garage-openness-live-dot {
    width: clamp(6px, min(1.7cqw, 1.7cqh), 9px);
    height: clamp(6px, min(1.7cqw, 1.7cqh), 9px);
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--garage-accent);
    box-shadow:
        0 0 0 4px rgba(var(--garage-accent-rgb), 0.08),
        0 0 15px rgba(var(--garage-accent-rgb), 0.72);
    transition: background-color 420ms ease, box-shadow 520ms ease;
    animation: garage-openness-live-pulse 2.6s ease-in-out infinite;
}

.garage-openness-body {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    gap: clamp(9px, min(3cqw, 3cqh), 24px);
    overflow: hidden;
}

.garage-openness-readout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding-left: clamp(0px, 0.6cqw, 5px);
}

.garage-openness-percent {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    color: #ffffff;
    font-family: aa_bold, sans_serif_bold, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.075em;
    line-height: 0.82;
    text-shadow: 0 5px 28px rgba(var(--garage-accent-rgb), 0.14);
    transition: color 420ms ease, text-shadow 520ms ease;
}

.garage-openness-percent-value {
    font-size: clamp(40px, min(18cqw, 20cqh), 112px);
}

.garage-openness-percent-symbol {
    padding-top: 0.08em;
    padding-left: 0.12em;
    color: var(--garage-accent);
    font-size: clamp(18px, min(6.5cqw, 7.5cqh), 40px);
    letter-spacing: -0.04em;
}

.garage-openness-state {
    margin-top: clamp(11px, min(3.4cqw, 3.4cqh), 24px);
    overflow: hidden;
    color: rgba(246, 251, 255, 0.92);
    font-family: aa_bold, sans_serif_bold, Arial, sans-serif;
    font-size: clamp(13px, min(4.2cqw, 4.4cqh), 24px);
    line-height: 1.06;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.garage-openness-state-detail {
    margin-top: clamp(5px, 1.5cqh, 10px);
    overflow: hidden;
    color: rgba(214, 228, 238, 0.48);
    font-family: odudo, sans_serif_normal, monospace;
    font-size: clamp(8px, min(2.55cqw, 2.55cqh), 13px);
    letter-spacing: 0.055em;
    line-height: 1.25;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.garage-openness-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.garage-openness-visual::before {
    content: "";
    position: absolute;
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: calc(0.06 + (var(--garage-door-open) * 0.38));
    background: rgba(var(--garage-accent-rgb), 0.32);
    filter: blur(clamp(22px, 6cqw, 52px));
    transform: scale(calc(0.72 + (var(--garage-door-open) * 0.34)));
}

.garage-openness-aperture {
    position: relative;
    width: min(94%, 290px);
    height: min(92%, 320px);
    min-height: 44px;
    overflow: hidden;
    border: clamp(3px, min(1cqw, 1cqh), 7px) solid rgba(173, 194, 209, 0.34);
    border-bottom-color: rgba(220, 235, 244, 0.48);
    border-radius: clamp(8px, min(2cqw, 2cqh), 15px) clamp(8px, min(2cqw, 2cqh), 15px) 3px 3px;
    background: #091018;
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(0, 0, 0, 0.7),
        inset 0 0 25px rgba(0, 0, 0, 0.55);
}

.garage-openness-interior {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(98, 224, 205, 0.11), transparent 45%),
        radial-gradient(ellipse at 50% 18%, rgba(255, 218, 154, 0.25), transparent 42%),
        linear-gradient(150deg, #172631 0%, #0d171f 58%, #05090d 100%);
}

.garage-openness-interior::before,
.garage-openness-interior::after {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 0;
    width: 1px;
    opacity: 0.34;
    background: linear-gradient(180deg, rgba(181, 235, 226, 0.72), transparent);
}

.garage-openness-interior::before {
    left: 24%;
    transform: rotate(9deg);
}

.garage-openness-interior::after {
    right: 24%;
    transform: rotate(-9deg);
}

.garage-openness-ceiling-light {
    position: absolute;
    top: 8%;
    left: 50%;
    width: 34%;
    height: 3%;
    min-height: 2px;
    border-radius: 999px;
    opacity: calc(0.26 + (var(--garage-door-open) * 0.72));
    background: #fff3d1;
    box-shadow: 0 0 18px 5px rgba(255, 222, 159, 0.32);
    transform: translateX(-50%);
}

.garage-openness-depth-lines {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 3%;
    height: 34%;
    opacity: calc(0.1 + (var(--garage-door-open) * 0.38));
    background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 18%,
        rgba(155, 214, 204, 0.32) 19%,
        transparent 20%
    );
    clip-path: polygon(29% 0, 71% 0, 100% 100%, 0 100%);
}

.garage-openness-threshold {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.5%;
    min-height: 2px;
    background: linear-gradient(90deg, #27323c, #a8bbc5 50%, #27323c);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.42);
}

.garage-openness-door {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    will-change: transform;
    background: linear-gradient(110deg, #dce6ea 0%, #8395a0 48%, #d7e1e5 100%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.garage-openness-door::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
    background:
        linear-gradient(112deg, transparent 0 34%, rgba(255, 255, 255, 0.38) 49%, transparent 63%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.11), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.15));
}

.garage-openness-door-panel {
    position: relative;
    flex: 1 1 20%;
    min-height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.58);
    border-bottom: 1px solid rgba(26, 40, 48, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(22, 41, 50, 0.08));
}

.garage-openness-door-panel::before,
.garage-openness-door-panel::after {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    width: 25%;
    border: 1px solid rgba(49, 68, 77, 0.2);
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22);
}

.garage-openness-door-panel::before {
    left: 16%;
}

.garage-openness-door-panel::after {
    right: 16%;
}

.garage-openness-door-handle {
    position: absolute;
    z-index: 3;
    bottom: 7%;
    left: 50%;
    width: 16%;
    height: 2.5%;
    min-height: 2px;
    border-radius: 999px;
    background: #394850;
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
    transform: translateX(-50%);
}

.garage-openness-rail {
    position: absolute;
    z-index: 4;
    top: 7%;
    right: clamp(4px, 2.5%, 9px);
    bottom: 7%;
    width: clamp(2px, 1.3%, 4px);
    border-radius: 999px;
    background: rgba(5, 11, 15, 0.62);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.garage-openness-rail-fill {
    position: absolute;
    inset: auto 0 0;
    height: calc(var(--garage-door-open) * 100%);
    border-radius: inherit;
    background: linear-gradient(180deg, var(--garage-warm), var(--garage-accent));
    box-shadow: 0 0 10px rgba(var(--garage-accent-rgb), 0.46);
    transition: background-color 420ms ease, box-shadow 520ms ease;
}

.garage-openness-rail-marker {
    position: absolute;
    right: 50%;
    bottom: calc(var(--garage-door-open) * 100%);
    width: clamp(8px, 4cqw, 15px);
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    background: var(--garage-accent);
    box-shadow: 0 0 13px rgba(var(--garage-accent-rgb), 0.7);
    transform: translate(50%, 50%);
    transition: background-color 420ms ease, box-shadow 520ms ease;
}

.garage-openness-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(7px, 2cqw, 13px);
    padding-top: clamp(8px, 2.2cqh, 16px);
    color: rgba(220, 232, 240, 0.43);
    font-family: odudo_semibold, sans_serif_bold, monospace;
    font-size: clamp(7px, min(2.2cqw, 2.2cqh), 11px);
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.garage-openness-progress-track {
    position: relative;
    min-width: 0;
    height: clamp(3px, min(1cqw, 1cqh), 6px);
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.garage-openness-progress-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #60717d, var(--garage-accent) 72%, var(--garage-warm));
    box-shadow: 0 0 12px rgba(var(--garage-accent-rgb), 0.4);
    transform: scaleX(var(--garage-door-open));
    transform-origin: left center;
    will-change: transform;
}

.garage-openness.is-opening .garage-openness-state::after,
.garage-openness.is-closing .garage-openness-state::after {
    display: inline-block;
    margin-left: 0.42em;
    color: var(--garage-accent);
    font-size: 0.7em;
    vertical-align: 0.13em;
}

.garage-openness.is-opening .garage-openness-state::after {
    content: "\2191";
}

.garage-openness.is-closing .garage-openness-state::after {
    content: "\2193";
    color: var(--garage-warm);
}

.garage-openness.is-opening .garage-openness-door::after,
.garage-openness.is-closing .garage-openness-door::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    width: 42%;
    opacity: 0.32;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    animation: garage-openness-door-sheen 1.45s ease-in-out infinite;
}

.garage-openness.is-closed {
    --garage-accent: #8fb7ff;
    --garage-accent-rgb: 143, 183, 255;
}

.garage-openness.is-closing {
    --garage-accent: #ffd084;
    --garage-accent-rgb: 255, 208, 132;
}

.garage-openness.is-offline {
    --garage-accent: #d39a70;
    --garage-accent-rgb: 211, 154, 112;
}

.garage-openness.is-offline .garage-openness-live-dot {
    animation: none;
    box-shadow: 0 0 0 4px rgba(var(--garage-accent-rgb), 0.08);
}

@container (max-width: 360px) or (max-height: 245px) {
    .garage-openness-body {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .garage-openness-state-detail {
        display: none;
    }

    .garage-openness-footer {
        padding-top: 6px;
    }
}

@container (max-width: 250px) or (max-height: 165px) {
    .garage-openness-header {
        padding-bottom: 4px;
    }

    .garage-openness-live-label,
    .garage-openness-footer > span {
        display: none;
    }

    .garage-openness-footer {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding-top: 4px;
    }

    .garage-openness-state {
        margin-top: 5px;
    }
}

@keyframes garage-openness-live-pulse {
    0%, 100% {
        opacity: 0.66;
        transform: scale(0.88);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes garage-openness-door-sheen {
    from {
        left: -55%;
    }
    to {
        left: 115%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .garage-openness *,
    .garage-openness *::before,
    .garage-openness *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
