/* ============================================================
   PDF Organiser
   Pink (#ff6f91) accent — browser-based PDF page manager
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.po-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.po-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal ───────────────────────────────────────────────── */
.po-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 95vw;
    max-width: 980px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 111, 145, 0.10);
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.po-overlay.is-open .po-modal {
    transform: scale(1);
}

/* ── Close button ────────────────────────────────────────── */
.po-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 60;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.po-close:hover {
    background: rgba(255, 111, 145, 0.15);
    color: #ff6f91;
}

/* When the page-numbers panel is open, hide the modal's own close button
   so only the panel's built-in close button is visible (no two × buttons) */
.po-modal:has(.po-panel.is-open) > .po-close {
    display: none;
}

/* ── Content ─────────────────────────────────────────────── */
.po-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* ── Upload screen ───────────────────────────────────────── */
.po-upload-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #F5F5F7;
}

.po-drop-zone {
    background: #ffffff;
    border: 2.5px dashed rgba(255, 111, 145, 0.35);
    border-radius: 20px;
    padding: 56px 48px;
    text-align: center;
    max-width: 480px;
    width: 100%;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.po-drop-zone.is-drag-over {
    border-color: #ff6f91;
    background: rgba(255, 111, 145, 0.05);
}

.po-upload-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    color: #ff6f91;
}
.po-upload-icon svg {
    width: 100%;
    height: 100%;
}

.po-upload-title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.75rem;
    color: #1D1D1F;
    margin-bottom: 10px;
}

.po-upload-sub {
    font-size: 0.9rem;
    color: #6E6E73;
    margin-bottom: 28px;
    line-height: 1.5;
}

.po-upload-label {
    display: inline-flex;
    cursor: pointer;
}
.po-upload-label input[type="file"] {
    display: none;
}

.po-upload-hint {
    margin-top: 16px;
    font-size: 0.82rem;
    color: #9898A4;
}

/* ── Orientation picker card ─────────────────────────────── */
.po-orient-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 44px 40px 36px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
}

.po-orient-card--loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 60px 40px;
}

.po-orient-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: #ff6f91;
}
.po-orient-card__icon svg {
    width: 100%;
    height: 100%;
}

.po-orient-card__title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.5rem;
    color: #1D1D1F;
    margin-bottom: 10px;
}

.po-orient-card__sub {
    font-size: 0.88rem;
    color: #6E6E73;
    line-height: 1.55;
    margin-bottom: 32px;
}

.po-orient-card--loading .po-orient-card__sub {
    margin-bottom: 0;
}

.po-orient-card__options {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.po-orient-option {
    flex: 1;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px 18px;
    background: #F5F5F7;
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

.po-orient-option:hover {
    border-color: rgba(255, 111, 145, 0.5);
    background: rgba(255, 111, 145, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 111, 145, 0.15);
}

.po-orient-option__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6f91;
}

.po-orient-option__thumb--p svg { width: 40px; height: 55px; }
.po-orient-option__thumb--l svg { width: 55px; height: 40px; }

.po-orient-option__label {
    font-size: 0.95rem;
    color: #1D1D1F;
    font-weight: 700;
}

.po-orient-option__hint {
    font-size: 0.78rem;
    color: #9898A4;
}

.po-orient-card__back {
    background: none;
    border: none;
    color: #9898A4;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
}
.po-orient-card__back:hover { color: #ff6f91; }

.po-spinner--lg {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.po-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition:
        background    0.2s ease,
        color         0.2s ease,
        transform     0.15s ease,
        box-shadow    0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}
.po-btn:active { transform: scale(0.97); }

.po-btn--primary {
    background: #ff6f91;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 111, 145, 0.35);
}
.po-btn--primary:hover {
    background: #e5527b;
    box-shadow: 0 6px 20px rgba(255, 111, 145, 0.45);
}

.po-btn--outline {
    background: transparent;
    color: #ff6f91;
    border: 1.5px solid rgba(255, 111, 145, 0.45);
}
.po-btn--outline:hover {
    background: rgba(255, 111, 145, 0.08);
    border-color: #ff6f91;
}

.po-btn--ghost {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    border: none;
}
.po-btn--ghost:hover { background: rgba(0, 0, 0, 0.10); }

.po-btn--full  { width: 100%; justify-content: center; }
.po-btn--lg    { padding: 13px 24px; font-size: 0.95rem; }
.po-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Toolbar ─────────────────────────────────────────────── */
.po-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 54px 12px 24px; /* right pad for close btn */
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.po-toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.po-toolbar__title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.15rem;
    color: #1D1D1F;
}

.po-toolbar__count {
    background: rgba(255, 111, 145, 0.12);
    color: #ff6f91;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
}

.po-toolbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.po-pn-active-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff6f91;
    margin-right: 4px;
    vertical-align: middle;
}

/* ── Insert orientation picker overlay ─────────────────── */
.po-io-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.46);
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.po-io-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 32px 28px;
    text-align: center;
    width: 460px;
    max-width: calc(100vw - 48px);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 111, 145, 0.10);
}

.po-io-card__title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.35rem;
    color: #1D1D1F;
    margin-bottom: 8px;
}

.po-io-card__sub {
    font-size: 0.86rem;
    color: #6E6E73;
    line-height: 1.5;
    margin-bottom: 28px;
}

/* ── Editor layout ───────────────────────────────────────── */
.po-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
}

/* ── Pages scroll area ───────────────────────────────────── */
.po-pages-scroll {
    flex: 1;
    overflow-y: auto;
    background: #EBEBED;
    padding: 28px 24px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.po-pages-inner {
    max-width: 740px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Page item ───────────────────────────────────────────── */
.po-page-item {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.07),
        0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease;
}
.po-page-item:hover {
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.10),
        0 0 0 1px rgba(255, 111, 145, 0.15);
}

.po-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #FAFAFA;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.po-page-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #3D3D3F;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

.po-page-of {
    font-weight: 400;
    color: #9898A4;
}

.po-page-ctrls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.po-ctrl {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6E6E73;
    transition: background 0.18s ease, color 0.18s ease;
    padding: 0;
}
.po-ctrl svg { width: 14px; height: 14px; flex-shrink: 0; }
.po-ctrl:hover { background: rgba(0, 0, 0, 0.07); color: #1D1D1F; }
.po-ctrl:disabled { opacity: 0.28; cursor: not-allowed; pointer-events: none; }

.po-ctrl--dl:hover  { background: rgba(0, 113, 227, 0.10); color: #0071E3; }
.po-ctrl--rm:hover  { background: rgba(255, 59, 48, 0.10);  color: #FF3B30; }

.po-page-canvas {
    padding: 20px;
    text-align: center;
    background: #F5F5F7;
}
.po-page-canvas img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
}

/* ── Insert zone ─────────────────────────────────────────── */
.po-insert-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    position: relative;
}
.po-insert-zone::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: rgba(255, 111, 145, 0.22);
    pointer-events: none;
}
.po-insert-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 111, 145, 0.45);
    background: #ffffff;
    color: #ff6f91;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition:
        background  0.2s ease,
        border-color 0.2s ease,
        transform   0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.po-insert-btn svg { width: 14px; height: 14px; }
.po-insert-btn:hover {
    background: rgba(255, 111, 145, 0.12);
    border-color: #ff6f91;
    transform: scale(1.22);
}
.po-insert-btn:active { transform: scale(1.0); }

/* ── Page Numbers panel ──────────────────────────────────── */
.po-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: #F8F8FA;
    border-left: 1px solid rgba(0, 0, 0, 0.09);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.10);
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.po-panel.is-open { transform: translateX(0); }

.po-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.po-panel__head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.po-panel__title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.1rem;
    color: #1D1D1F;
}

.po-panel__close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.po-panel__close:hover { background: rgba(255, 111, 145, 0.15); color: #ff6f91; }

.po-panel__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.po-panel__footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
}

.po-btn--half { flex: 1; justify-content: center; }

/* Enable row + badge */
.po-pn-enable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 12px;
    padding: 13px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

.po-pn-badge {
    background: #ff6f91;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.02em;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}
.po-pn-badge[hidden] { display: none; }

/* iOS-style switch */
.po-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.po-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.po-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.po-switch__track {
    display: inline-block;
    width: 42px;
    height: 24px;
    border-radius: 100px;
    background: #D1D1D6;
    transition: background 0.2s ease;
    position: relative;
    cursor: pointer;
}

.po-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.po-switch input:checked + .po-switch__track {
    background: #ff6f91;
}

.po-switch input:checked + .po-switch__track::after {
    transform: translateX(18px);
}

.po-switch-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1D1D1F;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

/* Section cards */
.po-section-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.po-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9898A4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

/* Side-by-side field rows */
.po-field-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.po-field-group--grow { flex: 1; min-width: 0; }
.po-field-group--fixed { flex-shrink: 0; }

.po-num-input--sm { width: 68px; }

/* ── Form fields ─────────────────────────────────────────── */
.po-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.po-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6E6E73;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

.po-field-hint {
    font-size: 0.76rem;
    color: #9898A4;
    line-height: 1.45;
}

/* Toggle row (background checkbox) */
.po-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.po-toggle-row--sm { margin-bottom: 0; }
.po-toggle-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ff6f91;
    cursor: pointer;
    flex-shrink: 0;
}
.po-toggle-label {
    font-size: 0.82rem;
    color: #3D3D3F;
    font-weight: 500;
}

/* Position buttons */
.po-pos-row {
    display: flex;
    gap: 6px;
}
.po-pos-btn {
    flex: 1;
    padding: 8px 4px 7px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid rgba(0, 0, 0, 0.11);
    border-radius: 10px;
    background: #FAFAFA;
    color: #6E6E73;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.po-pos-btn input[type="radio"] { display: none; }
.po-pos-btn.is-sel {
    border-color: #ff6f91;
    color: #ff6f91;
    background: rgba(255, 111, 145, 0.07);
}
.po-pos-btn:hover {
    border-color: rgba(255, 111, 145, 0.5);
    color: #ff6f91;
}

/* Colour row */
.po-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.po-color-row input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 2px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}
.po-color-val {
    font-size: 0.78rem;
    color: #6E6E73;
    font-family: 'Courier New', Courier, monospace;
}
.po-color-row.is-disabled { opacity: 0.38; pointer-events: none; }

/* Select */
.po-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.11);
    background: #FAFAFA;
    font-size: 0.86rem;
    color: #3D3D3F;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}
.po-select:focus { border-color: #ff6f91; }

/* Number input */
.po-num-input {
    width: 80px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.11);
    background: #FAFAFA;
    font-size: 0.86rem;
    color: #3D3D3F;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}
.po-num-input:focus { border-color: #ff6f91; }

.po-num-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.po-num-hint { font-size: 0.80rem; color: #9898A4; }

/* Disabled fields group */
.po-pn-fields.is-disabled {
    opacity: 0.38;
    pointer-events: none;
}

/* ── Download overlay ────────────────────────────────────── */
.po-dl-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.po-dl-overlay[hidden] { display: none; }

.po-dl-panel {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 32px 32px;
    width: 500px;
    max-width: calc(100vw - 40px);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 111, 145, 0.10);
}

.po-dl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.po-dl-title {
    font-family: 'Fredoka One', 'Arial Rounded MT Bold', Arial, cursive;
    font-size: 1.2rem;
    color: #1D1D1F;
}

.po-dl-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Radio group */
.po-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.po-radio-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.10);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}
.po-radio-row:has(input:checked) {
    border-color: rgba(255, 111, 145, 0.55);
    background: rgba(255, 111, 145, 0.05);
}
.po-radio-row input[type="radio"] {
    margin-top: 2px;
    accent-color: #ff6f91;
    flex-shrink: 0;
    cursor: pointer;
}
.po-radio-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.po-radio-label strong { font-size: 0.88rem; color: #1D1D1F; font-weight: 600; }
.po-radio-label span   { font-size: 0.80rem; color: #6E6E73; }

/* Size buttons */
.po-size-row {
    display: flex;
    gap: 12px;
}

.po-size-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.10);
    cursor: pointer;
    background: #FAFAFA;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}
.po-size-btn input[type="radio"] { display: none; }
.po-size-btn.is-sel {
    border-color: rgba(255, 111, 145, 0.55);
    background: rgba(255, 111, 145, 0.06);
}
.po-size-btn:hover {
    border-color: rgba(255, 111, 145, 0.40);
}
.po-size-btn > span:not(.po-size-icon) { font-size: 0.85rem; font-weight: 600; color: #3D3D3F; }
.po-size-btn small { font-size: 0.76rem; color: #9898A4; }

.po-size-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #ffffff;
    border-radius: 3px;
    letter-spacing: 0.03em;
}
.po-size-icon--a4 { width: 34px; height: 48px; background: #ff6f91; }
.po-size-icon--a5 { width: 24px; height: 34px; background: #ff6f91; }

/* ── Loading overlay ─────────────────────────────────────── */
.po-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.90);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.po-loading-overlay[hidden] { display: none; }

.po-spinner {
    width: 46px;
    height: 46px;
    border: 3.5px solid rgba(255, 111, 145, 0.20);
    border-top-color: #ff6f91;
    border-radius: 50%;
    animation: po-spin 0.8s linear infinite;
}
@keyframes po-spin {
    to { transform: rotate(360deg); }
}

.po-loading-msg {
    font-size: 0.9rem;
    color: #6E6E73;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

/* ── Responsive ──────────────────────────────────────────── */
@media ( max-width: 640px ) {
    .po-modal {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        max-width: none;
    }
    .po-panel { width: 100%; }
    .po-drop-zone { padding: 36px 24px; }
    .po-orient-card { padding: 32px 20px 28px; }
    .po-orient-card__options { gap: 10px; }
    .po-orient-option { padding: 18px 10px 14px; }
    .po-toolbar { padding: 10px 50px 10px 14px; }
    .po-toolbar__right { gap: 6px; }
    .po-btn { padding: 8px 14px; font-size: 0.80rem; }
    .po-pages-scroll { padding: 16px 12px; }
    .po-dl-panel { padding: 22px 20px 24px; }
    .po-size-row { flex-direction: column; }
}

/* Freemium subscribe notice inside the PDF organiser editor */
.po-subscribe-notice {
    margin: 14px 16px;
}
