/* ==========================================================================
   译流 TransFlow · 样式表
   ========================================================================== */

:root {
    --bg: #f4f7fb;
    --bg-soft: #eef3fa;
    --panel: #ffffff;
    --panel-2: #f8fafd;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #7c8ba1;
    --line: #e6ecf5;
    --line-strong: #d7e0ee;
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --accent-line: rgba(37, 99, 235, 0.22);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.22);
    --radius: 18px;
    --radius-sm: 11px;
    --topbar: rgba(255, 255, 255, 0.78);
    --blob-1: rgba(37, 99, 235, 0.14);
    --blob-2: rgba(124, 58, 237, 0.12);
}

html[data-theme="dark"] {
    --bg: #080c16;
    --bg-soft: #0c1220;
    --panel: #101827;
    --panel-2: #0c1320;
    --text: #e8eefb;
    --text-2: #c3d0e4;
    --muted: #8098b8;
    --line: #1e2a3f;
    --line-strong: #2a3a55;
    --accent: #5b8bff;
    --accent-2: #a78bfa;
    --accent-soft: rgba(91, 139, 255, 0.12);
    --accent-line: rgba(91, 139, 255, 0.32);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.85);
    --topbar: rgba(10, 16, 28, 0.78);
    --blob-1: rgba(37, 99, 235, 0.22);
    --blob-2: rgba(124, 58, 237, 0.2);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- 背景光斑 ---------- */
.bg-deco {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-deco span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
}

.bg-deco span:nth-child(1) {
    width: 620px;
    height: 620px;
    top: -280px;
    left: -160px;
    background: var(--blob-1);
}

.bg-deco span:nth-child(2) {
    width: 560px;
    height: 560px;
    right: -200px;
    bottom: -260px;
    background: var(--blob-2);
}

/* ---------- 顶栏 ---------- */
.topbar {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    height: 62px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--topbar);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.7);
}

.logo svg {
    width: 21px;
    height: 21px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0.06em;
    line-height: 1.15;
    color: var(--text);
}

.brand-text em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.engine {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    margin-right: 4px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-2);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

.engine i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.82); }
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    background: var(--panel);
    border-color: var(--line);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.icon-btn:active {
    transform: scale(0.94);
}

/* ---------- 主体 ---------- */
.workbench {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 16px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- 语言栏 ---------- */
.langbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lang-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14.5px;
    font-weight: 550;
    padding: 7px 30px 7px 12px;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.select-wrap select:hover {
    background: var(--panel-2);
    border-color: var(--line);
}

.select-wrap select:focus-visible {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-wrap option {
    color: #0f172a;
    background: #fff;
}

html[data-theme="dark"] .select-wrap option {
    color: #e8eefb;
    background: #101827;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.7px solid var(--muted);
    border-bottom: 1.7px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.swap {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease, border-color 0.18s ease;
}

.swap svg {
    width: 15px;
    height: 15px;
}

.swap:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    transform: rotate(180deg);
}

.style-group {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.style-group::-webkit-scrollbar {
    display: none;
}

.style-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    margin-right: 2px;
    flex: 0 0 auto;
}

.chip {
    flex: 0 0 auto;
    height: 29px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.chip:hover {
    border-color: var(--accent-line);
    color: var(--accent);
}

.chip.is-active {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent);
    font-weight: 600;
}

/* ---------- 双栏 ---------- */
.panels {
    flex: 1 1 auto;
    min-height: 400px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:focus-within {
    border-color: var(--line-strong);
}

.card-head {
    flex: 0 0 auto;
    height: 46px;
    padding: 0 12px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--muted);
    text-transform: uppercase;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 3px rgba(124, 139, 161, 0.14);
}

.dot.is-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}

.mini-btn svg {
    width: 14px;
    height: 14px;
}

.mini-btn:hover:not(:disabled) {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

.mini-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.card-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#source {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    padding: 4px 20px 14px;
    border: 0;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 15.5px;
    line-height: 1.85;
    letter-spacing: 0.01em;
    scrollbar-width: thin;
}

#source::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

#source::-webkit-scrollbar,
.output::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 8px;
}

#source::-webkit-scrollbar-thumb,
.output::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 99px;
    border: 2px solid var(--panel);
}

/* 拖拽导入 */
.drop-hint {
    position: absolute;
    inset: 8px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1.5px dashed var(--accent-line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 88%, var(--accent));
    backdrop-filter: blur(2px);
    color: var(--accent);
    z-index: 3;
}

.drop-hint svg {
    width: 26px;
    height: 26px;
}

.drop-hint p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
}

.card.is-dragover .drop-hint {
    display: flex;
}

.card.is-dragover {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

/* 输出区 */
.output {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 20px 16px;
    font-size: 15.5px;
    line-height: 1.85;
    scrollbar-width: thin;
}

.output-text {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.16em;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.empty {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    color: var(--muted);
}

.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    margin-bottom: 8px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

.empty-icon svg {
    width: 26px;
    height: 26px;
}

.empty h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-2);
}

.empty p {
    margin: 0;
    font-size: 12.5px;
}

/* 错误提示 */
.notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    line-height: 1.6;
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

html[data-theme="dark"] .notice {
    color: #ffb4ab;
    background: rgba(180, 35, 24, 0.16);
    border-color: rgba(255, 180, 171, 0.24);
}

.notice svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* ---------- 卡片底部 ---------- */
.card-foot {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 10px 14px 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}

.meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta.is-over {
    color: #d92d20;
    font-weight: 600;
}

.meta.is-busy {
    color: var(--accent);
}

.sep {
    width: 1px;
    height: 11px;
    background: var(--line-strong);
    margin: 0 3px;
}

kbd {
    display: inline-block;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-2);
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
}

.plus {
    font-size: 11px;
    opacity: 0.6;
    margin: 0 1px;
}

.foot-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.9);
    transition: transform 0.16s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary svg {
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.9);
}

.btn-primary:hover:not(:disabled) svg {
    transform: translateX(2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ghost {
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--text-2);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-ghost:hover {
    color: #d92d20;
    border-color: #fecdca;
    background: #fef3f2;
}

.btn-primary.is-loading .btn-label::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 抽屉 ---------- */
.drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s ease, visibility 0.26s;
}

.drawer-mask.is-open {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 41;
    width: min(380px, 92vw);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(102%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer.is-open {
    transform: none;
}

.drawer-head {
    flex: 0 0 auto;
    height: 60px;
    padding: 0 12px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.drawer-head > div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
}

.history-item {
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.16s ease;
}

.history-item:hover {
    background: var(--panel-2);
    border-color: var(--line);
}

.history-item .hi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 4px;
}

.history-item .hi-lang {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}

.history-item .hi-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Toast ---------- */
.toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    max-width: 80vw;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    color: #fff;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.6);
    animation: toastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(6px);
}

.toast.is-error {
    background: rgba(180, 35, 24, 0.94);
}

.toast.is-out {
    animation: toastOut 0.24s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* ---------- 底部信息版块 ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-top: 4px;
    background: var(--panel);
    border-top: 1px solid var(--line);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line) 25%, var(--accent-line) 75%, transparent);
}

.footer-inner {
    max-width: 1420px;
    margin: 0 auto;
    padding: 26px 24px 18px;
    display: grid;
    grid-template-columns: 1.9fr 1fr 1fr 1fr;
    gap: 28px;
}

.f-col {
    min-width: 0;
}

.f-logo-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text);
}

.f-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 4px 12px -6px rgba(37, 99, 235, 0.8);
}

.f-logo svg {
    width: 16px;
    height: 16px;
}

.f-name {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0.06em;
}

.f-desc {
    margin: 0 0 12px;
    max-width: 430px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.f-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.f-tags span {
    padding: 2px 9px;
    font-size: 11.5px;
    color: var(--text-2);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.f-title {
    margin: 0 0 11px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text);
}

.f-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.f-links a {
    display: inline-block;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.16s ease, transform 0.16s ease;
}

.f-links a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.footer-links-bar {
    max-width: 1420px;
    margin: 0 auto;
    padding: 11px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    border-top: 1px dashed var(--line);
    font-size: 12.5px;
}

.fl-label {
    color: var(--muted);
    letter-spacing: 0.08em;
}

.footer-links-bar a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.16s ease;
}

.footer-links-bar a:hover {
    color: var(--accent);
}

.fl-more {
    margin-left: auto;
    color: var(--accent) !important;
}

.footer-bottom {
    padding: 13px 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}

.f-copy,
.f-meta {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
}

.f-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.f-meta a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.16s ease;
}

.f-meta a:hover {
    color: var(--accent);
}

.f-dot {
    opacity: 0.45;
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .workbench {
        min-height: 0;
        padding: 12px 14px 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 24px 16px 18px;
    }

    .f-brand {
        grid-column: 1 / -1;
    }

    .footer-links-bar {
        padding: 12px 16px;
    }

    .footer-bottom {
        padding: 14px 16px 16px;
    }

    .langbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .lang-group {
        justify-content: center;
    }

    .style-group {
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .panels {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .card {
        min-height: 320px;
    }

    #source {
        min-height: 210px;
    }

    .output {
        min-height: 200px;
    }

    .card-foot {
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .meta {
        font-size: 12px;
    }

    .btn-primary {
        height: 36px;
        padding: 0 16px;
    }
}

@media (max-width: 560px) {
    .brand-text em {
        display: none;
    }

    .engine {
        display: none;
    }

    .select-wrap select {
        font-size: 13.5px;
        padding-left: 8px;
    }

    .card-foot .meta > .sep,
    .card-foot .meta > kbd,
    .card-foot .meta > .plus,
    .card-foot .meta > span:last-child {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 20px 14px;
    }

    .fl-more {
        margin-left: 0;
    }

    .f-copy,
    .f-meta {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
