/* ===== 打印纸生成器 grid-paper ===== */
.gp-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gp-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px 8px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .16s ease;
}
.gp-type span { font-size: 20px; line-height: 1; }
.gp-type:hover { border-color: #0aa8a8; color: #0aa8a8; }
.gp-type.is-active {
    background: linear-gradient(135deg, rgba(10,168,168,.16), rgba(10,168,168,.06));
    border-color: rgba(10,168,168,.55);
    color: #087e7e;
}
.gp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.gp-seg button {
    height: 41px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.gp-seg button.is-active {
    background: linear-gradient(135deg, rgba(10,168,168,.16), rgba(10,168,168,.06));
    border-color: rgba(10,168,168,.55);
    color: #087e7e;
}
.gp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--c-text);
    cursor: pointer;
    margin-bottom: 8px;
}
.gp-check input { width: 16px; height: 16px; accent-color: #0aa8a8; }

/* 预览 */
.gp-preview-wrap {
    display: flex;
    justify-content: center;
    padding: 14px 6px;
    background:
        linear-gradient(45deg, rgba(127,127,127,.08) 25%, transparent 25%, transparent 75%, rgba(127,127,127,.08) 75%),
        linear-gradient(45deg, rgba(127,127,127,.08) 25%, transparent 25%, transparent 75%, rgba(127,127,127,.08) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
    border-radius: 12px;
}
.gp-preview-sheet {
    background: #fff;
    box-shadow: 0 6px 26px rgba(0,0,0,.18);
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
    max-width: 210mm;
}
.gp-preview-sheet svg { display: block; width: 100%; height: auto; }

/* 打印 */
#gpPrintArea { display: none; }
@media print {
    body * { visibility: hidden !important; }
    #gpPrintArea, #gpPrintArea * { visibility: visible !important; }
    #gpPrintArea {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
    #gpPrintArea svg { display: block; width: 100%; height: 100%; }
    @page { margin: 0; }
}

@media (max-width: 760px) {
    .gp-types { grid-template-columns: repeat(3, 1fr); }
}
