.qsheet {
    margin: 20px 0;
}

.qsheet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--teal, #15a3ad);
    cursor: pointer;
    border-bottom: 1px dashed currentColor;
    padding-bottom: 2px;
}

.qsheet-toggle::before {
    content: '\25B8';
    display: inline-block;
    transition: transform .3s;
}

.qsheet-toggle.is-open::before {
    transform: rotate(90deg);
}

.qsheet-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height .55s ease;
}

.qsheet-inner {
    padding-top: 20px;
}

.qsheet-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.qsheet-hint {
    font-size: .85rem;
    opacity: .7;
    margin: 0 0 14px;
}

.qsheet-facility {
    margin-bottom: 14px;
}

.qsheet-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
    margin-top: 14px;
}

.qsheet-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qsheet .field label {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.35;
    min-width: 0;
}

.qsheet-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.qsheet-scheme-col {
    min-width: 0;
}

.qsheet-notes {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .qsheet-layout {
        display: block;
    }

    .qsheet-scheme-col {
        margin-top: 18px;
    }
}

@media (max-width: 520px) {
    .qsheet-row {
        grid-template-columns: 1fr;
    }
}

.qsheet-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.qsheet-tool {
    border: 1px solid var(--border2, #cfd8dc);
    background: transparent;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .85rem;
    font-family: inherit;
    cursor: pointer;
    color: inherit;
    transition: background .2s, color .2s, border-color .2s;
}

.qsheet-tool:hover {
    border-color: var(--teal, #15a3ad);
}

.qsheet-tool.is-active {
    background: var(--teal, #15a3ad);
    border-color: var(--teal, #15a3ad);
    color: #fff;
}

.qsheet-color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    cursor: pointer;
}

.qsheet-color input[type="color"] {
    width: 40px;
    height: 31px;
    padding: 2px;
    border: 1px solid var(--border2, #cfd8dc);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.plan-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid var(--border2, #cfd8dc);
    border-radius: 12px;
    touch-action: none;
    cursor: crosshair;
}

.qsheet-photo {
    margin-top: 14px;
    font-size: .9rem;
}

.plan-preview {
    display: none;
    max-width: 320px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid var(--border2, #cfd8dc);
}
