/* 前后台共用：幻灯片文字/按钮图层（所见即所得）
 * 设计参考宽度 1200px：--layer-size 为设计稿像素
 */
.hero-overlay-box,
.canvas-layers.hero-overlay-box {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    container-type: inline-size;
    container-name: hero-overlay;
    --hero-unit: calc(100cqw / 1200);
    font-family: "Microsoft YaHei","PingFang SC",Arial,sans-serif;
}

.hero-overlay-layer {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    max-width: 90%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: calc(var(--layer-size, 28) * var(--hero-unit, 1px));
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    white-space: pre-wrap;
    word-break: break-word;
    pointer-events: auto;
    transform: translate(var(--layer-tx, -50%), -50%);
    cursor: default;
}

.hero-overlay-layer.is-btn {
    text-shadow: none;
    border-radius: calc(var(--layer-radius, 999) * var(--hero-unit, 1px));
    padding: 0.75em 1.375em;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.hero-overlay-link {
    color: inherit;
    text-decoration: none;
}

.hero-overlay-layer.layer {
    cursor: move;
}
.hero-overlay-layer.layer.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
    z-index: 30;
}
.hero-overlay-layer.layer.is-btn.selected {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 6px 18px rgba(15, 23, 42, 0.18);
}
.hero-overlay-layer.layer.editing {
    cursor: text;
    z-index: 31;
    min-width: 0;
    width: max-content;
    max-width: 90%;
}
.hero-overlay-layer.is-regular {
    font-weight: 400;
    text-shadow: none;
}
.hero-overlay-layer.is-btn.is-regular {
    font-weight: 400;
}

@supports not (width: 1cqw) {
    .hero-overlay-box,
    .canvas-layers.hero-overlay-box {
        --hero-unit: 1px;
    }
}
