.app-plan {
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
}

.app-plan-with-nav {
    padding-bottom: 73px;
    padding-bottom: calc(73px + env(safe-area-inset-bottom, 0px));
}

.plan-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: white;
}

.plan-toolbar button {
    font: inherit;
    font-weight: 600;
    background: #1890ff;
    color: white;
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    min-height: 44px;
    cursor: pointer;
}

.plan-toolbar button:disabled {
    opacity: .4;
}

.plan-toolbar output {
    font-size: 13px;
    min-width: 50px;
}

.plan-help {
    font-size: 13px;
    text-align: center;
    margin: 0;
    padding: 6px 16px 12px;
    background: #fff;
}

.plan-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    outline-offset: -4px;
}

.plan-viewport:active {
    cursor: grabbing;
}

.plan-viewport img {
    position: absolute;
    left: 0;
    top: 0;
    max-width: none;
    max-height: none;
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-drag: none;
}

.plan-empty {
    padding: 40px;
    text-align: center;
}

button:focus-visible, a:focus-visible, .plan-viewport:focus-visible {
    outline: 3px solid #00a0d0;
}

@media (max-width:480px) {
    .plan-toolbar {
        gap: 7px;
    }
    .plan-toolbar button {
        padding: 10px 12px;
    }
    .plan-help {
        font-size: 12px;
    }
}
