    @font-face {
        font-family: 'MerriweatherCustom';
        src: url('./font/Merriweather_36pt-Regular.ttf') format('truetype');
        font-weight: 400;
        font-style: normal;
        font-display: swap;
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        background: #1a1a1a;
        font-family: 'MerriweatherCustom', serif;
        color: #e0d4b8;
        min-height: 100vh;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 30px 20px;
    }

    h1 {
        font-size: clamp(1.1rem, 4vw, 1.8rem);
        font-weight: 400;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: #c9a84c;
        margin-bottom: 6px;
        text-align: center;
    }

    .subtitle {
        font-size: 0.8rem;
        color: #888;
        letter-spacing: 0.08em;
        margin-bottom: 30px;
        text-align: center;
    }

    #upload-zone {
        border: 2px dashed #c9a84c55;
        border-radius: 8px;
        padding: 40px 60px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s;
        background: #222;
        margin-bottom: 30px;
        width: 100%;
        max-width: 700px;
    }

    #upload-zone:hover {
        border-color: #c9a84c;
        background: #252525;
    }

    #upload-zone .icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    #upload-zone p {
        color: #aaa;
        font-size: 0.85rem;
    }

    #upload-zone span {
        color: #c9a84c;
    }

    #file-input {
        display: none;
    }

    #editor-section {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 900px;
    }

    #canvas-wrapper {
        position: relative;
        border: 1px solid #333;
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 24px;
        box-shadow: 0 8px 40px #0008;
        width: 100%;
        max-width: 860px;
    }

    #bg-canvas {
        display: block;
        width: 100%;
        height: auto;
    }

    .text-overlay {
        position: absolute;
        background: rgba(255, 255, 255, 0.0);
        border: 1.5px dashed transparent;
        outline: none;
        resize: none;
        overflow: hidden;
        cursor: text;
        transition: border-color 0.2s, background 0.2s;
        line-height: 1.4;
        white-space: nowrap;
        padding: 2px 4px;
        border-radius: 3px;
        user-select: text;
    }

    .text-overlay:hover {
        border-color: #c9a84c88;
        background: rgba(201, 168, 76, 0.06);
    }

    .text-overlay:focus {
        border-color: #c9a84c;
        background: rgba(201, 168, 76, 0.1);
    }

    /* Fields panel */
    .fields-panel {
        width: 100%;
        background: #222;
        border: 1px solid #333;
        border-radius: 8px;
        padding: 20px 24px;
        margin-bottom: 20px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .field-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .field-group.full {
        grid-column: 1 / -1;
    }

    label {
        font-size: 0.7rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #c9a84c;
    }

    input[type="text"],
    textarea.field-input {
        background: #2a2a2a;
        border: 1px solid #444;
        border-radius: 4px;
        color: #f0e8d0;
        padding: 8px 10px;
        font-family: inherit;
        font-size: 0.9rem;
        outline: none;
        transition: border-color 0.2s;
        resize: vertical;
    }

    input[type="text"]:focus,
    textarea.field-input:focus {
        border-color: #c9a84c;
    }

    /* Style controls */
    .style-controls {
        width: 100%;
        background: #222;
        border: 1px solid #333;
        border-radius: 8px;
        padding: 16px 24px;
        margin-bottom: 20px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 16px;
        align-items: end;
    }

    .style-controls .ctrl-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .style-controls label {
        font-size: 0.65rem;
    }

    .style-controls select,
    .style-controls input[type="number"],
    .style-controls input[type="color"] {
        background: #2a2a2a;
        border: 1px solid #444;
        border-radius: 4px;
        color: #f0e8d0;
        padding: 5px 8px;
        font-size: 0.85rem;
        outline: none;
    }

    .style-controls input[type="color"] {
        width: 44px;
        height: 30px;
        padding: 2px 3px;
        cursor: pointer;
    }

    .hint-bar {
        width: 100%;
        background: #1e1e1e;
        border: 1px solid #2a2a2a;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 0.75rem;
        color: #666;
        margin-bottom: 20px;
        text-align: center;
        letter-spacing: 0.05em;
    }

    .hint-bar span {
        color: #c9a84c;
    }

    /* Buttons */
    .actions {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    button {
        padding: 10px 26px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        font-family: inherit;
        transition: all 0.2s;
    }

    .btn-download {
        background: linear-gradient(135deg, #c9a84c, #a07830);
        color: #1a1a1a;
        font-weight: bold;
    }

    .btn-download:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

    .btn-reset {
        background: transparent;
        color: #888;
        border: 1px solid #444;
    }

    .btn-reset:hover {
        color: #ccc;
        border-color: #666;
    }

    .scale-note {
        font-size: 0.7rem;
        color: #555;
        margin-top: 6px;
        text-align: center;
    }

    @media (max-width: 768px) {
        body {
            padding: 18px 12px;
        }

        .subtitle {
            margin-bottom: 16px;
        }

        .hint-bar {
            font-size: 0.72rem;
            padding: 10px 10px;
        }

        .style-controls,
        .fields-panel {
            padding: 14px 12px;
        }

        .fields-panel {
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .field-group.full {
            grid-column: auto;
        }

        .actions button {
            width: 100%;
        }
    }