html.theme-amber .btn-primary,
body.theme-amber .btn-primary {
    color: #1a1403;
}

html.theme-amber .credentials,
body.theme-amber .credentials {
    color: #1a1403;
    background: color-mix(in srgb, var(--accent-primary) 88%, #fff);
    border-color: color-mix(in srgb, var(--accent-primary) 70%, #000);
}

.ps-wrap {
    width: min(880px, calc(100% - 2rem));
    margin: 2rem auto 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ps-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.15rem 1.35rem;
    align-items: center;
}

.ps-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    border: 3px solid color-mix(in srgb, var(--accent-primary) 45%, var(--bg-color));
    box-shadow: 0 8px 22px var(--ring-glow);
}

.ps-header h1 {
    font-size: 1.85rem;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0.2rem 0 0.35rem;
}

.ps-byline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.ps-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    min-width: 168px;
}

.ps-actions .action-tile {
    min-height: 3.8rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.88rem;
}

.btn-ghost:hover {
    border-color: color-mix(in srgb, var(--accent-primary) 40%, var(--glass-border));
    color: var(--accent-primary);
}

.ps-article {
    padding: 2rem 2.15rem 2.2rem;
}

.ps-article p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.15rem;
}

.read-word {
    border-radius: 4px;
    transition: color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

@media (hover: hover) and (pointer: fine) {
    .ps-article p:hover {
        color: color-mix(in srgb, var(--text-primary) 88%, var(--accent-primary));
    }

    .read-word:hover {
        color: var(--accent-primary);
        background: color-mix(in srgb, var(--accent-primary) 16%, transparent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 16%, transparent);
    }
}

@media print {
    .read-word {
        font-weight: inherit !important;
        color: inherit !important;
        background: none !important;
        box-shadow: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-up {
        transition: none !important;
    }

    .background-orbs .orb {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

.ps-salute {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1.25rem !important;
}

.ps-article a {
    color: var(--accent-primary);
    font-weight: 650;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-primary) 35%, transparent);
}

.ps-article a:hover {
    border-bottom-color: var(--accent-primary);
}

.ps-sign {
    margin-top: 1.75rem !important;
    margin-bottom: 0 !important;
    padding-top: 1.2rem;
    border-top: 1px solid var(--glass-border);
    font-weight: 700;
}

.ps-sign span {
    font-weight: 500;
    color: var(--text-secondary);
}

.ps-foot {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.ps-foot a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 720px) {
    .ps-header {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .ps-actions {
        width: 100%;
    }

    .ps-article {
        padding: 1.35rem 1.2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .ps-wrap {
        width: calc(100% - 1rem);
        margin: 1rem auto 2.5rem;
    }

    .ps-header h1 {
        font-size: 1.55rem;
    }

    .ps-article p {
        font-size: 0.98rem;
        line-height: 1.7;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 1.6cm 2.2cm;
    }

    body {
        background: #fff !important;
        color: #111 !important;
        font-size: 11pt;
        line-height: 1.6;
    }

    .customize-container,
    .background-orbs,
    .scroll-progress,
    #back-to-top,
    .toast,
    .ps-actions,
    .ps-foot {
        display: none !important;
    }

    .ps-wrap {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ps-header {
        display: flex !important;
        align-items: center !important;
        gap: 1.5rem !important;
        background: transparent !important;
        border: none !important;
        border-bottom: 2px solid var(--accent-primary) !important;
        box-shadow: none !important;
        padding: 0 0 1.2rem 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .ps-photo {
        width: 72px !important;
        height: 72px !important;
        border: 2px solid var(--accent-primary) !important;
    }

    .ps-header h1 {
        font-size: 18pt !important;
        color: #0b1220 !important;
        margin: 0.1rem 0 !important;
    }

    .credentials {
        font-size: 8pt !important;
        color: var(--accent-primary) !important;
        border: 1px solid var(--accent-primary) !important;
        background: transparent !important;
        padding: 1px 6px !important;
    }

    .ps-byline {
        font-size: 9.5pt !important;
        color: #475569 !important;
    }

    .ps-article {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .ps-salute {
        font-size: 11.5pt !important;
        font-weight: 700 !important;
        color: #0b1220 !important;
        margin-bottom: 1.2rem !important;
    }

    .ps-article p {
        font-size: 11pt !important;
        color: #1e293b !important;
        line-height: 1.62 !important;
        margin-bottom: 1.05rem !important;
        text-align: left !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
        orphans: 3;
        widows: 3;
    }

    .ps-sign {
        margin-top: 2rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid #cbd5e1 !important;
        font-size: 11pt !important;
        page-break-inside: avoid;
    }
}

/* Inline SVG icon system fallback */
.ic-svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: -0.15em;
    flex: none;
    overflow: visible;
}

