/* --- Global Styles --- */
:root {
    --primary-color: #0ea5e9;
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; }

/* --- Diff Highlighting --- */
#md-diff-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}
.dark #md-diff-container {
    background-color: #1a1f2e;
    border-color: #374151;
}

.diff-removed { 
    background-color: #fee2e2; 
    text-decoration: line-through; 
    color: #991b1b;
    padding: 2px 4px;
    border-radius: 3px;
}
.dark .diff-removed { 
    background-color: #7f1d1d; 
    color: #fecaca;
    padding: 2px 4px;
    border-radius: 3px;
}

.diff-added { 
    background-color: #dcfce7; 
    color: #166534; 
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}
.dark .diff-added { 
    background-color: #14532d; 
    color: #bbf7d0;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Side-by-side diff */
.md-side-table {
    display: grid;
    grid-template-columns: 60px 1fr 60px 1fr;
    gap: 6px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}
.md-side-cell {
    padding: 6px 8px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-height: 24px;
    white-space: pre-wrap;
    word-break: break-all;
}
.md-side-line {
    text-align: right;
    color: #94a3b8;
    font-weight: 700;
}
.md-side-added { background: #ecfeff; border-color: #bae6fd; color: #0f172a; }
.md-side-removed { background: #fff1f2; border-color: #fecdd3; color: #7f1d1d; }
.md-side-same { background: #f8fafc; }
.dark .md-side-cell { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.dark .md-side-added { background: #0b1f36; border-color: #1d4ed8; color: #bfdbfe; }
.dark .md-side-removed { background: #2a0f1a; border-color: #be123c; color: #fecdd3; }
.dark .md-side-same { background: #0f172a; }

/* --- Animations --- */
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.animate-in { animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

@keyframes toastPulse {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ui-reveal {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.ui-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Components --- */
.tool-card { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.tool-card:hover { transform: translateY(-10px) scale(1.01); }

body.modal-active { overflow: hidden; }

.site-toast-host {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}
.site-toast {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: toastPulse 0.18s ease;
}
.site-toast.is-hiding {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}
.site-toast-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}
.site-toast-text {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}
.site-toast-ok .site-toast-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.site-toast-warn .site-toast-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}
.site-toast-error .site-toast-dot {
    background: #f43f5e;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.18);
}
.dark .site-toast {
    background: rgba(2, 6, 23, 0.92);
    border-color: rgba(71, 85, 105, 0.45);
    color: #e2e8f0;
}

/* --- Prose for About --- */
.prose h3 { font-weight: 900; font-size: 1.25rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--primary-color); }
.prose p { margin-bottom: 1rem; color: #64748b; }
.dark .prose p { color: #94a3b8; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; color: #64748b; }
.dark .prose li { color: #94a3b8; }

#aboutModal > .relative {
    width: min(1100px, calc(100vw - 32px));
    max-height: min(88vh, 860px);
    border-radius: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow: 0 36px 90px rgba(2, 6, 23, 0.22);
    transform: translateY(18px) scale(0.985);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.modal-active #aboutModal > .relative {
    transform: translateY(0) scale(1);
}
.dark #aboutModal > .relative {
    border-color: rgba(30, 41, 59, 0.94);
    background: linear-gradient(180deg, rgba(8, 15, 31, 0.98) 0%, rgba(15, 23, 42, 0.96) 100%);
    box-shadow: 0 40px 96px rgba(0, 0, 0, 0.45);
}
#aboutModal > .relative > .p-6.border-b {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 249, 255, 0.9) 100%);
    border-bottom-color: rgba(226, 232, 240, 0.92);
}
.dark #aboutModal > .relative > .p-6.border-b {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 15, 31, 0.94) 100%);
    border-bottom-color: rgba(30, 41, 59, 0.92);
}
#aboutModal > .relative > .p-6.border-b h2 {
    letter-spacing: -0.03em;
}
#aboutModal > .relative > .p-8.overflow-auto {
    padding: 1.5rem;
    background:
        radial-gradient(circle at right top, rgba(14, 165, 233, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.52) 0%, rgba(255, 255, 255, 0.38) 100%);
}
.dark #aboutModal > .relative > .p-8.overflow-auto {
    background:
        radial-gradient(circle at right top, rgba(14, 165, 233, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.32) 0%, rgba(2, 6, 23, 0.18) 100%);
}
#aboutModal > .relative > .p-6.border-t {
    padding: 1rem 1.5rem;
    border-top-color: rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.82);
}
.dark #aboutModal > .relative > .p-6.border-t {
    border-top-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.78);
}
.about-sheet {
    display: grid;
    gap: 1.1rem;
}
.about-hero,
.about-section {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}
.about-hero::before,
.about-section::before {
    content: "";
    position: absolute;
    top: -56px;
    right: -42px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 70%);
    pointer-events: none;
}
.dark .about-hero,
.dark .about-section {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}
.about-hero-badge,
.about-section-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.dark .about-hero-badge,
.dark .about-section-kicker {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.about-sheet h3,
.about-sheet h4 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.03em;
}
.about-sheet h3 {
    margin-top: 1rem;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    line-height: 1.02;
}
.about-sheet h4 {
    margin-top: 0.9rem;
    font-size: 1.22rem;
    line-height: 1.2;
    font-weight: 900;
}
.dark .about-sheet h3,
.dark .about-sheet h4 {
    color: #f8fafc;
}
.about-hero > p,
.about-section-head > p {
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: #64748b;
    line-height: 1.7;
    font-size: 0.95rem;
}
.dark .about-hero > p,
.dark .about-section-head > p {
    color: #cbd5e1;
}
.about-highlight-grid,
.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.15rem;
}
.about-highlight-card,
.about-feature-card {
    position: relative;
    z-index: 1;
    padding: 1rem 1.05rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.94);
    background: rgba(248, 250, 252, 0.88);
}
.dark .about-highlight-card,
.dark .about-feature-card {
    border-color: rgba(51, 65, 85, 0.92);
    background: rgba(8, 15, 31, 0.72);
}
.about-highlight-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 900;
}
.dark .about-highlight-index {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.about-highlight-card strong,
.about-feature-title {
    display: block;
    margin-top: 0.85rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
}
.dark .about-highlight-card strong,
.dark .about-feature-title {
    color: #f8fafc;
}
.about-highlight-card p,
.about-feature-desc {
    margin-top: 0.42rem;
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.65;
}
.dark .about-highlight-card p,
.dark .about-feature-desc {
    color: #cbd5e1;
}
.about-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}
.about-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.92rem;
    border-radius: 999px;
    border: 1px solid rgba(186, 230, 253, 0.92);
    background: rgba(240, 249, 255, 0.92);
    color: #075985;
    font-size: 0.8rem;
    font-weight: 800;
}
.dark .about-tag {
    border-color: rgba(14, 165, 233, 0.22);
    background: rgba(14, 165, 233, 0.12);
    color: #bae6fd;
}

/* --- Selection Highlight --- */
::selection, ::-moz-selection {
    background: linear-gradient(135deg, #2f6bed 0%, #406aff 100%);
    color: #fff;
    text-shadow: 0 0 0 #fff;
    border-radius: 4px;
}
.dark ::selection, .dark ::-moz-selection {
    background: linear-gradient(135deg, #2f6bed 0%, #5c7cff 100%);
    color: #e7edff;
    text-shadow: 0 0 0 #e7edff;
}

/* --- Visual Enhancements --- */
:root {
    --card-bg: #ffffff;
    --card-border: rgba(14,165,233,0.06);
    --muted: #64748b;
}

body { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.home-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.14), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(99, 102, 241, 0.14), transparent 26%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.98) 55%, rgba(248, 250, 252, 0.92) 100%);
}
.dark .home-hero {
    background:
        radial-gradient(circle at 14% 20%, rgba(56, 189, 248, 0.18), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(129, 140, 248, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.96) 55%, rgba(2, 6, 23, 0.98) 100%);
}
.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.68;
    pointer-events: none;
}
.hero-orb-a {
    top: 48px;
    left: -24px;
    width: 220px;
    height: 220px;
    background: rgba(14, 165, 233, 0.18);
}
.hero-orb-b {
    top: 88px;
    right: 4%;
    width: 180px;
    height: 180px;
    background: rgba(99, 102, 241, 0.16);
}
.hero-orb-c {
    bottom: 16px;
    left: 40%;
    width: 140px;
    height: 140px;
    background: rgba(16, 185, 129, 0.12);
}
.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}
.home-chip-muted {
    color: #475569;
    background: rgba(248, 250, 252, 0.88);
}
.dark .home-chip {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(51, 65, 85, 0.9);
    color: #e2e8f0;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}
.dark .home-chip-muted {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.84);
}
.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.home-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.home-hero-eyebrow {
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #0284c7;
}
.home-hero-title {
    margin-top: 1rem;
    font-size: clamp(3.2rem, 7vw, 5.9rem);
    line-height: 0.92;
    letter-spacing: -0.07em;
    font-weight: 900;
    color: #0f172a;
    text-align: left;
    text-wrap: balance;
}
.home-hero-title-accent {
    color: #0284c7;
}
.dark .home-hero-title {
    color: #f8fafc;
}
.dark .home-hero-title-accent {
    color: #7dd3fc;
}
.home-hero-desc {
    max-width: 42rem;
    text-align: left;
}
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.home-hero-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    width: 100%;
    margin-top: 1.6rem;
}
.home-hero-note-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.05rem;
    border-radius: 1.4rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(14px);
}
.home-hero-note-card::before {
    content: "";
    position: absolute;
    top: -38px;
    right: -28px;
    width: 108px;
    height: 108px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 68%);
    pointer-events: none;
}
.home-hero-note-token {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.26rem 0.55rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}
.home-hero-note-title {
    position: relative;
    z-index: 1;
    margin-top: 0.85rem;
    font-size: 0.96rem;
    font-weight: 900;
    color: #0f172a;
}
.home-hero-note-desc {
    position: relative;
    z-index: 1;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #64748b;
}
.dark .home-hero-note-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}
.dark .home-hero-note-token {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.dark .home-hero-note-title {
    color: #f8fafc;
}
.dark .home-hero-note-desc {
    color: #cbd5e1;
}
.home-hero-preview-shell {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(186, 230, 253, 0.9);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 249, 255, 0.96) 100%);
    box-shadow: 0 26px 56px rgba(14, 165, 233, 0.12);
}
.home-hero-preview-shell::before {
    content: "";
    position: absolute;
    top: -72px;
    right: -56px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.24) 0%, transparent 68%);
    pointer-events: none;
}
.home-hero-preview-shell::after {
    content: "";
    position: absolute;
    bottom: -88px;
    left: -64px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 72%);
    pointer-events: none;
}
.home-hero-preview-head,
.home-hero-preview-main,
.home-hero-preview-list {
    position: relative;
    z-index: 1;
}
.home-hero-preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.home-hero-preview-eyebrow {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #0284c7;
}
.home-hero-preview-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 0.74rem;
    font-weight: 900;
}
.home-hero-preview-main {
    margin-top: 1.2rem;
}
.home-hero-preview-main h2 {
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.05;
}
.home-hero-preview-main p {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
}
.home-hero-preview-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.35rem;
}
.home-hero-preview-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(186, 230, 253, 0.88);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.home-hero-preview-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.95rem;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 900;
}
.home-hero-preview-item-title {
    font-size: 0.96rem;
    font-weight: 900;
    color: #0f172a;
}
.home-hero-preview-item-desc {
    margin-top: 0.32rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #64748b;
}
.dark .home-hero-preview-shell {
    border-color: rgba(14, 165, 233, 0.18);
    background:
        linear-gradient(180deg, rgba(8, 15, 31, 0.95) 0%, rgba(15, 23, 42, 0.96) 100%);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}
.dark .home-hero-preview-status {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}
.dark .home-hero-preview-main h2,
.dark .home-hero-preview-item-title {
    color: #f8fafc;
}
.dark .home-hero-preview-main p,
.dark .home-hero-preview-item-desc {
    color: #cbd5e1;
}
.dark .home-hero-preview-item {
    border-color: rgba(30, 41, 59, 0.96);
    background: rgba(15, 23, 42, 0.84);
}
.dark .home-hero-preview-item-icon {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.home-stat-card {
    position: relative;
    overflow: hidden;
    text-align: left;
    padding: 1.25rem 1.4rem;
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}
.home-stat-card::before {
    content: "";
    position: absolute;
    top: -48px;
    right: -34px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 68%);
    pointer-events: none;
}
.dark .home-stat-card {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(30, 41, 59, 0.92);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}
.home-stat-value {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: #0f172a;
}
.dark .home-stat-value { color: #f8fafc; }
.home-stat-label {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}
.dark .home-stat-label { color: #e2e8f0; }
.home-stat-desc {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}
.dark .home-stat-desc { color: #94a3b8; }
.tool-search-shell {
    padding: 1.7rem;
    border-radius: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.94);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}
.dark .tool-search-shell {
    border-color: rgba(30, 41, 59, 0.94);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84) 0%, rgba(2, 6, 23, 0.9) 100%);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28);
}
.tool-filter-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}
.tool-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.96);
    background: #fff;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
    transition: all .18s ease;
}
.tool-filter-btn:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: #0284c7;
    transform: translateY(-1px);
}
.tool-filter-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}
.dark .tool-filter-btn {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(51, 65, 85, 0.96);
    color: #cbd5e1;
}
.dark .tool-filter-btn.active {
    color: #f8fafc;
}
.tool-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.18);
    font-size: 0.78rem;
    font-weight: 900;
}
.recent-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(203, 213, 225, 0.92);
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.9rem;
    transition: all .18s ease;
}
.recent-tool-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.32);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}
.dark .recent-tool-chip {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(51, 65, 85, 0.92);
    color: #e2e8f0;
}
.recent-tool-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.85rem;
    background: rgba(14, 165, 233, 0.1);
    font-size: 1rem;
}
.recent-tool-chip-text {
    line-height: 1.2;
}
.quick-launch-shell {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}
.dark .quick-launch-shell {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}
.home-quick-launch-shell {
    margin-top: clamp(2rem, 5vw, 3.1rem);
}
.quick-launch-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.quick-launch-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    min-height: 216px;
    padding: 1.2rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.95) 100%);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quick-launch-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -34px;
    width: 124px;
    height: 124px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 68%);
    pointer-events: none;
}
.quick-launch-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 24px 46px rgba(14, 165, 233, 0.12);
}
.dark .quick-launch-card {
    border-color: rgba(51, 65, 85, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.94) 100%);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.3);
}
.quick-launch-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.quick-launch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.dark .quick-launch-icon {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.quick-launch-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.quick-launch-card h3 {
    font-size: 1.02rem;
    font-weight: 900;
    color: #0f172a;
}
.quick-launch-card p {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.65;
}
.dark .quick-launch-card h3 {
    color: #f8fafc;
}
.dark .quick-launch-card p {
    color: #cbd5e1;
}
.quick-launch-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: 0.7rem;
    font-weight: 900;
}
.dark .quick-launch-chip {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.26);
}
.quick-launch-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.quick-launch-arrow {
    color: #0284c7;
    font-size: 1rem;
    font-weight: 900;
}

/* Wide layout toggle */
html.wide .max-w-7xl {
    max-width: 100%;
}
html.wide .max-w-7xl.mx-auto {
    margin-left: 0;
    margin-right: 0;
}

/* Card improvements */
.tool-card {
    background: var(--card-bg);
    border-radius: 1.25rem;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
    border: 1px solid var(--card-border);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 295px;
}
.tool-card::before {
    content: "";
    position: absolute;
    inset: -40% auto auto 58%;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 62%);
    pointer-events: none;
}
.tool-card h3 { font-size: 1.125rem; font-weight: 800; color: #0f172a; }
.tool-card p { color: var(--muted); }
.tool-card .action-row { display:flex; align-items:center; gap:0.5rem; color:var(--primary-color); font-weight:700; }
.tool-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.14);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
}
.tool-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: auto;
}
.tool-card-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
}
.dark .tool-card-badge {
    background: rgba(14, 165, 233, 0.16);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.22);
}
.dark .tool-card-pill {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}
.json-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}
.json-empty-panel {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(248, 250, 252, 0.8);
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}
.dark .json-empty-panel {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(71, 85, 105, 0.45);
    color: #cbd5e1;
}
.json-preview-summary {
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-weight: 900;
    color: #0284c7;
}
.json-preview-list {
    display: grid;
    gap: 0.7rem;
}
.json-preview-row {
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.85);
}
.dark .json-preview-row {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.78);
}
.json-preview-key {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
    word-break: break-word;
}
.json-preview-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    color: #64748b;
    word-break: break-word;
}
.dark .json-preview-key { color: #e2e8f0; }
.dark .json-preview-value { color: #94a3b8; }
.jwt-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}
.jwt-status-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.16);
}
.jwt-status-ok {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.16);
}
.jwt-status-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.16);
}
.jwt-status-error {
    background: rgba(244, 63, 94, 0.12);
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.16);
}
.dark .jwt-status-info {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.24);
}
.dark .jwt-status-ok {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.24);
}
.dark .jwt-status-warn {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.24);
}
.dark .jwt-status-error {
    background: rgba(244, 63, 94, 0.18);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.24);
}
.jwt-claim-list,
.jwt-note-list {
    display: grid;
    gap: 0.75rem;
}
.jwt-claim-row,
.jwt-note-item {
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.85);
}
.dark .jwt-claim-row,
.dark .jwt-note-item {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.78);
}
.jwt-claim-key,
.jwt-note-key {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
    word-break: break-word;
}
.jwt-claim-value,
.jwt-note-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}
.dark .jwt-claim-key,
.dark .jwt-note-key {
    color: #e2e8f0;
}
.dark .jwt-claim-value,
.dark .jwt-note-value {
    color: #94a3b8;
}
.jwt-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}
.jwt-summary-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.05rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}
.jwt-summary-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -18px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.dark .jwt-summary-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.82) 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}
.jwt-summary-label {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.jwt-summary-value {
    position: relative;
    z-index: 1;
    margin-top: 0.45rem;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 900;
    line-height: 1.1;
    color: #0f172a;
}
.dark .jwt-summary-label {
    color: #94a3b8;
}
.dark .jwt-summary-value {
    color: #f8fafc;
}
.jwt-diagnostic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.jwt-diagnostic-card {
    padding: 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dark .jwt-diagnostic-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}
.jwt-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.16);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(248, 250, 252, 0.94) 100%);
}
.jwt-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.16);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.jwt-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.16);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.dark .jwt-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.24);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.22) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .jwt-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .jwt-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.24);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.jwt-diagnostic-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.jwt-diagnostic-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: 0.18rem 0.62rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}
.jwt-diagnostic-title {
    font-size: 0.92rem;
    font-weight: 900;
    color: #0f172a;
}
.jwt-diagnostic-desc {
    font-size: 0.78rem;
    line-height: 1.72;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
}
.dark .jwt-diagnostic-badge {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.18);
}
.dark .jwt-diagnostic-title {
    color: #f8fafc;
}
.dark .jwt-diagnostic-desc {
    color: #cbd5e1;
}
.jwt-claim-toolbar {
    display: grid;
    gap: 1rem;
}
.jwt-claim-search-shell {
    display: grid;
    gap: 0.55rem;
}
.jwt-claim-search-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(248, 250, 252, 0.92);
    font-size: 0.88rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.jwt-claim-search-input:focus {
    border-color: rgba(14, 165, 233, 0.52);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
    background: #ffffff;
}
.dark .jwt-claim-search-input {
    border-color: rgba(51, 65, 85, 0.95);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
}
.dark .jwt-claim-search-input:focus {
    border-color: rgba(56, 189, 248, 0.54);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}
.jwt-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}
.jwt-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.45rem;
    padding: 0.58rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: #ffffff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.jwt-filter-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.26);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.08);
}
.jwt-filter-chip.is-active {
    color: #075985;
    border-color: rgba(14, 165, 233, 0.34);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98) 0%, rgba(224, 242, 254, 0.94) 100%);
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.12);
}
.dark .jwt-filter-chip {
    border-color: rgba(51, 65, 85, 0.96);
    background: rgba(15, 23, 42, 0.88);
    color: #cbd5e1;
}
.dark .jwt-filter-chip:hover {
    border-color: rgba(56, 189, 248, 0.32);
}
.dark .jwt-filter-chip.is-active {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.42);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.3) 0%, rgba(15, 23, 42, 0.92) 100%);
    box-shadow: 0 12px 22px rgba(2, 132, 199, 0.18);
}
.jwt-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    font-size: 0.72rem;
}
.dark .jwt-filter-count {
    background: rgba(148, 163, 184, 0.18);
}
.jwt-claim-key-shell {
    display: grid;
    gap: 0.45rem;
}
.jwt-claim-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.5rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.jwt-claim-type-registered {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}
.jwt-claim-type-custom {
    background: rgba(168, 85, 247, 0.12);
    color: #7e22ce;
}
.jwt-claim-type-time {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}
.dark .jwt-claim-type-registered {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}
.dark .jwt-claim-type-custom {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
}
.dark .jwt-claim-type-time {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}
.url-template-grid,
.url-history-list,
.url-diagnostic-list {
    display: grid;
    gap: 0.85rem;
}
.url-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.url-history-list,
.url-diagnostic-list {
    grid-template-columns: 1fr;
}
.url-template-card,
.url-history-card,
.url-diagnostic-card,
.url-summary-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
.dark .url-template-card,
.dark .url-history-card,
.dark .url-diagnostic-card,
.dark .url-summary-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.8) 100%);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}
.url-template-card,
.url-history-card,
.url-diagnostic-card {
    padding: 1rem;
}
.url-template-card::before,
.url-summary-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -18px;
    width: 118px;
    height: 118px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 70%);
    pointer-events: none;
}
.url-template-head,
.url-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}
.url-template-kind,
.url-history-kind,
.url-entry-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}
.url-template-kind {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}
.url-history-kind {
    color: #065f46;
    background: rgba(16, 185, 129, 0.14);
}
.dark .url-template-kind {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.2);
}
.dark .url-history-kind {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.2);
}
.url-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    background: rgba(240, 249, 255, 0.9);
    color: #0369a1;
    font-size: 0.74rem;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.url-inline-action:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.32);
    background: rgba(224, 242, 254, 0.94);
}
.dark .url-inline-action {
    border-color: rgba(56, 189, 248, 0.26);
    background: rgba(12, 74, 110, 0.2);
    color: #7dd3fc;
}
.dark .url-inline-action:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(12, 74, 110, 0.3);
}
.url-template-title,
.url-history-title,
.url-diagnostic-title {
    margin-top: 0.75rem;
    font-size: 0.94rem;
    font-weight: 900;
    color: #0f172a;
}
.url-template-desc,
.url-history-desc,
.url-diagnostic-desc {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-word;
}
.url-history-meta {
    font-size: 0.72rem;
    color: #64748b;
}
.dark .url-template-title,
.dark .url-history-title,
.dark .url-diagnostic-title {
    color: #f8fafc;
}
.dark .url-template-desc,
.dark .url-history-desc,
.dark .url-diagnostic-desc,
.dark .url-history-meta {
    color: #94a3b8;
}
.url-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}
.url-summary-card {
    padding: 0.95rem 1rem;
}
.url-summary-label {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.url-summary-value {
    position: relative;
    z-index: 1;
    margin-top: 0.42rem;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.1;
    color: #0f172a;
}
.dark .url-summary-label {
    color: #94a3b8;
}
.dark .url-summary-value {
    color: #f8fafc;
}
.url-diagnostic-card {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.url-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.url-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.18);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.url-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.18);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.dark .url-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .url-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.24);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .url-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.24);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.22) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.url-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.url-entry-badge-warn {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}
.url-entry-badge-info {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
}
.url-entry-badge-ok {
    color: #065f46;
    background: rgba(16, 185, 129, 0.14);
}
.url-entry-badge-muted {
    color: #475569;
    background: rgba(148, 163, 184, 0.14);
}
.dark .url-entry-badge-warn {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.2);
}
.dark .url-entry-badge-info {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.18);
}
.dark .url-entry-badge-ok {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.2);
}
.dark .url-entry-badge-muted {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.18);
}
.ts-preset-btn {
    position: relative;
    overflow: hidden;
    min-height: 4rem;
    padding: 1rem 1.05rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.88) 100%);
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 900;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.ts-preset-btn::before {
    content: "";
    position: absolute;
    top: -36px;
    right: -18px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 72%);
    pointer-events: none;
}
.ts-preset-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(224, 242, 254, 0.94) 100%);
}
.dark .ts-preset-btn {
    border-color: rgba(51, 65, 85, 0.94);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(12, 20, 38, 0.92) 100%);
    color: #f8fafc;
}
.dark .ts-preset-btn:hover {
    border-color: rgba(56, 189, 248, 0.34);
    box-shadow: 0 20px 36px rgba(2, 6, 23, 0.34);
    background: linear-gradient(180deg, rgba(12, 20, 38, 0.98) 0%, rgba(14, 165, 233, 0.12) 100%);
}
.ts-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
}
.ts-summary-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.05rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.92) 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}
.ts-summary-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -18px;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 70%);
    pointer-events: none;
}
.dark .ts-summary-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.82) 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}
.ts-summary-label {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.ts-summary-value {
    position: relative;
    z-index: 1;
    margin-top: 0.45rem;
    font-size: clamp(1rem, 2vw, 1.28rem);
    font-weight: 900;
    line-height: 1.35;
    color: #0f172a;
    word-break: break-word;
}
.dark .ts-summary-label {
    color: #94a3b8;
}
.dark .ts-summary-value {
    color: #f8fafc;
}
.ts-diagnostic-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}
.ts-diagnostic-card {
    padding: 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.dark .ts-diagnostic-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}
.ts-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.16);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(248, 250, 252, 0.94) 100%);
}
.ts-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.16);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.ts-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.16);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.dark .ts-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.24);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.22) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .ts-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .ts-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.24);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.ts-diagnostic-title {
    font-size: 0.9rem;
    font-weight: 900;
    color: #0f172a;
}
.ts-diagnostic-desc {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.72;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
}
.dark .ts-diagnostic-title {
    color: #f8fafc;
}
.dark .ts-diagnostic-desc {
    color: #cbd5e1;
}
.ts-history-list {
    display: grid;
    gap: 0.85rem;
}
.ts-history-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
.ts-history-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -20px;
    width: 116px;
    height: 116px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 72%);
    pointer-events: none;
}
.dark .ts-history-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.82) 100%);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}
.ts-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    font-size: 0.72rem;
    color: #64748b;
}
.ts-history-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #065f46;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}
.ts-history-title {
    margin-top: 0.75rem;
    font-size: 0.94rem;
    font-weight: 900;
    color: #0f172a;
    word-break: break-word;
}
.ts-history-desc {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-word;
}
.dark .ts-history-meta,
.dark .ts-history-desc {
    color: #94a3b8;
}
.dark .ts-history-kind {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.dark .ts-history-title {
    color: #f8fafc;
}
.ts-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.85rem;
    min-height: 2rem;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    background: rgba(240, 249, 255, 0.9);
    color: #0369a1;
    font-size: 0.74rem;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.ts-inline-action:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.32);
    background: rgba(224, 242, 254, 0.94);
}
.dark .ts-inline-action {
    border-color: rgba(56, 189, 248, 0.26);
    background: rgba(12, 74, 110, 0.2);
    color: #7dd3fc;
}
.dark .ts-inline-action:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(12, 74, 110, 0.3);
}
.ts-timezone-list,
.ts-detail-list {
    display: grid;
    gap: 0.75rem;
}
.ts-timezone-row,
.ts-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.92);
}
.dark .ts-timezone-row,
.dark .ts-detail-row {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.82);
}
.ts-timezone-label,
.ts-detail-key {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
    word-break: break-word;
}
.ts-timezone-value,
.ts-detail-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-word;
    white-space: pre-wrap;
}
.dark .ts-timezone-label,
.dark .ts-detail-key {
    color: #f8fafc;
}
.dark .ts-timezone-value,
.dark .ts-detail-value {
    color: #cbd5e1;
}
.b64-preset-grid,
.b64-history-list,
.b64-diagnostic-list {
    display: grid;
    gap: 0.85rem;
}
.b64-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.b64-preset-card,
.b64-history-card,
.b64-diagnostic-card,
.b64-summary-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
.dark .b64-preset-card,
.dark .b64-history-card,
.dark .b64-diagnostic-card,
.dark .b64-summary-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.8) 100%);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}
.b64-preset-card,
.b64-history-card,
.b64-diagnostic-card {
    padding: 1rem;
}
.b64-preset-card::before,
.b64-summary-card::before {
    content: "";
    position: absolute;
    top: -42px;
    right: -18px;
    width: 118px;
    height: 118px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 70%);
    pointer-events: none;
}
.b64-preset-card {
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.b64-preset-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.32);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.92) 100%);
}
.dark .b64-preset-card:hover {
    border-color: rgba(56, 189, 248, 0.34);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.34);
    background: linear-gradient(180deg, rgba(12, 20, 38, 0.98) 0%, rgba(14, 165, 233, 0.12) 100%);
}
.b64-preset-title,
.b64-history-title,
.b64-diagnostic-title {
    font-size: 0.94rem;
    font-weight: 900;
    color: #0f172a;
}
.b64-preset-desc,
.b64-history-desc,
.b64-diagnostic-desc {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-word;
}
.dark .b64-preset-title,
.dark .b64-history-title,
.dark .b64-diagnostic-title {
    color: #f8fafc;
}
.dark .b64-preset-desc,
.dark .b64-history-desc,
.dark .b64-diagnostic-desc {
    color: #cbd5e1;
}
.b64-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    font-size: 0.72rem;
    color: #64748b;
}
.b64-history-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #065f46;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}
.dark .b64-history-meta {
    color: #94a3b8;
}
.dark .b64-history-kind {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.b64-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.85rem;
    min-height: 2rem;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    background: rgba(240, 249, 255, 0.9);
    color: #0369a1;
    font-size: 0.74rem;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.b64-inline-action:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.32);
    background: rgba(224, 242, 254, 0.94);
}
.dark .b64-inline-action {
    border-color: rgba(56, 189, 248, 0.26);
    background: rgba(12, 74, 110, 0.2);
    color: #7dd3fc;
}
.dark .b64-inline-action:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(12, 74, 110, 0.3);
}
.b64-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 0.85rem;
}
.b64-summary-card {
    padding: 0.95rem 1rem;
}
.b64-summary-label {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.b64-summary-value {
    position: relative;
    z-index: 1;
    margin-top: 0.42rem;
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.35;
    color: #0f172a;
    word-break: break-word;
}
.dark .b64-summary-label {
    color: #94a3b8;
}
.dark .b64-summary-value {
    color: #f8fafc;
}
.b64-diagnostic-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.b64-diagnostic-card {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.b64-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.b64-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.18);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.b64-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.18);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
}
.dark .b64-diagnostic-warn {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .b64-diagnostic-info {
    border-color: rgba(14, 165, 233, 0.24);
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.24) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.dark .b64-diagnostic-ok {
    border-color: rgba(16, 185, 129, 0.24);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.22) 0%, rgba(15, 23, 42, 0.82) 100%);
}
.b64-drop-zone {
    padding: 1.25rem;
    border-radius: 1.4rem;
    border: 1.5px dashed rgba(14, 165, 233, 0.28);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.92) 0%, rgba(248, 250, 252, 0.94) 100%);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.b64-drop-zone:hover,
.b64-drop-zone.is-dragging {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.46);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.12);
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.94) 0%, rgba(248, 250, 252, 0.96) 100%);
}
.dark .b64-drop-zone {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(180deg, rgba(8, 15, 31, 0.96) 0%, rgba(15, 23, 42, 0.9) 100%);
}
.dark .b64-drop-zone:hover,
.dark .b64-drop-zone.is-dragging {
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 20px 36px rgba(2, 6, 23, 0.32);
    background: linear-gradient(180deg, rgba(12, 20, 38, 0.98) 0%, rgba(14, 165, 233, 0.12) 100%);
}
.b64-drop-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #0369a1;
}
.b64-drop-desc {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.65;
    color: #475569;
}
.dark .b64-drop-title {
    color: #7dd3fc;
}
.dark .b64-drop-desc {
    color: #cbd5e1;
}
.b64-preview-shell {
    display: grid;
    gap: 0.9rem;
}
.b64-preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}
.b64-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-size: 0.68rem;
    font-weight: 900;
}
.b64-preview-meta {
    font-size: 0.72rem;
    color: #64748b;
    word-break: break-word;
}
.b64-preview-image {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.92);
}
.b64-preview-code {
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.b64-preview-note {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.7;
}
.dark .b64-preview-badge {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.dark .b64-preview-meta {
    color: #94a3b8;
}
.dark .b64-preview-image,
.dark .b64-preview-code,
.dark .b64-preview-note {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.82);
    color: #cbd5e1;
}
.password-quick-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.password-quick-card::before {
    content: "";
    position: absolute;
    top: -48px;
    right: -20px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 68%);
    pointer-events: none;
}
.password-quick-card > * {
    position: relative;
    z-index: 1;
}
.password-quick-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.password-quick-copy {
    flex: 1 1 260px;
    min-width: 0;
}
.password-quick-copy-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.password-panel-lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.25rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    background: rgba(14, 165, 233, 0.08);
    color: #0369a1;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: all .18s ease;
}
.password-panel-lock-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12);
}
.password-panel-lock-btn.is-active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}
.password-panel-lock-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.14);
}
.password-quick-meta {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}
.password-quick-badge {
    min-width: 0;
    min-height: 2.2rem;
    gap: 0.35rem;
    justify-content: flex-start;
}
.password-quick-badge-divider {
    opacity: 0.55;
    flex: 0 0 auto;
}
.password-quick-badge-value {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.password-preset-row,
.password-mode-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
    padding: 0.15rem 0.35rem 0.35rem 0;
    scroll-padding-inline: 0.35rem;
}
.password-length-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
    padding: 0.15rem 0.35rem 0.25rem 0;
    scroll-padding-inline: 0.35rem;
}
.password-preset-chip,
.password-mode-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.96);
    background: #fff;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
    transition: all .18s ease;
}
.password-length-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    padding: 0.62rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.96);
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
    transition: all .18s ease;
}
.password-preset-chip:hover,
.password-mode-chip:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: #0284c7;
    transform: translateY(-1px);
}
.password-length-chip:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: #0284c7;
    transform: translateY(-1px);
}
.password-preset-chip.active,
.password-mode-chip.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}
.password-length-chip.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}
.dark .password-preset-chip,
.dark .password-mode-chip {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(51, 65, 85, 0.96);
    color: #cbd5e1;
}
.dark .password-length-chip {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(51, 65, 85, 0.96);
    color: #cbd5e1;
}
.dark .password-preset-chip.active,
.dark .password-mode-chip.active {
    color: #f8fafc;
}
.dark .password-length-chip.active {
    color: #f8fafc;
}
.password-secret-shell {
    position: relative;
    transition: all .2s ease;
}
.password-secret-shell.is-masked {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}
.password-secret-code.is-masked,
.password-secret-shell.is-masked .password-secret-code {
    letter-spacing: 0.16em;
}
.password-mobile-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 40;
}
.password-mobile-bar-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.8rem;
    border-radius: 1.45rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.dark .password-mobile-bar-inner {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.password-mobile-bar .btn {
    min-width: 0;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    font-size: 0.78rem;
}
.password-page-shell {
    padding-bottom: 0;
}
.dark .password-panel-lock-btn {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.22);
    color: #7dd3fc;
}
.dark .password-panel-lock-btn.is-active {
    color: #f8fafc;
}
@media (min-width: 1280px) {
    .password-quick-header {
        flex-wrap: nowrap;
    }
    .password-quick-card.is-locked {
        position: sticky;
        top: 6rem;
    }
    .password-quick-meta {
        flex: 0 1 auto;
        justify-content: flex-end;
        max-width: 15rem;
    }
}
.tdiff-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}
.tdiff-status-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.16);
}
.tdiff-status-ok {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.16);
}
.tdiff-status-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.16);
}
.dark .tdiff-status-info {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.24);
}
.dark .tdiff-status-ok {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.24);
}
.dark .tdiff-status-warn {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.24);
}
.tdiff-grid {
    display: grid;
    gap: 1rem;
}
.tdiff-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.82);
}
.tdiff-row-unchanged {
    background: rgba(248, 250, 252, 0.72);
}
.tdiff-row-changed {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.9) 0%, rgba(248, 250, 252, 0.94) 100%);
}
.tdiff-row-added {
    border-color: rgba(16, 185, 129, 0.18);
    background: rgba(236, 253, 245, 0.86);
}
.tdiff-row-removed {
    border-color: rgba(244, 63, 94, 0.18);
    background: rgba(255, 241, 242, 0.86);
}
.dark .tdiff-row {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.82);
}
.dark .tdiff-row-unchanged {
    background: rgba(15, 23, 42, 0.72);
}
.dark .tdiff-row-changed {
    border-color: rgba(14, 165, 233, 0.26);
    background: linear-gradient(180deg, rgba(10, 37, 64, 0.92) 0%, rgba(15, 23, 42, 0.9) 100%);
}
.dark .tdiff-row-added {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(6, 78, 59, 0.36);
}
.dark .tdiff-row-removed {
    border-color: rgba(244, 63, 94, 0.22);
    background: rgba(76, 5, 25, 0.35);
}
.tdiff-cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.tdiff-line-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.tdiff-line-number {
    font-size: 0.74rem;
    font-weight: 900;
    color: #0284c7;
}
.tdiff-line-type {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.tdiff-line-type-added {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}
.tdiff-line-type-removed {
    background: rgba(244, 63, 94, 0.12);
    color: #be123c;
}
.tdiff-line-type-changed {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}
.dark .tdiff-line-number {
    color: #7dd3fc;
}
.dark .tdiff-line-type {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}
.dark .tdiff-line-type-added {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}
.dark .tdiff-line-type-removed {
    background: rgba(244, 63, 94, 0.18);
    color: #fda4af;
}
.dark .tdiff-line-type-changed {
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}
.tdiff-line-content {
    min-height: 5rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.92);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}
.dark .tdiff-line-content {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(2, 6, 23, 0.92);
    color: #cbd5e1;
}
.tdiff-empty-line {
    color: #94a3b8;
    font-style: italic;
}
.tdiff-inline-change {
    padding: 0 0.15rem;
    border-radius: 0.35rem;
}
.tdiff-inline-change-added {
    background: rgba(22, 163, 74, 0.16);
}
.tdiff-inline-change-removed {
    background: rgba(244, 63, 94, 0.16);
}
.dark .tdiff-inline-change-added {
    background: rgba(22, 163, 74, 0.28);
}
.dark .tdiff-inline-change-removed {
    background: rgba(244, 63, 94, 0.28);
}
.tdiff-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.tdiff-option-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.82);
}
.dark .tdiff-option-card {
    border-color: rgba(30, 41, 59, 0.92);
    background: rgba(15, 23, 42, 0.72);
}
.tdiff-filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-start;
}
.tdiff-filter-caption {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
}
.tdiff-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.tdiff-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.tdiff-filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.38);
    color: #0284c7;
    background: rgba(239, 246, 255, 0.96);
}
.tdiff-filter-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}
.dark .tdiff-filter-caption {
    color: #94a3b8;
}
.dark .tdiff-filter-btn {
    border-color: rgba(51, 65, 85, 0.92);
    background: rgba(15, 23, 42, 0.88);
    color: #cbd5e1;
}
.dark .tdiff-filter-btn:hover {
    border-color: rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
    background: rgba(8, 15, 31, 0.96);
}
.tool-empty-state {
    padding: 2rem;
    border-radius: 1.6rem;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    font-weight: 700;
    text-align: center;
}
.dark .tool-empty-state {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(71, 85, 105, 0.52);
    color: #cbd5e1;
}

/* Buttons */
.btn { display:inline-flex; align-items:center; gap:0.5rem; padding:0.6rem 1rem; border-radius:0.75rem; font-weight:700; cursor:pointer; transition:all .18s ease; }
.btn-primary { background:var(--primary-color); color:#fff; box-shadow:0 8px 20px rgba(14,165,233,0.15); border: none; }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(14,165,233,0.18); }
.btn-ghost { background:transparent; border:1px solid rgba(15,23,42,0.04); color:var(--muted); }
.btn-ghost:hover { background:rgba(15,23,42,0.02); }

@media (max-width: 1024px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }
    .home-hero-copy {
        align-items: center;
    }
    .home-hero-eyebrow,
    .home-hero-title,
    .home-hero-desc {
        text-align: center;
    }
    .home-hero-note-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Refresh button (tool view) */
button[title="刷新当前卡片"] { padding:0.5rem 0.9rem; border-radius:0.65rem; border:1px solid rgba(15,23,42,0.04); background:transparent; color:var(--muted); font-weight:700; }
button[title="刷新当前卡片"]:hover { color:var(--primary-color); border-color:rgba(14,165,233,0.12); transform:translateY(-2px); }

/* Inputs & drop zone */
#md-drop-zone { transition:all .25s ease; border-radius:1.25rem; }
#md-drop-zone:hover { box-shadow: 0 10px 30px rgba(2,6,23,0.06); transform:translateY(-4px); }
input[type="text"], textarea { border-radius:0.9rem; border:1px solid rgba(15,23,42,0.04); }

/* Modal polish */
.modal-active #aboutModal > div, .modal-active #md-preview-modal > div { transform: translateY(0); }
#md-preview-modal .relative { border-radius:1.5rem; overflow:hidden; box-shadow:0 30px 80px rgba(2,6,23,0.25); }

/* Small responsive tweaks */
@media (max-width: 768px) {
    .tool-card { padding:1.2rem; }
    .btn { padding:0.5rem 0.75rem; }
    #aboutModal {
        padding: 0.75rem;
    }
    #aboutModal > .relative {
        width: 100%;
        max-height: calc(100vh - 1.5rem);
        border-radius: 1.5rem;
    }
    #aboutModal > .relative > .p-6.border-b,
    #aboutModal > .relative > .p-6.border-t,
    #aboutModal > .relative > .p-8.overflow-auto {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #aboutModal > .relative > .p-8.overflow-auto {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .about-hero,
    .about-section {
        padding: 1rem;
        border-radius: 1.25rem;
    }
    .about-highlight-grid,
    .about-feature-grid {
        grid-template-columns: 1fr;
    }
    .home-hero-title {
        font-size: clamp(2.8rem, 12vw, 4.2rem);
    }
    .home-hero-actions {
        justify-content: center;
    }
    .home-hero-note-grid {
        grid-template-columns: 1fr;
    }
    .home-hero-preview-shell {
        padding: 1.2rem;
        border-radius: 1.6rem;
    }
    .home-stats-grid {
        grid-template-columns: 1fr;
    }
    .tool-search-shell {
        padding: 1.2rem;
        border-radius: 1.5rem;
    }
    .home-chip {
        padding: 0.55rem 0.85rem;
        font-size: 0.72rem;
    }
    .tool-card {
        min-height: auto;
    }
    .json-preview-row {
        grid-template-columns: 1fr;
    }
    .recent-tool-chip {
        width: 100%;
        justify-content: flex-start;
    }
    .quick-launch-shell {
        padding: 1rem;
        border-radius: 1.5rem;
    }
    .quick-launch-row {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scroll-snap-type: x proximity;
    }
    .quick-launch-card {
        min-width: min(78vw, 320px);
        min-height: 204px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    .url-template-grid,
    .url-summary-grid {
        grid-template-columns: 1fr;
    }
    .url-template-head,
    .url-history-meta {
        align-items: flex-start;
    }
    .jwt-summary-grid,
    .jwt-diagnostic-list {
        grid-template-columns: 1fr;
    }
    .jwt-filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }
    .jwt-filter-chip {
        flex: 0 0 auto;
    }
    .jwt-claim-row,
    .jwt-note-item {
        grid-template-columns: 1fr;
    }
    .b64-history-meta,
    .b64-preview-head {
        align-items: flex-start;
    }
    .ts-history-meta {
        align-items: flex-start;
    }
    .ts-timezone-row,
    .ts-detail-row {
        grid-template-columns: 1fr;
    }
    .tdiff-row {
        grid-template-columns: 1fr;
    }
    .tdiff-option-grid {
        grid-template-columns: 1fr;
    }
    .password-preset-row,
    .password-mode-row,
    .password-length-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-right: 0.6rem;
    }
    .password-quick-header {
        gap: 0.85rem;
    }
    .password-quick-copy-top {
        align-items: stretch;
    }
    .password-panel-lock-btn {
        width: 100%;
    }
    .password-quick-meta {
        width: 100%;
    }
    .password-quick-badge {
        width: 100%;
    }
    .password-preset-chip,
    .password-mode-chip {
        padding: 0.65rem 0.9rem;
        font-size: 0.76rem;
    }
    .password-length-chip {
        min-width: 3rem;
        padding: 0.58rem 0.88rem;
        font-size: 0.74rem;
    }
    .password-page-shell {
        padding-bottom: 6.8rem;
    }
    .password-mobile-bar {
        left: 10px;
        right: 10px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    }
    .password-mobile-bar-inner {
        gap: 0.55rem;
        padding: 0.65rem;
        border-radius: 1.2rem;
    }
    .password-mobile-bar .btn {
        font-size: 0.72rem;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
    .site-toast-host {
        top: 78px;
        right: 12px;
        left: 12px;
        align-items: stretch;
    }
    .site-toast {
        min-width: 0;
        max-width: 100%;
    }
    .site-toast-text {
        font-size: 12px;
    }
}

/* MD Purifier guide sidebar */
@media (min-width: 1024px) {
    #md-guide-sidebar { align-self: flex-start; }
    #md-guide { position: sticky; top: 5.5rem; }
}

/* Workspace container for MD Purifier */
.md-workspace {
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%);
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.dark .md-workspace {
    border-color: #1f2937;
    background: linear-gradient(180deg, #0f172a 0%, #0b1221 60%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.fx-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.fx-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.88);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.fx-preset-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(240, 249, 255, 0.95);
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.12);
}
.fx-preset-btn.is-active {
    border-color: rgba(14, 165, 233, 0.55);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(255, 255, 255, 0.96));
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.16);
}
.fx-preset-code {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.fx-preset-meta {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #64748b;
}
.dark .fx-preset-btn {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.86);
}
.dark .fx-preset-btn:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(12, 20, 38, 0.96);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.34);
}
.dark .fx-preset-btn.is-active {
    border-color: rgba(56, 189, 248, 0.42);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(8, 15, 31, 0.96));
}
.dark .fx-preset-code {
    color: #f8fafc;
}
.dark .fx-preset-meta {
    color: #cbd5e1;
}

.fx-amount-preset-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}
.fx-amount-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.72rem 0.8rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.fx-amount-preset-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(240, 249, 255, 0.95);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12);
}
.fx-amount-preset-btn.is-active {
    border-color: rgba(14, 165, 233, 0.52);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(255, 255, 255, 0.98));
}
.fx-amount-preset-value {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f172a;
}
.fx-amount-preset-code {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
}
.dark .fx-amount-preset-btn {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.88);
}
.dark .fx-amount-preset-btn:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(12, 20, 38, 0.96);
}
.dark .fx-amount-preset-btn.is-active {
    border-color: rgba(56, 189, 248, 0.42);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(8, 15, 31, 0.98));
}
.dark .fx-amount-preset-value {
    color: #f8fafc;
}
.dark .fx-amount-preset-code {
    color: #94a3b8;
}

.fx-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.22);
    background: rgba(240, 249, 255, 0.86);
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.fx-inline-action:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.42);
    background: rgba(224, 242, 254, 0.96);
}
.dark .fx-inline-action {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(8, 15, 31, 0.88);
    color: #7dd3fc;
}
.dark .fx-inline-action:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(14, 165, 233, 0.12);
}

.fx-settlement-panel {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(240, 249, 255, 0.82));
}
.dark .fx-settlement-panel {
    border-color: rgba(51, 65, 85, 0.9);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 15, 31, 0.96));
}
.fx-alert-panel {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(240, 249, 255, 0.82));
}
.dark .fx-alert-panel {
    border-color: rgba(51, 65, 85, 0.9);
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.92), rgba(8, 15, 31, 0.96));
}
.fx-alert-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.22);
    background: rgba(255, 251, 235, 0.86);
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 800;
}
.dark .fx-alert-count-badge {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(39, 28, 12, 0.72);
    color: #fbbf24;
}
.fx-settlement-grid,
.fx-chart-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.fx-settlement-card,
.fx-chart-stat-card {
    padding: 0.95rem 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.08);
}
.dark .fx-settlement-card,
.dark .fx-chart-stat-card {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.28);
}
.fx-settlement-label,
.fx-chart-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}
.fx-settlement-value,
.fx-chart-stat-value {
    margin-top: 0.35rem;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
}
.fx-chart-stat-value {
    font-size: 1.05rem;
}
.fx-settlement-meta,
.fx-chart-stat-meta {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    line-height: 1.45;
    color: #64748b;
}
.dark .fx-settlement-label,
.dark .fx-chart-stat-label,
.dark .fx-settlement-meta,
.dark .fx-chart-stat-meta {
    color: #94a3b8;
}
.dark .fx-settlement-value,
.dark .fx-chart-stat-value {
    color: #f8fafc;
}
.fx-chart-insight {
    padding: 0.9rem 1rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.92));
    color: #0f172a;
    font-size: 0.78rem;
    line-height: 1.55;
}
.dark .fx-chart-insight {
    border-color: rgba(30, 41, 59, 0.92);
    background: linear-gradient(135deg, rgba(8, 15, 31, 0.96), rgba(15, 23, 42, 0.9));
    color: #cbd5e1;
}
.fx-alert-preset-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}
.fx-alert-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    padding: 0.72rem 0.8rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.88);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.fx-alert-preset-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(255, 251, 235, 0.96);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.12);
}
.fx-alert-preset-label {
    font-size: 0.72rem;
    font-weight: 900;
    color: #0f172a;
}
.fx-alert-preset-value {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}
.dark .fx-alert-preset-btn {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.88);
}
.dark .fx-alert-preset-btn:hover {
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(39, 28, 12, 0.72);
}
.dark .fx-alert-preset-label {
    color: #f8fafc;
}
.dark .fx-alert-preset-value {
    color: #94a3b8;
}
.fx-alert-list {
    display: grid;
    gap: 0.75rem;
}
.fx-alert-empty {
    padding: 0.95rem 1rem;
    border-radius: 1.15rem;
    border: 1px dashed rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.66);
    color: #64748b;
    font-size: 0.74rem;
}
.dark .fx-alert-empty {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.72);
    color: #94a3b8;
}
.fx-alert-item {
    padding: 0.95rem 1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 26px rgba(148, 163, 184, 0.08);
}
.dark .fx-alert-item {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.26);
}
.fx-alert-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.fx-alert-target {
    font-size: 0.94rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.3;
}
.fx-alert-note {
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.45;
}
.fx-alert-meta {
    margin-top: 0.45rem;
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.5;
}
.dark .fx-alert-target {
    color: #f8fafc;
}
.dark .fx-alert-note {
    color: #cbd5e1;
}
.dark .fx-alert-meta {
    color: #94a3b8;
}
.fx-alert-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 900;
    white-space: nowrap;
}
.fx-alert-status.is-waiting {
    background: rgba(254, 243, 199, 0.9);
    color: #b45309;
}
.fx-alert-status.is-hit {
    background: rgba(220, 252, 231, 0.92);
    color: #047857;
}
.fx-alert-status.is-paused {
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
}
.dark .fx-alert-status.is-waiting {
    background: rgba(120, 53, 15, 0.42);
    color: #fbbf24;
}
.dark .fx-alert-status.is-hit {
    background: rgba(6, 78, 59, 0.46);
    color: #6ee7b7;
}
.dark .fx-alert-status.is-paused {
    background: rgba(30, 41, 59, 0.82);
    color: #cbd5e1;
}
.fx-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}
.fx-alert-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.fx-alert-action:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.38);
    background: rgba(240, 249, 255, 0.96);
}
.fx-alert-action.is-danger {
    color: #dc2626;
    background: rgba(254, 242, 242, 0.92);
    border-color: rgba(254, 202, 202, 0.95);
}
.fx-alert-action.is-danger:hover {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(254, 226, 226, 0.98);
}
.dark .fx-alert-action {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(8, 15, 31, 0.76);
    color: #cbd5e1;
}
.dark .fx-alert-action:hover {
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(14, 165, 233, 0.12);
}
.dark .fx-alert-action.is-danger {
    border-color: rgba(127, 29, 29, 0.52);
    background: rgba(69, 10, 10, 0.42);
    color: #fda4af;
}

.fx-range-chip {
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.fx-range-chip:hover {
    transform: translateY(-1px);
}
.fx-range-chip.is-active {
    border-color: rgba(14, 165, 233, 0.52);
    background: rgba(224, 242, 254, 0.9);
    color: #0284c7;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.12);
}
.dark .fx-range-chip.is-active {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
}

.fx-favorite-chip {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.92);
    overflow: hidden;
}
.fx-favorite-main,
.fx-favorite-remove,
.fx-history-entry {
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.fx-favorite-main {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.55rem 0.85rem 0.55rem 0.95rem;
    background: transparent;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
}
.fx-favorite-main:hover,
.fx-history-entry:hover {
    background: rgba(224, 242, 254, 0.8);
}
.fx-favorite-pair {
    white-space: nowrap;
}
.fx-favorite-caption {
    color: #64748b;
    font-weight: 700;
    font-size: 0.68rem;
}
.fx-favorite-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    border-left: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.82);
    color: #ef4444;
    font-size: 0.95rem;
    font-weight: 900;
}
.fx-favorite-remove:hover {
    background: rgba(254, 242, 242, 0.98);
}
.dark .fx-favorite-chip {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.86);
}
.dark .fx-favorite-main {
    color: #f8fafc;
}
.dark .fx-favorite-caption {
    color: #94a3b8;
}
.dark .fx-favorite-remove {
    border-left-color: rgba(51, 65, 85, 0.9);
    background: rgba(8, 15, 31, 0.76);
    color: #fda4af;
}
.dark .fx-favorite-main:hover,
.dark .fx-history-entry:hover {
    background: rgba(14, 165, 233, 0.16);
}
.dark .fx-favorite-remove:hover {
    background: rgba(69, 10, 10, 0.42);
}

.fx-history-entry {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid rgba(241, 245, 249, 0.98);
    text-align: left;
}
.fx-history-entry:last-child {
    border-bottom: none;
}
.fx-history-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}
.fx-history-pair {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
}
.fx-history-value {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}
.fx-history-meta {
    margin-top: 0.3rem;
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.4;
}
.dark .fx-history-entry {
    border-bottom-color: rgba(30, 41, 59, 0.95);
}
.dark .fx-history-pair {
    color: #f8fafc;
}
.dark .fx-history-value {
    color: #cbd5e1;
}
.dark .fx-history-meta {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .md-workspace { padding: 16px; }
}

@media (max-width: 640px) {
    .b64-preset-grid,
    .b64-summary-grid,
    .b64-diagnostic-list {
        grid-template-columns: 1fr;
    }
    .ts-summary-grid,
    .ts-diagnostic-list {
        grid-template-columns: 1fr;
    }
    .tdiff-filter-toolbar {
        width: 100%;
    }
    .fx-settlement-grid,
    .fx-chart-summary-grid {
        grid-template-columns: 1fr;
    }
    .fx-alert-preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .fx-amount-preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .fx-preset-grid {
        grid-template-columns: 1fr;
    }
    .fx-favorite-chip {
        width: 100%;
    }
    .fx-favorite-main {
        flex: 1 1 auto;
        justify-content: space-between;
    }
    nav .w-10.h-10 {
        width: 2.25rem;
        height: 2.25rem;
    }
    nav .text-lg.font-black {
        font-size: 1rem;
    }
    .home-hero {
        padding-top: 4.5rem;
    }
    .home-hero-title {
        font-size: clamp(2.5rem, 13vw, 3.6rem);
    }
    .hero-orb-a,
    .hero-orb-b,
    .hero-orb-c {
        filter: blur(52px);
    }
    .quick-launch-card {
        min-width: calc(100vw - 56px);
    }
    .hero-orb-a {
        width: 150px;
        height: 150px;
    }
    .hero-orb-b {
        width: 130px;
        height: 130px;
    }
    .about-sheet h3 {
        font-size: 1.65rem;
    }
    .about-sheet h4 {
        font-size: 1.08rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
