/* Phonetic Spelling Generator – modern mobile-first styles */

/* ===== Page-level horizontal-overflow guard =====
 * The site uses fixed-position elements (navbar, blur orbs in the final CTA section)
 * that can cause a thin right-side gap or horizontal scrollbar. Clip horizontally at
 * the document level so nothing ever leaks past the viewport. */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

/* ===== Critical override: nested <header> elements =====
 * The site-wide critical.css uses a `header` tag selector (not `#header`), so EVERY
 * <header> on the page gets `position: fixed; top: 0; z-index: 1000`. That's a bug:
 * it floats the workbench title and the article header to the top of the viewport
 * on top of the hero. Reset all <header> elements that are NOT the site nav. */
header:not(#header) {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    width: auto !important;
    background: transparent !important;
    padding: revert !important;
    margin: revert !important;
    pointer-events: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Make the site nav fully opaque on tool pages so content does not bleed through. */
header#header .header-container {
    background: #0f172a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ===== Workbench shell ===== */
.ps-workbench {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%);
    border: 1px solid #d1fae5;
    border-radius: 1rem;
    box-shadow: 0 18px 38px -22px rgba(15, 23, 42, 0.28);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.ps-workbench-head {
    text-align: center;
    padding-bottom: 0.25rem;
    border-bottom: 1px dashed #d1fae5;
    margin-bottom: 0.25rem;
}
.ps-workbench-sub {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
    color: #64748b;
}
.ps-workbench-sub i {
    color: #059669;
    font-size: 0.9rem;
    vertical-align: -2px;
}

/* ===== Steps ===== */
.ps-step {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ps-step:hover {
    border-color: #cbd5e1;
}
.ps-step--cta {
    background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
    border-color: #a7f3d0;
}
.ps-step-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
}
.ps-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px -4px rgba(5, 150, 105, 0.6);
    flex-shrink: 0;
}
.ps-step-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

/* Status line under textarea */
.ps-status {
    margin-top: 0.45rem;
    min-height: 1.2em;
    font-size: 0.82rem;
    text-align: center;
    color: #64748b;
}

/* ===== Controls grid (Step 2) ===== */
.ps-controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}
.ps-control {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    padding: 0.75rem;
}
.ps-control-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
}
.ps-control-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ps-option-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Tooltip — positioned BELOW the trigger so it never collides with the fixed header */
.ps-tip {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: help;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.ps-tip:hover,
.ps-tip:focus-visible {
    background: #d1fae5;
    border-color: #6ee7b7;
    outline: none;
}
.ps-tip::before,
.ps-tip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
    /* Above fixed header (z-index: 1000) */
    z-index: 1050;
}
.ps-tip::before {
    content: attr(data-tip);
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #0f172a;
    color: #fff;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    width: max-content;
    max-width: min(260px, 78vw);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.45);
}
.ps-tip::after {
    content: '';
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #0f172a;
}
.ps-tip:hover::before,
.ps-tip:hover::after,
.ps-tip:focus-visible::before,
.ps-tip:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Input area */
.ps-input-v2 {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
    resize: vertical;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    min-height: 7rem;
}
.ps-input-v2:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Main button (Generate transcription) */
.ps-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.02rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: transform 60ms ease, box-shadow 150ms ease, opacity 150ms ease;
    box-shadow: 0 10px 22px -8px rgba(5, 150, 105, 0.55);
}
.ps-btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -10px rgba(5, 150, 105, 0.65);
}
.ps-btn-main:active {
    transform: translateY(0);
}
.ps-btn-main:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
.ps-btn-icon {
    display: inline-flex;
    align-items: center;
    font-size: 1.15rem;
    transition: transform 150ms ease;
}
.ps-btn-main:hover .ps-btn-icon {
    transform: translateX(3px);
}

/* Option buttons (Accent, Display) */
.ps-option-btn {
    display: flex;
    cursor: pointer;
}
.ps-option-btn input.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.ps-option-label {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    line-height: 1.25;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 60ms ease;
}
.ps-option-label small {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 1px;
}
.ps-option-btn:hover .ps-option-label {
    border-color: #94a3b8;
    background: #f8fafc;
}
.ps-option-btn input:focus-visible + .ps-option-label {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}
.ps-option-btn input:checked + .ps-option-label {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: #059669;
    color: #ffffff;
    box-shadow: 0 8px 18px -10px rgba(5, 150, 105, 0.6);
}
.ps-option-btn input:checked + .ps-option-label small {
    color: rgba(255, 255, 255, 0.85);
}

/* Checkbox buttons */
.ps-checkbox-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    padding: 0.4rem 0.55rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: background 150ms ease, border-color 150ms ease;
}
.ps-checkbox-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.ps-checkbox-btn input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.ps-check-indicator {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    flex-shrink: 0;
    background: #ffffff;
}
.ps-check-indicator::after {
    content: '';
    width: 0.35rem;
    height: 0.72rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 150ms ease;
    margin-bottom: 2px;
}
.ps-checkbox-btn input:checked + .ps-check-indicator {
    background: #059669;
    border-color: #059669;
}
.ps-checkbox-btn input:checked + .ps-check-indicator::after {
    transform: rotate(45deg) scale(1);
}
.ps-checkbox-btn input:focus-visible + .ps-check-indicator {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}
.ps-checkbox-label {
    color: #334155;
    font-size: 0.86rem;
    font-weight: 500;
}

/* Link button (Open IPA keyboard) */
.ps-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.45rem 0.55rem;
    background: #ecfdf5;
    border: 1px dashed #a7f3d0;
    border-radius: 0.5rem;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ps-link-btn i {
    font-size: 0.95rem;
}
.ps-link-btn:hover {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

/* Output card */
#ps-output-card {
    transition: opacity 300ms ease;
}
#ps-output-card:not(.hidden) {
    display: block;
    animation: fadeIn 300ms ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Output area */
.ps-output-v2 {
    min-height: 4rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 1rem;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 2;
    color: #1f2937;
    word-wrap: break-word;
    white-space: normal;
}

/* Token styling */
.ps-row { display: inline; }
.ps-row[data-which="text"] { color: #6b7280; }
.ps-row[data-which="ipa"]  { color: #1f2937; font-weight: 500; }

.ps-side .ps-row[data-which="text"],
.ps-lines .ps-row[data-which="text"] {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.15rem;
}
.ps-side .ps-row[data-which="ipa"],
.ps-lines .ps-row[data-which="ipa"] {
    display: block;
    font-size: 1.05rem;
}

.ps-lines .ps-line-block {
    padding: 0.4rem 0;
    border-bottom: 1px dashed #e5e7eb;
}
.ps-lines .ps-line-block:last-child { border-bottom: none; }

.ps-tok {
    display: inline-block;
    padding: 1px 2px;
    border-radius: 3px;
    cursor: default;
    transition: background 100ms ease;
}
.ps-tok.tok-multi {
    color: #047857;
    cursor: pointer;
    border-bottom: 1px dotted #047857;
}
.ps-tok.tok-multi:hover,
.ps-tok.tok-multi:focus {
    background: rgba(5, 150, 105, 0.08);
    outline: none;
}
.ps-tok.tok-missing {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.ps-tok.tok-weak { font-style: italic; }
.ps-tok.tok-acronym { letter-spacing: 0.02em; }
.ps-tok.is-playing,
.ps-word-orig.is-playing {
    background: #fde68a;
    color: #92400e;
}
.ps-tok.is-editable {
    outline: 1px dashed #9ca3af;
    background: #fff;
}
.ps-punct { color: inherit; }

/* Output card toolbar: title + audio row never overlap */
.ps-output-toolbar {
    min-width: 0;
}
.ps-audio-controls {
    min-width: 0;
}

/* Icon buttons (square — keep label text out; use aria-label only) */
.ps-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 150ms ease;
}
.ps-icon-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Toggle button (loop) */
.ps-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 150ms ease;
}
.ps-toggle-btn input:checked + .ps-toggle-icon {
    color: #059669;
}
.ps-toggle-btn:has(input:checked) {
    background: #ecfdf5;
    border-color: #059669;
}
.ps-toggle-btn:hover {
    background: #f3f4f6;
}

/* Voice select */
.ps-select-voice {
    min-width: 0;
    max-width: min(14rem, 55vw);
    padding: 0.4rem 0.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
}
.ps-select-voice:focus {
    outline: none;
    border-color: #059669;
}

/* Speed dropdown (shorter labels than voice list) */
.ps-select-rate {
    max-width: min(9.5rem, 46vw);
}

/* Action buttons (Copy, Share, Export) */
.ps-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}
.ps-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Legend dots */
.ps-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    vertical-align: middle;
}
.ps-legend-dot.is-multi   { background: #047857; }
.ps-legend-dot.is-missing { background: #dc2626; }
.ps-legend-dot.is-weak    { background: #7c3aed; }
.ps-legend-dot.is-acronym { background: #d97706; }

/* Popup for multiple pronunciations */
.ps-popup {
    position: absolute;
    z-index: 80;
    min-width: 11rem;
    max-width: 20rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.375rem;
}
.ps-popup-head {
    padding: 0.3rem 0.5rem 0.4rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}
.ps-popup-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}
.ps-popup-item:hover { background: #ecfdf5; }
.ps-popup-ipa  { font-weight: 600; color: #1f2937; }
.ps-popup-label{ font-size: 0.7rem; color: #6b7280; }

/* Virtual IPA keyboard */
.ps-kb-panel {
    margin-top: 0.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.ps-kb-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    flex-wrap: wrap;
}
.ps-kb-label {
    flex: 0 0 6rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ps-kb-keys {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.ps-kb-key {
    min-width: 2rem;
    padding: 0.3rem 0.5rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    color: #1f2937;
    cursor: pointer;
    transition: background 100ms ease, transform 60ms ease;
}
.ps-kb-key:hover { background: #e5e7eb; }
.ps-kb-key:active { transform: translateY(1px); }
.ps-kb-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.ps-kb-act {
    padding: 0.35rem 0.6rem;
    background: #1f2937;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.8rem;
}
.ps-kb-act:hover { background: #374151; }

/* Print / PDF */
@media print {
    @page {
        margin: 15mm 18mm 20mm 18mm;
        size: auto;
    }

    body.ps-printing > *:not(#print-area) { display: none !important; }

    #print-area {
        display: block !important;
        padding: 0;
        max-width: 100%;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        color: #1f2937;
    }

    /* Print Header */
    .ps-print-header {
        margin-bottom: 1.5rem;
    }

    .ps-print-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .ps-print-logo {
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .ps-print-brand-name {
        font-size: 1.5rem;
        font-weight: 700;
        color: #059669;
        letter-spacing: -0.02em;
    }

    .ps-print-meta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .ps-print-tag {
        display: inline-block;
        padding: 0.35rem 0.75rem;
        background: #ecfdf5;
        border: 1px solid #a7f3d0;
        border-radius: 2rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: #047857;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .ps-print-date {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .ps-print-divider {
        height: 3px;
        background: linear-gradient(90deg, #059669 0%, #34d399 50%, #059669 100%);
        border-radius: 2px;
        margin-top: 0.75rem;
    }

    /* Print Content */
    .ps-print-content {
        margin: 1.25rem 0;
    }

    #print-area .ps-output-v2 {
        background: #ffffff !important;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1.25rem !important;
        line-height: 2;
        font-size: 1rem;
    }

    #print-area .ps-word-block {
        margin-bottom: 0.75rem;
    }

    #print-area .ps-tok {
        padding: 0.15rem 0.25rem;
    }

    /* Print Footer */
    .ps-print-footer {
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
    }

    .ps-print-footer-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }

    .ps-print-footer-left,
    .ps-print-footer-right {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .ps-print-footer-left {
        align-items: flex-start;
    }

    .ps-print-footer-right {
        align-items: flex-end;
    }

    .ps-print-footer-brand {
        font-size: 0.95rem;
        font-weight: 600;
        color: #111827;
    }

    .ps-print-footer-url {
        font-size: 0.8rem;
        color: #059669;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .ps-print-powered {
        font-size: 0.85rem;
        font-weight: 500;
        color: #374151;
    }

    .ps-print-copyright {
        font-size: 0.75rem;
        color: #9ca3af;
    }

    /* Ensure links are visible but not underlined in print */
    #print-area a {
        color: inherit;
        text-decoration: none;
    }
}

#print-area { display: none; }
body.ps-printing #print-area { display: block; }

/* Mobile optimizations */
@media (max-width: 640px) {
    .ps-workbench {
        padding: 0.85rem;
        gap: 0.7rem;
    }
    .ps-workbench-sub {
        font-size: 0.8rem;
    }
    .ps-step {
        padding: 0.8rem;
    }
    .ps-step-title {
        font-size: 0.9rem;
    }
    .ps-step-badge {
        font-size: 0.62rem;
        padding: 0.18rem 0.5rem;
    }
    .ps-control {
        padding: 0.65rem;
    }
    .ps-control-title {
        font-size: 0.74rem;
    }
    .ps-tip::before {
        width: min(210px, 74vw);
    }
    .ps-input-v2 {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    .ps-btn-main {
        padding: 0.85rem 1rem;
        font-size: 0.98rem;
    }
    .ps-option-label {
        padding: 0.5rem 0.6rem;
        font-size: 0.84rem;
    }
    .ps-output-v2 {
        padding: 0.75rem;
        font-size: 0.95rem;
        line-height: 1.9;
    }
    .ps-icon-btn,
    .ps-toggle-btn {
        width: 1.75rem;
        height: 1.75rem;
    }
    .ps-select-voice {
        padding: 0.35rem 0.5rem;
        font-size: 0.8125rem;
        max-width: 130px;
    }
    .ps-action-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8125rem;
    }
}

@media (min-width: 768px) {
    .ps-workbench {
        padding: 1.5rem;
    }
    .ps-controls-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }
    .ps-step {
        padding: 1.1rem 1.25rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .ps-option-btn input:checked + .ps-option-label {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
    .ps-checkbox-btn input:checked + .ps-check-indicator {
        outline: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
