#voice-safe-words-page .settings-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f6f6f2;
    -webkit-overflow-scrolling: touch;
}

.voice-safe-word-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: calc(20px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}

.voice-safe-word-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

.voice-safe-word-intro {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
}

.voice-safe-word-intro strong {
    color: #202020;
}

.voice-safe-word-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #202020;
}

.voice-safe-word-count,
#voice-safe-word-save-status {
    font-size: 11px;
    font-weight: 500;
    color: #999;
}

#voice-safe-word-save-status.is-dirty {
    color: #b66a18;
}

.voice-safe-word-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.voice-safe-word-editor-arrow {
    text-align: center;
    color: #aaa;
    font-size: 18px;
}

.voice-safe-word-input {
    width: 100%;
    min-width: 0;
    padding: 12px 11px;
    border: 1px solid #e7e5df;
    border-radius: 12px;
    background: #fafaf8;
    color: #222;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.voice-safe-word-input:focus {
    border-color: #222;
    background: #fff;
}

.voice-safe-word-add-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: #202020;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
}

.voice-safe-word-help {
    margin-top: 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: #999;
}

.voice-safe-word-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-safe-word-empty {
    padding: 20px 10px;
    border: 1px dashed #dedbd2;
    border-radius: 13px;
    text-align: center;
    color: #aaa;
    font-size: 12.5px;
    line-height: 1.6;
}

.voice-safe-word-empty[hidden] {
    display: none !important;
}

.voice-safe-word-rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 10px;
    border: 1px solid #eceae4;
    border-radius: 13px;
    background: #fafaf8;
}

.voice-safe-word-rule-term {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    font-size: 13px;
}

.voice-safe-word-rule-replacement {
    color: #176844;
    font-weight: 650;
}

.voice-safe-word-rule-arrow {
    text-align: center;
    color: #aaa;
}

.voice-safe-word-remove-btn {
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    background: #f3e8e6;
    color: #a64336;
    font-size: 12px;
}

.voice-safe-word-preview-input {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    box-sizing: border-box;
}

.voice-safe-word-preview-output {
    min-height: 44px;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    background: #f3f7f3;
    color: #254c37;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.voice-safe-word-preview-output.is-placeholder {
    color: #9aa39d;
}

.voice-safe-word-save-btn {
    width: 100%;
    margin: 0;
}

@media (max-width: 360px) {
    .voice-safe-word-editor {
        grid-template-columns: 1fr;
    }

    .voice-safe-word-editor-arrow {
        transform: rotate(90deg);
        line-height: 14px;
    }

    .voice-safe-word-rule {
        grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    }

    .voice-safe-word-remove-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}
