/* Samzaro Podcast Tool — Premium visual redesign
   Scope: visual layer only, no structural or behavioral changes.
*/

.spp-app {
    --bg: #fff8f1;
    --bg-soft: #fff7ed;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --panel-alt: #2e1065;
    --panel-soft: #faf5ff;
    --text: #2e1065;
    --text-soft: #4b5563;
    --muted: #7c7b90;
    --line: rgba(109, 40, 217, 0.08);
    --line-strong: rgba(109, 40, 217, 0.14);
    --shadow-soft: 0 18px 44px rgba(77, 37, 139, 0.08);
    --shadow: 0 28px 72px rgba(77, 37, 139, 0.14);
    --primary: #6d28d9;
    --primary-hover: #5b21b6;
    --primary-soft: #f3e8ff;
    --orange: #f59e0b;
    --apricot: #fdba74;
    --cream: #fff7ed;
    --beige: #fff8f1;
    --mint: #d1fae5;
    --mint-strong: #a7f3d0;
    --sky: #dbeafe;
    --lavender: #e9d5ff;
    --pink: #ec4899;
    --free: #16a34a;
    --premium: #f59e0b;
    --vip: #7c3aed;
    --business: #0f766e;
    position: relative;
    isolation: isolate;
    overflow: clip;
    max-width: 1260px;
    margin: 0 auto;
    padding: 18px 14px 28px;
    color: var(--text);
    font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", "Nunito Sans", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.spp-app::before,
.spp-app::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 999px;
    filter: blur(44px);
    opacity: 0.7;
    pointer-events: none;
}

.spp-app::before {
    width: 360px;
    height: 360px;
    top: 24px;
    left: -90px;
    background: radial-gradient(circle, rgba(253, 186, 116, 0.18) 0%, rgba(253, 186, 116, 0.07) 46%, transparent 72%);
}

.spp-app::after {
    width: 420px;
    height: 420px;
    right: -120px;
    top: 180px;
    background: radial-gradient(circle, rgba(233, 213, 255, 0.22) 0%, rgba(219, 234, 254, 0.12) 48%, transparent 72%);
}

.spp-app > * {
    position: relative;
    z-index: 1;
}

.spp-app * {
    box-sizing: border-box;
}

.spp-app a {
    color: inherit;
    text-decoration: none;
}

.spp-app img {
    max-width: 100%;
}

.spp-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 20px;
    margin: 0 0 18px;
    border-radius: 30px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 28px 72px rgba(46, 16, 101, 0.22);
}

.spp-hero::before,
.spp-hero::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
}

.spp-hero::before {
    width: 260px;
    height: 260px;
    top: -78px;
    right: -42px;
    background: radial-gradient(circle, rgba(253, 186, 116, 0.36) 0%, rgba(253, 186, 116, 0.14) 42%, transparent 72%);
    filter: blur(10px);
}

.spp-hero::after {
    width: 240px;
    height: 240px;
    left: -46px;
    bottom: -108px;
    background: radial-gradient(circle, rgba(167, 243, 208, 0.26) 0%, rgba(167, 243, 208, 0.08) 48%, transparent 74%);
    filter: blur(14px);
}

.spp-hero-copy,
.spp-hero-topline {
    position: relative;
    z-index: 1;
}

.spp-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.spp-eyebrow {
    margin: 0;
    color: var(--spp-hero-tool-name-color, rgba(255, 255, 255, 0.72));
    font-size: calc(var(--spp-hero-tool-name-size, 11) * 1px);
    line-height: 1.1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

.spp-hero-topline {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
}

.spp-hero-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    flex-wrap: wrap;
}

.spp-hero-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0;
    min-width: 0;
    line-height: 1.02;
}

.spp-hero h2.spp-hero-heading {
    font-size: inherit;
}

.spp-hero-greeting-text {
    color: var(--spp-hero-greeting-color, #ffffff);
    font-size: clamp(24px, calc(var(--spp-hero-greeting-size, 34) * 0.72px + 1.05vw), calc(var(--spp-hero-greeting-size, 34) * 1px));
    font-weight: 700;
}

.spp-hero-user-name {
    color: var(--spp-hero-user-name-color, #ffffff);
    font-size: clamp(25px, calc(var(--spp-hero-user-name-size, 34) * 0.72px + 1.08vw), calc(var(--spp-hero-user-name-size, 34) * 1px));
    font-weight: 800;
    word-break: break-word;
}

.spp-hero-greeting-emoji {
    font-size: clamp(20px, calc(var(--spp-hero-greeting-size, 34) * 0.62px + 0.82vw), calc(var(--spp-hero-greeting-size, 34) * 0.92px));
    line-height: 1;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.14));
}

.spp-subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--spp-hero-description-color, rgba(255, 255, 255, 0.82));
    font-size: calc(var(--spp-hero-description-size, 13) * 1px);
    line-height: 1.65;
}

.spp-membership-pill,
.spp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.spp-membership-pill {
    align-self: flex-start;
    min-height: 42px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.spp-hero-actions .spp-membership-pill {
    align-self: auto;
    margin-right: auto;
}

.spp-membership-pill--free,
.spp-badge--free {
    color: #166534;
    background: rgba(209, 250, 229, 0.9);
    border-color: rgba(22, 163, 74, 0.14);
}

.spp-membership-pill--premium,
.spp-badge--premium {
    color: #9a3412;
    background: rgba(255, 237, 213, 0.95);
    border-color: rgba(245, 158, 11, 0.18);
}

.spp-membership-pill--vip,
.spp-badge--vip {
    color: #5b21b6;
    background: rgba(243, 232, 255, 0.94);
    border-color: rgba(109, 40, 217, 0.16);
}

.spp-membership-pill--business,
.spp-badge--business {
    color: #115e59;
    background: rgba(209, 250, 229, 0.92);
    border-color: rgba(15, 118, 110, 0.16);
}

.spp-hero .spp-membership-pill--free,
.spp-hero .spp-membership-pill--premium,
.spp-hero .spp-membership-pill--vip,
.spp-hero .spp-membership-pill--business {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.spp-section {
    margin: 0 0 18px;
}

.spp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.spp-section-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.spp-category-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
}

.spp-category-row::-webkit-scrollbar {
    display: none;
}

.spp-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(109, 40, 217, 0.08);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(77, 37, 139, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
    backdrop-filter: blur(14px);
}

.spp-category-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(109, 40, 217, 0.16);
    box-shadow: 0 14px 28px rgba(77, 37, 139, 0.09);
}

.spp-category-chip.is-active {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.96) 0%, rgba(91, 33, 182, 0.98) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 16px 30px rgba(109, 40, 217, 0.24);
}

.spp-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.spp-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.84) 100%);
    border: 1px solid rgba(109, 40, 217, 0.08);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    min-width: 0;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    backdrop-filter: blur(18px);
}

.spp-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(253, 186, 116, 0.08) 0%, rgba(233, 213, 255, 0.04) 48%, rgba(209, 250, 229, 0.08) 100%);
    pointer-events: none;
}

.spp-card:hover {
    transform: translateY(-4px);
    border-color: rgba(109, 40, 217, 0.14);
    box-shadow: var(--shadow);
}

.spp-card > * {
    position: relative;
    z-index: 1;
}

.spp-card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(253, 186, 116, 0.22), transparent 38%),
        linear-gradient(135deg, #fdf2e2 0%, #e9d5ff 50%, #dbeafe 100%);
}

.spp-card-media {
    display: block;
    width: 100%;
    height: 100%;
}

.spp-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(46, 16, 101, 0.02) 0%, rgba(46, 16, 101, 0.3) 100%);
    pointer-events: none;
}

.spp-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 0.45s ease;
}

.spp-card:hover .spp-card-cover img {
    transform: scale(1.05);
}

.spp-card-topbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 2;
}

.spp-card-favorite {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(46, 16, 101, 0.16);
    backdrop-filter: blur(16px);
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.spp-card-favorite:hover {
    transform: translateY(-1px) scale(1.02);
}

.spp-card-favorite.is-favorited {
    background: rgba(236, 72, 153, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.spp-lock-overlay {
    position: absolute;
    inset: auto 12px 12px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(46, 16, 101, 0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(46, 16, 101, 0.18);
}

.spp-card-body {
    padding: 16px 16px 18px;
}

.spp-card-body h4 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.spp-card-body p {
    margin: 0 0 12px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.62;
}

.spp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spp-card-meta-chip,
.spp-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(109, 40, 217, 0.08);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.spp-card-meta-chip--level {
    background: var(--primary-soft);
    border-color: rgba(109, 40, 217, 0.12);
    color: var(--primary);
}

.spp-empty {
    padding: 22px 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 247, 237, 0.88) 100%);
    border: 1px dashed rgba(109, 40, 217, 0.16);
    color: var(--muted);
    text-align: center;
    box-shadow: 0 14px 32px rgba(77, 37, 139, 0.06);
}

.spp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.spp-back-link:hover {
    color: var(--primary-hover);
}

.spp-detail,
.spp-locked-card,
.spp-rich-description {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.84) 100%);
    border: 1px solid rgba(109, 40, 217, 0.08);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.spp-detail {
    padding: 18px;
    margin-bottom: 18px;
}

.spp-detail-hero {
    display: grid;
    gap: 18px;
}

.spp-detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at top right, rgba(253, 186, 116, 0.22), transparent 38%),
        linear-gradient(135deg, #fdf2e2 0%, #e9d5ff 55%, #dbeafe 100%);
    box-shadow: 0 18px 40px rgba(77, 37, 139, 0.12);
}

.spp-detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(46, 16, 101, 0.02) 0%, rgba(46, 16, 101, 0.18) 100%);
    pointer-events: none;
}

.spp-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spp-detail-content h1 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: clamp(28px, 5.6vw, 42px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.spp-detail-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.spp-detail-description {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.72;
}

.spp-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.spp-player-wrap {
    margin-bottom: 16px;
}

.spp-player-wrap video,
.spp-player-wrap audio {
    width: 100%;
    border: 1px solid rgba(109, 40, 217, 0.08);
    border-radius: 24px;
    background: linear-gradient(145deg, #2e1065 0%, #6d28d9 100%);
    box-shadow: 0 18px 44px rgba(77, 37, 139, 0.16);
}

.spp-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spp-button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.spp-button:hover {
    transform: translateY(-1px);
}

.spp-button:focus-visible,
.spp-card-favorite:focus-visible,
.spp-category-chip:focus-visible,
.spp-modal-close:focus-visible,
.spp-pdf-icon:focus-visible,
.spp-ai-prompt:focus-visible,
.spp-ai-window-button:focus-visible,
.spp-ai-launcher:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.14);
}

.spp-button--primary {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(109, 40, 217, 0.24);
}

.spp-button--primary:hover {
    background: linear-gradient(135deg, #7b34ec 0%, #5b21b6 100%);
}

.spp-button--ghost,
.spp-button--like,
.spp-button--favorite {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-color: rgba(109, 40, 217, 0.14);
    box-shadow: 0 10px 24px rgba(77, 37, 139, 0.06);
}

.spp-button--ghost:hover,
.spp-button--like:hover,
.spp-button--favorite:hover {
    background: #faf5ff;
    border-color: rgba(109, 40, 217, 0.22);
}

.spp-button--like.is-liked,
.spp-button--favorite.is-favorited {
    background: rgba(252, 231, 243, 0.96);
    color: #be185d;
    border-color: rgba(236, 72, 153, 0.18);
}

.spp-rich-description {
    padding: 22px;
    line-height: 1.82;
    color: var(--text-soft);
}

.spp-rich-description h1,
.spp-rich-description h2,
.spp-rich-description h3,
.spp-rich-description h4,
.spp-rich-description h5,
.spp-rich-description h6 {
    color: var(--text);
    letter-spacing: -0.02em;
}

.spp-rich-description > :first-child {
    margin-top: 0;
}

.spp-rich-description > :last-child {
    margin-bottom: 0;
}

.spp-detail--locked {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.spp-locked-card {
    padding: 32px 22px;
    text-align: center;
}

.spp-locked-card h2 {
    margin: 14px 0 10px;
    color: var(--text);
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.spp-locked-card p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.72;
}

.spp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.spp-modal.is-open {
    display: block;
}

.spp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(46, 16, 101, 0.38);
    backdrop-filter: blur(14px);
}

.spp-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 500px);
    margin: 9vh auto 0;
    padding: 26px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 241, 0.96) 100%);
    box-shadow: 0 30px 90px rgba(46, 16, 101, 0.24);
    border: 1px solid rgba(109, 40, 217, 0.08);
}

.spp-modal-close,
.spp-pdf-icon {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.spp-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(109, 40, 217, 0.06);
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}

.spp-modal-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.spp-modal-dialog h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.spp-modal-message {
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 18px;
}

.spp-modal--pdf .spp-modal-backdrop {
    background: rgba(46, 16, 101, 0.5);
}

.spp-pdf-shell {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    background:
        radial-gradient(circle at top right, rgba(253, 186, 116, 0.12), transparent 24%),
        radial-gradient(circle at left bottom, rgba(167, 243, 208, 0.12), transparent 24%),
        linear-gradient(145deg, #1b1039 0%, #2e1065 44%, #3f1d85 100%);
}

.spp-pdf-toolbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 8, 41, 0.38);
    backdrop-filter: blur(16px);
}

.spp-pdf-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
}

.spp-pdf-toolbar-center {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spp-pdf-title {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.spp-pdf-counter {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    font-weight: 700;
}

.spp-pdf-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}

.spp-pdf-nav .spp-button {
    flex: 1;
    min-height: 44px;
}

.spp-pdf-nav .spp-button--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.spp-pdf-nav .spp-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.spp-pdf-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 14px 24px;
    overflow: auto;
}

.spp-pdf-canvas {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
    background: #fff;
}

.spp-pdf-loading {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    backdrop-filter: blur(12px);
}

.spp-no-scroll {
    overflow: hidden;
}

/* AI Coach surfaces */
.spp-ai-coach {
    margin: 18px 0 0;
    padding: 20px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 241, 0.9) 100%);
    border: 1px solid rgba(109, 40, 217, 0.08);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.spp-ai-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.spp-ai-head h3 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.spp-ai-usage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(243, 232, 255, 0.92);
    color: #5b21b6;
    font-weight: 900;
    font-size: 13px;
}

.spp-ai-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 460px;
    overflow: auto;
    padding: 4px 2px 6px;
}

.spp-ai-message {
    display: flex;
}

.spp-ai-message.is-user {
    justify-content: flex-end;
}

.spp-ai-bubble {
    max-width: min(760px, 92%);
    padding: 14px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.62;
    box-shadow: 0 12px 28px rgba(77, 37, 139, 0.06);
}

.spp-ai-message.is-assistant .spp-ai-bubble {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(109, 40, 217, 0.08);
    color: var(--text);
}

.spp-ai-message.is-user .spp-ai-bubble {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    color: #fff;
}

.spp-ai-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.spp-ai-prompt {
    border: 1px solid rgba(109, 40, 217, 0.14);
    background: rgba(250, 245, 255, 0.92);
    color: #6d28d9;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.spp-ai-prompt:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(109, 40, 217, 0.12);
}

.spp-ai-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.spp-ai-input {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(109, 40, 217, 0.1);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    resize: vertical;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.spp-ai-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.spp-ai-submit {
    align-self: flex-end;
}

.spp-ai-footer {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.spp-ai-recommendations {
    margin-top: 16px;
}

.spp-ai-rec-title {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--text);
}

.spp-ai-rec-list {
    display: grid;
    gap: 12px;
}

.spp-ai-rec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(109, 40, 217, 0.08);
    box-shadow: 0 10px 24px rgba(77, 37, 139, 0.04);
}

.spp-ai-rec-copy h4,
.spp-ai-rec-title,
.spp-ai-window-title strong {
    letter-spacing: -0.02em;
}

.spp-ai-rec-copy h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text);
}

.spp-ai-rec-copy p,
.spp-ai-rec-copy small,
.spp-ai-rec-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.spp-app--floating-ai {
    max-width: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 99998;
}

.spp-ai-coach--floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.spp-ai-launcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 232px;
    padding: 14px 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2e1065 0%, #6d28d9 100%);
    color: #fff;
    box-shadow: 0 22px 52px rgba(46, 16, 101, 0.28);
    cursor: pointer;
}

.spp-ai-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.spp-ai-launcher-icon svg {
    width: 24px;
    height: 24px;
}

.spp-ai-launcher-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.15;
}

.spp-ai-launcher-copy strong {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
}

.spp-ai-launcher-copy small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.76);
}

.spp-ai-launcher-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ec4899;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(236, 72, 153, 0.35);
}

.spp-ai-window {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(420px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 110px));
    display: none;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 241, 0.96) 100%);
    border: 1px solid rgba(109, 40, 217, 0.1);
    box-shadow: 0 30px 80px rgba(46, 16, 101, 0.22);
    backdrop-filter: blur(16px);
}

.spp-ai-coach--floating.is-open .spp-ai-window {
    display: flex;
}

.spp-ai-coach--floating.is-minimized .spp-ai-window-body {
    display: none;
}

.spp-ai-coach--floating.is-minimized .spp-ai-window {
    height: auto;
}

.spp-ai-coach--floating.is-minimized .spp-ai-window-header {
    border-bottom: 0;
}

.spp-ai-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(243, 232, 255, 0.92) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-bottom: 1px solid rgba(109, 40, 217, 0.08);
}

.spp-ai-window-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.spp-ai-window-title strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.spp-ai-window-title small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.spp-ai-window-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #6d28d9;
    color: #fff;
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.24);
}

.spp-ai-window-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spp-ai-window-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(109, 40, 217, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.spp-ai-window-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 14px;
}

.spp-ai-coach--floating .spp-ai-thread {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 2px 2px 8px;
}

.spp-ai-coach--floating .spp-ai-message {
    gap: 10px;
    align-items: flex-end;
}

.spp-ai-coach--floating .spp-ai-message.is-user {
    justify-content: flex-end;
}

.spp-ai-coach--floating .spp-ai-message.is-user .spp-ai-avatar {
    order: 2;
}

.spp-ai-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(243, 232, 255, 0.92);
    color: #5b21b6;
    font-size: 11px;
    font-weight: 900;
}

.spp-ai-avatar.is-user {
    background: #2e1065;
    color: #fff;
}

.spp-ai-coach--floating .spp-ai-bubble {
    max-width: 78%;
    padding: 14px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.58;
}

.spp-ai-coach--floating .spp-ai-message.is-user .spp-ai-bubble {
    border-bottom-right-radius: 8px;
}

.spp-ai-coach--floating .spp-ai-message.is-assistant .spp-ai-bubble {
    border-bottom-left-radius: 8px;
}

.spp-ai-coach--floating .spp-ai-message.is-welcome .spp-ai-bubble {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 245, 255, 0.98) 100%);
    border: 1px solid rgba(109, 40, 217, 0.12);
}

.spp-ai-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.spp-ai-coach--floating .spp-ai-input {
    min-height: 54px;
    max-height: 140px;
    border-radius: 18px;
    resize: none;
}

.spp-ai-coach--floating .spp-ai-submit {
    align-self: stretch;
    min-width: 92px;
}

.spp-ai-coach--floating .spp-ai-footer {
    padding: 10px 2px 0;
}

.spp-ai-coach--floating .spp-ai-recommendations {
    margin-top: 14px;
}

.spp-ai-rec-topline {
    margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 639px) {
    .spp-app {
        padding: 12px 12px 22px;
    }

    .spp-hero {
        gap: 10px;
        padding: 18px 16px 16px;
        border-radius: 24px;
        margin-bottom: 14px;
    }

    .spp-eyebrow {
        font-size: max(10px, calc(var(--spp-hero-tool-name-size, 11) * 0.92px));
    }

    .spp-hero-topline {
        width: 100%;
    }

    .spp-hero-actions {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .spp-hero-actions .spp-language-switcher {
        margin-left: auto;
    }

    .spp-subtitle {
        max-width: 100%;
        font-size: max(12px, calc(var(--spp-hero-description-size, 13) * 0.96px));
    }

    .spp-detail,
    .spp-rich-description,
    .spp-locked-card,
    .spp-modal-dialog {
        border-radius: 24px;
    }

    .spp-rich-description {
        padding: 18px;
    }

    .spp-action-row .spp-button,
    .spp-pdf-nav .spp-button {
        width: 100%;
    }
}

@media (min-width: 640px) {
    .spp-app {
        padding: 20px 18px 32px;
    }

    .spp-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spp-detail-hero {
        grid-template-columns: 280px minmax(0, 1fr);
        align-items: start;
    }

    .spp-pdf-toolbar {
        grid-template-columns: auto 1fr auto;
        padding: 16px 20px;
    }

    .spp-pdf-nav {
        grid-column: auto;
        justify-content: flex-end;
    }

    .spp-pdf-nav .spp-button {
        flex: 0 0 auto;
        min-width: 136px;
    }

    .spp-pdf-stage {
        padding: 22px;
    }
}

@media (min-width: 960px) {
    .spp-hero {
        padding: 24px 26px 22px;
    }

    .spp-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1180px) {
    .spp-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .spp-ai-head,
    .spp-ai-rec {
        flex-direction: column;
        align-items: flex-start;
    }

    .spp-ai-usage {
        min-width: 0;
    }

    .spp-ai-bubble {
        max-width: 100%;
    }

    .spp-ai-submit,
    .spp-ai-rec .spp-button {
        width: 100%;
    }

    .spp-ai-coach--floating {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .spp-ai-launcher {
        width: 100%;
        min-width: 0;
    }

    .spp-ai-window {
        right: 0;
        left: 0;
        bottom: 78px;
        width: auto;
        height: min(72vh, 620px);
    }

    .spp-ai-input-row {
        flex-direction: column;
    }

    .spp-ai-coach--floating .spp-ai-submit {
        width: 100%;
    }

    .spp-ai-coach--floating .spp-ai-bubble {
        max-width: calc(100% - 44px);
    }
}

.spp-language-switcher {
    --spp-language-flag-size: 24px;
    --spp-language-padding: clamp(4px, calc(var(--spp-language-flag-size) / 6), 10px);
    --spp-language-gap: max(4px, calc(var(--spp-language-padding) * 0.7));
    --spp-language-pill-height: calc(var(--spp-language-flag-size) + (var(--spp-language-padding) * 2));
    --spp-language-segment-width: calc(var(--spp-language-flag-size) + (var(--spp-language-padding) * 1.7));
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(var(--spp-language-segment-width), 1fr));
    align-items: center;
    gap: var(--spp-language-gap);
    padding: var(--spp-language-padding);
    min-width: calc((var(--spp-language-segment-width) * 2) + var(--spp-language-gap) + (var(--spp-language-padding) * 2));
    min-height: calc(var(--spp-language-pill-height) + (var(--spp-language-padding) * 2));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 34px rgba(46, 16, 101, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.spp-language-switcher::before {
    content: "";
    position: absolute;
    top: var(--spp-language-padding);
    left: var(--spp-language-padding);
    width: var(--spp-language-segment-width);
    height: var(--spp-language-pill-height);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%);
    box-shadow: 0 10px 24px rgba(46, 16, 101, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: transform 0.32s ease-in-out, box-shadow 0.32s ease-in-out, background 0.32s ease-in-out;
}

.spp-language-switcher.is-en::before {
    transform: translateX(calc(var(--spp-language-segment-width) + var(--spp-language-gap)));
}

.spp-language-switcher__button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--spp-language-segment-width);
    height: var(--spp-language-pill-height);
    border-radius: 999px;
    background: transparent;
    font-size: var(--spp-language-flag-size);
    line-height: 1;
    transition: transform 0.32s ease-in-out, opacity 0.32s ease-in-out, filter 0.32s ease-in-out;
}

.spp-language-switcher__button:hover {
    transform: translateY(-1px);
}

.spp-language-switcher__button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.56), 0 0 0 5px rgba(109, 40, 217, 0.26);
}

.spp-language-switcher__button:not(.is-active) {
    opacity: 0.84;
    filter: saturate(0.96);
}

.spp-language-switcher__button.is-active {
    opacity: 1;
    filter: saturate(1.04);
}

.spp-language-switcher__flag {
    display: block;
    transform: translateY(-0.5px);
}

.spp-app.is-language-switching {
    opacity: 0.78;
    transform: translateY(3px);
    transition: opacity 0.28s ease-in-out, transform 0.28s ease-in-out;
}
