/* 模型只占大字下方右側；原首頁字型、背景與特效樣式維持 pages.css。 */
.ba54-hero-tail {
    position: relative;
    display: flow-root;
    min-height: 18rem;
}

.ba54-hero-model {
    position: absolute;
    right: 0;
    top: 0.5rem;
    width: min(42%, 30rem);
    height: calc(100% - 0.5rem);
    isolation: isolate;
}

.ba54-hero-model #seal-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    cursor: grab;
}

.ba54-hero-model #seal-canvas.dragging { cursor: grabbing; }
.ba54-hero-model #seal-canvas[hidden] { display: none; }

.ba54-model-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ba54-hero-model .model-hit {
    position: absolute;
    width: 48px;
    height: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ba54-hero-model .model-hit:focus-visible { outline: none; }

.ba54-model-reset {
    position: absolute;
    right: 0.6rem;
    bottom: 0.4rem;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--panel-line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--cyan);
    font: 1.3rem var(--font-display);
    cursor: pointer;
}

.ba54-model-reset:hover { border-color: var(--cyan); }
.ba54-model-reset:disabled { opacity: 0.35; cursor: default; }
.ba54-hero-model #seal-canvas:focus-visible,
.ba54-model-reset:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.ba54-model-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* 失敗時退場，不留下空白模型區或無法使用的按鈕。 */
.ba54-hero-model.is-unavailable {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
}
.ba54-hero-model.is-unavailable .ba54-model-reset { display: none; }
.ba54-hero-tail:has(.ba54-hero-model.is-unavailable) { min-height: 0; }

@media (max-width: 1100px) {
    .ba54-hero-tail { min-height: 0; }
    .ba54-hero-model {
        position: relative;
        inset: auto;
        width: min(100%, 28rem);
        height: auto;
        aspect-ratio: 4 / 3;
        margin: 1.5rem 0 0 auto;
    }
}
