    :root {
      --ink: #152033;
      --muted: #69778a;
      --line: #d9e0e6;
      --panel: #ffffff;
      --wash: #f4f8fb;
      --mint: #0aa776;
      --mint-dark: #07895f;
      --coral: #e34d59;
      --amber: #f7b733;
      --navy: #203a5f;
      --blue: #2f6fbe;
    }

    * {
      box-sizing: border-box;
    }

    [hidden] {
      display: none !important;
    }

    body {
      margin: 0;
      color: var(--ink);
      background:
        radial-gradient(circle at 12% 8%, rgba(247, 183, 51, .22), transparent 28%),
        linear-gradient(180deg, #f7fbfd 0%, #edf4f8 100%);
      font-family: Arial, "Microsoft YaHei", sans-serif;
      font-size: 14px;
      letter-spacing: 0;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 212px minmax(0, 1fr);
    }

    .sidebar {
      padding: 24px 18px;
      background: #152033;
      color: #ffffff;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      margin-bottom: 34px;
    }

    .mark {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--mint), var(--amber));
      color: #ffffff;
      font-weight: 800;
      font-size: 18px;
    }

    .brand-name {
      display: flex;
      flex-direction: column;
      gap: 3px;
      line-height: 1;
    }

    .brand-name strong {
      font-size: 18px;
    }

    .brand-name span {
      color: #aebccc;
      font-size: 12px;
    }

    .nav-title {
      margin: 0 0 10px;
      color: #8fa1b6;
      font-size: 12px;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav a {
      height: 38px;
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 0 12px;
      color: #dce7f3;
      text-decoration: none;
      border-radius: 7px;
    }

    .nav a.active {
      color: #ffffff;
      background: rgba(255, 255, 255, .13);
    }

    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--mint);
    }

    .content {
      padding: 24px 28px 34px;
    }

    .top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 22px;
    }

    .headline {
      min-width: 220px;
      display: grid;
      gap: 8px;
    }

    .tool-dropdown {
      position: relative;
      width: max-content;
      min-width: 260px;
    }

    .tool-dropdown-trigger {
      height: 46px;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 16px;
      border: 1px solid rgba(32, 58, 95, .14);
      border-radius: 10px;
      background: linear-gradient(135deg, #203a5f, #2f6fbe);
      color: #ffffff;
      font-size: 20px;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(32, 58, 95, .18);
      transition: box-shadow .18s, transform .12s;
      user-select: none;
    }

    .tool-dropdown-trigger:hover {
      box-shadow: 0 6px 20px rgba(32, 58, 95, .26);
      transform: translateY(-1px);
    }

    .tool-dropdown-trigger:active {
      transform: translateY(0);
    }

    .tool-dropdown-trigger .current-icon {
      width: 28px;
      height: 28px;
      flex-shrink: 0;
      display: grid;
      place-items: center;
      border-radius: 7px;
      background: rgba(255, 255, 255, .18);
      font-size: 15px;
    }

    .tool-dropdown-trigger .current-name {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tool-dropdown-trigger .chevron {
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      font-size: 12px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .18);
      transition: transform .22s ease;
    }

    .tool-dropdown.open .tool-dropdown-trigger .chevron {
      transform: rotate(180deg);
    }

    .tool-dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      min-width: 260px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #ffffff;
      box-shadow: 0 12px 36px rgba(21, 32, 51, .16);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px);
      transition: opacity .16s, transform .16s, visibility .16s;
      z-index: 50;
    }

    .tool-dropdown.open .tool-dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .tool-dropdown-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 7px;
      cursor: pointer;
      color: var(--ink);
      font-size: 14px;
      transition: background .12s, color .12s;
    }

    .tool-dropdown-item:hover {
      background: linear-gradient(135deg, rgba(10, 167, 118, .12), rgba(47, 111, 190, .12));
      color: var(--mint-dark);
    }

    .tool-dropdown-item.active {
      background: linear-gradient(135deg, rgba(10, 167, 118, .18), rgba(47, 111, 190, .18));
      color: var(--mint-dark);
      font-weight: 700;
    }

    .tool-dropdown-item .item-icon {
      width: 30px;
      height: 30px;
      flex-shrink: 0;
      display: grid;
      place-items: center;
      border-radius: 7px;
      background: #eef3f8;
      font-size: 15px;
    }

    .tool-dropdown-item.active .item-icon {
      background: var(--mint);
      color: #ffffff;
    }

    .tool-dropdown-item .item-text {
      flex: 1;
    }

    .tool-dropdown-item .item-check {
      color: var(--mint);
      font-size: 14px;
      opacity: 0;
      transition: opacity .12s;
    }

    .tool-dropdown-item.active .item-check {
      opacity: 1;
    }

    .eyebrow {
      color: var(--mint-dark);
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 7px;
    }

    h1 {
      margin: 0;
      font-size: 28px;
      font-weight: 700;
      line-height: 1.2;
    }

    .search {
      width: min(420px, 100%);
      height: 42px;
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, .72);
      padding: 0 12px;
    }

    .search span {
      color: var(--muted);
    }

    .search input {
      width: 100%;
      border: 0;
      outline: none;
      background: transparent;
      color: var(--ink);
    }

    .now-board {
      display: grid;
      grid-template-columns: minmax(240px, 1fr) auto;
      gap: 18px;
      align-items: center;
      margin-bottom: 20px;
      padding: 20px;
      border: 1px solid rgba(32, 58, 95, .12);
      border-radius: 12px;
      background:
        linear-gradient(135deg, rgba(32, 58, 95, .96), rgba(47, 111, 190, .88)),
        #203a5f;
      color: #ffffff;
      box-shadow: 0 14px 35px rgba(32, 58, 95, .17);
    }

    .now-label {
      color: #b9cce2;
      font-size: 12px;
      margin-bottom: 8px;
    }

    .now-label-stamp {
      margin-top: 14px;
    }

    .now-beijing {
      font-size: 24px;
      font-weight: 700;
      color: #ffffff;
      letter-spacing: 1px;
      line-height: 1.2;
    }

    .now-beijing .date-part {
      color: #b9cce2;
      font-weight: 500;
      font-size: 15px;
      margin-right: 10px;
    }

    .now-beijing .time-part {
      font-variant-numeric: tabular-nums;
    }

    .now-value {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      font-size: 34px;
      font-weight: 800;
      line-height: 1.15;
    }

    .unit {
      padding: 4px 9px;
      color: #113220;
      background: #bdf4db;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
    }

    .clock-face {
      width: 130px;
      height: 130px;
      position: relative;
      border: 4px solid rgba(255, 255, 255, .28);
      border-radius: 50%;
      background: rgba(255, 255, 255, .06);
      box-shadow:
        inset 0 0 18px rgba(0, 0, 0, .18),
        0 6px 20px rgba(0, 0, 0, .15);
    }

    .clock-face::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 10px;
      height: 10px;
      background: #ffffff;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      z-index: 5;
    }

    .clock-face .clock-tick {
      position: absolute;
      left: 50%;
      top: 6px;
      width: 2px;
      height: 6px;
      background: rgba(255, 255, 255, .4);
      transform-origin: 50% 59px;
      margin-left: -1px;
    }

    .clock-face .clock-tick.hour {
      height: 9px;
      background: rgba(255, 255, 255, .75);
      width: 3px;
      margin-left: -1.5px;
    }

    .clock-face .clock-hand {
      position: absolute;
      left: 50%;
      top: 50%;
      border-radius: 4px;
      transform-origin: 50% 100%;
      transition: transform .2s cubic-bezier(.4, 2.3, .3, 1);
    }

    .clock-face .clock-hand.hour-hand {
      width: 5px;
      height: 32px;
      background: #ffffff;
      transform: translate(-50%, -100%) rotate(0deg);
      z-index: 3;
    }

    .clock-face .clock-hand.minute-hand {
      width: 3px;
      height: 46px;
      background: #ffffff;
      transform: translate(-50%, -100%) rotate(0deg);
      z-index: 2;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
      margin-bottom: 18px;
    }

    .btn {
      height: 40px;
      min-width: 90px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      background: var(--panel);
      transition: transform .12s, border-color .12s, background .12s;
    }

    .btn:hover {
      border-color: #b6c1ca;
      transform: translateY(-1px);
    }

    .btn.primary {
      color: #ffffff;
      border-color: var(--mint);
      background: var(--mint);
    }

    .btn.primary:hover {
      background: var(--mint-dark);
    }

    .btn.danger {
      color: #ffffff;
      border-color: var(--coral);
      background: var(--coral);
    }

    .btn.soft {
      background: #e8eef3;
      border-color: #e8eef3;
    }

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

    .tools {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
    }

    .panel {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 255, 255, .86);
      box-shadow: 0 10px 28px rgba(21, 32, 51, .08);
      overflow: hidden;
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 17px;
      border-bottom: 1px solid #e4e9ee;
      background: #ffffff;
    }

    .panel-title {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
    }

    .panel-tag {
      color: var(--muted);
      font-size: 12px;
    }

    .panel-body {
      display: grid;
      gap: 14px;
      padding: 17px;
    }

    .grid-2 {
      display: grid;
      grid-template-columns: 1fr 140px;
      gap: 10px;
    }

    .grid-action {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: end;
    }

    .field {
      display: grid;
      gap: 7px;
    }

    label {
      color: var(--muted);
      font-size: 12px;
    }

    .input,
    select {
      width: 100%;
      height: 42px;
      border: 1px solid #cfd9e1;
      border-radius: 8px;
      background: #ffffff;
      color: var(--ink);
      padding: 0 12px;
      outline: none;
    }

    .input:focus,
    select:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(47, 111, 190, .12);
    }

    select {
      appearance: none;
      background-image: linear-gradient(45deg, transparent 50%, #8a97a5 50%),
        linear-gradient(135deg, #8a97a5 50%, transparent 50%);
      background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
      background-size: 5px 5px, 5px 5px;
      background-repeat: no-repeat;
      padding-right: 34px;
    }

    .result {
      font-weight: 700;
      color: #10223d;
      background: #f9fbfc;
    }

    .batch-note {
      color: var(--muted);
      line-height: 1.7;
      margin: 4px 0 0;
    }

    .textarea {
      width: 100%;
      min-height: 180px;
      resize: vertical;
      border: 1px solid #cfd9e1;
      border-radius: 8px;
      background: #ffffff;
      color: var(--ink);
      padding: 12px;
      outline: none;
      line-height: 1.6;
      font-family: Consolas, Monaco, "Courier New", monospace;
      font-size: 13px;
    }

    .textarea:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(47, 111, 190, .12);
    }

    .result-area {
      min-height: 220px;
      background: #f9fbfc;
    }

    .json-layout {
      display: grid;
      grid-template-columns: minmax(300px, 5fr) minmax(420px, 7fr);
      gap: 16px;
      align-items: stretch;
    }

    .json-column {
      min-width: 0;
      display: grid;
      gap: 12px;
      align-content: start;
    }

    .json-column .textarea {
      min-height: 520px;
    }

    .json-column .result-area {
      min-height: calc(100vh - 180px);
    }

    .json-viewer {
      width: 100%;
      min-height: calc(100vh - 180px);
      max-height: calc(100vh - 180px);
      overflow: auto;
      border: 1px solid #cfd9e1;
      border-radius: 8px;
      background: #f9fbfc;
      color: var(--ink);
      padding: 14px 16px;
      line-height: 1.75;
      font-family: Consolas, Monaco, "Courier New", monospace;
      font-size: 15px;
      white-space: pre-wrap;
    }

    .json-viewer::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    .json-viewer::-webkit-scrollbar-thumb {
      background: #c3cdd6;
      border-radius: 4px;
    }

    .json-viewer::-webkit-scrollbar-track {
      background: transparent;
    }

    .json-node {
      position: relative;
    }

    .json-node > .json-children {
      padding-left: 22px;
    }

    .json-node.collapsed > .json-children,
    .json-node.collapsed > .json-closing-line {
      display: none;
    }

    .json-toggle {
      display: inline-block;
      width: 16px;
      text-align: center;
      cursor: pointer;
      user-select: none;
      color: var(--muted);
      font-size: 11px;
      transition: transform .15s;
      vertical-align: middle;
    }

    .json-toggle.expanded {
      transform: rotate(90deg);
    }

    .json-toggle.leaf {
      cursor: default;
      visibility: hidden;
    }

    .json-key {
      color: #9a6b00;
      font-weight: 700;
    }

    .json-string {
      color: #0a8a45;
    }

    .json-number {
      color: #1565d8;
      font-weight: 600;
    }

    .json-boolean {
      color: #8a2be2;
      font-weight: 600;
    }

    .json-null {
      color: #8b8b8b;
      font-style: italic;
    }

    .json-bracket {
      color: #4a4a4a;
      font-weight: 700;
    }

    .json-children {
      position: relative;
    }

    .json-summary {
      cursor: pointer;
      display: inline;
    }

    .json-summary:hover {
      background: rgba(47, 111, 190, .06);
      border-radius: 3px;
    }

    .json-collapsed-preview {
      display: none;
      color: var(--muted);
    }

    .json-node.collapsed > .json-summary > .json-collapsed-preview {
      display: inline;
    }

    .json-closing-line {
    }

    .json-comma {
      color: #555;
    }

    .json-error {
      color: var(--coral);
      padding: 12px;
      white-space: pre-wrap;
    }

    .compact {
      margin: 0;
    }

    .tool-page {
      max-width: 920px;
    }

    .tool-page.json-page {
      max-width: none;
    }

    .tips {
      margin-top: 18px;
      padding: 14px 16px;
      border-left: 4px solid var(--amber);
      background: rgba(255, 255, 255, .7);
      color: #526074;
      border-radius: 8px;
      line-height: 1.7;
    }

    .toast {
      position: fixed;
      right: 18px;
      bottom: 18px;
      padding: 10px 14px;
      border-radius: 8px;
      color: #ffffff;
      background: rgba(21, 32, 51, .92);
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
      transition: opacity .16s, transform .16s;
    }

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

    @media (max-width: 980px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        display: none;
      }

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

      .json-layout {
        grid-template-columns: 1fr;
      }

      .json-column .textarea,
      .json-column .result-area {
        min-height: 360px;
      }
    }

    @media (max-width: 640px) {
      .content {
        padding: 18px 12px 26px;
      }

      .top,
      .now-board {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
      }

      .clock-face {
        display: none;
      }

      .now-value {
        font-size: 27px;
      }

      .grid-2,
      .grid-action {
        grid-template-columns: 1fr;
      }

      .btn {
        width: 100%;
      }
    }

/* ============================================================
   v2 补丁：暗色主题 + 新工具组件
   追加在原样式之后，不改动任何原有规则
   ============================================================ */

/* ---------------- 主题变量 ---------------- */
:root[data-theme="dark"] {
  --ink: #e6edf5;
  --muted: #93a5b9;
  --line: #2a3747;
  --panel: #16202c;
  --wash: #111a24;
  --navy: #8fb4e8;
  --blue: #6aa7f0;
  --mint: #22c48c;
  --mint-dark: #17a173;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 8%, rgba(247, 183, 51, .10), transparent 30%),
    linear-gradient(180deg, #0f1720 0%, #0a1017 100%);
}

:root[data-theme="dark"] .sidebar {
  background: #0a1017;
}

:root[data-theme="dark"] .panel {
  background: rgba(22, 32, 44, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38);
}

:root[data-theme="dark"] .panel-head {
  background: #18232f;
  border-bottom-color: #26313f;
}

:root[data-theme="dark"] .input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .textarea {
  background: #0e1722;
  border-color: #2a3747;
  color: var(--ink);
}

:root[data-theme="dark"] .result,
:root[data-theme="dark"] .result-area {
  background: #0b1420;
  color: #cfe0f5;
}

:root[data-theme="dark"] .btn {
  background: #1b2836;
  border-color: #2a3747;
  color: var(--ink);
}

:root[data-theme="dark"] .btn:hover {
  border-color: #3c4d61;
}

:root[data-theme="dark"] .btn.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #04241a;
}

:root[data-theme="dark"] .btn.primary:hover {
  background: var(--mint-dark);
  border-color: var(--mint-dark);
}

:root[data-theme="dark"] .btn.danger {
  background: var(--coral);
  border-color: var(--coral);
  color: #ffffff;
}

:root[data-theme="dark"] .btn.soft {
  background: #1e2b3a;
  border-color: #26313f;
}

:root[data-theme="dark"] .tool-dropdown-trigger {
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}

:root[data-theme="dark"] .tool-dropdown-menu {
  background: #16202c;
  border-color: #2a3747;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

:root[data-theme="dark"] .tool-dropdown-item:hover {
  background: #1e2b3a;
}

:root[data-theme="dark"] .json-viewer,
:root[data-theme="dark"] .tips,
:root[data-theme="dark"] .now-board {
  background: #101a25;
  border-color: #26313f;
}

/* 暗色下 JSON 结果配色：整体提亮，保证深底上可读 */
:root[data-theme="dark"] .json-viewer {
  color: #dce8f5;
  border-color: #2a3747;
}

:root[data-theme="dark"] .json-key {
  color: #ffc857;
}

:root[data-theme="dark"] .json-string {
  color: #7ee2a8;
}

:root[data-theme="dark"] .json-number {
  color: #7cc0ff;
}

:root[data-theme="dark"] .json-boolean {
  color: #d29bfd;
}

:root[data-theme="dark"] .json-null {
  color: #93a3b6;
}

:root[data-theme="dark"] .json-bracket {
  color: #c3d3e4;
}

:root[data-theme="dark"] .json-comma {
  color: #9fb0c4;
}

:root[data-theme="dark"] .json-toggle {
  color: #8aa0b8;
}

:root[data-theme="dark"] .clock-face {
  background: #0d1631;
  border-color: #22304a;
}

:root[data-theme="dark"] .toast {
  background: #1e2b3a;
  color: var(--ink);
  border: 1px solid #2a3747;
}

/* ---------------- 主题切换按钮 ---------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, transform .12s;
}

.theme-toggle:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

/* ---------------- 通用代码块 ---------------- */
.code-box {
  margin: 0;
  padding: 12px 13px;
  min-height: 92px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  color: var(--ink);
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-box:empty::before {
  content: "—";
  color: var(--muted);
}

/* ---------------- JWT ---------------- */
.jwt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.jwt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.jwt-badge {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--muted);
}

.jwt-badge.ok {
  color: #0a7a52;
  border-color: rgba(10, 167, 118, .38);
  background: rgba(10, 167, 118, .10);
}

.jwt-badge.warn {
  color: #9c6410;
  border-color: rgba(247, 183, 51, .48);
  background: rgba(247, 183, 51, .14);
}

.jwt-badge.bad {
  color: #b8343f;
  border-color: rgba(227, 77, 89, .42);
  background: rgba(227, 77, 89, .11);
}

:root[data-theme="dark"] .jwt-badge.ok { color: #4bd9a4; }
:root[data-theme="dark"] .jwt-badge.warn { color: #ffcf70; }
:root[data-theme="dark"] .jwt-badge.bad { color: #ff8f97; }

/* ---------------- 哈希 ---------------- */
.hash-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hash-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.hash-algo {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.hash-value {
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
  color: var(--ink);
  word-break: break-all;
}

.hash-row .btn {
  height: 30px;
  min-width: 56px;
  font-size: 12px;
  padding: 0 10px;
}

/* ---------------- 正则 ---------------- */
.regex-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 2px;
}

.regex-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.regex-output {
  margin-top: 14px;
  padding: 13px;
  min-height: 120px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.regex-output mark {
  background: rgba(247, 183, 51, .48);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

:root[data-theme="dark"] .regex-output mark {
  background: rgba(247, 183, 51, .34);
  color: #ffe6a8;
}

.regex-groups {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
  color: var(--muted);
}

.regex-groups b {
  color: var(--ink);
}

.regex-empty {
  color: var(--muted);
}

/* ---------------- 响应式补丁 ---------------- */
@media (max-width: 860px) {
  .jwt-grid {
    grid-template-columns: 1fr;
  }

  .hash-row {
    grid-template-columns: 1fr auto;
  }

  .hash-algo {
    grid-column: 1 / -1;
  }
}
