.ps-news-app {
    --ps-news-orange: #f5681f;
    --ps-news-orange-soft: #ffe5d1;
    --ps-news-peach: #f7bc9d;
    --ps-news-ink: #18110d;
    --ps-news-muted: #5f7898;
    --ps-news-line: #dde5ef;
    --ps-news-soft: #f1f5f9;
    --ps-news-card: #ffffff;
    --ps-news-radius: 34px;
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--ps-news-ink);
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

.ps-news-app [hidden] {
    display: none !important;
}

.ps-news-app *,
.ps-news-app *::before,
.ps-news-app *::after {
    box-sizing: border-box;
}

.ps-news-card {
    width: 100%;
    padding: clamp(28px, 5vw, 58px);
    background: var(--ps-news-card);
    border: 1px solid var(--ps-news-line);
    border-radius: var(--ps-news-radius);
    box-shadow: 0 2px 6px rgba(20, 30, 45, 0.10);
}

.ps-news-title {
    margin: 0 0 38px;
    color: var(--ps-news-ink);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.ps-news-title-small {
    margin-bottom: 8px;
    font-size: clamp(30px, 4vw, 46px);
}

.ps-news-subtitle,
.ps-news-eyebrow,
.ps-news-footnote,
.ps-news-status {
    color: var(--ps-news-muted);
}

.ps-news-subtitle {
    margin: 0 0 42px;
    text-align: center;
    font-size: clamp(18px, 2.2vw, 28px);
}

.ps-news-input-panel {
    padding: clamp(24px, 4vw, 34px);
    border: 3px solid var(--ps-news-line);
    border-radius: 42px;
    background: #fffdfa;
}

.ps-news-story-input {
    display: block;
    width: 100%;
    min-height: 160px;
    margin: 0;
    padding: 0;
    resize: vertical;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ps-news-ink);
    font: inherit;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.5;
    box-shadow: none;
}

.ps-news-story-input::placeholder {
    color: var(--ps-news-muted);
    opacity: 1;
}

.ps-news-actions-row,
.ps-news-actions-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ps-news-actions-row {
    justify-content: space-between;
    margin-top: 18px;
}

.ps-news-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    padding: 14px 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ps-news-ink);
    font: inherit;
    font-size: clamp(17px, 1.8vw, 23px);
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.ps-news-button:hover:not(:disabled),
.ps-news-image-option:hover {
    transform: translateY(-1px);
}

.ps-news-button:focus-visible,
.ps-news-image-option:focus-visible,
.ps-news-link-button:focus-visible,
.ps-news-story-input:focus-visible,
.ps-news-edit-title:focus-visible,
.ps-news-edit-content:focus-visible {
    outline: 3px solid rgba(245, 104, 31, 0.35);
    outline-offset: 3px;
}

.ps-news-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ps-news-button-primary {
    background: var(--ps-news-orange);
    color: #fff;
}

.ps-news-button-soft {
    background: var(--ps-news-orange-soft);
}

.ps-news-button-secondary {
    border: 3px solid var(--ps-news-line);
    background: #fff;
}

.ps-news-button-ghost {
    display: flex;
    margin: 18px auto 0;
    min-height: 50px;
    padding: 10px 20px;
}

.ps-news-button-wide {
    display: flex;
    width: min(100%, 850px);
    margin: 16px auto 0;
}

.ps-news-icon {
    font-size: 1.25em;
    line-height: 1;
}

.ps-news-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 42px;
}

.ps-news-step {
    min-height: 190px;
    padding: 24px;
    border-radius: 36px;
    background: var(--ps-news-soft);
}

.ps-news-step-number {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ps-news-orange);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.ps-news-step-text {
    margin: 15px 0 0;
    font-size: clamp(17px, 1.7vw, 23px);
}

.ps-news-image-chip {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    background: var(--ps-news-soft);
}

.ps-news-image-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.ps-news-image-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.ps-news-link-button {
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: var(--ps-news-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ps-news-link-button-danger {
    color: #9d2c2c;
}

.ps-news-modal-view {
    text-align: center;
}

.ps-news-mic-wrap {
    margin: 20px auto 38px;
}

.ps-news-mic-button {
    display: flex;
    width: 146px;
    height: 146px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    background: #ef0000;
    color: #fff;
    font-size: 58px;
    box-shadow: 0 0 0 34px rgba(255, 233, 233, 0.45);
}

.ps-news-wave {
    display: flex;
    height: 70px;
    align-items: end;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.ps-news-wave span {
    display: block;
    width: 13px;
    min-height: 12px;
    border-radius: 999px;
    background: #f59c6b;
    animation: ps-news-wave 1.05s ease-in-out infinite alternate;
}

.ps-news-wave span:nth-child(2) { height: 34px; animation-delay: -0.8s; }
.ps-news-wave span:nth-child(3) { height: 58px; animation-delay: -0.6s; }
.ps-news-wave span:nth-child(4) { height: 42px; animation-delay: -0.4s; }
.ps-news-wave span:nth-child(5) { height: 70px; animation-delay: -0.2s; }
.ps-news-wave span:nth-child(6) { height: 46px; animation-delay: -0.7s; }
.ps-news-wave span:nth-child(7) { height: 30px; animation-delay: -0.5s; }
.ps-news-wave span:nth-child(8) { height: 52px; animation-delay: -0.3s; }
.ps-news-wave span:nth-child(9) { height: 24px; animation-delay: -0.1s; }

@keyframes ps-news-wave {
    from { transform: scaleY(0.45); }
    to { transform: scaleY(1); }
}

.ps-news-transcript {
    width: min(100%, 860px);
    min-height: 130px;
    margin: 0 auto 20px;
    padding: 28px;
    border-radius: 36px;
    background: var(--ps-news-soft);
    text-align: left;
    font-size: clamp(19px, 2vw, 27px);
    line-height: 1.6;
}

.ps-news-status {
    min-height: 28px;
    margin: 0 auto 18px;
    font-size: 16px;
}

.ps-news-image-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 44px 0 46px;
}

.ps-news-image-option {
    appearance: none;
    display: flex;
    min-height: 240px;
    padding: 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border: 3px solid var(--ps-news-line);
    border-radius: 42px;
    background: #fffdfa;
    color: var(--ps-news-ink);
    font: inherit;
    font-size: clamp(19px, 2vw, 27px);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.ps-news-image-option-icon {
    color: var(--ps-news-orange);
    font-size: 56px;
}

.ps-news-eyebrow {
    margin: 0 0 22px;
    font-size: 20px;
}

.ps-news-preview-card {
    overflow: hidden;
    width: min(100%, 900px);
    margin: 0 auto;
    border: 1px solid var(--ps-news-line);
    border-radius: 34px;
    background: #fffdfa;
}

.ps-news-preview-image {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    background: var(--ps-news-soft);
}

.ps-news-preview-copy,
.ps-news-edit-fields {
    padding: clamp(24px, 4vw, 34px);
}

.ps-news-preview-title {
    margin: 0 0 14px;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ps-news-preview-content {
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.7;
}

.ps-news-preview-paragraph {
    margin: 0 0 14px;
}

.ps-news-preview-paragraph:last-child {
    margin-bottom: 0;
}

.ps-news-question {
    margin: 38px 0 20px;
    text-align: center;
    font-size: clamp(22px, 2.4vw, 30px);
}

.ps-news-footnote {
    margin: 26px 0 0;
    text-align: center;
    font-size: 16px;
}

.ps-news-edit-fields {
    text-align: left;
}

.ps-news-field-label {
    display: block;
    margin-bottom: 20px;
    font-weight: 700;
}

.ps-news-edit-title,
.ps-news-edit-content {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 2px solid var(--ps-news-line);
    border-radius: 16px;
    background: #fff;
    color: var(--ps-news-ink);
    font: inherit;
    font-weight: 400;
    box-shadow: none;
}

.ps-news-edit-title {
    font-size: 22px;
}

.ps-news-edit-content {
    resize: vertical;
    font-size: 18px;
    line-height: 1.6;
}

.ps-news-result-view {
    text-align: center;
}

.ps-news-result-icon {
    display: flex;
    width: 100px;
    height: 100px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--ps-news-orange);
    color: #fff;
    font-size: 50px;
    font-weight: 800;
}

.ps-news-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--ps-news-radius);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(3px);
}

.ps-news-loader {
    width: 58px;
    height: 58px;
    border: 6px solid var(--ps-news-line);
    border-top-color: var(--ps-news-orange);
    border-radius: 50%;
    animation: ps-news-spin 0.8s linear infinite;
}

@keyframes ps-news-spin {
    to { transform: rotate(360deg); }
}

.ps-news-loading-text {
    margin: 18px 0 0;
    font-size: 20px;
    font-weight: 700;
}

.ps-news-notice {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 650;
}

.ps-news-notice-error {
    border: 1px solid #d96b6b;
    background: #fff0f0;
    color: #7c1f1f;
}

.ps-news-notice-success {
    border: 1px solid #73a77c;
    background: #eef9f0;
    color: #245f2f;
}

.ps-news-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ps-news-editor-preview {
    border: 1px dashed #b8c3d0;
}

@media (max-width: 760px) {
    .ps-news-card {
        padding: 24px 18px;
        border-radius: 26px;
    }

    .ps-news-title {
        margin-bottom: 24px;
    }

    .ps-news-input-panel {
        padding: 20px;
        border-radius: 28px;
    }

    .ps-news-story-input {
        min-height: 190px;
    }

    .ps-news-actions-row {
        align-items: stretch;
        flex-direction: column;
    }

    .ps-news-actions-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ps-news-actions-row > .ps-news-button {
        width: 100%;
    }

    .ps-news-button {
        min-height: 56px;
        padding: 13px 18px;
    }

    .ps-news-steps {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }

    .ps-news-step {
        min-height: 0;
        padding: 18px;
    }

    .ps-news-step-number {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }

    .ps-news-image-chip {
        grid-template-columns: 48px minmax(0, 1fr) auto;
    }

    .ps-news-image-thumb {
        width: 48px;
        height: 48px;
    }

    .ps-news-link-button-danger {
        grid-column: 3;
    }

    .ps-news-image-options {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 28px 0;
    }

    .ps-news-image-option {
        min-height: 150px;
        border-radius: 28px;
    }

    .ps-news-mic-button {
        width: 112px;
        height: 112px;
        font-size: 44px;
        box-shadow: 0 0 0 24px rgba(255, 233, 233, 0.45);
    }

    .ps-news-transcript {
        padding: 20px;
        border-radius: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ps-news-wave span,
    .ps-news-loader {
        animation: none;
    }

    .ps-news-button,
    .ps-news-image-option {
        transition: none;
    }
}

/* Version 1.1 additions */
.ps-news-icon-svg {
    display: block;
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ps-news-mic-button .ps-news-icon-svg {
    width: 64px;
    height: 64px;
    stroke-width: 1.8;
}

.ps-news-image-option-icon .ps-news-icon-svg {
    width: 64px;
    height: 64px;
}

.ps-news-result-icon .ps-news-icon-svg {
    width: 54px;
    height: 54px;
    stroke-width: 2.4;
}

.ps-news-support-note {
    margin: 14px 4px 0;
    color: var(--ps-news-muted);
    font-size: 15px;
    line-height: 1.45;
}

.ps-news-preview-image-wrap {
    position: relative;
}

.ps-news-preview-image-change {
    appearance: none;
    position: absolute;
    right: 18px;
    bottom: 18px;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ps-news-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(20, 30, 45, 0.12);
}

.ps-news-preview-image-change:focus-visible {
    outline: 3px solid rgba(245, 104, 31, 0.35);
    outline-offset: 3px;
}

.ps-news-preview-add-image {
    margin-top: 18px;
}

@media (max-width: 420px) {
    .ps-news-app {
        min-width: 0;
    }

    .ps-news-card {
        padding: 20px 14px;
        border-radius: 22px;
    }

    .ps-news-title {
        font-size: 32px;
    }

    .ps-news-title-small {
        font-size: 29px;
    }

    .ps-news-input-panel {
        padding: 18px 14px;
        border-width: 2px;
        border-radius: 24px;
    }

    .ps-news-story-input {
        min-height: 180px;
        font-size: 19px;
    }

    .ps-news-actions-right {
        grid-template-columns: 1fr;
    }

    .ps-news-button {
        width: 100%;
        min-height: 54px;
        padding: 12px 14px;
        font-size: 17px;
    }

    .ps-news-image-chip {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 8px 10px;
        padding: 10px;
    }

    .ps-news-image-thumb {
        width: 44px;
        height: 44px;
        grid-row: 1 / 3;
    }

    .ps-news-link-button,
    .ps-news-link-button-danger {
        grid-column: auto;
        justify-self: start;
        padding: 3px 6px 3px 0;
    }

    .ps-news-image-name {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .ps-news-image-option {
        min-height: 132px;
        padding: 22px 16px;
        font-size: 18px;
    }

    .ps-news-image-option-icon .ps-news-icon-svg {
        width: 50px;
        height: 50px;
    }

    .ps-news-mic-button {
        width: 100px;
        height: 100px;
        box-shadow: 0 0 0 18px rgba(255, 233, 233, 0.45);
    }

    .ps-news-mic-button .ps-news-icon-svg {
        width: 48px;
        height: 48px;
    }

    .ps-news-wave {
        gap: 5px;
        margin-top: 30px;
    }

    .ps-news-wave span {
        width: 9px;
    }

    .ps-news-transcript {
        min-height: 110px;
        padding: 18px;
        font-size: 18px;
    }

    .ps-news-preview-copy,
    .ps-news-edit-fields {
        padding: 22px 18px;
    }

    .ps-news-preview-title {
        font-size: 27px;
    }

    .ps-news-preview-content {
        font-size: 18px;
    }

    .ps-news-preview-image-change {
        right: 10px;
        bottom: 10px;
        min-height: 40px;
        padding: 7px 12px;
        font-size: 14px;
    }
}
