        :root {
            font: 400 16px "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
            color: #111;
            background-color: #0f172a;
        }
        * { box-sizing: border-box; }
        body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%), #0f172a; display: flex; justify-content: center; }
        .surface {
            width: min(100%, 960px);
            padding: 2.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .panel {
            background: #ffffff;
            padding: 2rem;
            box-shadow: 0 25px 60px rgba(15,23,42,0.35);
            display: grid;
            gap: 1.25rem;
        }
        header.hero {
            color: #e2e8f0;
            text-align: center;
        }
        header.hero h1 {
            margin: 0;
            font-size: clamp(2rem, 5vw, 2.5rem);
            letter-spacing: -0.02em;
        }
        header.hero p {
            margin: 0.5rem auto 0;
            max-width: 560px;
            color: #cbd5f5;
        }
        .control-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.75rem;
        }
        .drop-zone {
            border: 2px dashed rgba(59, 130, 246, 0.7);
            border-radius: 1rem;
            padding: 1.5rem;
            text-align: center;
            background: rgba(59, 130, 246, 0.04);
            transition: border-color 0.2s ease, background 0.2s ease;
            cursor: pointer;
            font-size: 0.95rem;
            color: #0f172a;
        }
        .drop-zone.is-active {
            border-color: rgba(59, 130, 246, 1);
            background: rgba(59, 130, 246, 0.1);
        }
        .drop-zone .hint {
            color: #475569;
            font-size: 0.8rem;
            margin-top: 0.35rem;
        }
        input[type="file"], select {
            width: 100%;
            border: 1px solid #e2e8f0;
            padding: 0.9rem 1rem;
            font-size: 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
            background: #fefefe;
        }
        input[type="file"]:focus-visible, select:focus-visible {
            outline: 2px solid #2563eb;
            box-shadow: none;
        }
        .progress-wrap {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }
        .status-label {
            font-weight: 600;
            color: #0f172a;
        }
        .status-badge {
            font-size: 0.9rem;
            color: #475569;
            min-height: 1.4em;
        }
        .progress-bar {
            width: 100%;
            height: 10px;
            background: #e2e8f0;
            overflow: hidden;
        }
        .progress-bar span {
            display: block;
            height: 100%;
            width: 0;
            background: linear-gradient(90deg, #427dfc, #100ea8);
            transition: width 0.2s ease;
        }
        .progress-note {
            font-size: 0.85rem;
            color: #475569;
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1rem;
        }
        .result-card {
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 1rem;
            background: #fff;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            min-height: 200px;
        }
        .result-card.is-error {
            border-color: #dc2626;
        }
        .result-card header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.5rem;
        }
        .result-card strong {
            font-size: 1rem;
            display: block;
        }
        .result-status, .result-progress {
            font-size: 0.85rem;
            color: #475569;
        }
        .result-progress {
            font-weight: 600;
        }
        .canvas-wrap {
            width: 100%;
            background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 10px, #f8fafc 10px, #f8fafc 20px);
            border-radius: 0.5rem;
            padding: 0.5rem;
        }
        .canvas-wrap canvas {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 0.25rem;
            border: 1px solid #cbd5f5;
        }
        .result-actions {
            display: flex;
            justify-content: flex-end;
        }
        .result-actions button {
            background-color: #041130;
            color: #cbd5f5;
            border: none;
            padding: 0.5rem 1rem;
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease;
        }
        .result-actions button:disabled {
            cursor: not-allowed;
            opacity: 0.4;
        }
        .result-actions button:not(:disabled):hover {
            transform: translateY(-2px);
            background-color: #172b5a;
        }

        @media (max-width: 640px) {
            .surface {
                padding: 1.5rem;
            }
            .panel {
                padding: 1.5rem;
            }
        }

        footer{
            color: #e2e8f0;
            text-align: center;
        }

        .editor-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.85);
            display: none;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            z-index: 20;
        }
        .editor-overlay.is-open {
            display: flex;
        }
        .editor-panel {
            width: min(100%, 960px);
            max-height: 90vh;
            background: #0f172a;
            color: #fff;
            border-radius: 1rem;
            box-shadow: 0 20px 60px rgba(15, 23, 42, 0.8);
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .editor-panel header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.5rem;
        }
        .editor-panel h3 {
            margin: 0;
            font-size: 1.25rem;
        }
        .editor-body {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .editor-canvas-wrap {
            position: relative;
            background: linear-gradient(90deg, #0f172a 0%, #1f2a44 100%);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 0.75rem;
            overflow: hidden;
            min-height: 360px;
            width: 100%;
        }
        .editor-canvas-wrap::before {
            content: '';
            position: absolute;
            inset: 0;
            background: repeating-linear-gradient(45deg, #1d2a45, #1d2a45 20px, #111b2d 20px, #111b2d 40px);
            opacity: 0.25;
            z-index: 0;
        }
        .editor-canvas-wrap canvas {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: block;
            border-radius: 0.5rem;
            image-rendering: auto;
        }
        .editor-base-canvas {
            z-index: 1;
            pointer-events: none;
            opacity: 0.35;
        }
        .editor-mask-canvas {
            z-index: 2;
            pointer-events: auto;
            touch-action: none;
            cursor: crosshair;
        }
        .editor-hint {
            font-size: 0.85rem;
            color: #cbd5f5;
            margin: 0;
        }
        .editor-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }
        .editor-controls button {
            border: 1px solid transparent;
            border-radius: 0.5rem;
            padding: 0.45rem 0.95rem;
            font-size: 0.95rem;
            cursor: pointer;
            background: rgba(255,255,255,0.08);
            color: #fff;
        }
        .editor-controls button.active {
            background: #1d4ed8;
            border-color: #1d4ed8;
        }
        .editor-actions {
            margin-left: auto;
            display: flex;
            gap: 0.5rem;
        }
        .editor-actions button {
            min-width: 110px;
            border-radius: 999px;
            border: none;
            padding: 0.6rem 1.25rem;
            font-weight: 600;
            color: #fff;
        }
        .editor-actions .cancel-edit {
            background: rgba(255, 255, 255, 0.12);
        }
        .editor-actions .apply-edit {
            background: #2563eb;
        }

        #thanks h2,#thanks p{
            color: #cbd5f5;
        }
        #table_scroller{
            width: 100%;
            max-width: 1000px;
            overflow-x: auto;
            color: #cbd5f5;
        }
        table{
            border-collapse: collapse;
            width: max-content;
        }
        tr{
            border-bottom: #cfd8ff solid 1px;
        }
        tr > :nth-child(1), tr > :nth-child(2) {
            width: fit-content;
        }
        th.desc,td.desc {
            width: 25em;
        }
        a{
            color: #6b86ff;
        }
        a:hover{
            color: #a1b2ff;
        }

