:root {
  color-scheme: dark;
  --text: #f4f8ff;
  --muted: #b9c9de;
  --primary: #4ecbff;
  --primary-2: #9de7ff;
  --danger: #ff4d6d;
  --warning: #ffe083;
  --glass: rgba(11, 21, 39, 0.58);
  --glass-strong: rgba(12, 24, 46, 0.76);
  --line: rgba(255, 255, 255, 0.16);
  --input: rgba(5, 13, 27, 0.62);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.16, 1.35, 0.32, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #07101d;
  overflow-x: hidden;
}

.bg-layer,
.bg-mask {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-layer {
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(22, 45, 80, 0.94), rgba(12, 20, 38, 0.95)),
    radial-gradient(circle at 20% 10%, rgba(78, 203, 255, 0.26), transparent 28rem);
  overflow: hidden;
}

.bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.08) brightness(0.72);
  transform: scale(1.04);
  transition:
    opacity 0.9s var(--ease-smooth),
    transform 8s ease;
}

.bg-layer.loaded img {
  opacity: 1;
  transform: scale(1);
}

.bg-mask {
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(78, 203, 255, 0.3), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(255, 77, 109, 0.2), transparent 30rem),
    linear-gradient(180deg, rgba(3, 9, 20, 0.62), rgba(3, 9, 20, 0.86));
  backdrop-filter: blur(4px);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
label,
.nav-link,
.custom-select-btn,
.custom-select-panel button {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  outline: none;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.custom-select-btn:focus-visible,
.nav-link:focus-visible,
.close-btn:focus-visible,
.menu-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(78, 203, 255, 0.18),
    0 12px 36px rgba(0, 0, 0, 0.22);
}

button,
.nav-link,
.custom-select-btn,
.custom-select-panel button {
  user-select: none;
  touch-action: manipulation;
}

.topbar {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.menu-btn,
.close-btn {
  pointer-events: auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(6, 14, 29, 0.68);
  backdrop-filter: blur(18px);
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

.menu-btn {
  display: grid;
  gap: 5px;
  width: 46px;
  height: 46px;
  place-content: center;
  border-radius: 15px;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--primary-2);
  transition:
    transform 0.28s var(--ease-pop),
    opacity 0.22s var(--ease-smooth),
    background 0.22s var(--ease-smooth);
}

.menu-btn:hover span:nth-child(1) {
  transform: translateY(-1px);
}

.menu-btn:hover span:nth-child(3) {
  transform: translateY(1px);
}

.brand {
  pointer-events: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(6, 14, 29, 0.58);
  backdrop-filter: blur(18px);
  transition:
    transform 0.28s var(--ease-pop),
    background 0.22s var(--ease-smooth),
    border-color 0.22s var(--ease-smooth);
}

.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 231, 255, 0.4);
  background: rgba(6, 14, 29, 0.72);
}

.brand small {
  color: var(--primary-2);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: min(310px, 82vw);
  height: 100vh;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(6, 14, 29, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 0.42s var(--ease-smooth);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 1.15rem;
}

.close-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 1.4rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 10px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.28s var(--ease-pop),
    background 0.24s var(--ease-smooth),
    border-color 0.24s var(--ease-smooth),
    color 0.24s var(--ease-smooth);
}

.nav-link.active,
.nav-link:hover {
  border-color: rgba(78, 203, 255, 0.5);
  background: rgba(78, 203, 255, 0.16);
  transform: translateX(4px);
}

.github-link {
  margin-top: 18px;
  border-color: rgba(157, 231, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(78, 203, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.05);
}

.github-link svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.github-link span {
  display: grid;
  gap: 2px;
}

.github-link small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s var(--ease-smooth),
    backdrop-filter 0.28s var(--ease-smooth);
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

.page-shell {
  width: min(1000px, calc(100% - 30px));
  margin: 0 auto;
  padding: 92px 0 48px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-2);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  text-shadow: 0 0 24px rgba(78, 203, 255, 0.45);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.08;
  color: #ffffff;
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.48);
}

.hero-text {
  max-width: 720px;
  margin: 0 auto;
  color: #dbeaff;
  line-height: 1.8;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}

.hero-points span {
  padding: 7px 12px;
  border: 1px solid rgba(157, 231, 255, 0.22);
  border-radius: 999px;
  color: #d9f6ff;
  background: rgba(6, 14, 29, 0.42);
  backdrop-filter: blur(14px);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: pageIn 0.52s var(--ease-smooth) both;
}

.card {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  animation: cardIn 0.58s var(--ease-smooth) both;
  transition:
    transform 0.34s var(--ease-pop),
    border-color 0.28s var(--ease-smooth),
    background 0.28s var(--ease-smooth),
    box-shadow 0.28s var(--ease-smooth);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 231, 255, 0.26);
  background: rgba(11, 21, 39, 0.66);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card-header h2 {
  margin-bottom: 6px;
  color: #c8f3ff;
  font-size: 1.18rem;
}

.card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(157, 231, 255, 0.36);
  border-radius: 999px;
  color: #d4f6ff;
  background: rgba(78, 203, 255, 0.14);
  font-size: 0.8rem;
  font-weight: 800;
}

.badge.muted {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  color: #e7f5ff;
  font-weight: 800;
}

.field small {
  display: block;
  margin-top: 4px;
  color: var(--warning);
  font-weight: 650;
  line-height: 1.55;
}

.field-wide {
  grid-column: 1 / -1;
}

.switch-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition:
    background 0.26s var(--ease-smooth),
    border-color 0.26s var(--ease-smooth),
    box-shadow 0.26s var(--ease-smooth);
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d6e4f5;
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch-field input:checked + .switch-ui {
  background: rgba(78, 203, 255, 0.4);
  border-color: rgba(157, 231, 255, 0.55);
  box-shadow: 0 0 24px rgba(78, 203, 255, 0.2);
}

.switch-field input:checked + .switch-ui::after {
  transform: translateX(22px);
  background: #ffffff;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: var(--text);
  background: var(--input);
  outline: none;
  transition:
    border-color 0.24s var(--ease-smooth),
    box-shadow 0.24s var(--ease-smooth),
    background 0.24s var(--ease-smooth),
    transform 0.24s var(--ease-pop);
}

input,
select {
  min-height: 44px;
  padding: 0 13px;
}

.native-select-hidden {
  display: none;
}

.custom-select {
  position: relative;
  z-index: 100;
}

.custom-select-btn {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: var(--text);
  background: var(--input);
  cursor: pointer;
  transition:
    transform 0.24s var(--ease-pop),
    border-color 0.24s var(--ease-smooth),
    box-shadow 0.24s var(--ease-smooth),
    background 0.24s var(--ease-smooth);
}

.custom-select-btn:hover,
.custom-select.open .custom-select-btn {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(78, 203, 255, 0.16);
  background: rgba(5, 13, 27, 0.78);
}

.custom-select-btn i {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--primary-2);
  border-bottom: 2px solid var(--primary-2);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.28s var(--ease-pop);
}

.custom-select.open .custom-select-btn i {
  transform: rotate(225deg) translateY(-2px);
}

.custom-select-panel {
  position: absolute;
  z-index: 200;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(157, 231, 255, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(12, 28, 54, 0.92), rgba(12, 20, 38, 0.82)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.24s var(--ease-smooth),
    transform 0.34s var(--ease-pop);
}

.custom-select.open .custom-select-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-select-panel button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #eaf7ff;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.24s var(--ease-pop),
    background 0.2s var(--ease-smooth),
    color 0.2s var(--ease-smooth);
}

.custom-select-panel button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32);
  transition:
    background 0.2s var(--ease-smooth),
    box-shadow 0.2s var(--ease-smooth);
}

.custom-select-panel button:hover,
.custom-select-panel button.selected {
  color: #ffffff;
  background: rgba(78, 203, 255, 0.16);
  transform: translateX(3px);
}

.custom-select-panel button.selected::after {
  background: var(--primary-2);
  box-shadow: 0 0 18px rgba(78, 203, 255, 0.65);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(78, 203, 255, 0.16);
  background: rgba(5, 13, 27, 0.78);
  transform: translateY(-1px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 0.28s var(--ease-pop),
    background 0.24s var(--ease-smooth),
    border-color 0.24s var(--ease-smooth),
    box-shadow 0.24s var(--ease-smooth);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 231, 255, 0.55);
  background: rgba(78, 203, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn.primary {
  border-color: transparent;
  color: #04111e;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn.danger-soft {
  border-color: rgba(255, 77, 109, 0.36);
  color: #ffd2dc;
  background: rgba(255, 77, 109, 0.16);
}

.translator-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid rgba(157, 231, 255, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(78, 203, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.translator-copy {
  display: grid;
  gap: 6px;
}

.translator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.translator-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e9faff;
  font-size: 1rem;
}

.translator-title small {
  padding: 2px 7px;
  border: 1px solid rgba(157, 231, 255, 0.32);
  border-radius: 999px;
  color: var(--primary-2);
  background: rgba(78, 203, 255, 0.12);
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.translator-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  font-weight: 850;
}

.translator-status.working {
  color: #04111e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.translator-status.done {
  color: #bcffd7;
  border-color: rgba(82, 255, 158, 0.24);
  background: rgba(82, 255, 158, 0.1);
}

.translator-status.error {
  color: #ffd2dc;
  border-color: rgba(255, 77, 109, 0.28);
  background: rgba(255, 77, 109, 0.12);
}

.translator-copy > span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.translator-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.translator-field {
  display: grid;
  gap: 6px;
}

.translator-field > span {
  color: #cfeeff;
  font-size: 0.74rem;
  font-weight: 850;
}

.scan-native-select {
  width: 100%;
  min-height: 40px;
  padding: 0 40px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--primary-2) 50%) right 17px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    var(--input);
  cursor: pointer;
  font-weight: 800;
}

.translator-native-select {
  width: 100%;
  min-height: 40px;
  padding: 0 40px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--primary-2) 50%) right 17px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    var(--input);
  cursor: pointer;
  font-weight: 800;
}

.table-wrap {
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

td {
  background: rgba(255, 255, 255, 0.035);
}

th:nth-child(1) {
  width: 9%;
}

th:nth-child(2),
th:nth-child(3) {
  width: 38%;
}

th:nth-child(4) {
  width: 15%;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td input:not([type="checkbox"]) {
  min-height: 40px;
}

.select-cell {
  text-align: center;
  vertical-align: middle;
}

.row-check {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  cursor: pointer;
}

.row-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.row-check span {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(157, 231, 255, 0.34);
  border-radius: 8px;
  background: rgba(5, 13, 27, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background 0.22s var(--ease-smooth),
    border-color 0.22s var(--ease-smooth),
    box-shadow 0.22s var(--ease-smooth),
    transform 0.22s var(--ease-pop);
}

.row-check span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #04111e;
  border-bottom: 2px solid #04111e;
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
  transition:
    opacity 0.18s var(--ease-smooth),
    transform 0.22s var(--ease-pop);
}

.row-check input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 18px rgba(78, 203, 255, 0.32);
}

.row-check input:checked + span::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.row-check:hover span {
  transform: translateY(-1px);
  border-color: rgba(157, 231, 255, 0.6);
}

.row-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--danger);
  cursor: pointer;
  font-weight: 850;
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 224, 131, 0.22);
  border-radius: 14px;
  color: #ffe8a8;
  background: rgba(255, 224, 131, 0.1);
  line-height: 1.75;
  font-size: 0.92rem;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
}

.notice span {
  display: block;
  color: inherit;
  opacity: 0.92;
}

.notice.danger {
  border-color: rgba(255, 77, 109, 0.26);
  color: #ffd2dc;
  background: rgba(255, 77, 109, 0.12);
}

textarea {
  min-height: 420px;
  padding: 14px;
  resize: vertical;
  line-height: 1.6;
  font-family:
    "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", monospace;
  font-size: 0.9rem;
}

.guide-card {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.guide-list {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.guide-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  min-width: 0;
  transition:
    transform 0.32s var(--ease-pop),
    background 0.26s var(--ease-smooth),
    border-color 0.26s var(--ease-smooth),
    box-shadow 0.26s var(--ease-smooth);
}

.guide-list article:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 231, 255, 0.3);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.guide-list article > div {
  min-width: 0;
}

.step {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #04111e;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(78, 203, 255, 0.22);
}

.guide-list h3 {
  margin-bottom: 8px;
  color: #ffffff;
}

.guide-list p {
  margin-bottom: 12px;
  color: #d8e7f8;
  line-height: 1.8;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.24s var(--ease-smooth),
    background 0.24s var(--ease-smooth),
    transform 0.28s var(--ease-pop);
}

pre:hover {
  border-color: rgba(157, 231, 255, 0.3);
  background: rgba(0, 0, 0, 0.36);
  transform: translateY(-1px);
}

code {
  color: #bff3ff;
  font-family:
    "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", monospace;
  font-size: 0.88rem;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

footer {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 0 10px;
  color: #ffd2dc;
  text-align: center;
  line-height: 1.8;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
}

.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s var(--ease-smooth),
    backdrop-filter 0.28s var(--ease-smooth);
}

.dialog-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.dialog-card {
  position: relative;
  width: min(420px, 100%);
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(157, 231, 255, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(12, 28, 54, 0.9), rgba(18, 27, 50, 0.78)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(24px);
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.42s var(--ease-pop),
    opacity 0.28s var(--ease-smooth);
}

.dialog-mask.show .dialog-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dialog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 12%, rgba(78, 203, 255, 0.24), transparent 12rem),
    radial-gradient(circle at 88% 22%, rgba(255, 77, 109, 0.16), transparent 10rem);
  pointer-events: none;
}

.dialog-orb {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(78, 203, 255, 0.42), rgba(78, 203, 255, 0));
  animation: orbFloat 4s ease-in-out infinite alternate;
}

.dialog-card > * {
  position: relative;
}

.dialog-kicker {
  margin-bottom: 8px;
  color: var(--primary-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.dialog-card h2 {
  margin-bottom: 8px;
  color: #ffffff;
}

.dialog-card p {
  color: #dcecff;
  line-height: 1.75;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(157, 231, 255, 0.34);
  border-radius: 18px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(78, 203, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(6, 14, 29, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.28s var(--ease-smooth),
    transform 0.38s var(--ease-pop),
    border-color 0.28s var(--ease-smooth);
}

.toast-icon {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #04111e;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes orbFloat {
  from {
    transform: translate(-8px, 8px) scale(0.92);
  }
  to {
    transform: translate(4px, -4px) scale(1.08);
  }
}

@media (max-width: 720px) {
  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .brand {
    padding: 9px 12px;
  }

  .page-shell {
    width: min(100% - 24px, 1000px);
    padding-top: 84px;
  }

  .card {
    padding: 16px;
    border-radius: 20px;
  }

  .card-header {
    flex-direction: column;
    gap: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .translator-panel {
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .translator-head {
    align-items: flex-start;
  }

  .translator-title {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.96rem;
  }

  .translator-copy > span {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .translator-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }



  .table-wrap {
    border: 0;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
  }

  td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  td:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
  }

  td:nth-child(2),
  td:nth-child(3) {
    grid-column: 1 / -1;
  }

  td {
    padding: 0;
    border: 0;
    background: transparent;
  }

  td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
  }

  td:nth-child(1)::before {
    content: "选择";
  }

  td:nth-child(2)::before {
    content: "英文";
  }

  td:nth-child(3)::before {
    content: "中文";
  }

  td:nth-child(4)::before {
    content: "操作";
  }

  td input:not([type="checkbox"]) {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.94rem;
  }

  .icon-btn {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  textarea {
    min-height: 340px;
    font-size: 0.82rem;
  }

  .guide-list article {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
    overflow: hidden;
  }

  .guide-list article > div {
    width: 100%;
    min-width: 0;
  }

  .guide-list h3 {
    font-size: 1rem;
  }

  .guide-list p {
    font-size: 0.92rem;
    line-height: 1.72;
  }

  pre {
    width: 100%;
    overflow-x: hidden;
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-all;
  }

  code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: 0.78rem;
    line-height: 1.62;
  }

  .dialog-card {
    padding: 20px;
    border-radius: 20px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2rem;
  }

  .brand small {
    display: none;
  }

  .hero-points {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
  }

  .toolbar .btn {
    flex-basis: 100%;
  }

  tr {
    grid-template-columns: 44px 1fr auto;
  }

  .guide-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .guide-list article {
    padding: 12px;
    border-radius: 15px;
  }

  .step {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
}

/* ===== API Key 动态输入框（选中需 Key 的接口时显示） ===== */
.api-key-inline {
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(157, 231, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(78, 203, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 10px;
  transition: opacity 0.24s var(--ease-smooth), max-height 0.3s var(--ease-smooth);
}

.api-key-inline.hidden {
  display: none;
}

.api-key-inline .field {
  margin: 0;
}

.api-key-inline .field span {
  font-size: 0.8rem;
  margin-bottom: 5px;
}

.api-key-inline input {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.api-key-note {
  color: #9ecfff;
  font-size: 0.76rem;
  line-height: 1.55;
  opacity: 0.7;
}

/* 全尺寸响应式适配：手表/超小屏、手机、平板、电脑、电视 */
@media (min-width: 1280px) {
  .page-shell {
    width: min(1120px, calc(100% - 80px));
  }

  .hero {
    margin-bottom: 30px;
  }

  .card {
    padding: 26px;
  }

  .guide-card {
    max-width: 980px;
  }
}

@media (min-width: 1600px) {
  .page-shell {
    width: min(1280px, calc(100% - 120px));
    padding-top: 110px;
  }

  h1 {
    font-size: clamp(4rem, 4.2vw, 5.8rem);
  }

  .hero-text {
    max-width: 860px;
    font-size: 1.08rem;
  }

  .card {
    margin: 24px 0;
    padding: 30px;
  }

  .card-header h2 {
    font-size: 1.34rem;
  }

  .form-grid {
    gap: 20px;
  }

  textarea {
    min-height: 520px;
  }
}

@media (min-width: 2200px) {
  .page-shell {
    width: min(1500px, calc(100% - 180px));
    padding-top: 130px;
  }

  .topbar {
    top: 24px;
    left: 24px;
    right: 24px;
  }

  .menu-btn {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .brand {
    padding: 15px 20px;
    font-size: 1.08rem;
  }

  h1 {
    font-size: 6.4rem;
  }

  .hero-text,
  .card-header p,
  .notice,
  .guide-list p {
    font-size: 1.08rem;
  }

  .btn,
  input,
  select,
  .custom-select-btn {
    min-height: 52px;
  }

  textarea {
    min-height: 620px;
    font-size: 1rem;
  }
}

@media (max-width: 1024px) {
  .page-shell {
    width: min(100% - 34px, 920px);
  }

  h1 {
    font-size: clamp(2.45rem, 7.4vw, 4.4rem);
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-card {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 88px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    font-size: 0.96rem;
  }

  .card-header {
    flex-direction: column;
  }

  .toolbar .btn {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 600px) {
  .bg-mask {
    background:
      radial-gradient(circle at top left, rgba(78, 203, 255, 0.24), transparent 22rem),
      linear-gradient(180deg, rgba(3, 9, 20, 0.72), rgba(3, 9, 20, 0.9));
  }

  .topbar {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
  }

  .menu-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .brand {
    max-width: calc(100vw - 72px);
    padding: 9px 12px;
    white-space: nowrap;
  }

  .page-shell {
    width: calc(100% - 18px);
    padding-top: 76px;
    padding-bottom: 34px;
  }

  .hero {
    margin-bottom: 16px;
  }

  .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(1.82rem, 10vw, 2.7rem);
  }

  .hero-text {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .card {
    margin: 12px 0;
    padding: 14px;
    border-radius: 18px;
  }

  .card-header h2 {
    font-size: 1.06rem;
  }

  .card-header p,
  .notice {
    font-size: 0.86rem;
  }

  .switch-field {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .btn {
    width: 100%;
    min-width: 0;
    font-size: 0.88rem;
  }

  tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px;
  }

  td input {
    min-width: 0;
  }

  .custom-select-panel {
    max-height: min(280px, 52vh);
    overflow-y: auto;
  }

  textarea {
    min-height: 300px;
  }

  footer {
    font-size: 0.86rem;
  }
}

@media (max-width: 380px) {
  .brand strong {
    max-width: 7.5em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-shell {
    width: calc(100% - 12px);
    padding-top: 70px;
  }

  h1 {
    font-size: clamp(1.55rem, 11vw, 2.1rem);
  }

  .hero-text {
    font-size: 0.82rem;
  }

  .card {
    padding: 11px;
    border-radius: 16px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  tr {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  td:nth-child(3)::before {
    display: none;
  }

  .icon-btn {
    width: 100%;
  }

  .switch-ui {
    width: 46px;
    height: 27px;
  }

  .switch-ui::after {
    width: 17px;
    height: 17px;
  }

  .switch-field input:checked + .switch-ui::after {
    transform: translateX(19px);
  }

  .dialog-card {
    padding: 16px;
  }
}

@media (max-width: 300px), (max-height: 360px) {
  .bg-layer img {
    filter: saturate(0.95) brightness(0.54);
  }

  .topbar {
    gap: 8px;
  }

  .menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .menu-btn span {
    width: 16px;
  }

  .brand {
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .brand small,
  .hero-text,
  footer {
    display: none;
  }

  .sidebar {
    width: 100vw;
    padding: 14px;
  }

  .nav-link {
    min-height: 40px;
    padding: 10px 12px;
  }

  .page-shell {
    width: calc(100% - 8px);
    padding-top: 56px;
    padding-bottom: 16px;
  }

  .eyebrow {
    display: none;
  }

  h1 {
    margin-bottom: 8px;
    font-size: 1.32rem;
  }

  .card {
    margin: 8px 0;
    padding: 9px;
    border-radius: 14px;
  }

  .card-header {
    gap: 6px;
    margin-bottom: 10px;
  }

  .card-header h2 {
    font-size: 0.98rem;
  }

  .card-header p,
  .field small,
  .notice,
  .guide-list p {
    font-size: 0.76rem;
    line-height: 1.55;
  }

  .badge {
    min-height: 24px;
    font-size: 0.7rem;
  }

  input,
  select,
  .custom-select-btn,
  .btn {
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .guide-list {
    gap: 9px;
  }

  .guide-list article {
    padding: 9px;
  }

  pre {
    padding: 9px;
  }

  code {
    font-size: 0.68rem;
  }

  textarea {
    min-height: 210px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 恢复上一版布局观感：覆盖上一轮全尺寸响应式尝试 */
@media (min-width: 1280px) {
  .page-shell {
    width: min(1000px, calc(100% - 30px));
    padding-top: 92px;
  }

  .card {
    margin: 18px 0;
    padding: 22px;
  }

  .guide-card {
    max-width: 880px;
  }

  h1 {
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .hero-text,
  .card-header p,
  .notice,
  .guide-list p {
    font-size: revert;
  }

  textarea {
    min-height: 420px;
    font-size: 0.9rem;
  }
}

@media (min-width: 1600px), (min-width: 2200px) {
  .page-shell {
    width: min(1000px, calc(100% - 30px));
    padding-top: 92px;
  }

  .topbar {
    top: 14px;
    left: 14px;
    right: 14px;
  }

  .menu-btn {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .brand {
    padding: 10px 14px;
    font-size: revert;
  }

  h1 {
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .btn,
  input,
  select,
  .custom-select-btn {
    min-height: 44px;
  }

  textarea {
    min-height: 420px;
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) and (min-width: 721px) {
  .page-shell {
    width: min(1000px, calc(100% - 30px));
    padding-top: 92px;
  }

  h1 {
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-header {
    flex-direction: row;
  }
}

@media (max-width: 720px) {
  .bg-mask {
    background:
      radial-gradient(circle at top left, rgba(78, 203, 255, 0.3), transparent 32rem),
      radial-gradient(circle at bottom right, rgba(255, 77, 109, 0.2), transparent 30rem),
      linear-gradient(180deg, rgba(3, 9, 20, 0.62), rgba(3, 9, 20, 0.86));
  }

  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 12px;
  }

  .menu-btn {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .menu-btn span {
    width: 20px;
  }

  .brand {
    max-width: none;
    padding: 9px 12px;
    font-size: revert;
    white-space: normal;
  }

  .brand small,
  .hero-text,
  footer {
    display: revert;
  }

  .sidebar {
    width: min(310px, 82vw);
    padding: 20px;
  }

  .page-shell {
    width: min(100% - 18px, 1000px);
    padding-top: 84px;
    padding-bottom: 48px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .eyebrow {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
  }

  h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .hero-text {
    font-size: revert;
    line-height: 1.8;
  }

  .hero-points {
    gap: 7px;
    margin-top: 13px;
  }

  .hero-points span {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .card {
    margin: 18px 0;
    padding: 14px;
    border-radius: 18px;
  }

  .card-header {
    gap: 10px;
    margin-bottom: 18px;
  }

  .card-header h2 {
    font-size: 1.18rem;
  }

  .card-header p,
  .field small,
  .notice,
  .guide-list p {
    font-size: revert;
    line-height: revert;
  }

  .badge {
    min-height: 28px;
    font-size: 0.8rem;
  }

  .toolbar {
    display: flex;
    gap: 8px;
  }

  .toolbar .btn {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  tr {
    grid-template-columns: 1fr 1fr auto;
    gap: 7px;
  }

  td:nth-child(3)::before {
    display: block;
  }

  td input {
    min-height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  .icon-btn {
    width: auto;
    min-height: 36px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  input,
  select,
  .custom-select-btn,
  .btn {
    border-radius: 13px;
  }

  .custom-select-panel {
    max-height: none;
  }

  .guide-list {
    gap: 16px;
  }

  .guide-list article {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
    border-radius: 18px;
  }

  pre {
    padding: 12px;
  }

  code {
    font-size: 0.78rem;
    line-height: 1.62;
  }

  textarea {
    min-height: 340px;
    font-size: 0.82rem;
  }

  .dialog-card {
    padding: 20px;
    border-radius: 20px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2rem;
  }

  .brand small {
    display: none;
  }

  .toolbar .btn {
    flex-basis: 100%;
  }

  tr {
    grid-template-columns: 1fr 1fr 52px;
  }

  .guide-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .guide-list article {
    padding: 12px;
    border-radius: 15px;
  }

  .step {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
}
