:root {
      --tab-active: #1e9fff;
      --toolbar-bg: #fafafa;
      --border: #e6e6e6;
    }
    body {
      margin: 0;
      background: #f2f2f2;
      font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    }
    .page-wrap {
      max-width: 1200px;
      margin: 0 auto;
      padding: 12px 16px 24px;
    }
    .sub-bar {
      background: #fff;
      border: 1px solid var(--border);
      border-top: none;
      padding: 8px 12px;
      font-size: 12px;
      color: #666;
    }
    .sub-bar a {
      color: #1e9fff;
      margin-right: 16px;
    }
    .panel {
      background: #fff;
      border: 1px solid var(--border);
      padding: 16px;
    }
    .panel-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 12px;
      color: #333;
    }
    .editor-wrap {
      position: relative;
      border: 1px solid var(--border);
      border-radius: 2px;
    }
    .editor-wrap .CodeMirror {
      height: 420px;
      font-size: 13px;
    }
    .editor-wrap.editor-resizable {
      display: flex;
      flex-direction: column;
      height: 420px;
      min-height: 200px;
      max-height: calc(100vh - 120px);
    }
    .editor-wrap.editor-resizable .CodeMirror {
      flex: 1;
      min-height: 0;
      height: auto !important;
    }
    .editor-wrap.editor-resizable .editor-toolbar-float {
      bottom: 18px;
    }
    .editor-resize-handle {
      flex-shrink: 0;
      height: 10px;
      cursor: ns-resize;
      background: var(--toolbar-bg);
      border-top: 1px solid var(--border);
      position: relative;
    }
    .editor-resize-handle::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 32px;
      height: 3px;
      border-radius: 2px;
      background: var(--border);
      opacity: 0.8;
    }
    .editor-resize-handle:hover::after,
    body.editor-resizing .editor-resize-handle::after {
      background: #16b777;
      opacity: 1;
    }
    .editor-wrap.editor-go-out .CodeMirror {
      min-height: 300px;
      font-size: 13px;
      border-radius: 4px;
    }
    .editor-wrap.editor-go-out .CodeMirror-scroll {
      min-height: 300px;
    }
    .editor-wrap.editor-resizable.editor-go-out .CodeMirror,
    .editor-wrap.editor-resizable.editor-go-out .CodeMirror-scroll {
      min-height: 0;
    }
    .editor-toolbar-float {
      position: absolute;
      right: 8px;
      bottom: 8px;
      z-index: 2;
    }
    .action-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
      padding: 10px 12px;
      background: var(--toolbar-bg);
      border: 1px solid var(--border);
      border-radius: 2px;
    }
    .action-bar .layui-btn-sm {
      margin: 0;
    }
    .action-bar .layui-form-checkbox {
      margin: 0 0 0 8px;
    }
    .action-bar .spacer {
      flex: 1;
      min-width: 8px;
    }
    .hint {
      font-size: 12px;
      color: #999;
      margin-top: 8px;
    }
    .ts-row {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 12px;
    }
    .ts-row .layui-input-inline {
      width: 220px;
    }
    .ts-box {
      border: 1px solid var(--border);
      padding: 12px;
      background: #fafafa;
      border-radius: 2px;
      margin-bottom: 12px;
    }
    .ts-box label {
      display: block;
      font-size: 12px;
      color: #666;
      margin-bottom: 4px;
    }
    .go-struct-name {
      max-width: 280px;
      margin-bottom: 12px;
    }
    .ts-simple-wrap {
      background: #eaf4ff;
      border: 1px solid #c5e1ff;
      border-radius: 4px;
      padding: 12px 14px;
      margin-bottom: 16px;
    }
    .ts-simple-wrap .ts-live-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 12px;
    }
    .ts-simple-wrap .ts-live-label {
      font-size: 13px;
      color: #333;
    }
    .ts-simple-wrap .ts-live-value {
      color: #ff6600;
      font-weight: 700;
      font-size: 20px;
      font-variant-numeric: tabular-nums;
      min-width: 140px;
    }
    .ts-simple-wrap .ts-live-datetime {
      color: #1e9fff;
      font-weight: 700;
      font-size: 18px;
      font-variant-numeric: tabular-nums;
      min-width: 180px;
    }
    .ts-simple-wrap .ts-copy-live {
      margin-left: 6px;
      margin-right: 4px;
      vertical-align: middle;
      padding: 0 10px;
    }
    .ts-inline-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
    }
    .ts-inline-row .ts-inline-label {
      flex: 0 0 220px;
      max-width: 100%;
      font-size: 13px;
      color: #444;
    }
    .ts-inline-row .layui-input {
      flex: 1 1 160px;
      min-width: 120px;
    }
    .ts-inline-row .layui-input.ts-out {
      background: #fafafa;
      flex: 1 1 200px;
    }
    .ts-inline-row select.ts-unit {
      width: 72px;
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 2px;
      padding: 0 8px;
      background: #fff;
    }
    @media (max-width: 768px) {
      .ts-inline-row .ts-inline-label {
        flex: 1 1 100%;
      }
    }
    .jwt-sub {
      font-size: 12px;
      font-weight: normal;
      color: #888;
    }
    .jwt-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      align-items: flex-start;
    }
    .jwt-pane {
      flex: 1 1 360px;
      min-width: 260px;
    }
    .jwt-seg-bar {
      display: flex;
      height: 8px;
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 10px;
      box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    }
    .jwt-seg {
      min-width: 4px;
      transition: flex 0.2s ease;
    }
    .jwt-seg-h {
      background: #fb015b;
    }
    .jwt-seg-p {
      background: #d63aff;
    }
    .jwt-seg-s {
      background: #00b9f1;
    }
    .jwt-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      color: #666;
      letter-spacing: 0.02em;
      margin: 12px 0 6px;
    }
    .jwt-label:first-of-type {
      margin-top: 0;
    }
    .editor-wrap.editor-jwt-enc .CodeMirror {
      height: 200px;
      font-size: 13px;
    }
    .editor-wrap.editor-jwt-header .CodeMirror {
      height: 120px;
      font-size: 13px;
    }
    .editor-wrap.editor-jwt-payload .CodeMirror {
      height: 240px;
      font-size: 13px;
    }
    .jwt-badge {
      font-size: 12px;
      font-weight: 600;
    }
    .jwt-badge.ok {
      color: #16b777;
    }
    .jwt-badge.bad {
      color: #ff5722;
    }
    .crypt-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }
    .crypt-toolbar label {
      font-size: 13px;
      color: #555;
    }
    .editor-wrap.crypt-io .CodeMirror {
      height: 220px;
      font-size: 13px;
    }
    .pwd-gen-wrap {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
      margin-bottom: 4px;
    }
    .crypt-main-block {
      margin-top: 0;
      padding-top: 20px;
      border-top: 1px solid var(--border);
    }
    .pwd-len-row {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }
    .pwd-len-row label {
      font-size: 13px;
      color: #333;
      min-width: 100px;
    }
    .pwd-len-row input[type="range"] {
      flex: 1 1 200px;
      max-width: 400px;
    }
    .pwd-len-val {
      font-weight: 700;
      color: var(--tab-active);
      min-width: 2ch;
    }
    .pwd-checks {
      display: flex;
      flex-wrap: wrap;
      gap: 16px 20px;
      margin-bottom: 14px;
      font-size: 13px;
    }
    .pwd-checks label {
      cursor: pointer;
      user-select: none;
    }
    .pwd-out-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin: 12px 0;
    }
    .pwd-out-field {
      flex: 1 1 220px;
      font-family: Consolas, monospace;
      letter-spacing: 0.04em;
      background: #2b2b2b;
      color: #e8e8e8;
      border-color: #444;
    }
    .pwd-strength-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 8px;
      flex-wrap: wrap;
    }
    .pwd-strength-track {
      flex: 1 1 180px;
      max-width: 360px;
      height: 10px;
      background: #e8e8e8;
      border-radius: 5px;
      overflow: hidden;
    }
    .pwd-strength-fill {
      height: 100%;
      width: 0%;
      border-radius: 5px;
      transition: width 0.25s ease, background 0.2s ease;
    }
    .pwd-strength-text {
      font-size: 13px;
      font-weight: 600;
      min-width: 3em;
    }
    .site-icp-footer {
      text-align: center;
      padding: 16px 16px 8px;
      font-size: 12px;
      color: #888;
    }
    .site-icp-footer a {
      color: #888;
      text-decoration: none;
    }
    .site-icp-footer a:hover {
      color: var(--tab-active);
      text-decoration: underline;
    }
    .json-repair-hint {
      margin: 8px 0 0;
      font-size: 12px;
      color: #999;
    }
    .json-repair-hint code {
      padding: 0 4px;
      background: #f0f0f0;
      border-radius: 2px;
      font-size: 11px;
    }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.site-nav a {
  display: block;
  box-sizing: border-box;
  width: 152px;
  padding: 0 6px;
  line-height: 42px;
  text-align: center;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-nav a:last-child { border-right: none; }
.site-nav a:hover { color: var(--tab-active); }
.site-nav a.is-active {
  color: var(--tab-active);
  border-bottom-color: var(--tab-active);
  font-weight: 600;
}
.hub-intro {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: none;
  padding: 20px 16px 24px;
}
.hub-intro h1 { font-size: 22px; margin: 0 0 12px; color: var(--text-primary); }
.hub-intro p { color: var(--text-secondary); line-height: 1.7; margin: 0 0 16px; }
.hub-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hub-tools a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #333;
  text-decoration: none;
}
.hub-tools a:hover {
  border-color: var(--tab-active);
  color: var(--tab-active);
}
.hub-tools strong { display: block; font-size: 15px; margin-bottom: 6px; }
.hub-tools span { font-size: 12px; color: #888; }
.tool-main {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: none;
}
@media (max-width: 768px) {
  .site-nav a { width: 50%; border-bottom: 1px solid var(--border); }
}
.tool-doc-link {
  margin: 16px 16px 0;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.tool-doc-link a {
  color: var(--tab-active);
  text-decoration: none;
}
.tool-doc-link a:hover {
  text-decoration: underline;
}
.site-icp-footer {
  text-align: center;
  padding: 16px 16px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.site-icp-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-icp-footer a:hover {
  color: var(--tab-active);
  text-decoration: underline;
}
