.sbvh-app {
    max-width: 1040px;
    margin: 30px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
}

.sbvh-shell {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 42px rgba(17, 36, 70, 0.16);
    background: #fff;
}

.sbvh-header {
    background: linear-gradient(180deg, #11A6D8 0%, #EA2AAE 100%);
    color: #fff;
    text-align: center;
    padding: 42px 28px 38px;
}

.sbvh-header h2 {
    margin: 0 0 8px;
    font-size: 38px;
    line-height: 1.05;
    font-weight: 900;
    color: #fff;
}

.sbvh-header p {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.94);
}

.sbvh-body {
    background: linear-gradient(180deg, #ffffff 0%, #fff1fb 100%);
    padding: 34px;
}

.sbvh-prompt-card,
.sbvh-result-card,
.sbvh-intent,
.sbvh-tip,
.sbvh-meaning,
.sbvh-caution,
.sbvh-loading {
    border: 1px solid rgba(17, 166, 216, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(17, 36, 70, 0.08);
}

.sbvh-prompt-card {
    padding: 28px;
}

.sbvh-label {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 800;
    color: #172033;
}

.sbvh-help-text {
    margin: -4px 0 14px;
    font-size: 17px;
    line-height: 1.45;
    color: #5c667a;
}

.sbvh-question {
    width: 100%;
    box-sizing: border-box;
    min-height: 112px;
    padding: 18px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid rgba(23, 32, 51, 0.16);
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 20px;
    line-height: 1.45;
    outline: none;
}

.sbvh-question:focus {
    border-color: #11A6D8;
    box-shadow: 0 0 0 4px rgba(17, 166, 216, 0.14);
}

.sbvh-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.sbvh-btn,
.sbvh-copy {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 15px 24px;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.sbvh-btn:hover,
.sbvh-copy:hover {
    transform: translateY(-1px);
}

.sbvh-btn-primary {
    background: #EA2AAE;
    color: #fff;
    box-shadow: 0 8px 18px rgba(234, 42, 174, 0.24);
}

.sbvh-btn-primary.is-recording {
    background: #d91616;
    box-shadow: 0 8px 18px rgba(217, 22, 22, 0.24);
}

.sbvh-btn-secondary {
    background: #11A6D8;
    color: #fff;
    box-shadow: 0 8px 18px rgba(17, 166, 216, 0.24);
}

.sbvh-status {
    min-height: 24px;
    margin-top: 14px;
    font-size: 16px;
    color: #5c667a;
}

.sbvh-loading {
    margin-top: 22px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
}

.sbvh-loading[hidden] {
    display: none;
}

.sbvh-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(17, 166, 216, 0.2);
    border-top-color: #11A6D8;
    border-radius: 50%;
    animation: sbvh-spin 1s linear infinite;
}

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

.sbvh-results {
    margin-top: 24px;
}

.sbvh-results[hidden] {
    display: none;
}

.sbvh-intent {
    padding: 18px 22px;
    margin-bottom: 18px;
}

.sbvh-intent span {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d7484;
    font-weight: 900;
    margin-bottom: 6px;
}

.sbvh-intent strong {
    display: block;
    font-size: 21px;
    color: #172033;
}

.sbvh-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sbvh-result-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.sbvh-result-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7px;
    background: #EA2AAE;
}

.sbvh-proper-card::before {
    background: #11A6D8;
}

.sbvh-card-kicker {
    margin-bottom: 12px;
    color: #6d7484;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.sbvh-phrase {
    margin-bottom: 10px;
    font-size: 32px;
    line-height: 1.18;
    font-weight: 900;
    color: #172033;
}

.sbvh-small-note {
    min-height: 44px;
    margin-bottom: 16px;
    color: #5c667a;
    font-size: 16px;
    line-height: 1.4;
}

.sbvh-audio {
    width: 100%;
    margin: 4px 0 16px;
}

.sbvh-audio-missing {
    margin: 4px 0 16px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #f4f6fb;
    color: #5c667a;
    font-size: 15px;
}

.sbvh-copy {
    background: #172033;
    color: #fff;
    padding: 11px 18px;
    font-size: 15px;
}

.sbvh-tip,
.sbvh-meaning,
.sbvh-caution {
    padding: 18px 22px;
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.45;
}

.sbvh-meaning {
    font-weight: 800;
    color: #172033;
}

.sbvh-tip {
    color: #37415a;
}

.sbvh-caution {
    border-color: rgba(234, 42, 174, 0.28);
    background: #fff7fc;
    color: #7c245f;
    font-weight: 700;
}

.sbvh-login-message {
    max-width: 760px;
    margin: 24px auto;
    padding: 22px;
    border-radius: 16px;
    background: #fff7fc;
    border: 1px solid rgba(234, 42, 174, 0.24);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 18px;
}

@media (max-width: 760px) {
    .sbvh-app {
        margin: 16px auto;
    }

    .sbvh-header {
        padding: 34px 18px 30px;
    }

    .sbvh-header h2 {
        font-size: 34px;
    }

    .sbvh-header p {
        font-size: 18px;
    }

    .sbvh-body {
        padding: 18px;
    }

    .sbvh-prompt-card {
        padding: 20px;
    }

    .sbvh-label {
        font-size: 20px;
    }

    .sbvh-question {
        font-size: 18px;
        min-height: 105px;
    }

    .sbvh-actions {
        flex-direction: column;
    }

    .sbvh-btn {
        width: 100%;
        font-size: 18px;
    }

    .sbvh-card-grid {
        grid-template-columns: 1fr;
    }

    .sbvh-phrase {
        font-size: 29px;
    }
}

.sbvh-emergency {
    margin-top: 18px;
}

.sbvh-emergency-toggle {
    appearance: none;
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 16px 18px;
    background: #172033;
    color: #fff;
    font: inherit;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
}

.sbvh-emergency-icon {
    display: inline-block;
    margin-right: 8px;
    animation: sbvhEmergencyFlash 1.15s ease-in-out infinite;
    transform-origin: center;
}

.sbvh-emergency-toggle.is-open .sbvh-emergency-icon {
    animation: none;
}

@keyframes sbvhEmergencyFlash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    50% {
        opacity: 0.35;
        transform: scale(1.18);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
    }
}

@media (prefers-reduced-motion: reduce) {
    .sbvh-emergency-icon {
        animation: none;
    }
}

.sbvh-emergency-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(234, 42, 174, 0.22);
    background: #fff7fc;
}

.sbvh-emergency-panel[hidden] {
    display: none;
}

.sbvh-emergency-panel p {
    margin: 0 0 12px;
    color: #5c667a;
    font-size: 16px;
    font-weight: 700;
}

.sbvh-emergency-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sbvh-emergency-item {
    appearance: none;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 14px;
    padding: 14px 10px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(17, 36, 70, 0.06);
}

.sbvh-result-actions {
    margin-top: 18px;
}

.sbvh-show-card-btn {
    appearance: none;
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 17px 20px;
    background: #172033;
    color: #fff;
    font: inherit;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.18);
}

.sbvh-show-card-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 12, 24, 0.76);
}

.sbvh-show-card {
    position: relative;
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    color: #172033;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.sbvh-show-card-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f1f3f8;
    color: #172033;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.sbvh-show-card-label {
    margin-bottom: 18px;
    color: #6d7484;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.sbvh-show-card-main {
    font-size: clamp(38px, 7vw, 70px);
    line-height: 1.12;
    font-weight: 950;
    color: #172033;
    margin-bottom: 22px;
}

.sbvh-show-card-meaning,
.sbvh-show-card-easy,
.sbvh-show-card-caution {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f6f8fc;
    font-size: clamp(20px, 3.5vw, 28px);
    line-height: 1.28;
}

.sbvh-show-card-easy {
    font-size: clamp(18px, 3vw, 24px);
}

.sbvh-show-card-caution {
    background: #fff7fc;
    color: #7c245f;
    font-weight: 900;
}

@media (max-width: 760px) {
    .sbvh-emergency-grid {
        grid-template-columns: 1fr;
    }

    .sbvh-emergency-toggle,
    .sbvh-show-card-btn {
        font-size: 18px;
    }

    .sbvh-show-card {
        padding: 30px 18px 22px;
        border-radius: 20px;
    }
}
