/* 站度网 · 汉字转拼音 */
#app {
    --py-line: #e5e7eb;
    --text-dim: #86868b;
}

#app .py-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 三组切换按钮：等宽排列，避免「带声调 zhōng」这类长文案把整行撑歪 */
#app .seg.py-seg {
    display: flex;
}

#app .seg.py-seg button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
}

/* 选项字段：按钮组与下方提示、下一行标签之间留出间距 */
#app .py-field {
    margin-bottom: 14px;
}

#app .py-field .hint {
    margin-top: 6px;
    line-height: 1.45;
}

#app .py-checks {
    margin-top: 2px;
}

#app .py-chip {
    border: 1px solid var(--py-line);
    background: #fff;
    color: #374151;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .16s ease;
}

#app .py-chip:hover {
    border-color: #2f6bff;
    color: #2f6bff;
    background: #f2f6ff;
}

#app .py-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--py-line);
}

#app .py-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

#app .py-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #2f6bff;
    cursor: pointer;
}

/* 结果输出 */
#app .py-out-wrap {
    margin-bottom: 12px;
}

#app .py-output {
    width: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid var(--py-line);
    border-radius: 12px;
    background: #fbfcfe;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 15px;
    line-height: 1.85;
    letter-spacing: .2px;
    resize: vertical;
}

#app .py-output:focus {
    outline: none;
    border-color: #2f6bff;
    background: #fff;
}

#app .py-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #4b5563;
}

#app .py-meta b {
    color: #111827;
    font-weight: 700;
}

#app .py-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #eef2ff;
    color: #2f4bd0;
    font-weight: 700;
    font-size: 12px;
}

#app .py-bad {
    color: #d92d20;
    font-weight: 600;
}

#app .py-dim {
    color: var(--text-dim);
}

/* 逐字对照表 */
#app .py-table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--py-line);
    border-radius: 12px;
    margin-bottom: 10px;
}

#app .py-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#app .py-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5f7fb;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--py-line);
    white-space: nowrap;
}

#app .py-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f2f6;
    color: #374151;
}

#app .py-table tbody tr:last-child td {
    border-bottom: none;
}

#app .py-table tbody tr:nth-child(even) td {
    background: #fafbfe;
}

#app .py-table tr.py-poly td {
    background: #fff8ee;
}

#app .py-table tr.py-poly:hover td {
    background: #fff2e0;
}

#app .py-c {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    width: 64px;
}

#app .py-py {
    font-size: 15px;
    color: #2f4bd0;
    font-weight: 600;
    white-space: nowrap;
}

#app .py-note {
    color: #b45309;
    font-size: 12.5px;
}

#app .py-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 26px 0;
}

@media (max-width: 768px) {
    #app {
        padding: 0;
    }

    #app .py-chip {
        font-size: 12.5px;
        padding: 5px 12px;
    }

    #app .py-output {
        font-size: 14px;
        line-height: 1.8;
    }

    #app .py-table-wrap {
        max-height: 360px;
    }

    #app .py-table td,
    #app .py-table thead th {
        padding: 8px 9px;
    }

    #app .py-c {
        width: 48px;
        font-size: 16px;
    }

    #app .py-note {
        font-size: 12px;
    }

    #app .toolbar-row {
        flex-wrap: wrap;
    }

    #app .toolbar-row .btn {
        flex: 1 1 100%;
    }
}
