body {
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        sans-serif;
    margin: 0;
    background: #fafafa;
}
#app {
    padding: 16px;
}

.topbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px;
}
.row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
input,
select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
}
button {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f7f7f7;
    cursor: pointer;
}
button.primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

.grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 12px;
}
#stageWrap {
    overflow: auto;
}
#stage {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: grab;
    white-space: pre-line;
    text-align: center;
    padding: 4px;
}
.item.zone {
    background: #ecf0f1;
}
.item.text {
    background: #fff;
    border-style: dashed;
}
.small {
    font-size: 12px;
    color: #555;
}
pre {
    background: #111;
    color: #0f0;
    padding: 12px;
    border-radius: 12px;
    overflow: auto;
    max-height: 240px;
}
hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 12px 0;
}
