* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        body {
            background: radial-gradient(circle at 20% 30%, #0b1c2f, #071018);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem 1rem;
        }

        .signer-card {
            max-width: 1350px;
            width: 100%;
            background: rgba(15, 30, 44, 0.7);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(64, 224, 208, 0.25);
            border-radius: 3rem;
            padding: 2.2rem 2.4rem;
            box-shadow: 0 30px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,255,200,0.1) inset;
            transition: 0.2s;
            color: #ecfff9;
        }

        h1 {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            font-weight: 600;
            font-size: 2.1rem;
            letter-spacing: -0.01em;
            background: linear-gradient(145deg, #ffffff, #baf3e7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.3rem;
        }

        h1 small {
            background: rgba(0,200,200,0.2);
            padding: 0.2rem 1.2rem;
            border-radius: 40px;
            font-size: 0.9rem;
            font-weight: 500;
            border: 1px solid #3fe0d0;
            -webkit-text-fill-color: #d2fff0;
        }

        .sub {
            color: #b5e8e0;
            margin-bottom: 2.3rem;
            font-size: 1.05rem;
            padding-left: 1rem;
            border-left: 6px solid #1fc7b0;
            background: rgba(8, 40, 48, 0.4);
            border-radius: 0 18px 18px 0;
            line-height: 1.5;
            backdrop-filter: blur(4px);
        }

        /* === MAIN FLEX LAYOUT: PDF UPLOAD + SIGNATURE CANVAS === */
        .row-split {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .pdf-zone {
            flex: 1.2 1 340px;
            background: rgba(10, 25, 35, 0.7);
            border-radius: 2rem;
            padding: 1.8rem;
            border: 1px solid #1d6f6f;
            backdrop-filter: blur(5px);
        }

        .sign-zone {
            flex: 1 1 380px;
            background: rgba(8, 27, 34, 0.8);
            border-radius: 2rem;
            padding: 1.8rem;
            border: 1px solid #31998b;
        }

        .section-title {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 1.2rem;
            font-weight: 600;
            color: #c6fff2;
            margin-bottom: 1.2rem;
            border-bottom: 1px dashed #3fa0a0;
            padding-bottom: 0.6rem;
        }

        /* file input */
        .file-upload-area {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .file-label {
            background: #0d3843;
            padding: 0.9rem 1.8rem;
            border-radius: 40px;
            font-size: 1rem;
            font-weight: 600;
            border: 1.5px solid #52c0b0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
            cursor: pointer;
            transition: 0.1s;
            color: white;
            width: fit-content;
        }

        .file-label:hover {
            background: #175a63;
            border-color: #a3ffff;
        }

        #pdfInput {
            display: none;
        }

        #pdfStatus {
            background: #0a1e28;
            padding: 0.7rem 1.2rem;
            border-radius: 36px;
            font-size: 0.9rem;
            border-left: 5px solid #2dc0b0;
            word-break: break-all;
        }

        .limit-badge {
            background: #18434b;
            padding: 0.3rem 1rem;
            border-radius: 20px;
            font-size: 0.8rem;
            color: #aaffdd;
            border: 1px solid teal;
        }

        /* signature canvas */
        .canvas-container {
            background: #0f1e24;
            border-radius: 24px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            border: 1px solid #2e8b8b;
            margin-bottom: 1.2rem;
        }

        #signatureCanvas {
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.5);
            width: 100%;
            height: auto;
            aspect-ratio: 400/200;
            display: block;
            cursor: crosshair;
            border: 2px solid #42bdbd;
        }

        .canvas-toolbar {
            display: flex;
            gap: 1rem;
            margin-top: 0.8rem;
            flex-wrap: wrap;
        }

        .btn-sm {
            background: #264a53;
            border: none;
            border-bottom: 4px solid #0d6b6b;
            padding: 0.5rem 1.4rem;
            border-radius: 36px;
            color: white;
            font-weight: 600;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.3rem;
            cursor: pointer;
            transition: 0.08s;
        }

        .btn-sm:active {
            transform: translateY(4px);
            border-bottom-width: 2px;
        }

        /* property sliders */
        .property-panel {
            background: #0d2a33d0;
            border-radius: 1.6rem;
            padding: 1.5rem;
            margin-top: 1rem;
            backdrop-filter: blur(5px);
            border: 1px solid #369b9b;
        }

        .prop-row {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
            margin-bottom: 0.9rem;
        }

        .prop-row label {
            min-width: 50px;
            font-weight: 700;
            color: #d6fff6;
        }

        input[type=range] {
            flex: 2;
            height: 8px;
            background: #1c505a;
            border-radius: 10px;
            appearance: none;
        }

        input[type=range]::-webkit-slider-thumb {
            appearance: none;
            width: 20px;
            height: 20px;
            background: #aaffdd;
            border-radius: 50%;
            border: 2px solid black;
            cursor: pointer;
            box-shadow: 0 0 10px cyan;
        }

        .prop-value {
            min-width: 60px;
            background: #0a2a2f;
            padding: 0.3rem 0.8rem;
            border-radius: 24px;
            text-align: center;
            font-weight: 600;
            border: 1px solid teal;
        }

        /* ACTION BUTTONS: sign + separate download */
        .action-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 1.3rem;
            margin: 2.2rem 0 1.2rem;
            align-items: center;
        }

        .btn {
            border: none;
            padding: 1rem 2.3rem;
            border-radius: 60px;
            font-size: 1.2rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.7rem;
            color: white;
            border-bottom: 6px solid rgba(0,0,0,0.25);
            transition: all 0.06s;
            cursor: pointer;
            letter-spacing: 0.8px;
            flex: 0 1 auto;
        }

        .btn-primary {
            background: #005f6b;
            border-bottom-color: #0a8f8f;
        }

        .btn-download {
            background: #1e5545;
            border-bottom-color: #2aa585;
        }

        .btn:active {
            transform: translateY(6px);
            border-bottom-width: 2px;
        }

        .btn:disabled {
            opacity: 0.4;
            transform: none;
            border-bottom-width: 6px;
            pointer-events: none;
        }

        #downloadBtn {
            background: #175a4a;
        }

        #statusMsg {
            background: #0e282e;
            padding: 0.6rem 1.5rem;
            border-radius: 40px;
            font-weight: 500;
            border-left: 6px solid #2dc0b0;
        }

        .footnote {
            display: flex;
            justify-content: space-between;
            margin-top: 1.5rem;
            color: #95c2c2;
            font-size: 0.8rem;
            border-top: 1px solid #1e6a6a;
            padding-top: 1.2rem;
        }

        /* responsive */
        @media (max-width: 900px) {
            .signer-card { padding: 1.5rem; }
            h1 { font-size: 1.8rem; }
        }