/* 设为软件启动页 · 互斥勾选 */

.startup-page-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(140, 102, 50, 0.22);
    background: rgba(255, 252, 246, 0.9);
    color: #6b5a45;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    max-width: 100%;
}

.startup-page-check input {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    accent-color: #c4923e;
    flex: 0 0 auto;
    cursor: pointer;
}

.startup-page-check:hover {
    border-color: rgba(196, 146, 62, 0.45);
    background: #fffaf2;
}

.startup-page-check:has(input:checked) {
    border-color: rgba(196, 146, 62, 0.55);
    background: rgba(248, 228, 186, 0.55);
    color: #5a4528;
}

.startup-page-check--topbar {
    flex: 0 1 auto;
    min-width: 0;
}

.startup-page-check--rail {
    margin-left: auto;
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    white-space: normal;
    text-align: left;
    max-width: 7.5rem;
    line-height: 1.3;
}

.startup-page-check--action {
    width: 100%;
    justify-content: flex-start;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 10px;
}

.startup-page-check--toolbar {
    flex: 0 1 auto;
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
    white-space: normal;
}

@media (max-width: 768px) {
    .startup-page-check,
    .startup-page-check--toolbar,
    .startup-page-check--topbar,
    .startup-page-check--modal,
    .startup-page-check--rail,
    .startup-page-check--action {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
        height: auto;
        line-height: 1.35;
    }
}

.startup-page-check--modal {
    display: inline-flex;
    margin-top: 0.45rem;
    max-width: 100%;
    white-space: normal;
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
}

.hd-lifebook-head__text .startup-page-check--modal,
.register-lifebook-head__text .startup-page-check--modal {
    align-self: flex-start;
}

.rail-section-label-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.35rem;
    min-width: 0;
}

.rail-section-label-row .rail-section-label {
    margin: 0;
    flex: 0 1 auto;
}

.ph-topbar-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.ph-topbar-mid .ph-title {
    line-height: 1.2;
}

.ph-topbar-mid .startup-page-check {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
}

.startup-page-toast {
    position: fixed;
    left: 50%;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(0.6rem);
    z-index: 12000;
    max-width: min(90vw, 22rem);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(58, 47, 33, 0.92);
    color: #fff8ee;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 28px rgba(40, 28, 16, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.startup-page-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
    .hd-topbar {
        flex-wrap: wrap;
    }

    .hd-topbar-start {
        flex-wrap: wrap;
        width: 100%;
    }

    .hd-topbar-start .startup-page-check--topbar {
        display: inline-flex;
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-top: 0.15rem;
        white-space: normal;
    }
}

html.app-rail-collapsed .startup-page-check--rail {
    display: none;
}
