* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}
:root {
    --sd-purple: #7f6df2;
    --sd-purple-dark: #6750d8;
    --sd-purple-soft: #f2efff;
    --sd-purple-border: #ded8ff;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #f6f3ff, #eef8ff);
    color: #1f2933;
    padding: 12px 0;
}

.app-shell {
    width: 94vw;
    max-width: 520px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 32px;
    margin: 18px 0 18px;
    letter-spacing: -0.5px;
}

#app {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 26px;
    padding: 26px 20px;
    box-shadow: 0 20px 50px rgba(31, 41, 51, 0.12);
    text-align: center;
}

h2 {
    font-size: 32px;
    line-height: 1.1;
    margin: 0 0 12px;
}

h3 {
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 6px;
    color: #52606d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

p {
    font-size: 19px;
    line-height: 1.45;
    margin: 10px 0 20px;
}

input {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    border-radius: 18px;
    border: 2px solid #d9e2ec;
    outline: none;
    margin-top: 18px;
}

input:focus {
    border-color: #7c3aed;
}

button {
    width: 100%;
    border: none;
    border-radius: 20px;
    padding: 20px 18px;
    margin-top: 14px;
    font-size: 19px;
    font-weight: 700;
    background: #ffffff;
    color: #1f2933;
    box-shadow: 0 8px 22px rgba(31, 41, 51, 0.08);
    cursor: pointer;
}

button.primary {
    background: #703f9f;
    color: white;
}

.card-button {
    width: 92%;
    max-width: 420px;
    padding: 12px 16px;
    margin: 6px auto;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 17px;
    color: #6b7280;
    margin-top: -4px;
    margin-bottom: 20px;
}

.mode-grid {
    display: grid;
    gap: 14px;
}

.score {
    font-size: 64px;
    font-weight: 900;
    margin: 8px 0;
    letter-spacing: -2px;
}

.label {
    display: inline-block;
    background: #ede9fe;
    color: #5b21b6;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #374151;
    font-weight: 900;
    margin-top: 18px;
    margin-bottom: 8px;
}

.result-challenge {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 24px;
}

.result-detail {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 18px;
}

.insight-box {
    background: #f8fafc;
    border-radius: 22px;
    padding: 20px;
    margin: 18px 0;
    text-align: center;
}

.readiness-box {
    background: #ede9fe;
    border-radius: 24px;
    padding: 24px;
    margin: 20px 0;
}

.readiness-box .score {
    font-size: 68px;
    font-weight: 900;
    margin: 0;
    color: #5b21b6;
}

.readiness-box .readiness-label {
    font-size: 22px;
    font-weight: 800;
    margin-top: 6px;
    color: #5b21b6;
}

.strength-barrier-box {
    background: #f8fafc;
    border-radius: 24px;
    padding: 20px;
    margin: 20px 0;
}

.strength-barrier-row {
    margin-bottom: 18px;
}

.strength-barrier-row:last-child {
    margin-bottom: 0;
}

.small-detail {
    font-size: 17px;
    color: #52606d;
}

.progress-wrap {
    text-align: left;
    margin-bottom: 18px;
}

.progress-text {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.progress-bar {
    width: 90px;
    height: 5px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #7c3aed;
    border-radius: 999px;
}

#outside-controls {
    text-align: center;
    margin-top: 14px;
}

.back-button {
    background: transparent;
    box-shadow: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    margin: 0;
    width: auto;
    display: inline-block;
}

.copy-button {
    background: #ede9fe;
    color: #4c1d95;
}

.footer-space {
    height: 12px;
}

@media (min-width: 700px) {
    body {
        padding-top: 36px;
    }

    h1 {
        font-size: 32px;
    }

    #app {
        padding: 32px;
    }
}

.help-button {
    background: transparent;
    box-shadow: none;
    color: #5b21b6;
    font-size: 15px;
    font-weight: 700;
    padding: 4px;
    margin-top: -8px;
    margin-bottom: 12px;
}

.help-button:hover {
    box-shadow: none;
    transform: none;
    color: #4c1d95;
}

.nav-button:hover,
.help-link-button:hover,
.more-choices-button:hover,
.copy-button:hover,
.small-action-button:hover {
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
    filter: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 41, 55, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: white;
    border-radius: 28px;
    padding: 30px 24px 24px;
    box-shadow: 0 24px 70px rgba(31, 41, 55, 0.25);
    text-align: center;
}

.modal-card h2 {
    font-size: 28px;
    margin-bottom: 14px;
}

.modal-card p {
    font-size: 18px;
    line-height: 1.45;
    color: #374151;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    font-size: 30px;
    color: #6b7280;
}

.modal-close:hover {
    box-shadow: none;
    transform: none;
    color: #4c1d95;
}
.trend-box {
    background: #faf5ff;
    border-radius: 22px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.trend-box p {
    margin-bottom: 0;
}

.save-confirmation {
    background: #ecfdf5;
    color: #065f46;
    border-radius: 18px;
    padding: 14px;
    margin: 14px 0;
    font-size: 16px;
    font-weight: 700;
}

.recent-box {
    background: #f8fafc;
    border-radius: 22px;
    padding: 18px;
    margin: 20px 0;
    text-align: left;
}

.recent-empty {
    color: #6b7280;
    font-size: 16px;
    margin: 16px 0;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    font-size: 16px;
}

.recent-item:first-of-type {
    border-top: none;
}

.recent-item strong {
    color: #1f2933;
}

.recent-item span {
    color: #5b21b6;
    font-weight: 800;
    white-space: nowrap;
}
.error-message {
    color: #b91c1c;
    font-size: 15px;
    font-weight: 700;
    margin: 10px 0 0;
}
.fine-tune-box {
    background: #f8fafc;
    border-radius: 24px;
    padding: 28px 20px 22px;
    margin: 24px 0;
}

input[type="range"] {
    width: 100%;
    padding: 0;
    margin: 18px 0 10px;
    border: none;
    outline: none;
    accent-color: #7c3aed;
}

.slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #6b7280;
    font-weight: 800;
    margin-top: 4px;
}

.fine-tune-number {
    font-size: 22px;
    font-weight: 800;
    color: #5b21b6;
    margin-top: 18px;
}
.word-scale span {
    flex: 1;
    text-align: center;
}

.word-scale span:first-child {
    text-align: left;
}

.word-scale span:last-child {
    text-align: right;
}

.word-scale span:nth-child(2) {
    color: #5b21b6;
    font-weight: 900;
}
.topic-history-box {
    background: #f8fafc;
    border-radius: 24px;
    padding: 18px;
    margin: 20px 0;
    text-align: left;
}

.topic-card {
    background: white;
    border-radius: 18px;
    margin-top: 12px;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
    overflow: hidden;
}

.topic-card summary {
    cursor: pointer;
    list-style: none;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topic-card summary::-webkit-details-marker {
    display: none;
}

.topic-summary-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-summary-main strong {
    font-size: 18px;
    color: #1f2933;
}

.topic-summary-main span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 700;
}

.topic-summary-score {
    min-width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
}

.topic-results {
    border-top: 1px solid #e5e7eb;
    padding: 8px 16px 16px;
}

.topic-result-row {
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.topic-result-row:last-child {
    border-bottom: none;
}

.topic-result-row div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.topic-result-row strong {
    font-size: 24px;
    color: #5b21b6;
}

.topic-result-row span {
    font-size: 15px;
    font-weight: 800;
    color: #374151;
}

.topic-result-row p {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0 0;
}
.mini-chart-box {
    background: #faf5ff;
    border-radius: 18px;
    padding: 14px;
    margin: 12px 0 16px;
}

.mini-chart {
    width: 100%;
    height: 90px;
    display: block;
}

.mini-chart-axis {
    stroke: #e9d5ff;
    stroke-width: 2;
}

.mini-chart-line {
    fill: none;
    stroke: #7c3aed;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-chart-dot {
    fill: #5b21b6;
}

.mini-chart-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 800;
    margin-top: 8px;
}

.mini-chart-caption strong {
    color: #5b21b6;
}

.mini-chart-empty {
    background: #faf5ff;
    border-radius: 16px;
    padding: 14px;
    margin: 12px 0 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
.mode-card {
    background: #ede9fe;
    border-radius: 24px;
    margin-top: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 41, 51, 0.07);
}

.mode-card > summary {
    cursor: pointer;
    list-style: none;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mode-card > summary::-webkit-details-marker {
    display: none;
}

.mode-summary-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.mode-summary-main strong {
    font-size: 20px;
    color: #4c1d95;
}

.mode-summary-main span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 800;
}

.mode-summary-arrow {
    color: #5b21b6;
    font-size: 24px;
    font-weight: 900;
    transition: transform 0.2s ease;
}

.mode-card[open] .mode-summary-arrow {
    transform: rotate(180deg);
}

.mode-topic-list {
    padding: 0 12px 14px;
}

.mode-topic-list .topic-card {
    margin-top: 12px;
}

@keyframes appFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    #app {
        animation: none;
    }
}
.first-screen-fade {
    animation: firstScreenFadeIn 0.5s ease both;
}

@keyframes firstScreenFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .first-screen-fade {
        animation: none;
    }
}
.more-choices-button {
    background: #f3e8ff;
    color: #5b21b6;
    box-shadow: none;
    margin-top: 18px;
}

.more-choices-button:hover {
    box-shadow: none;
    transform: none;
    background: #ede9fe;
}
.readiness-affirmation {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #4c1d95;
    line-height: 1.4;
}
.welcome-back-box {
    background: transparent;
    border-radius: 0;
    padding: 0 10px 18px;
    margin: 0 0 14px;
    text-align: center;
    box-shadow: none;
}

.welcome-back-box p {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.4;
}

.welcome-back-box strong {
    color: #1f2933;
}

.secondary-button {
    background: white;
    color: #5b21b6;
    border: 2px solid #ddd6fe;
    box-shadow: none;
    margin-top: 10px;
}
.result-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.result-metrics div {
    background: #faf5ff;
    border-radius: 16px;
    padding: 12px 8px;
}

.result-metrics strong {
    display: block;
    font-size: 22px;
    color: #5b21b6;
}

.result-metrics span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 800;
    margin-top: 4px;
}
.targeted-advice-box {
    background: #f8fafc;
    border-radius: 18px;
    padding: 0;
    margin: 12px 0;
    text-align: left;
    overflow: hidden;
}

.targeted-advice-box summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    color: #5b21b6;
    font-size: 17px;
    font-weight: 900;
}

.targeted-advice-box summary::-webkit-details-marker {
    display: none;
}

.targeted-advice-box summary::after {
    content: "▾";
    float: right;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.targeted-advice-box[open] summary::after {
    transform: rotate(180deg);
}

.targeted-advice-box p {
    margin: 0;
    padding: 0 16px 16px;
    color: #374151;
    line-height: 1.45;
}
.targeted-advice-box summary {
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.targeted-advice-box summary:hover {
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
}
.result-metrics.two-metrics {
    grid-template-columns: repeat(2, 1fr);
}
.welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.small-action-button {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    margin: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: #ede9fe;
    color: #4c1d95;
    border: 1px solid #ddd6fe;
    box-shadow: none;
}

.small-action-button:hover {
    transform: none;
    box-shadow: none;
    background: #e9d5ff;
}
.front-animation {
    margin: 0 0 24px;
    text-align: center;
}

.animated-art-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 320px;
    margin: 0 auto 18px;
    overflow: hidden;
    border-radius: 28px;
    background: #faf7ff;
}

.animated-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
    opacity: 0;
    transform: scale(1.04);
}

.animated-art-wrap.art-ready .animated-art {
    animation: gentleImageFadeThenSettle 1.5s ease forwards;
}

.overlay-words {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    color: white;
    text-shadow: 0 2px 14px rgba(31, 41, 51, 0.55);
    pointer-events: none;
}

.overlay-words span {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 900;
    line-height: 1.15;
}

.animated-art-wrap.art-ready .overlay-words span {
    animation: introWordQuickAppear 0.8s ease forwards;
}


.overlay-words span:nth-child(1) {
    animation-delay: .2s;
    font-size: 24px;
}

.overlay-words span:nth-child(2) {
    animation-delay: .4s;
    font-size: 24px;
}

.overlay-words span:nth-child(3) {
    animation-delay: .6s;
    font-size: 24px;
}

.overlay-words span:nth-child(4) {
    animation-delay: .9s;
    font-size: 15px;
    font-weight: 800;
    margin-top: 8px;
}

@keyframes gentleImageFadeThenSettle {
    0% {
        opacity: 0;
        object-position: center 40%;
        transform: scale(1.04);
    }

    21% {
        opacity: .4;
        object-position: center 40%;
        transform: scale(1.04);
    }

    66% {
        opacity: .7;
        object-position: center 40%;
        transform: scale(1.04);
    }

    100% {
        opacity: 1;
        object-position: center 30%;
        transform: scale(1.0);
    }
}

@keyframes introWordQuickAppear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .animated-art,
    .overlay-words span {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .animated-art {
        object-position: center 43%;
    }
}
.nav-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.nav-button {
    width: auto;
    background: transparent;
    box-shadow: none;
    color: var(--sd-purple-dark);
    font-size: 13px;
    font-weight: 800;
    padding: 6px 8px;
    margin: 0;
    border-radius: 999px;
}

.nav-button:hover {
    background: #ede9fe;
    box-shadow: none;
    transform: none;
}
button.primary {
    background: var(--sd-purple);
    color: white;
}

.progress-fill {
    background: var(--sd-purple);
}

input[type="range"] {
    accent-color: var(--sd-purple);
}

.small-action-button {
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
    border: 1px solid var(--sd-purple-border);
}

.small-action-button:hover {
    background: #e5e0fb;
}

.nav-button {
    color: var(--sd-purple-dark);
}

.nav-button:hover {
    background: var(--sd-purple-soft);
}

.copy-button,
.more-choices-button {
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
}

.help-link-button {
    color: var(--sd-purple-dark);
}

.readiness-box {
    background: var(--sd-purple-soft);
}

.readiness-box .score,
.readiness-box .readiness-label,
.result-metrics strong,
.topic-summary-score,
.topic-result-row strong,
.mini-chart-caption strong,
.targeted-advice-box summary {
    color: var(--sd-purple-dark);
}

.mini-chart-line {
    stroke: var(--sd-purple);
}

.mini-chart-dot {
    fill: var(--sd-purple-dark);
}
/* Consistent hover behaviour for all buttons */
button:not(:disabled) {
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        filter 0.18s ease;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.12);
}

button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.10);
}
.more-choices-button {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    margin: 8px auto 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
    border: 1px solid var(--sd-purple-border);
    box-shadow: none;
}
.card-button {
    border: 1px solid transparent;
}

.card-button:not(:disabled):hover {
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
    border-color: var(--sd-purple-border);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.12);
}
.slim-primary {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 10px auto 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(109, 40, 217, 0.14);
}

.slim-primary:hover {
    background: var(--sd-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.18);
}
.mode-card,
.topic-card {
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.mode-card > summary,
.topic-card > summary {
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.mode-card:hover,
.topic-card:hover {
    background: #flecff;
    border-color: var(--sd-purple-border);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.10);
    transform: translateY(-1px);
}

.mode-card > summary:hover,
.topic-card > summary:hover {
    color: var(--sd-purple-dark);
}
/* Bottom-centre unfold cue for saved check-in cards */
.topic-card > summary {
    position: relative;
    padding-bottom: 28px;
    cursor: pointer;
}

.topic-card > summary::after {
    content: "⌄";
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--sd-purple-soft);
    color: var(--sd-purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        color 0.18s ease;
}

.topic-card:hover > summary::after {
    background: #efe7ff;
    color: var(--sd-purple-dark);
    transform: translateX(-50%) translateY(-1px);
}

.topic-card[open] > summary::after {
    content: "⌃";
    background: #efe7ff;
}
button.primary,
.slim-primary {
    background: #eadfff;
    color: var(--sd-purple-dark);
    border: 1px solid var(--sd-purple-border);
    box-shadow: 0 6px 14px rgba(109, 40, 217, 0.10);
}

button.primary:hover,
.slim-primary:hover {
    background: #e5d9ff;
    color: var(--sd-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.14);
}

.voice-input-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}

.mic-button {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: #eadfff;
    color: var(--sd-purple-dark);
    border: 1px solid var(--sd-purple-border);
    box-shadow: 0 6px 14px rgba(109, 40, 217, 0.10);
}

.mic-button:hover {
    background: #e5d9ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.14);
}

.voice-status {
    font-size: 13px;
    color: #6b7280;
}
.topic-input-wrap {
    position: relative;
    width: 100%;
}

.topic-input-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 58px;
}

.mic-inside-button {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #1f2933;
    border: none;
    box-shadow: none;
    font-size: 0;
}

.mic-icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.mic-inside-button:hover {
    background: #efe7ff;
    color: var(--sd-purple-dark);
    transform: translateY(-50%) scale(1.04);
    box-shadow: none;
}

.voice-status {
    min-height: 18px;
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b7280;
}
@media (min-width: 900px) {
    body {
        padding-top: 42px;
    }

    .app-shell {
        max-width: 680px;
    }

    h1 {
        font-size: 42px;
        margin: 20px 0 24px;
    }

    #app {
        padding: 42px 44px;
        border-radius: 34px;
    }

    h2 {
        font-size: 40px;
    }

    p {
        font-size: 21px;
    }

    .card-subtitle {
        font-size: 20px;
    }

    input {
        font-size: 22px;
        padding: 22px 60px 22px 24px;
    }

    .card-button {
        max-width: 560px;
        font-size: 18px;
        padding: 15px 20px;
    }

    .animated-art-wrap {
        max-width: 620px;
        height: 380px;
    }

    .overlay-words span:nth-child(1),
    .overlay-words span:nth-child(2),
    .overlay-words span:nth-child(3) {
        font-size: 30px;
    }

    .overlay-words span:nth-child(4) {
        font-size: 18px;
    }
}
.topic-history-box > .result-title {
    text-align: center;
}
.strength-barrier-inline {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e9d5ff;
}

.strength-barrier-inline p {
    font-size: 18px;
    margin: 6px 0;
    color: #4b5563;
}

.strength-barrier-inline strong {
    color: var(--sd-purple-dark);
    font-weight: 900;
}
.feedback-button {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 16px auto 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: #f8fafc;
    color: var(--sd-purple-dark);
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 14px rgba(31, 41, 55, 0.08);
}

.feedback-button:hover {
    background: #ecfdf5;
    color: var(--sd-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.12);
}
.install-tip {
    background: #fff8ef;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    margin: 18px auto;
    max-width: 560px;
    font-size: 0.95rem;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.install-tip p {
    margin: 0;
}
.footer-note {
    display: block;
    width: 100%;
    margin: 14px auto 0;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1.35;
    color: #6b7280;
    opacity: 1;
    text-align: center;
}
