@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, let individual tool containers scroll */
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.dark body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Custom dark mode styles to ensure toggle works, since Tailwind CDN may not apply dark classes dynamically */

html.dark .bg-white {
    background-color: #374151;
    /* gray-700 equivalent */
}

html.dark .text-gray-800 {
    color: #f3f4f6;
    /* gray-100 equivalent */
}

html.dark .text-gray-700 {
    color: #d1d5db;
    /* gray-300 equivalent */
}

html.dark .text-gray-600 {
    color: #9ca3af;
    /* gray-400 equivalent */
}

html.dark .border-gray-300 {
    border-color: #4b5563;
    /* gray-600 equivalent */
}

html.dark .bg-gray-200 {
    background-color: #374151;
    /* gray-700 equivalent */
}

html.dark .bg-gray-100 {
    background-color: #374151;
    /* gray-700 equivalent */
}

html.dark .bg-blue-50 {
    background-color: #1e3a8a;
    /* blue-900 equivalent */
}

html.dark .text-blue-700 {
    color: #93c5fd;
    /* blue-300 equivalent */
}

html.dark .hover\:bg-blue-100:hover {
    background-color: #1e40af;
    /* blue-800 equivalent */
}

html.dark .hover\:bg-gray-300:hover {
    background-color: #4b5563;
    /* gray-600 equivalent */
}

html.dark .bg-gray-700 {
    background-color: #111827;
    /* gray-900 equivalent */
}

html.dark .text-gray-900 {
    color: #f3f4f6;
    /* gray-100 equivalent */
}

html.dark .text-gray-100 {
    color: #f3f4f6;
    /* ensure light text stays light */
}

html.dark .bg-gray-800 {
    background-color: #1f2937;
    /* gray-800 equivalent */
}

html.dark .text-gray-300 {
    color: #d1d5db;
    /* gray-300 equivalent */
}

html.dark .border-gray-600 {
    border-color: #4b5563;
    /* gray-600 equivalent */
}

html.dark .bg-blue-900 {
    background-color: #1e3a8a;
    /* blue-900 equivalent */
}

html.dark .text-blue-200 {
    color: #bfdbfe;
    /* blue-200 equivalent */
}

html.dark .bg-gray-600 {
    background-color: #4b5563;
    /* gray-600 equivalent */
}

html.dark .text-gray-300 {
    color: #d1d5db;
    /* gray-300 equivalent */
}

html.dark .text-red-600 {
    color: #f87171;
    /* red-400 equivalent */
}

html.dark .text-red-400 {
    color: #f87171;
    /* red-400 equivalent */
}

/* Base64 tool styles */
.base64-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .base64-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.base64-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.base64-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.base64-content::-webkit-scrollbar {
    width: 8px;
}

.base64-content::-webkit-scrollbar-track {
    background: transparent;
}

.base64-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.base64-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .base64-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .base64-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.base64-tool {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (max-width: 640px) {
    .base64-tool {
        padding: 1rem 0.5rem;
    }

    .base64-card {
        padding: 1.5rem 1rem;
    }

    .base64-title {
        font-size: 1.5rem;
        text-align: center;
    }
}

.base64-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html.dark .base64-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.base64-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .base64-title {
    color: #f3f4f6;
}

.base64-section {
    margin-bottom: 2rem;
}

.base64-section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #374151;
}

html.dark .base64-section-title {
    color: #d1d5db;
}

.base64-file-input {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    margin-right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px dashed rgba(37, 99, 235, 0.3);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.8) 100%);
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.2s ease;
}

html.dark .base64-file-input {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6) 0%, rgba(30, 64, 175, 0.6) 100%);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.3);
}

.base64-file-input:hover {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.9) 100%);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

html.dark .base64-file-input:hover {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.7) 0%, rgba(37, 99, 235, 0.7) 100%);
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow: 0 4px 6px -1px rgba(147, 197, 253, 0.2);
}

.base64-button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.base64-button-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.base64-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.base64-textarea {
    width: 100%;
    height: 8rem;
    padding: 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    resize: vertical;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.base64-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .base64-textarea {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .base64-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.base64-size-display {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

html.dark .base64-size-display {
    color: #d1d5db;
}

.base64-button-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.base64-button-secondary:hover {
    background-color: rgba(249, 250, 251, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: rgba(209, 213, 219, 1);
}

.base64-button-secondary:active {
    transform: translateY(0);
}

html.dark .base64-button-secondary {
    background-color: rgba(55, 65, 81, 0.9);
    color: #f3f4f6;
    border-color: rgba(75, 85, 99, 0.8);
}

html.dark .base64-button-secondary:hover {
    background-color: rgba(75, 85, 99, 1);
    border-color: rgba(107, 114, 128, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.base64-input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    margin-top: 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.base64-input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .base64-input-field {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .base64-input-field:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

/* Index page styles */
.index-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .index-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.index-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.index-content {
    flex-grow: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.index-center {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    max-width: 600px;
}

.index-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

html.dark .index-title {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.index-text {
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.75;
}

html.dark .index-text {
    color: #9ca3af;
}

/* Header styles */
.header-bg {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

html.dark .header-bg {
    background-color: rgba(55, 65, 81, 0.95);
    border-bottom-color: rgba(75, 85, 99, 0.5);
}

.header-container {
    max-width: 90rem;
    margin: 0 auto;
}

.header-flex {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0;
    flex-wrap: nowrap;
    height: 3.75rem;
    /* Fixed height to prevent layout shifts */
}

.header-tabs-scroll {
    flex-grow: 1;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 0.5rem;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    scrollbar-width: none;
    /* Firefox */
    height: 100%;
    display: flex;
    align-items: center;
}

.header-tabs-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.header-tabs-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding-right: 1rem;
    /* Add some padding for the last item */
}

.logo-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    margin-right: 1rem;
    transition: transform 0.2s ease;
    min-width: 60px;
    flex-shrink: 0;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 2.75rem;
    width: auto;
    min-width: 44px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tab-active,
.tab-inactive {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    border: none;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s ease;
    will-change: color, background-color, transform;
    contain: layout style;
    min-width: max-content;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-active {
    color: #2563eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.tab-inactive {
    color: #6b7280;
}

.tab-inactive:hover {
    color: #2563eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    transform: translateY(-1px);
}

.tab-active:focus-visible,
.tab-inactive:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2),
        0 8px 16px -12px rgba(37, 99, 235, 0.75);
}

.tab-active::after,
.tab-inactive::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

html.dark .tab-inactive {
    color: #9ca3af;
}

html.dark .tab-inactive:hover {
    color: #60a5fa;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
}

html.dark .tab-active {
    color: #60a5fa;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0.1) 100%);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
}

html.dark .tab-active::after {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

html.dark .tab-active:focus-visible,
html.dark .tab-inactive:focus-visible {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35),
        0 8px 16px -12px rgba(59, 130, 246, 0.9);
}

@media (prefers-reduced-motion: reduce) {

    .tab-active,
    .tab-inactive,
    .tab-active::after,
    .tab-inactive::after {
        transition: none;
    }
}

.theme-toggle {
    margin-left: auto;
    margin-right: 1rem;
    padding: 0.625rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: #1f2937;
    transition: all 0.2s ease;
    border: 1px solid rgba(229, 231, 235, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: rgba(249, 250, 251, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html.dark .theme-toggle {
    background-color: rgba(55, 65, 81, 0.8);
    color: #f3f4f6;
    border-color: rgba(75, 85, 99, 0.5);
}

html.dark .theme-toggle:hover {
    background-color: rgba(75, 85, 99, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
}

.light-icon {
    display: block;
}

.dark-icon {
    display: none;
}

html.dark .light-icon {
    display: none;
}

html.dark .dark-icon {
    display: block;
}

/* Three paycheck calendar styles */
.three-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .three-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.three-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.three-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.three-content::-webkit-scrollbar {
    width: 8px;
}

.three-content::-webkit-scrollbar-track {
    background: transparent;
}

.three-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.three-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .three-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .three-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.three-tool {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (max-width: 640px) {
    .three-tool {
        padding: 1rem 0.5rem;
    }

    .three-card {
        padding: 1.5rem 1rem;
    }

    .three-title {
        font-size: 1.25rem;
    }
}

.three-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

html.dark .three-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.three-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1f2937;
}

html.dark .three-title {
    color: #f3f4f6;
}

.three-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .three-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.three-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

html.dark .three-label {
    color: #d1d5db;
}

.three-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    transition: all 0.2s ease;
}

.three-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .three-input {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .three-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.three-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .three-select {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .three-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.three-result-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .three-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .three-result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .three-result-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.three-error {
    color: #dc2626;
    text-align: center;
    grid-column: 1 / -1;
}

.three-total {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .three-total {
    color: #f3f4f6;
}

.three-month-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.2s ease;
}

.three-month-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html.dark .three-month-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
}

html.dark .three-month-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.three-month-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

html.dark .three-month-title {
    color: #f3f4f6;
}

.three-month-title.three-pay {
    color: #dc2626;
}

html.dark .three-month-title.three-pay {
    color: #f87171;
}

.three-table {
    width: 100%;
    border-collapse: collapse;
}

.three-th {
    border: 1px solid #e5e7eb;
    padding: 0.25rem;
    background-color: white;
    font-size: 0.75rem;
    color: #4b5563;
}

html.dark .three-th {
    border-color: #4b5563;
    background-color: #4b5563;
    color: #d1d5db;
}

.three-td {
    border: 1px solid #e5e7eb;
    padding: 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: #374151;
}

html.dark .three-td {
    border-color: #4b5563;
    color: #d1d5db;
}

.three-td.payday {
    background-color: #dbeafe;
    font-weight: 500;
    color: #1e40af;
}

html.dark .three-td.payday {
    background-color: #1e3a8a;
    color: #bfdbfe;
}

/* SVG Viewer styles */
.svg-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .svg-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.svg-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.svg-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.svg-content::-webkit-scrollbar {
    width: 8px;
}

.svg-content::-webkit-scrollbar-track {
    background: transparent;
}

.svg-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.svg-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .svg-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .svg-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.svg-tool {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    margin-right: calc(340px + 2rem);
}

@media (max-width: 1200px) {
    .svg-tool {
        margin-right: 1rem;
    }

    .svg-preview {
        display: none;
    }
}

.svg-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

html.dark .svg-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.svg-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .svg-title {
    color: #f3f4f6;
}

.svg-section {
    margin-bottom: 2rem;
}

.svg-section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #374151;
}

html.dark .svg-section-title {
    color: #d1d5db;
}

.svg-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.svg-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .svg-input {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .svg-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.svg-textarea {
    width: 100%;
    height: 8rem;
    padding: 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    resize: vertical;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.svg-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .svg-textarea {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .svg-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.svg-button {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    cursor: pointer;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.svg-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.svg-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.svg-preview {
    position: fixed;
    right: 2rem;
    top: 5.5rem;
    width: 320px;
    max-height: calc(100vh - 6.5rem);
    border: 2px solid rgba(229, 231, 235, 0.8);
    padding: 1.5rem;
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
}

.svg-preview>svg {
    max-width: 100%;
    max-height: calc(100vh - 12rem);
    width: auto;
    height: auto;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: auto;
}

html.dark .svg-preview {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.8);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.svg-preview::-webkit-scrollbar {
    width: 6px;
}

.svg-preview::-webkit-scrollbar-track {
    background: transparent;
}

.svg-preview::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 3px;
}

.svg-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .svg-preview::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .svg-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.svg-path {
    border: 1px solid #d1d5db;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    background-color: white;
}

html.dark .svg-path {
    border-color: #4b5563;
    background-color: #374151;
}

.path-data-container {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

html.dark .path-data-container {
    border-top-color: #4b5563;
}

.path-data-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

html.dark .path-data-title {
    color: #d1d5db;
}

.path-data-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.path-command-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: #e5e7eb;
    color: #111827;
    font-size: 0.75rem;
    font-weight: 600;
}

html.dark .path-command-chip {
    background-color: #4b5563;
    color: #f3f4f6;
}

.path-data-point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.375rem;
    background-color: #f9fafb;
}

html.dark .path-data-point {
    border-color: #4b5563;
    background-color: #374151;
}

.path-data-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

html.dark .path-data-label {
    color: #d1d5db;
}

.path-data-input {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    color: #111827;
    font-family: monospace;
}

.path-data-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

html.dark .path-data-input {
    border-color: #4b5563;
    background-color: #1f2937;
    color: #f3f4f6;
}

.path-adjust-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.path-adjust-buttons .svg-button-secondary {
    padding: 0.25rem;
    min-width: 32px;
    text-align: center;
}

.path-data-empty {
    font-size: 0.75rem;
    color: #6b7280;
}

html.dark .path-data-empty {
    color: #9ca3af;
}

.svg-segments {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.svg-segment {
    display: flex;
    align-items: center;
    border: 1px dashed #d1d5db;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    margin-bottom: 0.5rem;
}

html.dark .svg-segment {
    border-color: #4b5563;
    background-color: #374151;
}

.svg-param {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.svg-param input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    color: #111827;
}

.svg-param input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

html.dark .svg-param input {
    border-color: #4b5563;
    background-color: #374151;
    color: #f3f4f6;
}

.svg-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

html.dark .svg-label {
    color: #d1d5db;
}

.svg-button-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    font-weight: 500;
    transition: all 0.2s ease;
}

.svg-button-secondary:hover {
    background-color: rgba(249, 250, 251, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    border-color: rgba(209, 213, 219, 1);
}

html.dark .svg-button-secondary {
    background-color: rgba(55, 65, 81, 0.9);
    color: #f3f4f6;
    border-color: rgba(75, 85, 99, 0.8);
}

html.dark .svg-button-secondary:hover {
    background-color: rgba(75, 85, 99, 1);
    border-color: rgba(107, 114, 128, 1);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Barcode Generator Styles */
.barcode-generator-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .barcode-generator-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.barcode-generator-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.barcode-generator-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.barcode-generator-content::-webkit-scrollbar {
    width: 8px;
}

.barcode-generator-content::-webkit-scrollbar-track {
    background: transparent;
}

.barcode-generator-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.barcode-generator-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .barcode-generator-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .barcode-generator-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.barcode-generator-tool {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.barcode-generator-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

html.dark .barcode-generator-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.barcode-generator-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .barcode-generator-title {
    color: #f3f4f6;
}

.barcode-generator-section {
    margin-bottom: 2rem;
}

.barcode-generator-section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #374151;
}

html.dark .barcode-generator-section-title {
    color: #d1d5db;
}

.barcode-generator-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.barcode-generator-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .barcode-generator-input {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.8);
    color: #f3f4f6;
}

html.dark .barcode-generator-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.barcode-generator-button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.barcode-generator-button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.barcode-generator-button-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.barcode-generator-button-primary:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.barcode-generator-button-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.barcode-generator-button-secondary:hover {
    background-color: rgba(249, 250, 251, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: rgba(209, 213, 219, 1);
}

.barcode-generator-button-secondary:active {
    transform: translateY(0);
}

html.dark .barcode-generator-button-secondary {
    background-color: rgba(55, 65, 81, 0.9);
    color: #f3f4f6;
    border-color: rgba(75, 85, 99, 0.8);
}

html.dark .barcode-generator-button-secondary:hover {
    background-color: rgba(75, 85, 99, 1);
    border-color: rgba(107, 114, 128, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.barcode-generator-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .barcode-generator-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.barcode-generator-preview {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.barcode-generator-preview:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

html.dark .barcode-generator-preview {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.95);
}

html.dark .barcode-generator-preview:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Zero Width Space button styles */
.zero-width-button {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.zero-width-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.zero-width-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

/* Audio Editor Styles */
.audio-editor-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .audio-editor-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.audio-editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.audio-editor-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.audio-editor-content::-webkit-scrollbar {
    width: 8px;
}

.audio-editor-content::-webkit-scrollbar-track {
    background: transparent;
}

.audio-editor-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.audio-editor-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .audio-editor-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .audio-editor-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.audio-editor-tool {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.audio-editor-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

html.dark .audio-editor-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.audio-editor-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .audio-editor-title {
    color: #f3f4f6;
}

.audio-editor-section {
    margin-bottom: 2rem;
}

.audio-editor-section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #374151;
}

html.dark .audio-editor-section-title {
    color: #d1d5db;
}

.audio-editor-file-input {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    margin-right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px dashed rgba(37, 99, 235, 0.3);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.8) 100%);
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.2s ease;
}

html.dark .audio-editor-file-input {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6) 0%, rgba(30, 64, 175, 0.6) 100%);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.3);
}

.audio-editor-file-input:hover {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.9) 100%);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

html.dark .audio-editor-file-input:hover {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.7) 0%, rgba(37, 99, 235, 0.7) 100%);
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow: 0 4px 6px -1px rgba(147, 197, 253, 0.2);
}

.audio-editor-button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.audio-editor-button-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.audio-editor-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.audio-editor-textarea {
    width: 100%;
    height: 8rem;
    padding: 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    resize: vertical;
    margin-top: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.audio-editor-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .audio-editor-textarea {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.8);
    color: #f3f4f6;
}

html.dark .audio-editor-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.audio-editor-size-display {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 0.5rem;
}

html.dark .audio-editor-size-display {
    color: #9ca3af;
}

.audio-editor-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.audio-editor-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .audio-editor-input {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.8);
    color: #f3f4f6;
}

html.dark .audio-editor-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.audio-editor-input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.audio-editor-input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .audio-editor-input-field {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.8);
    color: #f3f4f6;
}

html.dark .audio-editor-input-field:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.audio-editor-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

html.dark .audio-editor-label {
    color: #d1d5db;
}

.audio-editor-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .audio-editor-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.audio-editor-preview {
    width: 100%;
    margin-top: 1rem;
}

/* Mobile adjustments for Audio Editor */
@media (max-width: 768px) {
    .audio-editor-tool {
        padding: 1rem 0.5rem;
    }

    .audio-editor-card {
        padding: 1.5rem 1rem;
    }

    .audio-editor-section .flex.items-center.gap-6 {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .audio-editor-section .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    #play-btn {
        width: 100%;
        justify-content: center;
    }

    .audio-editor-section .flex.gap-3 {
        flex-direction: column;
    }

    #download-btn {
        width: 100%;
    }
}

/* Mobile adjustments for Barcode Generator */
@media (max-width: 640px) {
    .barcode-generator-tool {
        padding: 1rem 0.5rem;
    }

    .barcode-generator-card {
        padding: 1.5rem 1rem;
    }

    .barcode-generator-form-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .barcode-generator-button-primary,
    .barcode-generator-button-secondary {
        width: 100%;
    }

    .barcode-generator-preview {
        max-width: 100%;
        height: auto !important;
    }
}

/* Code Runner Styles */
.code-runner-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html.dark .code-runner-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.code-runner-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.code-runner-content {
    flex-grow: 1;
    overflow: auto;
    padding: 1rem 0;
}

.code-runner-content::-webkit-scrollbar {
    width: 8px;
}

.code-runner-content::-webkit-scrollbar-track {
    background: transparent;
}

.code-runner-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

.code-runner-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

html.dark .code-runner-content::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

html.dark .code-runner-content::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

.code-runner-tool {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.code-runner-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

html.dark .code-runner-card {
    background-color: rgba(55, 65, 81, 0.95);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.code-runner-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

html.dark .code-runner-title {
    color: #f3f4f6;
}

.code-runner-section {
    margin-bottom: 2rem;
}

.code-runner-section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #374151;
}

html.dark .code-runner-section-title {
    color: #d1d5db;
}

.code-runner-textarea {
    width: 100%;
    height: 16rem;
    padding: 1rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    resize: vertical;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.code-runner-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

html.dark .code-runner-textarea {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: rgba(31, 41, 55, 0.8);
    color: #f3f4f6;
}

html.dark .code-runner-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background-color: rgba(31, 41, 55, 1);
}

.code-runner-button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.code-runner-button-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.code-runner-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.code-runner-preview {
    width: 100%;
    height: 500px;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.75rem;
    background-color: white;
}

html.dark .code-runner-preview {
    border-color: rgba(75, 85, 99, 0.8);
    background-color: #1f2937;
}

.code-runner-description {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

html.dark .code-runner-description {
    color: #9ca3af;
}

.code-runner-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #92400e;
}

html.dark .code-runner-warning {
    background-color: #451a03;
    border-color: #78350f;
    color: #fcd34d;
}

.code-runner-button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.code-runner-button-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.code-runner-button-secondary:hover {
    background-color: rgba(249, 250, 251, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
    border-color: rgba(209, 213, 219, 1);
}

.code-runner-button-secondary:active {
    transform: translateY(0);
}

html.dark .code-runner-button-secondary {
    background-color: rgba(55, 65, 81, 0.9);
    color: #f3f4f6;
    border-color: rgba(75, 85, 99, 0.8);
}

html.dark .code-runner-button-secondary:hover {
    background-color: rgba(75, 85, 99, 1);
    border-color: rgba(107, 114, 128, 1);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   JesseStone.dev facelift — shared visual system
   ========================================================================== */

:root {
    --mt-ink: #0d0d0d;
    --mt-ink-soft: #151515;
    --mt-paper: #f2f0e9;
    --mt-muted: #a5a49e;
    --mt-line: rgba(242, 240, 233, 0.16);
    --mt-line-strong: rgba(242, 240, 233, 0.34);
    --mt-acid: #c7ff3d;
    --mt-orange: #ff6b35;
    --mt-violet: #9e83ff;
    --mt-cyan: #7be0dd;
    --mt-canvas: var(--mt-ink);
    --mt-surface: var(--mt-ink-soft);
    --mt-text: var(--mt-paper);
    --mt-subtle: var(--mt-muted);
    --mt-control: #1c1c1c;
    --mt-shadow: rgba(0, 0, 0, 0.35);
    --mt-serif: "Instrument Serif", Georgia, serif;
    --mt-sans: "DM Sans", "Segoe UI", sans-serif;
    --mt-side: clamp(1rem, 4vw, 4.5rem);
    --mt-max: 1440px;
}

html:not(.dark) {
    --mt-canvas: #e9e7df;
    --mt-surface: #f7f5ee;
    --mt-text: #0d0d0d;
    --mt-subtle: #5e5e59;
    --mt-line: rgba(13, 13, 13, 0.16);
    --mt-line-strong: rgba(13, 13, 13, 0.34);
    --mt-control: #fffdf5;
    --mt-shadow: rgba(46, 43, 34, 0.12);
}

html {
    color-scheme: dark;
    background: var(--mt-canvas);
    scrollbar-color: var(--mt-subtle) var(--mt-canvas);
}

html:not(.dark) {
    color-scheme: light;
}

body,
html.dark body,
.base64-body,
html.dark .base64-body,
.three-body,
html.dark .three-body,
.svg-body,
html.dark .svg-body,
.audio-editor-body,
html.dark .audio-editor-body,
.code-runner-body,
html.dark .code-runner-body,
.index-body,
html.dark .index-body {
    background:
        radial-gradient(circle at 78% 10%, color-mix(in srgb, var(--mt-acid) 6%, transparent), transparent 26rem),
        var(--mt-canvas) !important;
    color: var(--mt-text);
    font-family: var(--mt-sans);
}

body::before {
    position: fixed;
    z-index: 9999;
    inset: 0;
    opacity: 0.028;
    pointer-events: none;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

::selection {
    background: var(--mt-acid);
    color: var(--mt-ink);
}

a,
button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.base64-container,
.index-container,
.three-container,
.svg-container,
.barcode-generator-container,
.audio-editor-container,
.code-runner-container,
.share-container {
    height: 100dvh !important;
    min-height: 100dvh;
    overflow: auto;
    background: transparent !important;
}

/* Shared masthead */

.mt-header {
    position: sticky;
    z-index: 100;
    top: 0;
    flex: none;
    border-bottom: 1px solid var(--mt-line);
    background: color-mix(in srgb, var(--mt-canvas) 88%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mt-header-inner {
    width: min(100%, var(--mt-max));
    min-height: 5.25rem;
    margin: 0 auto;
    padding: .8rem var(--mt-side);
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.75rem);
}

.mt-brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    color: var(--mt-text);
    text-decoration: none;
}

.mt-brand-mark {
    width: 2.8rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--mt-text);
    background: var(--mt-acid);
    color: var(--mt-ink);
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: -.08em;
    transform: rotate(-3deg);
    transition: transform .3s ease;
}

.mt-brand:hover .mt-brand-mark {
    transform: rotate(2deg) scale(1.04);
}

.mt-brand-copy {
    display: grid;
    line-height: 1;
}

.mt-brand-copy small {
    margin-bottom: .35rem;
    color: var(--mt-subtle);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.mt-brand-copy strong {
    font-family: var(--mt-serif);
    font-size: 1.65rem;
    font-weight: 400;
    letter-spacing: -.025em;
}

.mt-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .2rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.mt-nav::-webkit-scrollbar {
    display: none;
}

.mt-nav-link {
    position: relative;
    flex: none;
    padding: .65rem .72rem;
    color: var(--mt-subtle);
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .2s ease;
}

.mt-nav-link::after {
    position: absolute;
    right: .72rem;
    bottom: .28rem;
    left: .72rem;
    height: 1px;
    content: "";
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s ease;
}

.mt-nav-link:hover,
.mt-nav-link.is-active {
    color: var(--mt-acid);
}

.mt-nav-link:hover::after,
.mt-nav-link.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mt-header-actions {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.mt-portfolio-link {
    color: var(--mt-subtle);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.mt-portfolio-link:hover {
    color: var(--mt-acid);
}

.theme-toggle,
html.dark .theme-toggle {
    width: 2.7rem;
    height: 2.7rem;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--mt-line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--mt-text);
    box-shadow: none;
}

.theme-toggle:hover {
    border-color: var(--mt-acid);
    background: var(--mt-acid);
    color: var(--mt-ink);
    transform: rotate(12deg);
}

.theme-toggle .icon {
    width: 1.05rem !important;
    height: 1.05rem !important;
}

.mt-status-strip {
    flex: none;
    min-height: 2rem;
    padding: .42rem var(--mt-side);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--mt-line);
    background: var(--mt-acid);
    color: var(--mt-ink);
    font-size: .59rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

/* Directory */

.directory-content {
    min-height: calc(100dvh - 7.25rem);
}

.directory-hero {
    position: relative;
    min-height: min(44rem, calc(100dvh - 7.25rem));
    padding: clamp(4rem, 10vh, 7.5rem) var(--mt-side);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr);
    align-items: center;
    gap: clamp(2rem, 7vw, 8rem);
    overflow: hidden;
    border-bottom: 1px solid var(--mt-line);
}

.directory-hero::before {
    position: absolute;
    inset: 0;
    opacity: .42;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(var(--mt-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--mt-line) 1px, transparent 1px);
    background-size: clamp(5rem, 10vw, 9rem) clamp(5rem, 10vw, 9rem);
    mask-image: linear-gradient(to right, black, transparent 82%);
}

.directory-hero-copy,
.directory-signal {
    position: relative;
    z-index: 1;
}

.directory-eyebrow,
.tool-eyebrow {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--mt-acid);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.directory-eyebrow span {
    width: 2.5rem;
    height: 1px;
    background: currentColor;
}

.directory-hero h1 {
    max-width: 12ch;
    margin: 1.3rem 0 1.75rem;
    color: var(--mt-text);
    font-size: clamp(4rem, 9.5vw, 9rem);
    font-weight: 500;
    letter-spacing: -.075em;
    line-height: .76;
}

.directory-hero h1 em {
    color: var(--mt-acid);
    font-family: var(--mt-serif);
    font-weight: 400;
}

.directory-lede {
    max-width: 42rem;
    margin: 0;
    color: var(--mt-subtle);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.65;
}

.directory-signal {
    width: min(32rem, 40vw);
    aspect-ratio: 1;
    justify-self: center;
}

.signal-orbit {
    position: absolute;
    inset: 0;
    border: 1px solid var(--mt-line-strong);
    border-radius: 50%;
    animation: mt-spin 22s linear infinite;
}

.signal-orbit--outer::before,
.signal-orbit--inner::before {
    position: absolute;
    top: 50%;
    left: -.36rem;
    width: .72rem;
    aspect-ratio: 1;
    border-radius: 50%;
    content: "";
    background: var(--mt-acid);
    box-shadow: 0 0 1.5rem color-mix(in srgb, var(--mt-acid) 60%, transparent);
}

.signal-orbit--inner {
    inset: 18%;
    animation-direction: reverse;
    animation-duration: 13s;
}

.signal-orbit--inner::before {
    top: auto;
    right: 15%;
    bottom: -.28rem;
    left: auto;
    background: var(--mt-orange);
}

.signal-core {
    position: absolute;
    inset: 36%;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid var(--mt-text);
    border-radius: 50%;
    background: var(--mt-paper);
    color: var(--mt-ink);
    font-family: var(--mt-serif);
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: .7;
    transform: rotate(-4deg);
}

.signal-core small {
    margin-top: .8rem;
    font-family: var(--mt-sans);
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.signal-label {
    position: absolute;
    padding: .35rem .5rem;
    background: var(--mt-canvas);
    color: var(--mt-subtle);
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.signal-label--one { top: 7%; left: 20%; transform: rotate(-22deg); }
.signal-label--two { right: 1%; bottom: 28%; transform: rotate(50deg); }
.signal-label--three { bottom: 6%; left: 18%; transform: rotate(20deg); }

@keyframes mt-spin {
    to { transform: rotate(360deg); }
}

.tool-directory {
    padding: clamp(5rem, 10vw, 9rem) var(--mt-side);
    border-bottom: 1px solid var(--mt-line);
}

.directory-heading {
    margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
    max-width: var(--mt-max);
    display: grid;
    grid-template-columns: minmax(6rem, .3fr) 1fr;
    gap: 2rem;
    align-items: start;
}

.directory-section-number {
    margin: .4rem 0 0;
    color: var(--mt-acid);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.directory-heading h2 {
    margin: 0;
    font-family: var(--mt-serif);
    font-size: clamp(3.2rem, 7vw, 6.5rem);
    font-weight: 400;
    letter-spacing: -.045em;
    line-height: .9;
}

.directory-heading div > p {
    max-width: 38rem;
    margin: 1.3rem 0 0;
    color: var(--mt-subtle);
}

.tool-card-grid {
    max-width: var(--mt-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--mt-line);
    border: 1px solid var(--mt-line);
}

.directory-card {
    --card-accent: var(--mt-acid);
    position: relative;
    min-height: 21rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--mt-surface);
    color: var(--mt-text);
    text-decoration: none;
    isolation: isolate;
}

.directory-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 13rem);
    opacity: .45;
    transition: opacity .35s ease, transform .5s ease;
}

.directory-card::after {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: 0;
    width: 5rem;
    height: 5rem;
    content: "";
    border-top: 1px solid var(--card-accent);
    border-left: 1px solid var(--card-accent);
    transition: width .35s ease, height .35s ease;
}

.directory-card:hover::before {
    opacity: .9;
    transform: scale(1.08);
}

.directory-card:hover::after {
    width: 100%;
    height: 100%;
}

.directory-card--violet { --card-accent: var(--mt-violet); }
.directory-card--cyan { --card-accent: var(--mt-cyan); }
.directory-card--orange { --card-accent: var(--mt-orange); }
.directory-card--paper { --card-accent: var(--mt-paper); }

.directory-card-index {
    color: var(--card-accent);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.directory-card-glyph {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: clamp(5rem, 9vw, 7.5rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--card-accent);
    color: var(--card-accent);
    font-family: var(--mt-serif);
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1;
    transform: rotate(4deg);
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), background .3s ease, color .3s ease;
}

.directory-card:hover .directory-card-glyph {
    background: var(--card-accent);
    color: var(--mt-ink);
    transform: rotate(-3deg) scale(1.04);
}

.directory-card-glyph--calendar,
.directory-card-glyph--path,
.directory-card-glyph--space,
.directory-card-glyph--code {
    font-family: var(--mt-sans);
    font-size: clamp(1.1rem, 2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: .08em;
}

.directory-card-glyph--barcode {
    background: repeating-linear-gradient(90deg, var(--card-accent) 0 2px, transparent 2px 5px, var(--card-accent) 5px 9px, transparent 9px 12px);
    background-size: 70% 55%;
    background-position: center;
    background-repeat: repeat-x;
}

.directory-card-glyph--wave {
    font-family: var(--mt-sans);
    font-size: 2.4rem;
    letter-spacing: -.35em;
    padding-right: .65rem;
}

.directory-card h3 {
    max-width: calc(100% - 8rem);
    margin: auto 0 .75rem;
    font-family: var(--mt-serif);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: -.04em;
    line-height: .9;
}

.directory-card > p {
    max-width: 34rem;
    margin: 0 0 1.8rem;
    color: var(--mt-subtle);
    line-height: 1.55;
}

.directory-card-link {
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--mt-line);
    color: var(--mt-text);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.directory-card-link b {
    color: var(--card-accent);
    font-size: 1rem;
    transition: transform .25s ease;
}

.directory-card:hover .directory-card-link b {
    transform: translate(.25rem, -.25rem);
}

.directory-footer {
    max-width: var(--mt-max);
    margin: 0 auto;
    padding: 1.6rem var(--mt-side) 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--mt-subtle);
    font-size: .73rem;
}

.directory-footer p {
    margin: 0;
}

.directory-footer a {
    color: var(--mt-subtle);
    text-decoration: none;
}

.directory-footer a:hover {
    color: var(--mt-acid);
}

/* Shared tool page surfaces */

.base64-content,
.three-content,
.svg-content,
.audio-editor-content,
.code-runner-content {
    padding: clamp(2.5rem, 6vw, 5.5rem) 0 !important;
    overflow: visible !important;
}

.base64-tool,
.three-tool,
.svg-tool,
.audio-editor-tool,
.code-runner-tool {
    padding: 0 var(--mt-side) !important;
}

.base64-tool { max-width: 68rem !important; }
.three-tool { max-width: var(--mt-max) !important; }
.svg-tool { max-width: 52rem !important; }
.audio-editor-tool { max-width: 76rem !important; }
.code-runner-tool { max-width: 76rem !important; }

.base64-card,
.three-card,
.svg-card,
.audio-editor-card,
.code-runner-card,
.share-card {
    position: relative;
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-surface) !important;
    color: var(--mt-text) !important;
    box-shadow: 1.25rem 1.25rem 0 color-mix(in srgb, var(--mt-acid) 11%, transparent) !important;
    backdrop-filter: none !important;
    animation: mt-rise .5s ease both !important;
}

.base64-card,
.three-card,
.svg-card,
.audio-editor-card,
.code-runner-card {
    padding: clamp(1.5rem, 4vw, 3.5rem) !important;
}

.base64-card::before,
.three-card::before,
.svg-card::before,
.audio-editor-card::before,
.code-runner-card::before,
.share-card::before {
    position: absolute;
    top: -1px;
    left: -1px;
    width: clamp(4rem, 10vw, 9rem);
    height: 3px;
    content: "";
    background: var(--mt-acid);
}

@keyframes mt-rise {
    from { opacity: 0; transform: translateY(1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-eyebrow {
    margin: 0 0 1rem;
}

.base64-title,
.three-title,
.svg-title,
.audio-editor-title,
.code-runner-title,
.tool-page-intro h1,
.share-title,
.index-content .index-title {
    margin: 0 !important;
    color: var(--mt-text) !important;
    font-family: var(--mt-serif) !important;
    font-size: clamp(3rem, 7vw, 6rem) !important;
    font-weight: 400 !important;
    letter-spacing: -.045em !important;
    line-height: .88 !important;
    text-align: left !important;
}

.tool-description,
.code-runner-description {
    max-width: 45rem;
    margin: 1.2rem 0 clamp(2rem, 5vw, 4rem) !important;
    color: var(--mt-subtle) !important;
    font-size: 1rem;
    line-height: 1.65;
}

.base64-section,
.audio-editor-section,
.code-runner-section,
.svg-section {
    margin: 0 !important;
    padding: clamp(1.5rem, 3vw, 2.5rem) 0 !important;
    border-top: 1px solid var(--mt-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.base64-section:last-child,
.audio-editor-section:last-child,
.code-runner-section:last-child,
.svg-section:last-child {
    padding-bottom: 0 !important;
}

.base64-section-title,
.audio-editor-section-title,
.code-runner-section-title,
.svg-section-title {
    margin: 0 0 1.2rem !important;
    color: var(--mt-text) !important;
    font-size: .69rem !important;
    font-weight: 800 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase;
}

.base64-label,
.audio-editor-label,
.svg-label,
.three-label,
.share-label,
.barcode-generator-container label {
    color: var(--mt-subtle) !important;
    font-size: .67rem !important;
    font-weight: 800 !important;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.base64-textarea,
.base64-input-field,
.audio-editor-input,
.audio-editor-input-field,
.svg-input,
.svg-textarea,
.three-input,
.three-select,
.code-runner-textarea,
.barcode-generator-container input:not([type="file"]),
.barcode-generator-container select {
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
    color: var(--mt-text) !important;
    box-shadow: none !important;
    outline: none;
}

.base64-textarea,
.svg-textarea,
.code-runner-textarea {
    font-family: "SFMono-Regular", Consolas, monospace !important;
    line-height: 1.55;
}

.base64-textarea:focus,
.base64-input-field:focus,
.audio-editor-input:focus,
.audio-editor-input-field:focus,
.svg-input:focus,
.svg-textarea:focus,
.three-input:focus,
.three-select:focus,
.code-runner-textarea:focus,
.barcode-generator-container input:focus,
.barcode-generator-container select:focus {
    border-color: var(--mt-acid) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mt-acid) 12%, transparent) !important;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--mt-subtle) 70%, transparent) !important;
}

.base64-file-input,
.audio-editor-file-input {
    width: 100%;
    margin-bottom: 1rem;
    padding: .65rem;
    border: 1px dashed var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
    color: var(--mt-subtle) !important;
}

.base64-file-input::file-selector-button,
.audio-editor-file-input::file-selector-button {
    margin-right: 1rem;
    padding: .7rem 1rem;
    border: 0;
    background: var(--mt-paper);
    color: var(--mt-ink);
    font-weight: 800;
    cursor: pointer;
}

.base64-button-primary,
.audio-editor-button-primary,
.code-runner-button-primary,
.svg-button,
.three-button,
.zero-width-button,
.share-btn-primary,
#download-button,
#play-btn {
    border: 1px solid var(--mt-acid) !important;
    border-radius: 0 !important;
    background: var(--mt-acid) !important;
    color: var(--mt-ink) !important;
    box-shadow: none !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.base64-button-secondary,
.audio-editor-button-secondary,
.code-runner-button-secondary,
.svg-button-secondary,
.share-btn-secondary,
#clear-button,
#remove-logo {
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mt-text) !important;
    box-shadow: none !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.base64-button-primary:hover,
.audio-editor-button-primary:hover,
.code-runner-button-primary:hover,
.svg-button:hover,
.three-button:hover,
.zero-width-button:hover,
.share-btn-primary:hover,
#download-button:hover:not(:disabled),
#play-btn:hover:not(:disabled) {
    background: var(--mt-paper) !important;
    border-color: var(--mt-paper) !important;
    transform: translateY(-2px);
}

.base64-button-secondary:hover,
.audio-editor-button-secondary:hover,
.code-runner-button-secondary:hover,
.svg-button-secondary:hover,
.share-btn-secondary:hover,
#clear-button:hover,
#remove-logo:hover {
    border-color: var(--mt-acid) !important;
    color: var(--mt-acid) !important;
    transform: translateY(-2px);
}

button:disabled {
    opacity: .42 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.base64-size-display,
.audio-editor-size-display {
    color: var(--mt-subtle) !important;
    font-size: .75rem;
}

/* One-off tools */

.index-content {
    min-height: calc(100dvh - 7.25rem);
    padding: clamp(3rem, 8vw, 8rem) var(--mt-side) !important;
    display: grid !important;
    place-items: center;
    overflow: visible !important;
}

.index-content .index-center {
    width: min(100%, 54rem);
    padding: clamp(2rem, 6vw, 5rem) !important;
    border: 1px solid var(--mt-line-strong);
    border-radius: 0 !important;
    background: var(--mt-surface) !important;
    box-shadow: 1.25rem 1.25rem 0 color-mix(in srgb, var(--mt-orange) 18%, transparent);
    text-align: left !important;
}

.index-content .index-text {
    max-width: 42rem;
    margin: 1.25rem 0 2rem !important;
    color: var(--mt-subtle) !important;
    font-size: 1rem !important;
    line-height: 1.65;
}

.zero-width-button {
    min-width: min(100%, 20rem);
    padding: 1rem 1.4rem !important;
}

/* Paycheck calendar */

.three-form-grid {
    margin: clamp(2rem, 5vw, 4rem) 0 2.5rem !important;
    padding: 1.5rem 0;
    border-top: 1px solid var(--mt-line);
    border-bottom: 1px solid var(--mt-line);
}

.three-select {
    width: 100%;
    padding: .875rem 1rem;
}

.three-total {
    color: var(--mt-subtle) !important;
}

.three-result-grid {
    gap: 1px !important;
    background: var(--mt-line);
    border: 1px solid var(--mt-line);
}

.three-month-card,
html.dark .three-month-card {
    margin: 0 !important;
    padding: 1.2rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
    color: var(--mt-text) !important;
    box-shadow: none !important;
}

.three-month-card:hover {
    position: relative;
    z-index: 1;
    background: color-mix(in srgb, var(--mt-acid) 7%, var(--mt-control)) !important;
    transform: translateY(-3px);
}

.three-month-title,
html.dark .three-month-title {
    color: var(--mt-text) !important;
    font-family: var(--mt-serif);
    font-size: 1.35rem !important;
    font-weight: 400 !important;
}

.three-month-title.three-pay,
html.dark .three-month-title.three-pay {
    color: var(--mt-orange) !important;
}

.three-th,
html.dark .three-th {
    border-color: var(--mt-line) !important;
    background: transparent !important;
    color: var(--mt-subtle) !important;
}

.three-td,
html.dark .three-td {
    border-color: var(--mt-line) !important;
    color: var(--mt-text) !important;
}

.three-td.payday,
html.dark .three-td.payday {
    background: var(--mt-acid) !important;
    color: var(--mt-ink) !important;
}

/* SVG lab */

.svg-content {
    position: relative;
    max-width: var(--mt-max);
    margin: 0 auto;
    padding-inline: var(--mt-side) !important;
    display: grid !important;
    grid-template-columns: minmax(17rem, .8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.svg-preview {
    position: sticky;
    top: 8.5rem;
    min-height: 30rem !important;
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background:
        linear-gradient(45deg, #d9d7d0 25%, transparent 25%),
        linear-gradient(-45deg, #d9d7d0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d9d7d0 75%),
        linear-gradient(-45deg, transparent 75%, #d9d7d0 75%),
        var(--mt-paper) !important;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0 !important;
    background-size: 16px 16px !important;
    box-shadow: 1rem 1rem 0 color-mix(in srgb, var(--mt-cyan) 20%, transparent);
}

.svg-tool {
    padding: 0 !important;
}

.svg-card > p[style] {
    color: var(--mt-subtle) !important;
}

.path-item,
.circle-item,
.path-data-container {
    border: 1px solid var(--mt-line) !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
}

/* Barcode + QR */

.barcode-generator-container > .max-w-6xl {
    max-width: var(--mt-max) !important;
    padding: clamp(2.5rem, 6vw, 5.5rem) var(--mt-side) !important;
}

.tool-page-intro--standalone {
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.tool-page-intro h1 {
    max-width: 12ch;
}

.barcode-generator-container .max-w-6xl > .bg-white {
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-surface) !important;
    box-shadow: 1.25rem 1.25rem 0 color-mix(in srgb, var(--mt-violet) 18%, transparent) !important;
}

.barcode-generator-container .border-gray-100,
.barcode-generator-container .dark\:border-zinc-800 {
    border-color: var(--mt-line) !important;
}

.barcode-generator-container .bg-gray-100,
.barcode-generator-container .dark\:bg-zinc-800,
.barcode-generator-container .bg-gray-50\/50,
.barcode-generator-container .dark\:bg-zinc-900\/50 {
    background: var(--mt-control) !important;
}

.barcode-generator-container .mode-toggle {
    border-radius: 0 !important;
}

.barcode-generator-container .mode-toggle.bg-white {
    background: var(--mt-acid) !important;
    color: var(--mt-ink) !important;
}

.barcode-generator-container label.cursor-pointer {
    border-color: var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

#preview-container {
    border-color: var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-paper) !important;
    box-shadow: none !important;
}

#preview-title,
#empty-state {
    color: #6b6a65 !important;
}

/* Audio */

#waveform-container {
    border: 1px solid var(--mt-line-strong);
    border-radius: 0 !important;
    background: var(--mt-control) !important;
}

#left-handle > div,
#right-handle > div {
    background: var(--mt-acid) !important;
}

#playhead {
    background: var(--mt-orange) !important;
    box-shadow: 0 0 7px color-mix(in srgb, var(--mt-orange) 75%, transparent) !important;
}

.audio-editor-card .text-gray-600,
.audio-editor-card .dark\:text-gray-400 {
    color: var(--mt-subtle) !important;
}

/* Code runner */

.code-runner-preview {
    min-height: 25rem;
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-paper);
}

.code-runner-warning {
    border: 1px solid color-mix(in srgb, var(--mt-orange) 50%, var(--mt-line)) !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--mt-orange) 8%, transparent) !important;
    color: var(--mt-subtle) !important;
}

/* Share receiver — important overrides beat its legacy embedded rules */

.share-content {
    min-height: calc(100dvh - 7.25rem) !important;
    padding: clamp(3rem, 8vw, 8rem) var(--mt-side) !important;
    justify-content: center !important;
}

.share-card {
    max-width: 50rem !important;
    padding: clamp(2rem, 5vw, 4rem) !important;
}

.share-title {
    margin-bottom: 2rem !important;
}

.share-field {
    margin-bottom: 1.25rem !important;
}

.share-value {
    padding: 1rem 1.1rem !important;
    border: 1px solid var(--mt-line-strong) !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
    color: var(--mt-text) !important;
}

.share-value a {
    color: var(--mt-acid) !important;
}

.share-actions {
    gap: .75rem !important;
    margin-top: 2rem !important;
}

.share-btn {
    min-height: 3rem;
    padding: .8rem 1rem !important;
}

.no-content {
    color: var(--mt-subtle) !important;
    text-align: left !important;
}

.tool-suggestions {
    gap: 1px !important;
    background: var(--mt-line);
    border: 1px solid var(--mt-line);
}

.tool-link {
    padding: 1rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--mt-control) !important;
    color: var(--mt-text) !important;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tool-link:hover {
    background: var(--mt-acid) !important;
    color: var(--mt-ink) !important;
}

/* Responsive refinement */

@media (max-width: 1050px) {
    .mt-header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .mt-brand-copy small,
    .mt-portfolio-link {
        display: none;
    }

    .directory-hero {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, .55fr);
    }

    .svg-content {
        grid-template-columns: 1fr;
    }

    .svg-preview {
        position: relative;
        top: auto;
        min-height: 22rem !important;
    }
}

@media (max-width: 760px) {
    .mt-header-inner {
        min-height: 0;
        padding-top: .7rem;
        padding-bottom: .45rem;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        gap: .55rem 1rem;
    }

    .mt-brand { grid-area: brand; }
    .mt-brand-mark { width: 2.35rem; }
    .mt-brand-copy strong { font-size: 1.35rem; }
    .mt-nav {
        grid-area: nav;
        margin: 0 calc(var(--mt-side) * -1);
        padding: 0 var(--mt-side);
    }
    .mt-header-actions { grid-area: actions; }
    .theme-toggle,
    html.dark .theme-toggle {
        width: 2.35rem;
        height: 2.35rem;
    }

    .mt-status-strip span:nth-child(n+3) {
        display: none;
    }

    .directory-hero {
        min-height: auto;
        padding-top: 4.5rem;
        padding-bottom: 4rem;
        grid-template-columns: 1fr;
    }

    .directory-hero h1 {
        font-size: clamp(4rem, 18vw, 6.5rem);
    }

    .directory-signal {
        width: min(19rem, 78vw);
        margin-top: 1rem;
    }

    .directory-heading {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-card-grid {
        grid-template-columns: 1fr;
    }

    .directory-card {
        min-height: 19rem;
    }

    .directory-card-glyph {
        width: 5.25rem;
    }

    .directory-card h3 {
        max-width: calc(100% - 5.5rem);
    }

    .directory-footer {
        flex-direction: column;
    }

    .base64-content,
    .three-content,
    .svg-content,
    .audio-editor-content,
    .code-runner-content {
        padding-top: 2.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    .base64-card,
    .three-card,
    .svg-card,
    .audio-editor-card,
    .code-runner-card,
    .share-card,
    .index-content .index-center,
    .barcode-generator-container .max-w-6xl > .bg-white {
        box-shadow: .6rem .6rem 0 color-mix(in srgb, var(--mt-acid) 11%, transparent) !important;
    }

    .base64-title,
    .three-title,
    .svg-title,
    .audio-editor-title,
    .code-runner-title,
    .tool-page-intro h1,
    .share-title,
    .index-content .index-title {
        font-size: clamp(2.8rem, 14vw, 4.5rem) !important;
    }

    .audio-editor-card .flex.items-center.gap-6 {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .audio-editor-card .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .audio-editor-card .flex.gap-3 {
        flex-direction: column !important;
    }

    #preview-container {
        min-width: 0 !important;
        width: 100%;
        min-height: 16rem !important;
        padding: 1.5rem !important;
    }

    .barcode-generator-container .p-8,
    .barcode-generator-container .lg\:p-12 {
        padding: 1.5rem !important;
    }

    .share-actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}


/* SVG layout correction: neutralize the legacy fixed sidebar dimensions. */
.svg-tool {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
}

.svg-card {
    width: 100%;
    min-width: 0;
}

.svg-preview,
html.dark .svg-preview {
    position: sticky !important;
    top: 8.5rem !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    padding: clamp(1.5rem, 4vw, 3rem) !important;
    display: flex !important;
    overflow: auto !important;
}

@media (max-width: 1050px) {
    .svg-preview,
    html.dark .svg-preview {
        position: relative !important;
        top: auto !important;
    }
}
