:root {
  color-scheme: dark;
  --background: #0c0e13;
  --surface: #13161e;
  --raised: #1a1e28;
  --ink: #edf0f7;
  --muted: #969eaf;
  --line: #292e3a;
  --accent: #afc0ff;
  --font: "Manrope", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: var(--background); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, select, textarea { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button, a, select, textarea, input { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--accent); }
::selection { background: #394e88; color: white; }
.shell { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 18px; background: var(--raised); border: 1px solid var(--accent); border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid #20242e; }
.top-nav { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.product-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; letter-spacing: -.8px; }
.brand-mark { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: square; stroke-linejoin: round; }
.company-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); font-size: 12px; font-weight: 600; }
.company-link .icon { width: 16px; height: 16px; transform: rotate(-45deg); }
main { padding-top: clamp(32px, 5.5vh, 64px); }
.page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 500; line-height: 1.3; letter-spacing: -1.2px; }
.page-heading > span { color: var(--muted); font-size: 12px; }
.translator { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: clip; scroll-margin-top: 20px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; padding: 8px 25px; border-bottom: 1px solid var(--line); }
.workspace-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.workspace-title .icon { width: 17px; height: 17px; color: var(--accent); }
.auto-control { display: flex; align-items: center; gap: 11px; position: relative; color: var(--muted); font-size: 12px; cursor: pointer; min-height: 44px; }
.auto-control input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { display: block; position: relative; width: 32px; height: 18px; border-radius: 20px; background: #3c4251; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #c2c8d5; transition: transform .15s; }
.auto-control input:checked + .switch-track { background: var(--accent); }
.auto-control input:checked + .switch-track::after { transform: translateX(14px); background: #1a2340; }
.auto-control input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 4px; }
.language-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 80px; border-bottom: 1px solid var(--line); }
.language-choice { display: flex; align-items: center; gap: 14px; padding: 14px 34px 14px 26px; min-width: 0; }
.language-choice:last-child { padding-inline: 38px 26px; border-left: 1px solid var(--line); }
.language-choice select { appearance: none; min-width: 0; flex: 1; padding: 12px 26px 12px 0; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23969eaf' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 3px center; font-size: 16px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; }
.language-choice select option { color: var(--ink); background: var(--surface); }
.language-code { color: #818b9f; font: 11px/1.5 ui-monospace, monospace; white-space: nowrap; }
.swap-button { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid #394153; background: var(--raised); color: var(--accent); transform: translate(-50%, -50%); z-index: 1; transition: background .15s; }
.swap-button .icon { width: 19px; height: 19px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editor-panel { min-width: 0; display: flex; flex-direction: column; padding: 19px 26px 12px; position: relative; }
.editor-panel + .editor-panel { border-left: 1px solid var(--line); }
.editor-panel[data-role="translation"] { background: #161b25; }
.panel-heading { display: flex; align-items: center; min-height: 24px; padding-right: 38px; }
.role-label { font-size: 11px; color: var(--accent); font-weight: 500; }
.editor-panel[data-role="translation"] .role-label { color: var(--muted); }
.clear-button { position: absolute; top: 9px; right: 13px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0; border-radius: 7px; border: none; background: transparent; color: var(--muted); transition: color .15s, background .15s; }
.icon-button .icon { width: 18px; height: 18px; }
.icon-button:disabled { opacity: .35; }
.clear-button:disabled { visibility: hidden; }
textarea { display: block; width: 100%; min-height: clamp(230px, 30vh, 320px); margin-top: 20px; padding: 0 1px; border: none; resize: vertical; border-radius: 2px; color: var(--ink); background: transparent; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.75; overflow-wrap: anywhere; transition: opacity .15s; }
textarea::placeholder { color: #737e92; opacity: 1; }
textarea:focus-visible { outline: 2px solid #afc0ff80; outline-offset: 7px; }
.editor-panel[data-stale="true"] textarea { opacity: .5; }
.panel-footer { display: flex; align-items: center; min-height: 44px; gap: 4px; margin-top: 16px; }
.panel-footer .copy-button { margin-left: -11px; }
.copy-feedback { color: var(--accent); font-size: 11px; min-width: 0; }
.character-count { margin-left: auto; white-space: nowrap; color: var(--muted); font: 11px/1.5 ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.character-count[data-over="true"] { color: #f5a1a1; }
.workspace-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 82px; padding: 16px 26px; border-top: 1px solid var(--line); }
.translation-state { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted); font-size: 12px; }
.status-indicator { display: inline-block; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: #768298; }
.translation-state[data-state="done"] .status-indicator { background: #82c7aa; }
.translation-state[data-state="error"] { color: #f5a1a1; }
.translation-state[data-state="error"] .status-indicator { background: #f5a1a1; }
.translation-state[data-state="loading"] .status-indicator { width: 11px; height: 11px; border: 1.5px solid #394153; border-top-color: var(--accent); background: transparent; animation: spin .8s linear infinite; }
.action-group { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.keyboard-hint { color: #929bad; font-size: 11px; white-space: nowrap; }
kbd { font: inherit; }
kbd + kbd { margin-left: 4px; }
.translate-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 46px; min-width: 150px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: #17203a; font-size: 13px; font-weight: 700; transition: background .15s; }
.translate-button .icon { width: 18px; height: 18px; }
.translate-button[data-direction="reverse"] .icon { transform: rotate(180deg); }
.translate-button:disabled { color: #818ba0; border-color: #343c4e; background: #242c3e; }
.workspace-notes { display: flex; justify-content: space-between; gap: 12px 30px; padding: 17px 1px 0; color: var(--muted); font-size: 11px; }
.workspace-notes p { margin: 0; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 46px; min-height: 66px; border-top: 1px solid #20242e; color: var(--muted); font-size: 11px; }
.site-footer a { display: inline-flex; gap: 7px; align-items: center; }
.site-footer > span a { color: #c6cddd; }
.noscript-note { padding: 15px; border: 1px solid #f5a1a180; border-radius: 8px; color: #f5a1a1; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  a:hover { color: var(--accent); }
  .swap-button:hover { background: #2b3448; }
  .icon-button:not(:disabled):hover { color: var(--ink); background: #ffffff0b; }
  .translate-button:not(:disabled):hover { background: #c7d3ff; }
}
@media (max-width: 960px) {
  .shell { width: calc(100% - 48px); }
  .language-code { display: none; }
  .keyboard-hint { display: none; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .top-nav { height: 66px; }
  .product-brand { font-size: 20px; gap: 10px; }
  .brand-mark { width: 26px; height: 26px; }
  main { padding-top: 28px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading > span { font-size: 11px; }
  .workspace-heading { min-height: 58px; padding-inline: 18px; }
  .workspace-title, .auto-control { font-size: 12px; }
  .language-bar { min-height: 76px; }
  .language-choice { padding-inline: 17px 29px; }
  .language-choice:last-child { padding-inline: 29px 17px; }
  .language-choice select { font-size: 13px; padding-right: 17px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { padding: 17px 20px 7px; }
  .editor-panel + .editor-panel { border-left: 0; border-top: 1px solid var(--line); }
  .clear-button { top: 7px; right: 8px; }
  textarea { min-height: 110px; margin-top: 13px; font-size: 18px; }
  .panel-footer { margin-top: 8px; }
  .workspace-actions { gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
  .translation-state { flex: 1 1 90px; font-size: 11px; }
  .translate-button { min-width: 134px; gap: 16px; font-size: 12px; }
  .workspace-notes { flex-direction: column; gap: 5px; font-size: 11px; }
  .site-footer { margin-top: 30px; font-size: 11px; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .language-choice { padding-inline: 13px 25px; }
  .language-choice:last-child { padding-inline: 26px 12px; }
  .editor-panel { padding-inline: 17px; }
  .translation-state { flex-basis: 100%; }
  .action-group, .translate-button { width: 100%; }
  .translate-button { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
