/* A3 试卷变 A4：仅本页特有的样式，通用组件见 ../common.css */

.tb-stack > .tb-card { margin-top: 0; }
#errorBox { margin-top: 0.75rem; }
.a3-note { margin: 0.5rem 0 1rem; }
.a3-work { margin-bottom: 1rem; }

.trim-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.375rem 0;
}
.trim-grid input { padding-left: 0.5rem; padding-right: 0.25rem; }

.a3-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}
.a3-actions > :first-child { grid-column: 1 / -1; }

.a3-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 1rem;
    align-items: start;
}
.a3-pages--result { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.page-item { min-width: 0; }
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}
/* 页面缩略图是文档内容，保持白底 */
.page-canvas {
    position: relative;
    line-height: 0;
    background: #fff;
    border: 1px solid var(--color-border-hover);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.page-canvas canvas { display: block; width: 100%; height: auto; }

.trim-mask { position: absolute; background: rgba(40, 40, 40, 0.45); pointer-events: none; }
.trim-mask--top { top: 0; left: 0; right: 0; }
.trim-mask--bottom { bottom: 0; left: 0; right: 0; }
.trim-mask--left { top: 0; bottom: 0; left: 0; }
.trim-mask--right { top: 0; bottom: 0; right: 0; }

.split-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    margin-left: -14px;
    cursor: col-resize;
    touch-action: none;
    z-index: 2;
}
.split-line::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 13px;
    width: 2px;
    background: #e11d48;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.split-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    width: 20px;
    height: 36px;
    margin-top: -18px;
    border-radius: 10px;
    background: #e11d48;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.split-line:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.a3-work[data-mode="none"] .split-line { display: none; }

.result-page { text-align: center; font-size: 0.75rem; color: var(--color-text-muted); }
.result-page .page-canvas { margin-bottom: 0.25rem; }

.a3-tips ol { margin: 0 0 0.5rem 1.25rem; }
.a3-tips li { margin: 0.25rem 0; color: var(--color-text-secondary); }

@media (max-width: 480px) {
    .a3-pages--result { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
