:root{
    color-scheme: light;
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #cccccc;
    --border2: #cccccc;
    --shadow: 0 10px 30px rgba(17,24,39,.06);
    --shadow2: 0 2px 10px rgba(17,24,39,.06);
    --accent: #2563eb;
    --accent-soft: rgba(37,99,235,.10);
    --radius: 10px;
}
* {
    box-sizing: border-box;
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;;
}
body{
    margin:0;
    background: white;
    color: var(--text);
}
header{
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    padding: 14px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
}
header h1{
    margin:0;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: .2px;
}
.pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border2);
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.wrap{
    display:grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
    padding: 16px;
    width: 100%;
}
.panel, .stage{
    background: var(--card);
    border-radius: var(--radius);
}
.panel{
    padding: 14px;
}
.stage{
    padding: 14px;
    display:grid;
    grid-template-rows: auto 1fr;
}
.stageTop{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 6px 6px 10px;
}
.stageTop h2{
    margin:0;
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}
.small{
    font-size: 12px;
    color: var(--muted);
    line-height: 1.35;
}
.field{
    display:grid;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border2);
    background: #fbfbfd;
    margin-bottom: 10px;
}
label{
    font-size: 12px;
    color: var(--muted);
}
input[type="file"], select, button{
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    outline: none;
}
select:focus, input[type="file"]:focus{
    border-color: rgba(37,99,235,.45);
}
button{
    cursor: pointer;
    font-weight: 600;
    transition: transform .05s ease, box-shadow .12s ease, border-color .12s ease;
}
button:active{ transform: translateY(1px); }
button.primary{
    border-color: #02b757;
    background: #02b757;
    color:white;
}
button.primary:hover{
    border-color: rgba(37,99,235,.55);
}
.row{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.btnRow{
    display:flex;
    gap: 10px;
}
.btnRow > * { flex: 1; }
.canvasWrap{
    display:grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    grid-gap:10px;
}
.frame{
    aspect-ratio: 585 / 559;
    border-radius: var(--radius);
    border: 1px solid var(--border2);
    overflow: hidden;
    background: #ffffff;
}
.checkRow{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border-radius:var(--radius);
    border:1px solid var(--border);
    background:#fff;
}
.checkRow input{ width:auto; }
@media (max-width: 980px){
    .wrap{
        grid-template-columns: 1fr;
    }
    .stage{
        min-height: 560px;
    }
    header{
        position: relative;
    }
    .canvasWrap {
        grid-template-columns: 1fr;
    }
}