
      :root {
        --bg: #0f172a;
        --panel: rgba(255, 255, 255, 0.06);
        --panel-strong: rgba(255, 255, 255, 0.12);
        --stroke: rgba(148, 163, 184, 0.35);
        --text: #e2e8f0;
        --muted: rgba(226, 232, 240, 0.68);
        --accent: #22d3ee;
        --accent-2: #38bdf8;
        --danger: #f43f5e;
        --shadow: 0 30px 60px rgba(3, 7, 18, 0.35);
        --bg-gradient:
          radial-gradient(1100px 600px at 15% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
          radial-gradient(900px 500px at 85% 15%, rgba(34, 211, 238, 0.16), transparent 60%),
          linear-gradient(160deg, #0b1021 0%, #0f172a 55%, #111827 100%);
      }

      body[data-theme="light"] {
        --bg: #eef2f7;
        --panel: rgba(255, 255, 255, 0.78);
        --panel-strong: rgba(255, 255, 255, 0.9);
        --stroke: rgba(148, 163, 184, 0.45);
        --text: #0b1220;
        --muted: rgba(30, 41, 59, 0.65);
        --accent: #0ea5e9;
        --accent-2: #38bdf8;
        --danger: #e11d48;
        --shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
        --bg-gradient:
          radial-gradient(1000px 600px at 10% 5%, rgba(14, 165, 233, 0.2), transparent 60%),
          radial-gradient(900px 600px at 90% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
          linear-gradient(160deg, #f8fafc 0%, #e2e8f0 55%, #f1f5f9 100%);
      }

      * {
        box-sizing: border-box;
      }

      html,
      body {
        min-height: 100%;
      }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Avenir Next", Arial, sans-serif;
        color: var(--text);
        background: var(--bg-gradient);
        background-attachment: fixed;
        background-size: cover;
        transition: background 0.4s ease, color 0.3s ease;
        overflow-y: auto;
      }

      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 8px 20px 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      header {
        position: relative;
        margin-bottom: 0;
        flex-shrink: 0;
      }

      header h1 {
        margin: 0;
        font-size: 28px;
        letter-spacing: 0.4px;
      }

      .title-row {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
      }

      body[data-theme="dark"] .title-row {
        gap: 0;
      }

      .desc-row {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
      }

      .logo-wrap {
        width: 200px;
        height: 60px;
        max-width: 100%;
        overflow: hidden;
        transition:
          width 0.35s ease,
          height 0.35s ease,
          opacity 0.35s ease,
          transform 0.35s ease;
        transform: translateY(0);
        opacity: 1;
      }

      .logo-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
      }

      body[data-theme="dark"] .logo-wrap {
        width: 0;
        height: 0;
        opacity: 0;
        transform: translateY(-6px);
      }

      header p {
        margin: 6px 0 0;
        color: var(--muted);
      }

      .badge {
        padding: 6px 12px;
        border-radius: 999px;
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(56, 189, 248, 0.2));
        border: 1px solid rgba(56, 189, 248, 0.4);
        font-size: 12px;
        color: #e0f2fe;
      }

      .header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 0;
      }

      .header-content {
        width: 100%;
      }

      .theme-btn {
        border: none;
        background: var(--panel-strong);
        color: var(--text);
        padding: 8px 12px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
      }

      .theme-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
      }

      .panel {
        background: var(--panel);
        border: 1px solid var(--stroke);
        border-radius: 16px;
        padding: 16px;
        box-shadow: var(--shadow);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        display: flex;
        flex-direction: column;
        min-height: 0;
      }

      .controls {
        display: grid;
        gap: 12px;
        margin-bottom: 0;
        flex-shrink: 0;
      }

      label {
        font-size: 13px;
        color: var(--muted);
        display: block;
        margin-bottom: 6px;
      }

      input[type="text"] {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid var(--stroke);
        background: var(--panel-strong);
        color: var(--text);
        font-size: 14px;
        outline: none;
      }

      input[type="text"]:focus {
        border-color: rgba(56, 189, 248, 0.8);
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
      }

      .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
      }

      button {
        border: none;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        color: #08131f;
        padding: 9px 16px;
        font-weight: 600;
        border-radius: 10px;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
      }

      button:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(14, 165, 233, 0.25);
      }

      .toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: var(--muted);
      }

      select {
        background: var(--panel-strong);
        color: var(--text);
        border: 1px solid var(--stroke);
        border-radius: 10px;
        padding: 8px 10px;
      }

      .grid {
        display: grid;
        gap: 16px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        min-height: 520px;
      }

      .panel h2 {
        margin: 0 0 10px;
        font-size: 16px;
      }

      textarea {
        width: 100%;
        min-height: 0;
        resize: none;
        border-radius: 12px;
        border: 1px solid var(--stroke);
        background: var(--panel-strong);
        color: var(--text);
        padding: 12px;
        font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 13px;
        line-height: 1.6;
      }

      textarea:focus {
        outline: none;
        border-color: rgba(34, 211, 238, 0.7);
      }

      .editor {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        flex: 1 1 auto;
        height: 480px;
        min-height: 480px;
        border: 1px solid var(--stroke);
        border-radius: 12px;
        background: var(--panel-strong);
        overflow: hidden;
      }

      #jsonHighlight,
      #resultHighlight,
      #jsonInput,
      #resultOutput {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        margin: 0;
        width: 100%;
        height: 100%;
        padding: 12px;
        border: none;
        border-radius: 0;
        font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 13px;
        line-height: 1.6;
        white-space: pre-wrap;
        word-break: break-word;
        background: transparent;
        overflow: hidden; /* Hide individual scrollbars */
      }

      #jsonHighlight,
      #resultHighlight {
        color: var(--text);
        pointer-events: none;
      }

      #jsonInput,
      #resultOutput {
        color: transparent;
        caret-color: var(--text);
        resize: none;
        outline: none;
        overflow: auto;
      }

      #resultOutput {
        caret-color: transparent;
      }

      #jsonInput::selection {
        background: rgba(56, 189, 248, 0.25);
      }

      .token-key {
        color: #dc2626 !important;
      }

      .token-string {
        color: #2563eb !important;
      }

      .token-number {
        color: #16a34a !important;
      }

      .token-boolean {
        color: #f472b6;
      }

      .token-null {
        color: #cbd5f5;
      }

      .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
      }

      .panel-header h2 {
        margin: 0;
        font-size: 16px;
      }

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

      .beautify-btn,
      .validate-btn,
      .beautify-run-btn {
        background: linear-gradient(135deg, #10b981, #059669);
        color: #fff;
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        border: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
      }

      .beautify-run-btn {
        background: linear-gradient(135deg, #6366f1, #4f46e5);
      }

      .beautify-run-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
      }

      .beautify-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
      }

      .validate-btn {
        background: linear-gradient(135deg, #6366f1, #4f46e5);
      }

      .validate-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
      }

      .validation-status {
        margin-top: 8px;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 12px;
        display: none;
      }

      .validation-status.valid {
        display: block;
        background: rgba(16, 185, 129, 0.12);
        border: 1px solid rgba(16, 185, 129, 0.4);
        color: #6ee7b7;
      }

      .validation-status.invalid {
        display: block;
        background: rgba(244, 63, 94, 0.12);
        border: 1px solid rgba(244, 63, 94, 0.4);
        color: #fecdd3;
      }

      body[data-theme="light"] .validation-status.invalid {
        color: #1f2937;
      }

      .validation-status.warning {
        display: block;
        background: rgba(245, 158, 11, 0.12);
        border: 1px solid rgba(245, 158, 11, 0.4);
        color: #fde68a;
      }

      .validation-status .error-detail {
        margin-top: 4px;
        padding-left: 16px;
      }

      .validation-status .error-detail li {
        margin: 2px 0;
      }

      body[data-theme="light"] .token-key {
        color: #dc2626 !important;
      }

      body[data-theme="light"] .token-string {
        color: #2563eb !important;
      }

      body[data-theme="light"] .token-number {
        color: #16a34a !important;
      }

      body[data-theme="light"] .token-boolean {
        color: #db2777;
      }

      body[data-theme="light"] .token-null {
        color: #475569;
      }

      .status {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        color: var(--muted);
        font-size: 12px;
      }

      .error {
        display: none;
        margin-top: 8px;
        padding: 8px 10px;
        border-radius: 10px;
        background: rgba(244, 63, 94, 0.12);
        border: 1px solid rgba(244, 63, 94, 0.4);
        color: var(--text);
        font-size: 12px;
      }

      body[data-theme="light"] .error {
        color: #1f2937;
      }

      .examples {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .examples button {
        background: transparent;
        color: var(--text);
        border: 1px solid rgba(56, 189, 248, 0.35);
        padding: 6px 10px;
        font-weight: 500;
        border-radius: 999px;
      }

      .footer {
        margin-top: 0;
        color: var(--muted);
        font-size: 12px;
        flex-shrink: 0;
      }

      .comments-panel {
        margin-top: 4px;
        flex-shrink: 0;
      }

      .comments-panel h2 {
        margin: 0 0 8px;
        font-size: 18px;
      }

      .comments-panel p {
        margin: 0 0 14px;
        color: var(--muted);
        font-size: 13px;
      }

      .comment-form {
        display: grid;
        gap: 12px;
      }

      .comment-form-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
      }

      .comment-form textarea,
      .comment-form input[type="text"],
      .comment-form input[type="file"] {
        background: var(--panel-strong);
        color: var(--text);
      }

      .comment-text-wrap {
        position: relative;
      }

      .comment-form textarea {
        min-height: 54px;
      }

      .comment-form textarea:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        filter: grayscale(0.2);
      }

      .comment-login-overlay {
        display: none;
      }

      .comment-text-wrap.is-locked .comment-login-overlay {
        display: none;
      }

      .comment-upload {
        display: none;
      }

      .comment-upload-note {
        color: var(--muted);
        font-size: 12px;
      }

      .comment-image-preview {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
      }

      .comment-image-selection-note {
        margin-top: 8px;
        color: var(--muted);
        font-size: 12px;
      }

      .comment-image-preview-item,
      .comment-image-item {
        width: 88px;
        height: 88px;
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid var(--stroke);
        background: var(--panel);
      }

      .comment-image-preview-item img,
      .comment-image-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }

      .comment-image-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
      }

      .comment-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
      }

      .comment-actions-left {
        display: none;
      }

      .comment-upload-btn,
      .comment-submit,
      .comment-login-btn {
        border: 0;
        border-radius: 14px;
        padding: 12px 22px;
        background: linear-gradient(135deg, #22b8f0, #2f80ed);
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
      }

      .comment-upload-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        width: 52px;
        min-width: 52px;
        height: 52px;
        padding: 0;
        border: 1px solid #d7deea;
        border-radius: 12px;
        background: #fff;
        color: #6b7280;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
        font-size: 0;
        line-height: 0;
      }

      .comment-upload-btn::before {
        content: '';
        width: 24px;
        height: 24px;
        display: block;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 21H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h4.172a2 2 0 0 0 1.414-.586l.828-.828A2 2 0 0 1 12.828 1h.344a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 16.828 3H19a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3M5 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.172a4 4 0 0 1-2.828-1.172L13.172 3h-.344L12 3.828A4 4 0 0 1 9.172 5zm7 12a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 21H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h4.172a2 2 0 0 0 1.414-.586l.828-.828A2 2 0 0 1 12.828 1h.344a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 16.828 3H19a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3M5 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.172a4 4 0 0 1-2.828-1.172L13.172 3h-.344L12 3.828A4 4 0 0 1 9.172 5zm7 12a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
      }

      .comment-login-btn {
        min-width: 140px;
        flex: 0 0 140px;
        text-align: center;
      }

      .comment-form.is-guest .comment-upload-btn,
      .comment-form.is-guest .comment-submit,
      .comment-submit:disabled {
        background: linear-gradient(135deg, #b9c3cf, #94a3b8);
        color: #ffffff;
        box-shadow: none;
        cursor: not-allowed;
      }

      .comment-form.is-guest .comment-upload-btn {
        background: #fff;
        color: #a0a8b5;
        border-color: #d7deea;
      }

      .comment-hint {
        color: var(--muted);
        font-size: 12px;
      }

      .comment-submit {
        min-width: 140px;
        flex: 0 0 140px;
      }

      .comment-list {
        display: grid;
        gap: 12px;
        margin-top: 16px;
      }

      .comment-empty {
        padding: 14px 16px;
        border-radius: 12px;
        background: var(--panel-strong);
        border: 1px dashed var(--stroke);
        color: var(--muted);
        font-size: 13px;
      }

      .comment-card {
        padding: 14px 16px;
        border-radius: 14px;
        background: var(--panel-strong);
        border: 1px solid var(--stroke);
      }

      .comment-meta {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
        margin-bottom: 8px;
        flex-wrap: wrap;
      }

      .comment-meta-main {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
      }

      .comment-avatar {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 9999px;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.35);
        background: linear-gradient(135deg, #f8fafc, #e2e8f0);
        display: grid;
        place-items: center;
      }

      .comment-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }

      .comment-avatar-fallback {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        color: #1d7dfa;
        font-size: 18px;
        font-weight: 700;
      }

      .comment-author {
        font-weight: 700;
        font-size: 14px;
      }

      .comment-time {
        color: var(--muted);
        font-size: 12px;
      }

      .comment-body {
        margin: 0;
        white-space: pre-wrap;
        word-break: break-word;
        line-height: 1.6;
        font-size: 14px;
      }

      #jp-assistant-btn {
        position: fixed;
        right: 25px;
        bottom: 25px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 3px;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
        color: #0b0f14;
        border: 1px solid rgba(255, 255, 255, 0.7);
        box-shadow:
          0 16px 32px rgba(15, 23, 42, 0.2),
          inset 0 1px 0 rgba(255, 255, 255, 0.85);
        cursor: pointer;
        z-index: 9999;
        display: grid;
        place-items: center;
        overflow: visible;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
      }

      #jp-assistant-btn::before {
        content: "";
        position: absolute;
        top: -10px;
        left: -8px;
        width: 18px;
        height: 22px;
        background:
          radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.7), transparent 45%),
          linear-gradient(180deg, #ff8b6a 0%, #ff5f4b 100%);
        border-radius: 8px 8px 10px 10px;
        box-shadow: 0 8px 16px rgba(255, 95, 75, 0.35);
      }

      #jp-assistant-btn::after {
        content: "";
        position: absolute;
        top: -14px;
        right: -10px;
        width: 20px;
        height: 20px;
        background:
          radial-gradient(circle, rgba(255, 214, 107, 0.9) 0 30%, transparent 31%),
          radial-gradient(circle, rgba(255, 214, 107, 0.8) 0 20%, transparent 21%);
        opacity: 0.9;
        filter: drop-shadow(0 6px 10px rgba(255, 214, 107, 0.45));
      }

      #jp-assistant-btn .assistant-avatar-wrap {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid rgba(255, 255, 255, 0.75);
        background: rgba(255, 255, 255, 0.5);
        box-shadow:
          0 8px 18px rgba(15, 23, 42, 0.2),
          inset 0 2px 6px rgba(255, 255, 255, 0.6);
        display: block;
      }

      #jp-assistant-btn .assistant-avatar {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: scale(1.12);
        transform-origin: center;
        display: block;
      }

      #jp-assistant-btn:hover {
        background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(29, 78, 216, 1));
        transform: translateY(-2px) scale(1.06);
        box-shadow:
          0 18px 36px rgba(15, 23, 42, 0.25),
          inset 0 1px 0 rgba(255, 255, 255, 0.95);
      }

      #jp-assistant-btn:active {
        transform: translateY(0) scale(1.01);
      }

      #jp-assistant-modal {
        position: fixed;
        inset: 0;
        background:
          radial-gradient(1200px 700px at 50% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%),
          rgba(10, 10, 14, 0.35);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
      }

      #jp-assistant-modal.is-open {
        display: flex;
      }

      #jp-assistant-modal iframe {
        width: 90%;
        height: 90%;
        border: 1px solid var(--stroke);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.25);
        box-shadow: var(--shadow);
      }

      #jp-assistant-close {
        position: absolute;
        top: 18px;
        right: 32px;
        font-size: 30px;
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        cursor: pointer;
      }

      @media (max-width: 760px) {
        header h1 {
          font-size: 22px;
        }

        .header-actions {
          position: static;
          justify-content: center;
          margin-top: 24px;
        }

        .logo-wrap {
          width: 160px;
          height: 48px;
        }
      }
    