body.image-base64 {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-2: #101a2a;
    --panel: rgba(255, 255, 255, 0.05);
    --panel-strong: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.14);
    --stroke-strong: rgba(255, 255, 255, 0.28);
    --text: #e7edf6;
    --muted: rgba(231, 237, 246, 0.7);
    --accent: #ffb347;
    --accent-2: #37e8d6;
    --accent-3: #86a8ff;
    --danger: #ff7a7a;
    --shadow: 0 22px 60px rgba(8, 14, 24, 0.55);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    min-height: 100vh;
    background:
        radial-gradient(900px 540px at 10% 10%, rgba(55, 232, 214, 0.16), transparent 60%),
        radial-gradient(900px 620px at 90% 0%, rgba(255, 179, 71, 0.2), transparent 55%),
        radial-gradient(800px 600px at 75% 100%, rgba(134, 168, 255, 0.18), transparent 55%),
        linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

body.image-base64::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

body.image-base64::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.03) 0%, transparent 40%, rgba(255, 255, 255, 0.02) 80%);
    pointer-events: none;
    z-index: 0;
}

.image-base64,
.image-base64 * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.image-base64 a {
    color: inherit;
    text-decoration: none;
}

.image-base64 button,
.image-base64 input,
.image-base64 textarea,
.image-base64 select {
    font-family: inherit;
    color: inherit;
}

.image-base64 .page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    position: relative;
    z-index: 1;
}

.image-base64 .hero {
    display: grid;
    gap: 30px;
}

.image-base64 .hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.image-base64 .back-link {
    font-weight: 600;
    color: var(--muted);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border 0.2s ease, color 0.2s ease;
}

.image-base64 .back-link:hover {
    color: var(--text);
    border-bottom-color: var(--accent-2);
}

.image-base64 .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-base64 .badge {
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--stroke);
}

.image-base64 .badge.accent {
    background: rgba(255, 179, 71, 0.22);
    border-color: rgba(255, 179, 71, 0.5);
    color: #ffd9a1;
}

.image-base64 .badge.ink {
    background: rgba(55, 232, 214, 0.22);
    border-color: rgba(55, 232, 214, 0.5);
    color: #bdf7f1;
}

.image-base64 .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: start;
}

.image-base64 .hero-main {
    padding: 8px 4px;
}

.image-base64 .hero-eyebrow {
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.image-base64 .hero-main h1 {
    font-size: clamp(2.2rem, 2.8vw + 1rem, 3.2rem);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.image-base64 .hero-main p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.image-base64 .hero-points {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.image-base64 .hero-points li {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
}

.image-base64 .hero-points li::before {
    content: "✓";
    color: var(--accent-2);
    font-weight: 700;
}

.image-base64 .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.image-base64 .hero-cta {
    background: linear-gradient(130deg, var(--accent) 0%, #ffd291 60%, #ffe7c3 100%);
    color: #10131d;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.image-base64 .hero-cta-hint {
    color: var(--muted);
    font-size: 0.95rem;
}

.image-base64 .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.image-base64 .hero-aside {
    display: grid;
    gap: 18px;
}

.image-base64 .fact-block {
    padding: 18px 18px 18px 0;
    border-top: 1px solid var(--stroke);
}

.image-base64 .fact-block:first-child {
    border-top: none;
    padding-top: 0;
}

.image-base64 .fact-block h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.image-base64 .fact-list {
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--muted);
    line-height: 1.6;
}

.image-base64 .fact-list strong {
    color: var(--text);
    font-weight: 600;
}

.image-base64 .tag {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px dashed var(--stroke);
    color: var(--muted);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
}

.image-base64 .hero-side {
    display: grid;
    gap: 16px;
}

.image-base64 .hero-card {
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--stroke);
    padding: 20px;
    box-shadow: var(--shadow);
}

.image-base64 .hero-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.image-base64 .hero-card ul {
    list-style: none;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.image-base64 .hero-card li::before {
    content: "✦";
    margin-right: 8px;
    color: var(--accent-2);
}

.image-base64 .stat-strip {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.image-base64 .stat-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    display: grid;
    gap: 6px;
}

.image-base64 .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffe4b2;
}

.image-base64 .stat-label {
    font-size: 0.95rem;
    color: var(--text);
}

.image-base64 .stat-card p {
    color: var(--muted);
    font-size: 0.9rem;
}

.image-base64 .workspace {
    margin-top: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.image-base64 .section {
    margin-top: 56px;
    display: grid;
    gap: 20px;
}

.image-base64 .section-head {
    display: grid;
    gap: 8px;
    text-align: left;
    max-width: 820px;
}

.image-base64 .section-body {
    max-width: 900px;
}

.image-base64 .section-kicker {
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.image-base64 .section-head h2 {
    font-size: clamp(1.6rem, 1.5vw + 1.2rem, 2.4rem);
    letter-spacing: 0.02em;
}

.image-base64 .section-desc {
    color: var(--muted);
    line-height: 1.75;
    font-size: 1rem;
}

.image-base64 .panel {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
}

.image-base64 .panel-body {
    display: block;
}

.image-base64 .mode-panel {
    display: none;
}

.image-base64 .mode-panel.is-active {
    display: block;
}

.image-base64 .mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 18px;
    align-items: start;
}

.image-base64 .stack {
    display: grid;
    gap: 16px;
}

.image-base64 .panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.image-base64 .panel-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.image-base64 .mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
}

.image-base64 .switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.image-base64 .switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.image-base64 .switch-track {
    min-width: 220px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    padding: 4px;
    position: relative;
    gap: 4px;
    transition: background 0.2s ease, border 0.2s ease;
}

.image-base64 .switch-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    box-shadow: 0 8px 18px rgba(8, 14, 24, 0.45);
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.image-base64 .switch input:checked + .switch-track {
    background: rgba(55, 232, 214, 0.18);
    border-color: rgba(55, 232, 214, 0.45);
}

.image-base64 .switch input:checked + .switch-track .switch-thumb {
    transform: translateX(100%);
}

.image-base64 .switch-option {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.2s ease;
}

.image-base64 .switch.is-checked .switch-option[data-side="right"],
.image-base64 .switch:not(.is-checked) .switch-option[data-side="left"] {
    color: #0d1220;
    font-weight: 600;
}

.image-base64 .panel-kicker {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
}

.image-base64 .panel-head h2 {
    font-size: 1.5rem;
}

.image-base64 .dropzone {
    position: relative;
    border-radius: var(--radius-md);
    border: 1px dashed var(--stroke-strong);
    background: rgba(10, 15, 24, 0.55);
    padding: 28px;
    text-align: center;
    transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.image-base64 .dropzone.is-dragover {
    border-color: var(--accent-2);
    background: rgba(55, 232, 214, 0.12);
    transform: translateY(-2px);
}

.image-base64 .dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.image-base64 .dropzone h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.image-base64 .dropzone p {
    color: var(--muted);
    font-size: 0.95rem;
}

.image-base64 .meta-row {
    font-size: 0.92rem;
    color: var(--muted);
}

.image-base64 .preview-card,
.image-base64 .output-card,
.image-base64 .input-card {
    background: var(--panel-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    padding: 16px;
    display: grid;
    gap: 12px;
}

.image-base64 .preview-surface {
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: rgba(10, 15, 24, 0.6);
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.image-base64 .preview-surface img {
    max-width: 100%;
    max-height: 240px;
    display: none;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.image-base64 .preview-surface span {
    color: var(--muted);
    font-size: 0.95rem;
}

.image-base64 textarea,
.image-base64 input[type="text"],
.image-base64 select {
    background: rgba(10, 15, 24, 0.72);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.image-base64 textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.5;
}

.image-base64 textarea:focus,
.image-base64 input:focus,
.image-base64 select:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(55, 232, 214, 0.15);
}

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

.image-base64 #mimeField.is-locked label {
    color: rgba(231, 237, 246, 0.5);
}

.image-base64 #mimeField.is-locked select {
    opacity: 0.6;
    pointer-events: none;
}

.image-base64 .mime-auto {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    display: none;
}

.image-base64 .mime-auto.is-visible {
    display: block;
}

.image-base64 label {
    font-size: 0.85rem;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.image-base64 .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-base64 button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.image-base64 button.primary {
    background: linear-gradient(135deg, rgba(55, 232, 214, 0.92), rgba(134, 168, 255, 0.92));
    color: #081019;
    box-shadow: 0 12px 24px rgba(55, 232, 214, 0.25);
}

.image-base64 button.secondary {
    background: rgba(255, 179, 71, 0.18);
    color: #ffd9a1;
    border: 1px solid rgba(255, 179, 71, 0.4);
}

.image-base64 button.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    border: 1px solid var(--stroke);
}

.image-base64 button:hover {
    transform: translateY(-1px);
}

.image-base64 button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.image-base64 .status {
    font-size: 0.9rem;
    color: var(--muted);
}

.image-base64 .status.success {
    color: var(--accent-2);
}

.image-base64 .status.error {
    color: var(--danger);
}

.image-base64 .feature-grid {
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.image-base64 .text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
}

.image-base64 .text-block h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.image-base64 .text-block p {
    color: var(--muted);
    line-height: 1.7;
}

.image-base64 .text-body {
    color: var(--muted);
    line-height: 1.8;
    display: grid;
    gap: 12px;
    max-width: 820px;
}

.image-base64 .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.image-base64 .step {
    border-top: 1px solid var(--stroke);
    padding-top: 16px;
}

.image-base64 .step-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.02rem;
}

.image-base64 .step ol {
    list-style: decimal;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.image-base64 .column-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 32px;
    color: var(--muted);
    line-height: 1.7;
}

.image-base64 .column-list li {
    break-inside: avoid;
    padding: 6px 0;
}

.image-base64 .definition-list {
    display: grid;
    gap: 16px;
    max-width: 820px;
}

.image-base64 .definition-list div {
    padding: 14px 0;
    border-top: 1px solid var(--stroke);
}

.image-base64 .definition-list div:first-child {
    border-top: none;
    padding-top: 0;
}

.image-base64 .definition-list dt {
    font-weight: 600;
    margin-bottom: 6px;
}

.image-base64 .definition-list dd {
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.image-base64 .faq-list {
    display: grid;
}

.image-base64 .faq-item {
    padding: 18px 0;
    border-top: 1px solid var(--stroke);
}

.image-base64 .faq-item:first-child {
    border-top: none;
    padding-top: 0;
}

.image-base64 .faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.image-base64 .faq-item p {
    color: var(--muted);
    line-height: 1.7;
}

.image-base64 .tool-list {
    list-style: none;
    display: grid;
    gap: 14px;
    max-width: 820px;
}

.image-base64 .tool-list li {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid var(--stroke);
}

.image-base64 .tool-list li:first-child {
    border-top: none;
    padding-top: 0;
}

.image-base64 .tool-list a {
    font-weight: 600;
}

.image-base64 .tool-list span {
    color: var(--muted);
    line-height: 1.6;
}

.image-base64 .cta-band {
    padding: 28px 0;
    border-top: 1px solid var(--stroke);
    display: grid;
    gap: 12px;
    max-width: 860px;
}

.image-base64 .cta-band p {
    color: var(--muted);
    line-height: 1.7;
}

.image-base64 .feature-card {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    gap: 8px;
}

.image-base64 .feature-card h3 {
    font-size: 1rem;
}

.image-base64 .feature-card p {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.6;
}

.image-base64 .reveal {
    animation: base64-rise 0.8s ease both;
    animation-delay: var(--delay, 0s);
}

@keyframes base64-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .image-base64 .hero-grid {
        grid-template-columns: 1fr;
    }

    .image-base64 .mode-grid {
        grid-template-columns: 1fr;
    }

    .image-base64 .section-head {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .image-base64 .text-grid {
        grid-template-columns: 1fr;
    }

    .image-base64 .column-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .image-base64 .page {
        padding: 28px 16px 64px;
    }

    .image-base64 .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-base64 .hero-cta {
        width: 100%;
        text-align: center;
    }

    .image-base64 .panel-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .image-base64 textarea {
        min-height: 150px;
    }
}
